@psnext/slingcli 3.0.20260814-1 → 3.0.20260820-2

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 (157) hide show
  1. package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-endpoints/lib/aws/partitions.d.ts +54 -54
  2. package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-user-agent-browser/defaultUserAgent.d.ts +1 -1
  3. package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-user-agent-browser/defaultUserAgent.native.d.ts +1 -1
  4. package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-user-agent-node/defaultUserAgent.d.ts +1 -1
  5. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/partitions.d.ts +54 -54
  6. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.d.ts +1 -4
  7. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.native.d.ts +1 -4
  8. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/defaultUserAgent.d.ts +1 -4
  9. package/node_modules/@aws-sdk/core/package.json +4 -4
  10. package/node_modules/@aws-sdk/credential-provider-env/package.json +4 -4
  11. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +1 -1
  12. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +1 -1
  13. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +5 -9
  14. package/node_modules/@aws-sdk/credential-provider-http/package.json +4 -4
  15. package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
  16. package/node_modules/@aws-sdk/credential-provider-login/package.json +5 -5
  17. package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
  18. package/node_modules/@aws-sdk/credential-provider-process/package.json +4 -4
  19. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +5 -5
  20. package/node_modules/@aws-sdk/credential-provider-sso/package.json +6 -6
  21. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +5 -5
  22. package/node_modules/@aws-sdk/eventstream-handler-node/package.json +3 -3
  23. package/node_modules/@aws-sdk/middleware-eventstream/package.json +3 -3
  24. package/node_modules/@aws-sdk/middleware-websocket/package.json +4 -4
  25. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  26. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  27. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  28. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  29. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  30. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.browser.d.ts +42 -42
  31. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +42 -42
  32. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.native.d.ts +41 -41
  33. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.shared.d.ts +2 -2
  34. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.browser.d.ts +43 -43
  35. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.d.ts +43 -43
  36. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.native.d.ts +42 -42
  37. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.shared.d.ts +2 -2
  38. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.browser.d.ts +42 -42
  39. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.d.ts +42 -42
  40. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.native.d.ts +41 -41
  41. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.shared.d.ts +2 -2
  42. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.browser.d.ts +42 -42
  43. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +42 -42
  44. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.native.d.ts +41 -41
  45. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.shared.d.ts +2 -2
  46. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.browser.d.ts +44 -44
  47. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +35 -35
  48. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.native.d.ts +43 -43
  49. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.shared.d.ts +2 -2
  50. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.browser.d.ts +64 -66
  51. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +65 -65
  52. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.native.d.ts +68 -70
  53. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.shared.d.ts +3 -3
  54. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.browser.d.ts +67 -69
  55. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +66 -66
  56. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.native.d.ts +71 -73
  57. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.shared.d.ts +3 -3
  58. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.browser.d.ts +64 -66
  59. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +65 -65
  60. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.native.d.ts +68 -70
  61. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.shared.d.ts +3 -3
  62. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.browser.d.ts +64 -66
  63. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +65 -65
  64. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.native.d.ts +68 -70
  65. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.shared.d.ts +3 -3
  66. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.browser.d.ts +68 -70
  67. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +68 -68
  68. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.native.d.ts +72 -74
  69. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.shared.d.ts +3 -3
  70. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +1 -1
  71. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +1 -1
  72. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +5 -9
  73. package/node_modules/@aws-sdk/nested-clients/package.json +5 -5
  74. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +3 -3
  75. package/node_modules/@aws-sdk/types/package.json +2 -2
  76. package/node_modules/@aws-sdk/util-locate-window/package.json +2 -2
  77. package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
  78. package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  79. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +1 -2
  80. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +23 -23
  81. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +23 -23
  82. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +9 -8
  83. package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +1 -2
  84. package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +4 -4
  85. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +19 -19
  86. package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +3 -4
  87. package/node_modules/@smithy/core/dist-es/submodules/protocols/middleware-content-length/contentLengthMiddleware.js +6 -4
  88. package/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.d.ts +1 -7
  89. package/node_modules/@smithy/core/dist-types/submodules/config/config-resolver/regionConfig/checkRegion.d.ts +2 -1
  90. package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/evaluateCondition.d.ts +1 -1
  91. package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/evaluateConditions.d.ts +1 -1
  92. package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/evaluateExpression.d.ts +2 -2
  93. package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/evaluateRules.d.ts +2 -2
  94. package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/getEndpointProperties.d.ts +2 -2
  95. package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/getReferenceValue.d.ts +2 -2
  96. package/node_modules/@smithy/core/dist-types/submodules/event-streams/EventStreamSerde.d.ts +14 -2
  97. package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/retries-2026-config.d.ts +2 -2
  98. package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
  99. package/node_modules/@smithy/core/dist-types/submodules/serde/parse-utils.d.ts +5 -5
  100. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.d.ts +1 -7
  101. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/config/config-resolver/regionConfig/checkRegion.d.ts +2 -1
  102. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/evaluateCondition.d.ts +1 -1
  103. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/evaluateConditions.d.ts +1 -1
  104. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/evaluateExpression.d.ts +2 -2
  105. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/evaluateRules.d.ts +2 -2
  106. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/getEndpointProperties.d.ts +2 -2
  107. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/getReferenceValue.d.ts +2 -2
  108. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/event-streams/EventStreamSerde.d.ts +14 -2
  109. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/util-retry/retries-2026-config.d.ts +2 -2
  110. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/TypeRegistry.d.ts +1 -1
  111. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/parse-utils.d.ts +5 -5
  112. package/node_modules/@smithy/core/package.json +3 -7
  113. package/node_modules/@smithy/credential-provider-imds/package.json +4 -12
  114. package/node_modules/@smithy/fetch-http-handler/package.json +5 -13
  115. package/node_modules/@smithy/signature-v4/dist-cjs/index.js +9 -9
  116. package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +9 -9
  117. package/node_modules/@smithy/signature-v4/package.json +4 -12
  118. package/node_modules/@smithy/types/package.json +2 -10
  119. package/node_modules/hono/dist/cjs/client/utils.js +1 -1
  120. package/node_modules/hono/dist/cjs/context.js +4 -0
  121. package/node_modules/hono/dist/cjs/middleware/cors/index.js +1 -1
  122. package/node_modules/hono/dist/cjs/middleware/csrf/index.js +1 -1
  123. package/node_modules/hono/dist/cjs/middleware/etag/digest.js +1 -1
  124. package/node_modules/hono/dist/cjs/middleware/etag/index.js +2 -2
  125. package/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +3 -1
  126. package/node_modules/hono/dist/cjs/router/linear-router/router.js +7 -2
  127. package/node_modules/hono/dist/cjs/router/pattern-router/router.js +3 -9
  128. package/node_modules/hono/dist/cjs/router/trie-router/node.js +43 -67
  129. package/node_modules/hono/dist/cjs/router/trie-router/router.js +3 -11
  130. package/node_modules/hono/dist/cjs/utils/ipaddr.js +5 -3
  131. package/node_modules/hono/dist/client/utils.js +1 -1
  132. package/node_modules/hono/dist/context.js +4 -0
  133. package/node_modules/hono/dist/middleware/cors/index.js +1 -1
  134. package/node_modules/hono/dist/middleware/csrf/index.js +1 -1
  135. package/node_modules/hono/dist/middleware/etag/digest.js +1 -1
  136. package/node_modules/hono/dist/middleware/etag/index.js +2 -2
  137. package/node_modules/hono/dist/middleware/pretty-json/index.js +3 -1
  138. package/node_modules/hono/dist/router/linear-router/router.js +7 -2
  139. package/node_modules/hono/dist/router/pattern-router/router.js +3 -9
  140. package/node_modules/hono/dist/router/trie-router/node.js +43 -67
  141. package/node_modules/hono/dist/router/trie-router/router.js +3 -11
  142. package/node_modules/hono/dist/types/context.d.ts +4 -0
  143. package/node_modules/hono/dist/types/router/trie-router/node.d.ts +1 -2
  144. package/node_modules/hono/dist/types/router/trie-router/router.d.ts +0 -1
  145. package/node_modules/hono/dist/utils/ipaddr.js +5 -3
  146. package/node_modules/hono/package.json +1 -1
  147. package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +4 -3
  148. package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +4 -3
  149. package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +4 -3
  150. package/node_modules/jose/dist/types/jwt/encrypt.d.ts +4 -3
  151. package/node_modules/jose/dist/types/types.d.ts +4 -2
  152. package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +7 -3
  153. package/node_modules/jose/dist/webapi/jwks/remote.js +1 -1
  154. package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +6 -2
  155. package/node_modules/jose/package.json +1 -1
  156. package/package.json +2 -2
  157. package/slingshot/index.js +294 -281
@@ -6,6 +6,6 @@ export declare const evaluateCondition: (condition: ConditionObject, options: Ev
6
6
  value: import("../types").FunctionReturn;
7
7
  };
8
8
  } | {
9
- result: boolean;
10
9
  toAssign?: undefined;
10
+ result: boolean;
11
11
  };
@@ -3,6 +3,6 @@ export declare const evaluateConditions: (conditions: ConditionObject[] | undefi
3
3
  result: boolean;
4
4
  referenceRecord: Record<string, FunctionReturn>;
5
5
  } | {
6
- result: boolean;
7
6
  referenceRecord?: undefined;
7
+ result: boolean;
8
8
  };
@@ -2,6 +2,6 @@ import { EvaluateOptions, Expression, FunctionObject, FunctionReturn } from "../
2
2
  export declare const evaluateExpression: (obj: Expression, keyName: string, options: EvaluateOptions) => FunctionReturn;
3
3
  export declare const callFunction: ({ fn, argv }: FunctionObject, options: EvaluateOptions) => FunctionReturn;
4
4
  export declare const group: {
5
- evaluateExpression: (obj: Expression, keyName: string, options: EvaluateOptions) => FunctionReturn;
6
- callFunction: ({ fn, argv }: FunctionObject, options: EvaluateOptions) => FunctionReturn;
5
+ evaluateExpression: typeof evaluateExpression;
6
+ callFunction: typeof callFunction;
7
7
  };
@@ -3,6 +3,6 @@ import { EvaluateOptions, RuleSetRules, TreeRuleObject } from "../types";
3
3
  export declare const evaluateRules: (rules: RuleSetRules, options: EvaluateOptions) => EndpointV2;
4
4
  export declare const evaluateTreeRule: (treeRule: TreeRuleObject, options: EvaluateOptions) => EndpointV2 | undefined;
5
5
  export declare const group: {
6
- evaluateRules: (rules: RuleSetRules, options: EvaluateOptions) => EndpointV2;
7
- evaluateTreeRule: (treeRule: TreeRuleObject, options: EvaluateOptions) => EndpointV2 | undefined;
6
+ evaluateRules: typeof evaluateRules;
7
+ evaluateTreeRule: typeof evaluateTreeRule;
8
8
  };
@@ -3,6 +3,6 @@ import { EndpointObjectProperties, EvaluateOptions } from "../types";
3
3
  export declare const getEndpointProperties: (properties: EndpointObjectProperties, options: EvaluateOptions) => Record<string, EndpointObjectProperty>;
4
4
  export declare const getEndpointProperty: (property: EndpointObjectProperty, options: EvaluateOptions) => EndpointObjectProperty;
5
5
  export declare const group: {
6
- getEndpointProperty: (property: EndpointObjectProperty, options: EvaluateOptions) => EndpointObjectProperty;
7
- getEndpointProperties: (properties: EndpointObjectProperties, options: EvaluateOptions) => Record<string, EndpointObjectProperty>;
6
+ getEndpointProperty: typeof getEndpointProperty;
7
+ getEndpointProperties: typeof getEndpointProperties;
8
8
  };
@@ -1,4 +1,4 @@
1
1
  import { EvaluateOptions, ReferenceObject } from "../types";
2
- export declare const getReferenceValue: ({ ref }: ReferenceObject, options: EvaluateOptions) => string | number | boolean | import("@smithy/types").EndpointPartition | import("@smithy/types").EndpointARN | import("@smithy/types").EndpointURL | {
2
+ export declare const getReferenceValue: ({ ref }: ReferenceObject, options: EvaluateOptions) => string | number | boolean | import("../types").FunctionReturn[] | import("@smithy/types").EndpointARN | import("@smithy/types").EndpointPartition | import("@smithy/types").EndpointURL | {
3
3
  [key: string]: import("../types").FunctionReturn;
4
- } | import("../types").FunctionReturn[];
4
+ };
@@ -31,10 +31,16 @@ export declare class EventStreamSerde {
31
31
  *
32
32
  * @returns a stream suitable for the HTTP body of a request.
33
33
  */
34
- serializeEventStream({ eventStream, requestSchema, initialRequest, }: {
34
+ serializeEventStream({ eventStream, requestSchema, initialRequest, initialMessageType, }: {
35
35
  eventStream: AsyncIterable<any>;
36
36
  requestSchema: NormalizedSchema;
37
37
  initialRequest?: any;
38
+ /**
39
+ * The :event-type header value for the initial message.
40
+ * Defaults to "initial-request" (client→server).
41
+ * Server→client should pass "initial-response".
42
+ */
43
+ initialMessageType?: string;
38
44
  }): Promise<IHttpRequest["body"] | Uint8Array>;
39
45
  /**
40
46
  * @param response - http response from which to read the event stream.
@@ -43,10 +49,16 @@ export declare class EventStreamSerde {
43
49
  *
44
50
  * @returns the asyncIterable of the event stream for the end-user.
45
51
  */
46
- deserializeEventStream({ response, responseSchema, initialResponseContainer, }: {
52
+ deserializeEventStream({ response, responseSchema, initialResponseContainer, initialMessageType, }: {
47
53
  response: IHttpResponse;
48
54
  responseSchema: NormalizedSchema;
49
55
  initialResponseContainer?: any;
56
+ /**
57
+ * The :event-type header value to match as the initial message.
58
+ * Defaults to "initial-response" (server→client).
59
+ * Server-side deserialization of client requests should pass "initial-request".
60
+ */
61
+ initialMessageType?: string;
50
62
  }): Promise<AsyncIterable<{
51
63
  [key: string]: any;
52
64
  $unknown?: unknown;
@@ -4,8 +4,8 @@
4
4
  export declare abstract class Retry {
5
5
  static v2026: boolean;
6
6
  static delay(): 50 | 100;
7
- static throttlingDelay(): 1000 | 500;
7
+ static throttlingDelay(): 500 | 1000;
8
8
  static cost(): 5 | 14;
9
9
  static throttlingCost(): 5 | 10;
10
- static modifiedCostType(): "TRANSIENT" | "THROTTLING";
10
+ static modifiedCostType(): "THROTTLING" | "TRANSIENT";
11
11
  }
@@ -62,7 +62,7 @@ export declare class TypeRegistry {
62
62
  * @param predicate - criterion.
63
63
  * @returns a schema in this registry matching the predicate.
64
64
  */
65
- find(predicate: (schema: ISchema) => boolean): number | "unit" | import("@smithy/types").StaticSimpleSchema | import("@smithy/types").StaticListSchema | import("@smithy/types").StaticMapSchema | import("@smithy/types").StaticStructureSchema | import("@smithy/types").StaticUnionSchema | StaticErrorSchema | import("@smithy/types").StaticOperationSchema | import("@smithy/types").NormalizedSchema | import("@smithy/types").TraitsSchema | import("@smithy/types").MemberSchema | undefined;
65
+ find(predicate: (schema: ISchema) => boolean): number | "unit" | import("@smithy/types").MemberSchema | import("@smithy/types").NormalizedSchema | StaticErrorSchema | import("@smithy/types").StaticListSchema | import("@smithy/types").StaticMapSchema | import("@smithy/types").StaticOperationSchema | import("@smithy/types").StaticSimpleSchema | import("@smithy/types").StaticStructureSchema | import("@smithy/types").StaticUnionSchema | import("@smithy/types").TraitsSchema | undefined;
66
66
  /**
67
67
  * Unloads the current TypeRegistry.
68
68
  */
@@ -51,7 +51,7 @@ export declare const expectLong: (value: any) => number | undefined;
51
51
  *
52
52
  * @deprecated Use expectLong
53
53
  */
54
- export declare const expectInt: (value: any) => number | undefined;
54
+ export declare const expectInt: typeof expectLong;
55
55
  /**
56
56
  * Asserts a value is a 32-bit integer and returns it.
57
57
  * otherwise an error is thrown.
@@ -136,7 +136,7 @@ export declare const strictParseDouble: (value: string | number) => number | und
136
136
  *
137
137
  * @deprecated Use strictParseDouble
138
138
  */
139
- export declare const strictParseFloat: (value: string | number) => number | undefined;
139
+ export declare const strictParseFloat: typeof strictParseDouble;
140
140
  /**
141
141
  * Parses a value into a float. If the value is null or undefined, undefined
142
142
  * will be returned. If the value is a string, it will be parsed by the standard
@@ -166,13 +166,13 @@ export declare const limitedParseDouble: (value: string | number) => number | un
166
166
  *
167
167
  * @deprecated Use limitedParseDouble
168
168
  */
169
- export declare const handleFloat: (value: string | number) => number | undefined;
169
+ export declare const handleFloat: typeof limitedParseDouble;
170
170
  /**
171
171
  * @internal
172
172
  *
173
173
  * @deprecated Use limitedParseDouble
174
174
  */
175
- export declare const limitedParseFloat: (value: string | number) => number | undefined;
175
+ export declare const limitedParseFloat: typeof limitedParseDouble;
176
176
  /**
177
177
  * Asserts a value is a 32-bit float and returns it. If the value is a string
178
178
  * representation of a non-numeric number type (NaN, Infinity, -Infinity),
@@ -202,7 +202,7 @@ export declare const strictParseLong: (value: string | number) => number | undef
202
202
  *
203
203
  * @deprecated Use strictParseLong
204
204
  */
205
- export declare const strictParseInt: (value: string | number) => number | undefined;
205
+ export declare const strictParseInt: typeof strictParseLong;
206
206
  /**
207
207
  * Parses a value into a 32-bit integer. If the value is null or undefined, undefined
208
208
  * will be returned. If the value is a string, it will be parsed by parseFloat
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "3.33.0",
3
+ "version": "3.33.2",
4
4
  "homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/core",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -232,7 +232,7 @@
232
232
  "test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
233
233
  },
234
234
  "dependencies": {
235
- "@smithy/types": "^4.17.0",
235
+ "@smithy/types": "^4.17.2",
236
236
  "tslib": "^2.6.2"
237
237
  },
238
238
  "devDependencies": {
@@ -241,11 +241,7 @@
241
241
  "downlevel-dts": "0.10.1",
242
242
  "hash-test-vectors": "^1.3.2",
243
243
  "json-bigint": "^1.0.0",
244
- "premove": "4.0.0",
245
- "typedoc": "0.23.23"
246
- },
247
- "typedoc": {
248
- "entryPoint": "src/index.ts"
244
+ "premove": "4.0.0"
249
245
  },
250
246
  "engines": {
251
247
  "node": ">=18.0.0"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/credential-provider-imds",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "description": "AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service",
5
5
  "keywords": [
6
6
  "aws",
@@ -31,33 +31,25 @@
31
31
  ]
32
32
  }
33
33
  },
34
- "publishConfig": {
35
- "directory": ".release/package"
36
- },
37
34
  "scripts": {
38
35
  "build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
39
36
  "build:es:cjs": "node ../../scripts/compilation/es_cjs.js",
40
37
  "build:types": "premove dist-types && yarn g:tsc -p tsconfig.types.json",
41
38
  "build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
42
39
  "clean": "premove dist-cjs dist-es dist-types",
43
- "stage-release": "premove .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
44
40
  "test": "yarn g:vitest run",
45
41
  "test:watch": "yarn g:vitest watch"
46
42
  },
47
43
  "dependencies": {
48
- "@smithy/core": "^3.32.0",
49
- "@smithy/types": "^4.17.0",
44
+ "@smithy/core": "^3.33.2",
45
+ "@smithy/types": "^4.17.2",
50
46
  "tslib": "^2.6.2"
51
47
  },
52
48
  "devDependencies": {
53
49
  "@types/node": "^18.11.9",
54
50
  "concurrently": "7.0.0",
55
51
  "downlevel-dts": "0.10.1",
56
- "premove": "4.0.0",
57
- "typedoc": "0.23.23"
58
- },
59
- "typedoc": {
60
- "entryPoint": "src/index.ts"
52
+ "premove": "4.0.0"
61
53
  },
62
54
  "engines": {
63
55
  "node": ">=18.0.0"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/fetch-http-handler",
3
- "version": "5.7.0",
3
+ "version": "5.7.2",
4
4
  "description": "Provides a way to make requests",
5
5
  "homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/fetch-http-handler",
6
6
  "license": "Apache-2.0",
@@ -27,9 +27,6 @@
27
27
  ]
28
28
  }
29
29
  },
30
- "publishConfig": {
31
- "directory": ".release/package"
32
- },
33
30
  "scripts": {
34
31
  "build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
35
32
  "build:es:cjs": "node ../../scripts/compilation/es_cjs.js",
@@ -37,26 +34,21 @@
37
34
  "build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
38
35
  "clean": "premove dist-cjs dist-es dist-types",
39
36
  "extract:docs": "api-extractor run --local",
40
- "stage-release": "premove .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
41
37
  "test": "yarn g:vitest run && yarn test:browser",
42
38
  "test:watch": "yarn g:vitest watch",
43
39
  "test:browser": "yarn g:vitest run -c vitest.config.browser.mts",
44
40
  "test:browser:watch": "yarn g:vitest watch -c vitest.config.browser.mts"
45
41
  },
46
42
  "dependencies": {
47
- "@smithy/core": "^3.32.0",
48
- "@smithy/types": "^4.17.0",
43
+ "@smithy/core": "^3.33.2",
44
+ "@smithy/types": "^4.17.2",
49
45
  "tslib": "^2.6.2"
50
46
  },
51
47
  "devDependencies": {
52
- "@smithy/abort-controller": "^4.4.0",
48
+ "@smithy/abort-controller": "^4.4.2",
53
49
  "concurrently": "7.0.0",
54
50
  "downlevel-dts": "0.10.1",
55
- "premove": "4.0.0",
56
- "typedoc": "0.23.23"
57
- },
58
- "typedoc": {
59
- "entryPoint": "src/index.ts"
51
+ "premove": "4.0.0"
60
52
  },
61
53
  "engines": {
62
54
  "node": ">=18.0.0"
@@ -20,27 +20,27 @@ class HeaderFormatter {
20
20
  formatHeaderValue(header) {
21
21
  switch (header.type) {
22
22
  case "boolean":
23
- return Uint8Array.from([header.value ? HEADER_VALUE_TYPE.boolTrue : HEADER_VALUE_TYPE.boolFalse]);
23
+ return Uint8Array.from([header.value ? 0 : 1]);
24
24
  case "byte":
25
- return Uint8Array.from([HEADER_VALUE_TYPE.byte, header.value]);
25
+ return Uint8Array.from([2, header.value]);
26
26
  case "short":
27
27
  const shortView = new DataView(new ArrayBuffer(3));
28
- shortView.setUint8(0, HEADER_VALUE_TYPE.short);
28
+ shortView.setUint8(0, 3);
29
29
  shortView.setInt16(1, header.value, false);
30
30
  return new Uint8Array(shortView.buffer);
31
31
  case "integer":
32
32
  const intView = new DataView(new ArrayBuffer(5));
33
- intView.setUint8(0, HEADER_VALUE_TYPE.integer);
33
+ intView.setUint8(0, 4);
34
34
  intView.setInt32(1, header.value, false);
35
35
  return new Uint8Array(intView.buffer);
36
36
  case "long":
37
37
  const longBytes = new Uint8Array(9);
38
- longBytes[0] = HEADER_VALUE_TYPE.long;
38
+ longBytes[0] = 5;
39
39
  longBytes.set(header.value.bytes, 1);
40
40
  return longBytes;
41
41
  case "binary":
42
42
  const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
43
- binView.setUint8(0, HEADER_VALUE_TYPE.byteArray);
43
+ binView.setUint8(0, 6);
44
44
  binView.setUint16(1, header.value.byteLength, false);
45
45
  const binBytes = new Uint8Array(binView.buffer);
46
46
  binBytes.set(header.value, 3);
@@ -48,14 +48,14 @@ class HeaderFormatter {
48
48
  case "string":
49
49
  const utf8Bytes = fromUtf8(header.value);
50
50
  const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
51
- strView.setUint8(0, HEADER_VALUE_TYPE.string);
51
+ strView.setUint8(0, 7);
52
52
  strView.setUint16(1, utf8Bytes.byteLength, false);
53
53
  const strBytes = new Uint8Array(strView.buffer);
54
54
  strBytes.set(utf8Bytes, 3);
55
55
  return strBytes;
56
56
  case "timestamp":
57
57
  const tsBytes = new Uint8Array(9);
58
- tsBytes[0] = HEADER_VALUE_TYPE.timestamp;
58
+ tsBytes[0] = 8;
59
59
  tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);
60
60
  return tsBytes;
61
61
  case "uuid":
@@ -63,7 +63,7 @@ class HeaderFormatter {
63
63
  throw new Error(`Invalid UUID received: ${header.value}`);
64
64
  }
65
65
  const uuidBytes = new Uint8Array(17);
66
- uuidBytes[0] = HEADER_VALUE_TYPE.uuid;
66
+ uuidBytes[0] = 9;
67
67
  uuidBytes.set(fromHex(header.value.replace(/-/g, "")), 1);
68
68
  return uuidBytes;
69
69
  }
@@ -17,27 +17,27 @@ export class HeaderFormatter {
17
17
  formatHeaderValue(header) {
18
18
  switch (header.type) {
19
19
  case "boolean":
20
- return Uint8Array.from([header.value ? HEADER_VALUE_TYPE.boolTrue : HEADER_VALUE_TYPE.boolFalse]);
20
+ return Uint8Array.from([header.value ? 0 : 1]);
21
21
  case "byte":
22
- return Uint8Array.from([HEADER_VALUE_TYPE.byte, header.value]);
22
+ return Uint8Array.from([2, header.value]);
23
23
  case "short":
24
24
  const shortView = new DataView(new ArrayBuffer(3));
25
- shortView.setUint8(0, HEADER_VALUE_TYPE.short);
25
+ shortView.setUint8(0, 3);
26
26
  shortView.setInt16(1, header.value, false);
27
27
  return new Uint8Array(shortView.buffer);
28
28
  case "integer":
29
29
  const intView = new DataView(new ArrayBuffer(5));
30
- intView.setUint8(0, HEADER_VALUE_TYPE.integer);
30
+ intView.setUint8(0, 4);
31
31
  intView.setInt32(1, header.value, false);
32
32
  return new Uint8Array(intView.buffer);
33
33
  case "long":
34
34
  const longBytes = new Uint8Array(9);
35
- longBytes[0] = HEADER_VALUE_TYPE.long;
35
+ longBytes[0] = 5;
36
36
  longBytes.set(header.value.bytes, 1);
37
37
  return longBytes;
38
38
  case "binary":
39
39
  const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
40
- binView.setUint8(0, HEADER_VALUE_TYPE.byteArray);
40
+ binView.setUint8(0, 6);
41
41
  binView.setUint16(1, header.value.byteLength, false);
42
42
  const binBytes = new Uint8Array(binView.buffer);
43
43
  binBytes.set(header.value, 3);
@@ -45,14 +45,14 @@ export class HeaderFormatter {
45
45
  case "string":
46
46
  const utf8Bytes = fromUtf8(header.value);
47
47
  const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
48
- strView.setUint8(0, HEADER_VALUE_TYPE.string);
48
+ strView.setUint8(0, 7);
49
49
  strView.setUint16(1, utf8Bytes.byteLength, false);
50
50
  const strBytes = new Uint8Array(strView.buffer);
51
51
  strBytes.set(utf8Bytes, 3);
52
52
  return strBytes;
53
53
  case "timestamp":
54
54
  const tsBytes = new Uint8Array(9);
55
- tsBytes[0] = HEADER_VALUE_TYPE.timestamp;
55
+ tsBytes[0] = 8;
56
56
  tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);
57
57
  return tsBytes;
58
58
  case "uuid":
@@ -60,7 +60,7 @@ export class HeaderFormatter {
60
60
  throw new Error(`Invalid UUID received: ${header.value}`);
61
61
  }
62
62
  const uuidBytes = new Uint8Array(17);
63
- uuidBytes[0] = HEADER_VALUE_TYPE.uuid;
63
+ uuidBytes[0] = 9;
64
64
  uuidBytes.set(fromHex(header.value.replace(/-/g, "")), 1);
65
65
  return uuidBytes;
66
66
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/signature-v4",
3
- "version": "5.7.0",
3
+ "version": "5.7.2",
4
4
  "description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
5
5
  "homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/signature-v4",
6
6
  "license": "Apache-2.0",
@@ -27,9 +27,6 @@
27
27
  ]
28
28
  }
29
29
  },
30
- "publishConfig": {
31
- "directory": ".release/package"
32
- },
33
30
  "scripts": {
34
31
  "build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
35
32
  "build:es:cjs": "node ../../scripts/compilation/es_cjs.js",
@@ -37,23 +34,18 @@
37
34
  "build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
38
35
  "clean": "premove dist-cjs dist-es dist-types",
39
36
  "extract:docs": "api-extractor run --local",
40
- "stage-release": "premove .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
41
37
  "test": "yarn g:vitest run",
42
38
  "test:watch": "yarn g:vitest watch"
43
39
  },
44
40
  "dependencies": {
45
- "@smithy/core": "^3.32.0",
46
- "@smithy/types": "^4.17.0",
41
+ "@smithy/core": "^3.33.2",
42
+ "@smithy/types": "^4.17.2",
47
43
  "tslib": "^2.6.2"
48
44
  },
49
45
  "devDependencies": {
50
46
  "concurrently": "7.0.0",
51
47
  "downlevel-dts": "0.10.1",
52
- "premove": "4.0.0",
53
- "typedoc": "0.23.23"
54
- },
55
- "typedoc": {
56
- "entryPoint": "src/index.ts"
48
+ "premove": "4.0.0"
57
49
  },
58
50
  "engines": {
59
51
  "node": ">=18.0.0"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/types",
3
- "version": "4.17.0",
3
+ "version": "4.17.2",
4
4
  "homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/types",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -27,9 +27,6 @@
27
27
  ]
28
28
  }
29
29
  },
30
- "publishConfig": {
31
- "directory": ".release/package"
32
- },
33
30
  "scripts": {
34
31
  "build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
35
32
  "build:es:cjs": "node ../../scripts/compilation/es_cjs.js",
@@ -37,7 +34,6 @@
37
34
  "build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4 && node scripts/downlevel",
38
35
  "clean": "premove dist-cjs dist-es dist-types",
39
36
  "extract:docs": "api-extractor run --local",
40
- "stage-release": "premove .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
41
37
  "test": "yarn g:tsc -p tsconfig.test.json"
42
38
  },
43
39
  "dependencies": {
@@ -46,11 +42,7 @@
46
42
  "devDependencies": {
47
43
  "concurrently": "7.0.0",
48
44
  "downlevel-dts": "0.10.1",
49
- "premove": "4.0.0",
50
- "typedoc": "0.23.23"
51
- },
52
- "typedoc": {
53
- "entryPoint": "src/index.ts"
45
+ "premove": "4.0.0"
54
46
  },
55
47
  "engines": {
56
48
  "node": ">=18.0.0"
@@ -37,7 +37,7 @@ const mergePath = (base, path) => {
37
37
  const replaceUrlParam = (urlString, params) => {
38
38
  for (const [k, v] of Object.entries(params)) {
39
39
  const reg = new RegExp("/:" + k + "(?:{[^/]+})?\\??(?=/|$)");
40
- urlString = urlString.replace(reg, v ? `/${v}` : "");
40
+ urlString = urlString.replace(reg, () => v ? `/${v}` : "");
41
41
  }
42
42
  return urlString;
43
43
  };
@@ -224,6 +224,10 @@ class Context {
224
224
  * c.header('X-Message', 'Hello!')
225
225
  * c.header('Content-Type', 'text/plain')
226
226
  *
227
+ * // Append multiple headers using the append option (e.g. Vary)
228
+ * c.header('Vary', 'Accept-Encoding', { append: true })
229
+ * c.header('Vary', 'User-Agent', { append: true })
230
+ *
227
231
  * return c.body('Thank you for coming')
228
232
  * })
229
233
  * ```
@@ -69,7 +69,7 @@ const cors = (options) => {
69
69
  }
70
70
  if (c.req.method === "OPTIONS") {
71
71
  if (opts.origin !== "*") {
72
- set("Vary", "Origin");
72
+ c.res.headers.append("Vary", "Origin");
73
73
  }
74
74
  if (opts.maxAge != null) {
75
75
  set("Access-Control-Max-Age", opts.maxAge.toString());
@@ -23,7 +23,7 @@ module.exports = __toCommonJS(csrf_exports);
23
23
  var import_http_exception = require("../../http-exception");
24
24
  const secFetchSiteValues = ["same-origin", "same-site", "none", "cross-site"];
25
25
  const isSecFetchSite = (value) => secFetchSiteValues.includes(value);
26
- const isSafeMethodRe = /^(GET|HEAD)$/;
26
+ const isSafeMethodRe = /^(GET|HEAD|OPTIONS)$/;
27
27
  const isRequestedByFormElementRe = /^\b(application\/x-www-form-urlencoded|multipart\/form-data|text\/plain)\b/i;
28
28
  const csrf = (options) => {
29
29
  const originHandler = ((optsOrigin) => {
@@ -59,7 +59,7 @@ const generateDigest = async (stream, generator) => {
59
59
  const requiredLength = chunkLength + remaining;
60
60
  if (requiredLength < CHUNK_SIZE) {
61
61
  if (!chunk) {
62
- chunk = value.subarray(offset);
62
+ chunk = value.slice(offset);
63
63
  } else {
64
64
  if (chunk.byteLength < requiredLength) {
65
65
  const nextChunk = new Uint8Array(
@@ -82,11 +82,11 @@ const etag = (options) => {
82
82
  ETag: etag3
83
83
  }
84
84
  });
85
- c.res.headers.forEach((_, key) => {
85
+ for (const key of Array.from(c.res.headers.keys())) {
86
86
  if (retainedHeaders.indexOf(key.toLowerCase()) === -1) {
87
87
  c.res.headers.delete(key);
88
88
  }
89
- });
89
+ }
90
90
  } else {
91
91
  c.res.headers.set("ETag", etag3);
92
92
  }
@@ -20,12 +20,14 @@ __export(pretty_json_exports, {
20
20
  prettyJSON: () => prettyJSON
21
21
  });
22
22
  module.exports = __toCommonJS(pretty_json_exports);
23
+ const jsonContentTypeRegex = /^application\/(?:[a-z0-9._-]+\+)?json(?=$|[;\s])/i;
23
24
  const prettyJSON = (options) => {
24
25
  const targetQuery = options?.query ?? "pretty";
25
26
  return async function prettyJSON2(c, next) {
26
27
  const pretty = options?.force || c.req.query(targetQuery) || c.req.query(targetQuery) === "";
27
28
  await next();
28
- if (pretty && c.res.headers.get("Content-Type")?.startsWith("application/json")) {
29
+ const contentType = c.res.headers.get("Content-Type");
30
+ if (pretty && contentType && jsonContentTypeRegex.test(contentType)) {
29
31
  const obj = await c.res.json();
30
32
  c.res = new Response(JSON.stringify(obj, null, options?.space ?? 2), c.res);
31
33
  }
@@ -50,7 +50,8 @@ class LinearRouter {
50
50
  }
51
51
  } else if (hasStar && !hasLabel) {
52
52
  const endsWithStar = routePath.charCodeAt(routePath.length - 1) === 42;
53
- const parts = (endsWithStar ? routePath.slice(0, -2) : routePath).split(splitByStarRe);
53
+ const endsWithSlashStar = routePath.endsWith("/*");
54
+ const parts = (endsWithStar ? routePath.slice(0, endsWithSlashStar ? -2 : -1) : routePath).split(splitByStarRe);
54
55
  const lastIndex = parts.length - 1;
55
56
  for (let j = 0, pos = 0, len2 = parts.length; j < len2; j++) {
56
57
  const part = parts[j];
@@ -60,7 +61,11 @@ class LinearRouter {
60
61
  }
61
62
  pos += part.length;
62
63
  if (j === lastIndex) {
63
- if (!endsWithStar && pos !== path.length && !(pos === path.length - 1 && path.charCodeAt(pos) === 47)) {
64
+ if (endsWithSlashStar) {
65
+ if (pos !== path.length && path.charCodeAt(pos) !== 47) {
66
+ continue ROUTES_LOOP;
67
+ }
68
+ } else if (!endsWithStar && pos !== path.length && !(pos === path.length - 1 && path.charCodeAt(pos) === 47)) {
64
69
  continue ROUTES_LOOP;
65
70
  }
66
71
  } else {
@@ -26,10 +26,8 @@ class PatternRouter {
26
26
  name = "PatternRouter";
27
27
  #routes = [];
28
28
  add(method, path, handler) {
29
- const endsWithWildcard = path.at(-1) === "*";
30
- if (endsWithWildcard) {
31
- path = path.slice(0, -2);
32
- }
29
+ const suffix = path.endsWith("/*") ? "(?:$|/)" : path.endsWith("*") ? "" : "/?$";
30
+ path = path.replace(/\*$/, "");
33
31
  if (path.at(-1) === "?") {
34
32
  path = path.slice(0, -1);
35
33
  this.add(method, path.replace(/\/[^/]+$/, ""), handler);
@@ -41,11 +39,7 @@ class PatternRouter {
41
39
  }
42
40
  );
43
41
  try {
44
- this.#routes.push([
45
- new RegExp(`^${parts.join("")}${endsWithWildcard ? "" : "/?$"}`),
46
- method,
47
- handler
48
- ]);
42
+ this.#routes.push([new RegExp(`^${parts.join("")}${suffix}`), method, handler]);
49
43
  } catch {
50
44
  throw new import_router.UnsupportedPathError();
51
45
  }