@zuplo/runtime 6.18.21 → 6.18.22

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.
Files changed (2) hide show
  1. package/out/esm/index.js +1 -1
  2. package/package.json +1 -1
package/out/esm/index.js CHANGED
@@ -78,7 +78,7 @@ import{a as f,b as De,e as Re,f as nu,g as Fn,h as jn,i as ru,j as ou}from"./chu
78
78
  </div>
79
79
  </body>
80
80
  </html>
81
- `,"notAvailablePage"),_s=i((n,e)=>{let{sitePathname:t}=e.runtimeSettings.developerPortal,{deploymentName:r,zudokuHostUrl:o}=f.instance,s=i(async(c,l)=>{if(f.instance.isLocalDevelopment)return new Response(Ls("local development"),{headers:{"content-type":"text/html"}});if(f.instance.isWorkingCopy)return new Response(Ls("working copy"),{headers:{"content-type":"text/html"}});if(!r)return E.internalServerError(c,l,{detail:"Unable to retrieve deployment name. Please contact support for assistance."});let d=new URL(c.url),p=new URL(`deployments/${r}${d.pathname}${d.search}`,o);return await H.fetch(p.toString(),{headers:c.headers,method:c.method,body:c.body,redirect:"manual"})},"devPortalRoute"),a=new pe({processors:[he,mt],handler:s,gateway:e}),u=new ce({label:"SYSTEM_API_DOCS_ZUDOKU_ROUTE",methods:["GET","HEAD"],path:`${t}(.*)`,systemRouteName:"zudoku-portal"});n.addRoute(u,a.execute)},"registerZudokuRoute");var Hr=0,$t=class{static{i(this,"CoreLogger")}constructor(e,t,r,o,s){this.#n=t,this.#r=r??"local",this.#o=o,this.#i=s,this.#e(e)}#e=i(e=>{let t=["error","warn","info","debug"],r=!1,o=i(()=>{},"emptyFunction"),s=i((a,u)=>{this.#i.forEach(c=>{c.log(a,u)})},"pushFunction");t.forEach(a=>{this.#t[a]=r?o:s,a==e&&(r=!0)})},"#setupMethods");#t={};#n;#r;#o;#i;log(e,t,r,o,s,a){Hr>=Number.MAX_SAFE_INTEGER&&(Hr=0);let u={logId:crypto.randomUUID(),requestId:r,rayId:o,level:e,logSource:t,messages:s,timestamp:new Date,logOwner:this.#n,loggingId:this.#r,buildId:this.#o,vectorClock:Hr++};this.#t[e](u,a)}};var fe=class extends je{static{i(this,"LogPlugin")}};var fn=class{static{i(this,"LoggingContext")}constructor(e,t,r,o){this.#e=e,this.custom=t,this.originalRequest=r,this.route=o}#e;custom;originalRequest;route;waitUntil=i(e=>{this.#e.waitUntil(e)},"waitUntil")};var Ft=class{static{i(this,"RequestLogger")}constructor(e,t,r,o){this.#t=e,this.#n=t,this.#r=r,this.#o=o}#e="request";#t;#n;#r;#o;debug=i((...e)=>{this.#r.log("debug",this.#e,this.#t,this.#n,e,this.#o)},"debug");info=i((...e)=>{this.#r.log("info",this.#e,this.#t,this.#n,e,this.#o)},"info");log=i((...e)=>{this.#r.log("info",this.#e,this.#t,this.#n,e,this.#o)},"log");warn=i((...e)=>{this.#r.log("warn",this.#e,this.#t,this.#n,e,this.#o)},"warn");error=i((...e)=>{this.#r.log("error",this.#e,this.#t,this.#n,e,this.#o)},"error")};var nc=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError].filter(Boolean).map(n=>[n.name,n]),rc=new Map(nc);var oc=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0},{property:"cause",enumerable:!1}],$r=Symbol(".toJSON was called"),ic=i(n=>{n[$r]=!0;let e=n.toJSON();return delete n[$r],e},"toJSON"),sc=i(n=>rc.get(n)??Error,"getErrorConstructor"),Ns=i(({from:n,seen:e,to:t,forceEnumerable:r,maxDepth:o,depth:s,useToJSON:a,serialize:u})=>{if(!t)if(Array.isArray(n))t=[];else if(!u&&qt(n)){let l=sc(n.name);t=new l}else t={};if(e.push(n),s>=o)return t;if(a&&typeof n.toJSON=="function"&&n[$r]!==!0)return ic(n);let c=i(l=>Ns({from:l,seen:[...e],forceEnumerable:r,maxDepth:o,depth:s,useToJSON:a,serialize:u}),"continueDestroyCircular");for(let[l,d]of Object.entries(n)){if(typeof Buffer=="function"&&Buffer.isBuffer(d)){t[l]="[object Buffer]";continue}if(d!==null&&typeof d=="object"&&typeof d.pipe=="function"){t[l]="[object Stream]";continue}if(typeof d!="function"){if(!d||typeof d!="object"){t[l]=d;continue}if(!e.includes(n[l])){s++,t[l]=c(n[l]);continue}t[l]="[Circular]"}}for(let{property:l,enumerable:d}of oc)typeof n[l]<"u"&&n[l]!==null&&Object.defineProperty(t,l,{value:qt(n[l])?c(n[l]):n[l],enumerable:r?!0:d,configurable:!0,writable:!0});return t},"destroyCircular");function ot(n,e){let t=e?.maxDepth??Number.POSITIVE_INFINITY,r=e?.useToJSON??!0;return typeof n=="object"&&n!==null?Ns({from:n,seen:[],forceEnumerable:!0,maxDepth:t,depth:0,useToJSON:r,serialize:!0}):typeof n=="function"?`[Function: ${n.name??"anonymous"}]`:n}i(ot,"serializeError");var ac=/file:\/\/\/(.*?)\/dist\//g,uc="at async Event.respondWith";function Fr(n){return typeof n!="string"?n:n.split(`
81
+ `,"notAvailablePage"),_s=i((n,e)=>{let{sitePathname:t}=e.runtimeSettings.developerPortal,{deploymentName:r,zudokuHostUrl:o}=f.instance,s=i(async(c,l)=>{if(f.instance.isLocalDevelopment)return new Response(Ls("local development"),{headers:{"content-type":"text/html"}});if(f.instance.isWorkingCopy)return new Response(Ls("working copy"),{headers:{"content-type":"text/html"}});if(!r)return E.internalServerError(c,l,{detail:"Unable to retrieve deployment name. Please contact support for assistance."});let d=new URL(c.url),p=new URL(`deployments/${r}${d.pathname.substring(t.length)}${d.search}`,o);return await H.fetch(p.toString(),{headers:c.headers,method:c.method,body:c.body,redirect:"manual"})},"devPortalRoute"),a=new pe({processors:[he,mt],handler:s,gateway:e}),u=new ce({label:"SYSTEM_API_DOCS_ZUDOKU_ROUTE",methods:["GET","HEAD"],path:`${t}(.*)`,systemRouteName:"zudoku-portal"});n.addRoute(u,a.execute)},"registerZudokuRoute");var Hr=0,$t=class{static{i(this,"CoreLogger")}constructor(e,t,r,o,s){this.#n=t,this.#r=r??"local",this.#o=o,this.#i=s,this.#e(e)}#e=i(e=>{let t=["error","warn","info","debug"],r=!1,o=i(()=>{},"emptyFunction"),s=i((a,u)=>{this.#i.forEach(c=>{c.log(a,u)})},"pushFunction");t.forEach(a=>{this.#t[a]=r?o:s,a==e&&(r=!0)})},"#setupMethods");#t={};#n;#r;#o;#i;log(e,t,r,o,s,a){Hr>=Number.MAX_SAFE_INTEGER&&(Hr=0);let u={logId:crypto.randomUUID(),requestId:r,rayId:o,level:e,logSource:t,messages:s,timestamp:new Date,logOwner:this.#n,loggingId:this.#r,buildId:this.#o,vectorClock:Hr++};this.#t[e](u,a)}};var fe=class extends je{static{i(this,"LogPlugin")}};var fn=class{static{i(this,"LoggingContext")}constructor(e,t,r,o){this.#e=e,this.custom=t,this.originalRequest=r,this.route=o}#e;custom;originalRequest;route;waitUntil=i(e=>{this.#e.waitUntil(e)},"waitUntil")};var Ft=class{static{i(this,"RequestLogger")}constructor(e,t,r,o){this.#t=e,this.#n=t,this.#r=r,this.#o=o}#e="request";#t;#n;#r;#o;debug=i((...e)=>{this.#r.log("debug",this.#e,this.#t,this.#n,e,this.#o)},"debug");info=i((...e)=>{this.#r.log("info",this.#e,this.#t,this.#n,e,this.#o)},"info");log=i((...e)=>{this.#r.log("info",this.#e,this.#t,this.#n,e,this.#o)},"log");warn=i((...e)=>{this.#r.log("warn",this.#e,this.#t,this.#n,e,this.#o)},"warn");error=i((...e)=>{this.#r.log("error",this.#e,this.#t,this.#n,e,this.#o)},"error")};var nc=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError].filter(Boolean).map(n=>[n.name,n]),rc=new Map(nc);var oc=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0},{property:"cause",enumerable:!1}],$r=Symbol(".toJSON was called"),ic=i(n=>{n[$r]=!0;let e=n.toJSON();return delete n[$r],e},"toJSON"),sc=i(n=>rc.get(n)??Error,"getErrorConstructor"),Ns=i(({from:n,seen:e,to:t,forceEnumerable:r,maxDepth:o,depth:s,useToJSON:a,serialize:u})=>{if(!t)if(Array.isArray(n))t=[];else if(!u&&qt(n)){let l=sc(n.name);t=new l}else t={};if(e.push(n),s>=o)return t;if(a&&typeof n.toJSON=="function"&&n[$r]!==!0)return ic(n);let c=i(l=>Ns({from:l,seen:[...e],forceEnumerable:r,maxDepth:o,depth:s,useToJSON:a,serialize:u}),"continueDestroyCircular");for(let[l,d]of Object.entries(n)){if(typeof Buffer=="function"&&Buffer.isBuffer(d)){t[l]="[object Buffer]";continue}if(d!==null&&typeof d=="object"&&typeof d.pipe=="function"){t[l]="[object Stream]";continue}if(typeof d!="function"){if(!d||typeof d!="object"){t[l]=d;continue}if(!e.includes(n[l])){s++,t[l]=c(n[l]);continue}t[l]="[Circular]"}}for(let{property:l,enumerable:d}of oc)typeof n[l]<"u"&&n[l]!==null&&Object.defineProperty(t,l,{value:qt(n[l])?c(n[l]):n[l],enumerable:r?!0:d,configurable:!0,writable:!0});return t},"destroyCircular");function ot(n,e){let t=e?.maxDepth??Number.POSITIVE_INFINITY,r=e?.useToJSON??!0;return typeof n=="object"&&n!==null?Ns({from:n,seen:[],forceEnumerable:!0,maxDepth:t,depth:0,useToJSON:r,serialize:!0}):typeof n=="function"?`[Function: ${n.name??"anonymous"}]`:n}i(ot,"serializeError");var ac=/file:\/\/\/(.*?)\/dist\//g,uc="at async Event.respondWith";function Fr(n){return typeof n!="string"?n:n.split(`
82
82
  `).filter(e=>!e.trim().startsWith("at async file")).map((e,t)=>{let r=e.replaceAll(ac,"").replaceAll(uc,"").trim();return t===0||r.length===0?r:` ${r}`}).filter(e=>e.length>0).join(`
83
83
  `)}i(Fr,"cleanStack");function hn(n,e,t=""){let r=[],o=e?.maxDepth??3;return i(function s(a,u={},c,l){let d=u.indent||" ",p;u.inlineCharacterLimit===void 0?p={newline:`
84
84
  `,newlineOrSpace:`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "6.18.21",
4
+ "version": "6.18.22",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {