@zuplo/cli 6.73.14 → 6.73.15

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 (44) hide show
  1. package/dist/cmds/dev.d.ts.map +1 -1
  2. package/dist/cmds/dev.js +6 -0
  3. package/dist/cmds/dev.js.map +1 -1
  4. package/dist/dev/handler.d.ts +1 -0
  5. package/dist/dev/handler.d.ts.map +1 -1
  6. package/dist/dev/handler.js +5 -0
  7. package/dist/dev/handler.js.map +1 -1
  8. package/dist/dev/zuplo-local-gitignore.d.ts +4 -0
  9. package/dist/dev/zuplo-local-gitignore.d.ts.map +1 -0
  10. package/dist/dev/zuplo-local-gitignore.js +29 -0
  11. package/dist/dev/zuplo-local-gitignore.js.map +1 -0
  12. package/dist/dev/zuplo-local-gitignore.test.d.ts +2 -0
  13. package/dist/dev/zuplo-local-gitignore.test.d.ts.map +1 -0
  14. package/dist/dev/zuplo-local-gitignore.test.js +58 -0
  15. package/dist/dev/zuplo-local-gitignore.test.js.map +1 -0
  16. package/dist/tsconfig.tsbuildinfo +1 -1
  17. package/node_modules/@zuplo/core/customer.cli.minified.js +238 -238
  18. package/node_modules/@zuplo/core/index.minified.js +250 -250
  19. package/node_modules/@zuplo/core/package.json +1 -1
  20. package/node_modules/@zuplo/graphql/package.json +1 -1
  21. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  22. package/node_modules/@zuplo/otel/package.json +1 -1
  23. package/node_modules/@zuplo/runtime/out/esm/{chunk-2MF7LQVX.js → chunk-OAVAM6CR.js} +97 -97
  24. package/node_modules/@zuplo/runtime/out/esm/chunk-OAVAM6CR.js.map +1 -0
  25. package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
  26. package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
  27. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
  28. package/node_modules/@zuplo/runtime/out/types/index.d.ts +164 -125
  29. package/node_modules/@zuplo/runtime/package.json +1 -1
  30. package/node_modules/hono/dist/cjs/helper/streaming/sse.js +1 -1
  31. package/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +10 -4
  32. package/node_modules/hono/dist/cjs/request.js +1 -1
  33. package/node_modules/hono/dist/cjs/utils/accept.js +1 -1
  34. package/node_modules/hono/dist/cjs/utils/url.js +1 -1
  35. package/node_modules/hono/dist/helper/streaming/sse.js +1 -1
  36. package/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +10 -4
  37. package/node_modules/hono/dist/request.js +1 -1
  38. package/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts +9 -0
  39. package/node_modules/hono/dist/utils/accept.js +1 -1
  40. package/node_modules/hono/dist/utils/url.js +1 -1
  41. package/node_modules/hono/package.json +1 -1
  42. package/package.json +6 -6
  43. package/node_modules/@zuplo/runtime/out/esm/chunk-2MF7LQVX.js.map +0 -1
  44. /package/node_modules/@zuplo/runtime/out/esm/{chunk-2MF7LQVX.js.LEGAL.txt → chunk-OAVAM6CR.js.LEGAL.txt} +0 -0
@@ -274,6 +274,53 @@ export declare class AIGatewayConfigurationExecutorV2InboundPolicy extends Inbou
274
274
  */
275
275
  export declare interface AIGatewayConfigurationExecutorV2InboundPolicyOptions {}
276
276
 
277
+ /**
278
+ * Adds failure and quota fallbacks to an existing AI Gateway model selection.
279
+ *
280
+ * Place this policy after AI Gateway Model Filtering (v2). It never creates a
281
+ * model selection, so a misplaced policy cannot bypass filtering.
282
+ *
283
+ * @title AI Gateway Fallback Model (v2)
284
+ * @beta
285
+ * @product ai-gateway
286
+ * @requiresAI
287
+ * @param request - The ZuploRequest
288
+ * @param context - The ZuploContext
289
+ * @param options - The policy options set in policies.json
290
+ * @param policyName - The name of the policy as set in policies.json
291
+ * @returns The unchanged request after enriching an existing model selection
292
+ * @example
293
+ * ```json
294
+ * {
295
+ * "models": {
296
+ * "completions": {
297
+ * "fallback": "anthropic/claude-haiku-4-5",
298
+ * "quotaFallback": "openai/gpt-4o-mini"
299
+ * }
300
+ * },
301
+ * "fallbackTimeoutSeconds": 60
302
+ * }
303
+ * ```
304
+ */
305
+ export declare class AIGatewayFallbackModelV2InboundPolicy extends InboundPolicy<AIGatewayFallbackModelV2InboundPolicyOptions> {
306
+ #private;
307
+ static readonly policyType = "ai-gateway-fallback-model-v2";
308
+ constructor(
309
+ options: AIGatewayFallbackModelV2InboundPolicyOptions,
310
+ policyName: string
311
+ );
312
+ handler(request: ZuploRequest, context: ZuploContext): Promise<ZuploRequest>;
313
+ }
314
+
315
+ /**
316
+ * Options for adding failure and quota fallbacks to an existing AI Gateway model selection.
317
+ * @public
318
+ */
319
+ export declare interface AIGatewayFallbackModelV2InboundPolicyOptions {
320
+ models: FallbackModels;
321
+ fallbackTimeoutSeconds?: FallbackTimeoutSeconds;
322
+ }
323
+
277
324
  /**
278
325
  * Handler that routes AI/LLM requests through Zuplo's LLM Translation Layer.
279
326
  * This handler forwards requests to the translation layer that handles provider-specific
@@ -302,7 +349,7 @@ export declare function aiGatewayHandler(
302
349
 
303
350
  /**
304
351
  * Routes AI requests using the model selection stored in the request context.
305
- * Attach the `ai-gateway-model-routing-v2-inbound` policy before this handler
352
+ * Attach the `ai-gateway-model-filtering-v2-inbound` policy before this handler
306
353
  * runs, or call `AIGatewayModelRouting.set(context, routing)` from a custom
307
354
  * inbound policy.
308
355
  *
@@ -320,7 +367,7 @@ export declare function aiGatewayHandler(
320
367
  * "module": "$import(@zuplo/runtime)"
321
368
  * },
322
369
  * "policies": {
323
- * "inbound": ["ai-gateway-model-routing-v2-inbound"]
370
+ * "inbound": ["ai-gateway-model-filtering-v2-inbound"]
324
371
  * }
325
372
  * }
326
373
  * ```
@@ -389,12 +436,11 @@ export declare class AIGatewayMeteringInboundPolicy extends InboundPolicy<AIGate
389
436
  private requestCapability;
390
437
  /**
391
438
  * Validate and return the configured quota fallback when it applies to *this*
392
- * request's capability, or `undefined` otherwise (no config, malformed config,
393
- * an unsupported path, or no model configured for the request's capability).
394
- * Returning `undefined` blocks the request with a 429 — so a fallback is only
395
- * counted and applied when the handler can actually serve the request with it.
396
- * The config is customer-authored and reaches us through an `unknown` cast, so
397
- * we validate it through Zod before acting on it.
439
+ * request's capability, or `undefined` otherwise. A resolved selection is
440
+ * already validated and returns a presence-only marker; legacy configuration
441
+ * is customer-authored and validated through Zod before use. Returning
442
+ * `undefined` blocks the request with a 429, so a fallback is counted only
443
+ * when the handler can serve the request with it.
398
444
  */
399
445
  private resolveQuotaFallback;
400
446
  private checkHierarchicalQuotaLimits;
@@ -428,6 +474,54 @@ export declare interface AIGatewayMeteringInboundPolicyOptions {
428
474
  throwOnFailure?: boolean;
429
475
  }
430
476
 
477
+ /**
478
+ * Matches AI Gateway requests against curated allow lists or open block lists,
479
+ * then stores the winning model reference for the route handler.
480
+ *
481
+ * @title AI Gateway Model Filtering (v2)
482
+ * @beta
483
+ * @product ai-gateway
484
+ * @requiresAI
485
+ * @param request - The ZuploRequest
486
+ * @param context - The ZuploContext
487
+ * @param options - The policy options set in policies.json
488
+ * @param policyName - The name of the policy as set in policies.json
489
+ * @returns The request with model routing stored in context, or a 4xx response
490
+ * @example
491
+ * ```json
492
+ * {
493
+ * "models": {
494
+ * "completions": {
495
+ * "allowList": [
496
+ * "openai/gpt-5",
497
+ * "anthropic/claude-sonnet-4-6"
498
+ * ]
499
+ * }
500
+ * }
501
+ * }
502
+ * ```
503
+ */
504
+ export declare class AIGatewayModelFilteringV2InboundPolicy extends InboundPolicy<AIGatewayModelFilteringV2InboundPolicyOptions> {
505
+ #private;
506
+ static readonly policyType = "ai-gateway-model-filtering-v2";
507
+ constructor(
508
+ options: AIGatewayModelFilteringV2InboundPolicyOptions,
509
+ policyName: string
510
+ );
511
+ handler(
512
+ request: ZuploRequest,
513
+ context: ZuploContext
514
+ ): Promise<ZuploRequest | Response>;
515
+ }
516
+
517
+ /**
518
+ * Options for allowing or blocking providerName/model references for each AI Gateway capability.
519
+ * @public
520
+ */
521
+ export declare interface AIGatewayModelFilteringV2InboundPolicyOptions {
522
+ models: Models;
523
+ }
524
+
431
525
  /**
432
526
  * Catalog information about an AI Gateway model.
433
527
  *
@@ -483,57 +577,6 @@ export declare const AIGatewayModelRouting: {
483
577
  get(context: ZuploContext): AIGatewayRouting | undefined;
484
578
  };
485
579
 
486
- /**
487
- * Matches AI Gateway requests against curated allow lists or open block lists,
488
- * then stores the winning {@link AIGatewayRouteTarget} for the route handler.
489
- *
490
- * @title AI Gateway Model Routing (v2)
491
- * @beta
492
- * @product ai-gateway
493
- * @requiresAI
494
- * @param request - The ZuploRequest
495
- * @param context - The ZuploContext
496
- * @param options - The policy options set in policies.json
497
- * @param policyName - The name of the policy as set in policies.json
498
- * @returns The request with model routing stored in context, or a 4xx response
499
- * @example
500
- * ```json
501
- * {
502
- * "models": {
503
- * "completions": {
504
- * "allowList": [
505
- * "openai/gpt-5",
506
- * {
507
- * "main": "anthropic/claude-sonnet-4-6",
508
- * "backup": "openai/gpt-5-mini"
509
- * }
510
- * ]
511
- * }
512
- * }
513
- * }
514
- * ```
515
- */
516
- export declare class AIGatewayModelRoutingV2InboundPolicy extends InboundPolicy<AIGatewayModelRoutingV2InboundPolicyOptions> {
517
- #private;
518
- static readonly policyType = "ai-gateway-model-routing-v2";
519
- constructor(
520
- options: AIGatewayModelRoutingV2InboundPolicyOptions,
521
- policyName: string
522
- );
523
- handler(
524
- request: ZuploRequest,
525
- context: ZuploContext
526
- ): Promise<ZuploRequest | Response>;
527
- }
528
-
529
- /**
530
- * Options for allowing or blocking providerName/model routes for each AI Gateway capability.
531
- * @public
532
- */
533
- export declare interface AIGatewayModelRoutingV2InboundPolicyOptions {
534
- models: Models;
535
- }
536
-
537
580
  /**
538
581
  * Accesses the live AI Gateway provider and model catalog.
539
582
  *
@@ -1177,12 +1220,18 @@ export declare interface AkamaiFirewallForAiOutboundPolicyOptions {
1177
1220
  }
1178
1221
 
1179
1222
  /**
1180
- * Curated targets clients may select; the first entry is the default when model is omitted.
1223
+ * Models clients may select; the first entry is the default when model is omitted.
1181
1224
  *
1182
1225
  * @minItems 1
1183
1226
  * @public
1184
1227
  */
1185
- declare type AllowedModels = [RouteTarget, ...RouteTarget[]];
1228
+ declare type AllowedModels = [ProviderAndModel, ...ProviderAndModel[]];
1229
+
1230
+ /**
1231
+ * @minItems 1
1232
+ * @public
1233
+ */
1234
+ declare type AllowedModels1 = [ProviderAndModel, ...ProviderAndModel[]];
1186
1235
 
1187
1236
  /**
1188
1237
  * Amberflo is a usage metering and billing service. This policy allows
@@ -2689,13 +2738,19 @@ declare interface BatchDispatcherOptions {
2689
2738
  /* Excluded from this release type: BatchDispatchOptions */
2690
2739
 
2691
2740
  /**
2692
- * Configured providerName/model targets rejected in open-but-filtered mode.
2741
+ * Models rejected in open-but-filtered mode.
2693
2742
  *
2694
2743
  * @minItems 1
2695
2744
  * @public
2696
2745
  */
2697
2746
  declare type BlockedModels = [ProviderAndModel, ...ProviderAndModel[]];
2698
2747
 
2748
+ /**
2749
+ * @minItems 1
2750
+ * @public
2751
+ */
2752
+ declare type BlockedModels1 = [ProviderAndModel, ...ProviderAndModel[]];
2753
+
2699
2754
  /**
2700
2755
  * The brownout policy allows performing scheduled downtime on your API
2701
2756
  *
@@ -2866,14 +2921,6 @@ export declare interface CachingInboundPolicyOptions {
2866
2921
  dangerouslyIgnoreAuthorizationHeader?: boolean;
2867
2922
  }
2868
2923
 
2869
- /**
2870
- * Choose curated allow-list mode or open-but-filtered block-list mode.
2871
- * @public
2872
- */
2873
- declare type CapabilityModelRules =
2874
- | CuratedModelRules
2875
- | OpenButFilteredModelRules;
2876
-
2877
2924
  /**
2878
2925
  * Controls which parts of the incoming request are sent to Akamai for inspection. Akamai's detect endpoint receives the captured fields concatenated into a single labeled text payload as `llmInput`.
2879
2926
  * @public
@@ -3432,11 +3479,22 @@ declare interface CompatibilityFlags {
3432
3479
  return501ForUnsupportedHttpMethods: boolean;
3433
3480
  }
3434
3481
 
3482
+ declare interface CompletionsFallbacks {
3483
+ fallback?: FallbackModel;
3484
+ quotaFallback?: QuotaFallbackModel;
3485
+ }
3486
+
3435
3487
  /**
3436
3488
  * Rules for chat completions, Responses, and Anthropic Messages requests.
3437
3489
  * @public
3438
3490
  */
3439
- declare type CompletionsModels = CapabilityModelRules;
3491
+ declare type CompletionsModels =
3492
+ | {
3493
+ allowList: AllowedModels;
3494
+ }
3495
+ | {
3496
+ blockList: BlockedModels;
3497
+ };
3440
3498
 
3441
3499
  /**
3442
3500
  * @public
@@ -3861,14 +3919,6 @@ export declare class CryptoBeta extends BaseCryptoBeta {
3861
3919
  digest(algorithm: string, data: string): Promise<string>;
3862
3920
  }
3863
3921
 
3864
- /**
3865
- * Allow only listed targets and use entry zero as the default.
3866
- * @public
3867
- */
3868
- declare interface CuratedModelRules {
3869
- allowList: AllowedModels;
3870
- }
3871
-
3872
3922
  /**
3873
3923
  * Authenticate users using the Curity Phantom Token Pattern.
3874
3924
  *
@@ -4381,11 +4431,22 @@ export declare class DynatraceMetricsPlugin extends MetricsPlugin {
4381
4431
  static setContext(context: ZuploContext, data: DynatraceMetricsContext): void;
4382
4432
  }
4383
4433
 
4434
+ declare interface EmbeddingsFallbacks {
4435
+ fallback?: FallbackModel;
4436
+ quotaFallback?: QuotaFallbackModel;
4437
+ }
4438
+
4384
4439
  /**
4385
4440
  * Rules for embedding requests.
4386
4441
  * @public
4387
4442
  */
4388
- declare type EmbeddingsModels = CapabilityModelRules;
4443
+ declare type EmbeddingsModels =
4444
+ | {
4445
+ allowList: AllowedModels1;
4446
+ }
4447
+ | {
4448
+ blockList: BlockedModels1;
4449
+ };
4389
4450
 
4390
4451
  /**
4391
4452
  * Enable accumulation and validation of streaming responses.
@@ -4514,7 +4575,22 @@ export declare function extractStreamTextDelta(
4514
4575
  ): string | undefined;
4515
4576
 
4516
4577
  /**
4517
- * How long the main model may take before the backup is attempted.
4578
+ * The model attempted after a retryable error or timeout.
4579
+ * @public
4580
+ */
4581
+ declare type FallbackModel = string;
4582
+
4583
+ /**
4584
+ * Fallbacks grouped by AI Gateway capability.
4585
+ * @public
4586
+ */
4587
+ declare interface FallbackModels {
4588
+ completions?: CompletionsFallbacks;
4589
+ embeddings?: EmbeddingsFallbacks;
4590
+ }
4591
+
4592
+ /**
4593
+ * How long a primary model may take before the failure fallback is attempted.
4518
4594
  * @public
4519
4595
  */
4520
4596
  declare type FallbackTimeoutSeconds = number;
@@ -10069,18 +10145,7 @@ declare interface ModelConfiguration {
10069
10145
  }
10070
10146
 
10071
10147
  /**
10072
- * A primary model and optional failure or quota fallbacks.
10073
- * @public
10074
- */
10075
- declare interface ModelRouteTarget {
10076
- main: ProviderAndModel1;
10077
- backup?: ProviderAndModel2;
10078
- fallbackTimeoutSeconds?: FallbackTimeoutSeconds;
10079
- quotaFallback?: ProviderAndModel3;
10080
- }
10081
-
10082
- /**
10083
- * Declarative model-routing rules, grouped by AI Gateway capability.
10148
+ * Model filtering rules grouped by AI Gateway capability.
10084
10149
  * @public
10085
10150
  */
10086
10151
  declare interface Models {
@@ -11236,14 +11301,6 @@ declare namespace OpenAPIV3_1 {
11236
11301
  }
11237
11302
  }
11238
11303
 
11239
- /**
11240
- * Allow any requested target except those explicitly blocked.
11241
- * @public
11242
- */
11243
- declare interface OpenButFilteredModelRules {
11244
- blockList: BlockedModels;
11245
- }
11246
-
11247
11304
  /**
11248
11305
  * Authorize requests using OpenFGA.
11249
11306
  *
@@ -11967,24 +12024,6 @@ export declare interface PropelAuthJwtInboundPolicyOptions {
11967
12024
  */
11968
12025
  declare type ProviderAndModel = string;
11969
12026
 
11970
- /**
11971
- * A model reference in providerName/model form, split on the first slash.
11972
- * @public
11973
- */
11974
- declare type ProviderAndModel1 = string;
11975
-
11976
- /**
11977
- * A model reference in providerName/model form, split on the first slash.
11978
- * @public
11979
- */
11980
- declare type ProviderAndModel2 = string;
11981
-
11982
- /**
11983
- * A model reference in providerName/model form, split on the first slash.
11984
- * @public
11985
- */
11986
- declare type ProviderAndModel3 = string;
11987
-
11988
12027
  /**
11989
12028
  * Extracts a query parameter and sets it as a header in the request.
11990
12029
  *
@@ -12029,6 +12068,12 @@ export declare interface QuotaDetail {
12029
12068
  };
12030
12069
  }
12031
12070
 
12071
+ /**
12072
+ * The model selected after a usage-limit-exceeded signal.
12073
+ * @public
12074
+ */
12075
+ declare type QuotaFallbackModel = string;
12076
+
12032
12077
  /**
12033
12078
  * Global quota fallback models, keyed by capability. Applied whenever any
12034
12079
  * configured quota limit (any meter/period) is exceeded.
@@ -13802,12 +13847,6 @@ export declare interface RouteHandler<T = unknown> {
13802
13847
 
13803
13848
  /* Excluded from this release type: Router */
13804
13849
 
13805
- /**
13806
- * A providerName/model string shorthand or a full model route target.
13807
- * @public
13808
- */
13809
- declare type RouteTarget = ProviderAndModel | ModelRouteTarget;
13810
-
13811
13850
  /**
13812
13851
  * The authorization rule evaluated against the authenticated user's claims (request.user.data, populated by the authentication policy that runs before this one — a JWT policy, API key auth, mTLS, etc.). A rule is either a single claim check (eq, in, or startsWith) or an and/or combination of nested rules. Combinators may nest up to three levels deep. Requests that fail the rule receive a 403 Forbidden response.
13813
13852
  * @public
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "6.73.14",
4
+ "version": "6.73.15",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {
@@ -42,7 +42,7 @@ class SSEStreamingApi extends import_stream.StreamingApi {
42
42
  const sseData = [
43
43
  message.event && `event: ${message.event}`,
44
44
  dataLines,
45
- message.id && `id: ${message.id}`,
45
+ message.id !== void 0 && `id: ${message.id}`,
46
46
  message.retry !== void 0 && `retry: ${message.retry}`
47
47
  ].filter(Boolean).join("\n") + "\n\n";
48
48
  await this.write(sseData);
@@ -71,14 +71,20 @@ const secureHeaders = (customOptions) => {
71
71
  const headersToSet = getFilteredHeaders(options);
72
72
  const callbacks = [];
73
73
  if (options.contentSecurityPolicy) {
74
- const [callback, value] = getCSPDirectives(options.contentSecurityPolicy);
74
+ const [callback, value] = getCSPDirectives(
75
+ options.contentSecurityPolicy,
76
+ "Content-Security-Policy"
77
+ );
75
78
  if (callback) {
76
79
  callbacks.push(callback);
77
80
  }
78
81
  headersToSet.push(["Content-Security-Policy", value]);
79
82
  }
80
83
  if (options.contentSecurityPolicyReportOnly) {
81
- const [callback, value] = getCSPDirectives(options.contentSecurityPolicyReportOnly);
84
+ const [callback, value] = getCSPDirectives(
85
+ options.contentSecurityPolicyReportOnly,
86
+ "Content-Security-Policy-Report-Only"
87
+ );
82
88
  if (callback) {
83
89
  callbacks.push(callback);
84
90
  }
@@ -111,7 +117,7 @@ function getFilteredHeaders(options) {
111
117
  return typeof overrideValue === "string" ? [defaultValue[0], overrideValue] : defaultValue;
112
118
  });
113
119
  }
114
- function getCSPDirectives(contentSecurityPolicy) {
120
+ function getCSPDirectives(contentSecurityPolicy, headerName) {
115
121
  const callbacks = [];
116
122
  const resultValues = [];
117
123
  for (const [directive, value] of Object.entries(contentSecurityPolicy)) {
@@ -136,7 +142,7 @@ function getCSPDirectives(contentSecurityPolicy) {
136
142
  resultValues.pop();
137
143
  return callbacks.length === 0 ? [void 0, resultValues.join("")] : [
138
144
  (ctx, headersToSet) => headersToSet.map((values) => {
139
- if (values[0] === "Content-Security-Policy" || values[0] === "Content-Security-Policy-Report-Only") {
145
+ if (values[0] === headerName) {
140
146
  const clone = values[1].slice();
141
147
  callbacks.forEach((cb) => {
142
148
  cb(ctx, clone);
@@ -98,7 +98,7 @@ class HonoRequest {
98
98
  if (name) {
99
99
  return this.raw.headers.get(name) ?? void 0;
100
100
  }
101
- const headerData = {};
101
+ const headerData = /* @__PURE__ */ Object.create(null);
102
102
  this.raw.headers.forEach((value, key) => {
103
103
  headerData[key] = value;
104
104
  });
@@ -146,7 +146,7 @@ const getNextParam = (acceptHeader, startIndex) => {
146
146
  const getNextAcceptValue = (acceptHeader, startIndex) => {
147
147
  const accept = {
148
148
  type: "",
149
- params: {},
149
+ params: /* @__PURE__ */ Object.create(null),
150
150
  q: 1
151
151
  };
152
152
  startIndex = consumeWhitespace(acceptHeader, startIndex);
@@ -192,7 +192,7 @@ const _getQueryParam = (url, key, multiple) => {
192
192
  return void 0;
193
193
  }
194
194
  }
195
- const results = {};
195
+ const results = /* @__PURE__ */ Object.create(null);
196
196
  encoded ??= /[%+]/.test(url);
197
197
  let keyIndex = url.indexOf("?", 8);
198
198
  while (keyIndex !== -1) {
@@ -20,7 +20,7 @@ var SSEStreamingApi = class extends StreamingApi {
20
20
  const sseData = [
21
21
  message.event && `event: ${message.event}`,
22
22
  dataLines,
23
- message.id && `id: ${message.id}`,
23
+ message.id !== void 0 && `id: ${message.id}`,
24
24
  message.retry !== void 0 && `retry: ${message.retry}`
25
25
  ].filter(Boolean).join("\n") + "\n\n";
26
26
  await this.write(sseData);
@@ -49,14 +49,20 @@ var secureHeaders = (customOptions) => {
49
49
  const headersToSet = getFilteredHeaders(options);
50
50
  const callbacks = [];
51
51
  if (options.contentSecurityPolicy) {
52
- const [callback, value] = getCSPDirectives(options.contentSecurityPolicy);
52
+ const [callback, value] = getCSPDirectives(
53
+ options.contentSecurityPolicy,
54
+ "Content-Security-Policy"
55
+ );
53
56
  if (callback) {
54
57
  callbacks.push(callback);
55
58
  }
56
59
  headersToSet.push(["Content-Security-Policy", value]);
57
60
  }
58
61
  if (options.contentSecurityPolicyReportOnly) {
59
- const [callback, value] = getCSPDirectives(options.contentSecurityPolicyReportOnly);
62
+ const [callback, value] = getCSPDirectives(
63
+ options.contentSecurityPolicyReportOnly,
64
+ "Content-Security-Policy-Report-Only"
65
+ );
60
66
  if (callback) {
61
67
  callbacks.push(callback);
62
68
  }
@@ -89,7 +95,7 @@ function getFilteredHeaders(options) {
89
95
  return typeof overrideValue === "string" ? [defaultValue[0], overrideValue] : defaultValue;
90
96
  });
91
97
  }
92
- function getCSPDirectives(contentSecurityPolicy) {
98
+ function getCSPDirectives(contentSecurityPolicy, headerName) {
93
99
  const callbacks = [];
94
100
  const resultValues = [];
95
101
  for (const [directive, value] of Object.entries(contentSecurityPolicy)) {
@@ -114,7 +120,7 @@ function getCSPDirectives(contentSecurityPolicy) {
114
120
  resultValues.pop();
115
121
  return callbacks.length === 0 ? [void 0, resultValues.join("")] : [
116
122
  (ctx, headersToSet) => headersToSet.map((values) => {
117
- if (values[0] === "Content-Security-Policy" || values[0] === "Content-Security-Policy-Report-Only") {
123
+ if (values[0] === headerName) {
118
124
  const clone = values[1].slice();
119
125
  callbacks.forEach((cb) => {
120
126
  cb(ctx, clone);
@@ -76,7 +76,7 @@ var HonoRequest = class {
76
76
  if (name) {
77
77
  return this.raw.headers.get(name) ?? void 0;
78
78
  }
79
- const headerData = {};
79
+ const headerData = /* @__PURE__ */ Object.create(null);
80
80
  this.raw.headers.forEach((value, key) => {
81
81
  headerData[key] = value;
82
82
  });
@@ -96,6 +96,15 @@ interface Authorizer {
96
96
  userArn: string;
97
97
  userId: string;
98
98
  };
99
+ jwt?: {
100
+ claims: Record<string, string | number | boolean | string[]>;
101
+ scopes: string[] | null;
102
+ };
103
+ /**
104
+ * The `context` object returned by a Lambda (REQUEST) authorizer.
105
+ * It is `null` when the authorizer returns no context.
106
+ */
107
+ lambda?: Record<string, unknown> | null;
99
108
  }
100
109
  export interface ApiGatewayRequestContextV2 {
101
110
  accountId: string;
@@ -125,7 +125,7 @@ var getNextParam = (acceptHeader, startIndex) => {
125
125
  var getNextAcceptValue = (acceptHeader, startIndex) => {
126
126
  const accept = {
127
127
  type: "",
128
- params: {},
128
+ params: /* @__PURE__ */ Object.create(null),
129
129
  q: 1
130
130
  };
131
131
  startIndex = consumeWhitespace(acceptHeader, startIndex);
@@ -159,7 +159,7 @@ var _getQueryParam = (url, key, multiple) => {
159
159
  return void 0;
160
160
  }
161
161
  }
162
- const results = {};
162
+ const results = /* @__PURE__ */ Object.create(null);
163
163
  encoded ??= /[%+]/.test(url);
164
164
  let keyIndex = url.indexOf("?", 8);
165
165
  while (keyIndex !== -1) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hono",
3
- "version": "4.12.31",
3
+ "version": "4.12.32",
4
4
  "description": "Web framework built on Web Standards",
5
5
  "main": "dist/cjs/index.js",
6
6
  "type": "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/cli",
3
- "version": "6.73.14",
3
+ "version": "6.73.15",
4
4
  "repository": "https://github.com/zuplo/zuplo",
5
5
  "author": "Zuplo, Inc.",
6
6
  "type": "module",
@@ -27,10 +27,10 @@
27
27
  "@opentelemetry/api": "1.9.0",
28
28
  "@opentelemetry/api-logs": "0.201.1",
29
29
  "@swc/core": "1.10.18",
30
- "@zuplo/core": "6.73.14",
30
+ "@zuplo/core": "6.73.15",
31
31
  "@zuplo/editor": "1.0.29844086763",
32
- "@zuplo/openapi-tools": "6.73.14",
33
- "@zuplo/runtime": "6.73.14",
32
+ "@zuplo/openapi-tools": "6.73.15",
33
+ "@zuplo/runtime": "6.73.15",
34
34
  "chalk": "5.4.1",
35
35
  "chokidar": "3.5.3",
36
36
  "cookie": "1.0.2",
@@ -61,8 +61,8 @@
61
61
  "workerd": "1.20241230.0",
62
62
  "yargs": "17.7.2",
63
63
  "zod": "3.25.76",
64
- "@zuplo/graphql": "6.73.14",
65
- "@zuplo/otel": "6.73.14"
64
+ "@zuplo/graphql": "6.73.15",
65
+ "@zuplo/otel": "6.73.15"
66
66
  },
67
67
  "bundleDependencies": [
68
68
  "@inquirer/prompts",