@zuplo/runtime 6.10.0 → 6.10.1
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/index.js +19 -19
- package/out/esm/mocks/index.js +1 -1
- package/out/types/index.d.ts +0 -29
- package/out/types/internal/index.d.ts +0 -27
- package/out/types/mocks/index.d.ts +0 -4
- package/package.json +1 -1
package/out/esm/mocks/index.js
CHANGED
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{a as n}from"../chunk-PPV7V43C.js";function a(s={request:new Request("https://api.example.com")}){let e=[];function o(t){e.push(Promise.resolve(t))}return n(o,"waitUntil"),{context:new i({event:{waitUntil:o},route:s.route}),invokeResponse:n(async()=>{await Promise.all(e)},"invokeResponse")}}n(a,"createMockContext");var l={path:"/",methods:["GET"],handler:{module:{},export:"default"},
|
|
25
|
+
import{a as n}from"../chunk-PPV7V43C.js";function a(s={request:new Request("https://api.example.com")}){let e=[];function o(t){e.push(Promise.resolve(t))}return n(o,"waitUntil"),{context:new i({event:{waitUntil:o},route:s.route}),invokeResponse:n(async()=>{await Promise.all(e)},"invokeResponse")}}n(a,"createMockContext");var l={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:n(()=>({}),"raw")},i=class extends EventTarget{static{n(this,"MockZuploContext")}#e;requestId;log;route;custom;incomingRequestProperties;constructor({event:e,route:o=l}){super(),this.requestId=crypto.randomUUID(),this.log={info:console.info,log:console.log,debug:console.debug,warn:console.warn,error: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},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")}addResponseSendingHook(e){throw new Error("Not implemented")}addResponseSendingFinalHook(e){throw new Error("Not implemented")}addEventListener(e,o,r){let u=n(t=>{try{typeof o=="function"?o(t):o.handleEvent(t)}catch(d){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),d}},"wrapped");super.addEventListener(e,u,r)}};export{i as MockZuploContext,a as createMockContext};
|
|
26
26
|
/*! For license information please see index.js.LEGAL.txt */
|
package/out/types/index.d.ts
CHANGED
|
@@ -776,10 +776,6 @@ declare interface BuildRouteConfiguration {
|
|
|
776
776
|
/* @deprecated This property is deprecated. Use route.raw() instead.
|
|
777
777
|
*/
|
|
778
778
|
custom?: any;
|
|
779
|
-
/**
|
|
780
|
-
/* @deprecated This property is not used and will be removed in future versions
|
|
781
|
-
*/
|
|
782
|
-
version: string;
|
|
783
779
|
policies?: {
|
|
784
780
|
inbound?: string[];
|
|
785
781
|
outbound?: string[];
|
|
@@ -4642,10 +4638,6 @@ export declare interface RouteData {
|
|
|
4642
4638
|
/* @deprecated This property is not used and will be removed in future versions
|
|
4643
4639
|
*/
|
|
4644
4640
|
info?: OpenAPIV3_1.InfoObject;
|
|
4645
|
-
/**
|
|
4646
|
-
/* @deprecated This property is not used and will be removed in future versions
|
|
4647
|
-
*/
|
|
4648
|
-
versions: VersionData[];
|
|
4649
4641
|
/**
|
|
4650
4642
|
* @minItems 0
|
|
4651
4643
|
*/
|
|
@@ -4664,8 +4656,6 @@ export declare interface RouteHandler<T = unknown> {
|
|
|
4664
4656
|
|
|
4665
4657
|
/* Excluded from this release type: Router */
|
|
4666
4658
|
|
|
4667
|
-
/* Excluded from this release type: RouterEntry */
|
|
4668
|
-
|
|
4669
4659
|
/* Excluded from this release type: RuntimeEnvironment */
|
|
4670
4660
|
|
|
4671
4661
|
/**
|
|
@@ -5448,25 +5438,6 @@ declare type ValidationOptions2 = "none" | "log-only" | "reject-and-log" | "reje
|
|
|
5448
5438
|
*/
|
|
5449
5439
|
declare type ValidationOptions3 = "none" | "log-only" | "reject-and-log" | "reject-only";
|
|
5450
5440
|
|
|
5451
|
-
export declare interface VersionData {
|
|
5452
|
-
name: string;
|
|
5453
|
-
pathPrefix: string;
|
|
5454
|
-
info?: OpenAPIV3_1.InfoObject;
|
|
5455
|
-
/**
|
|
5456
|
-
* The project relative path to the OpenAPI spec.
|
|
5457
|
-
*/
|
|
5458
|
-
openApiFile?: string;
|
|
5459
|
-
tags?: Omit<OpenAPIV3_1.TagObject, "externalDocs">[];
|
|
5460
|
-
/**
|
|
5461
|
-
* If false, OpenAPI documentation will not be generated for this version. If openApiFile is set this setting is ignored.
|
|
5462
|
-
*/
|
|
5463
|
-
excludeFromOpenApi?: boolean;
|
|
5464
|
-
/**
|
|
5465
|
-
* If true, schema validation found in the OpenAPI spec will be enforced on requests/responses.
|
|
5466
|
-
*/
|
|
5467
|
-
enforceOpenApi?: boolean;
|
|
5468
|
-
}
|
|
5469
|
-
|
|
5470
5441
|
declare interface VMWareLogInsightLoggingOptions {
|
|
5471
5442
|
url: string;
|
|
5472
5443
|
/**
|
|
@@ -17,10 +17,6 @@ declare interface BuildRouteConfiguration {
|
|
|
17
17
|
/* @deprecated This property is deprecated. Use route.raw() instead.
|
|
18
18
|
*/
|
|
19
19
|
custom?: any;
|
|
20
|
-
/**
|
|
21
|
-
/* @deprecated This property is not used and will be removed in future versions
|
|
22
|
-
*/
|
|
23
|
-
version: string;
|
|
24
20
|
policies?: {
|
|
25
21
|
inbound?: string[];
|
|
26
22
|
outbound?: string[];
|
|
@@ -969,10 +965,6 @@ export declare interface RouteData {
|
|
|
969
965
|
/* @deprecated This property is not used and will be removed in future versions
|
|
970
966
|
*/
|
|
971
967
|
info?: OpenAPIV3_1.InfoObject;
|
|
972
|
-
/**
|
|
973
|
-
/* @deprecated This property is not used and will be removed in future versions
|
|
974
|
-
*/
|
|
975
|
-
versions: VersionData[];
|
|
976
968
|
/**
|
|
977
969
|
* @minItems 0
|
|
978
970
|
*/
|
|
@@ -986,23 +978,4 @@ export declare function sanitizedIdentifierName(name: string): string;
|
|
|
986
978
|
|
|
987
979
|
/* Excluded from this release type: StandardEnv */
|
|
988
980
|
|
|
989
|
-
export declare interface VersionData {
|
|
990
|
-
name: string;
|
|
991
|
-
pathPrefix: string;
|
|
992
|
-
info?: OpenAPIV3_1.InfoObject;
|
|
993
|
-
/**
|
|
994
|
-
* The project relative path to the OpenAPI spec.
|
|
995
|
-
*/
|
|
996
|
-
openApiFile?: string;
|
|
997
|
-
tags?: Omit<OpenAPIV3_1.TagObject, "externalDocs">[];
|
|
998
|
-
/**
|
|
999
|
-
* If false, OpenAPI documentation will not be generated for this version. If openApiFile is set this setting is ignored.
|
|
1000
|
-
*/
|
|
1001
|
-
excludeFromOpenApi?: boolean;
|
|
1002
|
-
/**
|
|
1003
|
-
* If true, schema validation found in the OpenAPI spec will be enforced on requests/responses.
|
|
1004
|
-
*/
|
|
1005
|
-
enforceOpenApi?: boolean;
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
981
|
export { }
|
|
@@ -15,10 +15,6 @@ declare interface BuildRouteConfiguration {
|
|
|
15
15
|
/* @deprecated This property is deprecated. Use route.raw() instead.
|
|
16
16
|
*/
|
|
17
17
|
custom?: any;
|
|
18
|
-
/**
|
|
19
|
-
/* @deprecated This property is not used and will be removed in future versions
|
|
20
|
-
*/
|
|
21
|
-
version: string;
|
|
22
18
|
policies?: {
|
|
23
19
|
inbound?: string[];
|
|
24
20
|
outbound?: string[];
|