@prosopo/client-bundle-example 2.11.8 → 2.11.10

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 43ms
@@ -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 35ms
@@ -1,5 +1,5 @@
1
1
  $ tsc --build --verbose
2
- 12:56:45 PM - Projects in this build:
2
+ 10:06:38 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
+ 10:06:38 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
+ 10:06:38 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
+ 10:06:38 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
+ 10:06:38 AM - Project '../../packages/dotenv/tsconfig.json' is up to date because newest input '../../packages/dotenv/src/tests/env.unit.test.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
+ 10:06:38 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
+ 10:06:38 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
+ 10:06:38 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
+ 10:06:38 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
+ 10:06:38 AM - Building project '/home/runner/work/captcha/captcha/demos/client-bundle-example/tsconfig.json'...
29
29
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @prosopo/client-bundle-example
2
2
 
3
+ ## 2.11.10
4
+ ### Patch Changes
5
+
6
+ - 769a882: The icon-order demo pages get a production and staging site key, so demo.prosopo.io can serve them. Production and staging demo builds now also refuse to run without `PROSOPO_SITE_KEY_ICONORDER`, like the other four demo keys, so those pages can't ship with `data-sitekey="undefined"`.
7
+ - a191c21: Move TODO and FIXME comments into GitHub issues. Comments that still help a reader now state the fact plainly and link the issue; lint suppressions give a real reason. No behaviour changes.
8
+
9
+ ## 2.11.9
10
+ ### Patch Changes
11
+
12
+ - 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.
13
+
3
14
  ## 2.11.8
4
15
  ### Patch Changes
5
16
 
package/env.staging CHANGED
@@ -3,5 +3,6 @@ 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_SITE_KEY_ICONORDER=5CoT7Vu5uD3FvQahsoayjPZcmPcoZ2xY4KXByWyybboqGoxr
7
+ PROSOPO_SERVER_URL=https://client-example-server.prosopo.io
7
8
  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.10",
17
17
  "devDependencies": {
18
18
  "@emotion/cache": "11.14.0",
19
- "@prosopo/config": "3.5.2",
20
- "@prosopo/dotenv": "3.0.64",
21
- "@prosopo/locale": "3.13.2",
22
- "@prosopo/types": "5.20.0",
19
+ "@prosopo/config": "3.5.4",
20
+ "@prosopo/dotenv": "3.0.67",
21
+ "@prosopo/locale": "3.14.2",
22
+ "@prosopo/types": "5.27.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
@@ -37,6 +37,7 @@ const DEMO_SITE_KEY_VARS = [
37
37
  "PROSOPO_SITE_KEY_POW",
38
38
  "PROSOPO_SITE_KEY_IMAGE",
39
39
  "PROSOPO_SITE_KEY_PUZZLE",
40
+ "PROSOPO_SITE_KEY_ICONORDER",
40
41
  ] as const;
41
42
 
42
43
  const assertDemoSiteKeysSet = (mode: string) => {
@@ -48,6 +49,21 @@ const assertDemoSiteKeysSet = (mode: string) => {
48
49
  }
49
50
  };
50
51
 
52
+ const DEPLOYED_MODES = ["production", "staging"];
53
+ const LOOPBACK_HOSTS = ["localhost", "127.0.0.1", "[::1]"];
54
+
55
+ const assertDemoServerUrlPublic = (mode: string) => {
56
+ if (!DEPLOYED_MODES.includes(mode)) {
57
+ return;
58
+ }
59
+ const serverUrl = process.env.PROSOPO_SERVER_URL;
60
+ if (!serverUrl || LOOPBACK_HOSTS.includes(new URL(serverUrl).hostname)) {
61
+ throw new Error(
62
+ `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.`,
63
+ );
64
+ }
65
+ };
66
+
51
67
  const certPath = path.resolve(__dirname, "../../certs");
52
68
  const keyPath = path.join(certPath, "server.key");
53
69
  const crtPath = path.join(certPath, "server.crt");
@@ -117,6 +133,7 @@ function moveDirectoryContents(
117
133
  export default defineConfig(({ command, mode }) => {
118
134
  if (command === "build") {
119
135
  assertDemoSiteKeysSet(mode);
136
+ assertDemoServerUrlPublic(mode);
120
137
  }
121
138
 
122
139
  // Check if certificates exist