@zuplo/cli 7.13.9 → 7.13.13
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/node_modules/@hono/node-server/dist/index.cjs +31 -6
- package/node_modules/@hono/node-server/dist/index.mjs +31 -6
- package/node_modules/@hono/node-server/package.json +1 -1
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwks/remote.js +3 -1
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/deflate.js +2 -1
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +2 -1
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/package.json +1 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwks/remote.js +3 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/deflate.js +2 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +2 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/package.json +1 -1
- package/node_modules/@posthog/core/dist/cookie.d.ts +4 -0
- package/node_modules/@posthog/core/dist/cookie.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/cookie.js +8 -2
- package/node_modules/@posthog/core/dist/cookie.mjs +8 -2
- package/node_modules/@posthog/core/dist/utils/bot-detection.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/utils/bot-detection.js +1 -0
- package/node_modules/@posthog/core/dist/utils/bot-detection.mjs +1 -0
- package/node_modules/@posthog/core/package.json +2 -2
- package/node_modules/@posthog/core/src/cookie.ts +13 -2
- package/node_modules/@posthog/core/src/utils/bot-detection.spec.ts +7 -0
- package/node_modules/@posthog/core/src/utils/bot-detection.ts +1 -0
- package/node_modules/@zuplo/core/customer.cli.minified.js +332 -332
- package/node_modules/@zuplo/core/index.minified.js +320 -320
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-D4D3WYPP.js → chunk-3DWWKPBI.js} +85 -85
- package/node_modules/@zuplo/runtime/out/esm/chunk-3DWWKPBI.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/{chunk-PXS4NOKU.js → chunk-KA4STQE7.js} +17 -17
- package/node_modules/@zuplo/runtime/out/esm/chunk-KA4STQE7.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-VP5Q3DEN.js +26 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-VP5Q3DEN.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/internal/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +60 -0
- package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +119 -0
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/node_modules/express-rate-limit/dist/index.cjs +1 -1
- package/node_modules/express-rate-limit/dist/index.mjs +1 -1
- package/node_modules/express-rate-limit/package.json +1 -1
- package/node_modules/hono/dist/cjs/adapter/bun/serve-static.js +1 -1
- package/node_modules/hono/dist/cjs/adapter/bun/websocket.js +1 -1
- package/node_modules/hono/dist/cjs/context.js +1 -1
- package/node_modules/hono/dist/cjs/helper/css/common.js +3 -5
- package/node_modules/hono/dist/cjs/hono-base.js +4 -10
- package/node_modules/hono/dist/cjs/hono.js +0 -1
- package/node_modules/hono/dist/cjs/middleware/basic-auth/index.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/bearer-auth/index.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/csrf/index.js +2 -2
- package/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +2 -2
- package/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +2 -2
- package/node_modules/hono/dist/cjs/middleware/mount/index.js +4 -4
- package/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +13 -11
- package/node_modules/hono/dist/cjs/router/reg-exp-router/prepared-router.js +4 -4
- package/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +39 -51
- package/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +15 -5
- package/node_modules/hono/dist/cjs/utils/jwt/jwt.js +2 -1
- package/node_modules/hono/dist/cjs/utils/mount.js +35 -0
- package/node_modules/hono/dist/cjs/utils/url.js +10 -0
- package/node_modules/hono/dist/cjs/validator/validator.js +1 -1
- package/node_modules/hono/dist/context.js +1 -1
- package/node_modules/hono/dist/helper/css/common.js +3 -5
- package/node_modules/hono/dist/hono-base.js +4 -10
- package/node_modules/hono/dist/hono.js +0 -1
- package/node_modules/hono/dist/middleware/basic-auth/index.js +1 -1
- package/node_modules/hono/dist/middleware/bearer-auth/index.js +1 -1
- package/node_modules/hono/dist/middleware/csrf/index.js +2 -2
- package/node_modules/hono/dist/middleware/jwk/jwk.js +2 -2
- package/node_modules/hono/dist/middleware/jwt/jwt.js +2 -2
- package/node_modules/hono/dist/middleware/language/language.js +1 -1
- package/node_modules/hono/dist/middleware/mount/index.js +4 -4
- package/node_modules/hono/dist/router/reg-exp-router/node.js +13 -11
- package/node_modules/hono/dist/router/reg-exp-router/prepared-router.js +5 -5
- package/node_modules/hono/dist/router/reg-exp-router/router.js +40 -52
- package/node_modules/hono/dist/router/reg-exp-router/trie.js +15 -5
- package/node_modules/hono/dist/types/middleware/mount/index.d.ts +1 -0
- package/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +3 -3
- package/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +1 -1
- package/node_modules/hono/dist/types/utils/mount.d.ts +4 -0
- package/node_modules/hono/dist/types/utils/url.d.ts +1 -0
- package/node_modules/hono/dist/utils/jwt/jwt.js +2 -1
- package/node_modules/hono/dist/utils/mount.js +34 -0
- package/node_modules/hono/dist/utils/url.js +10 -1
- package/node_modules/hono/dist/validator/validator.js +1 -1
- package/node_modules/hono/package.json +1 -1
- package/node_modules/ip-address/README.md +39 -39
- package/node_modules/ip-address/dist/ipv6.js +1 -1
- package/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/ip-address/package.json +1 -1
- package/node_modules/thread-stream/.github/workflows/ci.yml +1 -1
- package/node_modules/thread-stream/SECURITY.md +77 -0
- package/node_modules/thread-stream/index.d.ts +2 -1
- package/node_modules/thread-stream/index.js +65 -7
- package/node_modules/thread-stream/lib/wait.js +23 -5
- package/node_modules/thread-stream/package.json +10 -5
- package/node_modules/thread-stream/test/create-and-exit.js +1 -1
- package/node_modules/thread-stream/test/end.test.js +35 -0
- package/node_modules/thread-stream/test/error-flush.test.js +96 -0
- package/node_modules/thread-stream/test/error-immediate.js +17 -0
- package/node_modules/thread-stream/test/flush-ref-keeps-alive.js +23 -0
- package/node_modules/thread-stream/test/flush-unref-exit.js +23 -0
- package/node_modules/thread-stream/test/ready-race-worker.js +22 -0
- package/node_modules/thread-stream/test/ready.test.js +46 -0
- package/node_modules/thread-stream/test/thread-management.test.js +68 -0
- package/node_modules/thread-stream/test/to-file-sync.js +23 -0
- package/node_modules/thread-stream/test/types/index.test-d.ts +26 -0
- package/node_modules/thread-stream/test/wait.test.js +131 -0
- package/package.json +11 -11
- package/node_modules/@zuplo/runtime/out/esm/chunk-D4D3WYPP.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-PXS4NOKU.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-ZCJ5QBVD.js +0 -26
- package/node_modules/@zuplo/runtime/out/esm/chunk-ZCJ5QBVD.js.map +0 -1
- package/node_modules/thread-stream/.claude/settings.local.json +0 -15
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-D4D3WYPP.js.LEGAL.txt → chunk-3DWWKPBI.js.LEGAL.txt} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-PXS4NOKU.js.LEGAL.txt → chunk-KA4STQE7.js.LEGAL.txt} +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const { test } = require('node:test')
|
|
4
|
+
const assert = require('node:assert')
|
|
5
|
+
const { wait } = require('../lib/wait')
|
|
6
|
+
|
|
7
|
+
function waitForResult (update, opts = {}) {
|
|
8
|
+
const state = new Int32Array(new SharedArrayBuffer(4))
|
|
9
|
+
const waitTimeout = opts.timeout ?? Infinity
|
|
10
|
+
|
|
11
|
+
return new Promise((resolve, reject) => {
|
|
12
|
+
const guard = setTimeout(() => {
|
|
13
|
+
reject(new Error('wait did not complete'))
|
|
14
|
+
}, 1000)
|
|
15
|
+
|
|
16
|
+
wait(state, 0, 1, waitTimeout, (err, result) => {
|
|
17
|
+
clearTimeout(guard)
|
|
18
|
+
|
|
19
|
+
if (err) {
|
|
20
|
+
reject(err)
|
|
21
|
+
return
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
resolve(result)
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
setImmediate(() => {
|
|
28
|
+
update(state)
|
|
29
|
+
if (opts.notify !== false) {
|
|
30
|
+
Atomics.notify(state, 0)
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
test('wait returns ok when the expected value is reached', async function () {
|
|
37
|
+
const result = await waitForResult((state) => {
|
|
38
|
+
Atomics.store(state, 0, 1)
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
assert.strictEqual(result, 'ok')
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
test('wait returns ok when the expected value is overshot', async function () {
|
|
45
|
+
// The reader (READ_INDEX) advances in jumps and may skip over a snapshot of
|
|
46
|
+
// `expected`. Reaching or passing it means the reader has caught up, so this
|
|
47
|
+
// should resolve as ok rather than waiting forever (#250).
|
|
48
|
+
const result = await waitForResult((state) => {
|
|
49
|
+
Atomics.store(state, 0, 2)
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
assert.strictEqual(result, 'ok')
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
test('wait returns ok when the value already overshot and will never change again', async function () {
|
|
56
|
+
// This reproduces the #250 hang: READ_INDEX already equals WRITE_INDEX (the
|
|
57
|
+
// worker caught up and is idle), but `expected` is a stale, lower snapshot.
|
|
58
|
+
// With equality-only comparison, wait() arms on a value that never changes
|
|
59
|
+
// again and waits forever. It must instead resolve as soon as the value has
|
|
60
|
+
// reached/passed the target.
|
|
61
|
+
const state = new Int32Array(new SharedArrayBuffer(4))
|
|
62
|
+
Atomics.store(state, 0, 100)
|
|
63
|
+
|
|
64
|
+
const result = await new Promise((resolve, reject) => {
|
|
65
|
+
const guard = setTimeout(() => {
|
|
66
|
+
reject(new Error('wait did not complete'))
|
|
67
|
+
}, 500)
|
|
68
|
+
|
|
69
|
+
wait(state, 0, 1, Infinity, (err, res) => {
|
|
70
|
+
clearTimeout(guard)
|
|
71
|
+
|
|
72
|
+
if (err) {
|
|
73
|
+
reject(err)
|
|
74
|
+
return
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
resolve(res)
|
|
78
|
+
})
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
assert.strictEqual(result, 'ok')
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
test('wait returns not-equal when the value cycles back before notification', async function () {
|
|
85
|
+
const result = await waitForResult((state) => {
|
|
86
|
+
Atomics.store(state, 0, 2)
|
|
87
|
+
Atomics.store(state, 0, 0)
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
assert.strictEqual(result, 'not-equal')
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
test('wait returns not-equal for an error sentinel', async function () {
|
|
94
|
+
const result = await waitForResult((state) => {
|
|
95
|
+
Atomics.store(state, 0, -2)
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
assert.strictEqual(result, 'not-equal')
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
test('wait detects a value change after the fallback timeout', async function () {
|
|
102
|
+
const result = await waitForResult((state) => {
|
|
103
|
+
Atomics.store(state, 0, 2)
|
|
104
|
+
}, { notify: false, timeout: 10 })
|
|
105
|
+
|
|
106
|
+
// The value moved to 2, which >= the expected 1, so the condition is met.
|
|
107
|
+
assert.strictEqual(result, 'ok')
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
test('wait returns timed-out when the value does not change', async function () {
|
|
111
|
+
const result = await waitForResult(() => {}, { notify: false, timeout: 10 })
|
|
112
|
+
|
|
113
|
+
assert.strictEqual(result, 'timed-out')
|
|
114
|
+
})
|
|
115
|
+
|
|
116
|
+
test('wait handles a synchronous not-equal result', async function () {
|
|
117
|
+
const originalWaitAsync = Atomics.waitAsync
|
|
118
|
+
Atomics.waitAsync = function (state, index, expected, timeout) {
|
|
119
|
+
Atomics.store(state, index, 2)
|
|
120
|
+
return originalWaitAsync(state, index, expected, timeout)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
let result
|
|
124
|
+
try {
|
|
125
|
+
result = await waitForResult(() => {}, { notify: false })
|
|
126
|
+
} finally {
|
|
127
|
+
Atomics.waitAsync = originalWaitAsync
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
assert.strictEqual(result, 'not-equal')
|
|
131
|
+
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/cli",
|
|
3
|
-
"version": "7.13.
|
|
3
|
+
"version": "7.13.13",
|
|
4
4
|
"repository": "https://github.com/zuplo/zuplo",
|
|
5
5
|
"author": "Zuplo, Inc.",
|
|
6
6
|
"type": "module",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"@opentelemetry/api": "1.9.0",
|
|
32
32
|
"@opentelemetry/api-logs": "0.220.0",
|
|
33
33
|
"@swc/core": "1.10.18",
|
|
34
|
-
"@zuplo/core": "7.13.
|
|
34
|
+
"@zuplo/core": "7.13.13",
|
|
35
35
|
"@zuplo/editor": "1.0.39603386871",
|
|
36
|
-
"@zuplo/openapi-tools": "7.13.
|
|
37
|
-
"@zuplo/runtime": "7.13.
|
|
36
|
+
"@zuplo/openapi-tools": "7.13.13",
|
|
37
|
+
"@zuplo/runtime": "7.13.13",
|
|
38
38
|
"chalk": "5.4.1",
|
|
39
39
|
"chokidar": "3.5.3",
|
|
40
40
|
"cookie": "1.0.2",
|
|
@@ -65,15 +65,15 @@
|
|
|
65
65
|
"workerd": "1.20261002.1",
|
|
66
66
|
"yargs": "17.7.2",
|
|
67
67
|
"zod": "4.6.7",
|
|
68
|
-
"@zuplo/graphql": "7.13.
|
|
69
|
-
"@zuplo/otel": "7.13.
|
|
68
|
+
"@zuplo/graphql": "7.13.13",
|
|
69
|
+
"@zuplo/otel": "7.13.13"
|
|
70
70
|
},
|
|
71
71
|
"optionalDependencies": {
|
|
72
|
-
"@zuplo/lint-darwin-arm64": "7.13.
|
|
73
|
-
"@zuplo/lint-darwin-x64": "7.13.
|
|
74
|
-
"@zuplo/lint-linux-x64": "7.13.
|
|
75
|
-
"@zuplo/lint-linux-arm64": "7.13.
|
|
76
|
-
"@zuplo/lint-win32-x64": "7.13.
|
|
72
|
+
"@zuplo/lint-darwin-arm64": "7.13.13",
|
|
73
|
+
"@zuplo/lint-darwin-x64": "7.13.13",
|
|
74
|
+
"@zuplo/lint-linux-x64": "7.13.13",
|
|
75
|
+
"@zuplo/lint-linux-arm64": "7.13.13",
|
|
76
|
+
"@zuplo/lint-win32-x64": "7.13.13"
|
|
77
77
|
},
|
|
78
78
|
"bundleDependencies": [
|
|
79
79
|
"@inquirer/prompts",
|