@zuplo/cli 7.15.13 → 7.15.16
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/@posthog/core/dist/featureFlagUtils.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/featureFlagUtils.js +10 -3
- package/node_modules/@posthog/core/dist/featureFlagUtils.mjs +10 -3
- package/node_modules/@posthog/core/dist/posthog-core.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/posthog-core.js +7 -4
- package/node_modules/@posthog/core/dist/posthog-core.mjs +7 -4
- package/node_modules/@posthog/core/dist/types.d.ts +2 -0
- package/node_modules/@posthog/core/dist/types.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/types.js +1 -0
- package/node_modules/@posthog/core/dist/types.mjs +1 -0
- package/node_modules/@posthog/core/package.json +2 -2
- package/node_modules/@posthog/core/src/featureFlagUtils.ts +17 -12
- package/node_modules/@posthog/core/src/posthog-core.ts +19 -4
- package/node_modules/@posthog/core/src/types.ts +2 -0
- package/node_modules/@zuplo/core/customer.cli.minified.js +305 -305
- package/node_modules/@zuplo/core/index.minified.js +312 -312
- 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-AJ3MMWJS.js → chunk-5XXEIH5B.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/{chunk-T2WKOG7J.js → chunk-APWLPHXH.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/chunk-HMKEMARF.js +276 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-HMKEMARF.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-I65Y62VQ.js +24 -0
- package/node_modules/@zuplo/runtime/out/esm/{chunk-G42UYZ6V.js.map → chunk-I65Y62VQ.js.map} +1 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-KZBZ5KM5.js +188 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-KZBZ5KM5.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/{chunk-TOJD4RET.js → chunk-MWNVPFFM.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/esm/internal/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp/messages/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +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 +32 -0
- package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +220 -0
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/node_modules/hono/dist/adapter/bun/websocket.js +19 -4
- package/node_modules/hono/dist/adapter/lambda-edge/handler.js +4 -0
- package/node_modules/hono/dist/cjs/adapter/bun/websocket.js +19 -4
- package/node_modules/hono/dist/cjs/adapter/lambda-edge/handler.js +4 -0
- package/node_modules/hono/dist/cjs/helper/accepts/accepts.js +5 -0
- package/node_modules/hono/dist/cjs/helper/proxy/index.js +2 -0
- package/node_modules/hono/dist/cjs/jsx/dom/components.js +1 -1
- package/node_modules/hono/dist/cjs/jsx/dom/hooks/index.js +5 -2
- package/node_modules/hono/dist/cjs/jsx/dom/intrinsic-element/components.js +8 -5
- package/node_modules/hono/dist/cjs/jsx/dom/render.js +9 -3
- package/node_modules/hono/dist/cjs/middleware/basic-auth/index.js +1 -0
- package/node_modules/hono/dist/cjs/middleware/combine/index.js +4 -0
- package/node_modules/hono/dist/cjs/middleware/language/language.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/method-override/index.js +35 -12
- package/node_modules/hono/dist/cjs/middleware/request-id/request-id.js +3 -3
- package/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +6 -3
- package/node_modules/hono/dist/cjs/utils/body.js +1 -0
- package/node_modules/hono/dist/cjs/utils/html.js +5 -0
- package/node_modules/hono/dist/cjs/utils/jwt/jwt.js +7 -5
- package/node_modules/hono/dist/helper/accepts/accepts.js +5 -0
- package/node_modules/hono/dist/helper/proxy/index.js +2 -0
- package/node_modules/hono/dist/jsx/dom/components.js +2 -2
- package/node_modules/hono/dist/jsx/dom/hooks/index.js +5 -2
- package/node_modules/hono/dist/jsx/dom/intrinsic-element/components.js +8 -5
- package/node_modules/hono/dist/jsx/dom/render.js +9 -3
- package/node_modules/hono/dist/middleware/basic-auth/index.js +1 -0
- package/node_modules/hono/dist/middleware/combine/index.js +4 -0
- package/node_modules/hono/dist/middleware/language/language.js +1 -1
- package/node_modules/hono/dist/middleware/method-override/index.js +35 -12
- package/node_modules/hono/dist/middleware/request-id/request-id.js +3 -3
- package/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +6 -3
- package/node_modules/hono/dist/types/helper/accepts/accepts.d.ts +5 -0
- package/node_modules/hono/dist/types/jsx/base.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/basic-auth/index.d.ts +1 -0
- package/node_modules/hono/dist/types/middleware/request-id/request-id.d.ts +3 -3
- package/node_modules/hono/dist/types/middleware/secure-headers/secure-headers.d.ts +2 -0
- package/node_modules/hono/dist/types/utils/jwt/jwt.d.ts +4 -2
- package/node_modules/hono/dist/types/utils/types.d.ts +12 -2
- package/node_modules/hono/dist/utils/body.js +1 -0
- package/node_modules/hono/dist/utils/html.js +5 -0
- package/node_modules/hono/dist/utils/jwt/jwt.js +7 -5
- package/node_modules/hono/package.json +1 -1
- package/node_modules/strip-json-comments/index.d.ts +3 -1
- package/node_modules/strip-json-comments/index.js +9 -22
- package/node_modules/strip-json-comments/package.json +23 -19
- package/package.json +11 -11
- package/node_modules/@zuplo/runtime/out/esm/chunk-24DRL32G.js +0 -431
- package/node_modules/@zuplo/runtime/out/esm/chunk-24DRL32G.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-BH4DKEES.js +0 -13
- package/node_modules/@zuplo/runtime/out/esm/chunk-BH4DKEES.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-G42UYZ6V.js +0 -24
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-AJ3MMWJS.js.map → chunk-5XXEIH5B.js.map} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-T2WKOG7J.js.map → chunk-APWLPHXH.js.map} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-24DRL32G.js.LEGAL.txt → chunk-HMKEMARF.js.LEGAL.txt} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-G42UYZ6V.js.LEGAL.txt → chunk-I65Y62VQ.js.LEGAL.txt} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-TOJD4RET.js.map → chunk-MWNVPFFM.js.map} +0 -0
|
@@ -12,10 +12,12 @@ import { signing, verifying } from "./jws.js";
|
|
|
12
12
|
const encodeJwtPart = (part) => encodeBase64Url(utf8Encoder.encode(JSON.stringify(part)).buffer).replace(/=/g, "");
|
|
13
13
|
const encodeSignaturePart = (buf) => encodeBase64Url(buf).replace(/=/g, "");
|
|
14
14
|
const decodeJwtPart = (part) => JSON.parse(utf8Decoder.decode(decodeBase64Url(part)));
|
|
15
|
-
|
|
15
|
+
const normalizeTyp = (typ) => typ.toLowerCase().replace(/^application\//, "");
|
|
16
|
+
const isTyp = (value, expected) => typeof value === "string" && [expected].flat().some((typ) => normalizeTyp(typ) === normalizeTyp(value));
|
|
17
|
+
function isTokenHeader(obj, typ) {
|
|
16
18
|
if (typeof obj === "object" && obj !== null) {
|
|
17
19
|
const objWithAlg = obj;
|
|
18
|
-
return "alg" in objWithAlg && Object.values(AlgorithmTypes).includes(objWithAlg.alg) && (!("typ" in objWithAlg) || objWithAlg.typ
|
|
20
|
+
return "alg" in objWithAlg && Object.values(AlgorithmTypes).includes(objWithAlg.alg) && (typ === void 0 ? !("typ" in objWithAlg) || isTyp(objWithAlg.typ, "JWT") : isTyp(objWithAlg.typ, typ)) && !("crit" in objWithAlg);
|
|
19
21
|
}
|
|
20
22
|
return false;
|
|
21
23
|
}
|
|
@@ -39,12 +41,12 @@ const sign = async (payload, privateKey, alg = "HS256") => {
|
|
|
39
41
|
};
|
|
40
42
|
const verify = async (token, publicKey, algOrOptions) => {
|
|
41
43
|
if (!algOrOptions) throw new JwtAlgorithmRequired();
|
|
42
|
-
const { alg, iss, nbf = true, exp = true, iat = true, aud } = typeof algOrOptions === "string" ? { alg: algOrOptions } : algOrOptions;
|
|
44
|
+
const { alg, iss, nbf = true, exp = true, iat = true, aud, typ } = typeof algOrOptions === "string" ? { alg: algOrOptions } : algOrOptions;
|
|
43
45
|
if (!alg) throw new JwtAlgorithmRequired();
|
|
44
46
|
const tokenParts = token.split(".");
|
|
45
47
|
if (tokenParts.length !== 3) throw new JwtTokenInvalid(token);
|
|
46
48
|
const { header, payload } = decode(token);
|
|
47
|
-
if (!isTokenHeader(header)) throw new JwtHeaderInvalid(header);
|
|
49
|
+
if (!isTokenHeader(header, typ)) throw new JwtHeaderInvalid(header);
|
|
48
50
|
if (header.alg !== alg) throw new JwtAlgorithmMismatch(alg, header.alg);
|
|
49
51
|
const now = Math.floor(Date.now() / 1e3);
|
|
50
52
|
if (nbf && payload.nbf !== void 0) {
|
|
@@ -84,7 +86,7 @@ const symmetricAlgorithms = [
|
|
|
84
86
|
const verifyWithJwks = async (token, options, init) => {
|
|
85
87
|
const verifyOpts = options.verification || {};
|
|
86
88
|
const header = decodeHeader(token);
|
|
87
|
-
if (!isTokenHeader(header)) throw new JwtHeaderInvalid(header);
|
|
89
|
+
if (!isTokenHeader(header, verifyOpts.typ)) throw new JwtHeaderInvalid(header);
|
|
88
90
|
if (!header.kid) throw new JwtHeaderRequiresKid(header);
|
|
89
91
|
if (symmetricAlgorithms.includes(header.alg)) throw new JwtSymmetricAlgorithmNotAllowed(header.alg);
|
|
90
92
|
if (!options.allowedAlgorithms.includes(header.alg)) throw new JwtAlgorithmNotAllowed(header.alg, options.allowedAlgorithms);
|
|
@@ -37,5 +37,7 @@ JSON.parse(stripJsonComments(json));
|
|
|
37
37
|
*/
|
|
38
38
|
export default function stripJsonComments(
|
|
39
39
|
jsonString: string,
|
|
40
|
-
options?: Options
|
|
40
|
+
options?: Options,
|
|
41
41
|
): string;
|
|
42
|
+
|
|
43
|
+
export {}; // eslint-disable-line unicorn/require-module-specifiers -- It stops the implicit export of the declarations without `export`.
|
|
@@ -4,7 +4,9 @@ const multiComment = Symbol('multiComment');
|
|
|
4
4
|
const stripWithoutWhitespace = () => '';
|
|
5
5
|
|
|
6
6
|
// Replace all characters except ASCII spaces, tabs and line endings with regular spaces to ensure valid JSON output.
|
|
7
|
-
|
|
7
|
+
// The `v` flag would make the pattern match code points, so the two halves of a surrogate pair would be blanked as one character and the output would be shorter than the input, breaking the offsets the whole package exists to preserve.
|
|
8
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
9
|
+
const stripWithWhitespace = (string, start, end) => string.slice(start, end).replaceAll(/[^\t\n\r ]/g, ' ');
|
|
8
10
|
|
|
9
11
|
const isEscaped = (jsonString, quotePosition) => {
|
|
10
12
|
let index = quotePosition - 1;
|
|
@@ -48,38 +50,23 @@ export default function stripJsonComments(jsonString, {whitespace = true, traili
|
|
|
48
50
|
continue;
|
|
49
51
|
}
|
|
50
52
|
|
|
51
|
-
if (!isInsideComment && currentCharacter
|
|
52
|
-
// Enter
|
|
53
|
+
if (!isInsideComment && currentCharacter === '/' && (nextCharacter === '/' || nextCharacter === '*')) {
|
|
54
|
+
// Enter a comment, stepping over the character that completes its opening marker
|
|
53
55
|
buffer += jsonString.slice(offset, index);
|
|
54
56
|
offset = index;
|
|
55
|
-
isInsideComment = singleComment;
|
|
57
|
+
isInsideComment = nextCharacter === '/' ? singleComment : multiComment;
|
|
56
58
|
index++;
|
|
57
|
-
} else if (isInsideComment === singleComment && currentCharacter
|
|
58
|
-
// Exit single-line comment
|
|
59
|
-
index++;
|
|
60
|
-
isInsideComment = false;
|
|
61
|
-
buffer += strip(jsonString, offset, index);
|
|
62
|
-
offset = index;
|
|
63
|
-
continue;
|
|
64
|
-
} else if (isInsideComment === singleComment && currentCharacter === '\n') {
|
|
65
|
-
// Exit single-line comment via \n
|
|
59
|
+
} else if (isInsideComment === singleComment && (currentCharacter === '\n' || currentCharacter === '\r')) {
|
|
60
|
+
// Exit single-line comment at LF, CRLF, or CR, leaving the line ending itself intact.
|
|
66
61
|
isInsideComment = false;
|
|
67
62
|
buffer += strip(jsonString, offset, index);
|
|
68
63
|
offset = index;
|
|
69
|
-
} else if (
|
|
70
|
-
// Enter multiline comment
|
|
71
|
-
buffer += jsonString.slice(offset, index);
|
|
72
|
-
offset = index;
|
|
73
|
-
isInsideComment = multiComment;
|
|
74
|
-
index++;
|
|
75
|
-
continue;
|
|
76
|
-
} else if (isInsideComment === multiComment && currentCharacter + nextCharacter === '*/') {
|
|
64
|
+
} else if (isInsideComment === multiComment && currentCharacter === '*' && nextCharacter === '/') {
|
|
77
65
|
// Exit multiline comment
|
|
78
66
|
index++;
|
|
79
67
|
isInsideComment = false;
|
|
80
68
|
buffer += strip(jsonString, offset, index + 1);
|
|
81
69
|
offset = index + 1;
|
|
82
|
-
continue;
|
|
83
70
|
} else if (trailingCommas && !isInsideComment) {
|
|
84
71
|
if (commaIndex !== -1) {
|
|
85
72
|
if (currentCharacter === '}' || currentCharacter === ']') {
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "strip-json-comments",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "Strip comments from JSON. Lets you use comments in your JSON files!",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "sindresorhus/strip-json-comments",
|
|
7
7
|
"funding": "https://github.com/sponsors/sindresorhus",
|
|
8
|
-
"author":
|
|
9
|
-
"name": "Sindre Sorhus",
|
|
10
|
-
"email": "sindresorhus@gmail.com",
|
|
11
|
-
"url": "https://sindresorhus.com"
|
|
12
|
-
},
|
|
8
|
+
"author": "Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)",
|
|
13
9
|
"type": "module",
|
|
14
|
-
"exports":
|
|
15
|
-
|
|
10
|
+
"exports": {
|
|
11
|
+
"types": "./index.d.ts",
|
|
12
|
+
"default": "./index.js"
|
|
13
|
+
},
|
|
16
14
|
"sideEffects": false,
|
|
17
15
|
"engines": {
|
|
18
|
-
"node": ">=
|
|
16
|
+
"node": ">=22"
|
|
19
17
|
},
|
|
20
18
|
"scripts": {
|
|
21
|
-
"test": "xo &&
|
|
22
|
-
"bench": "
|
|
19
|
+
"test": "xo && node --test",
|
|
20
|
+
"bench": "node benchmark.js"
|
|
23
21
|
},
|
|
24
22
|
"files": [
|
|
25
23
|
"index.js",
|
|
@@ -43,14 +41,20 @@
|
|
|
43
41
|
"jsonc"
|
|
44
42
|
],
|
|
45
43
|
"devDependencies": {
|
|
46
|
-
"
|
|
47
|
-
"matcha": "^0.7.0",
|
|
48
|
-
"tsd": "^0.22.0",
|
|
49
|
-
"xo": "^0.54.2"
|
|
44
|
+
"xo": "^5.0.1"
|
|
50
45
|
},
|
|
51
|
-
"xo":
|
|
52
|
-
|
|
53
|
-
"
|
|
46
|
+
"xo": [
|
|
47
|
+
{
|
|
48
|
+
"ignores": [
|
|
49
|
+
"sample.json",
|
|
50
|
+
"sample-big.json"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"rules": {
|
|
55
|
+
"complexity": "off",
|
|
56
|
+
"node-test/no-conditional-assertion": "off"
|
|
57
|
+
}
|
|
54
58
|
}
|
|
55
|
-
|
|
59
|
+
]
|
|
56
60
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/cli",
|
|
3
|
-
"version": "7.15.
|
|
3
|
+
"version": "7.15.16",
|
|
4
4
|
"repository": "https://github.com/zuplo/zuplo",
|
|
5
5
|
"author": "Zuplo, Inc.",
|
|
6
6
|
"type": "module",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"@opentelemetry/api": "1.9.0",
|
|
33
33
|
"@opentelemetry/api-logs": "0.220.0",
|
|
34
34
|
"@swc/core": "1.10.18",
|
|
35
|
-
"@zuplo/core": "7.15.
|
|
35
|
+
"@zuplo/core": "7.15.16",
|
|
36
36
|
"@zuplo/editor": "1.0.39603386871",
|
|
37
|
-
"@zuplo/openapi-tools": "7.15.
|
|
38
|
-
"@zuplo/runtime": "7.15.
|
|
37
|
+
"@zuplo/openapi-tools": "7.15.16",
|
|
38
|
+
"@zuplo/runtime": "7.15.16",
|
|
39
39
|
"chalk": "5.4.1",
|
|
40
40
|
"chokidar": "3.5.3",
|
|
41
41
|
"cookie": "1.0.2",
|
|
@@ -66,15 +66,15 @@
|
|
|
66
66
|
"workerd": "1.20261002.1",
|
|
67
67
|
"yargs": "17.7.2",
|
|
68
68
|
"zod": "4.6.7",
|
|
69
|
-
"@zuplo/graphql": "7.15.
|
|
70
|
-
"@zuplo/otel": "7.15.
|
|
69
|
+
"@zuplo/graphql": "7.15.16",
|
|
70
|
+
"@zuplo/otel": "7.15.16"
|
|
71
71
|
},
|
|
72
72
|
"optionalDependencies": {
|
|
73
|
-
"@zuplo/lint-darwin-arm64": "7.15.
|
|
74
|
-
"@zuplo/lint-darwin-x64": "7.15.
|
|
75
|
-
"@zuplo/lint-linux-x64": "7.15.
|
|
76
|
-
"@zuplo/lint-linux-arm64": "7.15.
|
|
77
|
-
"@zuplo/lint-win32-x64": "7.15.
|
|
73
|
+
"@zuplo/lint-darwin-arm64": "7.15.16",
|
|
74
|
+
"@zuplo/lint-darwin-x64": "7.15.16",
|
|
75
|
+
"@zuplo/lint-linux-x64": "7.15.16",
|
|
76
|
+
"@zuplo/lint-linux-arm64": "7.15.16",
|
|
77
|
+
"@zuplo/lint-win32-x64": "7.15.16"
|
|
78
78
|
},
|
|
79
79
|
"bundleDependencies": [
|
|
80
80
|
"@inquirer/prompts",
|