@zuplo/runtime 7.8.3 → 7.8.4
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.
- package/out/esm/{chunk-B66NTKQQ.js → chunk-LSAHV4RV.js} +101 -101
- package/out/esm/{chunk-B66NTKQQ.js.map → chunk-LSAHV4RV.js.map} +1 -1
- package/out/esm/index.js +1 -1
- package/out/esm/mcp-gateway/index.js +1 -1
- package/out/esm/mocks/index.js +1 -1
- package/out/types/index.d.ts +12 -0
- package/package.json +1 -1
- /package/out/esm/{chunk-B66NTKQQ.js.LEGAL.txt → chunk-LSAHV4RV.js.LEGAL.txt} +0 -0
package/out/esm/mocks/index.js
CHANGED
|
@@ -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-
|
|
25
|
+
import{E as p,J as c,M as u}from"../chunk-LSAHV4RV.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
|
package/out/types/index.d.ts
CHANGED
|
@@ -1259,6 +1259,12 @@ export declare type AIGatewaySmartRouterComplexity = "low" | "medium" | "high";
|
|
|
1259
1259
|
* Classification failures, timeouts, and invalid options fail open: the
|
|
1260
1260
|
* original request is forwarded.
|
|
1261
1261
|
*
|
|
1262
|
+
* `classifierAppID` must not be this app's own id, and the classifier app it
|
|
1263
|
+
* names must not run this policy itself. Both are rejected with a
|
|
1264
|
+
* `ConfigurationError` — thrown, not logged and failed open like every other
|
|
1265
|
+
* classifier failure — so a misconfigured routing loop is never mistaken for
|
|
1266
|
+
* smart routing that is simply doing nothing.
|
|
1267
|
+
*
|
|
1262
1268
|
* @param request - The ZuploRequest
|
|
1263
1269
|
* @param context - The ZuploContext
|
|
1264
1270
|
* @param options - The policy options set in policies.json
|
|
@@ -1575,6 +1581,12 @@ export declare interface AkamaiAIFirewallPolicyOptions {
|
|
|
1575
1581
|
* For streaming responses it uses a transform stream that can block content
|
|
1576
1582
|
* mid-stream if harmful content is detected.
|
|
1577
1583
|
*
|
|
1584
|
+
* Do not add this policy to the inbound chain of an app used as a Smart
|
|
1585
|
+
* Router classifier (`classifierAppID`). The firewall would inspect Smart
|
|
1586
|
+
* Router's internal classification call as if it were a completion request,
|
|
1587
|
+
* and Smart Router fails open on the resulting denial — so this is rejected
|
|
1588
|
+
* with a `ConfigurationError` rather than silently degrading classification.
|
|
1589
|
+
*
|
|
1578
1590
|
* @param request - The ZuploRequest
|
|
1579
1591
|
* @param context - The ZuploContext
|
|
1580
1592
|
* @param options - The policy options set in policies.json
|
package/package.json
CHANGED
|
File without changes
|