@zuplo/cli 7.15.0 → 7.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/LICENSE.third-party.txt +236 -0
  2. package/LICENSE.txt +5 -78
  3. package/README.md +18 -3
  4. package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwks/remote.js +1 -1
  5. package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +2 -0
  6. package/node_modules/@modelcontextprotocol/client/node_modules/jose/package.json +1 -1
  7. package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwks/remote.js +1 -1
  8. package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +2 -0
  9. package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/package.json +1 -1
  10. package/node_modules/@posthog/core/dist/privacy.d.ts +6 -1
  11. package/node_modules/@posthog/core/dist/privacy.d.ts.map +1 -1
  12. package/node_modules/@posthog/core/dist/privacy.js +69 -10
  13. package/node_modules/@posthog/core/dist/privacy.mjs +65 -9
  14. package/node_modules/@posthog/core/dist/traces/span.d.ts +6 -0
  15. package/node_modules/@posthog/core/dist/traces/span.d.ts.map +1 -1
  16. package/node_modules/@posthog/core/dist/traces/span.js +18 -0
  17. package/node_modules/@posthog/core/dist/traces/span.mjs +18 -0
  18. package/node_modules/@posthog/core/package.json +2 -2
  19. package/node_modules/@posthog/core/src/privacy.ts +100 -18
  20. package/node_modules/@posthog/core/src/traces/span.spec.ts +15 -1
  21. package/node_modules/@posthog/core/src/traces/span.ts +23 -0
  22. package/node_modules/@posthog/types/dist/traces.d.ts +10 -0
  23. package/node_modules/@posthog/types/dist/traces.d.ts.map +1 -1
  24. package/node_modules/@posthog/types/package.json +1 -1
  25. package/node_modules/@posthog/types/src/traces.ts +12 -0
  26. package/node_modules/@zuplo/core/LICENSE.third-party.txt +622 -0
  27. package/node_modules/@zuplo/core/LICENSE.txt +5 -78
  28. package/node_modules/@zuplo/core/README.md +7 -0
  29. package/node_modules/@zuplo/core/constants.minified.js +7 -20
  30. package/node_modules/@zuplo/core/customer.cli.minified.js +28 -41
  31. package/node_modules/@zuplo/core/index.minified.js +35 -48
  32. package/node_modules/@zuplo/core/package.json +4 -2
  33. package/node_modules/@zuplo/core/zeno.js +7 -20
  34. package/node_modules/@zuplo/graphql/LICENSE.third-party.txt +29 -0
  35. package/node_modules/@zuplo/graphql/LICENSE.txt +5 -78
  36. package/node_modules/@zuplo/graphql/README.md +7 -0
  37. package/node_modules/@zuplo/graphql/out/esm/index.js +7 -20
  38. package/node_modules/@zuplo/graphql/out/esm/index.js.map +1 -1
  39. package/node_modules/@zuplo/graphql/package.json +3 -2
  40. package/node_modules/@zuplo/openapi-tools/LICENSE.txt +7 -0
  41. package/node_modules/@zuplo/openapi-tools/README.md +7 -0
  42. package/node_modules/@zuplo/openapi-tools/package.json +3 -2
  43. package/node_modules/@zuplo/otel/LICENSE.third-party.txt +243 -0
  44. package/node_modules/@zuplo/otel/LICENSE.txt +5 -78
  45. package/node_modules/@zuplo/otel/README.md +33 -0
  46. package/node_modules/@zuplo/otel/out/esm/chunk-6YAK7LGJ.js +13 -0
  47. package/node_modules/@zuplo/otel/out/esm/chunk-6YAK7LGJ.js.map +1 -0
  48. package/node_modules/@zuplo/otel/out/esm/index.js +8 -21
  49. package/node_modules/@zuplo/otel/out/types/index.d.ts +41 -0
  50. package/node_modules/@zuplo/otel/package.json +3 -2
  51. package/node_modules/@zuplo/runtime/LICENSE.third-party.txt +511 -0
  52. package/node_modules/@zuplo/runtime/LICENSE.txt +5 -78
  53. package/node_modules/@zuplo/runtime/README.md +7 -0
  54. package/node_modules/@zuplo/runtime/out/esm/chunk-5JGLAPFA.js +13 -0
  55. package/node_modules/@zuplo/runtime/out/esm/chunk-5JGLAPFA.js.map +1 -0
  56. package/node_modules/@zuplo/runtime/out/esm/{chunk-SX6JF7A6.js → chunk-AJ3MMWJS.js} +9 -22
  57. package/node_modules/@zuplo/runtime/out/esm/chunk-AJ3MMWJS.js.map +1 -0
  58. package/node_modules/@zuplo/runtime/out/esm/chunk-BH4DKEES.js +13 -0
  59. package/node_modules/@zuplo/runtime/out/esm/chunk-BH4DKEES.js.map +1 -0
  60. package/node_modules/@zuplo/runtime/out/esm/chunk-G42UYZ6V.js +24 -0
  61. package/node_modules/@zuplo/runtime/out/esm/{chunk-M4IZPJP6.js.map → chunk-G42UYZ6V.js.map} +1 -1
  62. package/node_modules/@zuplo/runtime/out/esm/chunk-OE2WMJXK.js +431 -0
  63. package/node_modules/@zuplo/runtime/out/esm/chunk-OE2WMJXK.js.map +1 -0
  64. package/node_modules/@zuplo/runtime/out/esm/chunk-R6UNMRUU.js +13 -0
  65. package/node_modules/@zuplo/runtime/out/esm/chunk-R6UNMRUU.js.map +1 -0
  66. package/node_modules/@zuplo/runtime/out/esm/{chunk-GWGCD6Z7.js → chunk-T2WKOG7J.js} +9 -22
  67. package/node_modules/@zuplo/runtime/out/esm/chunk-T2WKOG7J.js.map +1 -0
  68. package/node_modules/@zuplo/runtime/out/esm/{chunk-HTXNM72E.js → chunk-TOJD4RET.js} +9 -22
  69. package/node_modules/@zuplo/runtime/out/esm/chunk-TOJD4RET.js.map +1 -0
  70. package/node_modules/@zuplo/runtime/out/esm/chunk-VXPFMOL5.js +13 -0
  71. package/node_modules/@zuplo/runtime/out/esm/chunk-VXPFMOL5.js.map +1 -0
  72. package/node_modules/@zuplo/runtime/out/esm/index.js +8 -21
  73. package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
  74. package/node_modules/@zuplo/runtime/out/esm/internal/index.js +8 -21
  75. package/node_modules/@zuplo/runtime/out/esm/mcp/messages/index.js +8 -21
  76. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +11 -39
  77. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +1 -1
  78. package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +8 -21
  79. package/node_modules/@zuplo/runtime/out/esm/mocks/index.js.map +1 -1
  80. package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js +8 -21
  81. package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js.map +1 -1
  82. package/node_modules/@zuplo/runtime/out/types/index.d.ts +248 -6
  83. package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +101 -0
  84. package/node_modules/@zuplo/runtime/out/types/mcp-gateway/index.d.ts +127 -0
  85. package/node_modules/@zuplo/runtime/package.json +3 -2
  86. package/node_modules/express-rate-limit/dist/index.cjs +33 -4
  87. package/node_modules/express-rate-limit/dist/index.mjs +33 -4
  88. package/node_modules/express-rate-limit/package.json +1 -1
  89. package/package.json +12 -11
  90. package/node_modules/@zuplo/otel/out/esm/chunk-PVCAT62X.js +0 -26
  91. package/node_modules/@zuplo/otel/out/esm/chunk-PVCAT62X.js.map +0 -1
  92. package/node_modules/@zuplo/runtime/out/esm/chunk-A3QGJZO7.js +0 -26
  93. package/node_modules/@zuplo/runtime/out/esm/chunk-A3QGJZO7.js.map +0 -1
  94. package/node_modules/@zuplo/runtime/out/esm/chunk-F4G3YEN2.js +0 -429
  95. package/node_modules/@zuplo/runtime/out/esm/chunk-F4G3YEN2.js.map +0 -1
  96. package/node_modules/@zuplo/runtime/out/esm/chunk-GWGCD6Z7.js.map +0 -1
  97. package/node_modules/@zuplo/runtime/out/esm/chunk-HTXNM72E.js.map +0 -1
  98. package/node_modules/@zuplo/runtime/out/esm/chunk-M4IZPJP6.js +0 -37
  99. package/node_modules/@zuplo/runtime/out/esm/chunk-SX6JF7A6.js.map +0 -1
  100. package/node_modules/@zuplo/runtime/out/esm/chunk-TYV53J3B.js +0 -26
  101. package/node_modules/@zuplo/runtime/out/esm/chunk-TYV53J3B.js.map +0 -1
  102. package/node_modules/@zuplo/runtime/out/esm/chunk-UKQQD2JN.js +0 -26
  103. package/node_modules/@zuplo/runtime/out/esm/chunk-UKQQD2JN.js.map +0 -1
  104. package/node_modules/@zuplo/runtime/out/esm/chunk-VP5Q3DEN.js +0 -26
  105. package/node_modules/@zuplo/runtime/out/esm/chunk-VP5Q3DEN.js.map +0 -1
  106. /package/node_modules/@zuplo/runtime/out/esm/{chunk-M4IZPJP6.js.LEGAL.txt → chunk-G42UYZ6V.js.LEGAL.txt} +0 -0
  107. /package/node_modules/@zuplo/runtime/out/esm/{chunk-F4G3YEN2.js.LEGAL.txt → chunk-OE2WMJXK.js.LEGAL.txt} +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/core",
3
- "version": "7.15.0",
3
+ "version": "7.15.1",
4
4
  "repository": "https://github.com/zuplo/zuplo",
5
5
  "author": "Zuplo, Inc.",
6
6
  "type": "module",
@@ -34,7 +34,9 @@
34
34
  "index.d.ts",
35
35
  "index.minified.js",
36
36
  "index.minified.js.LEGAL.txt",
37
- "README.md"
37
+ "README.md",
38
+ "LICENSE.txt",
39
+ "LICENSE.third-party.txt"
38
40
  ],
39
41
  "dependencies": {
40
42
  "chokidar": "^3.5.3",
@@ -1,26 +1,13 @@
1
1
 
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Zuplo, Inc. All rights reserved.
2
+ /*!
3
+ * Copyright (c) Zuplo, Inc. All rights reserved.
4
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.
5
+ * Use of this software is governed by the Zuplo Terms of Service at
6
+ * https://zuplo.com/legal/terms, or by a separate agreement your company has
7
+ * signed with Zuplo.
9
8
  *
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
- *--------------------------------------------------------------------------------------------*/
9
+ * See https://zuplo.com/legal/eula for more information.
10
+ */
24
11
 
25
12
  var ft=Object.defineProperty;var o=(r,e)=>ft(r,"name",{value:e,configurable:!0});import{scheduler as dt}from"node:timers/promises";Object.defineProperty(globalThis,"scheduler",{value:dt,writable:!1,enumerable:!0,configurable:!1});function ee(r){let e=0;for(let s of r)e+=s.length;let t=new Uint8Array(e),n=0;for(let s of r)t.set(s,n),n+=s.length;return t}o(ee,"concat");var z=new TextEncoder,ge=new TextDecoder,ut=42,pt=124,mt=40,gt=33,ht=35,bt=36,yt=44,At=45,Tt=58,Ct=37,xt=95,Rt=62,Et=126,_t=43,wt=61,X=z.encode(`\r
26
13
  `),St=z.encode("*"),Nt=z.encode("$");function me(r){let e=[St,z.encode(r.length.toString()),X];for(let t of r){let n=t instanceof Uint8Array?t:z.encode(t.toString());e.push(Nt,z.encode(n.byteLength.toString()),X,n,X)}return ee(e)}o(me,"createRequest");async function*vt(r){let e=new Uint8Array;for await(let t of r){e=ee([e,t]);let n;for(;(n=e.indexOf(X[0]))!==-1&&e[n+1]===X[1];)yield e.subarray(0,n),e=e.subarray(n+2)}}o(vt,"readLines");function J(r,e,t=!1){return Array.fromAsync({length:e},()=>q(r,t))}o(J,"readNReplies");function k(r){return ge.decode(r.slice(1))}o(k,"parseLine");function Pt(r){let e=[];for(let t=0;t<r.length;t+=2)e.push(r.slice(t,t+2));return e}o(Pt,"chunk");async function q(r,e=!1){let{value:t}=await r.next();switch(t[0]){case ut:case Rt:{let n=Number(k(t));return n===-1?null:await J(r,n)}case pt:{let n=Number(k(t))*2;return await J(r,n),q(r,e)}case mt:return BigInt(k(t));case gt:{let{value:n}=await r.next();return Promise.reject(ge.decode(n))}case ht:return k(t)==="t";case bt:case wt:return k(t)==="-1"?null:q(r,e);case yt:case Tt:switch(k(t)){case"inf":return 1/0;case"-inf":return-1/0;default:return Number(k(t))}case At:return Promise.reject(k(t));case Ct:{let n=Number(k(t))*2,s=await J(r,n);return Object.fromEntries(Pt(s))}case xt:return null;case Et:return new Set(await J(r,Number(k(t)),e));case _t:return k(t);default:return e?t:ge.decode(t)}}o(q,"readReply");var te=class{constructor(e){this.conn=e;this.#e=e.writable.getWriter(),this.#r=vt(e.readable)}static{o(this,"RedisClient")}#e;#r;#t=Promise.resolve();#n(e){return this.#t=this.#t.then(e),this.#t}sendCommand(e,t=!1){return this.#n(()=>(this.#e.write(me(e)),q(this.#r,t)))}writeCommand(e){return this.#n(()=>this.#e.write(me(e)))}async*readReplies(e=!1){for(;;)yield q(this.#r,e)}pipelineCommands(e,t=!1){return this.#n(()=>{let n=ee(e.map(me));return this.#e.write(n),J(this.#r,e.length,t)})}};var R=globalThis.Deno?.build.os==="windows"||globalThis.navigator?.platform?.startsWith("Win")||globalThis.process?.platform?.startsWith("win")||!1;function E(r){if(typeof r!="string")throw new TypeError(`Path must be a string, received "${JSON.stringify(r)}"`)}o(E,"assertPath");function L(r){return r===47}o(L,"isPosixPathSeparator");function T(r){return r===47||r===92}o(T,"isPathSeparator");function M(r){return r>=97&&r<=122||r>=65&&r<=90}o(M,"isWindowsDeviceRoot");function ne(r){if(E(r),r.length===0)return"."}o(ne,"assertArg");function V(r,e,t,n){let s="",i=0,l=-1,a=0,d;for(let c=0;c<=r.length;++c){if(c<r.length)d=r.charCodeAt(c);else{if(n(d))break;d=47}if(n(d)){if(!(l===c-1||a===1))if(l!==c-1&&a===2){if(s.length<2||i!==2||s.charCodeAt(s.length-1)!==46||s.charCodeAt(s.length-2)!==46){if(s.length>2){let m=s.lastIndexOf(t);m===-1?(s="",i=0):(s=s.slice(0,m),i=s.length-1-s.lastIndexOf(t)),l=c,a=0;continue}else if(s.length===2||s.length===1){s="",i=0,l=c,a=0;continue}}e&&(s.length>0?s+=`${t}..`:s="..",i=2)}else s.length>0?s+=t+r.slice(l+1,c):s=r.slice(l+1,c),i=c-l-1;l=c,a=0}else d===46&&a!==-1?++a:a=-1}return s}o(V,"normalizeString");function oe(r){ne(r);let e=L(r.charCodeAt(0)),t=L(r.charCodeAt(r.length-1));return r=V(r,!e,"/",L),r.length===0&&!e&&(r="."),r.length>0&&t&&(r+="/"),e?`/${r}`:r}o(oe,"normalize");function be(...r){if(r.length===0)return".";r.forEach(t=>E(t));let e=r.filter(t=>t.length>0).join("/");return e===""?".":oe(e)}o(be,"join");function se(r){ne(r);let e=r.length,t=0,n,s=!1,i=r.charCodeAt(0);if(e>1)if(T(i))if(s=!0,T(r.charCodeAt(1))){let a=2,d=a;for(;a<e&&!T(r.charCodeAt(a));++a);if(a<e&&a!==d){let c=r.slice(d,a);for(d=a;a<e&&T(r.charCodeAt(a));++a);if(a<e&&a!==d){for(d=a;a<e&&!T(r.charCodeAt(a));++a);if(a===e)return`\\\\${c}\\${r.slice(d)}\\`;a!==d&&(n=`\\\\${c}\\${r.slice(d,a)}`,t=a)}}}else t=1;else M(i)&&r.charCodeAt(1)===58&&(n=r.slice(0,2),t=2,e>2&&T(r.charCodeAt(2))&&(s=!0,t=3));else if(T(i))return"\\";let l;return t<e?l=V(r.slice(t),!s,"\\",T):l="",l.length===0&&!s&&(l="."),l.length>0&&T(r.charCodeAt(e-1))&&(l+="\\"),n===void 0?s?l.length>0?`\\${l}`:"\\":l:s?l.length>0?`${n}\\${l}`:`${n}\\`:n+l}o(se,"normalize");function ye(...r){if(r.forEach(i=>E(i)),r=r.filter(i=>i.length>0),r.length===0)return".";let e=!0,t=0,n=r[0];if(T(n.charCodeAt(0))){++t;let i=n.length;i>1&&T(n.charCodeAt(1))&&(++t,i>2&&(T(n.charCodeAt(2))?++t:e=!1))}let s=r.join("\\");if(e){for(;t<s.length&&T(s.charCodeAt(t));++t);t>=2&&(s=`\\${s.slice(t)}`)}return se(s)}o(ye,"join");function N(...r){return R?ye(...r):be(...r)}o(N,"join");function Xt(r){if(r.length>=255)throw new TypeError("Alphabet too long");let e=new Uint8Array(256);for(let c=0;c<e.length;c++)e[c]=255;for(let c=0;c<r.length;c++){let m=r.charAt(c),g=m.charCodeAt(0);if(e[g]!==255)throw new TypeError(m+" is ambiguous");e[g]=c}let t=r.length,n=r.charAt(0),s=Math.log(t)/Math.log(256),i=Math.log(256)/Math.log(t);function l(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 m=0,g=0,y=0,C=c.length;for(;y!==C&&c[y]===0;)y++,m++;let _=(C-y)*i+1>>>0,w=new Uint8Array(_);for(;y!==C;){let A=c[y],S=0;for(let O=_-1;(A!==0||S<g)&&O!==-1;O--,S++)A+=256*w[O]>>>0,w[O]=A%t>>>0,A=A/t>>>0;if(A!==0)throw new Error("Non-zero carry");g=S,y++}let v=_-g;for(;v!==_&&w[v]===0;)v++;let x=n.repeat(m);for(;v<_;++v)x+=r.charAt(w[v]);return x}o(l,"encode");function a(c){if(typeof c!="string")throw new TypeError("Expected String");if(c.length===0)return new Uint8Array;let m=0,g=0,y=0;for(;c[m]===n;)g++,m++;let C=(c.length-m)*s+1>>>0,_=new Uint8Array(C);for(;m<c.length;){let A=c.charCodeAt(m);if(A>255)return;let S=e[A];if(S===255)return;let O=0;for(let u=C-1;(S!==0||O<y)&&u!==-1;u--,O++)S+=t*_[u]>>>0,_[u]=S%256>>>0,S=S/256>>>0;if(S!==0)throw new Error("Non-zero carry");y=O,m++}let w=C-y;for(;w!==C&&_[w]===0;)w++;let v=new Uint8Array(g+(C-w)),x=g;for(;w!==C;)v[x++]=_[w++];return v}o(a,"decodeUnsafe");function d(c){let m=a(c);if(m)return m;throw new Error("Non-base"+t+" character")}return o(d,"decode"),{encode:l,decodeUnsafe:a,decode:d}}o(Xt,"base");var Ie=Xt;var qt="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",$e=Ie(qt);import{pathToFileURL as Ue}from"node:url";import Fe from"dotenv";var Ae=class{static{o(this,"ZenoLogger")}prefix="[ZENO]:";logLevel;originalConsole={debug:console.debug,info:console.info,warn:console.warn,error:console.error};constructor(e="info"){this.logLevel=e}debug(...e){(this.shouldLog("debug")||Deno.env.get("ZENO_DEBUG"))&&this.originalConsole.debug(this.prefix,"[DEBUG]",...e)}info(...e){this.shouldLog("info")&&this.originalConsole.info(this.prefix,"[INFO]",...e)}warn(...e){this.shouldLog("warn")&&this.originalConsole.warn(this.prefix,"[WARN]",...e)}error(...e){this.shouldLog("error")&&this.originalConsole.error(this.prefix,"[ERROR]",...e)}shouldLog(e){let t=["debug","info","warn","error"],n=t.indexOf(this.logLevel);return t.indexOf(e)>=n}setLogLevel(e){this.logLevel=e}},p=new Ae;async function Be(r){let e={};for(let[t,n]of Object.entries(Deno.env.toObject()))n!==void 0&&(e[t]=n);try{let t=N(r,".env.zuplo"),n=new TextDecoder("utf-8"),s=await Deno.readFile(Ue(t)),i=n.decode(s),l=Fe.parse(i);for(let[a,d]of Object.entries(l))if(e[a]=d,a==="ZUPLO_SYSTEM_CONFIGURATIONS")try{let c=new TextDecoder().decode($e.decode(d)),m=JSON.parse(c);for(let[g,y]of Object.entries(m))e[g]=String(y)}catch(c){Deno.build.standalone||p.error("Failed to parse ZUPLO_SYSTEM_CONFIGURATIONS from .env.zuplo:",c)}}catch(t){t instanceof Deno.errors.NotFound||p.error("Failed to load .env.zuplo file:",t)}try{let t=N(r,".env"),n=new TextDecoder("utf-8"),s=await Deno.readFile(Ue(t)),i=n.decode(s),l=Fe.parse(i);for(let[a,d]of Object.entries(l))e[a]=d}catch(t){t instanceof Deno.errors.NotFound||p.error("Failed to load .env.zuplo file:",t)}for(let[t,n]of Object.entries(e))n===void 0&&delete e[t];return e.__ZUPLO_IS_MANAGED_DEDICATED="true",e}o(Be,"loadEnvironment");function ie(r){return r?["true","1","yes","y"].includes(r.toLowerCase()):!1}o(ie,"parseEnvBool");var Te=class{static{o(this,"CacheStorage")}#e;constructor(){this.#e=new Map}async open(e){let t=this.#e.get(e);return t||(t=new Ce,this.#e.set(e,t)),t}async has(e){return this.#e.has(e)}async delete(e){throw new Error("caches.delete is not supported")}};async function Yt(){let r=Deno.env.get("ZUPLO_CACHE_REDIS_HOSTNAME");if(r===void 0)throw new Error("ZUPLO_CACHE_REDIS_HOSTNAME is not set");let e=parseInt(Deno.env.get("ZUPLO_CACHE_REDIS_PORT")||"6379"),t=await Deno.connect({hostname:r,port:e});return new te(t)}o(Yt,"getRedisClient");function Qt(r){let e={};return r&&r.split(",").forEach(n=>{let[s,i]=n.trim().split("=");e[s.toLowerCase()]=i?i.trim():!0}),e}o(Qt,"parseHeaderValue");function er(r){let e={};for(let[t,n]of r.entries())e[t]=n;return e}o(er,"objectifyHeaders");async function tr(r){let e=await r.arrayBuffer(),t=new Uint8Array(e),n="";for(let s=0;s<t.length;s++)n+=String.fromCharCode(t[s]);return btoa(n)}o(tr,"serializeResponseBody");function rr(r){let e=atob(r),t=e.length,n=new Uint8Array(t);for(let s=0;s<t;s++)n[s]=e.charCodeAt(s);return n}o(rr,"deserializeResponseBody");var Ce=class{static{o(this,"Cache")}#e;#r;#t;constructor(e="default",t={}){this.#e=e;let n=Deno.env.get("ZUPLO_CACHE_REDIS_HOSTNAME")&&Deno.env.get("ZUPLO_CACHE_REDIS_PORT");this.#r=!n||!ie(Deno.env.get("USE_ZENO_ZONE_CACHE")),this.#t=t.getRedisClient||Yt}#n(e){return`${this.#e}:${e.url}`}async match(e,t){if(this.#r)return;let n=this.#n(e),s=await this.#t();await s.sendCommand(["HELLO",3]);let i=await s.sendCommand(["TTL",n]);if(i!==-2){if(i<2)return;{let l=await s.sendCommand(["HGETALL",n]),a=l.status,d=l.status,c=new Headers(JSON.parse(l.headers));return new Response(rr(l.body),{status:a,statusText:d,headers:c})}}}async put(e,t){if(this.#r)return;let n=1*60*60,s=Qt(t.headers.get("cache-control")),i=parseInt(s["s-maxage"]),l=parseInt(s["max-age"]),a=s["no-store"],d=s["no-cache"],c=i||l||0;if(c===0&&!a&&!d&&(c=n,t.headers.append("cache-control",`s-maxage=${n}`)),c>0){let m=this.#n(e),g=await this.#t();await g.sendCommand(["HELLO",3]),await g.sendCommand(["HSET",m,"maxage",c,"status",t.status,"statusText",t.statusText,"headers",JSON.stringify(er(t.headers)),"body",await tr(t)]),await g.sendCommand(["EXPIRE",m,c])}}async delete(e){if(this.#r)return;let t=this.#n(e);if(await(await this.#t()).sendCommand(["DEL",t])!==1)throw new Error("Failed to delete cache entry")}},nr=new Te;Object.defineProperty(globalThis,"caches",{value:nr,writable:!1,enumerable:!0,configurable:!1});var Ve="text/plain; version=0.0.4; charset=utf-8",P=Object.freeze({nameLength:200,helpLength:1024,labelNames:16,labelNameLength:100,labelValueLength:256,buckets:50,defaultMaxSeries:500,expositionBytes:1024*1024}),or=/^[a-zA-Z_:][a-zA-Z0-9_:]*$/,sr=/^[a-zA-Z_][a-zA-Z0-9_]*$/,xe=24,ir=Object.freeze({inc(){}}),ar=Object.freeze({set(){},inc(){},dec(){}}),lr=Object.freeze({observe(){}}),Re=class{static{o(this,"ExpositionBudget")}#e=0;#r;constructor(e){this.#r=e}tryCharge(e){return this.#e+e>this.#r?!1:(this.#e+=e,!0)}refund(e){this.#e=Math.max(0,this.#e-e)}},ae=class{static{o(this,"Metric")}name;help;labelNames;series=new Map;#e;#r;#t;#n=!1;exposeZeroWhenEmpty=!0;constructor(e,t){this.name=e.name,this.help=e.help,this.labelNames=Object.freeze([...e.labelNames??[]]),this.#e=e.maxSeries??P.defaultMaxSeries,this.#r=t}child(e){if(e!==void 0&&(typeof e!="object"||e===null))return this.#o("labels must be an object");if(this.labelNames.length===0)return e!==void 0&&ur(e)?this.#o("this metric has no labels"):(this.#t===void 0&&(this.#t=this.#s("",[])),this.#t??this.noopChild());if(e===void 0)return this.#o("labels are required");let t=new Array(this.labelNames.length);for(let i=0;i<this.labelNames.length;i++){let l=e[this.labelNames[i]];if(typeof l!="string")return this.#o(`label "${this.labelNames[i]}" is missing`);if(l.length>P.labelValueLength)return this.#o(`label "${this.labelNames[i]}" is longer than ${P.labelValueLength} characters`);t[i]=l}if(pr(e)!==this.labelNames.length)return this.#o("unexpected label names");let n=dr(t),s=this.series.get(n);return s!==void 0?s.child:this.#s(n,t)??this.noopChild()}reset(){let e=0;for(let{cost:t}of this.series.values())e+=t;this.#r.budget?.refund(e),this.series.clear(),this.#t=void 0}matches(e,t){let n=t.labelNames??[];return e===this.type&&n.length===this.labelNames.length&&n.every((s,i)=>s===this.labelNames[i])}render(e){e.push(`# HELP ${this.name} ${mr(this.help)}`),e.push(`# TYPE ${this.name} ${this.type}`),this.exposeZeroWhenEmpty&&this.labelNames.length===0&&this.series.size===0&&this.child();for(let{labelText:t,child:n}of this.series.values())this.renderSeries(e,t,n)}#s(e,t){if(this.series.size>=this.#e){this.#r.onDrop(this.name,"series_limit");return}let n="";for(let l=0;l<t.length;l++)l>0&&(n+=","),n+=`${this.labelNames[l]}="${gr(t[l])}"`;let s=this.seriesCost(n);if(this.#r.budget!==void 0&&!this.#r.budget.tryCharge(s)){this.#r.onDrop(this.name,"budget");return}let i=this.createChild();return this.series.set(e,{labelText:n,child:i,cost:s}),i}#o(e){return this.#n||(this.#n=!0,p.warn(`Metric ${this.name} expects labels [${this.labelNames.join(", ")}] (${e}); dropping these observations`)),this.noopChild()}},le=class{static{o(this,"ValueSeries")}value=0;#e;constructor(e){this.#e=e}set(e){typeof e=="number"&&(this.value=e)}inc(e=1){typeof e!="number"||this.#e&&!(e>=0)||(this.value+=e)}dec(e=1){typeof e=="number"&&(this.value-=e)}},ce=class extends ae{static{o(this,"ValueMetric")}#e;#r=!1;constructor(e,t){super(e,t),this.#e=e.collect,this.exposeZeroWhenEmpty=e.collect===void 0}render(e){if(this.#e!==void 0){this.reset();try{this.#e((t,n)=>{this.child(n).set(t)})}catch(t){this.#r||(this.#r=!0,p.warn(`Failed to collect metric ${this.name}:`,t))}}super.render(e)}seriesCost(e){return this.name.length+e.length+xe+4}renderSeries(e,t,n){let{value:s}=n;e.push(`${this.name}${We(t)} ${Q(s)}`)}},fe=class extends ce{static{o(this,"Counter")}type="counter";inc(e){this.child().inc(e)}createChild(){return new le(!0)}noopChild(){return ir}},Ee=class extends ce{static{o(this,"Gauge")}type="gauge";set(e){this.child().set(e)}inc(e){this.child().inc(e)}dec(e){this.child().dec(e)}createChild(){return new le(!1)}noopChild(){return ar}},_e=class{static{o(this,"HistogramSeries")}#e;counts;sum=0;count=0;constructor(e){this.#e=e,this.counts=new Float64Array(e.length+1)}observe(e){if(typeof e!="number"||Number.isNaN(e))return;let t=this.#e,n=0;for(;n<t.length&&e>t[n];)n++;this.counts[n]++,this.sum+=e,this.count++}},we=class extends ae{static{o(this,"Histogram")}type="histogram";#e;#r;#t;constructor(e,t){super(e,t),this.#e=Float64Array.from(e.buckets),this.#r=[...e.buckets.map(Q),"+Inf"],this.#t=this.#r.reduce((n,s)=>n+s.length,0)}observe(e){this.child().observe(e)}matches(e,t){let n=t.buckets??[];return super.matches(e,t)&&n.length===this.#e.length&&n.every((s,i)=>s===this.#e[i])}createChild(){return new _e(this.#e)}noopChild(){return lr}seriesCost(e){let n=this.#r.length*(this.name.length+e.length+16+xe)+this.#t,s=2*(this.name.length+e.length+10+xe);return n+s}renderSeries(e,t,n){let s=n,i=t===""?"{":`{${t},`,l=0;for(let d=0;d<s.counts.length;d++)l+=s.counts[d],e.push(`${this.name}_bucket${i}le="${this.#r[d]}"} ${Q(l)}`);let a=We(t);e.push(`${this.name}_sum${a} ${Q(s.sum)}`),e.push(`${this.name}_count${a} ${Q(s.count)}`)}},Ge={name:"zeno_metrics_series_dropped_total",help:"Observations dropped because a metric reached its series limit or the /metrics size budget.",labelNames:["metric","reason"],maxSeries:1/0},de=class{static{o(this,"Registry")}#e=new Map;#r=new Map;#t;#n=new Set;#s;constructor(e={}){this.#t=new Re(e.expositionBytes??P.expositionBytes)}counter(e){return this.#o("counter",e,t=>new fe(e,t),this.#t)}gauge(e){return this.#o("gauge",e,t=>new Ee(e,t),this.#t)}histogram(e){return this.#o("histogram",e,t=>new we(e,t),this.#t)}render(){let e=[],t=[];for(let n of this.#e.values()){t.length=0;try{n.render(t)}catch(s){this.#n.has(n)||(this.#n.add(n),p.warn(`Failed to render metric ${n.name}:`,s));continue}for(let s of t)e.push(s)}return e.push(""),e.join(`
@@ -0,0 +1,29 @@
1
+ This package includes code from the open source projects below, each
2
+ under its own license. The license texts follow.
3
+
4
+ ==============================================================================
5
+ graphql-query-complexity
6
+ https://github.com/slicknode/graphql-query-complexity
7
+ ==============================================================================
8
+
9
+ MIT License
10
+
11
+ Copyright (c) 2017 Ivo Meißner
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
@@ -1,80 +1,7 @@
1
- # End User License Agreement (EULA)
1
+ Copyright (c) Zuplo, Inc. All rights reserved.
2
2
 
3
- This End User License Agreement ("Agreement") is a legal agreement between you
4
- ("User") and **Zuplo, Inc.**, a Delaware corporation ("Zuplo"), governing the
5
- use of Zuplo’s proprietary software tool designed for local development (the
6
- "Software").
3
+ Use of this software is governed by the Zuplo Terms of Service at
4
+ https://zuplo.com/legal/terms, or by a separate agreement your company has
5
+ signed with Zuplo.
7
6
 
8
- By installing, copying, or otherwise using the Software, you agree to be bound
9
- by the terms of this Agreement. If you do not agree, do not install or use the
10
- Software.
11
-
12
- ## 1. License Grant
13
-
14
- Subject to the terms of this Agreement, Zuplo grants you a limited,
15
- non-exclusive, non-transferable, non-sublicensable license to use the Software
16
- **solely for internal local development purposes** and **only if you are an
17
- active customer of Zuplo**.
18
-
19
- ## 2. Restrictions
20
-
21
- You may **not**:
22
-
23
- - Distribute, sublicense, lease, rent, or otherwise make the Software available
24
- to any third party;
25
- - Use the Software for any commercial purpose other than in connection with your
26
- authorized use of Zuplo services;
27
- - Reverse engineer, decompile, disassemble, or attempt to derive the source code
28
- of the Software;
29
- - Use the Software if you are not a current customer of Zuplo.
30
-
31
- ## 3. Intellectual Property Ownership
32
-
33
- All intellectual property rights in and to the Software — including but not
34
- limited to all code, documentation, interfaces, design, and trademarks — are and
35
- shall remain the exclusive property of Zuplo and its licensors.
36
- This Agreement does not grant you any rights, title, or interest in or to any
37
- trademarks, trade secrets, copyrights, patents, or other intellectual property
38
- owned by Zuplo, except for the limited license expressly set forth in Section 1.
39
-
40
- Any feedback, suggestions, or improvements you provide regarding the Software
41
- may be freely used by Zuplo without any obligation to you.
42
-
43
- ## 4. Open Source Software Notice
44
-
45
- The Software may include or rely on components that are subject to separate open
46
- source licenses. These components are not governed by this Agreement but instead
47
- by their respective licenses.
48
-
49
- Copies of the applicable open source licenses are provided in the distribution
50
- of the Software.
51
-
52
- ## 5. Termination
53
-
54
- This license is effective until terminated. It will automatically terminate
55
- without notice if you cease to be a customer of Zuplo or fail to comply with any
56
- term of this Agreement. Upon termination, you must immediately cease all use of
57
- the Software and destroy all copies.
58
-
59
- ## 6. No Warranty
60
-
61
- The Software is provided "**as is**," without warranty of any kind, express or
62
- implied, including but not limited to the implied warranties of merchantability
63
- or fitness for a particular purpose.
64
-
65
- ## 7. Limitation of Liability
66
-
67
- In no event shall Zuplo be liable for any indirect, incidental, special, or
68
- consequential damages, or damages for loss of profits, revenue, data, or use,
69
- incurred by you or any third party, whether in an action in contract or tort,
70
- arising from your use of the Software.
71
-
72
- ## 8. Governing Law
73
-
74
- This Agreement is governed by and construed in accordance with the laws of the
75
- State of Delaware, without regard to its conflict of law principles.
76
-
77
- ## 9. Entire Agreement
78
-
79
- This Agreement constitutes the entire agreement between the parties with respect
80
- to the Software and supersedes all prior or contemporaneous understandings.
7
+ See https://zuplo.com/legal/eula for more information.
@@ -5,3 +5,10 @@ Runtime.
5
5
 
6
6
  See the
7
7
  [documentation for more information on local development](https://zuplo.com/docs/articles/local-development).
8
+
9
+ ## License
10
+
11
+ Copyright (c) Zuplo, Inc. All rights reserved. Use of this package is governed
12
+ by the [Zuplo Terms of Service](https://zuplo.com/legal/terms), or by a separate
13
+ agreement your company has signed with Zuplo. See `LICENSE.txt` and
14
+ [zuplo.com/legal/eula](https://zuplo.com/legal/eula).
@@ -1,26 +1,13 @@
1
1
 
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Zuplo, Inc. All rights reserved.
2
+ /*!
3
+ * Copyright (c) Zuplo, Inc. All rights reserved.
4
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.
5
+ * Use of this software is governed by the Zuplo Terms of Service at
6
+ * https://zuplo.com/legal/terms, or by a separate agreement your company has
7
+ * signed with Zuplo.
9
8
  *
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
- *--------------------------------------------------------------------------------------------*/
9
+ * See https://zuplo.com/legal/eula for more information.
10
+ */
24
11
 
25
12
  var Wn=Object.defineProperty;var s=(e,t)=>Wn(e,"name",{value:t,configurable:!0});import{buildCacheOperationBase as er,emitCacheOperation as Pe,emitCacheOperationLate as nt,extractGraphqlErrors as tr,recordGraphqlCacheState as Jn,ZoneCache as nr}from"@zuplo/runtime";function _(e,t){if(!!!e)throw new Error(t)}s(_,"devAssert");function V(e){return typeof e=="object"&&e!==null}s(V,"isObjectLike");function ue(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}s(ue,"invariant");var Zn=/\r\n|[\n\r]/g;function Ae(e,t){let n=0,i=1;for(let r of e.body.matchAll(Zn)){if(typeof r.index=="number"||ue(!1),r.index>=t)break;n=r.index+r[0].length,i+=1}return{line:i,column:t+1-n}}s(Ae,"getLocation");function Gt(e){return rt(e.source,Ae(e.source,e.start))}s(Gt,"printLocation");function rt(e,t){let n=e.locationOffset.column-1,i="".padStart(n)+e.body,r=t.line-1,o=e.locationOffset.line-1,a=t.line+o,c=t.line===1?n:0,d=t.column+c,f=`${e.name}:${a}:${d}
26
13
  `,y=i.split(/\r\n|[\n\r]/g),x=y[r];if(x.length>120){let N=Math.floor(d/80),I=d%80,E=[];for(let w=0;w<x.length;w+=80)E.push(x.slice(w,w+80));return f+dn([[`${a} |`,E[0]],...E.slice(1,N+1).map(w=>["|",w]),["|","^".padStart(I)],["|",E[N+1]]])}return f+dn([[`${a-1} |`,y[r-1]],[`${a} |`,x],["|","^".padStart(d)],[`${a+1} |`,y[r+1]]])}s(rt,"printSourceLocation");function dn(e){let t=e.filter(([i,r])=>r!==void 0),n=Math.max(...t.map(([i])=>i.length));return t.map(([i,r])=>i.padStart(n)+(r?" "+r:"")).join(`