@zuplo/runtime 7.8.11 → 7.8.12
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-4YOUFRQJ.js → chunk-7FZV6CLW.js} +106 -106
- package/out/esm/chunk-7FZV6CLW.js.map +1 -0
- 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 +4 -3
- package/package.json +1 -1
- package/out/esm/chunk-4YOUFRQJ.js.map +0 -1
- /package/out/esm/{chunk-4YOUFRQJ.js.LEGAL.txt → chunk-7FZV6CLW.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-7FZV6CLW.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
|
@@ -155,7 +155,8 @@ export declare interface AIGatewayAuthInboundPolicyOptions {
|
|
|
155
155
|
*
|
|
156
156
|
* When the matched route captures an `app_id` path parameter (platform catch-all
|
|
157
157
|
* `/:app_id/(.*)`), this policy also requires
|
|
158
|
-
*
|
|
158
|
+
* the stored configuration ID to match the URL (adding `config_` for `/a`).
|
|
159
|
+
* It returns 403 on mismatch.
|
|
159
160
|
*
|
|
160
161
|
* @title AI Gateway Authentication
|
|
161
162
|
* @product ai-gateway
|
|
@@ -1284,10 +1285,10 @@ export declare function AIGatewaySmartRouterInboundPolicy(
|
|
|
1284
1285
|
*/
|
|
1285
1286
|
export declare interface AIGatewaySmartRouterInboundPolicyOptions {
|
|
1286
1287
|
classifierAppID: ClassifierAppID_2;
|
|
1287
|
-
classifierAppApiKey?: ClassifierAppAPIKey;
|
|
1288
1288
|
classifierModel: ClassifierModel_2;
|
|
1289
|
-
smartRoutingEnabled?: SmartRoutingEnabled;
|
|
1290
1289
|
modelsByComplexity: ModelsByComplexity;
|
|
1290
|
+
classifierAppApiKey?: ClassifierAppAPIKey;
|
|
1291
|
+
smartRoutingEnabled?: SmartRoutingEnabled;
|
|
1291
1292
|
intents?: Intents;
|
|
1292
1293
|
classifierPrompt?: ClassifierPrompt_2;
|
|
1293
1294
|
minConfidenceForRouting?: MinimumConfidenceForRouting;
|