@zuplo/cli 7.8.15 → 7.8.17

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{E as p,J as c,M as u}from"../chunk-ZMI5PZYB.js";import"../chunk-54HRCPVQ.js";import{a as d}from"../chunk-QGAJTUPE.js";import"../chunk-A3QGJZO7.js";import"../chunk-6O4OZCO6.js";import{aa as i}from"../chunk-MWIJG5KC.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{E as p,J as c,M as u}from"../chunk-N3MU52FH.js";import"../chunk-54HRCPVQ.js";import{a as d}from"../chunk-QGAJTUPE.js";import"../chunk-A3QGJZO7.js";import"../chunk-6O4OZCO6.js";import{aa as i}from"../chunk-MWIJG5KC.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
@@ -158,6 +158,12 @@ export declare interface AIGatewayAuthInboundPolicyOptions {
158
158
  * the stored configuration ID to match the URL (adding `config_` for `/a`).
159
159
  * It returns 403 on mismatch.
160
160
  *
161
+ * On a User App route (`/u/{app_id}`), only a personal API key issued for
162
+ * that User App authenticates. `request.user.sub` is then the key owner's
163
+ * user ID. An application API key on a User App route, or a personal API key
164
+ * on any other route, returns 403. Validation results are cached for
165
+ * `cacheTtlSeconds`, so a revoked key stops working within that window.
166
+ *
161
167
  * @title AI Gateway Authentication
162
168
  * @product ai-gateway
163
169
  * @requiresAI
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "7.8.15",
4
+ "version": "7.8.17",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {
@@ -2,9 +2,9 @@ export default function ansiRegex({onlyFirst = false} = {}) {
2
2
  // Valid string terminator sequences are BEL, ESC\, and 0x9c
3
3
  const ST = '(?:\\u0007|\\u001B\\u005C|\\u009C)';
4
4
 
5
- // OSC sequences only: ESC ] ... ST
6
- // The payload stops at the first terminator character rather than scanning ahead for one, so an unterminated `ESC ]` cannot rescan the rest of the input. Terminals likewise abort a control string on an unexpected ESC.
7
- const osc = `(?:\\u001B\\][^\\u0007\\u001B\\u009C]*${ST})`;
5
+ // OSC sequences only: ESC ] ... ST (or the C1 introducer 0x9d ... ST)
6
+ // The payload stops at the first terminator character rather than scanning ahead for one, so an unterminated `ESC ]` cannot rescan the rest of the input. Terminals likewise abort a control string on an unexpected ESC. The payload also stops at 0x9d so an unterminated C1 OSC cannot swallow the next one.
7
+ const osc = `(?:(?:\\u001B\\]|\\u009D)[^\\u0007\\u001B\\u009C\\u009D]*${ST})`;
8
8
 
9
9
  // CSI and related: ESC/C1, optional intermediates, optional params (supports ; and :) then final byte
10
10
  const csi = '[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ansi-regex",
3
- "version": "6.3.0",
3
+ "version": "6.4.0",
4
4
  "description": "Regular expression for matching ANSI escape codes",
5
5
  "license": "MIT",
6
6
  "repository": "chalk/ansi-regex",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/cli",
3
- "version": "7.8.15",
3
+ "version": "7.8.17",
4
4
  "repository": "https://github.com/zuplo/zuplo",
5
5
  "author": "Zuplo, Inc.",
6
6
  "type": "module",
@@ -28,10 +28,10 @@
28
28
  "@opentelemetry/api": "1.9.0",
29
29
  "@opentelemetry/api-logs": "0.220.0",
30
30
  "@swc/core": "1.10.18",
31
- "@zuplo/core": "7.8.15",
31
+ "@zuplo/core": "7.8.17",
32
32
  "@zuplo/editor": "1.0.33162667821",
33
- "@zuplo/openapi-tools": "7.8.15",
34
- "@zuplo/runtime": "7.8.15",
33
+ "@zuplo/openapi-tools": "7.8.17",
34
+ "@zuplo/runtime": "7.8.17",
35
35
  "chalk": "5.4.1",
36
36
  "chokidar": "3.5.3",
37
37
  "cookie": "1.0.2",
@@ -62,15 +62,15 @@
62
62
  "workerd": "1.20250821.0",
63
63
  "yargs": "17.7.2",
64
64
  "zod": "4.4.3",
65
- "@zuplo/graphql": "7.8.15",
66
- "@zuplo/otel": "7.8.15"
65
+ "@zuplo/graphql": "7.8.17",
66
+ "@zuplo/otel": "7.8.17"
67
67
  },
68
68
  "optionalDependencies": {
69
- "@zuplo/lint-darwin-arm64": "7.8.15",
70
- "@zuplo/lint-darwin-x64": "7.8.15",
71
- "@zuplo/lint-linux-x64": "7.8.15",
72
- "@zuplo/lint-linux-arm64": "7.8.15",
73
- "@zuplo/lint-win32-x64": "7.8.15"
69
+ "@zuplo/lint-darwin-arm64": "7.8.17",
70
+ "@zuplo/lint-darwin-x64": "7.8.17",
71
+ "@zuplo/lint-linux-x64": "7.8.17",
72
+ "@zuplo/lint-linux-arm64": "7.8.17",
73
+ "@zuplo/lint-win32-x64": "7.8.17"
74
74
  },
75
75
  "bundleDependencies": [
76
76
  "@inquirer/prompts",