@zuplo/runtime 6.54.14 → 6.54.16
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-DJ47NX57.js → chunk-EO2EJJCU.js} +5 -5
- package/out/esm/{chunk-SEPHSKCD.js → chunk-MURXRXQH.js} +1 -1
- package/out/esm/index.js +58 -58
- package/out/esm/internal/index.js +1 -1
- package/out/esm/mocks/index.js +1 -1
- package/out/types/index.d.ts +19 -6
- package/package.json +1 -1
- /package/out/esm/{chunk-DJ47NX57.js.LEGAL.txt → chunk-EO2EJJCU.js.LEGAL.txt} +0 -0
|
@@ -22,4 +22,4 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{b as e,c as t,e as a,f as o,g as r,h as i,i as n}from"../chunk-
|
|
25
|
+
import{b as e,c as t,e as a,f as o,g as r,h as i,i as n}from"../chunk-MURXRXQH.js";import"../chunk-EO2EJJCU.js";export{o as getIdForParameterSchema,i as getIdForRefSchema,r as getIdForRequestBodySchema,a as getRawOperationDataIdentifierName,e as isRestrictedEnvVariableName,t as isZuploReadableEnvVariableName,n as sanitizedIdentifierName};
|
package/out/esm/mocks/index.js
CHANGED
|
@@ -22,4 +22,4 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{
|
|
25
|
+
import{Z as n,a as t}from"../chunk-EO2EJJCU.js";function m(u={request:new Request("https://api.example.com")}){let e=[];function o(i){e.push(Promise.resolve(i))}return t(o,"waitUntil"),{context:new s({event:{waitUntil:o},route:u.route}),invokeResponse:t(async()=>{await Promise.all(e)},"invokeResponse")}}t(m,"createMockContext");var l={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:t(()=>({}),"raw")},s=class extends EventTarget{static{t(this,"MockZuploContext")}#e;contextId;requestId;log;route;custom;incomingRequestProperties;parentContext;constructor({event:e,route:o=l,parentContext:r}){super(),this.requestId=crypto.randomUUID(),this.contextId=crypto.randomUUID(),this.log={info:n.console.info,log:n.console.log,debug:n.console.debug,warn:n.console.warn,error:n.console.error},this.custom={},this.route=o,this.incomingRequestProperties={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},this.parentContext=r,this.#e=e}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,o){throw new Error("Not implemented")}invokeOutboundPolicy(e,o,r){throw new Error("Not implemented")}invokeRoute(e,o){throw new Error("Not implemented")}addResponseSendingHook(e){throw new Error("Not implemented")}addResponseSendingFinalHook(e){throw new Error("Not implemented")}addEventListener(e,o,r){let d=t(i=>{try{typeof o=="function"?o(i):o.handleEvent(i)}catch(p){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),p}},"wrapped");super.addEventListener(e,d,r)}};export{s as MockZuploContext,m as createMockContext};
|
package/out/types/index.d.ts
CHANGED
|
@@ -4424,14 +4424,10 @@ export declare interface JWTScopeValidationInboundPolicyOptions {
|
|
|
4424
4424
|
export declare class JwtServicePlugin extends SystemRuntimePlugin {
|
|
4425
4425
|
#private;
|
|
4426
4426
|
static signJwt({
|
|
4427
|
-
payload,
|
|
4428
4427
|
audience,
|
|
4429
4428
|
subject,
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
audience?: string;
|
|
4433
|
-
subject?: string;
|
|
4434
|
-
}): Promise<string>;
|
|
4429
|
+
...payload
|
|
4430
|
+
}: JWTSignPayload): Promise<string>;
|
|
4435
4431
|
constructor(options?: JwtServicePluginOptions);
|
|
4436
4432
|
registerRoutes({
|
|
4437
4433
|
runtimeSettings,
|
|
@@ -4466,6 +4462,23 @@ declare interface JwtServicePluginOptions {
|
|
|
4466
4462
|
tokenExpiration?: number | string;
|
|
4467
4463
|
}
|
|
4468
4464
|
|
|
4465
|
+
declare interface JWTSignPayload {
|
|
4466
|
+
/**
|
|
4467
|
+
* The subject of the JWT.
|
|
4468
|
+
* This is typically the user ID or a unique identifier for the entity the JWT represents.
|
|
4469
|
+
* It is used to identify the principal that the JWT is issued to.
|
|
4470
|
+
* If not provided, the JWT will not have a subject claim.
|
|
4471
|
+
*/
|
|
4472
|
+
subject?: string;
|
|
4473
|
+
/**
|
|
4474
|
+
* The audience of the JWT.
|
|
4475
|
+
* This is typically the intended recipient of the JWT, i.e. the URL of the service.
|
|
4476
|
+
* If not provided, the JWT will not have an audience claim.
|
|
4477
|
+
*/
|
|
4478
|
+
audience?: string;
|
|
4479
|
+
[key: string]: any;
|
|
4480
|
+
}
|
|
4481
|
+
|
|
4469
4482
|
/**
|
|
4470
4483
|
* @beta
|
|
4471
4484
|
*/
|
package/package.json
CHANGED
|
File without changes
|