@zuplo/cli 7.13.6 → 7.13.7

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.
@@ -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-NWYAKCSU.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-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};
26
26
  //# sourceMappingURL=index.js.map
@@ -16193,6 +16193,14 @@ export declare const webSocketHandler: typeof webSocketPipelineHandler;
16193
16193
  * aborts the connection: both sockets are closed and no `101 Switching
16194
16194
  * Protocols` response is returned to the caller.
16195
16195
  *
16196
+ * On managed dedicated and self-hosted gateways the connection is already
16197
+ * upgraded when the hook runs, so a rejection returns the `101` and then
16198
+ * closes the client connection with code 1011. No frame is relayed in either
16199
+ * case. Frames the hook sends to `source` are delivered once the caller has
16200
+ * received the `101`, ahead of any frame relayed from the upstream. Outbound
16201
+ * message policies there process one frame at a time, in the order the
16202
+ * upstream sent them.
16203
+ *
16196
16204
  * @param target - The upstream socket (gateway to origin).
16197
16205
  * @param source - The client-facing socket (gateway to caller).
16198
16206
  * @param request - The {@link ZuploRequest} that initiated the upgrade.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "7.13.6",
4
+ "version": "7.13.7",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/cli",
3
- "version": "7.13.6",
3
+ "version": "7.13.7",
4
4
  "repository": "https://github.com/zuplo/zuplo",
5
5
  "author": "Zuplo, Inc.",
6
6
  "type": "module",
@@ -31,10 +31,10 @@
31
31
  "@opentelemetry/api": "1.9.0",
32
32
  "@opentelemetry/api-logs": "0.220.0",
33
33
  "@swc/core": "1.10.18",
34
- "@zuplo/core": "7.13.6",
34
+ "@zuplo/core": "7.13.7",
35
35
  "@zuplo/editor": "1.0.39603386871",
36
- "@zuplo/openapi-tools": "7.13.6",
37
- "@zuplo/runtime": "7.13.6",
36
+ "@zuplo/openapi-tools": "7.13.7",
37
+ "@zuplo/runtime": "7.13.7",
38
38
  "chalk": "5.4.1",
39
39
  "chokidar": "3.5.3",
40
40
  "cookie": "1.0.2",
@@ -65,15 +65,15 @@
65
65
  "workerd": "1.20261002.1",
66
66
  "yargs": "17.7.2",
67
67
  "zod": "4.6.7",
68
- "@zuplo/graphql": "7.13.6",
69
- "@zuplo/otel": "7.13.6"
68
+ "@zuplo/graphql": "7.13.7",
69
+ "@zuplo/otel": "7.13.7"
70
70
  },
71
71
  "optionalDependencies": {
72
- "@zuplo/lint-darwin-arm64": "7.13.6",
73
- "@zuplo/lint-darwin-x64": "7.13.6",
74
- "@zuplo/lint-linux-x64": "7.13.6",
75
- "@zuplo/lint-linux-arm64": "7.13.6",
76
- "@zuplo/lint-win32-x64": "7.13.6"
72
+ "@zuplo/lint-darwin-arm64": "7.13.7",
73
+ "@zuplo/lint-darwin-x64": "7.13.7",
74
+ "@zuplo/lint-linux-x64": "7.13.7",
75
+ "@zuplo/lint-linux-arm64": "7.13.7",
76
+ "@zuplo/lint-win32-x64": "7.13.7"
77
77
  },
78
78
  "bundleDependencies": [
79
79
  "@inquirer/prompts",