@zuplo/runtime 6.55.1 → 6.55.3
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-EO2EJJCU.js → chunk-PK7WNQLG.js} +4 -4
- package/out/esm/{chunk-MURXRXQH.js → chunk-ZYJCTQEG.js} +1 -1
- package/out/esm/index.js +3 -3
- package/out/esm/internal/index.js +1 -1
- package/out/esm/mocks/index.js +1 -1
- package/out/types/index.d.ts +13 -0
- package/package.json +1 -1
- /package/out/esm/{chunk-EO2EJJCU.js.LEGAL.txt → chunk-PK7WNQLG.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-ZYJCTQEG.js";import"../chunk-PK7WNQLG.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{Z as n,a as t}from"../chunk-
|
|
25
|
+
import{Z as n,a as t}from"../chunk-PK7WNQLG.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
|
@@ -4810,6 +4810,19 @@ declare interface MemoryCacheOptions {
|
|
|
4810
4810
|
* Data is first checked in memory cache for fastest access, then falls back to
|
|
4811
4811
|
* zone cache if not found. Writes update both cache tiers.
|
|
4812
4812
|
*
|
|
4813
|
+
* The in memory cache is an LRU cache that will evict the least recently used items
|
|
4814
|
+
* when the cache is full. The in memory cache is also periodically purged of
|
|
4815
|
+
* expired items.
|
|
4816
|
+
*
|
|
4817
|
+
* In the event that two MemoryZoneReadThroughCache instances are created
|
|
4818
|
+
* with the same name, they will share the same underlying in-memory cache. This
|
|
4819
|
+
* allows for multiple instances to be created in different parts of the codebase
|
|
4820
|
+
* without having to pass the cache instance around. If two instances are created
|
|
4821
|
+
* with the same name, but different memory cache options, the options of the
|
|
4822
|
+
* first instance created will be used.
|
|
4823
|
+
*
|
|
4824
|
+
*
|
|
4825
|
+
*
|
|
4813
4826
|
* @public
|
|
4814
4827
|
* @example
|
|
4815
4828
|
* ```typescript
|
package/package.json
CHANGED
|
File without changes
|