@zuplo/cli 6.70.66 → 6.70.68
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/@fastify/reply-from/node_modules/undici/lib/global.js +1 -1
- package/node_modules/@fastify/reply-from/node_modules/undici/package.json +1 -1
- 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-C2TBCXWG.js → chunk-34MOY5RI.js} +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-C2TBCXWG.js.map → chunk-34MOY5RI.js.map} +1 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-IXLWCUYQ.js +356 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-IXLWCUYQ.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +9 -9
- 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/package.json +1 -1
- package/node_modules/graphql/package.json +1 -1
- package/node_modules/graphql/type/definition.d.ts +20 -20
- package/node_modules/graphql/type/definition.js +6 -6
- package/node_modules/graphql/type/definition.mjs +6 -6
- package/node_modules/graphql/type/directives.d.ts +2 -2
- package/node_modules/graphql/type/directives.js +1 -1
- package/node_modules/graphql/type/directives.mjs +1 -1
- package/node_modules/graphql/type/schema.d.ts +2 -2
- package/node_modules/graphql/type/schema.js +1 -1
- package/node_modules/graphql/type/schema.mjs +1 -1
- package/node_modules/graphql/version.js +2 -2
- package/node_modules/graphql/version.mjs +2 -2
- package/node_modules/hono/dist/adapter/aws-lambda/handler.js +5 -3
- package/node_modules/hono/dist/adapter/lambda-edge/handler.js +8 -2
- package/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +5 -3
- package/node_modules/hono/dist/cjs/adapter/lambda-edge/handler.js +8 -2
- package/node_modules/hono/dist/cjs/middleware/bearer-auth/index.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/cors/index.js +2 -5
- package/node_modules/hono/dist/cjs/middleware/language/language.js +10 -32
- package/node_modules/hono/dist/cjs/middleware/serve-static/index.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/timing/timing.js +3 -1
- package/node_modules/hono/dist/cjs/utils/ipaddr.js +6 -1
- package/node_modules/hono/dist/middleware/bearer-auth/index.js +1 -1
- package/node_modules/hono/dist/middleware/cors/index.js +2 -5
- package/node_modules/hono/dist/middleware/language/language.js +10 -32
- package/node_modules/hono/dist/middleware/serve-static/index.js +1 -1
- package/node_modules/hono/dist/middleware/timing/timing.js +3 -1
- package/node_modules/hono/dist/tsconfig.build.tsbuildinfo +1 -1
- package/node_modules/hono/dist/types/adapter/aws-lambda/handler.d.ts +1 -1
- package/node_modules/hono/dist/utils/ipaddr.js +6 -1
- package/node_modules/hono/package.json +18 -10
- package/node_modules/side-channel/CHANGELOG.md +10 -0
- package/node_modules/side-channel/README.md +1 -1
- package/node_modules/side-channel/index.js +5 -2
- package/node_modules/side-channel/package.json +10 -10
- package/node_modules/side-channel/test/index.js +16 -0
- package/package.json +6 -6
- package/node_modules/@zuplo/runtime/out/esm/chunk-WDGKR433.js +0 -370
- package/node_modules/@zuplo/runtime/out/esm/chunk-WDGKR433.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-WDGKR433.js.LEGAL.txt → chunk-IXLWCUYQ.js.LEGAL.txt} +0 -0
|
@@ -45,7 +45,7 @@ const serveStatic = (options) => {
|
|
|
45
45
|
} else {
|
|
46
46
|
try {
|
|
47
47
|
filename = (0, import_url.tryDecodeURI)(c.req.path);
|
|
48
|
-
if (/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}
|
|
48
|
+
if (/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}|\\/.test(filename)) {
|
|
49
49
|
throw new Error();
|
|
50
50
|
}
|
|
51
51
|
} catch {
|
|
@@ -56,7 +56,9 @@ const timing = (config) => {
|
|
|
56
56
|
endTime(c, "total");
|
|
57
57
|
}
|
|
58
58
|
if (options.autoEnd) {
|
|
59
|
-
timers.forEach((_, key) =>
|
|
59
|
+
timers.forEach((_, key) => {
|
|
60
|
+
endTime(c, key);
|
|
61
|
+
});
|
|
60
62
|
}
|
|
61
63
|
const enabled = typeof options.enabled === "function" ? options.enabled(c) : options.enabled;
|
|
62
64
|
if (enabled) {
|
|
@@ -43,7 +43,9 @@ const expandIPv6 = (ipV6) => {
|
|
|
43
43
|
if (node !== "") {
|
|
44
44
|
sections[i] = node.padStart(4, "0");
|
|
45
45
|
} else {
|
|
46
|
-
sections[i + 1] === ""
|
|
46
|
+
while (sections[i + 1] === "") {
|
|
47
|
+
sections.splice(i + 1, 1);
|
|
48
|
+
}
|
|
47
49
|
sections[i] = new Array(8 - sections.length + 1).fill("0000").join(":");
|
|
48
50
|
}
|
|
49
51
|
}
|
|
@@ -263,6 +265,9 @@ const convertIPv4BinaryToString = (ipV4) => {
|
|
|
263
265
|
const isIPv4MappedIPv6 = (ipv6binary) => ipv6binary >> 32n === 0xffffn;
|
|
264
266
|
const convertIPv4MappedIPv6ToIPv4 = (ipv6binary) => ipv6binary & 0xffffffffn;
|
|
265
267
|
const convertIPv6BinaryToString = (ipV6) => {
|
|
268
|
+
if (ipV6 === 0n) {
|
|
269
|
+
return "::";
|
|
270
|
+
}
|
|
266
271
|
if (isIPv4MappedIPv6(ipV6)) {
|
|
267
272
|
return `::ffff:${convertIPv4BinaryToString(convertIPv4MappedIPv6ToIPv4(ipV6))}`;
|
|
268
273
|
}
|
|
@@ -6,7 +6,7 @@ var PREFIX = "Bearer";
|
|
|
6
6
|
var HEADER = "Authorization";
|
|
7
7
|
var bearerAuth = (options) => {
|
|
8
8
|
if (!("token" in options || "verifyToken" in options)) {
|
|
9
|
-
throw new Error('bearer auth middleware requires options for "token"');
|
|
9
|
+
throw new Error('bearer auth middleware requires options for "token" or "verifyToken"');
|
|
10
10
|
}
|
|
11
11
|
if (!options.realm) {
|
|
12
12
|
options.realm = "";
|
|
@@ -10,9 +10,6 @@ var cors = (options) => {
|
|
|
10
10
|
const findAllowOrigin = ((optsOrigin) => {
|
|
11
11
|
if (typeof optsOrigin === "string") {
|
|
12
12
|
if (optsOrigin === "*") {
|
|
13
|
-
if (opts.credentials) {
|
|
14
|
-
return (origin) => origin || null;
|
|
15
|
-
}
|
|
16
13
|
return () => optsOrigin;
|
|
17
14
|
} else {
|
|
18
15
|
return (origin) => optsOrigin === origin ? origin : null;
|
|
@@ -47,7 +44,7 @@ var cors = (options) => {
|
|
|
47
44
|
set("Access-Control-Expose-Headers", opts.exposeHeaders.join(","));
|
|
48
45
|
}
|
|
49
46
|
if (c.req.method === "OPTIONS") {
|
|
50
|
-
if (opts.origin !== "*"
|
|
47
|
+
if (opts.origin !== "*") {
|
|
51
48
|
set("Vary", "Origin");
|
|
52
49
|
}
|
|
53
50
|
if (opts.maxAge != null) {
|
|
@@ -77,7 +74,7 @@ var cors = (options) => {
|
|
|
77
74
|
});
|
|
78
75
|
}
|
|
79
76
|
await next();
|
|
80
|
-
if (opts.origin !== "*"
|
|
77
|
+
if (opts.origin !== "*") {
|
|
81
78
|
c.header("Vary", "Origin", { append: true });
|
|
82
79
|
}
|
|
83
80
|
};
|
|
@@ -53,20 +53,12 @@ var normalizeLanguage = (lang, options) => {
|
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
var detectFromQuery = (c, options) => {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return normalizeLanguage(query, options);
|
|
59
|
-
} catch {
|
|
60
|
-
return void 0;
|
|
61
|
-
}
|
|
56
|
+
const query = c.req.query(options.lookupQueryString);
|
|
57
|
+
return normalizeLanguage(query, options);
|
|
62
58
|
};
|
|
63
59
|
var detectFromCookie = (c, options) => {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return normalizeLanguage(cookie, options);
|
|
67
|
-
} catch {
|
|
68
|
-
return void 0;
|
|
69
|
-
}
|
|
60
|
+
const cookie = getCookie(c, options.lookupCookie);
|
|
61
|
+
return normalizeLanguage(cookie, options);
|
|
70
62
|
};
|
|
71
63
|
function detectFromHeader(c, options) {
|
|
72
64
|
try {
|
|
@@ -87,14 +79,10 @@ function detectFromHeader(c, options) {
|
|
|
87
79
|
}
|
|
88
80
|
}
|
|
89
81
|
function detectFromPath(c, options) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
return normalizeLanguage(langSegment, options);
|
|
95
|
-
} catch {
|
|
96
|
-
return void 0;
|
|
97
|
-
}
|
|
82
|
+
const url = new URL(c.req.url);
|
|
83
|
+
const pathSegments = url.pathname.split("/").filter(Boolean);
|
|
84
|
+
const langSegment = pathSegments[options.lookupFromPathIndex];
|
|
85
|
+
return normalizeLanguage(langSegment, options);
|
|
98
86
|
}
|
|
99
87
|
var detectors = {
|
|
100
88
|
querystring: detectFromQuery,
|
|
@@ -129,9 +117,6 @@ var detectLanguage = (c, options) => {
|
|
|
129
117
|
let detectedLang;
|
|
130
118
|
for (const detectorName of options.order) {
|
|
131
119
|
const detector = detectors[detectorName];
|
|
132
|
-
if (!detector) {
|
|
133
|
-
continue;
|
|
134
|
-
}
|
|
135
120
|
try {
|
|
136
121
|
detectedLang = detector(c, options);
|
|
137
122
|
if (detectedLang) {
|
|
@@ -164,15 +149,8 @@ var languageDetector = (userOptions) => {
|
|
|
164
149
|
};
|
|
165
150
|
validateOptions(options);
|
|
166
151
|
return async function languageDetector2(ctx, next) {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
ctx.set("language", lang);
|
|
170
|
-
} catch (error) {
|
|
171
|
-
if (options.debug) {
|
|
172
|
-
console.error("Language detection failed:", error);
|
|
173
|
-
}
|
|
174
|
-
ctx.set("language", options.fallbackLanguage);
|
|
175
|
-
}
|
|
152
|
+
const lang = detectLanguage(ctx, options);
|
|
153
|
+
ctx.set("language", lang);
|
|
176
154
|
await next();
|
|
177
155
|
};
|
|
178
156
|
};
|
|
@@ -24,7 +24,7 @@ var serveStatic = (options) => {
|
|
|
24
24
|
} else {
|
|
25
25
|
try {
|
|
26
26
|
filename = tryDecodeURI(c.req.path);
|
|
27
|
-
if (/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}
|
|
27
|
+
if (/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}|\\/.test(filename)) {
|
|
28
28
|
throw new Error();
|
|
29
29
|
}
|
|
30
30
|
} catch {
|
|
@@ -31,7 +31,9 @@ var timing = (config) => {
|
|
|
31
31
|
endTime(c, "total");
|
|
32
32
|
}
|
|
33
33
|
if (options.autoEnd) {
|
|
34
|
-
timers.forEach((_, key) =>
|
|
34
|
+
timers.forEach((_, key) => {
|
|
35
|
+
endTime(c, key);
|
|
36
|
+
});
|
|
35
37
|
}
|
|
36
38
|
const enabled = typeof options.enabled === "function" ? options.enabled(c) : options.enabled;
|
|
37
39
|
if (enabled) {
|