@prosopo/client-bundle-example 2.11.8 → 2.11.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,4 +30,4 @@ computing gzip size...
30
30
  dist/cjs/index.cjs 0.71 kB │ gzip: 0.27 kB
31
31
  dist/cjs/plugins/pages.cjs 4.95 kB │ gzip: 1.25 kB
32
32
 
33
- ✓ built in 40ms
33
+ ✓ built in 63ms
@@ -31,4 +31,4 @@ dist/esm/_virtual/_rolldown/runtime.js 0.04 kB │ gzip: 0.06 kB
31
31
  dist/esm/index.js 0.42 kB │ gzip: 0.19 kB
32
32
  dist/esm/plugins/pages.js 4.32 kB │ gzip: 1.20 kB
33
33
 
34
- ✓ built in 51ms
34
+ ✓ built in 62ms
@@ -1,5 +1,5 @@
1
1
  $ tsc --build --verbose
2
- 12:56:45 PM - Projects in this build:
2
+ 9:15:15 AM - Projects in this build:
3
3
  * ../../dev/config/tsconfig.json
4
4
  * ../../packages/util/tsconfig.json
5
5
  * ../../packages/logger/tsconfig.json
@@ -9,21 +9,21 @@ $ tsc --build --verbose
9
9
  * ../../packages/types/tsconfig.json
10
10
  * tsconfig.json
11
11
 
12
- 12:56:45 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/vite/vite.esm.config.ts' is older than output '../../dev/config/dist/tsc/tsconfig.tsbuildinfo'
12
+ 9:15:15 AM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/dist/tsc/tsconfig.tsbuildinfo'
13
13
 
14
- 12:56:45 PM - Project '../../packages/util/tsconfig.json' is up to date because newest input '../../packages/util/src/url.ts' is older than output '../../packages/util/dist/tsc/tsconfig.tsbuildinfo'
14
+ 9:15:16 AM - Project '../../packages/util/tsconfig.json' is up to date because newest input '../../packages/util/src/url.ts' is older than output '../../packages/util/dist/tsc/tsconfig.tsbuildinfo'
15
15
 
16
- 12:56:45 PM - Project '../../packages/logger/tsconfig.json' is up to date because newest input '../../packages/logger/src/index.ts' is older than output '../../packages/logger/dist/tsc/tsconfig.tsbuildinfo'
16
+ 9:15:16 AM - Project '../../packages/logger/tsconfig.json' is up to date because newest input '../../packages/logger/src/index.ts' is older than output '../../packages/logger/dist/tsc/tsconfig.tsbuildinfo'
17
17
 
18
- 12:56:45 PM - Project '../../packages/dotenv/tsconfig.json' is up to date because newest input '../../packages/dotenv/src/env.ts' is older than output '../../packages/dotenv/dist/tsc/tsconfig.tsbuildinfo'
18
+ 9:15:16 AM - Project '../../packages/dotenv/tsconfig.json' is up to date because newest input '../../packages/dotenv/src/env.ts' is older than output '../../packages/dotenv/dist/tsc/tsconfig.tsbuildinfo'
19
19
 
20
- 12:56:45 PM - Project '../../packages/locale/tsconfig.json' is up to date because newest input '../../packages/locale/src/translator.ts' is older than output '../../packages/locale/dist/tsc/tsconfig.tsbuildinfo'
20
+ 9:15:16 AM - Project '../../packages/locale/tsconfig.json' is up to date because newest input '../../packages/locale/src/translationKey.ts' is older than output '../../packages/locale/dist/tsc/tsconfig.tsbuildinfo'
21
21
 
22
- 12:56:45 PM - Project '../../packages/util-crypto/tsconfig.json' is up to date because newest input '../../packages/util-crypto/src/types.ts' is older than output '../../packages/util-crypto/dist/tsc/tsconfig.tsbuildinfo'
22
+ 9:15:16 AM - Project '../../packages/util-crypto/tsconfig.json' is up to date because newest input '../../packages/util-crypto/src/types.ts' is older than output '../../packages/util-crypto/dist/tsc/tsconfig.tsbuildinfo'
23
23
 
24
- 12:56:45 PM - Project '../../packages/types/tsconfig.json' is up to date because newest input '../../packages/types/src/types.test-d.ts' is older than output '../../packages/types/dist/tsc/tsconfig.tsbuildinfo'
24
+ 9:15:16 AM - Project '../../packages/types/tsconfig.json' is up to date because newest input '../../packages/types/src/types.test-d.ts' is older than output '../../packages/types/dist/tsc/tsconfig.tsbuildinfo'
25
25
 
26
- 12:56:45 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
26
+ 9:15:16 AM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
27
27
 
28
- 12:56:45 PM - Building project '/home/runner/work/captcha/captcha/demos/client-bundle-example/tsconfig.json'...
28
+ 9:15:16 AM - Building project '/home/runner/work/captcha/captcha/demos/client-bundle-example/tsconfig.json'...
29
29
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # @prosopo/client-bundle-example
2
2
 
3
+ ## 2.11.9
4
+ ### Patch Changes
5
+
6
+ - d71fdc6: The production and staging demo sites now send their form to `https://client-example-server.prosopo.io` instead of `https://localhost:9228`. Since the 6 October redeploy, every demo submit failed with "Failed to fetch", and Chrome asked visitors for permission to reach devices on their local network. A production or staging build of the demos now fails if `PROSOPO_SERVER_URL` is missing or points at localhost.
7
+
3
8
  ## 2.11.8
4
9
  ### Patch Changes
5
10
 
package/env.staging CHANGED
@@ -3,5 +3,5 @@ PROSOPO_SITE_KEY_FRICTIONLESS=5CcNvLUdiXFpzKDMjThGLSK9rhWHA1H4EF3zrgkpkjAdqmuP
3
3
  PROSOPO_SITE_KEY_POW=5EoDBDkJscwosTHhHgGf4hqoU5s3WLwAjh8yTCQh72YYjVEt
4
4
  PROSOPO_SITE_KEY_IMAGE=5E7QGuzYgLJMH6qXQiCw62AUuLxPXRs1E6jitV4w8zTjDcKr
5
5
  PROSOPO_SITE_KEY_PUZZLE=5DeVyd8pP5DCGDh52e4UEr8pSGHvcUa5U6mm8iEjADr33hZi
6
- PROSOPO_SERVER_URL=https://localhost:9228
6
+ PROSOPO_SERVER_URL=https://client-example-server.prosopo.io
7
7
  VITE_BUNDLE_URL=https://staging-js.prosopo.io/js/procaptcha.bundle.js
package/package.json CHANGED
@@ -13,13 +13,13 @@
13
13
  "engines": {
14
14
  "node": "^24"
15
15
  },
16
- "version": "2.11.8",
16
+ "version": "2.11.9",
17
17
  "devDependencies": {
18
18
  "@emotion/cache": "11.14.0",
19
- "@prosopo/config": "3.5.2",
19
+ "@prosopo/config": "3.5.3",
20
20
  "@prosopo/dotenv": "3.0.64",
21
21
  "@prosopo/locale": "3.13.2",
22
- "@prosopo/types": "5.20.0",
22
+ "@prosopo/types": "5.22.0",
23
23
  "@types/jsdom": "30.0.0",
24
24
  "@types/node": "22.5.5",
25
25
  "@vitest/coverage-v8": "5.0.4",
package/vite.config.ts CHANGED
@@ -48,6 +48,21 @@ const assertDemoSiteKeysSet = (mode: string) => {
48
48
  }
49
49
  };
50
50
 
51
+ const DEPLOYED_MODES = ["production", "staging"];
52
+ const LOOPBACK_HOSTS = ["localhost", "127.0.0.1", "[::1]"];
53
+
54
+ const assertDemoServerUrlPublic = (mode: string) => {
55
+ if (!DEPLOYED_MODES.includes(mode)) {
56
+ return;
57
+ }
58
+ const serverUrl = process.env.PROSOPO_SERVER_URL;
59
+ if (!serverUrl || LOOPBACK_HOSTS.includes(new URL(serverUrl).hostname)) {
60
+ throw new Error(
61
+ `Refusing to build the demos for mode "${mode}" with PROSOPO_SERVER_URL=${serverUrl}: visitors' form submissions would fail and their browser would ask for local network access.`,
62
+ );
63
+ }
64
+ };
65
+
51
66
  const certPath = path.resolve(__dirname, "../../certs");
52
67
  const keyPath = path.join(certPath, "server.key");
53
68
  const crtPath = path.join(certPath, "server.crt");
@@ -117,6 +132,7 @@ function moveDirectoryContents(
117
132
  export default defineConfig(({ command, mode }) => {
118
133
  if (command === "build") {
119
134
  assertDemoSiteKeysSet(mode);
135
+ assertDemoServerUrlPublic(mode);
120
136
  }
121
137
 
122
138
  // Check if certificates exist