@zuplo/runtime 5.2423.0 → 5.2427.0

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.
@@ -1,24 +0,0 @@
1
- /**
2
- * Echos the value of a value. Trys to print the value out
3
- * in the best way possible given the different types.
4
- *
5
- * @param {Object} obj The object to print out.
6
- * @param {boolean} showHidden
7
- * @param {number} depth
8
- * @param {boolean} colors
9
- * @license MIT (© Joyent)
10
- */
11
- /*!
12
- * cookie
13
- * Copyright(c) 2012-2014 Roman Shtylman
14
- * Copyright(c) 2015 Douglas Christopher Wilson
15
- * MIT Licensed
16
- */
17
- /*!
18
- * Source: https://github.com/lludol/clf-date/blob/master/src/main.js
19
- *
20
- * The MIT License (MIT)
21
- * Copyright (c) 2016 Lerus Ludovic
22
- *
23
- */
24
- /*! For license information please see index.js.LEGAL.txt */
@@ -1,26 +0,0 @@
1
-
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Zuplo, Inc. All rights reserved.
4
- *
5
- * This software and associated documentation files (the "Software") is intended to be used
6
- * only by Zuplo customers solely to develop and test applications that will be deployed
7
- * to Zuplo hosted services. You and others in your organization may use these files on your
8
- * Development Devices solely for the above stated purpose.
9
- *
10
- * Outside of uses stated above, no license is granted for any other purpose including
11
- * without limitation the rights to use, copy, modify, merge, publish, distribute,
12
- * sublicense, host, and/or sell copies of the Software.
13
- *
14
- * The software may include third party components with separate legal notices or governed by
15
- * other agreements, as described in licenses either embedded in or accompanying the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
18
- * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
19
- * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
20
- * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
21
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
- * DEALINGS IN THE SOFTWARE.
23
- *--------------------------------------------------------------------------------------------*/
24
-
25
- "use strict";var U=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var V=Object.prototype.hasOwnProperty;var i=(e,t)=>U(e,"name",{value:t,configurable:!0});var G=(e,t)=>{for(var n in t)U(e,n,{get:t[n],enumerable:!0})},k=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of x(t))!V.call(e,l)&&l!==n&&U(e,l,{get:()=>t[l],enumerable:!(o=w(t,l))||o.enumerable});return e};var B=e=>k(U({},"__esModule",{value:!0}),e);var H={};G(H,{getIdForParameterSchema:()=>D,getIdForRefSchema:()=>M,getIdForRequestBodySchema:()=>S,getRawOperationDataIdentifierName:()=>v,isRestrictedEnvVariableName:()=>R,isZuploReadableEnvVariableName:()=>T,sanitizedIdentifierName:()=>O});module.exports=B(H);function F(e){if(e.length>=255)throw new TypeError("Alphabet too long");let t=new Uint8Array(256);for(let r=0;r<t.length;r++)t[r]=255;for(let r=0;r<e.length;r++){let s=e.charAt(r),d=s.charCodeAt(0);if(t[d]!==255)throw new TypeError(s+" is ambiguous");t[d]=r}let n=e.length,o=e.charAt(0),l=Math.log(n)/Math.log(256),E=Math.log(256)/Math.log(n);function L(r){if(r instanceof Uint8Array||(ArrayBuffer.isView(r)?r=new Uint8Array(r.buffer,r.byteOffset,r.byteLength):Array.isArray(r)&&(r=Uint8Array.from(r))),!(r instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(r.length===0)return"";let s=0,d=0,_=0,c=r.length;for(;_!==c&&r[_]===0;)_++,s++;let f=(c-_)*E+1>>>0,g=new Uint8Array(f);for(;_!==c;){let a=r[_],h=0;for(let m=f-1;(a!==0||h<d)&&m!==-1;m--,h++)a+=256*g[m]>>>0,g[m]=a%n>>>0,a=a/n>>>0;if(a!==0)throw new Error("Non-zero carry");d=h,_++}let p=f-d;for(;p!==f&&g[p]===0;)p++;let P=o.repeat(s);for(;p<f;++p)P+=e.charAt(g[p]);return P}i(L,"encode");function I(r){if(typeof r!="string")throw new TypeError("Expected String");if(r.length===0)return new Uint8Array;let s=0,d=0,_=0;for(;r[s]===o;)d++,s++;let c=(r.length-s)*l+1>>>0,f=new Uint8Array(c);for(;r[s];){let a=t[r.charCodeAt(s)];if(a===255)return;let h=0;for(let m=c-1;(a!==0||h<_)&&m!==-1;m--,h++)a+=n*f[m]>>>0,f[m]=a%256>>>0,a=a/256>>>0;if(a!==0)throw new Error("Non-zero carry");_=h,s++}let g=c-_;for(;g!==c&&f[g]===0;)g++;let p=new Uint8Array(d+(c-g)),P=d;for(;g!==c;)p[P++]=f[g++];return p}i(I,"decodeUnsafe");function Z(r){let s=I(r);if(s)return s;throw new Error("Non-base"+n+" character")}return i(Z,"decode"),{encode:L,decodeUnsafe:I,decode:Z}}i(F,"base");var y=F;var z="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",N=y(z);var A="2024-03-14",C=Object.freeze({none:{runOutboundPoliciesOnHandlerOnAllStatuses:!1,doNotRunHooksOnSystemRoutes:!1,removeAllVendorHeadersExceptListed:!1},"2023-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:!1,doNotRunHooksOnSystemRoutes:!1,removeAllVendorHeadersExceptListed:!1},"2024-01-15":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0},"2024-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0}});function b(){return new u({build:{ACCOUNT_NAME:"mock-account-name",PROJECT_NAME:"mock-project-name",API_VERSION:"0.0.0",BUILD_ID:crypto.randomUUID(),TIMESTAMP:new Date().toISOString(),BUILD_ENV:"test",ZUPLO_VERSION:"0.0.0",COMPATIBILITY_DATE:A,ENVIRONMENT_TYPE:"mock-environment-type",GIT_SHA:void 0,IS_LOCAL_DEVELOPMENT:!1,COMPATIBILITY_FLAGS:C[A]},runtime:{RUNTIME_ENV:"test",RUNTIME_STAGE:"test",__ZUPLO_DEPLOYMENT_NAME:"mock-deployment-name",__ZUPLO_LOG_LEVEL:"debug",__ZUPLO_LOG_FORMAT:"pretty",__ZUPLO_MANAGEMENT_API_URL:"",__ZUPLO_RUNTIME_TYPE:"cloudflare",__ZUPLO_AUTH_API_JWT:""}})}i(b,"getMockEnvironment");var u=class e{static{i(this,"Environment")}config;static#e;static#t=!1;static initialize(t){this.#e||(this.#e=new e(t),this.#t=!0)}static get instance(){return this.#t||(console.debug("Environment has not been initialized. This is okay when running tests, a mock environment will be used."),this.#e=b()),this.#e}constructor({build:t,runtime:n}){let o;try{if(n.__ZUPLO_CONFIG){let l=atob(n.__ZUPLO_CONFIG);o=JSON.parse(l)}if(n.ZUPLO_SYSTEM_CONFIGURATIONS){let l=new TextDecoder().decode(N.decode(n.ZUPLO_SYSTEM_CONFIGURATIONS)),E=JSON.parse(l);for(let L of Object.keys(E))n[L]=E[L]}}catch(l){console.error("Failed to parse runtime configuration",l)}this.config=o??{},this.build=t,this.runtime=n,this.instanceId=crypto.randomUUID()}build;runtime;instanceId;get deploymentName(){return this.runtime.__ZUPLO_DEPLOYMENT_NAME??this.config.deployment_name??void 0}get useLegacyServiceRouting(){return this.config.use_legacy_service_routing??void 0}get useProxyForFetchFromZups(){return this.config.use_proxy_for_fetch_from_zups??void 0}get devPortalBaseUrl(){return this.runtime.__ZUPLO_DEV_PORTAL_URL??this.config.dev_portal_url??"https://dev-portal-v4-1.zuplo.com"}get buildAssetsUrl(){return this.runtime.__ZUPLO_BUILD_ASSETS_URL??this.config.build_assets_url??"https://build-assets.zuplo.com"}get remoteLogToken(){return this.runtime.__ZUPLO_REMOTE_LOG_TOKEN??this.config.remote_log_token??void 0}get zuploClientAuthBucketId(){return this.config.zuplo_auth_client_bucket_id??"auth_o8PUdhKxSTOiB794GWPwLQCD"}get managementApiURL(){return this.runtime.__ZUPLO_MANAGEMENT_API_URL??this.config.management_api_url??"https://api.zuplo.com"}get developerApiUrl(){return this.config.developer_api_url??"https://dev.zuplo.com"}get cdnURL(){return this.runtime.__ZUPLO_CDN_URL??this.config.cdn_url??"https://cdn.zuplo.com"}get remoteLogURL(){return this.runtime.__ZUPLO_REMOTE_LOG_URL??this.config.log_event_api??"https://ellie.zuplo.com"}get loggingId(){return this.runtime.__ZUPLO_LOGGING_ID??this.config.logging_id??void 0}get redisURL(){return this.runtime.__ZUPLO_REDIS_URL??this.config.redis_proxy_url??"https://redis-proxy.zuplo.com"}get apiKeyServiceUrl(){return this.runtime.__ZUPLO_API_KEY_SERVICE_URL??this.config.api_key_service_url??"https://apikey.zuplo.com"}get meteringServiceUrl(){return this.config.metering_service_url??"https://meters.zuplo.com"}get authApiJWT(){return this.runtime.__ZUPLO_AUTH_API_JWT??void 0}get authClientId(){return this.runtime.__ZUPLO_AUTH_CLIENT_ID}get authClientSecret(){return this.runtime.__ZUPLO_AUTH_CLIENT_SECRET}get userLogLevel(){return this.runtime.ZUPLO_LOG_LEVEL??this.runtime.__ZUPLO_LOG_LEVEL??this.config.user_log_level??"debug"}get systemLogLevel(){return this.runtime.__ZUPLO_LOG_LEVEL??this.config.system_log_level??"debug"}get logFormat(){return this.runtime.__ZUPLO_LOG_FORMAT??this.config.log_format??"cloudflare"}get isCloudflare(){return this.runtime.__ZUPLO_RUNTIME_TYPE?this.runtime.__ZUPLO_RUNTIME_TYPE==="cloudflare":this.config.runtime_type?this.config.runtime_type==="cloudflare":typeof WebSocketPair=="function"}get isDeno(){return this.runtime.__ZUPLO_RUNTIME_TYPE?this.runtime.__ZUPLO_RUNTIME_TYPE==="deno":this.config.runtime_type?this.config.runtime_type==="deno":typeof WebSocketPair!="function"}get isLocalDevelopment(){return this.build.IS_LOCAL_DEVELOPMENT}get isTestMode(){return!!this.runtime.__ZUPLO_TEST_MODE}get systemUserAgent(){return`Zuplo/${this.build.ZUPLO_VERSION}`}get loggingEnvironmentType(){return this.isCloudflare?"edge":this.isLocalDevelopment?"local":this.isDeno?"working-copy":"unknown"}get loggingEnvironmentStage(){return this.build.ENVIRONMENT_TYPE==="PRODUCTION"?"production":this.build.ENVIRONMENT_TYPE==="PREVIEW"?"preview":this.isLocalDevelopment?"local":this.isWorkingCopy?"working-copy":"unknown"}get isWorkingCopy(){return this.build.ENVIRONMENT_TYPE==="WORKING_COPY"}};var Y=["ZUPLO_USER_LOGGER_DATA_DOG_API_KEY","ZUPLO_USER_LOGGER_DATA_DOG_URL","ZUPLO_LOG_LEVEL","ZUPLO_HANDLER_WRITE_LOG_LEVEL"];function R(e){return e.startsWith("__ZUPLO")||e.startsWith("ZUPLO_")?!Y.includes(e)&&!e.startsWith("ZUPLO_PUBLIC_"):!1}i(R,"isRestrictedEnvVariableName");function T(e){return!!e.startsWith("ZUPLO_")}i(T,"isZuploReadableEnvVariableName");var ae=new Proxy({},{get(e,t){let n=String(t);switch(n){case"ZUPLO_ENVIRONMENT_TYPE":return u.instance.loggingEnvironmentType;case"ZUPLO_ENVIRONMENT_STAGE":return u.instance.loggingEnvironmentStage;case"ZUPLO_ENVIRONMENT_NAME":return u.instance.runtime.__ZUPLO_DEPLOYMENT_NAME;case"ZUPLO_ACCOUNT_NAME":return u.instance.build.ACCOUNT_NAME;case"ZUPLO_PROJECT_NAME":return u.instance.build.PROJECT_NAME;case"ZUPLO_BUILD_ID":return u.instance.build.BUILD_ID}if(!(R(n)&&!T(n)))return u.instance.runtime[n]}});function v(e,t,n){return`_${O(e+"_"+t+"_"+n)}`}i(v,"getRawOperationDataIdentifierName");function D(e,t,n,o){return`_${O(e.toLowerCase())}_`+t.toLowerCase()+"_"+n.toLowerCase()+`_${o.toLowerCase()}`}i(D,"getIdForParameterSchema");function S(e,t,n){return`_${O(e.toLowerCase())}_`+t.toLowerCase()+`_rb_${O(n.toLowerCase())}`}i(S,"getIdForRequestBodySchema");function M(e,t){return`_${O(e)}__${O(t)}`}i(M,"getIdForRefSchema");function O(e){let t=[];for(let n=0;n<e.length;n++){let o=e.charCodeAt(n);o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122?t.push(e.charAt(n)):t.push("_")}return t.join("")}i(O,"sanitizedIdentifierName");
26
- /*! For license information please see index.js.LEGAL.txt */
@@ -1,26 +0,0 @@
1
-
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Zuplo, Inc. All rights reserved.
4
- *
5
- * This software and associated documentation files (the "Software") is intended to be used
6
- * only by Zuplo customers solely to develop and test applications that will be deployed
7
- * to Zuplo hosted services. You and others in your organization may use these files on your
8
- * Development Devices solely for the above stated purpose.
9
- *
10
- * Outside of uses stated above, no license is granted for any other purpose including
11
- * without limitation the rights to use, copy, modify, merge, publish, distribute,
12
- * sublicense, host, and/or sell copies of the Software.
13
- *
14
- * The software may include third party components with separate legal notices or governed by
15
- * other agreements, as described in licenses either embedded in or accompanying the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
18
- * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
19
- * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
20
- * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
21
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
- * DEALINGS IN THE SOFTWARE.
23
- *--------------------------------------------------------------------------------------------*/
24
-
25
- "use strict";var u=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var r=(n,e)=>u(n,"name",{value:e,configurable:!0});var c=(n,e)=>{for(var o in e)u(n,o,{get:e[o],enumerable:!0})},g=(n,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of p(e))!m.call(n,t)&&t!==o&&u(n,t,{get:()=>e[t],enumerable:!(i=l(e,t))||i.enumerable});return n};var v=n=>g(u({},"__esModule",{value:!0}),n);var E={};c(E,{MockZuploContext:()=>d,createMockContext:()=>R});module.exports=v(E);function R(n={request:new Request("https://api.example.com")}){let e=[];function o(s){e.push(Promise.resolve(s))}return r(o,"waitUntil"),{context:new d({event:{waitUntil:o},route:n.route}),invokeResponse:r(async()=>{await Promise.all(e)},"invokeResponse")}}r(R,"createMockContext");var f={path:"/",methods:["GET"],handler:{module:{},export:"default"},version:"none",raw:r(()=>({}),"raw")},d=class extends EventTarget{static{r(this,"MockZuploContext")}#e;requestId;log;route;custom;incomingRequestProperties;constructor({event:e,route:o=f}){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")}addResponseSendingHook(e){throw new Error("Not implemented")}addResponseSendingFinalHook(e){throw new Error("Not implemented")}addEventListener(e,o,i){let t=r(s=>{try{typeof o=="function"?o(s):o.handleEvent(s)}catch(a){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),a}},"wrapped");super.addEventListener(e,t,i)}};
26
- /*! For license information please see index.js.LEGAL.txt */
@@ -1,36 +0,0 @@
1
-
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Zuplo, Inc. All rights reserved.
4
- *
5
- * This software and associated documentation files (the "Software") is intended to be used
6
- * only by Zuplo customers solely to develop and test applications that will be deployed
7
- * to Zuplo hosted services. You and others in your organization may use these files on your
8
- * Development Devices solely for the above stated purpose.
9
- *
10
- * Outside of uses stated above, no license is granted for any other purpose including
11
- * without limitation the rights to use, copy, modify, merge, publish, distribute,
12
- * sublicense, host, and/or sell copies of the Software.
13
- *
14
- * The software may include third party components with separate legal notices or governed by
15
- * other agreements, as described in licenses either embedded in or accompanying the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
18
- * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
19
- * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
20
- * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
21
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
- * DEALINGS IN THE SOFTWARE.
23
- *--------------------------------------------------------------------------------------------*/
24
-
25
- "use strict";var Ue=Object.create;var P=Object.defineProperty;var Se=Object.getOwnPropertyDescriptor;var Ce=Object.getOwnPropertyNames;var Pe=Object.getPrototypeOf,Ne=Object.prototype.hasOwnProperty;var n=(e,t)=>P(e,"name",{value:t,configurable:!0});var N=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ie=(e,t)=>{for(var r in t)P(e,r,{get:t[r],enumerable:!0})},X=(e,t,r,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ce(t))!Ne.call(e,s)&&s!==r&&P(e,s,{get:()=>t[s],enumerable:!(u=Se(t,s))||u.enumerable});return e};var ve=(e,t,r)=>(r=e!=null?Ue(Pe(e)):{},X(t||!e||!e.__esModule?P(r,"default",{value:e,enumerable:!0}):r,e)),Me=e=>X(P({},"__esModule",{value:!0}),e);var ue=N(i=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});i.generateColor=i.colorFunctions=i.stripColor=i.bgRgb24=i.rgb24=i.bgRgb8=i.rgb8=i.bgBrightWhite=i.bgBrightCyan=i.bgBrightMagenta=i.bgBrightBlue=i.bgBrightYellow=i.bgBrightGreen=i.bgBrightRed=i.bgBrightBlack=i.bgWhite=i.bgCyan=i.bgMagenta=i.bgBlue=i.bgYellow=i.bgGreen=i.bgRed=i.bgBlack=i.brightWhite=i.brightCyan=i.brightMagenta=i.brightBlue=i.brightYellow=i.brightGreen=i.brightRed=i.brightBlack=i.gray=i.white=i.cyan=i.magenta=i.blue=i.yellow=i.green=i.red=i.black=i.strikethrough=i.hidden=i.inverse=i.underline=i.italic=i.dim=i.bold=i.reset=i.getColorEnabled=i.setColorEnabled=void 0;var Q=!0,j=!Q;function ze(e){Q||(j=e)}n(ze,"setColorEnabled");i.setColorEnabled=ze;function Be(){return j}n(Be,"getColorEnabled");i.getColorEnabled=Be;function l(e,t){return{open:`\x1B[${e.join(";")}m`,close:`\x1B[${t}m`,regexp:new RegExp(`\\x1b\\[${t}m`,"g")}}n(l,"code");function a(e,t){return j?`${t.open}${e.replace(t.regexp,t.open)}${t.close}`:e}n(a,"run");function xe(e){return a(e,l([0],0))}n(xe,"reset");i.reset=xe;function ke(e){return a(e,l([1],22))}n(ke,"bold");i.bold=ke;function Ze(e){return a(e,l([2],22))}n(Ze,"dim");i.dim=Ze;function De(e){return a(e,l([3],23))}n(De,"italic");i.italic=De;function je(e){return a(e,l([4],24))}n(je,"underline");i.underline=je;function Fe(e){return a(e,l([7],27))}n(Fe,"inverse");i.inverse=Fe;function $e(e){return a(e,l([8],28))}n($e,"hidden");i.hidden=$e;function He(e){return a(e,l([9],29))}n(He,"strikethrough");i.strikethrough=He;function Ge(e){return a(e,l([30],39))}n(Ge,"black");i.black=Ge;function ee(e){return a(e,l([31],39))}n(ee,"red");i.red=ee;function te(e){return a(e,l([32],39))}n(te,"green");i.green=te;function ne(e){return a(e,l([33],39))}n(ne,"yellow");i.yellow=ne;function re(e){return a(e,l([34],39))}n(re,"blue");i.blue=re;function ie(e){return a(e,l([35],39))}n(ie,"magenta");i.magenta=ie;function oe(e){return a(e,l([36],39))}n(oe,"cyan");i.cyan=oe;function Ye(e){return a(e,l([37],39))}n(Ye,"white");i.white=Ye;function Ve(e){return se(e)}n(Ve,"gray");i.gray=Ve;function se(e){return a(e,l([90],39))}n(se,"brightBlack");i.brightBlack=se;function qe(e){return a(e,l([91],39))}n(qe,"brightRed");i.brightRed=qe;function We(e){return a(e,l([92],39))}n(We,"brightGreen");i.brightGreen=We;function Je(e){return a(e,l([93],39))}n(Je,"brightYellow");i.brightYellow=Je;function Ke(e){return a(e,l([94],39))}n(Ke,"brightBlue");i.brightBlue=Ke;function Xe(e){return a(e,l([95],39))}n(Xe,"brightMagenta");i.brightMagenta=Xe;function Qe(e){return a(e,l([96],39))}n(Qe,"brightCyan");i.brightCyan=Qe;function et(e){return a(e,l([97],39))}n(et,"brightWhite");i.brightWhite=et;function tt(e){return a(e,l([40],49))}n(tt,"bgBlack");i.bgBlack=tt;function nt(e){return a(e,l([41],49))}n(nt,"bgRed");i.bgRed=nt;function rt(e){return a(e,l([42],49))}n(rt,"bgGreen");i.bgGreen=rt;function it(e){return a(e,l([43],49))}n(it,"bgYellow");i.bgYellow=it;function ot(e){return a(e,l([44],49))}n(ot,"bgBlue");i.bgBlue=ot;function st(e){return a(e,l([45],49))}n(st,"bgMagenta");i.bgMagenta=st;function ut(e){return a(e,l([46],49))}n(ut,"bgCyan");i.bgCyan=ut;function ct(e){return a(e,l([47],49))}n(ct,"bgWhite");i.bgWhite=ct;function lt(e){return a(e,l([100],49))}n(lt,"bgBrightBlack");i.bgBrightBlack=lt;function at(e){return a(e,l([101],49))}n(at,"bgBrightRed");i.bgBrightRed=at;function gt(e){return a(e,l([102],49))}n(gt,"bgBrightGreen");i.bgBrightGreen=gt;function ft(e){return a(e,l([103],49))}n(ft,"bgBrightYellow");i.bgBrightYellow=ft;function ht(e){return a(e,l([104],49))}n(ht,"bgBrightBlue");i.bgBrightBlue=ht;function dt(e){return a(e,l([105],49))}n(dt,"bgBrightMagenta");i.bgBrightMagenta=dt;function pt(e){return a(e,l([106],49))}n(pt,"bgBrightCyan");i.bgBrightCyan=pt;function mt(e){return a(e,l([107],49))}n(mt,"bgBrightWhite");i.bgBrightWhite=mt;function w(e,t=255,r=0){return Math.trunc(Math.max(Math.min(e,t),r))}n(w,"clampAndTruncate");function bt(e,t){return a(e,l([38,5,w(t)],39))}n(bt,"rgb8");i.rgb8=bt;function _t(e,t){return a(e,l([48,5,w(t)],49))}n(_t,"bgRgb8");i.bgRgb8=_t;function yt(e,t){return typeof t=="number"?a(e,l([38,2,t>>16&255,t>>8&255,t&255],39)):a(e,l([38,2,w(t.r),w(t.g),w(t.b)],39))}n(yt,"rgb24");i.rgb24=yt;function Et(e,t){return typeof t=="number"?a(e,l([48,2,t>>16&255,t>>8&255,t&255],49)):a(e,l([48,2,w(t.r),w(t.g),w(t.b)],49))}n(Et,"bgRgb24");i.bgRgb24=Et;var Ot=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|"),"g");function Rt(e){return e.replace(Ot,"")}n(Rt,"stripColor");i.stripColor=Rt;i.colorFunctions=[ee,te,ne,re,ie,oe];function wt(e){let t=0,r=e.length,u=0;if(r>0)for(;u<r;)t=(t<<5)-t+e.charCodeAt(u++)|0;return t}n(wt,"hashCode");function Lt(e){let t=Math.abs(wt(e));return i.colorFunctions[t%i.colorFunctions.length]}n(Lt,"generateColor");i.generateColor=Lt});var ce=N(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.format=void 0;function Tt(e,t,...r){let u=0,s=r.length,f=String(t).replace(/%[sdjoO%]/g,o=>{if(o==="%%")return"%";if(u>=s)return o;switch(o){case"%s":return String(r[u++]);case"%d":return Number(r[u++]).toString();case"%o":return e(r[u++]).split(`
26
- `).map(g=>g.trim()).join(" ");case"%O":return e(r[u++]);case"%j":try{return JSON.stringify(r[u++])}catch{return"[Circular]"}default:return o}});for(let o of r.splice(u))o===null||!(typeof o=="object"&&o!==null)?f+=" "+o:f+=" "+e(o);return f}n(Tt,"format");M.format=Tt});var de=N(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.inspect=void 0;function U(e,t,r,u){let s={seen:[],stylize:At,showHidden:t??!1,depth:r??2,colors:u??!1,customInspect:!0};return s.colors&&(s.stylize=St),z(s,e,s.depth)}n(U,"inspect");B.inspect=U;U.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};U.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function At(e,t){return e}n(At,"stylizeNoColor");function Ut(e){return typeof e=="boolean"}n(Ut,"isBoolean");function ae(e){return e===void 0}n(ae,"isUndefined");function St(e,t){let r=U.styles[t];return r?"\x1B["+U.colors[r][0]+"m"+e+"\x1B["+U.colors[r][1]+"m":e}n(St,"stylizeWithColor");function F(e){return typeof e=="function"}n(F,"isFunction");function ge(e){return typeof e=="string"}n(ge,"isString");function Ct(e){return typeof e=="number"}n(Ct,"isNumber");function fe(e){return e===null}n(fe,"isNull");function he(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n(he,"hasOwn");function $(e){return V(e)&&q(e)==="[object RegExp]"}n($,"isRegExp");function V(e){return typeof e=="object"&&e!==null}n(V,"isObject");function H(e){return V(e)&&(q(e)==="[object Error]"||e instanceof Error)}n(H,"isError");function le(e){return V(e)&&q(e)==="[object Date]"}n(le,"isDate");function q(e){return Object.prototype.toString.call(e)}n(q,"objectToString");function Pt(e){let t={};return e.forEach(function(r,u){t[r]=!0}),t}n(Pt,"arrayToHash");function Nt(e,t,r,u,s){let f=[];for(let o=0,g=t.length;o<g;++o)he(t,String(o))?f.push(Y(e,t,r,u,String(o),!0)):f.push("");return s.forEach(function(o){o.match(/^\d+$/)||f.push(Y(e,t,r,u,o,!0))}),f}n(Nt,"formatArray");function G(e){return"["+Error.prototype.toString.call(e)+"]"}n(G,"formatError");function z(e,t,r){if(e.customInspect&&t&&F(t.inspect)&&t.inspect!==U&&!(t.constructor&&t.constructor.prototype===t)){let h=t.inspect(r,e);return ge(h)||(h=z(e,h,r)),h}let u=It(e,t);if(u)return u;let s=Object.keys(t),f=Pt(s);try{e.showHidden&&Object.getOwnPropertyNames&&(s=Object.getOwnPropertyNames(t))}catch{}if(H(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return G(t);if(s.length===0){if(F(t)){let h=t.name?": "+t.name:"";return e.stylize("[Function"+h+"]","special")}if($(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(le(t))return e.stylize(Date.prototype.toString.call(t),"date");if(H(t))return G(t)}let o="",g=!1,d=["{","}"];if(Array.isArray(t)&&(g=!0,d=["[","]"]),F(t)&&(o=" [Function"+(t.name?": "+t.name:"")+"]"),$(t)&&(o=" "+RegExp.prototype.toString.call(t)),le(t)&&(o=" "+Date.prototype.toUTCString.call(t)),H(t)&&(o=" "+G(t)),s.length===0&&(!g||t.length==0))return d[0]+o+d[1];if(r<0)return $(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);let c;return g?c=Nt(e,t,r,f,s):c=s.map(function(h){return Y(e,t,r,f,h,g)}),e.seen.pop(),vt(c,o,d)}n(z,"formatValue");function Y(e,t,r,u,s,f){let o,g,d;d={value:void 0};try{d.value=t[s]}catch{}try{Object.getOwnPropertyDescriptor&&(d=Object.getOwnPropertyDescriptor(t,s)||d)}catch{}if(d.get?d.set?g=e.stylize("[Getter/Setter]","special"):g=e.stylize("[Getter]","special"):d.set&&(g=e.stylize("[Setter]","special")),he(u,s)||(o="["+s+"]"),g||(e.seen.indexOf(d.value)<0?(fe(r)?g=z(e,d.value,null):g=z(e,d.value,r-1),g.indexOf(`
27
- `)>-1&&(f?g=g.split(`
28
- `).map(function(c){return" "+c}).join(`
29
- `).substr(2):g=`
30
- `+g.split(`
31
- `).map(function(c){return" "+c}).join(`
32
- `))):g=e.stylize("[Circular]","special")),ae(o)){if(f&&s.match(/^\d+$/))return g;o=JSON.stringify(""+s),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+g}n(Y,"formatProperty");function It(e,t){if(ae(t))return e.stylize("undefined","undefined");if(ge(t)){let r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(Ct(t))return e.stylize(""+t,"number");if(Ut(t))return e.stylize(""+t,"boolean");if(fe(t))return e.stylize("null","null")}n(It,"formatPrimitive");function vt(e,t,r){let u=0;return e.reduce(function(f,o){return u++,o.indexOf(`
33
- `)>=0&&u++,f+o.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(t===""?"":t+`
34
- `)+" "+e.join(`,
35
- `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}n(vt,"reduceToSingleString")});var pe=N(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.format=void 0;var Mt=ce(),zt=de(),Bt=n((e,...t)=>(0,Mt.format)(zt.inspect,e,t),"format");x.format=Bt});var be=N(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.debug=L.withoutEnv=L.Debugger=void 0;var xt=ue(),kt=pe(),k=class{static{n(this,"Debugger")}manager;ns;color;last;enabled;constructor(t,r){this.manager=t,this.ns=r,this.color=(0,xt.generateColor)(r),this.last=0,this.enabled=t.enabled.some(u=>u.test(r))}log(...t){if(!this.enabled)return;let r,u=t[0];typeof u=="function"?r=u():r=String(u);let s=Date.now()-(this.last||Date.now());r=(0,kt.format)(r,...t);let f=`${this.color(this.ns)} ${r} ${this.color(`+${s}ms`)}`;console.log(f),this.last=Date.now()}};L.Debugger=k;var Z=class{static{n(this,"DebugManager")}debuggers;enabled;constructor(t){this.debuggers=new Map,this.enabled=t??[]}};function me(e){return!e||e.length===0?[]:(e=e.replace(/\s/g,"").replace(/\*/g,".+"),e.split(",").map(t=>new RegExp(`^${t}$`)))}n(me,"extract");var I;function Zt(e){e||(e=[]),typeof e=="string"&&(e=me(e)),I=new Z(e)}n(Zt,"withoutEnv");L.withoutEnv=Zt;function Dt(e){let t=globalThis.DEBUG;I||(I=new Z(me(t)));let r=new k(I,e);return I.debuggers.set(e,r),Object.assign(r.log.bind(r),{self:r})}n(Dt,"debug");L.debug=Dt});var qt={};Ie(qt,{PdpService:()=>K});module.exports=Me(qt);var we=ve(be());var S=class extends Error{static{n(this,"RuntimeError")}extensionMembers;constructor(t,r){typeof t=="string"?super(t,r):(super(t.message,r),this.extensionMembers=t.extensionMembers),this.name="RuntimeError"}};function jt(e){if(e.length>=255)throw new TypeError("Alphabet too long");let t=new Uint8Array(256);for(let c=0;c<t.length;c++)t[c]=255;for(let c=0;c<e.length;c++){let h=e.charAt(c),m=h.charCodeAt(0);if(t[m]!==255)throw new TypeError(h+" is ambiguous");t[m]=c}let r=e.length,u=e.charAt(0),s=Math.log(r)/Math.log(256),f=Math.log(256)/Math.log(r);function o(c){if(c instanceof Uint8Array||(ArrayBuffer.isView(c)?c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength):Array.isArray(c)&&(c=Uint8Array.from(c))),!(c instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(c.length===0)return"";let h=0,m=0,b=0,y=c.length;for(;b!==y&&c[b]===0;)b++,h++;let E=(y-b)*f+1>>>0,_=new Uint8Array(E);for(;b!==y;){let p=c[b],A=0;for(let R=E-1;(p!==0||A<m)&&R!==-1;R--,A++)p+=256*_[R]>>>0,_[R]=p%r>>>0,p=p/r>>>0;if(p!==0)throw new Error("Non-zero carry");m=A,b++}let O=E-m;for(;O!==E&&_[O]===0;)O++;let v=u.repeat(h);for(;O<E;++O)v+=e.charAt(_[O]);return v}n(o,"encode");function g(c){if(typeof c!="string")throw new TypeError("Expected String");if(c.length===0)return new Uint8Array;let h=0,m=0,b=0;for(;c[h]===u;)m++,h++;let y=(c.length-h)*s+1>>>0,E=new Uint8Array(y);for(;c[h];){let p=t[c.charCodeAt(h)];if(p===255)return;let A=0;for(let R=y-1;(p!==0||A<b)&&R!==-1;R--,A++)p+=r*E[R]>>>0,E[R]=p%256>>>0,p=p/256>>>0;if(p!==0)throw new Error("Non-zero carry");b=A,h++}let _=y-b;for(;_!==y&&E[_]===0;)_++;let O=new Uint8Array(m+(y-_)),v=m;for(;_!==y;)O[v++]=E[_++];return O}n(g,"decodeUnsafe");function d(c){let h=g(c);if(h)return h;throw new Error("Non-base"+r+" character")}return n(d,"decode"),{encode:o,decodeUnsafe:g,decode:d}}n(jt,"base");var _e=jt;var Ft="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",ye=_e(Ft);var W="2024-03-14",Ee=Object.freeze({none:{runOutboundPoliciesOnHandlerOnAllStatuses:!1,doNotRunHooksOnSystemRoutes:!1,removeAllVendorHeadersExceptListed:!1},"2023-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:!1,doNotRunHooksOnSystemRoutes:!1,removeAllVendorHeadersExceptListed:!1},"2024-01-15":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0},"2024-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0}});function Oe(){return new T({build:{ACCOUNT_NAME:"mock-account-name",PROJECT_NAME:"mock-project-name",API_VERSION:"0.0.0",BUILD_ID:crypto.randomUUID(),TIMESTAMP:new Date().toISOString(),BUILD_ENV:"test",ZUPLO_VERSION:"0.0.0",COMPATIBILITY_DATE:W,ENVIRONMENT_TYPE:"mock-environment-type",GIT_SHA:void 0,IS_LOCAL_DEVELOPMENT:!1,COMPATIBILITY_FLAGS:Ee[W]},runtime:{RUNTIME_ENV:"test",RUNTIME_STAGE:"test",__ZUPLO_DEPLOYMENT_NAME:"mock-deployment-name",__ZUPLO_LOG_LEVEL:"debug",__ZUPLO_LOG_FORMAT:"pretty",__ZUPLO_MANAGEMENT_API_URL:"",__ZUPLO_RUNTIME_TYPE:"cloudflare",__ZUPLO_AUTH_API_JWT:""}})}n(Oe,"getMockEnvironment");var T=class e{static{n(this,"Environment")}config;static#e;static#t=!1;static initialize(t){this.#e||(this.#e=new e(t),this.#t=!0)}static get instance(){return this.#t||(console.debug("Environment has not been initialized. This is okay when running tests, a mock environment will be used."),this.#e=Oe()),this.#e}constructor({build:t,runtime:r}){let u;try{if(r.__ZUPLO_CONFIG){let s=atob(r.__ZUPLO_CONFIG);u=JSON.parse(s)}if(r.ZUPLO_SYSTEM_CONFIGURATIONS){let s=new TextDecoder().decode(ye.decode(r.ZUPLO_SYSTEM_CONFIGURATIONS)),f=JSON.parse(s);for(let o of Object.keys(f))r[o]=f[o]}}catch(s){console.error("Failed to parse runtime configuration",s)}this.config=u??{},this.build=t,this.runtime=r,this.instanceId=crypto.randomUUID()}build;runtime;instanceId;get deploymentName(){return this.runtime.__ZUPLO_DEPLOYMENT_NAME??this.config.deployment_name??void 0}get useLegacyServiceRouting(){return this.config.use_legacy_service_routing??void 0}get useProxyForFetchFromZups(){return this.config.use_proxy_for_fetch_from_zups??void 0}get devPortalBaseUrl(){return this.runtime.__ZUPLO_DEV_PORTAL_URL??this.config.dev_portal_url??"https://dev-portal-v4-1.zuplo.com"}get buildAssetsUrl(){return this.runtime.__ZUPLO_BUILD_ASSETS_URL??this.config.build_assets_url??"https://build-assets.zuplo.com"}get remoteLogToken(){return this.runtime.__ZUPLO_REMOTE_LOG_TOKEN??this.config.remote_log_token??void 0}get zuploClientAuthBucketId(){return this.config.zuplo_auth_client_bucket_id??"auth_o8PUdhKxSTOiB794GWPwLQCD"}get managementApiURL(){return this.runtime.__ZUPLO_MANAGEMENT_API_URL??this.config.management_api_url??"https://api.zuplo.com"}get developerApiUrl(){return this.config.developer_api_url??"https://dev.zuplo.com"}get cdnURL(){return this.runtime.__ZUPLO_CDN_URL??this.config.cdn_url??"https://cdn.zuplo.com"}get remoteLogURL(){return this.runtime.__ZUPLO_REMOTE_LOG_URL??this.config.log_event_api??"https://ellie.zuplo.com"}get loggingId(){return this.runtime.__ZUPLO_LOGGING_ID??this.config.logging_id??void 0}get redisURL(){return this.runtime.__ZUPLO_REDIS_URL??this.config.redis_proxy_url??"https://redis-proxy.zuplo.com"}get apiKeyServiceUrl(){return this.runtime.__ZUPLO_API_KEY_SERVICE_URL??this.config.api_key_service_url??"https://apikey.zuplo.com"}get meteringServiceUrl(){return this.config.metering_service_url??"https://meters.zuplo.com"}get authApiJWT(){return this.runtime.__ZUPLO_AUTH_API_JWT??void 0}get authClientId(){return this.runtime.__ZUPLO_AUTH_CLIENT_ID}get authClientSecret(){return this.runtime.__ZUPLO_AUTH_CLIENT_SECRET}get userLogLevel(){return this.runtime.ZUPLO_LOG_LEVEL??this.runtime.__ZUPLO_LOG_LEVEL??this.config.user_log_level??"debug"}get systemLogLevel(){return this.runtime.__ZUPLO_LOG_LEVEL??this.config.system_log_level??"debug"}get logFormat(){return this.runtime.__ZUPLO_LOG_FORMAT??this.config.log_format??"cloudflare"}get isCloudflare(){return this.runtime.__ZUPLO_RUNTIME_TYPE?this.runtime.__ZUPLO_RUNTIME_TYPE==="cloudflare":this.config.runtime_type?this.config.runtime_type==="cloudflare":typeof WebSocketPair=="function"}get isDeno(){return this.runtime.__ZUPLO_RUNTIME_TYPE?this.runtime.__ZUPLO_RUNTIME_TYPE==="deno":this.config.runtime_type?this.config.runtime_type==="deno":typeof WebSocketPair!="function"}get isLocalDevelopment(){return this.build.IS_LOCAL_DEVELOPMENT}get isTestMode(){return!!this.runtime.__ZUPLO_TEST_MODE}get systemUserAgent(){return`Zuplo/${this.build.ZUPLO_VERSION}`}get loggingEnvironmentType(){return this.isCloudflare?"edge":this.isLocalDevelopment?"local":this.isDeno?"working-copy":"unknown"}get loggingEnvironmentStage(){return this.build.ENVIRONMENT_TYPE==="PRODUCTION"?"production":this.build.ENVIRONMENT_TYPE==="PREVIEW"?"preview":this.isLocalDevelopment?"local":this.isWorkingCopy?"working-copy":"unknown"}get isWorkingCopy(){return this.build.ENVIRONMENT_TYPE==="WORKING_COPY"}};var C=(0,we.debug)("zuplo:runtime:external-service");function $t(){let e,{__ZUPLO_EXTERNAL_SERVICE_TOKEN:t}=T.instance.runtime;if(t&&t!=="undefined")try{let r=atob(t);e=JSON.parse(r)}catch{}return e}n($t,"getServiceAuth");async function Le(e,t){let r=$t();if(r)if(C(`Using external service auth. ClientId: ${r.clientId})`),typeof e=="string"){let u=new URL(e),s=u.hostname,f=t??{},o=new Headers(f.headers||{});o.set("CF-Access-Client-Id",r.clientId),o.set("CF-Access-Client-Secret",r.clientSecret),f.headers=o;let g;if(r.customServiceMapping&&r.customServiceMapping[s])g=`https://${r.customServiceMapping[s]}`;else if(T.instance.useLegacyServiceRouting)g=`https://${s}.zuptunnel.com`;else{C("Using sha256 service routing");let h=T.instance.build;if(h.ACCOUNT_NAME&&h.PROJECT_NAME&&h.ENVIRONMENT_TYPE)g=`https://${await Ht(s,h.ACCOUNT_NAME,h.PROJECT_NAME,h.ENVIRONMENT_TYPE)}.zuptunnel.com`;else throw C("Cannot use sha256 service routing, missing build variables"),new S("Failed to generate fully qualified tunnel url.")}let d=new URL(`${g}${u.pathname}${u.search}`);C(`Calling external service: ${d.toString()}`);let c=await D.fetch(d.toString(),f);if(c.status===403&&c.headers.get("cf-access-domain")!==null)throw console.error("403 Forbidden when calling external service.",{clientId:r.clientId,tunnelHost:g}),new S("Could not connect to secure tunnel.");return c}else throw C("Cannot call external service with Request object"),new S("Currently, we only support fetch(<some_string>, ...).");else throw C("There is no external service auth configured for this zup."),new S("There are no external services configured for this zup.")}n(Le,"externalServiceHandler");async function Ht(e,t,r,u){let s=e.toLowerCase(),f=t.toLowerCase(),o=r.toLowerCase(),g=Gt(u);C(`Hashing service name: ${f}-${s}.${f}-${o}-${g}`);let d=await Re(`${f}-${s}`),c=await Re(`${f}-${o}-${g}`);return`${d}.${c}`}n(Ht,"hashServiceName");async function Re(e){let t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(r)).map(f=>f.toString(16).padStart(2,"0")).join("").slice(0,-1)}n(Re,"hashSegment");function Gt(e){let t=e.toLowerCase();switch(t){case"production":case"preview":return t;default:return"working-copy"}}n(Gt,"sanitizeEnvironmentType");var Ae=new Map;Ae.set("service:",Le);var Te=globalThis.fetch;function J(e,t){let r=Yt(t);if(typeof e=="string"){let u=new URL(e),s=Ae.get(u.protocol);return s?s(e,r):Te(e,r)}else return Te(e,r)}n(J,"internalFetch");globalThis.fetch=J;var Yt=n(e=>{if(!e||e instanceof Request)return e;let t=e;if(!t.zuplo)return e;let r=e;return r.cf={cacheEverything:t.zuplo?.cacheEverything,cacheTtl:t.zuplo?.cacheTtlSeconds},delete e.zuplo,e},"transformInit");var Vt={fetch:J},D=Vt;var K=class{constructor(t){this.options=t;this.authHeader=`Basic ${btoa(t.pdpUsername+":"+t.pdpPassword)}`,this.authorizationUrl=new URL("/authorize",t.pdpUrl).toString()}static{n(this,"PdpService")}authHeader;authorizationUrl;async makePdpRequest(t){let r=await D.fetch(this.authorizationUrl,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/xacml+json; charset=UTF-8",[this.options.tokenHeaderName??"Authorization"]:this.authHeader}});if(!r.ok)throw new Error(`Request to PDP service failed with response status ${r.status}.`);return await r.json()}};
36
- /*! For license information please see exports.js.LEGAL.txt */
@@ -1,36 +0,0 @@
1
-
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Zuplo, Inc. All rights reserved.
4
- *
5
- * This software and associated documentation files (the "Software") is intended to be used
6
- * only by Zuplo customers solely to develop and test applications that will be deployed
7
- * to Zuplo hosted services. You and others in your organization may use these files on your
8
- * Development Devices solely for the above stated purpose.
9
- *
10
- * Outside of uses stated above, no license is granted for any other purpose including
11
- * without limitation the rights to use, copy, modify, merge, publish, distribute,
12
- * sublicense, host, and/or sell copies of the Software.
13
- *
14
- * The software may include third party components with separate legal notices or governed by
15
- * other agreements, as described in licenses either embedded in or accompanying the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
18
- * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
19
- * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
20
- * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
21
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
- * DEALINGS IN THE SOFTWARE.
23
- *--------------------------------------------------------------------------------------------*/
24
-
25
- import{a as E}from"./chunk-NFVGBDMC.js";import{a as r,b as R,c as he}from"./chunk-PPV7V43C.js";var V=R(n=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.generateColor=n.colorFunctions=n.stripColor=n.bgRgb24=n.rgb24=n.bgRgb8=n.rgb8=n.bgBrightWhite=n.bgBrightCyan=n.bgBrightMagenta=n.bgBrightBlue=n.bgBrightYellow=n.bgBrightGreen=n.bgBrightRed=n.bgBrightBlack=n.bgWhite=n.bgCyan=n.bgMagenta=n.bgBlue=n.bgYellow=n.bgGreen=n.bgRed=n.bgBlack=n.brightWhite=n.brightCyan=n.brightMagenta=n.brightBlue=n.brightYellow=n.brightGreen=n.brightRed=n.brightBlack=n.gray=n.white=n.cyan=n.magenta=n.blue=n.yellow=n.green=n.red=n.black=n.strikethrough=n.hidden=n.inverse=n.underline=n.italic=n.dim=n.bold=n.reset=n.getColorEnabled=n.setColorEnabled=void 0;var F=!0,$=!F;function pe(e){F||($=e)}r(pe,"setColorEnabled");n.setColorEnabled=pe;function de(){return $}r(de,"getColorEnabled");n.getColorEnabled=de;function s(e,t){return{open:`\x1B[${e.join(";")}m`,close:`\x1B[${t}m`,regexp:new RegExp(`\\x1b\\[${t}m`,"g")}}r(s,"code");function c(e,t){return $?`${t.open}${e.replace(t.regexp,t.open)}${t.close}`:e}r(c,"run");function be(e){return c(e,s([0],0))}r(be,"reset");n.reset=be;function me(e){return c(e,s([1],22))}r(me,"bold");n.bold=me;function ye(e){return c(e,s([2],22))}r(ye,"dim");n.dim=ye;function we(e){return c(e,s([3],23))}r(we,"italic");n.italic=we;function Re(e){return c(e,s([4],24))}r(Re,"underline");n.underline=Re;function Ce(e){return c(e,s([7],27))}r(Ce,"inverse");n.inverse=Ce;function Ee(e){return c(e,s([8],28))}r(Ee,"hidden");n.hidden=Ee;function Se(e){return c(e,s([9],29))}r(Se,"strikethrough");n.strikethrough=Se;function Oe(e){return c(e,s([30],39))}r(Oe,"black");n.black=Oe;function L(e){return c(e,s([31],39))}r(L,"red");n.red=L;function Y(e){return c(e,s([32],39))}r(Y,"green");n.green=Y;function D(e){return c(e,s([33],39))}r(D,"yellow");n.yellow=D;function G(e){return c(e,s([34],39))}r(G,"blue");n.blue=G;function J(e){return c(e,s([35],39))}r(J,"magenta");n.magenta=J;function W(e){return c(e,s([36],39))}r(W,"cyan");n.cyan=W;function Be(e){return c(e,s([37],39))}r(Be,"white");n.white=Be;function ze(e){return Z(e)}r(ze,"gray");n.gray=ze;function Z(e){return c(e,s([90],39))}r(Z,"brightBlack");n.brightBlack=Z;function Ae(e){return c(e,s([91],39))}r(Ae,"brightRed");n.brightRed=Ae;function Ne(e){return c(e,s([92],39))}r(Ne,"brightGreen");n.brightGreen=Ne;function Me(e){return c(e,s([93],39))}r(Me,"brightYellow");n.brightYellow=Me;function $e(e){return c(e,s([94],39))}r($e,"brightBlue");n.brightBlue=$e;function ve(e){return c(e,s([95],39))}r(ve,"brightMagenta");n.brightMagenta=ve;function xe(e){return c(e,s([96],39))}r(xe,"brightCyan");n.brightCyan=xe;function Te(e){return c(e,s([97],39))}r(Te,"brightWhite");n.brightWhite=Te;function _e(e){return c(e,s([40],49))}r(_e,"bgBlack");n.bgBlack=_e;function je(e){return c(e,s([41],49))}r(je,"bgRed");n.bgRed=je;function Ie(e){return c(e,s([42],49))}r(Ie,"bgGreen");n.bgGreen=Ie;function Pe(e){return c(e,s([43],49))}r(Pe,"bgYellow");n.bgYellow=Pe;function Ue(e){return c(e,s([44],49))}r(Ue,"bgBlue");n.bgBlue=Ue;function He(e){return c(e,s([45],49))}r(He,"bgMagenta");n.bgMagenta=He;function qe(e){return c(e,s([46],49))}r(qe,"bgCyan");n.bgCyan=qe;function ke(e){return c(e,s([47],49))}r(ke,"bgWhite");n.bgWhite=ke;function Fe(e){return c(e,s([100],49))}r(Fe,"bgBrightBlack");n.bgBrightBlack=Fe;function Le(e){return c(e,s([101],49))}r(Le,"bgBrightRed");n.bgBrightRed=Le;function Ye(e){return c(e,s([102],49))}r(Ye,"bgBrightGreen");n.bgBrightGreen=Ye;function De(e){return c(e,s([103],49))}r(De,"bgBrightYellow");n.bgBrightYellow=De;function Ge(e){return c(e,s([104],49))}r(Ge,"bgBrightBlue");n.bgBrightBlue=Ge;function Je(e){return c(e,s([105],49))}r(Je,"bgBrightMagenta");n.bgBrightMagenta=Je;function We(e){return c(e,s([106],49))}r(We,"bgBrightCyan");n.bgBrightCyan=We;function Ze(e){return c(e,s([107],49))}r(Ze,"bgBrightWhite");n.bgBrightWhite=Ze;function b(e,t=255,i=0){return Math.trunc(Math.max(Math.min(e,t),i))}r(b,"clampAndTruncate");function Ve(e,t){return c(e,s([38,5,b(t)],39))}r(Ve,"rgb8");n.rgb8=Ve;function Xe(e,t){return c(e,s([48,5,b(t)],49))}r(Xe,"bgRgb8");n.bgRgb8=Xe;function Ke(e,t){return typeof t=="number"?c(e,s([38,2,t>>16&255,t>>8&255,t&255],39)):c(e,s([38,2,b(t.r),b(t.g),b(t.b)],39))}r(Ke,"rgb24");n.rgb24=Ke;function Qe(e,t){return typeof t=="number"?c(e,s([48,2,t>>16&255,t>>8&255,t&255],49)):c(e,s([48,2,b(t.r),b(t.g),b(t.b)],49))}r(Qe,"bgRgb24");n.bgRgb24=Qe;var et=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|"),"g");function tt(e){return e.replace(et,"")}r(tt,"stripColor");n.stripColor=tt;n.colorFunctions=[L,Y,D,G,J,W];function nt(e){let t=0,i=e.length,u=0;if(i>0)for(;u<i;)t=(t<<5)-t+e.charCodeAt(u++)|0;return t}r(nt,"hashCode");function rt(e){let t=Math.abs(nt(e));return n.colorFunctions[t%n.colorFunctions.length]}r(rt,"generateColor");n.generateColor=rt});var X=R(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.format=void 0;function it(e,t,...i){let u=0,a=i.length,g=String(t).replace(/%[sdjoO%]/g,o=>{if(o==="%%")return"%";if(u>=a)return o;switch(o){case"%s":return String(i[u++]);case"%d":return Number(i[u++]).toString();case"%o":return e(i[u++]).split(`
26
- `).map(l=>l.trim()).join(" ");case"%O":return e(i[u++]);case"%j":try{return JSON.stringify(i[u++])}catch{return"[Circular]"}default:return o}});for(let o of i.splice(u))o===null||!(typeof o=="object"&&o!==null)?g+=" "+o:g+=" "+e(o);return g}r(it,"format");S.format=it});var re=R(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.inspect=void 0;function y(e,t,i,u){let a={seen:[],stylize:ot,showHidden:t??!1,depth:i??2,colors:u??!1,customInspect:!0};return a.colors&&(a.stylize=ct),O(a,e,a.depth)}r(y,"inspect");B.inspect=y;y.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};y.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function ot(e,t){return e}r(ot,"stylizeNoColor");function st(e){return typeof e=="boolean"}r(st,"isBoolean");function Q(e){return e===void 0}r(Q,"isUndefined");function ct(e,t){let i=y.styles[t];return i?"\x1B["+y.colors[i][0]+"m"+e+"\x1B["+y.colors[i][1]+"m":e}r(ct,"stylizeWithColor");function v(e){return typeof e=="function"}r(v,"isFunction");function ee(e){return typeof e=="string"}r(ee,"isString");function ut(e){return typeof e=="number"}r(ut,"isNumber");function te(e){return e===null}r(te,"isNull");function ne(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r(ne,"hasOwn");function x(e){return I(e)&&P(e)==="[object RegExp]"}r(x,"isRegExp");function I(e){return typeof e=="object"&&e!==null}r(I,"isObject");function T(e){return I(e)&&(P(e)==="[object Error]"||e instanceof Error)}r(T,"isError");function K(e){return I(e)&&P(e)==="[object Date]"}r(K,"isDate");function P(e){return Object.prototype.toString.call(e)}r(P,"objectToString");function at(e){let t={};return e.forEach(function(i,u){t[i]=!0}),t}r(at,"arrayToHash");function lt(e,t,i,u,a){let g=[];for(let o=0,l=t.length;o<l;++o)ne(t,String(o))?g.push(j(e,t,i,u,String(o),!0)):g.push("");return a.forEach(function(o){o.match(/^\d+$/)||g.push(j(e,t,i,u,o,!0))}),g}r(lt,"formatArray");function _(e){return"["+Error.prototype.toString.call(e)+"]"}r(_,"formatError");function O(e,t,i){if(e.customInspect&&t&&v(t.inspect)&&t.inspect!==y&&!(t.constructor&&t.constructor.prototype===t)){let h=t.inspect(i,e);return ee(h)||(h=O(e,h,i)),h}let u=gt(e,t);if(u)return u;let a=Object.keys(t),g=at(a);try{e.showHidden&&Object.getOwnPropertyNames&&(a=Object.getOwnPropertyNames(t))}catch{}if(T(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return _(t);if(a.length===0){if(v(t)){let h=t.name?": "+t.name:"";return e.stylize("[Function"+h+"]","special")}if(x(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(K(t))return e.stylize(Date.prototype.toString.call(t),"date");if(T(t))return _(t)}let o="",l=!1,f=["{","}"];if(Array.isArray(t)&&(l=!0,f=["[","]"]),v(t)&&(o=" [Function"+(t.name?": "+t.name:"")+"]"),x(t)&&(o=" "+RegExp.prototype.toString.call(t)),K(t)&&(o=" "+Date.prototype.toUTCString.call(t)),T(t)&&(o=" "+_(t)),a.length===0&&(!l||t.length==0))return f[0]+o+f[1];if(i<0)return x(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);let p;return l?p=lt(e,t,i,g,a):p=a.map(function(h){return j(e,t,i,g,h,l)}),e.seen.pop(),ft(p,o,f)}r(O,"formatValue");function j(e,t,i,u,a,g){let o,l,f;f={value:void 0};try{f.value=t[a]}catch{}try{Object.getOwnPropertyDescriptor&&(f=Object.getOwnPropertyDescriptor(t,a)||f)}catch{}if(f.get?f.set?l=e.stylize("[Getter/Setter]","special"):l=e.stylize("[Getter]","special"):f.set&&(l=e.stylize("[Setter]","special")),ne(u,a)||(o="["+a+"]"),l||(e.seen.indexOf(f.value)<0?(te(i)?l=O(e,f.value,null):l=O(e,f.value,i-1),l.indexOf(`
27
- `)>-1&&(g?l=l.split(`
28
- `).map(function(p){return" "+p}).join(`
29
- `).substr(2):l=`
30
- `+l.split(`
31
- `).map(function(p){return" "+p}).join(`
32
- `))):l=e.stylize("[Circular]","special")),Q(o)){if(g&&a.match(/^\d+$/))return l;o=JSON.stringify(""+a),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+l}r(j,"formatProperty");function gt(e,t){if(Q(t))return e.stylize("undefined","undefined");if(ee(t)){let i="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(i,"string")}if(ut(t))return e.stylize(""+t,"number");if(st(t))return e.stylize(""+t,"boolean");if(te(t))return e.stylize("null","null")}r(gt,"formatPrimitive");function ft(e,t,i){let u=0;return e.reduce(function(g,o){return u++,o.indexOf(`
33
- `)>=0&&u++,g+o.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?i[0]+(t===""?"":t+`
34
- `)+" "+e.join(`,
35
- `)+" "+i[1]:i[0]+t+" "+e.join(", ")+" "+i[1]}r(ft,"reduceToSingleString")});var ie=R(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.format=void 0;var ht=X(),pt=re(),dt=r((e,...t)=>(0,ht.format)(pt.inspect,e,t),"format");z.format=dt});var se=R(m=>{"use strict";Object.defineProperty(m,"__esModule",{value:!0});m.debug=m.withoutEnv=m.Debugger=void 0;var bt=V(),mt=ie(),A=class{static{r(this,"Debugger")}manager;ns;color;last;enabled;constructor(t,i){this.manager=t,this.ns=i,this.color=(0,bt.generateColor)(i),this.last=0,this.enabled=t.enabled.some(u=>u.test(i))}log(...t){if(!this.enabled)return;let i,u=t[0];typeof u=="function"?i=u():i=String(u);let a=Date.now()-(this.last||Date.now());i=(0,mt.format)(i,...t);let g=`${this.color(this.ns)} ${i} ${this.color(`+${a}ms`)}`;console.log(g),this.last=Date.now()}};m.Debugger=A;var N=class{static{r(this,"DebugManager")}debuggers;enabled;constructor(t){this.debuggers=new Map,this.enabled=t??[]}};function oe(e){return!e||e.length===0?[]:(e=e.replace(/\s/g,"").replace(/\*/g,".+"),e.split(",").map(t=>new RegExp(`^${t}$`)))}r(oe,"extract");var C;function yt(e){e||(e=[]),typeof e=="string"&&(e=oe(e)),C=new N(e)}r(yt,"withoutEnv");m.withoutEnv=yt;function wt(e){let t=globalThis.DEBUG;C||(C=new N(oe(t)));let i=new A(C,e);return C.debuggers.set(e,i),Object.assign(i.log.bind(i),{self:i})}r(wt,"debug");m.debug=wt});var H=class extends Error{static{r(this,"SystemError")}constructor(t,i){super(t,i),this.name="InternalError"}},d=class extends Error{static{r(this,"RuntimeError")}extensionMembers;constructor(t,i){typeof t=="string"?super(t,i):(super(t.message,i),this.extensionMembers=t.extensionMembers),this.name="RuntimeError"}},q=class extends d{static{r(this,"ConfigurationError")}constructor(t,i){super(t,i),this.name="ConfigurationError"}},k=class extends d{static{r(this,"FeatureNotEnabledError")}constructor(t,i){super(t,i),this.name="FeatureNotEnabledError"}};var ue=he(se());var w=(0,ue.debug)("zuplo:runtime:external-service");function Rt(){let e,{__ZUPLO_EXTERNAL_SERVICE_TOKEN:t}=E.instance.runtime;if(t&&t!=="undefined")try{let i=atob(t);e=JSON.parse(i)}catch{}return e}r(Rt,"getServiceAuth");async function ae(e,t){let i=Rt();if(i)if(w(`Using external service auth. ClientId: ${i.clientId})`),typeof e=="string"){let u=new URL(e),a=u.hostname,g=t??{},o=new Headers(g.headers||{});o.set("CF-Access-Client-Id",i.clientId),o.set("CF-Access-Client-Secret",i.clientSecret),g.headers=o;let l;if(i.customServiceMapping&&i.customServiceMapping[a])l=`https://${i.customServiceMapping[a]}`;else if(E.instance.useLegacyServiceRouting)l=`https://${a}.zuptunnel.com`;else{w("Using sha256 service routing");let h=E.instance.build;if(h.ACCOUNT_NAME&&h.PROJECT_NAME&&h.ENVIRONMENT_TYPE)l=`https://${await Ct(a,h.ACCOUNT_NAME,h.PROJECT_NAME,h.ENVIRONMENT_TYPE)}.zuptunnel.com`;else throw w("Cannot use sha256 service routing, missing build variables"),new d("Failed to generate fully qualified tunnel url.")}let f=new URL(`${l}${u.pathname}${u.search}`);w(`Calling external service: ${f.toString()}`);let p=await M.fetch(f.toString(),g);if(p.status===403&&p.headers.get("cf-access-domain")!==null)throw console.error("403 Forbidden when calling external service.",{clientId:i.clientId,tunnelHost:l}),new d("Could not connect to secure tunnel.");return p}else throw w("Cannot call external service with Request object"),new d("Currently, we only support fetch(<some_string>, ...).");else throw w("There is no external service auth configured for this zup."),new d("There are no external services configured for this zup.")}r(ae,"externalServiceHandler");async function Ct(e,t,i,u){let a=e.toLowerCase(),g=t.toLowerCase(),o=i.toLowerCase(),l=Et(u);w(`Hashing service name: ${g}-${a}.${g}-${o}-${l}`);let f=await ce(`${g}-${a}`),p=await ce(`${g}-${o}-${l}`);return`${f}.${p}`}r(Ct,"hashServiceName");async function ce(e){let t=new TextEncoder().encode(e),i=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(i)).map(g=>g.toString(16).padStart(2,"0")).join("").slice(0,-1)}r(ce,"hashSegment");function Et(e){let t=e.toLowerCase();switch(t){case"production":case"preview":return t;default:return"working-copy"}}r(Et,"sanitizeEnvironmentType");var ge=new Map;ge.set("service:",ae);var le=globalThis.fetch;function U(e,t){let i=St(t);if(typeof e=="string"){let u=new URL(e),a=ge.get(u.protocol);return a?a(e,i):le(e,i)}else return le(e,i)}r(U,"internalFetch");globalThis.fetch=U;var St=r(e=>{if(!e||e instanceof Request)return e;let t=e;if(!t.zuplo)return e;let i=e;return i.cf={cacheEverything:t.zuplo?.cacheEverything,cacheTtl:t.zuplo?.cacheTtlSeconds},delete e.zuplo,e},"transformInit");var Ot={fetch:U},M=Ot;var fe=class{constructor(t){this.options=t;this.authHeader=`Basic ${btoa(t.pdpUsername+":"+t.pdpPassword)}`,this.authorizationUrl=new URL("/authorize",t.pdpUrl).toString()}static{r(this,"PdpService")}authHeader;authorizationUrl;async makePdpRequest(t){let i=await M.fetch(this.authorizationUrl,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/xacml+json; charset=UTF-8",[this.options.tokenHeaderName??"Authorization"]:this.authHeader}});if(!i.ok)throw new Error(`Request to PDP service failed with response status ${i.status}.`);return await i.json()}};export{se as a,H as b,d as c,q as d,k as e,M as f,fe as g};
36
- /*! For license information please see chunk-OHZWUPN3.js.LEGAL.txt */
@@ -1,10 +0,0 @@
1
- /**
2
- * Echos the value of a value. Trys to print the value out
3
- * in the best way possible given the different types.
4
- *
5
- * @param {Object} obj The object to print out.
6
- * @param {boolean} showHidden
7
- * @param {number} depth
8
- * @param {boolean} colors
9
- * @license MIT (© Joyent)
10
- */
File without changes
File without changes