diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml index c98a4f2d8b..83e96a4456 100644 --- a/.github/workflows/bump_version.yml +++ b/.github/workflows/bump_version.yml @@ -115,6 +115,7 @@ jobs: git config user.email "dev@prosopo.io" # checkout the src branch + git fetch --all git checkout ${{ github.event.inputs.src }} INTERIM="${{ github.event.inputs.interim}}" diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 0afa1cb1f6..be0970efc8 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -5,7 +5,7 @@ name: cypress on: pull_request: branches: [main, dev, staging, release/*] - types: + types: - opened # when a PR is opened - synchronize # when a PR is pushed to - reopened # when a PR is reopened @@ -106,6 +106,7 @@ jobs: cp demos/client-example-server/env.development demos/client-example-server/.env.test cp demos/client-example/env.development demos/client-example/.env.test + cp demos/client-bundle-example/env.development demos/client-example/.env.test cp dev/scripts/env.test .env.test cp dev/scripts/env.test dev/scripts/.env.test cp dev/scripts/env.test packages/cli/.env.test diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b6711b617c..fd7691f4f6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -128,6 +128,7 @@ jobs: cp demos/client-example-server/env.development demos/client-example-server/.env.test cp demos/client-example/env.development demos/client-example/.env.test + cp demos/client-bundle-example/env.development demos/client-bundle-example/.env.test cp dev/scripts/env.test .env.test cp dev/scripts/env.test dev/scripts/.env.test cp dev/scripts/env.test packages/cli/.env.test diff --git a/demos/client-bundle-example/README.md b/demos/client-bundle-example/README.md index 1356131751..0e6b84d53e 100644 --- a/demos/client-bundle-example/README.md +++ b/demos/client-bundle-example/README.md @@ -15,7 +15,7 @@ docker compose --file ./docker/docker-compose.development.yml up -d && \ npm i && \ npm run build:all && \ npm run setup:all && \ -NODE_ENV=production npm -w @prosopo/procaptcha-bundle run bundle && \ +NODE_ENV=development npm -w @prosopo/procaptcha-bundle run bundle && \ npm run start:all ``` diff --git a/demos/client-bundle-example/env.development b/demos/client-bundle-example/env.development new file mode 100644 index 0000000000..71d0f393f9 --- /dev/null +++ b/demos/client-bundle-example/env.development @@ -0,0 +1,2 @@ +PROSOPO_SITE_KEY=5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw +PROSOPO_SERVER_URL=http://localhost:9228 diff --git a/demos/client-bundle-example/package.json b/demos/client-bundle-example/package.json index 0aa5929887..e152ea809d 100644 --- a/demos/client-bundle-example/package.json +++ b/demos/client-bundle-example/package.json @@ -1,6 +1,7 @@ { "name": "@prosopo/client-bundle-example", "main": "index.js", + "type": "module", "engines": { "node": ">=20", "npm": ">=9" @@ -12,8 +13,9 @@ "start": "vite serve ./src --port 9232 --config vite.config.ts", "clean": "echo 'nothing to clean'" }, - "version": "2.1.3", + "version": "2.1.4", "devDependencies": { + "@prosopo/dotenv": "2.1.4", "@types/node": "22.5.5", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", diff --git a/demos/client-bundle-example/src/frictionless.html b/demos/client-bundle-example/src/frictionless.html index c9d098ea49..a84248844f 100644 --- a/demos/client-bundle-example/src/frictionless.html +++ b/demos/client-bundle-example/src/frictionless.html @@ -9,7 +9,7 @@ // Get the Element using elementId const captchaContainer = document.getElementById('procaptcha-container') render(captchaContainer, { - siteKey: '5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw', + siteKey: import.meta.env.PROSOPO_SITE_KEY, theme: 'dark', callback: onCaptchaVerified, captchaType: 'frictionless', diff --git a/demos/client-bundle-example/src/index.html b/demos/client-bundle-example/src/index.html index e9136f9765..b51781f642 100644 --- a/demos/client-bundle-example/src/index.html +++ b/demos/client-bundle-example/src/index.html @@ -1,53 +1,168 @@ -
- -