@zuplo/cli 7.13.9 → 7.13.13

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 (120) hide show
  1. package/node_modules/@hono/node-server/dist/index.cjs +31 -6
  2. package/node_modules/@hono/node-server/dist/index.mjs +31 -6
  3. package/node_modules/@hono/node-server/package.json +1 -1
  4. package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwks/remote.js +3 -1
  5. package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/deflate.js +2 -1
  6. package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +2 -1
  7. package/node_modules/@modelcontextprotocol/client/node_modules/jose/package.json +1 -1
  8. package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwks/remote.js +3 -1
  9. package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/deflate.js +2 -1
  10. package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +2 -1
  11. package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/package.json +1 -1
  12. package/node_modules/@posthog/core/dist/cookie.d.ts +4 -0
  13. package/node_modules/@posthog/core/dist/cookie.d.ts.map +1 -1
  14. package/node_modules/@posthog/core/dist/cookie.js +8 -2
  15. package/node_modules/@posthog/core/dist/cookie.mjs +8 -2
  16. package/node_modules/@posthog/core/dist/utils/bot-detection.d.ts.map +1 -1
  17. package/node_modules/@posthog/core/dist/utils/bot-detection.js +1 -0
  18. package/node_modules/@posthog/core/dist/utils/bot-detection.mjs +1 -0
  19. package/node_modules/@posthog/core/package.json +2 -2
  20. package/node_modules/@posthog/core/src/cookie.ts +13 -2
  21. package/node_modules/@posthog/core/src/utils/bot-detection.spec.ts +7 -0
  22. package/node_modules/@posthog/core/src/utils/bot-detection.ts +1 -0
  23. package/node_modules/@zuplo/core/customer.cli.minified.js +332 -332
  24. package/node_modules/@zuplo/core/index.minified.js +320 -320
  25. package/node_modules/@zuplo/core/package.json +1 -1
  26. package/node_modules/@zuplo/graphql/package.json +1 -1
  27. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  28. package/node_modules/@zuplo/otel/package.json +1 -1
  29. package/node_modules/@zuplo/runtime/out/esm/{chunk-D4D3WYPP.js → chunk-3DWWKPBI.js} +85 -85
  30. package/node_modules/@zuplo/runtime/out/esm/chunk-3DWWKPBI.js.map +1 -0
  31. package/node_modules/@zuplo/runtime/out/esm/{chunk-PXS4NOKU.js → chunk-KA4STQE7.js} +17 -17
  32. package/node_modules/@zuplo/runtime/out/esm/chunk-KA4STQE7.js.map +1 -0
  33. package/node_modules/@zuplo/runtime/out/esm/chunk-VP5Q3DEN.js +26 -0
  34. package/node_modules/@zuplo/runtime/out/esm/chunk-VP5Q3DEN.js.map +1 -0
  35. package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
  36. package/node_modules/@zuplo/runtime/out/esm/internal/index.js +1 -1
  37. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
  38. package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
  39. package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js +1 -1
  40. package/node_modules/@zuplo/runtime/out/types/index.d.ts +60 -0
  41. package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +119 -0
  42. package/node_modules/@zuplo/runtime/package.json +1 -1
  43. package/node_modules/express-rate-limit/dist/index.cjs +1 -1
  44. package/node_modules/express-rate-limit/dist/index.mjs +1 -1
  45. package/node_modules/express-rate-limit/package.json +1 -1
  46. package/node_modules/hono/dist/cjs/adapter/bun/serve-static.js +1 -1
  47. package/node_modules/hono/dist/cjs/adapter/bun/websocket.js +1 -1
  48. package/node_modules/hono/dist/cjs/context.js +1 -1
  49. package/node_modules/hono/dist/cjs/helper/css/common.js +3 -5
  50. package/node_modules/hono/dist/cjs/hono-base.js +4 -10
  51. package/node_modules/hono/dist/cjs/hono.js +0 -1
  52. package/node_modules/hono/dist/cjs/middleware/basic-auth/index.js +1 -1
  53. package/node_modules/hono/dist/cjs/middleware/bearer-auth/index.js +1 -1
  54. package/node_modules/hono/dist/cjs/middleware/csrf/index.js +2 -2
  55. package/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +2 -2
  56. package/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +2 -2
  57. package/node_modules/hono/dist/cjs/middleware/mount/index.js +4 -4
  58. package/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +13 -11
  59. package/node_modules/hono/dist/cjs/router/reg-exp-router/prepared-router.js +4 -4
  60. package/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +39 -51
  61. package/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +15 -5
  62. package/node_modules/hono/dist/cjs/utils/jwt/jwt.js +2 -1
  63. package/node_modules/hono/dist/cjs/utils/mount.js +35 -0
  64. package/node_modules/hono/dist/cjs/utils/url.js +10 -0
  65. package/node_modules/hono/dist/cjs/validator/validator.js +1 -1
  66. package/node_modules/hono/dist/context.js +1 -1
  67. package/node_modules/hono/dist/helper/css/common.js +3 -5
  68. package/node_modules/hono/dist/hono-base.js +4 -10
  69. package/node_modules/hono/dist/hono.js +0 -1
  70. package/node_modules/hono/dist/middleware/basic-auth/index.js +1 -1
  71. package/node_modules/hono/dist/middleware/bearer-auth/index.js +1 -1
  72. package/node_modules/hono/dist/middleware/csrf/index.js +2 -2
  73. package/node_modules/hono/dist/middleware/jwk/jwk.js +2 -2
  74. package/node_modules/hono/dist/middleware/jwt/jwt.js +2 -2
  75. package/node_modules/hono/dist/middleware/language/language.js +1 -1
  76. package/node_modules/hono/dist/middleware/mount/index.js +4 -4
  77. package/node_modules/hono/dist/router/reg-exp-router/node.js +13 -11
  78. package/node_modules/hono/dist/router/reg-exp-router/prepared-router.js +5 -5
  79. package/node_modules/hono/dist/router/reg-exp-router/router.js +40 -52
  80. package/node_modules/hono/dist/router/reg-exp-router/trie.js +15 -5
  81. package/node_modules/hono/dist/types/middleware/mount/index.d.ts +1 -0
  82. package/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +3 -3
  83. package/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +1 -1
  84. package/node_modules/hono/dist/types/utils/mount.d.ts +4 -0
  85. package/node_modules/hono/dist/types/utils/url.d.ts +1 -0
  86. package/node_modules/hono/dist/utils/jwt/jwt.js +2 -1
  87. package/node_modules/hono/dist/utils/mount.js +34 -0
  88. package/node_modules/hono/dist/utils/url.js +10 -1
  89. package/node_modules/hono/dist/validator/validator.js +1 -1
  90. package/node_modules/hono/package.json +1 -1
  91. package/node_modules/ip-address/README.md +39 -39
  92. package/node_modules/ip-address/dist/ipv6.js +1 -1
  93. package/node_modules/ip-address/dist/ipv6.js.map +1 -1
  94. package/node_modules/ip-address/package.json +1 -1
  95. package/node_modules/thread-stream/.github/workflows/ci.yml +1 -1
  96. package/node_modules/thread-stream/SECURITY.md +77 -0
  97. package/node_modules/thread-stream/index.d.ts +2 -1
  98. package/node_modules/thread-stream/index.js +65 -7
  99. package/node_modules/thread-stream/lib/wait.js +23 -5
  100. package/node_modules/thread-stream/package.json +10 -5
  101. package/node_modules/thread-stream/test/create-and-exit.js +1 -1
  102. package/node_modules/thread-stream/test/end.test.js +35 -0
  103. package/node_modules/thread-stream/test/error-flush.test.js +96 -0
  104. package/node_modules/thread-stream/test/error-immediate.js +17 -0
  105. package/node_modules/thread-stream/test/flush-ref-keeps-alive.js +23 -0
  106. package/node_modules/thread-stream/test/flush-unref-exit.js +23 -0
  107. package/node_modules/thread-stream/test/ready-race-worker.js +22 -0
  108. package/node_modules/thread-stream/test/ready.test.js +46 -0
  109. package/node_modules/thread-stream/test/thread-management.test.js +68 -0
  110. package/node_modules/thread-stream/test/to-file-sync.js +23 -0
  111. package/node_modules/thread-stream/test/types/index.test-d.ts +26 -0
  112. package/node_modules/thread-stream/test/wait.test.js +131 -0
  113. package/package.json +11 -11
  114. package/node_modules/@zuplo/runtime/out/esm/chunk-D4D3WYPP.js.map +0 -1
  115. package/node_modules/@zuplo/runtime/out/esm/chunk-PXS4NOKU.js.map +0 -1
  116. package/node_modules/@zuplo/runtime/out/esm/chunk-ZCJ5QBVD.js +0 -26
  117. package/node_modules/@zuplo/runtime/out/esm/chunk-ZCJ5QBVD.js.map +0 -1
  118. package/node_modules/thread-stream/.claude/settings.local.json +0 -15
  119. /package/node_modules/@zuplo/runtime/out/esm/{chunk-D4D3WYPP.js.LEGAL.txt → chunk-3DWWKPBI.js.LEGAL.txt} +0 -0
  120. /package/node_modules/@zuplo/runtime/out/esm/{chunk-PXS4NOKU.js.LEGAL.txt → chunk-KA4STQE7.js.LEGAL.txt} +0 -0
@@ -22,5 +22,5 @@
22
22
  * DEALINGS IN THE SOFTWARE.
23
23
  *--------------------------------------------------------------------------------------------*/
24
24
 
25
- import{G as p,L as c,O as u}from"../chunk-D4D3WYPP.js";import"../chunk-ZCJ5QBVD.js";import{a as d}from"../chunk-QGAJTUPE.js";import"../chunk-A3QGJZO7.js";import{aa as i}from"../chunk-PXS4NOKU.js";import"../chunk-UKQQD2JN.js";import{a as o}from"../chunk-TYV53J3B.js";function w(l={request:new Request("https://api.example.com")}){let e=[];function t(s){e.push(Promise.resolve(s))}return o(t,"waitUntil"),{context:new a({event:{waitUntil:t},route:l.route,originalRequest:l.request}),invokeResponse:o(async()=>{await Promise.all(e)},"invokeResponse")}}o(w,"createMockContext");var g={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:o(()=>({}),"raw")},a=class extends EventTarget{static{o(this,"MockZuploContext")}#e;#t;contextId;requestId;log;route;custom;incomingRequestProperties;parentContext;analyticsContext;constructor({event:e,route:t=g,parentContext:n,originalRequest:r}){super(),this.requestId=crypto.randomUUID(),this.contextId=crypto.randomUUID(),this.log={info:i.console.info,log:i.console.log,debug:i.console.debug,warn:i.console.warn,error:i.console.error,setLogProperties:o(()=>{},"setLogProperties")},this.custom={},this.route=t,this.incomingRequestProperties={ip:"203.0.113.7",asn:1234,asOrganization:"ORGANIZATION",city:"Seattle",region:"Washington",regionCode:"WA",colo:"SEA",continent:"NA",country:"US",postalCode:"98004",metroCode:"SEA",latitude:void 0,longitude:void 0,timezone:void 0,httpProtocol:void 0,clientCert:void 0,clientMtlsVerificationStatus:void 0,clientMtlsVerificationReason:void 0,clientCertFingerprintSha256:void 0,clientCertNotBefore:void 0,clientCertNotAfter:void 0,clientCertIssuerDn:void 0,clientCertSubjectDn:void 0},this.parentContext=n,this.#e=e,this.#t=r,this.analyticsContext=new c(this.requestId)}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,t){throw new Error("Not implemented")}invokeOutboundPolicy(e,t,n){throw new Error("Not implemented")}invokeRoute(e,t){throw new Error("Not implemented")}addResponseSendingHook(e){throw new Error("Not implemented")}addResponseSendingFinalHook(e){throw new Error("Not implemented")}addPreRequestHandler(e,t){let n;try{n=u.getContextExtensions(this)}catch{n=u.initialize(this,new d(this.#t??new Request("https://api.example.com")))}n.preRequestPhase??="active",p(this,n,e,t)}get preRequestHandlers(){let e;try{e=u.getContextExtensions(this)}catch{return[]}return(e.preRequestState?.entries??[]).map(t=>({policyName:t.policyName,name:t.name}))}addEventListener(e,t,n){let r=o(s=>{try{typeof t=="function"?t(s):t.handleEvent(s)}catch(m){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),m}},"wrapped");super.addEventListener(e,r,n)}};export{a as MockZuploContext,w as createMockContext};
25
+ import{G as p,L as c,O as u}from"../chunk-3DWWKPBI.js";import"../chunk-VP5Q3DEN.js";import{a as d}from"../chunk-QGAJTUPE.js";import"../chunk-A3QGJZO7.js";import{aa as i}from"../chunk-KA4STQE7.js";import"../chunk-UKQQD2JN.js";import{a as o}from"../chunk-TYV53J3B.js";function w(l={request:new Request("https://api.example.com")}){let e=[];function t(s){e.push(Promise.resolve(s))}return o(t,"waitUntil"),{context:new a({event:{waitUntil:t},route:l.route,originalRequest:l.request}),invokeResponse:o(async()=>{await Promise.all(e)},"invokeResponse")}}o(w,"createMockContext");var g={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:o(()=>({}),"raw")},a=class extends EventTarget{static{o(this,"MockZuploContext")}#e;#t;contextId;requestId;log;route;custom;incomingRequestProperties;parentContext;analyticsContext;constructor({event:e,route:t=g,parentContext:n,originalRequest:r}){super(),this.requestId=crypto.randomUUID(),this.contextId=crypto.randomUUID(),this.log={info:i.console.info,log:i.console.log,debug:i.console.debug,warn:i.console.warn,error:i.console.error,setLogProperties:o(()=>{},"setLogProperties")},this.custom={},this.route=t,this.incomingRequestProperties={ip:"203.0.113.7",asn:1234,asOrganization:"ORGANIZATION",city:"Seattle",region:"Washington",regionCode:"WA",colo:"SEA",continent:"NA",country:"US",postalCode:"98004",metroCode:"SEA",latitude:void 0,longitude:void 0,timezone:void 0,httpProtocol:void 0,clientCert:void 0,clientMtlsVerificationStatus:void 0,clientMtlsVerificationReason:void 0,clientCertFingerprintSha256:void 0,clientCertNotBefore:void 0,clientCertNotAfter:void 0,clientCertIssuerDn:void 0,clientCertSubjectDn:void 0},this.parentContext=n,this.#e=e,this.#t=r,this.analyticsContext=new c(this.requestId)}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,t){throw new Error("Not implemented")}invokeOutboundPolicy(e,t,n){throw new Error("Not implemented")}invokeRoute(e,t){throw new Error("Not implemented")}addResponseSendingHook(e){throw new Error("Not implemented")}addResponseSendingFinalHook(e){throw new Error("Not implemented")}addPreRequestHandler(e,t){let n;try{n=u.getContextExtensions(this)}catch{n=u.initialize(this,new d(this.#t??new Request("https://api.example.com")))}n.preRequestPhase??="active",p(this,n,e,t)}get preRequestHandlers(){let e;try{e=u.getContextExtensions(this)}catch{return[]}return(e.preRequestState?.entries??[]).map(t=>({policyName:t.policyName,name:t.name}))}addEventListener(e,t,n){let r=o(s=>{try{typeof t=="function"?t(s):t.handleEvent(s)}catch(m){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),m}},"wrapped");super.addEventListener(e,r,n)}};export{a as MockZuploContext,w as createMockContext};
26
26
  //# sourceMappingURL=index.js.map
@@ -22,5 +22,5 @@
22
22
  * DEALINGS IN THE SOFTWARE.
23
23
  *--------------------------------------------------------------------------------------------*/
24
24
 
25
- import{Ia as a,Ja as l,Ka as c,La as o,Oa as p,Pa as y,Qa as m}from"../../chunk-PXS4NOKU.js";import"../../chunk-UKQQD2JN.js";import{a as i}from"../../chunk-TYV53J3B.js";async function g(r,e){let t=typeof e.credentials=="function"?await e.credentials():e.credentials,n=r.method,d=n!=="GET"&&n!=="HEAD"&&r.body!=null?await r.arrayBuffer():null,s=await new o({method:n,url:r.url,headers:r.headers,body:d,accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,sessionToken:t.sessionToken,service:e.service,region:e.region,signQuery:e.signQuery}).sign();return new Request(s.url.toString(),{method:s.method,headers:s.headers,body:s.body})}i(g,"signRequest");export{c as AwsClient,o as AwsV4Signer,p as fromTemporaryCredentials,y as fromWebToken,m as fromZuploIdentity,l as getAwsCredentialProvider,a as setAwsCredentialProvider,g as signRequest};
25
+ import{Ia as a,Ja as l,Ka as c,La as o,Oa as p,Pa as y,Qa as m}from"../../chunk-KA4STQE7.js";import"../../chunk-UKQQD2JN.js";import{a as i}from"../../chunk-TYV53J3B.js";async function g(r,e){let t=typeof e.credentials=="function"?await e.credentials():e.credentials,n=r.method,d=n!=="GET"&&n!=="HEAD"&&r.body!=null?await r.arrayBuffer():null,s=await new o({method:n,url:r.url,headers:r.headers,body:d,accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,sessionToken:t.sessionToken,service:e.service,region:e.region,signQuery:e.signQuery}).sign();return new Request(s.url.toString(),{method:s.method,headers:s.headers,body:s.body})}i(g,"signRequest");export{c as AwsClient,o as AwsV4Signer,p as fromTemporaryCredentials,y as fromWebToken,m as fromZuploIdentity,l as getAwsCredentialProvider,a as setAwsCredentialProvider,g as signRequest};
26
26
  //# sourceMappingURL=index.js.map
@@ -4277,6 +4277,40 @@ declare interface CompatibilityFlags {
4277
4277
  * @compatibilityDate 2025-02-06
4278
4278
  */
4279
4279
  useForwardRedirectsPropOnUrlForwardHandler: boolean;
4280
+ /**
4281
+ * Whether the build matches an OpenAPI route's path literally, escaping
4282
+ * the URLPattern special characters in it.
4283
+ *
4284
+ * Before this flag: The path is passed to URLPattern as written, after
4285
+ * `{param}` becomes `:param`, so `/foo/{id}/(.*)` mixes URLPattern syntax
4286
+ * into an OpenAPI path. A path that is not a valid URLPattern fails the
4287
+ * build.
4288
+ *
4289
+ * After this flag: `* + ? ( ) [ ] . | ^ $ \ :` in the path are escaped, so
4290
+ * each matches only itself, and `{param}` is the only placeholder.
4291
+ *
4292
+ * The build reads this flag; the runtime does not.
4293
+ *
4294
+ * @compatibilityDate 2025-02-06
4295
+ */
4296
+ escapeOpenApiPathCharacters: boolean;
4297
+ /**
4298
+ * Whether an OpenAPI path parameter ends at its closing `}`, so a path
4299
+ * such as `/x/{id}abc` binds `id` as written.
4300
+ *
4301
+ * Before this flag: The build writes `{id}` as `:id`. URLPattern reads a
4302
+ * name for as long as the next characters are letters, digits, `_` or `$`,
4303
+ * so `/x/{id}abc` becomes `/x/:idabc`: it matches `/x/<anything>` and sets
4304
+ * `idabc`, never `id`. The build warns about each such path.
4305
+ *
4306
+ * After this flag: When a letter, digit, `_` or `$` follows the `}`, the
4307
+ * build writes `{:id}abc`, so `/x/fooabc` matches with `id` set to `foo`
4308
+ * and `/x/foo` does not match. `mcpServerHandler` writes the parameter's
4309
+ * value in its place. Other paths build exactly as before.
4310
+ *
4311
+ * The build and the MCP server handler read this flag.
4312
+ */
4313
+ delimitOpenApiPathParameters: boolean;
4280
4314
  /**
4281
4315
  * Whether response sending hooks should chain properly, where each hook
4282
4316
  * receives the response from the previous hook instead of the original response.
@@ -4407,6 +4441,32 @@ declare interface CompatibilityFlags {
4407
4441
  * `policies/optional-string-options.spec.ts` lists them with the reason.
4408
4442
  */
4409
4443
  treatBlankOptionalStringOptionsAsUnset: boolean;
4444
+ /**
4445
+ * Whether the MCP server handler answers `resources/read` with a JSON-RPC
4446
+ * error when the resource's route answers an error status.
4447
+ *
4448
+ * Before this flag: The route's response body is returned as the
4449
+ * resource's contents whatever its status, so a route's 403 problem+json
4450
+ * reaches the client as a successful read.
4451
+ *
4452
+ * After this flag: A status outside 200 to 299, a redirect included,
4453
+ * answers `resources/read` with JSON-RPC error -32603 naming the resource,
4454
+ * its URI and the status, with `data: { uri, status }`. The route's body is
4455
+ * not read or sent.
4456
+ */
4457
+ failMcpResourceReadsOnErrorStatus: boolean;
4458
+ /**
4459
+ * Whether the build fails for an MCP resource URI that is not an absolute
4460
+ * RFC 3986 URI.
4461
+ *
4462
+ * Before this flag: `x-zuplo-route.mcp.uri` (or the deprecated
4463
+ * `x-zuplo-mcp-resource.uri`) is advertised and served as written, for
4464
+ * example `audit doc with spaces`. The build warns.
4465
+ *
4466
+ * After this flag: The build fails, naming the operation, its file and the
4467
+ * URI. The default URI (`mcp://resources/<name>`) is always valid.
4468
+ */
4469
+ rejectInvalidMcpResourceUris: boolean;
4410
4470
  }
4411
4471
 
4412
4472
  declare interface CompletionsFallbacks {
@@ -148,6 +148,40 @@ declare interface CompatibilityFlags {
148
148
  * @compatibilityDate 2025-02-06
149
149
  */
150
150
  useForwardRedirectsPropOnUrlForwardHandler: boolean;
151
+ /**
152
+ * Whether the build matches an OpenAPI route's path literally, escaping
153
+ * the URLPattern special characters in it.
154
+ *
155
+ * Before this flag: The path is passed to URLPattern as written, after
156
+ * `{param}` becomes `:param`, so `/foo/{id}/(.*)` mixes URLPattern syntax
157
+ * into an OpenAPI path. A path that is not a valid URLPattern fails the
158
+ * build.
159
+ *
160
+ * After this flag: `* + ? ( ) [ ] . | ^ $ \ :` in the path are escaped, so
161
+ * each matches only itself, and `{param}` is the only placeholder.
162
+ *
163
+ * The build reads this flag; the runtime does not.
164
+ *
165
+ * @compatibilityDate 2025-02-06
166
+ */
167
+ escapeOpenApiPathCharacters: boolean;
168
+ /**
169
+ * Whether an OpenAPI path parameter ends at its closing `}`, so a path
170
+ * such as `/x/{id}abc` binds `id` as written.
171
+ *
172
+ * Before this flag: The build writes `{id}` as `:id`. URLPattern reads a
173
+ * name for as long as the next characters are letters, digits, `_` or `$`,
174
+ * so `/x/{id}abc` becomes `/x/:idabc`: it matches `/x/<anything>` and sets
175
+ * `idabc`, never `id`. The build warns about each such path.
176
+ *
177
+ * After this flag: When a letter, digit, `_` or `$` follows the `}`, the
178
+ * build writes `{:id}abc`, so `/x/fooabc` matches with `id` set to `foo`
179
+ * and `/x/foo` does not match. `mcpServerHandler` writes the parameter's
180
+ * value in its place. Other paths build exactly as before.
181
+ *
182
+ * The build and the MCP server handler read this flag.
183
+ */
184
+ delimitOpenApiPathParameters: boolean;
151
185
  /**
152
186
  * Whether response sending hooks should chain properly, where each hook
153
187
  * receives the response from the previous hook instead of the original response.
@@ -278,6 +312,32 @@ declare interface CompatibilityFlags {
278
312
  * `policies/optional-string-options.spec.ts` lists them with the reason.
279
313
  */
280
314
  treatBlankOptionalStringOptionsAsUnset: boolean;
315
+ /**
316
+ * Whether the MCP server handler answers `resources/read` with a JSON-RPC
317
+ * error when the resource's route answers an error status.
318
+ *
319
+ * Before this flag: The route's response body is returned as the
320
+ * resource's contents whatever its status, so a route's 403 problem+json
321
+ * reaches the client as a successful read.
322
+ *
323
+ * After this flag: A status outside 200 to 299, a redirect included,
324
+ * answers `resources/read` with JSON-RPC error -32603 naming the resource,
325
+ * its URI and the status, with `data: { uri, status }`. The route's body is
326
+ * not read or sent.
327
+ */
328
+ failMcpResourceReadsOnErrorStatus: boolean;
329
+ /**
330
+ * Whether the build fails for an MCP resource URI that is not an absolute
331
+ * RFC 3986 URI.
332
+ *
333
+ * Before this flag: `x-zuplo-route.mcp.uri` (or the deprecated
334
+ * `x-zuplo-mcp-resource.uri`) is advertised and served as written, for
335
+ * example `audit doc with spaces`. The build warns.
336
+ *
337
+ * After this flag: The build fails, naming the operation, its file and the
338
+ * URI. The default URI (`mcp://resources/<name>`) is always valid.
339
+ */
340
+ rejectInvalidMcpResourceUris: boolean;
281
341
  }
282
342
 
283
343
  /**
@@ -1231,6 +1291,18 @@ declare type Iso3166Alpha2Code =
1231
1291
 
1232
1292
  /* Excluded from this release type: isRestrictedEnvVariableName */
1233
1293
 
1294
+ /**
1295
+ * Whether `uri` is an absolute RFC 3986 URI (section 3: `scheme ":"
1296
+ * hier-part [ "?" query ] [ "#" fragment ]`), as MCP requires a resource URI
1297
+ * to be (compat-reject-invalid-mcp-resource-uris MCPRESURI-1). The structure
1298
+ * is checked, not just the characters: a bracketed host must be an IP
1299
+ * literal, a port must be digits, and a fragment holds no second `#`. Any
1300
+ * scheme is allowed, so custom schemes such as `docs:` pass.
1301
+ *
1302
+ * @param uri - the resource URI as the handler advertises it (trimmed)
1303
+ */
1304
+ export declare function isValidMcpResourceUri(uri: string): boolean;
1305
+
1234
1306
  /* Excluded from this release type: isZuploReadableEnvVariableName */
1235
1307
 
1236
1308
  declare type JsonArray = JsonValue[] | readonly JsonValue[];
@@ -1311,6 +1383,36 @@ declare interface Logger extends BaseLogger {
1311
1383
  ): void;
1312
1384
  }
1313
1385
 
1386
+ /** The name and URI `resources/list` advertises for a resource. */
1387
+ export declare interface McpResourceIdentity {
1388
+ /**
1389
+ * The resource's name. Empty only on the `"resources"` path for an
1390
+ * operation with neither a name nor an operationId, which the handler
1391
+ * refuses at startup.
1392
+ */
1393
+ name: string;
1394
+ /** The advertised URI: the configured one, trimmed, or the default. */
1395
+ uri: string;
1396
+ /** Whether the URI is configured (non-empty after trimming), not the default. */
1397
+ configured: boolean;
1398
+ }
1399
+
1400
+ /** The part of a resource extension that names a resource and its URI. */
1401
+ export declare interface McpResourceIdentityConfig {
1402
+ name?: string;
1403
+ uri?: string;
1404
+ }
1405
+
1406
+ /**
1407
+ * How `mcpServerHandler` registers a resource, which decides the extension
1408
+ * its name and URI come from:
1409
+ * - `"operations"`: `options.operations`, from `x-zuplo-route.mcp` with
1410
+ * `type: "resource"`.
1411
+ * - `"resources"`: the deprecated `options.resources`, from
1412
+ * `x-zuplo-mcp-resource`.
1413
+ */
1414
+ export declare type McpResourceRegistration = "operations" | "resources";
1415
+
1314
1416
  declare type Modify<T, R> = Omit<T, keyof R> & R;
1315
1417
 
1316
1418
  /**
@@ -2025,6 +2127,23 @@ declare interface RequestUser<TUserData> {
2025
2127
  data: TUserData;
2026
2128
  }
2027
2129
 
2130
+ /**
2131
+ * The name and URI `mcpServerHandler` advertises for an operation it registers
2132
+ * as a resource. The handler and the build's resource URI check
2133
+ * (compat-reject-invalid-mcp-resource-uris MCPRESURI-1) both decide it here.
2134
+ * An empty URI gets the default, `mcp://resources/<encoded name>`.
2135
+ *
2136
+ * @param operationId - the operation's operationId
2137
+ * @param config - `x-zuplo-route.mcp` for `"operations"`,
2138
+ * `x-zuplo-mcp-resource` for `"resources"`
2139
+ * @param registration - the handler option that registers the resource
2140
+ */
2141
+ export declare function resolveMcpResourceIdentity(
2142
+ operationId: string,
2143
+ config: McpResourceIdentityConfig | undefined,
2144
+ registration: McpResourceRegistration
2145
+ ): McpResourceIdentity;
2146
+
2028
2147
  declare type ResolveRequestParams<
2029
2148
  TParams extends RequestParamsDefault | undefined,
2030
2149
  > = TParams extends RequestParamsDefault ? TParams : RequestParamsDefault;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "7.13.9",
4
+ "version": "7.13.13",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {
@@ -1061,7 +1061,7 @@ var rateLimit = (passedOptions) => {
1061
1061
  const retryAfter = await retrieveRetryAfter;
1062
1062
  setRetryAfterHeader(response, info, config.windowMs, retryAfter);
1063
1063
  }
1064
- config.handler(request, response, next, options);
1064
+ await config.handler(request, response, next, options);
1065
1065
  return;
1066
1066
  }
1067
1067
  next();
@@ -1018,7 +1018,7 @@ var rateLimit = (passedOptions) => {
1018
1018
  const retryAfter = await retrieveRetryAfter;
1019
1019
  setRetryAfterHeader(response, info, config.windowMs, retryAfter);
1020
1020
  }
1021
- config.handler(request, response, next, options);
1021
+ await config.handler(request, response, next, options);
1022
1022
  return;
1023
1023
  }
1024
1024
  next();
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-rate-limit",
3
- "version": "8.7.2",
3
+ "version": "8.7.3",
4
4
  "description": "Basic IP rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.",
5
5
  "author": {
6
6
  "name": "Nathan Friedly",
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_middleware_serve_static_index = require("../../middleware/serve-static/index.js");
3
- let node_fs_promises = require("node:fs/promises");
4
3
  let node_path = require("node:path");
4
+ let node_fs_promises = require("node:fs/promises");
5
5
  //#region src/adapter/bun/serve-static.ts
6
6
  /**
7
7
  * @deprecated `hono/bun` will be removed in v5. Install `@hono/bun` and import from there instead.
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_adapter_bun_server = require("./server.js");
3
2
  const require_helper_websocket_index = require("../../helper/websocket/index.js");
3
+ const require_adapter_bun_server = require("./server.js");
4
4
  //#region src/adapter/bun/websocket.ts
5
5
  /**
6
6
  * @internal
@@ -198,7 +198,7 @@ var Context = class {
198
198
  * ```
199
199
  */
200
200
  header = (name, value, options) => {
201
- if (this.finalized) this.#res = createResponseInstance(this.#res.body, this.#res);
201
+ if (this.finalized && !this.#res.bodyUsed) this.#res = createResponseInstance(this.#res.body, this.#res);
202
202
  const headers = this.#res ? this.#res.headers : this.#preparedHeaders ??= new Headers();
203
203
  if (value === void 0) headers.delete(name);
204
204
  else if (options?.append) headers.append(name, value);
@@ -80,10 +80,8 @@ const buildStyleString = (strings, values) => {
80
80
  for (let j = 0, len = vArray.length; j < len; j++) {
81
81
  let value = vArray[j];
82
82
  if (typeof value === "boolean" || value === null || value === void 0) continue;
83
- if (typeof value === "string") {
84
- if (/([\\"'\/])/.test(value)) styleString += value.replace(/([\\"']|(?<=<)\/)/g, "\\$1");
85
- else styleString += value;
86
- } else if (typeof value === "number") styleString += value;
83
+ if (typeof value === "string") styleString += value.replace(/[\\"']/g, "\\$&");
84
+ else if (typeof value === "number") styleString += value;
87
85
  else if (value[CSS_ESCAPED]) styleString += value[CSS_ESCAPED];
88
86
  else if (value[CLASS_NAME].startsWith("@keyframes ")) {
89
87
  selectors.push(value);
@@ -108,7 +106,7 @@ const buildStyleString = (strings, values) => {
108
106
  }
109
107
  return [
110
108
  label,
111
- minify(styleString),
109
+ minify(styleString).replace(/<\//g, "<\\/"),
112
110
  selectors,
113
111
  externalClassNames
114
112
  ];
@@ -4,6 +4,7 @@ const require_utils_url = require("./utils/url.js");
4
4
  const require_context = require("./context.js");
5
5
  const require_router = require("./router.js");
6
6
  const require_utils_constants = require("./utils/constants.js");
7
+ const require_utils_mount = require("./utils/mount.js");
7
8
  //#region src/hono-base.ts
8
9
  /**
9
10
  * @module
@@ -228,17 +229,10 @@ var Hono = class Hono {
228
229
  } catch {}
229
230
  return [c.env, executionContext];
230
231
  };
231
- replaceRequest ||= (() => {
232
- const mergedPath = require_utils_url.mergePath(this._basePath, path);
233
- const pathPrefixLength = mergedPath === "/" ? 0 : mergedPath.length;
234
- return (request) => {
235
- const url = new URL(request.url);
236
- url.pathname = this.getPath(request).slice(pathPrefixLength) || "/";
237
- return new Request(url, request);
238
- };
239
- })();
232
+ const mergedPath = require_utils_url.mergePath(this._basePath, path);
233
+ const defaultReplaceRequest = (c) => require_utils_mount.createMountedRequest(c, mergedPath.replace(/\/$/, ""), require_utils_url.mergePath(mergedPath, "*"));
240
234
  const handler = async (c, next) => {
241
- const res = await applicationHandler(replaceRequest(c.req.raw), ...getOptions(c));
235
+ const res = await applicationHandler(replaceRequest ? replaceRequest(c.req.raw) : defaultReplaceRequest(c), ...getOptions(c));
242
236
  if (res) return res;
243
237
  await next();
244
238
  };
@@ -1,7 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_hono_base = require("./hono-base.js");
3
3
  const require_router_reg_exp_router_router = require("./router/reg-exp-router/router.js");
4
- require("./router/reg-exp-router/index.js");
5
4
  const require_router_smart_router_router = require("./router/smart-router/router.js");
6
5
  const require_router_trie_router_router = require("./router/trie-router/router.js");
7
6
  require("./router/trie-router/index.js");
@@ -81,7 +81,7 @@ const basicAuth = (options, ...users) => {
81
81
  }
82
82
  }
83
83
  const status = 401;
84
- const headers = { "WWW-Authenticate": "Basic realm=\"" + options.realm?.replace(/"/g, "\\\"") + "\"" };
84
+ const headers = { "WWW-Authenticate": "Basic realm=\"" + options.realm?.replace(/[\\"]/g, "\\$&") + "\"" };
85
85
  const responseMessage = typeof options.invalidUserMessage === "function" ? await options.invalidUserMessage(ctx) : options.invalidUserMessage;
86
86
  const res = typeof responseMessage === "string" ? new Response(responseMessage, {
87
87
  status,
@@ -45,7 +45,7 @@ const bearerAuth = (options) => {
45
45
  if (!("token" in options || "verifyToken" in options)) throw new Error("bearer auth middleware requires options for \"token\" or \"verifyToken\"");
46
46
  if (!options.realm) options.realm = "";
47
47
  if (options.prefix === void 0) options.prefix = PREFIX;
48
- const realm = options.realm?.replace(/"/g, "\\\"");
48
+ const realm = options.realm?.replace(/[\\"]/g, "\\$&");
49
49
  const prefix = options.prefix;
50
50
  const tokenRegexp = new RegExp(`^${TOKEN_STRINGS}$`);
51
51
  const wwwAuthenticatePrefix = prefix === "" ? "" : `${prefix} `;
@@ -9,7 +9,7 @@ const secFetchSiteValues = [
9
9
  ];
10
10
  const isSecFetchSite = (value) => secFetchSiteValues.includes(value);
11
11
  const isSafeMethodRe = /^(GET|HEAD|OPTIONS)$/;
12
- const isRequestedByFormElementRe = /^\b(application\/x-www-form-urlencoded|multipart\/form-data|text\/plain)\b/i;
12
+ const isCsrfContentTypeRe = /^\b(application\/x-www-form-urlencoded|multipart\/form-data|text\/(?:plain|ping))\b/i;
13
13
  /**
14
14
  * CSRF Protection Middleware for Hono.
15
15
  *
@@ -95,7 +95,7 @@ const csrf = (options) => {
95
95
  return await secFetchSiteHandler(secFetchSite, c);
96
96
  };
97
97
  return async function csrf(c, next) {
98
- if (!isSafeMethodRe.test(c.req.method) && isRequestedByFormElementRe.test(c.req.header("content-type") || "text/plain") && !await isAllowedSecFetchSite(c.req.header("sec-fetch-site"), c) && !await isAllowedOrigin(c.req.header("origin"), c)) {
98
+ if (!isSafeMethodRe.test(c.req.method) && isCsrfContentTypeRe.test(c.req.header("content-type") || "text/plain") && !await isAllowedSecFetchSite(c.req.header("sec-fetch-site"), c) && !await isAllowedOrigin(c.req.header("origin"), c)) {
99
99
  const res = new Response("Forbidden", { status: 403 });
100
100
  throw new require_http_exception.HTTPException(403, { res });
101
101
  }
@@ -110,8 +110,8 @@ const jwk = (options, init) => {
110
110
  };
111
111
  };
112
112
  function unauthorizedResponse(opts) {
113
- const realm = (opts.realm ?? opts.ctx.req.url).replace(/"/g, "\\\"");
114
- const errDescription = opts.errDescription.replace(/"/g, "\\\"");
113
+ const realm = (opts.realm ?? opts.ctx.req.url).replace(/[\\"]/g, "\\$&");
114
+ const errDescription = opts.errDescription.replace(/[\\"]/g, "\\$&");
115
115
  return new Response("Unauthorized", {
116
116
  status: 401,
117
117
  statusText: opts.statusText,
@@ -104,8 +104,8 @@ const jwt = (options) => {
104
104
  };
105
105
  };
106
106
  function unauthorizedResponse(opts) {
107
- const realm = (opts.realm ?? opts.ctx.req.url).replace(/"/g, "\\\"");
108
- const errDescription = opts.errDescription.replace(/"/g, "\\\"");
107
+ const realm = (opts.realm ?? opts.ctx.req.url).replace(/[\\"]/g, "\\$&");
108
+ const errDescription = opts.errDescription.replace(/[\\"]/g, "\\$&");
109
109
  return new Response("Unauthorized", {
110
110
  status: 401,
111
111
  statusText: opts.statusText,
@@ -1,11 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_utils_mount = require("../../utils/mount.js");
2
3
  const require_helper_route_index = require("../../helper/route/index.js");
3
4
  //#region src/middleware/mount/index.ts
4
5
  const defaultReplaceRequest = (c) => {
5
- const pathPrefix = require_helper_route_index.routePath(c).replace(/\/\*$/, "");
6
- const url = new URL(c.req.raw.url);
7
- url.pathname = c.req.path.slice(pathPrefix.length) || "/";
8
- return new Request(url, c.req.raw);
6
+ const path = require_helper_route_index.routePath(c);
7
+ return require_utils_mount.createMountedRequest(c, path.replace(/\/?\*$/, ""), path);
9
8
  };
10
9
  const defaultGetOptions = (c) => {
11
10
  let executionContext = void 0;
@@ -22,6 +21,7 @@ const defaultGetOptions = (c) => {
22
21
  * @param {Function} applicationHandler - other Request Handler
23
22
  * @param {MountOptions} [options] - options of `mount()`
24
23
  * @returns {MiddlewareHandler} handler to register with `app.all()`
24
+ * @throws {Error} If the route ends with a wildcard inside a segment (e.g. `/assets*`), or automatic request rewriting encounters duplicate path parameter names.
25
25
  *
26
26
  * @example
27
27
  * ```ts
@@ -2,8 +2,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_router_utils = require("../utils.js");
3
3
  //#region src/router/reg-exp-router/node.ts
4
4
  const LABEL_REG_EXP_STR = "[^/]+";
5
- const ONLY_WILDCARD_REG_EXP_STR = ".*";
6
- const TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)";
5
+ const ONLY_WILDCARD_REG_EXP_STR = "[^]*";
6
+ const TAIL_WILDCARD_REG_EXP_STR = "(?:|/[^]*)";
7
7
  const PATH_ERROR = Symbol();
8
8
  const regExpMetaChars = /* @__PURE__ */ new Set(".\\+*[^]$()");
9
9
  /**
@@ -16,8 +16,8 @@ const regExpMetaChars = /* @__PURE__ */ new Set(".\\+*[^]$()");
16
16
  function compareKey(a, b) {
17
17
  if (a.length === 1) return b.length === 1 ? a < b ? -1 : 1 : -1;
18
18
  if (b.length === 1) return 1;
19
- if (a === ".*" || a === "(?:|/.*)") return b === "(?:|/.*)" ? -1 : 1;
20
- else if (b === ".*" || b === "(?:|/.*)") return -1;
19
+ if (a === "[^]*" || a === "(?:|/[^]*)") return b === "[^]*" ? -1 : 1;
20
+ else if (b === "[^]*" || b === "(?:|/[^]*)") return -1;
21
21
  if (a === "[^/]+") return 1;
22
22
  else if (b === "[^/]+") return -1;
23
23
  return a.length === b.length ? a < b ? -1 : 1 : b.length - a.length;
@@ -26,14 +26,14 @@ var Node = class Node {
26
26
  #index;
27
27
  #varIndex;
28
28
  #children = require_router_utils.createNullObject();
29
- insert(tokens, index, paramMap, context, isStatic) {
29
+ insert(tokens, index, paramMap, context, keys) {
30
30
  let node = this;
31
31
  for (let i = 0, len = tokens.length; i < len; i++) {
32
32
  const token = tokens[i];
33
33
  const pattern = token.length === 1 ? token === "*" ? i === len - 1 ? [
34
34
  "",
35
35
  "",
36
- ".*"
36
+ ONLY_WILDCARD_REG_EXP_STR
37
37
  ] : [
38
38
  "",
39
39
  "",
@@ -48,15 +48,16 @@ var Node = class Node {
48
48
  const name = pattern[1];
49
49
  let regexpStr = pattern[2] || "[^/]+";
50
50
  if (name && pattern[2]) {
51
- if (regexpStr === ".*") throw PATH_ERROR;
51
+ if (new RegExp(regexpStr).test("")) throw PATH_ERROR;
52
52
  regexpStr = regexpStr.replace(/^\((?!\?:)(?=[^)]+\)$)/, "(?:");
53
53
  if (/\((?!\?:)/.test(regexpStr)) throw PATH_ERROR;
54
54
  if (regexpStr.length === 1 && regExpMetaChars.has(regexpStr)) throw PATH_ERROR;
55
55
  }
56
+ keys.push(regexpStr);
56
57
  nextNode = node.#children[regexpStr];
57
58
  if (!nextNode) {
58
- if (regexpStr !== ".*" && regexpStr !== "(?:|/.*)") {
59
- for (const k in node.#children) if ((regexpStr.length > 1 || k.length > 1) && k !== ".*" && k !== "(?:|/.*)") throw PATH_ERROR;
59
+ if (regexpStr !== "[^]*" && regexpStr !== "(?:|/[^]*)") {
60
+ for (const k in node.#children) if ((regexpStr.length > 1 || k.length > 1) && k !== "[^]*" && k !== "(?:|/[^]*)") throw PATH_ERROR;
60
61
  }
61
62
  nextNode = node.#children[regexpStr] = new Node();
62
63
  }
@@ -65,16 +66,17 @@ var Node = class Node {
65
66
  paramMap.push([name, nextNode.#varIndex]);
66
67
  }
67
68
  } else {
69
+ keys.push(token);
68
70
  nextNode = node.#children[token];
69
71
  if (!nextNode) {
70
- for (const k in node.#children) if (k.length > 1 && k !== ".*" && k !== "(?:|/.*)") throw PATH_ERROR;
72
+ for (const k in node.#children) if (k.length > 1 && k !== "[^]*" && k !== "(?:|/[^]*)") throw PATH_ERROR;
71
73
  nextNode = node.#children[token] = new Node();
72
74
  }
73
75
  }
74
76
  node = nextNode;
75
77
  }
76
78
  if (node.#index !== void 0) throw PATH_ERROR;
77
- node.#index = isStatic ? -1 : index;
79
+ node.#index = index;
78
80
  }
79
81
  buildRegExpStr() {
80
82
  const strList = Object.keys(this.#children).sort(compareKey).map((k) => {
@@ -28,7 +28,7 @@ var PreparedRegExpRouter = class {
28
28
  if (!this.#matchers[method]) {
29
29
  const all = this.#matchers["ALL"];
30
30
  const staticMap = {};
31
- for (const key in all[2]) staticMap[key] = [all[2][key][0].slice(), require_router_reg_exp_router_matcher.emptyParam];
31
+ for (const key in all[2]) staticMap[key] = [all[2][key][0].slice(), all[2][key][1]];
32
32
  this.#matchers[method] = [
33
33
  all[0],
34
34
  all[1].map((list) => Array.isArray(list) ? list.slice() : 0),
@@ -72,7 +72,7 @@ const buildInitParams = ({ paths }) => {
72
72
  ...map
73
73
  };
74
74
  else relocateMap[path] = [[[], map]];
75
- if (relocateMap[path][0][0].findIndex((j) => j === i) === -1) relocateMap[path][0][0].push(i);
75
+ if (!relocateMap[path][0][0].includes(i)) relocateMap[path][0][0].push(i);
76
76
  }
77
77
  });
78
78
  });
@@ -80,7 +80,7 @@ const buildInitParams = ({ paths }) => {
80
80
  if (p === path) {
81
81
  relocateMap[path] ||= [[[]]];
82
82
  const value = path2 === path ? "" : path2;
83
- if (relocateMap[path][0][0].findIndex((v) => v === value) === -1) relocateMap[path][0][0].push(value);
83
+ if (!relocateMap[path][0][0].includes(value)) relocateMap[path][0][0].push(value);
84
84
  }
85
85
  });
86
86
  }
@@ -89,7 +89,7 @@ const buildInitParams = ({ paths }) => {
89
89
  return [matchers, relocateMap];
90
90
  };
91
91
  const serializeInitParams = ([matchers, relocateMap]) => {
92
- return `[${JSON.stringify(matchers, (_, value) => value instanceof RegExp ? `##${value.toString()}##` : value).replace(/"##(.+?)##"/g, (_, str) => str.replace(/\\\\/g, "\\"))},${JSON.stringify(relocateMap)}]`;
92
+ return `[${JSON.stringify(matchers, (_, value) => value instanceof RegExp || value === void 0 ? `##${value}##` : value).replace(/"##(.+?)##"/g, (_, str) => str.replace(/\\\\/g, "\\"))},${JSON.stringify(relocateMap)}]`;
93
93
  };
94
94
  //#endregion
95
95
  exports.PreparedRegExpRouter = PreparedRegExpRouter;