@prosopo/cli 3.8.19 → 3.8.21
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.
- package/.turbo/turbo-build$colon$cjs.log +3 -3
- package/.turbo/turbo-build$colon$tsc.log +30 -30
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +25 -0
- package/Dockerfile +70 -18
- package/dist/bundle/provider.cli.bundle.js +6834 -6757
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/cli@3.8.
|
|
2
|
+
> @prosopo/cli@3.8.21 build:cjs
|
|
3
3
|
> NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
|
|
4
4
|
|
|
5
5
|
ViteCommonJSConfig: .
|
|
@@ -32,6 +32,7 @@ ViteCommonJSConfig: .
|
|
|
32
32
|
]
|
|
33
33
|
}
|
|
34
34
|
{
|
|
35
|
+
[33mThe plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the [1mresolve.tsconfigPaths[22m option. You can remove the plugin and set [1mresolve.tsconfigPaths: true[22m in your Vite config instead.[39m
|
|
35
36
|
externals: [
|
|
36
37
|
'@prosopo/api',
|
|
37
38
|
'@prosopo/types',
|
|
@@ -59,7 +60,6 @@ ViteCommonJSConfig: .
|
|
|
59
60
|
'@prosopo/web-bot-auth'
|
|
60
61
|
]
|
|
61
62
|
}
|
|
62
|
-
[33mThe plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the [1mresolve.tsconfigPaths[22m option. You can remove the plugin and set [1mresolve.tsconfigPaths: true[22m in your Vite config instead.[39m
|
|
63
63
|
[36mvite v8.1.5 [32mbuilding ssr environment for production...[36m[39m
|
|
64
64
|
Bundle build started
|
|
65
65
|
[2K
|
|
@@ -96,4 +96,4 @@ dist/cjs/RateLimiter.cjs 5.78 kB │ gzip: 0.92 kB
|
|
|
96
96
|
[38;5;240m │[0m ╰─────── This `import.meta` will be replaced with an empty object (`{}`) automatically. If this is desired, you can suppress this warning by adding `transform.define: { 'import.meta': {} }`. If `import.meta` needs to be kept as-is, you need to set the output format to `esm`.
|
|
97
97
|
[38;5;246m────╯[0m
|
|
98
98
|
[39m
|
|
99
|
-
[32m✓ built in
|
|
99
|
+
[32m✓ built in 91ms[39m
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/cli@3.8.
|
|
2
|
+
> @prosopo/cli@3.8.21 build:tsc
|
|
3
3
|
> tsc --build --verbose
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
3:37:54 PM - Projects in this build:
|
|
6
6
|
* ../../dev/config/tsconfig.json
|
|
7
7
|
* ../util/tsconfig.json
|
|
8
8
|
* ../locale/tsconfig.json
|
|
@@ -31,59 +31,59 @@
|
|
|
31
31
|
* ../../dev/workspace/tsconfig.json
|
|
32
32
|
* tsconfig.json
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
3:37:54 PM - 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/tsconfig.tsbuildinfo'
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
3:37:54 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
3:37:55 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
3:37:55 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
3:37:55 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/tsconfig.tsbuildinfo'
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
3:37:55 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
3:37:55 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
3:37:55 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
3:37:55 PM - Project '../dotenv/tsconfig.json' is up to date because newest input '../dotenv/src/index.ts' is older than output '../dotenv/tsconfig.tsbuildinfo'
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
3:37:55 PM - Project '../ipinfo/tsconfig.json' is up to date because newest input '../ipinfo/src/IpInfoService.ts' is older than output '../ipinfo/tsconfig.tsbuildinfo'
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
3:37:55 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/apiRoutes.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
3:37:55 PM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/tests/testRedisConnection.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
3:37:55 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/transformRule.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
3:37:55 PM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/types.test-d.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
3:37:55 PM - Project '../database/tsconfig.json' is up to date because newest input '../database/src/tests/unit/captchaLabel.unit.test.ts' is older than output '../database/tsconfig.tsbuildinfo'
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
3:37:55 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/keyring/keyring.test.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
3:37:55 PM - Project '../types-env/tsconfig.json' is up to date because newest input '../types-env/src/index.ts' is older than output '../types-env/tsconfig.tsbuildinfo'
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
3:37:55 PM - Project '../env/tsconfig.json' is up to date because newest input '../env/src/tests/env.maintenance.unit.test.ts' is older than output '../env/tsconfig.tsbuildinfo'
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
3:37:55 PM - Project '../api-express-router/tsconfig.json' is up to date because newest input '../api-express-router/src/tests/unit/testDoubles.ts' is older than output '../api-express-router/tsconfig.tsbuildinfo'
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
3:37:55 PM - Project '../captcha-severity/tsconfig.json' is up to date because newest input '../captcha-severity/src/index.test.ts' is older than output '../captcha-severity/tsconfig.tsbuildinfo'
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
3:37:55 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/tests/captcha.unit.test.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
3:37:55 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/developmentProviderUrl.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
3:37:55 PM - Project '../puzzle-assets/tsconfig.json' is up to date because newest input '../puzzle-assets/src/background.ts' is older than output '../puzzle-assets/tsconfig.tsbuildinfo'
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
3:37:55 PM - Project '../web-bot-auth/tsconfig.json' is up to date because newest input '../web-bot-auth/src/base64.ts' is older than output '../web-bot-auth/tsconfig.tsbuildinfo'
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
3:37:55 PM - Project '../provider/tsconfig.json' is up to date because newest input '../provider/src/utils/normalizeRequestIp.ts' is older than output '../provider/tsconfig.tsbuildinfo'
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
3:37:55 PM - Project '../../dev/workspace/tsconfig.json' is up to date because newest input '../../dev/workspace/src/projectInfo.ts' is older than output '../../dev/workspace/tsconfig.tsbuildinfo'
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
3:37:55 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
3:37:55 PM - Building project '/home/runner/work/captcha/captcha/packages/cli/tsconfig.json'...
|
|
89
89
|
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/cli@3.8.
|
|
2
|
+
> @prosopo/cli@3.8.21 build
|
|
3
3
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/cli@3.8.
|
|
6
|
+
> @prosopo/cli@3.8.21 build:cross-env
|
|
7
7
|
> vite build --config vite.esm.config.ts --mode production
|
|
8
8
|
|
|
9
9
|
ViteEsmConfig: .
|
|
@@ -40,7 +40,6 @@ ViteEsmConfig: .
|
|
|
40
40
|
'@prosopo/api',
|
|
41
41
|
'@prosopo/types',
|
|
42
42
|
'@prosopo/locale',
|
|
43
|
-
[33mThe plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the [1mresolve.tsconfigPaths[22m option. You can remove the plugin and set [1mresolve.tsconfigPaths: true[22m in your Vite config instead.[39m
|
|
44
43
|
'@prosopo/util',
|
|
45
44
|
'@prosopo/util-crypto',
|
|
46
45
|
'@prosopo/common',
|
|
@@ -64,6 +63,7 @@ ViteEsmConfig: .
|
|
|
64
63
|
'@prosopo/web-bot-auth'
|
|
65
64
|
]
|
|
66
65
|
}
|
|
66
|
+
[33mThe plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the [1mresolve.tsconfigPaths[22m option. You can remove the plugin and set [1mresolve.tsconfigPaths: true[22m in your Vite config instead.[39m
|
|
67
67
|
[36mvite v8.1.5 [32mbuilding ssr environment for production...[36m[39m
|
|
68
68
|
Bundle build started
|
|
69
69
|
[2K
|
|
@@ -92,4 +92,4 @@ dist/commands/siteKeyRegister.js 3.99 kB │ gzip: 1.24 kB
|
|
|
92
92
|
dist/prosopo.config.js 4.49 kB │ gzip: 1.48 kB
|
|
93
93
|
dist/RateLimiter.js 5.35 kB │ gzip: 0.92 kB
|
|
94
94
|
|
|
95
|
-
[32m✓ built in
|
|
95
|
+
[32m✓ built in 66ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @prosopo/cli
|
|
2
2
|
|
|
3
|
+
## 3.8.21
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- Updated dependencies [fda0eba]
|
|
7
|
+
- Updated dependencies [1728cd0]
|
|
8
|
+
- Updated dependencies [20542d8]
|
|
9
|
+
- Updated dependencies [eebe6ee]
|
|
10
|
+
- @prosopo/types@5.10.2
|
|
11
|
+
- @prosopo/provider@5.13.1
|
|
12
|
+
- @prosopo/api@4.3.5
|
|
13
|
+
- @prosopo/env@3.6.64
|
|
14
|
+
- @prosopo/keyring@2.9.97
|
|
15
|
+
|
|
16
|
+
## 3.8.20
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [4c9b84b]
|
|
20
|
+
- Updated dependencies [85a1bb9]
|
|
21
|
+
- Updated dependencies [2cca36e]
|
|
22
|
+
- @prosopo/provider@5.13.0
|
|
23
|
+
- @prosopo/types@5.10.1
|
|
24
|
+
- @prosopo/api@4.3.4
|
|
25
|
+
- @prosopo/env@3.6.63
|
|
26
|
+
- @prosopo/keyring@2.9.96
|
|
27
|
+
|
|
3
28
|
## 3.8.19
|
|
4
29
|
### Patch Changes
|
|
5
30
|
|
package/Dockerfile
CHANGED
|
@@ -1,30 +1,82 @@
|
|
|
1
|
-
|
|
1
|
+
# Two stages. Everything that needs a shell, a package manager or a network
|
|
2
|
+
# fetch happens in the builder; the runtime image is distroless and contains
|
|
3
|
+
# only the Node runtime, this bundle and its one dependency.
|
|
4
|
+
#
|
|
5
|
+
# The builder is `node:24-slim` rather than `node:24` for the same reason the
|
|
6
|
+
# runtime is distroless: `node:24` is 1.63 GB of build toolchain that a
|
|
7
|
+
# pre-bundled JS file and a single prebuilt-binary dependency never touch.
|
|
8
|
+
FROM node:24-slim AS builder
|
|
2
9
|
|
|
3
|
-
WORKDIR /
|
|
10
|
+
WORKDIR /build
|
|
4
11
|
|
|
5
12
|
# set shell to bash and error on any failure, unset variables, and pipefail
|
|
6
13
|
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
|
|
7
14
|
|
|
15
|
+
# slim ships no curl, and the GeoLite fetches below need it. Builder-only, so
|
|
16
|
+
# none of this reaches the runtime image.
|
|
17
|
+
RUN apt-get update && \
|
|
18
|
+
apt-get install -y --no-install-recommends curl ca-certificates && \
|
|
19
|
+
rm -rf /var/lib/apt/lists/*
|
|
20
|
+
|
|
8
21
|
COPY ./packages/cli/dist/bundle/ ./
|
|
9
22
|
|
|
10
23
|
COPY ./packages/locale/dist/locales/ ./locales/
|
|
11
24
|
|
|
12
|
-
#
|
|
13
|
-
|
|
14
|
-
RUN curl -
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
# generated package.json declares `sharp` as a runtime dependency so
|
|
19
|
-
# `npm i` installs the linux-x64 native binary — vite bundles the JS
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
# --
|
|
23
|
-
#
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
# Download the GeoLite2 databases into the same directory. One layer rather
|
|
26
|
+
# than three so the intermediate states are not retained.
|
|
27
|
+
RUN curl -fLsS -o GeoLite2-Country.mmdb https://git.io/GeoLite2-Country.mmdb && \
|
|
28
|
+
curl -fLsS -o GeoLite2-City.mmdb https://git.io/GeoLite2-City.mmdb && \
|
|
29
|
+
curl -fLsS -o GeoLite2-ASN.mmdb https://git.io/GeoLite2-ASN.mmdb
|
|
30
|
+
|
|
31
|
+
# The generated package.json declares `sharp` as a runtime dependency so
|
|
32
|
+
# `npm i` installs the linux-x64 native binary — vite bundles the JS shim but
|
|
33
|
+
# not the platform-specific .node addon, and the puzzle renderer imports sharp
|
|
34
|
+
# from @prosopo/puzzle-assets at runtime. --os=linux --cpu=x64
|
|
35
|
+
# --include=optional forces npm to fetch the correct optional platform variant
|
|
36
|
+
# regardless of the build host.
|
|
37
|
+
#
|
|
38
|
+
# The shebang points at the absolute node path rather than `/usr/bin/env node`:
|
|
39
|
+
# there is no `env` on PATH in the runtime image to resolve a relative
|
|
40
|
+
# interpreter, but the kernel honours an absolute one. It is a convenience
|
|
41
|
+
# only — every caller in this repo invokes node explicitly, because `docker
|
|
42
|
+
# exec` does not apply ENTRYPOINT:
|
|
43
|
+
# docker exec provider1 /nodejs/bin/node /usr/src/app/provider.cli.bundle.js <command>
|
|
44
|
+
RUN echo '#!/nodejs/bin/node' | cat - provider.cli.bundle.js > temp && \
|
|
45
|
+
mv temp provider.cli.bundle.js && \
|
|
46
|
+
chmod +x provider.cli.bundle.js && \
|
|
47
|
+
echo '{ "name": "prosopo-provider", "type": "module", "dependencies": { "sharp": "0.35.3" } }' > package.json && \
|
|
48
|
+
npm i --include=optional --os=linux --cpu=x64 --no-fund --no-audit && \
|
|
49
|
+
npm cache clean --force
|
|
50
|
+
|
|
51
|
+
# `nodejs24-debian12` matches the builder's Debian release, so the glibc the
|
|
52
|
+
# native addons were resolved against is the same one that loads them. All
|
|
53
|
+
# four (@img/sharp, native-ja4, native-merkle, native-puzzle) are
|
|
54
|
+
# linux-x64-gnu; an Alpine/musl runtime would break every one.
|
|
55
|
+
#
|
|
56
|
+
# The `:nonroot` tag runs as uid/gid 65532 rather than root. The bind-mounted
|
|
57
|
+
# detector-pool directory must be owned by that uid on the host or the pool
|
|
58
|
+
# cannot be written or re-read — and an unreadable pool fails silently, with
|
|
59
|
+
# the provider falling back to proof of work. The ansible provider role
|
|
60
|
+
# chowns it; see captcha-private issue #4749.
|
|
61
|
+
#
|
|
62
|
+
# There is no shell, no package manager and no npx in here. That is the point,
|
|
63
|
+
# and it is also the operational cost: `docker exec ... bash` no longer works,
|
|
64
|
+
# CLI commands must name node explicitly (see above), and container
|
|
65
|
+
# healthchecks cannot use curl — they run `node -e "fetch(...)"` instead. Every
|
|
66
|
+
# call site in this repo and in the ansible playbooks has been moved over.
|
|
67
|
+
FROM gcr.io/distroless/nodejs24-debian12:nonroot
|
|
68
|
+
|
|
69
|
+
WORKDIR /usr/src/app
|
|
70
|
+
|
|
71
|
+
# --chown so the runtime user owns what it needs to read and write.
|
|
72
|
+
COPY --from=builder --chown=65532:65532 /build/ ./
|
|
27
73
|
|
|
28
74
|
EXPOSE 9229 9339 80 443
|
|
29
75
|
|
|
30
|
-
|
|
76
|
+
# Redundant with the `:nonroot` tag, which already runs as this uid, but
|
|
77
|
+
# stated explicitly: it is the only form a Dockerfile reader — or a scanner —
|
|
78
|
+
# can see, and it keeps the guarantee if the tag is ever changed.
|
|
79
|
+
USER 65532:65532
|
|
80
|
+
|
|
81
|
+
# ENTRYPOINT is /nodejs/bin/node, so this is argv to node.
|
|
82
|
+
CMD ["/usr/src/app/provider.cli.bundle.js", "--api"]
|