@zuplo/cli 7.13.10 → 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.
Files changed (64) hide show
  1. package/node_modules/@posthog/core/dist/cookie.d.ts +4 -0
  2. package/node_modules/@posthog/core/dist/cookie.d.ts.map +1 -1
  3. package/node_modules/@posthog/core/dist/cookie.js +8 -2
  4. package/node_modules/@posthog/core/dist/cookie.mjs +8 -2
  5. package/node_modules/@posthog/core/dist/utils/bot-detection.d.ts.map +1 -1
  6. package/node_modules/@posthog/core/dist/utils/bot-detection.js +1 -0
  7. package/node_modules/@posthog/core/dist/utils/bot-detection.mjs +1 -0
  8. package/node_modules/@posthog/core/package.json +2 -2
  9. package/node_modules/@posthog/core/src/cookie.ts +13 -2
  10. package/node_modules/@posthog/core/src/utils/bot-detection.spec.ts +7 -0
  11. package/node_modules/@posthog/core/src/utils/bot-detection.ts +1 -0
  12. package/node_modules/@zuplo/core/customer.cli.minified.js +332 -332
  13. package/node_modules/@zuplo/core/index.minified.js +320 -320
  14. package/node_modules/@zuplo/core/package.json +1 -1
  15. package/node_modules/@zuplo/graphql/package.json +1 -1
  16. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  17. package/node_modules/@zuplo/otel/package.json +1 -1
  18. package/node_modules/@zuplo/runtime/out/esm/{chunk-SXGSDVGB.js → chunk-3DWWKPBI.js} +85 -85
  19. package/node_modules/@zuplo/runtime/out/esm/chunk-3DWWKPBI.js.map +1 -0
  20. package/node_modules/@zuplo/runtime/out/esm/{chunk-PXS4NOKU.js → chunk-KA4STQE7.js} +17 -17
  21. package/node_modules/@zuplo/runtime/out/esm/chunk-KA4STQE7.js.map +1 -0
  22. package/node_modules/@zuplo/runtime/out/esm/chunk-VP5Q3DEN.js +26 -0
  23. package/node_modules/@zuplo/runtime/out/esm/chunk-VP5Q3DEN.js.map +1 -0
  24. package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
  25. package/node_modules/@zuplo/runtime/out/esm/internal/index.js +1 -1
  26. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
  27. package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
  28. package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js +1 -1
  29. package/node_modules/@zuplo/runtime/out/types/index.d.ts +60 -0
  30. package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +119 -0
  31. package/node_modules/@zuplo/runtime/package.json +1 -1
  32. package/node_modules/express-rate-limit/dist/index.cjs +1 -1
  33. package/node_modules/express-rate-limit/dist/index.mjs +1 -1
  34. package/node_modules/express-rate-limit/package.json +1 -1
  35. package/node_modules/ip-address/README.md +39 -39
  36. package/node_modules/ip-address/dist/ipv6.js +1 -1
  37. package/node_modules/ip-address/dist/ipv6.js.map +1 -1
  38. package/node_modules/ip-address/package.json +1 -1
  39. package/node_modules/thread-stream/.github/workflows/ci.yml +1 -1
  40. package/node_modules/thread-stream/SECURITY.md +77 -0
  41. package/node_modules/thread-stream/index.d.ts +2 -1
  42. package/node_modules/thread-stream/index.js +65 -7
  43. package/node_modules/thread-stream/lib/wait.js +23 -5
  44. package/node_modules/thread-stream/package.json +10 -5
  45. package/node_modules/thread-stream/test/create-and-exit.js +1 -1
  46. package/node_modules/thread-stream/test/end.test.js +35 -0
  47. package/node_modules/thread-stream/test/error-flush.test.js +96 -0
  48. package/node_modules/thread-stream/test/error-immediate.js +17 -0
  49. package/node_modules/thread-stream/test/flush-ref-keeps-alive.js +23 -0
  50. package/node_modules/thread-stream/test/flush-unref-exit.js +23 -0
  51. package/node_modules/thread-stream/test/ready-race-worker.js +22 -0
  52. package/node_modules/thread-stream/test/ready.test.js +46 -0
  53. package/node_modules/thread-stream/test/thread-management.test.js +68 -0
  54. package/node_modules/thread-stream/test/to-file-sync.js +23 -0
  55. package/node_modules/thread-stream/test/types/index.test-d.ts +26 -0
  56. package/node_modules/thread-stream/test/wait.test.js +131 -0
  57. package/package.json +11 -11
  58. package/node_modules/@zuplo/runtime/out/esm/chunk-PXS4NOKU.js.map +0 -1
  59. package/node_modules/@zuplo/runtime/out/esm/chunk-SXGSDVGB.js.map +0 -1
  60. package/node_modules/@zuplo/runtime/out/esm/chunk-ZCJ5QBVD.js +0 -26
  61. package/node_modules/@zuplo/runtime/out/esm/chunk-ZCJ5QBVD.js.map +0 -1
  62. package/node_modules/thread-stream/.claude/settings.local.json +0 -15
  63. /package/node_modules/@zuplo/runtime/out/esm/{chunk-SXGSDVGB.js.LEGAL.txt → chunk-3DWWKPBI.js.LEGAL.txt} +0 -0
  64. /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.10",
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.10",
34
+ "@zuplo/core": "7.13.13",
35
35
  "@zuplo/editor": "1.0.39603386871",
36
- "@zuplo/openapi-tools": "7.13.10",
37
- "@zuplo/runtime": "7.13.10",
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.10",
69
- "@zuplo/otel": "7.13.10"
68
+ "@zuplo/graphql": "7.13.13",
69
+ "@zuplo/otel": "7.13.13"
70
70
  },
71
71
  "optionalDependencies": {
72
- "@zuplo/lint-darwin-arm64": "7.13.10",
73
- "@zuplo/lint-darwin-x64": "7.13.10",
74
- "@zuplo/lint-linux-x64": "7.13.10",
75
- "@zuplo/lint-linux-arm64": "7.13.10",
76
- "@zuplo/lint-win32-x64": "7.13.10"
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",