@zuplo/runtime 5.2504.0 → 5.2505.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.
- package/out/esm/chunk-TMKNVDD5.js +26 -0
- package/out/esm/index.js +1 -1
- package/out/esm/internal/index.js +1 -1
- package/out/types/index.d.ts +12 -1
- package/out/types/internal/index.d.ts +12 -1
- package/package.json +1 -1
- package/out/esm/chunk-WS4HN7WC.js +0 -26
- /package/out/esm/{chunk-WS4HN7WC.js.LEGAL.txt → chunk-TMKNVDD5.js.LEGAL.txt} +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
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 i}from"./chunk-OQPRFCK5.js";var N=(g=>(g.Build="build-data",g.CorsPreflight="cors-preflight",g.DeveloperPortal="developer-portal",g.DeveloperPortalLegacy="developer-portal-legacy",g.StripePlugin="stripe-plugin",g.EmptyGatewayCatchall="empty-gateway-catchall",g.Ping="ping",g.UnmatchedPath="unmatched-path",g))(N||{});function b(n){if(n.length>=255)throw new TypeError("Alphabet too long");let r=new Uint8Array(256);for(let e=0;e<r.length;e++)r[e]=255;for(let e=0;e<n.length;e++){let o=n.charAt(e),d=o.charCodeAt(0);if(r[d]!==255)throw new TypeError(o+" is ambiguous");r[d]=e}let t=n.length,s=n.charAt(0),O=Math.log(t)/Math.log(256),h=Math.log(256)/Math.log(t);function P(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(e.length===0)return"";let o=0,d=0,u=0,c=e.length;for(;u!==c&&e[u]===0;)u++,o++;let f=(c-u)*h+1>>>0,_=new Uint8Array(f);for(;u!==c;){let a=e[u],E=0;for(let m=f-1;(a!==0||E<d)&&m!==-1;m--,E++)a+=256*_[m]>>>0,_[m]=a%t>>>0,a=a/t>>>0;if(a!==0)throw new Error("Non-zero carry");d=E,u++}let p=f-d;for(;p!==f&&_[p]===0;)p++;let A=s.repeat(o);for(;p<f;++p)A+=n.charAt(_[p]);return A}i(P,"encode");function T(e){if(typeof e!="string")throw new TypeError("Expected String");if(e.length===0)return new Uint8Array;let o=0,d=0,u=0;for(;e[o]===s;)d++,o++;let c=(e.length-o)*O+1>>>0,f=new Uint8Array(c);for(;e[o];){let a=r[e.charCodeAt(o)];if(a===255)return;let E=0;for(let m=c-1;(a!==0||E<u)&&m!==-1;m--,E++)a+=t*f[m]>>>0,f[m]=a%256>>>0,a=a/256>>>0;if(a!==0)throw new Error("Non-zero carry");u=E,o++}let _=c-u;for(;_!==c&&f[_]===0;)_++;let p=new Uint8Array(d+(c-_)),A=d;for(;_!==c;)p[A++]=f[_++];return p}i(T,"decodeUnsafe");function g(e){let o=T(e);if(o)return o;throw new Error("Non-base"+t+" character")}return i(g,"decode"),{encode:P,decodeUnsafe:T,decode:g}}i(b,"base");var R=b;var v="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",y=R(v);var U="2024-09-02",I=Object.freeze({none:{runOutboundPoliciesOnHandlerOnAllStatuses:!1,doNotRunHooksOnSystemRoutes:!1,removeAllVendorHeadersExceptListed:!1,allowCustomPorts:!1},"2023-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:!1,doNotRunHooksOnSystemRoutes:!1,removeAllVendorHeadersExceptListed:!1,allowCustomPorts:!1},"2024-01-15":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!1},"2024-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!1},"2024-09-02":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!0}});function C(){return new l({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:U,ENVIRONMENT_TYPE:"mock-environment-type",GIT_SHA:void 0,IS_LOCAL_DEVELOPMENT:!1,COMPATIBILITY_FLAGS:I[U]},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(C,"getMockEnvironment");var l=class n{static{i(this,"Environment")}config;static#e;static#t=!1;static initialize(r){this.#e||(this.#e=new n(r),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=C()),this.#e}constructor({build:r,runtime:t}){let s;try{if(t.__ZUPLO_CONFIG){let O=atob(t.__ZUPLO_CONFIG);s=JSON.parse(O)}if(t.ZUPLO_SYSTEM_CONFIGURATIONS){let O=new TextDecoder().decode(y.decode(t.ZUPLO_SYSTEM_CONFIGURATIONS)),h=JSON.parse(O);for(let P of Object.keys(h))t[P]=h[P]}}catch(O){console.error("Failed to parse runtime configuration",O)}this.config=s??{},this.build=r,this.runtime=t,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 w=["ZUPLO_USER_LOGGER_DATA_DOG_API_KEY","ZUPLO_USER_LOGGER_DATA_DOG_URL","ZUPLO_LOG_LEVEL","ZUPLO_HANDLER_WRITE_LOG_LEVEL"];function S(n){return n.startsWith("__ZUPLO")||n.startsWith("ZUPLO_")?!w.includes(n)&&!n.startsWith("ZUPLO_PUBLIC_"):!1}i(S,"isRestrictedEnvVariableName");function M(n){return!!n.startsWith("ZUPLO_")}i(M,"isZuploReadableEnvVariableName");var X=new Proxy({},{get(n,r){let t=String(r);switch(t){case"ZUPLO_ENVIRONMENT_TYPE":return l.instance.loggingEnvironmentType;case"ZUPLO_ENVIRONMENT_STAGE":return l.instance.loggingEnvironmentStage;case"ZUPLO_ENVIRONMENT_NAME":return l.instance.runtime.__ZUPLO_DEPLOYMENT_NAME;case"ZUPLO_ACCOUNT_NAME":return l.instance.build.ACCOUNT_NAME;case"ZUPLO_PROJECT_NAME":return l.instance.build.PROJECT_NAME;case"ZUPLO_BUILD_ID":return l.instance.build.BUILD_ID}if(!(S(t)&&!M(t)))return l.instance.runtime[t]}});function ne(n,r,t){return`_${L(n+"_"+r+"_"+t)}`}i(ne,"getRawOperationDataIdentifierName");function re(n,r,t,s){return`_${L(n.toLowerCase())}_`+r.toLowerCase()+"_"+t.toLowerCase()+`_${s.toLowerCase()}`}i(re,"getIdForParameterSchema");function ie(n,r,t){return`_${L(n.toLowerCase())}_`+r.toLowerCase()+`_rb_${L(t.toLowerCase())}`}i(ie,"getIdForRequestBodySchema");function oe(n,r){return`_${L(n)}__${L(r)}`}i(oe,"getIdForRefSchema");function L(n){let r=[];for(let t=0;t<n.length;t++){let s=n.charCodeAt(t);s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?r.push(n.charAt(t)):r.push("_")}return r.join("")}i(L,"sanitizedIdentifierName");export{l as a,N as b,S as c,M as d,X as e,ne as f,re as g,ie as h,oe as i,L as j};
|
|
26
|
+
/*! For license information please see chunk-TMKNVDD5.js.LEGAL.txt */
|
package/out/esm/index.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{a as g,b as Ze,e as Pe,f as eu,g as Bn,h as Gn,i as tu,j as nu}from"./chunk-
|
|
25
|
+
import{a as g,b as Ze,e as Pe,f as eu,g as Bn,h as Gn,i as tu,j as nu}from"./chunk-TMKNVDD5.js";import{a as i}from"./chunk-OQPRFCK5.js";var ru=!1;function ct(n,e){return{open:`\x1B[${n.join(";")}m`,close:`\x1B[${e}m`,regexp:new RegExp(`\\x1b\\[${e}m`,"g")}}i(ct,"code");function lt(n,e){return ru?`${e.open}${n.replace(e.regexp,e.open)}${e.close}`:n}i(lt,"run");function ou(n){return lt(n,ct([31],39))}i(ou,"red");function iu(n){return lt(n,ct([32],39))}i(iu,"green");function su(n){return lt(n,ct([33],39))}i(su,"yellow");function au(n){return lt(n,ct([34],39))}i(au,"blue");function uu(n){return lt(n,ct([35],39))}i(uu,"magenta");function cu(n){return lt(n,ct([36],39))}i(cu,"cyan");var Nd=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");var vi=[ou,iu,su,au,uu,cu];function lu(n){let e=0,t=n.length,r=0;if(t>0)for(;r<t;)e=(e<<5)-e+n.charCodeAt(r++)|0;return e}i(lu,"hashCode");function Ci(n){let e=Math.abs(lu(n));return vi[e%vi.length]}i(Ci,"generateColor");function Si(n,e,...t){let r=0,o=t.length,s=String(e).replace(/%[sdjoO%]/g,a=>{if(a==="%%")return"%";if(r>=o)return a;switch(a){case"%s":return String(t[r++]);case"%d":return Number(t[r++]).toString();case"%o":return n(t[r++]).split(`
|
|
26
26
|
`).map(u=>u.trim()).join(" ");case"%O":return n(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch{return"[Circular]"}default:return a}});for(let a of t.splice(r))a===null||!(typeof a=="object"&&a!==null)?s+=" "+a:s+=" "+n(a);return s}i(Si,"format");function $e(n,e,t,r){let o={seen:[],stylize:du,showHidden:e??!1,depth:t??2,colors:r??!1,customInspect:!0};return o.colors&&(o.stylize=mu),en(o,n,o.depth)}i($e,"inspect");$e.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]};$e.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function du(n,e){return n}i(du,"stylizeNoColor");function pu(n){return typeof n=="boolean"}i(pu,"isBoolean");function Ai(n){return n===void 0}i(Ai,"isUndefined");function mu(n,e){let t=$e.styles[e];return t?"\x1B["+$e.colors[t][0]+"m"+n+"\x1B["+$e.colors[t][1]+"m":n}i(mu,"stylizeWithColor");function Vn(n){return typeof n=="function"}i(Vn,"isFunction");function ki(n){return typeof n=="string"}i(ki,"isString");function gu(n){return typeof n=="number"}i(gu,"isNumber");function Li(n){return n===null}i(Li,"isNull");function _i(n,e){return Object.prototype.hasOwnProperty.call(n,e)}i(_i,"hasOwn");function Wn(n){return Yn(n)&&Xn(n)==="[object RegExp]"}i(Wn,"isRegExp");function Yn(n){return typeof n=="object"&&n!==null}i(Yn,"isObject");function Kn(n){return Yn(n)&&(Xn(n)==="[object Error]"||n instanceof Error)}i(Kn,"isError");function Oi(n){return Yn(n)&&Xn(n)==="[object Date]"}i(Oi,"isDate");function Xn(n){return Object.prototype.toString.call(n)}i(Xn,"objectToString");function fu(n){let e={};return n.forEach(function(t,r){e[t]=!0}),e}i(fu,"arrayToHash");function hu(n,e,t,r,o){let s=[];for(let a=0,u=e.length;a<u;++a)_i(e,String(a))?s.push(Qn(n,e,t,r,String(a),!0)):s.push("");return o.forEach(function(a){a.match(/^\d+$/)||s.push(Qn(n,e,t,r,a,!0))}),s}i(hu,"formatArray");function Jn(n){return"["+Error.prototype.toString.call(n)+"]"}i(Jn,"formatError");function en(n,e,t){if(n.customInspect&&e&&Vn(e.inspect)&&e.inspect!==$e&&!(e.constructor&&e.constructor.prototype===e)){let d=e.inspect(t,n);return ki(d)||(d=en(n,d,t)),d}let r=yu(n,e);if(r)return r;let o=Object.keys(e),s=fu(o);try{n.showHidden&&Object.getOwnPropertyNames&&(o=Object.getOwnPropertyNames(e))}catch{}if(Kn(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return Jn(e);if(o.length===0){if(Vn(e)){let d=e.name?": "+e.name:"";return n.stylize("[Function"+d+"]","special")}if(Wn(e))return n.stylize(RegExp.prototype.toString.call(e),"regexp");if(Oi(e))return n.stylize(Date.prototype.toString.call(e),"date");if(Kn(e))return Jn(e)}let a="",u=!1,c=["{","}"];if(Array.isArray(e)&&(u=!0,c=["[","]"]),Vn(e)&&(a=" [Function"+(e.name?": "+e.name:"")+"]"),Wn(e)&&(a=" "+RegExp.prototype.toString.call(e)),Oi(e)&&(a=" "+Date.prototype.toUTCString.call(e)),Kn(e)&&(a=" "+Jn(e)),o.length===0&&(!u||e.length==0))return c[0]+a+c[1];if(t<0)return Wn(e)?n.stylize(RegExp.prototype.toString.call(e),"regexp"):n.stylize("[Object]","special");n.seen.push(e);let l;return u?l=hu(n,e,t,s,o):l=o.map(function(d){return Qn(n,e,t,s,d,u)}),n.seen.pop(),bu(l,a,c)}i(en,"formatValue");function Qn(n,e,t,r,o,s){let a,u,c;c={value:void 0};try{c.value=e[o]}catch{}try{Object.getOwnPropertyDescriptor&&(c=Object.getOwnPropertyDescriptor(e,o)||c)}catch{}if(c.get?c.set?u=n.stylize("[Getter/Setter]","special"):u=n.stylize("[Getter]","special"):c.set&&(u=n.stylize("[Setter]","special")),_i(r,o)||(a="["+o+"]"),u||(n.seen.indexOf(c.value)<0?(Li(t)?u=en(n,c.value,null):u=en(n,c.value,t-1),u.indexOf(`
|
|
27
27
|
`)>-1&&(s?u=u.split(`
|
|
28
28
|
`).map(function(l){return" "+l}).join(`
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{c as e,d as t,f as a,g as o,h as r,i,j as n}from"../chunk-
|
|
25
|
+
import{c as e,d as t,f as a,g as o,h as r,i,j as n}from"../chunk-TMKNVDD5.js";import"../chunk-OQPRFCK5.js";export{o as getIdForParameterSchema,i as getIdForRefSchema,r as getIdForRequestBodySchema,a as getRawOperationDataIdentifierName,e as isRestrictedEnvVariableName,t as isZuploReadableEnvVariableName,n as sanitizedIdentifierName};
|
|
26
26
|
/*! For license information please see index.js.LEGAL.txt */
|
package/out/types/index.d.ts
CHANGED
|
@@ -999,7 +999,7 @@ export declare interface CognitoJwtInboundPolicyOptions {
|
|
|
999
999
|
/**
|
|
1000
1000
|
* The compatibility date on which to run the gateway
|
|
1001
1001
|
*/
|
|
1002
|
-
declare type CompatibilityDate = "2023-03-14" | "2024-01-15" | "2024-03-14";
|
|
1002
|
+
declare type CompatibilityDate = "2023-03-14" | "2024-01-15" | "2024-03-14" | "2024-09-02";
|
|
1003
1003
|
|
|
1004
1004
|
declare interface CompatibilityFlags {
|
|
1005
1005
|
/**
|
|
@@ -1022,6 +1022,17 @@ declare interface CompatibilityFlags {
|
|
|
1022
1022
|
* @compatibilityDate 2024-01-15
|
|
1023
1023
|
*/
|
|
1024
1024
|
removeAllVendorHeadersExceptListed: boolean;
|
|
1025
|
+
/**
|
|
1026
|
+
* Allow specifying a custom port when making a subrequest with
|
|
1027
|
+
* the fetch() API.
|
|
1028
|
+
*
|
|
1029
|
+
* This flag doesn't actually do anything in the runtime. It is a
|
|
1030
|
+
* workerd change. The flag is here only to generate a new compatibility
|
|
1031
|
+
* date.
|
|
1032
|
+
*
|
|
1033
|
+
* @compatibilityDate 2024-09-02
|
|
1034
|
+
*/
|
|
1035
|
+
allowCustomPorts: boolean;
|
|
1025
1036
|
}
|
|
1026
1037
|
|
|
1027
1038
|
/**
|
|
@@ -36,7 +36,7 @@ declare interface BuildRouteConfiguration {
|
|
|
36
36
|
/**
|
|
37
37
|
* The compatibility date on which to run the gateway
|
|
38
38
|
*/
|
|
39
|
-
declare type CompatibilityDate = "2023-03-14" | "2024-01-15" | "2024-03-14";
|
|
39
|
+
declare type CompatibilityDate = "2023-03-14" | "2024-01-15" | "2024-03-14" | "2024-09-02";
|
|
40
40
|
|
|
41
41
|
declare interface CompatibilityFlags {
|
|
42
42
|
/**
|
|
@@ -59,6 +59,17 @@ declare interface CompatibilityFlags {
|
|
|
59
59
|
* @compatibilityDate 2024-01-15
|
|
60
60
|
*/
|
|
61
61
|
removeAllVendorHeadersExceptListed: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Allow specifying a custom port when making a subrequest with
|
|
64
|
+
* the fetch() API.
|
|
65
|
+
*
|
|
66
|
+
* This flag doesn't actually do anything in the runtime. It is a
|
|
67
|
+
* workerd change. The flag is here only to generate a new compatibility
|
|
68
|
+
* date.
|
|
69
|
+
*
|
|
70
|
+
* @compatibilityDate 2024-09-02
|
|
71
|
+
*/
|
|
72
|
+
allowCustomPorts: boolean;
|
|
62
73
|
}
|
|
63
74
|
|
|
64
75
|
declare type CorsPolicy = string | "anything-goes" | "none";
|
package/package.json
CHANGED
|
@@ -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
|
-
import{a as i}from"./chunk-OQPRFCK5.js";var N=(g=>(g.Build="build-data",g.CorsPreflight="cors-preflight",g.DeveloperPortal="developer-portal",g.DeveloperPortalLegacy="developer-portal-legacy",g.StripePlugin="stripe-plugin",g.EmptyGatewayCatchall="empty-gateway-catchall",g.Ping="ping",g.UnmatchedPath="unmatched-path",g))(N||{});function b(n){if(n.length>=255)throw new TypeError("Alphabet too long");let r=new Uint8Array(256);for(let e=0;e<r.length;e++)r[e]=255;for(let e=0;e<n.length;e++){let o=n.charAt(e),c=o.charCodeAt(0);if(r[c]!==255)throw new TypeError(o+" is ambiguous");r[c]=e}let t=n.length,s=n.charAt(0),O=Math.log(t)/Math.log(256),h=Math.log(256)/Math.log(t);function P(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(e.length===0)return"";let o=0,c=0,_=0,d=e.length;for(;_!==d&&e[_]===0;)_++,o++;let f=(d-_)*h+1>>>0,u=new Uint8Array(f);for(;_!==d;){let a=e[_],E=0;for(let m=f-1;(a!==0||E<c)&&m!==-1;m--,E++)a+=256*u[m]>>>0,u[m]=a%t>>>0,a=a/t>>>0;if(a!==0)throw new Error("Non-zero carry");c=E,_++}let p=f-c;for(;p!==f&&u[p]===0;)p++;let U=s.repeat(o);for(;p<f;++p)U+=n.charAt(u[p]);return U}i(P,"encode");function T(e){if(typeof e!="string")throw new TypeError("Expected String");if(e.length===0)return new Uint8Array;let o=0,c=0,_=0;for(;e[o]===s;)c++,o++;let d=(e.length-o)*O+1>>>0,f=new Uint8Array(d);for(;e[o];){let a=r[e.charCodeAt(o)];if(a===255)return;let E=0;for(let m=d-1;(a!==0||E<_)&&m!==-1;m--,E++)a+=t*f[m]>>>0,f[m]=a%256>>>0,a=a/256>>>0;if(a!==0)throw new Error("Non-zero carry");_=E,o++}let u=d-_;for(;u!==d&&f[u]===0;)u++;let p=new Uint8Array(c+(d-u)),U=c;for(;u!==d;)p[U++]=f[u++];return p}i(T,"decodeUnsafe");function g(e){let o=T(e);if(o)return o;throw new Error("Non-base"+t+" character")}return i(g,"decode"),{encode:P,decodeUnsafe:T,decode:g}}i(b,"base");var I=b;var v="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",R=I(v);var A="2024-03-14",y=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 C(){return new l({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:y[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(C,"getMockEnvironment");var l=class n{static{i(this,"Environment")}config;static#e;static#t=!1;static initialize(r){this.#e||(this.#e=new n(r),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=C()),this.#e}constructor({build:r,runtime:t}){let s;try{if(t.__ZUPLO_CONFIG){let O=atob(t.__ZUPLO_CONFIG);s=JSON.parse(O)}if(t.ZUPLO_SYSTEM_CONFIGURATIONS){let O=new TextDecoder().decode(R.decode(t.ZUPLO_SYSTEM_CONFIGURATIONS)),h=JSON.parse(O);for(let P of Object.keys(h))t[P]=h[P]}}catch(O){console.error("Failed to parse runtime configuration",O)}this.config=s??{},this.build=r,this.runtime=t,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 M=["ZUPLO_USER_LOGGER_DATA_DOG_API_KEY","ZUPLO_USER_LOGGER_DATA_DOG_URL","ZUPLO_LOG_LEVEL","ZUPLO_HANDLER_WRITE_LOG_LEVEL"];function S(n){return n.startsWith("__ZUPLO")||n.startsWith("ZUPLO_")?!M.includes(n)&&!n.startsWith("ZUPLO_PUBLIC_"):!1}i(S,"isRestrictedEnvVariableName");function D(n){return!!n.startsWith("ZUPLO_")}i(D,"isZuploReadableEnvVariableName");var X=new Proxy({},{get(n,r){let t=String(r);switch(t){case"ZUPLO_ENVIRONMENT_TYPE":return l.instance.loggingEnvironmentType;case"ZUPLO_ENVIRONMENT_STAGE":return l.instance.loggingEnvironmentStage;case"ZUPLO_ENVIRONMENT_NAME":return l.instance.runtime.__ZUPLO_DEPLOYMENT_NAME;case"ZUPLO_ACCOUNT_NAME":return l.instance.build.ACCOUNT_NAME;case"ZUPLO_PROJECT_NAME":return l.instance.build.PROJECT_NAME;case"ZUPLO_BUILD_ID":return l.instance.build.BUILD_ID}if(!(S(t)&&!D(t)))return l.instance.runtime[t]}});function ne(n,r,t){return`_${L(n+"_"+r+"_"+t)}`}i(ne,"getRawOperationDataIdentifierName");function re(n,r,t,s){return`_${L(n.toLowerCase())}_`+r.toLowerCase()+"_"+t.toLowerCase()+`_${s.toLowerCase()}`}i(re,"getIdForParameterSchema");function ie(n,r,t){return`_${L(n.toLowerCase())}_`+r.toLowerCase()+`_rb_${L(t.toLowerCase())}`}i(ie,"getIdForRequestBodySchema");function oe(n,r){return`_${L(n)}__${L(r)}`}i(oe,"getIdForRefSchema");function L(n){let r=[];for(let t=0;t<n.length;t++){let s=n.charCodeAt(t);s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?r.push(n.charAt(t)):r.push("_")}return r.join("")}i(L,"sanitizedIdentifierName");export{l as a,N as b,S as c,D as d,X as e,ne as f,re as g,ie as h,oe as i,L as j};
|
|
26
|
-
/*! For license information please see chunk-WS4HN7WC.js.LEGAL.txt */
|
|
File without changes
|