@zuplo/cli 7.14.5 → 7.14.8
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/@zuplo/core/customer.cli.minified.js +156 -156
- package/node_modules/@zuplo/core/index.minified.js +161 -161
- 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-2HVCLUM4.js +37 -0
- package/node_modules/@zuplo/runtime/out/esm/{chunk-UFTMOJ7K.js.map → chunk-2HVCLUM4.js.map} +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-C32OTSKW.js → chunk-6R2COTV6.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/chunk-DB6LKZ36.js +429 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-DB6LKZ36.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-PY52EHDX.js +26 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-PY52EHDX.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/{chunk-AENEWA54.js → chunk-SNTU476S.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/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 +12 -12
- 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 +135 -13
- package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +137 -15
- package/node_modules/@zuplo/runtime/out/types/mcp-gateway/index.d.ts +40 -0
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/node_modules/hono/dist/adapter/aws-lambda/handler.js +1 -1
- package/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +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/client/fetch-result-please.js +1 -1
- package/node_modules/hono/dist/cjs/helper/accepts/accepts.js +2 -1
- package/node_modules/hono/dist/cjs/helper/ssg/ssg.js +5 -3
- package/node_modules/hono/dist/cjs/jsx/base.js +49 -30
- package/node_modules/hono/dist/cjs/jsx/components.js +2 -2
- package/node_modules/hono/dist/cjs/jsx/constants.js +2 -0
- package/node_modules/hono/dist/cjs/jsx/jsx-runtime.js +13 -17
- package/node_modules/hono/dist/cjs/middleware/etag/index.js +3 -1
- package/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +1 -0
- package/node_modules/hono/dist/cjs/middleware/timing/timing.js +4 -3
- package/node_modules/hono/dist/cjs/utils/cookie.js +2 -2
- package/node_modules/hono/dist/cjs/utils/mime.js +1 -1
- package/node_modules/hono/dist/cjs/utils/url.js +1 -1
- package/node_modules/hono/dist/client/fetch-result-please.js +1 -1
- package/node_modules/hono/dist/helper/accepts/accepts.js +2 -1
- package/node_modules/hono/dist/helper/ssg/ssg.js +5 -3
- package/node_modules/hono/dist/jsx/base.js +49 -32
- package/node_modules/hono/dist/jsx/components.js +2 -2
- package/node_modules/hono/dist/jsx/constants.js +2 -1
- package/node_modules/hono/dist/jsx/jsx-runtime.js +15 -19
- package/node_modules/hono/dist/middleware/etag/index.js +3 -1
- package/node_modules/hono/dist/middleware/language/language.js +1 -1
- package/node_modules/hono/dist/middleware/pretty-json/index.js +1 -0
- package/node_modules/hono/dist/middleware/timing/timing.js +4 -3
- package/node_modules/hono/dist/types/helper/factory/index.d.ts +1 -1
- package/node_modules/hono/dist/types/helper/ssg/ssg.d.ts +6 -1
- package/node_modules/hono/dist/types/jsx/base.d.ts +4 -2
- package/node_modules/hono/dist/types/jsx/constants.d.ts +1 -0
- package/node_modules/hono/dist/types/jsx/jsx-runtime.d.ts +2 -1
- package/node_modules/hono/dist/types/utils/cookie.d.ts +1 -1
- package/node_modules/hono/dist/utils/cookie.js +2 -2
- package/node_modules/hono/dist/utils/mime.js +1 -1
- package/node_modules/hono/dist/utils/url.js +1 -1
- package/node_modules/hono/package.json +1 -1
- package/package.json +11 -11
- package/node_modules/@zuplo/runtime/out/esm/chunk-7RNZS3GX.js +0 -26
- package/node_modules/@zuplo/runtime/out/esm/chunk-7RNZS3GX.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-UFTMOJ7K.js +0 -37
- package/node_modules/@zuplo/runtime/out/esm/chunk-UGZSO3CK.js +0 -414
- package/node_modules/@zuplo/runtime/out/esm/chunk-UGZSO3CK.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-UFTMOJ7K.js.LEGAL.txt → chunk-2HVCLUM4.js.LEGAL.txt} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-C32OTSKW.js.map → chunk-6R2COTV6.js.map} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-UGZSO3CK.js.LEGAL.txt → chunk-DB6LKZ36.js.LEGAL.txt} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-AENEWA54.js.map → chunk-SNTU476S.js.map} +0 -0
|
@@ -12,7 +12,7 @@ export interface CreateHandlersInterface<E extends Env, P extends string> {
|
|
|
12
12
|
<I extends Input = {}, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, R extends HandlerResponse<any> = any, R2 extends HandlerResponse<any> = any, R3 extends HandlerResponse<any> = any, R4 extends HandlerResponse<any> = any, R5 extends HandlerResponse<any> = any, R6 extends HandlerResponse<any> = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>>(handler1: H<E2, P, I, R>, handler2: H<E3, P, I2, R2>, handler3: H<E4, P, I3, R3>, handler4: H<E5, P, I4, R4>, handler5: H<E6, P, I5, R5>, handler6: H<E7, P, I6, R6>): [H<E2, P, I, R>, H<E3, P, I2, R2>, H<E4, P, I3, R3>, H<E5, P, I4, R4>, H<E6, P, I5, R5>, H<E7, P, I6, R6>];
|
|
13
13
|
<I extends Input = {}, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, R extends HandlerResponse<any> = any, R2 extends HandlerResponse<any> = any, R3 extends HandlerResponse<any> = any, R4 extends HandlerResponse<any> = any, R5 extends HandlerResponse<any> = any, R6 extends HandlerResponse<any> = any, R7 extends HandlerResponse<any> = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>>(handler1: H<E2, P, I, R>, handler2: H<E3, P, I2, R2>, handler3: H<E4, P, I3, R3>, handler4: H<E5, P, I4, R4>, handler5: H<E6, P, I5, R5>, handler6: H<E7, P, I6, R6>, handler7: H<E8, P, I7, R7>): [H<E2, P, I, R>, H<E3, P, I2, R2>, H<E4, P, I3, R3>, H<E5, P, I4, R4>, H<E6, P, I5, R5>, H<E7, P, I6, R6>, H<E8, P, I7, R7>];
|
|
14
14
|
<I extends Input = {}, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, R extends HandlerResponse<any> = any, R2 extends HandlerResponse<any> = any, R3 extends HandlerResponse<any> = any, R4 extends HandlerResponse<any> = any, R5 extends HandlerResponse<any> = any, R6 extends HandlerResponse<any> = any, R7 extends HandlerResponse<any> = any, R8 extends HandlerResponse<any> = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>>(handler1: H<E2, P, I, R>, handler2: H<E3, P, I2, R2>, handler3: H<E4, P, I3, R3>, handler4: H<E5, P, I4, R4>, handler5: H<E6, P, I5, R5>, handler6: H<E7, P, I6, R6>, handler7: H<E8, P, I7, R7>, handler8: H<E9, P, I8, R8>): [H<E2, P, I, R>, H<E3, P, I2, R2>, H<E4, P, I3, R3>, H<E5, P, I4, R4>, H<E6, P, I5, R5>, H<E7, P, I6, R6>, H<E8, P, I7, R7>, H<E9, P, I8, R8>];
|
|
15
|
-
<I extends Input = {}, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, R extends HandlerResponse<any> = any, R2 extends HandlerResponse<any> = any, R3 extends HandlerResponse<any> = any, R4 extends HandlerResponse<any> = any, R5 extends HandlerResponse<any> = any, R6 extends HandlerResponse<any> = any, R7 extends HandlerResponse<any> = any, R8 extends HandlerResponse<any> = any, R9 extends HandlerResponse<any> = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>>(handler1: H<E2, P, I, R>, handler2: H<E3, P, I2, R2>, handler3: H<E4, P, I3, R3>, handler4: H<E5, P, I4, R4>, handler5: H<E6, P, I5, R5>, handler6: H<E7, P, I6, R6>, handler7: H<E8, P, I7, R7>, handler8: H<E9, P, I8, R8>, handler9: H<E10, P, I9, R9>): [H<E2, P, I, R>, H<E3, P, I2,
|
|
15
|
+
<I extends Input = {}, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, R extends HandlerResponse<any> = any, R2 extends HandlerResponse<any> = any, R3 extends HandlerResponse<any> = any, R4 extends HandlerResponse<any> = any, R5 extends HandlerResponse<any> = any, R6 extends HandlerResponse<any> = any, R7 extends HandlerResponse<any> = any, R8 extends HandlerResponse<any> = any, R9 extends HandlerResponse<any> = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>>(handler1: H<E2, P, I, R>, handler2: H<E3, P, I2, R2>, handler3: H<E4, P, I3, R3>, handler4: H<E5, P, I4, R4>, handler5: H<E6, P, I5, R5>, handler6: H<E7, P, I6, R6>, handler7: H<E8, P, I7, R7>, handler8: H<E9, P, I8, R8>, handler9: H<E10, P, I9, R9>): [H<E2, P, I, R>, H<E3, P, I2, R2>, H<E4, P, I3, R3>, H<E5, P, I4, R4>, H<E6, P, I5, R5>, H<E7, P, I6, R6>, H<E8, P, I7, R7>, H<E9, P, I8, R8>, H<E10, P, I9, R9>];
|
|
16
16
|
<I extends Input = {}, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, I10 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9, R extends HandlerResponse<any> = any, R2 extends HandlerResponse<any> = any, R3 extends HandlerResponse<any> = any, R4 extends HandlerResponse<any> = any, R5 extends HandlerResponse<any> = any, R6 extends HandlerResponse<any> = any, R7 extends HandlerResponse<any> = any, R8 extends HandlerResponse<any> = any, R9 extends HandlerResponse<any> = any, R10 extends HandlerResponse<any> = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, E11 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>>(handler1: H<E2, P, I, R>, handler2: H<E3, P, I2, R2>, handler3: H<E4, P, I3, R3>, handler4: H<E5, P, I4, R4>, handler5: H<E6, P, I5, R5>, handler6: H<E7, P, I6, R6>, handler7: H<E8, P, I7, R7>, handler8: H<E9, P, I8, R8>, handler9: H<E10, P, I9, R9>, handler10: H<E11, P, I10, R10>): [H<E2, P, I, R>, H<E3, P, I2, R2>, H<E4, P, I3, R3>, H<E5, P, I4, R4>, H<E6, P, I5, R5>, H<E7, P, I6, R6>, H<E8, P, I7, R7>, H<E9, P, I8, R8>, H<E10, P, I9, R9>, H<E11, P, I10, R10>];
|
|
17
17
|
}
|
|
18
18
|
export declare class Factory<E extends Env = Env, P extends string = string> {
|
|
@@ -63,11 +63,16 @@ export declare const fetchRoutesContent: <E extends Env = Env, S extends Schema
|
|
|
63
63
|
mimeType: string;
|
|
64
64
|
content: string | ArrayBuffer;
|
|
65
65
|
} | undefined>> | undefined>>;
|
|
66
|
+
/**
|
|
67
|
+
* @experimental
|
|
68
|
+
* `saveContentToFile` is an experimental feature.
|
|
69
|
+
* The API might be changed.
|
|
70
|
+
*/
|
|
66
71
|
export declare const saveContentToFile: (data: Promise<{
|
|
67
72
|
routePath: string;
|
|
68
73
|
content: string | ArrayBuffer;
|
|
69
74
|
mimeType: string;
|
|
70
|
-
} | undefined>, fsModule: FileSystemModule, outDir: string, extensionMap?: Record<string, string>) => Promise<string | undefined>;
|
|
75
|
+
} | undefined>, fsModule: FileSystemModule, outDir: string, extensionMap?: Record<string, string>, createdDirs?: Set<string>) => Promise<string | undefined>;
|
|
71
76
|
/**
|
|
72
77
|
* @experimental
|
|
73
78
|
* `ToSSGInterface` is an experimental feature.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HtmlEscaped, HtmlEscapedString, StringBufferWithCallbacks } from "../utils/html.js";
|
|
1
|
+
import { HtmlEscaped, HtmlEscapedString, StringBuffer, StringBufferWithCallbacks } from "../utils/html.js";
|
|
2
2
|
import { DOM_MEMO } from "./constants.js";
|
|
3
3
|
import { JSX as JSX$1 } from "./intrinsic-elements.js";
|
|
4
4
|
import { Context } from "./context.js";
|
|
@@ -25,7 +25,9 @@ export declare namespace JSX {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
export declare const getNameSpaceContext: () => Context<string> | undefined;
|
|
28
|
-
export declare const booleanAttributes: string
|
|
28
|
+
export declare const booleanAttributes: Set<string>;
|
|
29
|
+
export declare const markRenderedJSX: (value: HtmlEscapedString) => HtmlEscapedString;
|
|
30
|
+
export declare const attributeToBuffer: (buffer: StringBuffer, prefix: string, key: string, v: unknown, tag?: string) => void;
|
|
29
31
|
export type Child = string | Promise<string> | number | JSXNode | null | undefined | boolean | Child[];
|
|
30
32
|
export declare const renderChildren: (children: Child[]) => HtmlEscapedString | Promise<HtmlEscapedString>;
|
|
31
33
|
export declare const isUntrustedObject: (value: unknown) => boolean;
|
|
@@ -3,7 +3,8 @@ import { html } from "../helper/html/index.js";
|
|
|
3
3
|
import { Fragment, JSX } from "./base.js";
|
|
4
4
|
import { jsxDEV } from "./jsx-dev-runtime.js";
|
|
5
5
|
//#region src/jsx/jsx-runtime.d.ts
|
|
6
|
+
export declare const jsxTemplate: typeof html;
|
|
6
7
|
export declare const jsxAttr: (key: string, v: string | Promise<string> | Record<string, string | number | null | undefined | boolean>) => HtmlEscapedString | Promise<HtmlEscapedString>;
|
|
7
8
|
export declare const jsxEscape: (value: string) => string;
|
|
8
9
|
//#endregion
|
|
9
|
-
export { Fragment, type JSX, jsxDEV as jsx,
|
|
10
|
+
export { Fragment, type JSX, jsxDEV as jsx, jsxDEV as jsxs };
|
|
@@ -33,7 +33,7 @@ export type CookieOptions = {
|
|
|
33
33
|
prefix?: CookiePrefixOptions;
|
|
34
34
|
} & PartitionedCookieConstraint;
|
|
35
35
|
export type CookiePrefixOptions = 'host' | 'secure';
|
|
36
|
-
export type CookieConstraint<Name> = Name extends `
|
|
36
|
+
export type CookieConstraint<Name> = Lowercase<Name & string> extends `__secure-${string}` ? CookieOptions & SecureCookieConstraint : Lowercase<Name & string> extends `__host-${string}` ? CookieOptions & HostCookieConstraint : CookieOptions;
|
|
37
37
|
export declare const parse: (cookie: string, name?: string) => Cookie;
|
|
38
38
|
export declare const parseSigned: (cookie: string, secret: string | BufferSource, name?: string) => Promise<SignedCookie>;
|
|
39
39
|
export declare const serialize: <Name extends string>(name: Name, value: string, opt?: CookieConstraint<Name>) => string;
|
|
@@ -79,8 +79,8 @@ const parseSigned = async (cookie, secret, name) => {
|
|
|
79
79
|
const _serialize = (name, value, opt = {}) => {
|
|
80
80
|
if (!validCookieNameRegEx.test(name)) throw new Error("Invalid cookie name");
|
|
81
81
|
let cookie = `${name}=${value}`;
|
|
82
|
-
if (
|
|
83
|
-
if (
|
|
82
|
+
if (/^__secure-/i.test(name) && !opt.secure) throw new Error("__Secure- Cookie must have Secure attributes");
|
|
83
|
+
if (/^__host-/i.test(name)) {
|
|
84
84
|
if (!opt.secure) throw new Error("__Host- Cookie must have Secure attributes");
|
|
85
85
|
if (opt.path !== "/") throw new Error("__Host- Cookie must have Path attributes with \"/\"");
|
|
86
86
|
if (opt.domain) throw new Error("__Host- Cookie must not have Domain attributes");
|
|
@@ -9,7 +9,7 @@ const getMimeType = (filename, mimes = baseMimes) => {
|
|
|
9
9
|
return mimes[match[1].toLowerCase()];
|
|
10
10
|
};
|
|
11
11
|
const getExtension = (mimeType) => {
|
|
12
|
-
const baseType = mimeType.split(";", 1)[0].trim();
|
|
12
|
+
const baseType = mimeType.split(";", 1)[0].trim().toLowerCase();
|
|
13
13
|
for (const ext in baseMimes) {
|
|
14
14
|
const stored = baseMimes[ext];
|
|
15
15
|
if (stored === mimeType || stored.split(";", 1)[0].trim() === baseType) return ext;
|
|
@@ -161,7 +161,7 @@ const _getQueryParam = (url, key, multiple) => {
|
|
|
161
161
|
const hashIndex = url.indexOf("#", 8);
|
|
162
162
|
if (hashIndex !== -1) url = url.slice(0, hashIndex);
|
|
163
163
|
let encoded;
|
|
164
|
-
if (!multiple && key &&
|
|
164
|
+
if (!multiple && key && !/[%+&=]/.test(key)) {
|
|
165
165
|
const queryIndex = url.indexOf("?", 8);
|
|
166
166
|
let keyIndex = queryIndex;
|
|
167
167
|
if (keyIndex === -1) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/cli",
|
|
3
|
-
"version": "7.14.
|
|
3
|
+
"version": "7.14.8",
|
|
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.14.
|
|
34
|
+
"@zuplo/core": "7.14.8",
|
|
35
35
|
"@zuplo/editor": "1.0.39603386871",
|
|
36
|
-
"@zuplo/openapi-tools": "7.14.
|
|
37
|
-
"@zuplo/runtime": "7.14.
|
|
36
|
+
"@zuplo/openapi-tools": "7.14.8",
|
|
37
|
+
"@zuplo/runtime": "7.14.8",
|
|
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.14.
|
|
69
|
-
"@zuplo/otel": "7.14.
|
|
68
|
+
"@zuplo/graphql": "7.14.8",
|
|
69
|
+
"@zuplo/otel": "7.14.8"
|
|
70
70
|
},
|
|
71
71
|
"optionalDependencies": {
|
|
72
|
-
"@zuplo/lint-darwin-arm64": "7.14.
|
|
73
|
-
"@zuplo/lint-darwin-x64": "7.14.
|
|
74
|
-
"@zuplo/lint-linux-x64": "7.14.
|
|
75
|
-
"@zuplo/lint-linux-arm64": "7.14.
|
|
76
|
-
"@zuplo/lint-win32-x64": "7.14.
|
|
72
|
+
"@zuplo/lint-darwin-arm64": "7.14.8",
|
|
73
|
+
"@zuplo/lint-darwin-x64": "7.14.8",
|
|
74
|
+
"@zuplo/lint-linux-x64": "7.14.8",
|
|
75
|
+
"@zuplo/lint-linux-arm64": "7.14.8",
|
|
76
|
+
"@zuplo/lint-win32-x64": "7.14.8"
|
|
77
77
|
},
|
|
78
78
|
"bundleDependencies": [
|
|
79
79
|
"@inquirer/prompts",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Zuplo, Inc. All rights reserved.
|
|
4
|
-
*
|
|
5
|
-
* This software and associated documentation files (the "Software") is intended to be used
|
|
6
|
-
* only by Zuplo customers solely to develop and test applications that will be deployed
|
|
7
|
-
* to Zuplo hosted services. You and others in your organization may use these files on your
|
|
8
|
-
* Development Devices solely for the above stated purpose.
|
|
9
|
-
*
|
|
10
|
-
* Outside of uses stated above, no license is granted for any other purpose including
|
|
11
|
-
* without limitation the rights to use, copy, modify, merge, publish, distribute,
|
|
12
|
-
* sublicense, host, and/or sell copies of the Software.
|
|
13
|
-
*
|
|
14
|
-
* The software may include third party components with separate legal notices or governed by
|
|
15
|
-
* other agreements, as described in licenses either embedded in or accompanying the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
18
|
-
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
19
|
-
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
|
20
|
-
* FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
21
|
-
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
-
* DEALINGS IN THE SOFTWARE.
|
|
23
|
-
*--------------------------------------------------------------------------------------------*/
|
|
24
|
-
|
|
25
|
-
import{a as g}from"./chunk-A3QGJZO7.js";import{$ as T}from"./chunk-UFTMOJ7K.js";import{a as r}from"./chunk-TYV53J3B.js";var P=class e extends Request{static{r(this,"ZuploRequest")}#t=void 0;#e;#n;constructor(t,n,s){super(t,n);let o=n?.params;this.#n=s,o?this.#e=o:t instanceof e?this.#e=t.#e:this.#e={};let a=n?.user;a?this.user=a:t instanceof e&&(this.user=t.user)}get originalRequest(){return this.#n??null}get query(){if(this.#t===void 0){let t={},n=new URL(this.url).searchParams;for(let[s,o]of n.entries())t[s]=o;this.#t=t}return g(this.#t)}get params(){return g(this.#e)}user};function h(){return T.instance.build.COMPATIBILITY_FLAGS.mcpProtocolVersion20260728===!0}r(h,"isMcp20260728Enabled");var S="2026-07-28",A="io.modelcontextprotocol/protocolVersion",U="io.modelcontextprotocol/clientCapabilities",B="io.modelcontextprotocol/clientInfo",W="io.modelcontextprotocol/serverInfo";var Q=/^\d{4}-\d{2}-\d{2}$/;function I(e){return typeof e=="string"&&Q.test(e)&&e>=S}r(I,"isModernProtocolVersion");function f(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}r(f,"isRecord");function k(e){if(!f(e)||!f(e.params))return;let t=e.params._meta;return f(t)?t:void 0}r(k,"readRequestMeta");function L(e){let t=k(e)?.[A];return typeof t=="string"?t:void 0}r(L,"readEnvelopeProtocolVersion");function Z(e){let t=k(e)?.[U];return f(t)?t:void 0}r(Z,"readEnvelopeClientCapabilities");function x(e,t){if(Array.isArray(t))return!1;let n=e.get("mcp-protocol-version"),s=L(t);return n!==null&&I(n)||s!==void 0&&I(s)}r(x,"isModernMcpRequest");var X="zuplo_upstream_connect";var M="2.0",R=-32600,N=-32602,se=-32603,re=-32001,b=10*1024*1024;function c(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}r(c,"isRecord");function y(e){return typeof e=="string"||typeof e=="number"}r(y,"isRequestId");function p(e){return e===null?"null":Array.isArray(e)?"an array":typeof e=="object"?"an object":typeof e=="string"?JSON.stringify(e.length>40?`${e.slice(0,40)}\u2026`:e):String(e)}r(p,"describeValue");function i(e){if(!(e===void 0||c(e)))return`params must be an object when present (got ${p(e)}).`}r(i,"optionalObjectParams");function u(e,t){return n=>{if(!c(n))return`params must be an object with a string \`${e}\` (got ${p(n)}). Example: ${t}`;if(typeof n[e]!="string")return`params.${e} must be a string (got ${p(n[e])}). Example: ${t}`}}r(u,"requireStringField");var v={initialize:i,ping:i,"tools/list":i,"tools/call":u("name",'{"name":"my_tool","arguments":{}}'),"prompts/list":i,"prompts/get":u("name",'{"name":"my_prompt"}'),"resources/list":i,"resources/templates/list":i,"resources/read":u("uri",'{"uri":"file:///a.txt"}'),"resources/subscribe":u("uri",'{"uri":"file:///a.txt"}'),"resources/unsubscribe":u("uri",'{"uri":"file:///a.txt"}'),"completion/complete":i,"logging/setLevel":u("level",'{"level":"info"}'),"server/discover":i,"subscriptions/listen":i,"tasks/get":u("taskId",'{"taskId":"task-123"}'),"tasks/update":u("taskId",'{"taskId":"task-123"}'),"tasks/cancel":u("taskId",'{"taskId":"task-123"}')},C={"notifications/initialized":i,"notifications/cancelled":i,"notifications/progress":i,"notifications/roots/list_changed":i,"notifications/subscriptions/acknowledged":i},j=new Set(["server/discover","subscriptions/listen","tasks/get","tasks/update","tasks/cancel"]),$=new Set(["notifications/subscriptions/acknowledged"]);function V(e,t){return Object.hasOwn(v,e)&&(t||!j.has(e))}r(V,"isKnownRequestMethod");function w(e,t){return Object.hasOwn(C,e)&&(t||!$.has(e))}r(w,"isKnownNotificationMethod");function l(e){return{type:"invalid",...e.method===void 0?{}:{method:e.method},id:e.id,error:{code:e.code,message:e.message},raw:e.raw}}r(l,"invalidMessage");function m(e){return y(e)?e:null}r(m,"usableId");function K(e,t,n,s){if(V(t,s)){let o=v[t](e.params);if(o!==void 0)return l({raw:e,method:t,id:n,code:N,message:`Invalid params for \`${t}\`: ${o}`});let a=e.params===void 0?{}:e.params;return{type:"request",method:t,id:n,params:a,raw:e}}return{type:"request",method:t,id:n,params:e.params,raw:e}}r(K,"classifyRequest");function Y(e,t,n){if(w(t,n)){let s=C[t](e.params);if(s!==void 0)return l({raw:e,method:t,id:null,code:N,message:`Invalid params for \`${t}\`: ${s}`});let o=e.params===void 0?{}:e.params;return{type:"notification",method:t,params:o,raw:e}}return{type:"notification",method:t,params:e.params,raw:e}}r(Y,"classifyNotification");function _(e,t=!1){if(!c(e)||e.jsonrpc!==M)return l({raw:e,id:m(c(e)?e.id:void 0),code:R,message:`Invalid Request: batch member is not a JSON-RPC 2.0 message (got ${p(e)}). Every member must include \`"jsonrpc":"2.0"\`.`});let n=e.method;if(typeof n=="string"){if(!("id"in e))return Y(e,n,t);let s=e.id;return y(s)?K(e,n,s,t):l({raw:e,method:n,id:null,code:R,message:`Invalid Request: request id must be a string or number (got ${p(s)}). The gateway cannot correlate a reply to this id \u2014 omit \`id\` to send a notification instead.`})}if(n!==void 0)return l({raw:e,id:m(e.id),code:R,message:`Invalid Request: method must be a string (got ${p(n)}).`});if("result"in e&&y(e.id)&&c(e.result))return{type:"result",id:e.id,result:e.result,raw:e};if("error"in e){let s=e.error;if(c(s)&&typeof s.code=="number"&&typeof s.message=="string"){let o={code:s.code,message:s.message,...s.data===void 0?{}:{data:s.data}};return{type:"error",id:m(e.id),error:o,raw:e}}}return l({raw:e,id:m(e.id),code:R,message:"Invalid Request: message has no `method` and is not a valid JSON-RPC result or error."})}r(_,"classifyMember");var D=new WeakMap,q=new WeakMap;function oe(e){return q.get(e)}r(oe,"getEnvelopeText");async function G(e){let t=e.headers.get("content-type");if(t===null||!t.toLowerCase().includes("json"))return null;let n=e.headers.get("content-length");if(n!==null&&Number(n)>b)return null;let s;try{s=await e.clone().text()}catch{return null}if(s.length>b)return null;let o;try{o=JSON.parse(s)}catch{return null}let a=e.headers.get("mcp-protocol-version");if(Array.isArray(o)){if(o.length>0&&!o.some(d=>c(d)&&d.jsonrpc===M))return null;let O={transport:"json",shape:"batch",messages:o.map(d=>_(d)),...a===null?{}:{protocolVersion:a}};return q.set(O,s),O}if(!c(o)||o.jsonrpc!==M)return null;let E={transport:"json",shape:"single",messages:[_(o,h()&&x(e.headers,o))],...a===null?{}:{protocolVersion:a}};return q.set(E,s),E}r(G,"parseEnvelope");function ie(e){let t=D.get(e);return t===void 0&&(t=G(e),D.set(e,t)),t}r(ie,"getRequest");export{P as a,h as b,S as c,A as d,U as e,B as f,W as g,I as h,L as i,Z as j,x as k,X as l,M as m,R as n,se as o,re as p,c as q,y as r,oe as s,ie as t};
|
|
26
|
-
//# sourceMappingURL=chunk-7RNZS3GX.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@zuplo/runtime/request.ts","@zuplo/runtime/mcp-gateway/v2/runtime-utils/mcp-modern-protocol.ts","@zuplo/runtime/mcp/messages/parse.ts"],"mappings":";;;;;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,KAAK,MAAMD,CAAI,CACxB,MAAQ,CACN,OAAO,IACT,CAEA,IAAME,EAAkBL,EAAQ,QAAQ,IAAI,sBAAsB,EAElE,GAAI,MAAM,QAAQI,CAAI,EAAG,CAIvB,GACEA,EAAK,OAAS,GACd,CAACA,EAAK,KACHE,GAAWxC,EAASwC,CAAM,GAAKA,EAAO,UAAY9C,CACrD,EAEA,OAAO,KAET,IAAMsC,EAAwB,CAC5B,UAAW,OACX,MAAO,QAEP,SAAUM,EAAK,IAAKE,GAAWd,EAAec,CAAM,CAAC,EACrD,GAAID,IAAoB,KAAO,CAAC,EAAI,CAAE,gBAAAA,CAAgB,CACxD,EACA,OAAAT,EAAa,IAAIE,EAAUK,CAAI,EACxBL,CACT,CAEA,GAAI,CAAChC,EAASsC,CAAI,GAAKA,EAAK,UAAY5C,EACtC,OAAO,KAET,IAAMsC,EAAwB,CAC5B,UAAW,OACX,MAAO,SACP,SAAU,CACRN,EACEY,EACAG,EAAqB,GAAKC,EAAmBR,EAAQ,QAASI,CAAI,CACpE,CACF,EACA,GAAIC,IAAoB,KAAO,CAAC,EAAI,CAAE,gBAAAA,CAAgB,CACxD,EACA,OAAAT,EAAa,IAAIE,EAAUK,CAAI,EACxBL,CACT,CApEe9B,EAAA+B,EAAA,iBAkFR,SAASU,GAAWT,EAA+C,CACxE,IAAIU,EAASf,EAAc,IAAIK,CAAO,EACtC,OAAIU,IAAW,SACbA,EAASX,EAAcC,CAAO,EAC9BL,EAAc,IAAIK,EAASU,CAAM,GAE5BA,CACT,CAPgB1C,EAAAyC,GAAA","names":["ZuploRequest","_ZuploRequest","__name","#query","#params","#originalRequest","input","init","originalRequest","params","user","query","searchParams","key","value","deepFreeze","isMcp20260728Enabled","Environment","__name","MCP_MODERN_PROTOCOL_VERSION","MCP_PROTOCOL_VERSION_META_KEY","MCP_CLIENT_CAPABILITIES_META_KEY","MCP_CLIENT_INFO_META_KEY","MCP_SERVER_INFO_META_KEY","PROTOCOL_REVISION_PATTERN","isModernProtocolVersion","version","MCP_MODERN_PROTOCOL_VERSION","__name","isRecord","value","readRequestMeta","message","meta","readEnvelopeProtocolVersion","MCP_PROTOCOL_VERSION_META_KEY","readEnvelopeClientCapabilities","capabilities","MCP_CLIENT_CAPABILITIES_META_KEY","isModernMcpRequest","headers","header","claim","CONNECT_INPUT_REQUEST_KEY","JSONRPC_VERSION","INVALID_REQUEST","INVALID_PARAMS","INTERNAL_ERROR","NOT_PROCESSED","MAX_BODY_CHARS","isRecord","value","__name","isRequestId","describeValue","optionalObjectParams","params","requireStringField","field","example","REQUEST_PARAM_CHECKS","NOTIFICATION_PARAM_CHECKS","MODERN_ONLY_REQUEST_METHODS","MODERN_ONLY_NOTIFICATION_METHODS","isKnownRequestMethod","method","modern","isKnownNotificationMethod","invalidMessage","input","usableId","classifyRequest","raw","id","problem","classifyNotification","classifyMember","error","detail","envelopeCache","envelopeText","getEnvelopeText","envelope","parseEnvelope","request","contentType","contentLength","text","body","protocolVersion","member","isMcp20260728Enabled","isModernMcpRequest","getRequest","cached"]}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Zuplo, Inc. All rights reserved.
|
|
4
|
-
*
|
|
5
|
-
* This software and associated documentation files (the "Software") is intended to be used
|
|
6
|
-
* only by Zuplo customers solely to develop and test applications that will be deployed
|
|
7
|
-
* to Zuplo hosted services. You and others in your organization may use these files on your
|
|
8
|
-
* Development Devices solely for the above stated purpose.
|
|
9
|
-
*
|
|
10
|
-
* Outside of uses stated above, no license is granted for any other purpose including
|
|
11
|
-
* without limitation the rights to use, copy, modify, merge, publish, distribute,
|
|
12
|
-
* sublicense, host, and/or sell copies of the Software.
|
|
13
|
-
*
|
|
14
|
-
* The software may include third party components with separate legal notices or governed by
|
|
15
|
-
* other agreements, as described in licenses either embedded in or accompanying the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
18
|
-
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
19
|
-
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
|
20
|
-
* FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
21
|
-
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
-
* DEALINGS IN THE SOFTWARE.
|
|
23
|
-
*--------------------------------------------------------------------------------------------*/
|
|
24
|
-
|
|
25
|
-
import{a as r}from"./chunk-TYV53J3B.js";var N=class extends Error{static{r(this,"SystemError")}constructor(t,n){super(t,n),this.name="InternalError"}},w=class extends TypeError{static{r(this,"NetworkError")}cause;constructor(t){super("The upstream request failed due to a network error.",{cause:t}),this.name="TypeError",this.cause=t}},y=class extends Error{static{r(this,"RuntimeError")}extensionMembers;constructor(t,n){typeof t=="string"?super(t,n):(super(t.message,n),this.extensionMembers=t.extensionMembers),this.name="RuntimeError"}},K=class extends y{static{r(this,"ConfigurationError")}constructor(t,n){super(t,n),this.name="ConfigurationError"}};var ht="zuplo-request-id",Ee="zp-rid",he="zp-body-removed",Re="cf-ray",Rt="x-forwarded-scheme",Ot="x-forwarded-proto",At="x-scheme",Oe="cf-ipcity",Ae="cf-ipcontinent",ye="cf-ipcountry",Te="cf-iplongitude",Pe="cf-iplatitude",yt="cf-region",Tt="cf-region-code",Pt="cf-metro-code",bt="cf-postal-code",St="cf-timezone",Lt="zp-ipcity",xt="zp-ipcontinent",It="zp-ipcountry",Ut="zp-iplongitude",Ct="zp-iplatitude",X="x-real-ip",H="true-client-ip";var be="zp-client-cert",Se="zp-mtls-status",Le="zp-mtls-failure-reason",xe="zp-mtls-cert-fingerprint-sha256",Ie="zp-mtls-cert-not-before",Ue="zp-mtls-cert-not-after",Ce="zp-mtls-cert-issuer-dn",Ne="zp-mtls-cert-subject-dn",we="zp-asn",Me="zp-asorg",De="zp-colo",He="zp-postalcode",ve="zp-metrocode",ze="zp-region",Fe="zp-regioncode",Ze="zp-timezone",Nt="zp-http-protocol",v="zp-local-service",Ve="zp-gateway-api-key",ke="x-akamai-edgescape",wt=[be,Se,Le,xe,Ie,Ue,Ce,Ne,ke,v],Mt=[Oe,Ae,ye,Te,Pe,we,Me,De,He,ve,ze,Fe,Ze],Dt=["zp-","cf-"],Ht=[Ee,Re,he,Ve];var vt="system-logger";var Be=!1;function S(e,t){return{open:`\x1B[${e.join(";")}m`,close:`\x1B[${t}m`,regexp:new RegExp(`\\x1b\\[${t}m`,"g")}}r(S,"code");function L(e,t){return Be?`${t.open}${e.replace(t.regexp,t.open)}${t.close}`:e}r(L,"run");function $e(e){return L(e,S([31],39))}r($e,"red");function Ge(e){return L(e,S([32],39))}r(Ge,"green");function je(e){return L(e,S([33],39))}r(je,"yellow");function Ye(e){return L(e,S([34],39))}r(Ye,"blue");function qe(e){return L(e,S([35],39))}r(qe,"magenta");function We(e){return L(e,S([36],39))}r(We,"cyan");var Ft=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|"),"g");var Q=[$e,Ge,je,Ye,qe,We];function Je(e){let t=0,n=e.length,i=0;if(n>0)for(;i<n;)t=(t<<5)-t+e.charCodeAt(i++)|0;return t}r(Je,"hashCode");function ee(e){let t=Math.abs(Je(e));return Q[t%Q.length]}r(ee,"generateColor");function te(e,t,...n){let i=0,o=n.length,c=String(t).replace(/%[sdjoO%]/g,s=>{if(s==="%%")return"%";if(i>=o)return s;switch(s){case"%s":return String(n[i++]);case"%d":return Number(n[i++]).toString();case"%o":return e(n[i++]).split(`
|
|
26
|
-
`).map(l=>l.trim()).join(" ");case"%O":return e(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}default:return s}});for(let s of n.splice(i))s===null||!(typeof s=="object"&&s!==null)?c+=" "+s:c+=" "+e(s);return c}r(te,"format");function P(e,t,n,i){let o={seen:[],stylize:Ke,showHidden:t??!1,depth:n??2,colors:i??!1,customInspect:!0};return o.colors&&(o.stylize=Qe),M(o,e,o.depth)}r(P,"inspect");P.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};P.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Ke(e,t){return e}r(Ke,"stylizeNoColor");function Xe(e){return typeof e=="boolean"}r(Xe,"isBoolean");function re(e){return e===void 0}r(re,"isUndefined");function Qe(e,t){let n=P.styles[t];return n?"\x1B["+P.colors[n][0]+"m"+e+"\x1B["+P.colors[n][1]+"m":e}r(Qe,"stylizeWithColor");function z(e){return typeof e=="function"}r(z,"isFunction");function oe(e){return typeof e=="string"}r(oe,"isString");function et(e){return typeof e=="number"}r(et,"isNumber");function ie(e){return e===null}r(ie,"isNull");function se(e,t){return Object.hasOwn(e,t)}r(se,"hasOwn");function F(e){return B(e)&&$(e)==="[object RegExp]"}r(F,"isRegExp");function B(e){return typeof e=="object"&&e!==null}r(B,"isObject");function Z(e){return B(e)&&($(e)==="[object Error]"||e instanceof Error)}r(Z,"isError");function ne(e){return B(e)&&$(e)==="[object Date]"}r(ne,"isDate");function $(e){return Object.prototype.toString.call(e)}r($,"objectToString");function tt(e){let t={};return e.forEach(function(n,i){t[n]=!0}),t}r(tt,"arrayToHash");function nt(e,t,n,i,o){let c=[];for(let s=0,l=t.length;s<l;++s)se(t,String(s))?c.push(k(e,t,n,i,String(s),!0)):c.push("");return o.forEach(function(s){s.match(/^\d+$/)||c.push(k(e,t,n,i,s,!0))}),c}r(nt,"formatArray");function V(e){return"["+Error.prototype.toString.call(e)+"]"}r(V,"formatError");function M(e,t,n){if(e.customInspect&&t&&z(t.inspect)&&t.inspect!==P&&!(t.constructor&&t.constructor.prototype===t)){let u=t.inspect(n,e);return oe(u)||(u=M(e,u,n)),u}let i=rt(e,t);if(i)return i;let o=Object.keys(t),c=tt(o);try{e.showHidden&&Object.getOwnPropertyNames&&(o=Object.getOwnPropertyNames(t))}catch{}if(Z(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return V(t);if(o.length===0){if(z(t)){let u=t.name?": "+t.name:"";return e.stylize("[Function"+u+"]","special")}if(F(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(ne(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Z(t))return V(t)}let s="",l=!1,p=["{","}"];if(Array.isArray(t)&&(l=!0,p=["[","]"]),z(t)&&(s=" [Function"+(t.name?": "+t.name:"")+"]"),F(t)&&(s=" "+RegExp.prototype.toString.call(t)),ne(t)&&(s=" "+Date.prototype.toUTCString.call(t)),Z(t)&&(s=" "+V(t)),o.length===0&&(!l||t.length==0))return p[0]+s+p[1];if(n<0)return F(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);let a;return l?a=nt(e,t,n,c,o):a=o.map(function(u){return k(e,t,n,c,u,l)}),e.seen.pop(),ot(a,s,p)}r(M,"formatValue");function k(e,t,n,i,o,c){let s,l,p;p={value:void 0};try{p.value=t[o]}catch{}try{Object.getOwnPropertyDescriptor&&(p=Object.getOwnPropertyDescriptor(t,o)||p)}catch{}if(p.get?p.set?l=e.stylize("[Getter/Setter]","special"):l=e.stylize("[Getter]","special"):p.set&&(l=e.stylize("[Setter]","special")),se(i,o)||(s="["+o+"]"),l||(e.seen.indexOf(p.value)<0?(ie(n)?l=M(e,p.value,null):l=M(e,p.value,n-1),l.indexOf(`
|
|
27
|
-
`)>-1&&(c?l=l.split(`
|
|
28
|
-
`).map(function(a){return" "+a}).join(`
|
|
29
|
-
`).substr(2):l=`
|
|
30
|
-
`+l.split(`
|
|
31
|
-
`).map(function(a){return" "+a}).join(`
|
|
32
|
-
`))):l=e.stylize("[Circular]","special")),re(s)){if(c&&o.match(/^\d+$/))return l;s=JSON.stringify(""+o),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+l}r(k,"formatProperty");function rt(e,t){if(re(t))return e.stylize("undefined","undefined");if(oe(t)){let n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(et(t))return e.stylize(""+t,"number");if(Xe(t))return e.stylize(""+t,"boolean");if(ie(t))return e.stylize("null","null")}r(rt,"formatPrimitive");function ot(e,t,n){let i=0;return e.reduce(function(c,s){return i++,s.indexOf(`
|
|
33
|
-
`)>=0&&i++,c+s.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(t===""?"":t+`
|
|
34
|
-
`)+" "+e.join(`,
|
|
35
|
-
`)+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}r(ot,"reduceToSingleString");var ae=r((e,...t)=>te(P,e,t),"format");var G=class{static{r(this,"Debugger")}manager;ns;color;last;enabled;constructor(t,n){this.manager=t,this.ns=n,this.color=ee(n),this.last=0,this.enabled=t.enabled.some(i=>i.test(n))}log(...t){if(!this.enabled)return;let n,i=t[0];typeof i=="function"?n=i():n=String(i);let o=Date.now()-(this.last||Date.now());n=ae(n,...t);let c=`${this.color(this.ns)} ${n} ${this.color(`+${o}ms`)}`;console.log(c),this.last=Date.now()}},j=class{static{r(this,"DebugManager")}debuggers;enabled;constructor(t){this.debuggers=new Map,this.enabled=t??[]}};function it(e){return!e||e.length===0?[]:(e=e.replace(/\s/g,"").replace(/\*/g,".+"),e.split(",").map(t=>new RegExp(`^${t}$`)))}r(it,"extract");var D;function ce(e){let t=globalThis.DEBUG;D||(D=new j(it(t)));let n=new G(D,e);return D.debuggers.set(e,n),Object.assign(n.log.bind(n),{self:n})}r(ce,"debug");function st(e){if(e.length>=255)throw new TypeError("Alphabet too long");let t=new Uint8Array(256);for(let a=0;a<t.length;a++)t[a]=255;for(let a=0;a<e.length;a++){let u=e.charAt(a),E=u.charCodeAt(0);if(t[E]!==255)throw new TypeError(u+" is ambiguous");t[E]=a}let n=e.length,i=e.charAt(0),o=Math.log(n)/Math.log(256),c=Math.log(256)/Math.log(n);function s(a){if(a instanceof Uint8Array||(ArrayBuffer.isView(a)?a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength):Array.isArray(a)&&(a=Uint8Array.from(a))),!(a instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(a.length===0)return"";let u=0,E=0,g=0,d=a.length;for(;g!==d&&a[g]===0;)g++,u++;let R=(d-g)*c+1>>>0,m=new Uint8Array(R);for(;g!==d;){let O=a[g],h=0;for(let T=R-1;(O!==0||h<E)&&T!==-1;T--,h++)O+=256*m[T]>>>0,m[T]=O%n>>>0,O=O/n>>>0;if(O!==0)throw new Error("Non-zero carry");E=h,g++}let f=R-E;for(;f!==R&&m[f]===0;)f++;let A=i.repeat(u);for(;f<R;++f)A+=e.charAt(m[f]);return A}r(s,"encode");function l(a){if(typeof a!="string")throw new TypeError("Expected String");if(a.length===0)return new Uint8Array;let u=0,E=0,g=0;for(;a[u]===i;)E++,u++;let d=(a.length-u)*o+1>>>0,R=new Uint8Array(d);for(;u<a.length;){let O=a.charCodeAt(u);if(O>255)return;let h=t[O];if(h===255)return;let T=0;for(let C=d-1;(h!==0||T<g)&&C!==-1;C--,T++)h+=n*R[C]>>>0,R[C]=h%256>>>0,h=h/256>>>0;if(h!==0)throw new Error("Non-zero carry");g=T,u++}let m=d-g;for(;m!==d&&R[m]===0;)m++;let f=new Uint8Array(E+(d-m)),A=E;for(;m!==d;)f[A++]=R[m++];return f}r(l,"decodeUnsafe");function p(a){let u=l(a);if(u)return u;throw new Error("Non-base"+n+" character")}return r(p,"decode"),{encode:s,decodeUnsafe:l,decode:p}}r(st,"base");var le=st;var at="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",ue=le(at);var ct=/: client error \((?:Connect|SendRequest)\):/;function lt(e){return e instanceof TypeError&&e.message.startsWith("error sending request ")&&ct.test(e.message)}r(lt,"isDenoClientError");function x(e,t){return t?e.catch(n=>{throw lt(n)?new w(n):n}):e}r(x,"wrapDenoNetworkErrors");var b=ce("zuplo:runtime:external-service");function ut(){let e,{__ZUPLO_EXTERNAL_SERVICE_TOKEN:t}=_.instance.runtime;if(t&&t!=="undefined")try{let n=atob(t);e=JSON.parse(n)}catch{}return e}r(ut,"getServiceAuth");async function pe(e,t){let n=".proxy",i=".tunnel";if(typeof e=="string"){let o=new URL(e),c=o.hostname;if(c.endsWith(n)){let f=c.slice(0,-n.length),A=new URL(`http://${f}${o.pathname}${o.search}`);b(`Routing to proxy: ${A.toString()}`);let O=t??{};return I(A.toString(),O)}let s=c.endsWith(i),l=c.indexOf(".")===-1;if(!(s||l))throw new y(`Invalid service hostname suffix: ${c}. Use .proxy for proxy routing, .tunnel for explicit tunnel routing, or no suffix for default tunnel routing.`);let a=s?c.slice(0,-i.length):c,u=ut();if(!u)throw b("There is no external service auth configured for this zup."),new y("There are no external services configured for this zup.");b(`Using external service auth. ClientId: ${u.clientId})`);let E=t??{},g=new Headers(E.headers||{});g.set("CF-Access-Client-Id",u.clientId),g.set("CF-Access-Client-Secret",u.clientSecret),E.headers=g;let d;if(u.customServiceMapping?.[a])d=`https://${u.customServiceMapping[a]}`;else if(_.instance.useLegacyServiceRouting)d=`https://${a}.zuptunnel.com`;else{b("Using sha256 service routing");let f=_.instance.build;if(f.ACCOUNT_NAME&&f.PROJECT_NAME&&f.ENVIRONMENT_TYPE){let A=await pt(a,f.ACCOUNT_NAME,f.PROJECT_NAME,f.ENVIRONMENT_TYPE),O=de(f.ENVIRONMENT_TYPE),h=await Y(`${f.ACCOUNT_NAME}-${f.PROJECT_NAME}-${O}`);h==="40d7ad502f5d743997999594c177184a00161a77865423511f3a1ea21eb5a5e"||h==="d05bffe8fa91a300187d2cf43e8aa4a56bd809c442ae10d1ee49af7d29a5a11"?d=`https://${A}.zuptunnel.com`:d=`https://${A}.t.zuplo.app`}else throw b("Cannot use sha256 service routing, missing build variables"),new y("Failed to generate fully qualified tunnel url.")}let R=new URL(`${d}${o.pathname}${o.search}`);b(`Calling external service: ${R.toString()}`);let m=await I(R.toString(),E);if(m.status===403&&m.headers.get("cf-access-domain")!==null)throw U.console.error("403 Forbidden when calling external service.",{clientId:u.clientId,tunnelHost:d}),new y("Could not connect to secure tunnel.");return m}else throw b("Cannot call external service with Request object"),new y("Currently, we only support fetch(<some_string>, ...).")}r(pe,"externalServiceHandler");async function fe(e,t){if(typeof e=="string"){let n=new URL(e),i=n.hostname,o=t??{},c=`http://${i}.zuplo.svc.cluster.local:9000`,s=new URL(`${c}${n.pathname}${n.search}`),l=new Headers(o.headers||{});return l.set(v,i),o.headers=l,await I(s.toString(),o)}else throw new y("Currently, we only support fetch(<some_string>, ...).")}r(fe,"clusterServiceHandler");async function pt(e,t,n,i){let o=e.toLowerCase(),c=t.toLowerCase(),s=n.toLowerCase(),l=de(i);b(`Hashing service name: ${c}-${o}.${c}-${s}-${l}`);let p=await Y(`${c}-${o}`),a=await Y(`${c}-${s}-${l}`);return`${p}.${a}`}r(pt,"hashServiceName");async function Y(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(c=>c.toString(16).padStart(2,"0")).join("").slice(0,-1)}r(Y,"hashSegment");function de(e){let t=e.toLowerCase();switch(t){case"production":case"preview":return t;default:return"working-copy"}}r(de,"sanitizeEnvironmentType");var q=new Map;q.set("service:",pe);q.set("local:",fe);var I=globalThis.fetch;function W(e,t){let{transformedInit:n,mtlsCertificate:i}=ft(t);if(typeof e=="string"){let o=new URL(e),c=q.get(o.protocol);return c?x(c(e,n),_.instance.isDeno):ge(e,n,i)}else return ge(e,n,i)}r(W,"internalFetch");globalThis.fetch=W;function ge(e,t,n){if(!n)return x(I(e,t),_.instance.isDeno);if(_.instance.isCloudflare){let o=_.instance.runtime[n];if(!o)throw new Error(`mTLS certificate binding '${n}' not found. Ensure the certificate is uploaded and properly configured.`);if(typeof o!="object"||typeof o.fetch!="function")throw new Error(`mTLS certificate binding '${n}' is not a valid mTLS certificate binding. Make sure it's configured as an mTLS certificate, not an environment variable.`);return x(o.fetch(e,t),_.instance.isDeno)}else if(_.instance.isDeno){let i=globalThis.managedDedicatedMtlsBindings?.[n];if(!i)throw new Error(`mTLS certificate binding '${n}' not found. Ensure the certificate is uploaded and properly configured.`);if(typeof i.fetch!="function")throw new Error(`mTLS certificate binding '${n}' is not a valid mTLS certificate binding.`);return x(i.fetch(e,t),!0)}else throw new Error("mTLS client certificates are not supported in this runtime environment")}r(ge,"performFetch");var ft=r(e=>{if(!e||e instanceof Request)return{transformedInit:e,mtlsCertificate:void 0};let t=e;if(!t.zuplo)return{transformedInit:e,mtlsCertificate:void 0};let n=t.zuplo.mtlsCertificate,i=e;return i.cf={cacheEverything:t.zuplo?.cacheEverything,cacheTtl:t.zuplo?.cacheTtlSeconds},delete e.zuplo,{transformedInit:e,mtlsCertificate:n}},"transformInit");var dt={console:{log:console.log.bind(console),info:console.info.bind(console),warn:console.warn.bind(console),error:console.error.bind(console),debug:console.debug.bind(console),assert:console.assert.bind(console),clear:console.clear.bind(console),count:console.count.bind(console),countReset:console.countReset.bind(console),dir:console.dir.bind(console),dirxml:console.dirxml.bind(console),group:console.group.bind(console),groupCollapsed:console.groupCollapsed.bind(console),groupEnd:console.groupEnd.bind(console),table:console.table.bind(console),time:console.time.bind(console),timeEnd:console.timeEnd.bind(console),timeLog:console.timeLog.bind(console),timeStamp:console.timeStamp.bind(console),trace:console.trace.bind(console),profile:console.profile.bind(console),profileEnd:console.profileEnd.bind(console)},fetch:W},U=dt;var J="2025-02-06",me=Object.freeze({none:{runOutboundPoliciesOnHandlerOnAllStatuses:!1,doNotRunHooksOnSystemRoutes:!1,removeAllVendorHeadersExceptListed:!1,allowCustomPorts:!1,removeLegacyLogInitialization:!1,useForwardRedirectsPropOnUrlForwardHandler:!1,escapeOpenApiPathCharacters:!1,delimitOpenApiPathParameters:!1,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1,improvedSchemaValidation:!1,serializeMcpParametersByStyle:!1,sanitizeMcpToolNames:!1,omitMcpFieldsNewerThanNegotiatedVersion:!1,treatBlankOptionalStringOptionsAsUnset:!1,mcpProtocolVersion20260728:!1,failMcpResourceReadsOnErrorStatus:!1,rejectInvalidMcpResourceUris:!1},"2023-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:!1,doNotRunHooksOnSystemRoutes:!1,removeAllVendorHeadersExceptListed:!1,allowCustomPorts:!1,removeLegacyLogInitialization:!1,useForwardRedirectsPropOnUrlForwardHandler:!1,escapeOpenApiPathCharacters:!1,delimitOpenApiPathParameters:!1,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1,improvedSchemaValidation:!1,serializeMcpParametersByStyle:!1,sanitizeMcpToolNames:!1,omitMcpFieldsNewerThanNegotiatedVersion:!1,treatBlankOptionalStringOptionsAsUnset:!1,mcpProtocolVersion20260728:!1,failMcpResourceReadsOnErrorStatus:!1,rejectInvalidMcpResourceUris:!1},"2024-01-15":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!1,removeLegacyLogInitialization:!1,useForwardRedirectsPropOnUrlForwardHandler:!1,escapeOpenApiPathCharacters:!1,delimitOpenApiPathParameters:!1,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1,improvedSchemaValidation:!1,serializeMcpParametersByStyle:!1,sanitizeMcpToolNames:!1,omitMcpFieldsNewerThanNegotiatedVersion:!1,treatBlankOptionalStringOptionsAsUnset:!1,mcpProtocolVersion20260728:!1,failMcpResourceReadsOnErrorStatus:!1,rejectInvalidMcpResourceUris:!1},"2024-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!1,removeLegacyLogInitialization:!1,useForwardRedirectsPropOnUrlForwardHandler:!1,escapeOpenApiPathCharacters:!1,delimitOpenApiPathParameters:!1,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1,improvedSchemaValidation:!1,serializeMcpParametersByStyle:!1,sanitizeMcpToolNames:!1,omitMcpFieldsNewerThanNegotiatedVersion:!1,treatBlankOptionalStringOptionsAsUnset:!1,mcpProtocolVersion20260728:!1,failMcpResourceReadsOnErrorStatus:!1,rejectInvalidMcpResourceUris:!1},"2024-09-02":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!0,removeLegacyLogInitialization:!1,useForwardRedirectsPropOnUrlForwardHandler:!1,escapeOpenApiPathCharacters:!1,delimitOpenApiPathParameters:!1,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1,improvedSchemaValidation:!1,serializeMcpParametersByStyle:!1,sanitizeMcpToolNames:!1,omitMcpFieldsNewerThanNegotiatedVersion:!1,treatBlankOptionalStringOptionsAsUnset:!1,mcpProtocolVersion20260728:!1,failMcpResourceReadsOnErrorStatus:!1,rejectInvalidMcpResourceUris:!1},"2025-02-06":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!0,removeLegacyLogInitialization:!0,useForwardRedirectsPropOnUrlForwardHandler:!0,escapeOpenApiPathCharacters:!0,delimitOpenApiPathParameters:!1,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1,improvedSchemaValidation:!1,serializeMcpParametersByStyle:!1,sanitizeMcpToolNames:!1,omitMcpFieldsNewerThanNegotiatedVersion:!1,treatBlankOptionalStringOptionsAsUnset:!1,mcpProtocolVersion20260728:!1,failMcpResourceReadsOnErrorStatus:!1,rejectInvalidMcpResourceUris:!1},"2026-03-01":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!0,removeLegacyLogInitialization:!0,useForwardRedirectsPropOnUrlForwardHandler:!0,escapeOpenApiPathCharacters:!0,delimitOpenApiPathParameters:!1,chainResponseSendingHooks:!0,return501ForUnsupportedHttpMethods:!0,improvedSchemaValidation:!1,serializeMcpParametersByStyle:!1,sanitizeMcpToolNames:!1,omitMcpFieldsNewerThanNegotiatedVersion:!1,treatBlankOptionalStringOptionsAsUnset:!1,mcpProtocolVersion20260728:!1,failMcpResourceReadsOnErrorStatus:!1,rejectInvalidMcpResourceUris:!1},"2026-11-06":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!0,removeLegacyLogInitialization:!0,useForwardRedirectsPropOnUrlForwardHandler:!0,escapeOpenApiPathCharacters:!0,delimitOpenApiPathParameters:!0,chainResponseSendingHooks:!0,return501ForUnsupportedHttpMethods:!0,improvedSchemaValidation:!0,serializeMcpParametersByStyle:!0,sanitizeMcpToolNames:!0,omitMcpFieldsNewerThanNegotiatedVersion:!0,treatBlankOptionalStringOptionsAsUnset:!0,mcpProtocolVersion20260728:!0,failMcpResourceReadsOnErrorStatus:!0,rejectInvalidMcpResourceUris:!0}});function _e(e={}){let{runtime:t="cloudflare"}=e;return new _({build:{ACCOUNT_NAME:"mock-account-name",PROJECT_NAME:"mock-project-name",API_VERSION:"0.0.0",BUILD_ID:crypto.randomUUID(),TIMESTAMP:new Date().toISOString(),BUILD_ENV:"test",ZUPLO_VERSION:"0.0.0",COMPATIBILITY_DATE:J,ENVIRONMENT_TYPE:"mock-environment-type",GIT_SHA:void 0,IS_LOCAL_DEVELOPMENT:!1,COMPATIBILITY_FLAGS:me[J]},runtime:{RUNTIME_ENV:"test",RUNTIME_STAGE:"test",__ZUPLO_DEPLOYMENT_NAME:"mock-deployment-name",__ZUPLO_LOG_LEVEL:"debug",__ZUPLO_LOG_FORMAT:"pretty",__ZUPLO_MANAGEMENT_API_URL:"",__ZUPLO_RUNTIME_TYPE:t,__ZUPLO_AUTH_API_JWT:"",ZUPLO_SERVICE_BUCKET_ID:"bckt_mock"}})}r(_e,"getMockEnvironment");var gt=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function mt(e,t){let n=e.__ZUPLO_TRUSTED_IP_HEADER?.trim();if(!n)return t?H:X;if(!gt.test(n))throw new N(`__ZUPLO_TRUSTED_IP_HEADER is set to '${n}', which is not a valid HTTP header name. Header names may only contain the RFC 9110 token characters (letters, digits, and !#$%&'*+-.^_\`|~) - spaces, colons and tabs are not allowed. Set it to a valid header name such as '${H}' or 'cf-connecting-ip'.`);return n.toLowerCase()}r(mt,"resolveTrustedIpHeader");var _=class e{static{r(this,"Environment")}config;#n;static#e;static#t=!1;static initialize(t){e.#e||(e.#e=new e(t),e.#t=!0)}static get instance(){return e.#t||(U.console.debug("Environment has not been initialized. This is okay when running tests, a mock environment will be used."),e.#e??=_e(),e.#t=!0),e.#e}constructor({build:t,runtime:n}){let i;try{if(n.ZUPLO_SYSTEM_CONFIGURATIONS){let o=new TextDecoder().decode(ue.decode(n.ZUPLO_SYSTEM_CONFIGURATIONS)),c=JSON.parse(o);for(let s of Object.keys(c))n[s]||(n[s]=c[s])}if(n.__ZUPLO_CONFIG){let o=atob(n.__ZUPLO_CONFIG);i=JSON.parse(o)}}catch(o){U.console.error("Failed to parse runtime configuration",o)}this.config=i??{},this.build=t,this.runtime=n,this.instanceId=crypto.randomUUID(),this.#n=mt(n,this.isCloudflare)}build;runtime;instanceId;get deploymentName(){return this.runtime.__ZUPLO_DEPLOYMENT_NAME??this.config.deployment_name??void 0}get accountName(){return this.build.ACCOUNT_NAME??this.runtime.ZUPLO_ACCOUNT_NAME??void 0}get projectName(){return this.build.PROJECT_NAME??this.runtime.ZUPLO_PROJECT_NAME??void 0}get useLegacyServiceRouting(){return this.config.use_legacy_service_routing??void 0}get useProxyForFetchFromZups(){return this.config.use_proxy_for_fetch_from_zups??void 0}get devPortalBaseUrl(){return this.runtime.__ZUPLO_DEV_PORTAL_URL??this.config.dev_portal_url??"https://dev-portal-v4-1.zuplo.com"}get buildAssetsUrl(){return this.runtime.__ZUPLO_BUILD_ASSETS_URL??this.config.build_assets_url??"https://build-assets.zuplo.com"}get zuploEdgeApiUrl(){return this.runtime.__ZUPLO_EDGE_API_URL??this.config.zuplo_edge_api_url??"https://api.zuploedge.com"}get remoteLogToken(){return this.runtime.__ZUPLO_REMOTE_LOG_TOKEN??this.config.remote_log_token??void 0}get zuploClientAuthBucketId(){return this.config.zuplo_auth_client_bucket_id??"auth_o8PUdhKxSTOiB794GWPwLQCD"}get managementApiURL(){return this.runtime.__ZUPLO_MANAGEMENT_API_URL??this.config.management_api_url??"https://api.zuplo.com"}get developerApiUrl(){return this.config.developer_api_url??"https://dev.zuplo.com"}get cdnURL(){return this.runtime.__ZUPLO_CDN_URL??this.config.cdn_url??"https://cdn.zuplo.com"}get remoteLogURL(){return this.runtime.__ZUPLO_REMOTE_LOG_URL??this.config.log_event_api??"https://ellie.zuploedge.com"}get loggingId(){return this.runtime.__ZUPLO_LOGGING_ID??this.config.logging_id??void 0}get redisURL(){return this.runtime.__ZUPLO_REDIS_URL??this.config.redis_proxy_url??"https://redis-proxy.zuploedge.com"}get apiKeyServiceUrl(){return this.runtime.__ZUPLO_API_KEY_SERVICE_URL??this.config.api_key_service_url??"https://apikey.zuploedge.com"}get meteringServiceUrl(){return this.config.metering_service_url??"https://meters.zuploedge.com"}get authApiJWT(){return this.runtime.__ZUPLO_AUTH_API_JWT??void 0}get authClientId(){return this.config.auth_client_id??this.runtime.__ZUPLO_AUTH_CLIENT_ID}get authClientSecret(){return this.config.auth_client_secret??this.runtime.__ZUPLO_AUTH_CLIENT_SECRET}get authPublicKey(){return this.config.auth_public_key??this.runtime.__ZUPLO_AUTH_PUBLIC_KEY}get authPrivateKey(){return this.config.auth_private_key??this.runtime.__ZUPLO_AUTH_PRIVATE_KEY}get userLogLevel(){return this.runtime.ZUPLO_LOG_LEVEL??this.runtime.__ZUPLO_LOG_LEVEL??this.config.user_log_level??"debug"}get systemLogLevel(){return this.runtime.__ZUPLO_LOG_LEVEL??this.config.system_log_level??"debug"}get logFormat(){return this.runtime.__ZUPLO_LOG_FORMAT??this.config.log_format??"cloudflare"}get isCloudflare(){return this.runtime.__ZUPLO_RUNTIME_TYPE?this.runtime.__ZUPLO_RUNTIME_TYPE==="cloudflare":this.config.runtime_type?this.config.runtime_type==="cloudflare":typeof WebSocketPair=="function"}get isManagedDedicated(){return this.runtime.__ZUPLO_IS_MANAGED_DEDICATED==="true"}get trustedIpHeader(){return this.#n}get isDeno(){if(this.runtime.__ZUPLO_RUNTIME_TYPE)return this.runtime.__ZUPLO_RUNTIME_TYPE==="deno";if(this.config.runtime_type)return this.config.runtime_type==="deno";{let t=globalThis.Deno?.version?.deno;return typeof WebSocketPair!="function"&&t}}get isLocalDevelopment(){return this.build.IS_LOCAL_DEVELOPMENT}get isTestMode(){return!!this.runtime.__ZUPLO_TEST_MODE}get budgetRulesCaptureDisabled(){return this.runtime.__ZUPLO_BUDGET_RULES_CAPTURE==="off"}get budgetDimensionLogValuesEnabled(){return this.runtime.__ZUPLO_BUDGET_DIMENSION_LOG_VALUES==="on"}get systemUserAgent(){return`Zuplo/${this.build.ZUPLO_VERSION}`}get loggingEnvironmentType(){return this.isCloudflare?"edge":this.isLocalDevelopment?"local":this.isDeno?"working-copy":"unknown"}get loggingEnvironmentStage(){return this.build.ENVIRONMENT_TYPE==="PRODUCTION"?"production":this.build.ENVIRONMENT_TYPE==="PREVIEW"?"preview":this.isLocalDevelopment?"local":this.isWorkingCopy?"working-copy":"unknown"}get isWorkingCopy(){return this.build.ENVIRONMENT_TYPE==="WORKING_COPY"}get rateLimitServiceTimeoutMs(){let t=this.runtime.__ZUPLO_RATE_LIMIT_TIMEOUT_MS,n=this.config.rate_limit_service_timeout_ms,i=t??n;if(!i)return 500;let o=Number(i);return Number.isFinite(o)&&o>0?o:500}};export{N as a,w as b,y as c,K as d,ce as e,ht as f,Ee as g,he as h,Re as i,Rt as j,Ot as k,At as l,Oe as m,Ae as n,ye as o,Te as p,Pe as q,yt as r,Tt as s,Pt as t,bt as u,St as v,Lt as w,xt as x,It as y,Ut as z,Ct as A,X as B,be as C,Se as D,Le as E,xe as F,Ie as G,Ue as H,Ce as I,Ne as J,we as K,Me as L,De as M,He as N,ve as O,ze as P,Fe as Q,Ze as R,Nt as S,v as T,Ve as U,ke as V,wt as W,Mt as X,Dt as Y,Ht as Z,vt as _,_ as $,U as aa};
|
|
36
|
-
/*! For license information please see chunk-UFTMOJ7K.js.LEGAL.txt */
|
|
37
|
-
//# sourceMappingURL=chunk-UFTMOJ7K.js.map
|