gemi 0.57.0 → 0.58.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/dist/app/index.js +1 -1
- package/dist/broadcasting/index.js +1 -1
- package/dist/bun/plugin.js +1 -1
- package/dist/bun/preload.js +1 -1
- package/dist/{chunk-msyqr4y7.js → chunk-0a2xgcj3.js} +2 -2
- package/dist/{chunk-msyqr4y7.js.map → chunk-0a2xgcj3.js.map} +1 -1
- package/dist/{chunk-64bq12j3.js → chunk-3337e5g0.js} +2 -2
- package/dist/{chunk-64bq12j3.js.map → chunk-3337e5g0.js.map} +1 -1
- package/dist/{chunk-5fmbsy4q.js → chunk-3aa287k7.js} +2 -2
- package/dist/{chunk-5fmbsy4q.js.map → chunk-3aa287k7.js.map} +1 -1
- package/dist/{chunk-f233yzxf.js → chunk-3g5bjvdf.js} +2 -2
- package/dist/{chunk-f233yzxf.js.map → chunk-3g5bjvdf.js.map} +1 -1
- package/dist/{chunk-rc2asvyf.js → chunk-3xadx444.js} +2 -2
- package/dist/{chunk-rc2asvyf.js.map → chunk-3xadx444.js.map} +1 -1
- package/dist/{chunk-7pn0bnsc.js → chunk-3zxwscmf.js} +2 -2
- package/dist/{chunk-4f69ygc8.js.map → chunk-3zxwscmf.js.map} +1 -1
- package/dist/{chunk-jzatvtjd.js → chunk-437085pe.js} +2 -2
- package/dist/{chunk-jzatvtjd.js.map → chunk-437085pe.js.map} +1 -1
- package/dist/{chunk-17m5wxv0.js → chunk-4yt5x8s2.js} +2 -2
- package/dist/{chunk-17m5wxv0.js.map → chunk-4yt5x8s2.js.map} +1 -1
- package/dist/{chunk-dxxak51x.js → chunk-5athahgr.js} +2 -2
- package/dist/{chunk-dxxak51x.js.map → chunk-5athahgr.js.map} +1 -1
- package/dist/{chunk-dcwjwfjc.js → chunk-5n2rvfh3.js} +2 -2
- package/dist/{chunk-dcwjwfjc.js.map → chunk-5n2rvfh3.js.map} +1 -1
- package/dist/{chunk-r8637cqv.js → chunk-6235kb30.js} +3 -3
- package/dist/{chunk-r8637cqv.js.map → chunk-6235kb30.js.map} +1 -1
- package/dist/{chunk-67zyjx0c.js → chunk-7b0x860b.js} +2 -2
- package/dist/{chunk-67zyjx0c.js.map → chunk-7b0x860b.js.map} +1 -1
- package/dist/{chunk-q8k3gh8k.js → chunk-7ef5n8k2.js} +2 -2
- package/dist/{chunk-q8k3gh8k.js.map → chunk-7ef5n8k2.js.map} +1 -1
- package/dist/{chunk-n2zmg475.js → chunk-7j6wbv12.js} +2 -2
- package/dist/{chunk-n2zmg475.js.map → chunk-7j6wbv12.js.map} +1 -1
- package/dist/{chunk-g5pj95dz.js → chunk-86jebsm4.js} +3 -3
- package/dist/{chunk-g5pj95dz.js.map → chunk-86jebsm4.js.map} +1 -1
- package/dist/chunk-87qab82w.js +5 -0
- package/dist/{chunk-9j9wqrb2.js.map → chunk-87qab82w.js.map} +7 -3
- package/dist/{chunk-dwz0wbhj.js → chunk-8gew8b9a.js} +2 -2
- package/dist/{chunk-dwz0wbhj.js.map → chunk-8gew8b9a.js.map} +1 -1
- package/dist/{chunk-74aj8ms2.js → chunk-9m2tbf3n.js} +2 -2
- package/dist/{chunk-74aj8ms2.js.map → chunk-9m2tbf3n.js.map} +1 -1
- package/dist/{chunk-bw8kt7ps.js → chunk-a2sgjpvq.js} +2 -2
- package/dist/{chunk-bw8kt7ps.js.map → chunk-a2sgjpvq.js.map} +1 -1
- package/dist/chunk-b35e128b.js +5 -0
- package/dist/{chunk-r9as9htn.js.map → chunk-b35e128b.js.map} +1 -1
- package/dist/{chunk-1esnvq2z.js → chunk-cyaz97p5.js} +2 -2
- package/dist/{chunk-1esnvq2z.js.map → chunk-cyaz97p5.js.map} +1 -1
- package/dist/{chunk-mqwrmbh4.js → chunk-d125j8t0.js} +3 -3
- package/dist/{chunk-mqwrmbh4.js.map → chunk-d125j8t0.js.map} +1 -1
- package/dist/{chunk-yhzb9qpk.js → chunk-dgsgjg53.js} +2 -2
- package/dist/{chunk-yhzb9qpk.js.map → chunk-dgsgjg53.js.map} +1 -1
- package/dist/{chunk-6c14bexh.js → chunk-eejmhtnc.js} +2 -2
- package/dist/{chunk-6c14bexh.js.map → chunk-eejmhtnc.js.map} +1 -1
- package/dist/{chunk-vdzb29p5.js → chunk-fjm4y8bn.js} +2 -2
- package/dist/{chunk-vdzb29p5.js.map → chunk-fjm4y8bn.js.map} +1 -1
- package/dist/{chunk-ma5rj4st.js → chunk-grdahng8.js} +2 -2
- package/dist/{chunk-ma5rj4st.js.map → chunk-grdahng8.js.map} +1 -1
- package/dist/{chunk-5txddtaa.js → chunk-gw6agevz.js} +3 -3
- package/dist/{chunk-5txddtaa.js.map → chunk-gw6agevz.js.map} +1 -1
- package/dist/{chunk-ba0rkpk5.js → chunk-hppagzz4.js} +4 -4
- package/dist/{chunk-ba0rkpk5.js.map → chunk-hppagzz4.js.map} +1 -1
- package/dist/chunk-hwa5sqw5.js +19 -0
- package/dist/{chunk-r9h6aj7g.js.map → chunk-hwa5sqw5.js.map} +12 -6
- package/dist/chunk-hxf1re93.js +4 -0
- package/dist/{chunk-6fc909z5.js.map → chunk-hxf1re93.js.map} +6 -5
- package/dist/{chunk-d6kgxmp7.js → chunk-j0c6ytkj.js} +3 -3
- package/dist/{chunk-d6kgxmp7.js.map → chunk-j0c6ytkj.js.map} +1 -1
- package/dist/{chunk-4f69ygc8.js → chunk-jhkjz9jr.js} +2 -2
- package/dist/{chunk-7pn0bnsc.js.map → chunk-jhkjz9jr.js.map} +1 -1
- package/dist/{chunk-e9zz0zfv.js → chunk-k0fvsyeh.js} +1 -1
- package/dist/{chunk-j21tm6jf.js → chunk-keehyx51.js} +2 -2
- package/dist/{chunk-j21tm6jf.js.map → chunk-keehyx51.js.map} +1 -1
- package/dist/{chunk-a70s8pz4.js → chunk-m3xy5xyf.js} +2 -2
- package/dist/{chunk-a70s8pz4.js.map → chunk-m3xy5xyf.js.map} +1 -1
- package/dist/{chunk-swe2b6rv.js → chunk-mkfpnymy.js} +1 -1
- package/dist/{chunk-qkrba9c2.js → chunk-mwpdp09e.js} +2 -2
- package/dist/{chunk-qkrba9c2.js.map → chunk-mwpdp09e.js.map} +1 -1
- package/dist/{chunk-tzsnadg1.js → chunk-pmhd6zfc.js} +3 -3
- package/dist/{chunk-tzsnadg1.js.map → chunk-pmhd6zfc.js.map} +1 -1
- package/dist/chunk-qb5mv6pj.js +5 -0
- package/dist/chunk-qb5mv6pj.js.map +12 -0
- package/dist/{chunk-nqk3cx97.js → chunk-qgxr0g36.js} +2 -2
- package/dist/{chunk-nqk3cx97.js.map → chunk-qgxr0g36.js.map} +1 -1
- package/dist/{chunk-btr9kyqh.js → chunk-sy7jbdeb.js} +2 -2
- package/dist/{chunk-btr9kyqh.js.map → chunk-sy7jbdeb.js.map} +1 -1
- package/dist/{chunk-5z5xskg1.js → chunk-szss069z.js} +2 -2
- package/dist/{chunk-5z5xskg1.js.map → chunk-szss069z.js.map} +1 -1
- package/dist/{chunk-rxsmwbxv.js → chunk-tss5svjr.js} +2 -2
- package/dist/{chunk-rxsmwbxv.js.map → chunk-tss5svjr.js.map} +1 -1
- package/dist/{chunk-32d510cd.js → chunk-vr90r27j.js} +2 -2
- package/dist/{chunk-32d510cd.js.map → chunk-vr90r27j.js.map} +1 -1
- package/dist/{chunk-jny4f23c.js → chunk-w62m5f0n.js} +3 -3
- package/dist/{chunk-jny4f23c.js.map → chunk-w62m5f0n.js.map} +1 -1
- package/dist/{chunk-k5bjfhz8.js → chunk-w7rf99w6.js} +2 -2
- package/dist/{chunk-k5bjfhz8.js.map → chunk-w7rf99w6.js.map} +1 -1
- package/dist/{chunk-fck5yw2s.js → chunk-wbrj0gya.js} +2 -2
- package/dist/{chunk-fck5yw2s.js.map → chunk-wbrj0gya.js.map} +1 -1
- package/dist/{chunk-11dkjm1r.js → chunk-xdv1b8mr.js} +2 -2
- package/dist/{chunk-11dkjm1r.js.map → chunk-xdv1b8mr.js.map} +1 -1
- package/dist/{chunk-katt90qz.js → chunk-xey9cbap.js} +2 -2
- package/dist/{chunk-katt90qz.js.map → chunk-xey9cbap.js.map} +1 -1
- package/dist/{chunk-ae6xz52s.js → chunk-xzk827r3.js} +2 -2
- package/dist/{chunk-ae6xz52s.js.map → chunk-xzk827r3.js.map} +1 -1
- package/dist/{chunk-8v81dvje.js → chunk-y6a8r2bn.js} +3 -3
- package/dist/{chunk-8v81dvje.js.map → chunk-y6a8r2bn.js.map} +1 -1
- package/dist/{chunk-nkbreczg.js → chunk-yed5whgs.js} +3 -3
- package/dist/{chunk-nkbreczg.js.map → chunk-yed5whgs.js.map} +1 -1
- package/dist/{chunk-cecq6q1b.js → chunk-yf7vz71n.js} +1 -1
- package/dist/{chunk-knvxwrwh.js → chunk-yjzs247s.js} +2 -2
- package/dist/{chunk-knvxwrwh.js.map → chunk-yjzs247s.js.map} +1 -1
- package/dist/{chunk-ka4tdhm8.js → chunk-yy0eb9wn.js} +2 -2
- package/dist/{chunk-ka4tdhm8.js.map → chunk-yy0eb9wn.js.map} +1 -1
- package/dist/{chunk-1nqdzmvm.js → chunk-zbxgbr12.js} +2 -2
- package/dist/{chunk-1nqdzmvm.js.map → chunk-zbxgbr12.js.map} +1 -1
- package/dist/{chunk-wrypq618.js → chunk-zh2egcyb.js} +2 -2
- package/dist/{chunk-wrypq618.js.map → chunk-zh2egcyb.js.map} +1 -1
- package/dist/chunks/ThemeProvider-li1J_igh.js.map +1 -1
- package/dist/client/ClientRouter.d.ts.map +1 -1
- package/dist/client/ProgressManager.d.ts +1 -1
- package/dist/client/RouteStateContext.d.ts +9 -0
- package/dist/client/RouteStateContext.d.ts.map +1 -1
- package/dist/client/ServerDataProvider.d.ts +7 -0
- package/dist/client/ServerDataProvider.d.ts.map +1 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +68 -10
- package/dist/client/index.js.map +1 -1
- package/dist/client/rpc.d.ts +42 -0
- package/dist/client/rpc.d.ts.map +1 -1
- package/dist/client/useFeature.d.ts +40 -0
- package/dist/client/useFeature.d.ts.map +1 -0
- package/dist/config/index.js +1 -1
- package/dist/console/run.js +2 -2
- package/dist/console/run.js.map +1 -1
- package/dist/container/index.js +2 -2
- package/dist/container/index.js.map +1 -1
- package/dist/database/index.js +2 -2
- package/dist/database/index.js.map +1 -1
- package/dist/email/index.js +2 -2
- package/dist/email/index.js.map +1 -1
- package/dist/facades/Features.d.ts +57 -0
- package/dist/facades/Features.d.ts.map +1 -0
- package/dist/facades/index.d.ts +1 -0
- package/dist/facades/index.d.ts.map +1 -1
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +1 -1
- package/dist/foundation/index.js +2 -2
- package/dist/foundation/index.js.map +1 -1
- package/dist/gemi.d.ts +13 -5
- package/dist/http/ApiRouter.d.ts +3 -2
- package/dist/http/ApiRouter.d.ts.map +1 -1
- package/dist/http/HttpRequest.d.ts +4 -0
- package/dist/http/HttpRequest.d.ts.map +1 -1
- package/dist/http/ViewRouter.d.ts +127 -4
- package/dist/http/ViewRouter.d.ts.map +1 -1
- package/dist/http/index.d.ts +1 -0
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/http/middlewareList.d.ts +25 -0
- package/dist/http/middlewareList.d.ts.map +1 -0
- package/dist/http/requestContext.d.ts +57 -0
- package/dist/http/requestContext.d.ts.map +1 -1
- package/dist/i18n/dictionaryRuntime.js +2 -2
- package/dist/i18n/dictionaryRuntime.js.map +1 -1
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/index.js.map +1 -1
- package/dist/kernel/index.js +3 -3
- package/dist/kernel/index.js.map +3 -3
- package/dist/kernel/providers.d.ts +2 -2
- package/dist/kernel/providers.d.ts.map +1 -1
- package/dist/orm/index.js +2 -2
- package/dist/orm/index.js.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/services/features/FeatureFlagStore.d.ts +60 -0
- package/dist/services/features/FeatureFlagStore.d.ts.map +1 -0
- package/dist/services/features/FeatureManager.d.ts +82 -0
- package/dist/services/features/FeatureManager.d.ts.map +1 -0
- package/dist/services/features/FeaturesServiceProvider.d.ts +6 -0
- package/dist/services/features/FeaturesServiceProvider.d.ts.map +1 -0
- package/dist/services/features/bucket.d.ts +57 -0
- package/dist/services/features/bucket.d.ts.map +1 -0
- package/dist/services/features/config.d.ts +57 -0
- package/dist/services/features/config.d.ts.map +1 -0
- package/dist/services/features/context.d.ts +31 -0
- package/dist/services/features/context.d.ts.map +1 -0
- package/dist/services/features/defineFeature.d.ts +145 -0
- package/dist/services/features/defineFeature.d.ts.map +1 -0
- package/dist/services/features/evaluate.d.ts +74 -0
- package/dist/services/features/evaluate.d.ts.map +1 -0
- package/dist/services/features/sources/DatabaseFeatureFlagSource.d.ts +19 -0
- package/dist/services/features/sources/DatabaseFeatureFlagSource.d.ts.map +1 -0
- package/dist/services/features/sources/FeatureFlagSource.d.ts +30 -0
- package/dist/services/features/sources/FeatureFlagSource.d.ts.map +1 -0
- package/dist/services/features/sources/StaticFeatureFlagSource.d.ts +24 -0
- package/dist/services/features/sources/StaticFeatureFlagSource.d.ts.map +1 -0
- package/dist/services/features/types.d.ts +63 -0
- package/dist/services/features/types.d.ts.map +1 -0
- package/dist/services/index.d.ts +12 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +8 -8
- package/dist/services/index.js.map +6 -4
- package/dist/services/router/ViewRouteDispatcher.d.ts +8 -0
- package/dist/services/router/ViewRouteDispatcher.d.ts.map +1 -1
- package/dist/services/router/createFlatViewRoutes.d.ts +14 -0
- package/dist/services/router/createFlatViewRoutes.d.ts.map +1 -1
- package/dist/services/router/streamQueryInjection.d.ts.map +1 -1
- package/dist/support/index.js +2 -2
- package/dist/support/index.js.map +1 -1
- package/dist/testing/Page.d.ts +12 -0
- package/dist/testing/Page.d.ts.map +1 -1
- package/dist/testing/index.js +7 -3
- package/dist/testing/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-6fc909z5.js +0 -4
- package/dist/chunk-9j9wqrb2.js +0 -5
- package/dist/chunk-qfzyym5h.js +0 -5
- package/dist/chunk-qfzyym5h.js.map +0 -12
- package/dist/chunk-r9as9htn.js +0 -5
- package/dist/chunk-r9h6aj7g.js +0 -19
- /package/dist/{chunk-e9zz0zfv.js.map → chunk-k0fvsyeh.js.map} +0 -0
- /package/dist/{chunk-swe2b6rv.js.map → chunk-mkfpnymy.js.map} +0 -0
- /package/dist/{chunk-cecq6q1b.js.map → chunk-yf7vz71n.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ef as t,Hf as A}from"./chunk-jhkjz9jr.js";var o=t((b)=>{var i=(r)=>typeof ArrayBuffer==="function"&&r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]";b.isArrayBuffer=i});var y=t((g)=>{var m=o(),f=A("buffer"),B=(r,e=0,u=r.byteLength-e)=>{if(!m.isArrayBuffer(r))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof r} (${r})`);return f.Buffer.from(r,e,u)},a=(r,e)=>{if(typeof r!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return e?f.Buffer.from(r,e):f.Buffer.from(r)};g.fromArrayBuffer=B;g.fromString=a});var x=t((w)=>{var n=y(),s=(r)=>{let e=n.fromString(r,"utf8");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT)},h=(r)=>{if(typeof r==="string")return s(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)},p=(r)=>{if(typeof r==="string")return r;if(typeof r!=="object"||typeof r.byteOffset!=="number"||typeof r.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return n.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString("utf8")};w.fromUtf8=s;w.toUint8Array=h;w.toUtf8=p});
|
|
3
3
|
export{o as K,y as L,x as M};
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=3E0CF9F34F383BC564756E2164756E21
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
"'use strict';\n\nvar utilBufferFrom = require('@smithy/util-buffer-from');\n\nconst fromUtf8 = (input) => {\n const buf = utilBufferFrom.fromString(input, \"utf8\");\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n};\n\nconst toUint8Array = (data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n\nconst toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return utilBufferFrom.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString(\"utf8\");\n};\n\nexports.fromUtf8 = fromUtf8;\nexports.toUint8Array = toUint8Array;\nexports.toUtf8 = toUtf8;\n"
|
|
8
8
|
],
|
|
9
9
|
"mappings": ";+DAEA,IAAM,EAAgB,CAAC,IAAS,OAAO,cAAgB,YAAc,aAAe,aAChF,OAAO,UAAU,SAAS,KAAK,CAAG,IAAM,uBAEpC,gBAAgB,kBCHxB,IAAI,MACA,cAEE,EAAkB,CAAC,EAAO,EAAS,EAAG,EAAS,EAAM,WAAa,IAAW,CAC/E,GAAI,CAAC,EAAc,cAAc,CAAK,EAClC,MAAU,UAAU,2DAA2D,OAAO,MAAU,IAAQ,EAE5G,OAAO,EAAO,OAAO,KAAK,EAAO,EAAQ,CAAM,GAE7C,EAAa,CAAC,EAAO,IAAa,CACpC,GAAI,OAAO,IAAU,SACjB,MAAU,UAAU,8DAA8D,OAAO,MAAU,IAAQ,EAE/G,OAAO,EAAW,EAAO,OAAO,KAAK,EAAO,CAAQ,EAAI,EAAO,OAAO,KAAK,CAAK,GAG5E,kBAAkB,EAClB,aAAa,kBCjBrB,IAAI,MAEE,EAAW,CAAC,IAAU,CACxB,IAAM,EAAM,EAAe,WAAW,EAAO,MAAM,EACnD,OAAO,IAAI,WAAW,EAAI,OAAQ,EAAI,WAAY,EAAI,WAAa,WAAW,iBAAiB,GAG7F,EAAe,CAAC,IAAS,CAC3B,GAAI,OAAO,IAAS,SAChB,OAAO,EAAS,CAAI,EAExB,GAAI,YAAY,OAAO,CAAI,EACvB,OAAO,IAAI,WAAW,EAAK,OAAQ,EAAK,WAAY,EAAK,WAAa,WAAW,iBAAiB,EAEtG,OAAO,IAAI,WAAW,CAAI,GAGxB,EAAS,CAAC,IAAU,CACtB,GAAI,OAAO,IAAU,SACjB,OAAO,EAEX,GAAI,OAAO,IAAU,UAAY,OAAO,EAAM,aAAe,UAAY,OAAO,EAAM,aAAe,SACjG,MAAU,MAAM,8EAA8E,EAElG,OAAO,EAAe,gBAAgB,EAAM,OAAQ,EAAM,WAAY,EAAM,UAAU,EAAE,SAAS,MAAM,GAGnG,WAAW,EACX,eAAe,EACf,SAAS",
|
|
10
|
-
"debugId": "
|
|
10
|
+
"debugId": "3E0CF9F34F383BC564756E2164756E21",
|
|
11
11
|
"names": []
|
|
12
12
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{A as B,C as p,I as _}from"./chunk-
|
|
2
|
+
import{A as B,C as p,I as _}from"./chunk-j0c6ytkj.js";import{J as v}from"./chunk-5athahgr.js";import"./chunk-9m2tbf3n.js";import"./chunk-grdahng8.js";import"./chunk-tss5svjr.js";import{X as D}from"./chunk-3337e5g0.js";import{Y as d}from"./chunk-xey9cbap.js";import"./chunk-zh2egcyb.js";import{Df as n}from"./chunk-jhkjz9jr.js";var x=n(D(),1),E=n(B(),1),i=n(d(),1);import M from"fs/promises";var C=n(d(),1);var A="169.254.170.2",O="169.254.170.23",b="[fd00:ec2::23]",S=(e,a)=>{if(e.protocol==="https:")return;if(e.hostname===A||e.hostname===O||e.hostname===b)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;let c=e.hostname.split("."),r=(t)=>{let s=parseInt(t,10);return 0<=s&&s<=255};if(c[0]==="127"&&r(c[1])&&r(c[2])&&r(c[3])&&c.length===4)return}throw new C.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
3
3
|
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
4
4
|
- ECS container host 169.254.170.2
|
|
5
5
|
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:a})};var o=n(d(),1),g=n(v(),1),w=n(_(),1),I=n(p(),1);function P(e){return new g.HttpRequest({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((a,[c,r])=>{return a[c]=r,a},{}),fragment:e.hash})}async function K(e,a){let r=await I.sdkStreamMixin(e.body).transformToString();if(e.statusCode===200){let t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new o.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:a});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:w.parseRfc3339DateTime(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new o.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:a}),{Code:t.Code,Message:t.Message})}throw new o.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:a})}var T=(e,a,c)=>{return async()=>{for(let r=0;r<a;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,c))}return await e()}};var N="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",j="http://169.254.170.2",H="AWS_CONTAINER_CREDENTIALS_FULL_URI",J="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",$="AWS_CONTAINER_AUTHORIZATION_TOKEN",G=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let a,c=e.awsContainerCredentialsRelativeUri??process.env[N],r=e.awsContainerCredentialsFullUri??process.env[H],t=e.awsContainerAuthorizationToken??process.env[$],s=e.awsContainerAuthorizationTokenFile??process.env[J],m=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?.warn?console.warn:e.logger.warn.bind(e.logger);if(c&&r)m("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),m("awsContainerCredentialsFullUri will take precedence.");if(t&&s)m("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),m("awsContainerAuthorizationToken will take precedence.");if(r)a=r;else if(c)a=`${j}${c}`;else throw new i.CredentialsProviderError(`No HTTP credential provider host provided.
|
|
6
6
|
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let y=new URL(a);S(y,e.logger);let R=E.NodeHttpHandler.create({requestTimeout:e.timeout??1000,connectionTimeout:e.timeout??1000});return T(async()=>{let f=P(y);if(t)f.headers.Authorization=t;else if(s)f.headers.Authorization=(await M.readFile(s)).toString();try{let h=await R.handle(f);return K(h.response).then((u)=>x.setCredentialFeature(u,"CREDENTIALS_HTTP","z"))}catch(h){throw new i.CredentialsProviderError(String(h),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000)};export{G as fromHttp};
|
|
7
7
|
|
|
8
|
-
//# debugId=
|
|
8
|
+
//# debugId=76573FB17661998564756E2164756E21
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
"export const retryWrapper = (toRetry, maxRetries, delayMs) => {\n return async () => {\n for (let i = 0; i < maxRetries; ++i) {\n try {\n return await toRetry();\n }\n catch (e) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n }\n }\n return await toRetry();\n };\n};\n"
|
|
9
9
|
],
|
|
10
10
|
"mappings": ";uXAAA,SACA,KACA,KACA,qBCHA,SAGA,FAAM,JAAqB,UACrB,EAA0B,iBAC1B,EAA0B,iBACnB,EAAW,CAAC,EAAK,IAAW,CACrC,GAAI,EAAI,WAAa,SACjB,OAEJ,GAAI,EAAI,WAAa,GACjB,EAAI,WAAa,GACjB,EAAI,WAAa,EACjB,OAEJ,GAAI,EAAI,SAAS,SAAS,GAAG,GACzB,GAAI,EAAI,WAAa,SAAW,EAAI,WAAa,4CAC7C,OAGH,KACD,GAAI,EAAI,WAAa,YACjB,OAEJ,IAAM,EAAe,EAAI,SAAS,MAAM,GAAG,EACrC,EAAU,CAAC,IAAc,CAC3B,IAAM,EAAM,SAAS,EAAW,EAAE,EAClC,MAAO,IAAK,GAAO,GAAO,KAE9B,GAAI,EAAa,KAAO,OACpB,EAAQ,EAAa,EAAE,GACvB,EAAQ,EAAa,EAAE,GACvB,EAAQ,EAAa,EAAE,GACvB,EAAa,SAAW,EACxB,OAGR,MAAM,IAAI,2BAAyB;AAAA;AAAA;AAAA,yDAGmB,CAAE,QAAO,CAAC,GCxCpE,eACA,WACA,WACA,WACO,SAAS,CAAgB,CAAC,EAAK,CAClC,OAAO,IAAI,cAAY,CACnB,SAAU,EAAI,SACd,SAAU,EAAI,SACd,KAAM,OAAO,EAAI,IAAI,EACrB,KAAM,EAAI,SACV,MAAO,MAAM,KAAK,EAAI,aAAa,QAAQ,CAAC,EAAE,OAAO,CAAC,GAAM,EAAG,KAAO,CAElE,OADA,EAAI,GAAK,EACF,GACR,C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
|
13
13
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Xb as o}from"./chunk-437085pe.js";import{Yb as i}from"./chunk-4yt5x8s2.js";import{qf as t}from"./chunk-sy7jbdeb.js";import{wf as r}from"./chunk-cyaz97p5.js";class n extends i{register(){this.app.singleton(r,()=>new r(t(o(),this.app.config.get("translation",{}))))}}
|
|
3
|
+
export{n as Qa};
|
|
4
|
+
|
|
5
|
+
//# debugId=367CF69A359EB0A064756E2164756E21
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"import { ServiceProvider } from \"../support/ServiceProvider\";\nimport { withDefaults } from \"../support/withDefaults\";\nimport { Translator } from \"./Translator\";\nimport { translationConfigDefaults, type TranslationConfig } from \"./config\";\n\nexport class TranslationServiceProvider extends ServiceProvider {\n register() {\n this.app.singleton(\n Translator,\n () =>\n new Translator(\n withDefaults(\n translationConfigDefaults(),\n this.app.config.get<TranslationConfig>(\"translation\", {}),\n ),\n ),\n );\n }\n}\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";sLAKO,AAAM,IAAmC,LAAgB,CAC9D,QAAQ,EAAG,CACT,KAAK,IAAI,UACP,EACA,IACE,IAAI,EACF,EACE,EAA0B,EAC1B,KAAK,IAAI,OAAO,IAAuB,cAAe,CAAC,CAAC,CAC1D,CACF,CACJ,EAEJ",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "367CF69A359EB0A064756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
class K{config;static token="translator";translations={};isEnabled=!1;constructor(z){this.config=z;let j={};for(let[G,I]of Object.entries(this.config.prefetch))for(let C of this.config.supportedLocales){if(!j[C])j[C]={};j[C][G]={};for(let F of I){j[C][G][F.name]={};for(let[H,J]of Object.entries(F.dictionary))this.isEnabled=!0,j[C][G][F.name][H]=J[C]}}this.translations=j}get isLocaleAware(){return this.isEnabled||this.config.supportedLocales.length>0}get supportedLocales(){return this.config.supportedLocales}get defaultLocale(){return this.config.defaultLocale}get components(){return this.config.components}onLocaleChange(z){return this.config.onLocaleChange(z)}detectLocale(z){let j=this.config.defaultLocale??this.config.supportedLocales[0]??"en-US",G=this.config.detectLocale(z);if(this.config.supportedLocales.includes(G))return G;let C=z.cookies.get("i18n-locale")??(z.headers.get("accept-language")||j),[F]=C.split(",");if(this.config.supportedLocales.includes(F))return F;if(F.length===2){for(let H of this.config.supportedLocales)if(H.startsWith(F))return H}return j}getPageTranslations(z,j){if(this.translations[z][j])return this.translations[z][j];return{}}}
|
|
3
|
-
export{K as
|
|
3
|
+
export{K as wf};
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=6BDD7227EB332BDD64756E2164756E21
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"import type { HttpRequest } from \"../http/HttpRequest\";\nimport type { Dictionary } from \"./Dictionary\";\nimport type { TranslationConfig } from \"./config\";\n\nexport class Translator {\n static token = \"translator\";\n\n translations = {};\n isEnabled = false;\n\n constructor(public config: Required<TranslationConfig>) {\n const translations = {};\n\n for (const [route, dicArray] of Object.entries(this.config.prefetch)) {\n for (const locale of this.config.supportedLocales) {\n if (!translations[locale]) {\n translations[locale] = {};\n }\n translations[locale][route] = {};\n for (const dic of dicArray) {\n translations[locale][route][dic.name] = {};\n for (const [key, value] of Object.entries(dic.dictionary)) {\n this.isEnabled = true;\n translations[locale][route][dic.name][key] = value[locale];\n }\n }\n }\n }\n this.translations = translations;\n }\n\n /**\n * Whether the app does locale-aware routing and rendering at all.\n *\n * `isEnabled` only means the legacy `prefetch` config has dictionaries to\n * serve. An app on `defineDictionary` has an empty `prefetch` and declares\n * its locales through `supportedLocales` alone, so gating on `isEnabled`\n * leaves it without locale detection or a locale URL prefix. Both the render\n * path and the redirect read this, because when they disagreed a migrated app\n * rendered a non-default locale at `/` with no redirect and no `Vary` — one\n * cache fill away from serving that document to everyone.\n */\n get isLocaleAware(): boolean {\n return this.isEnabled || this.config.supportedLocales.length > 0;\n }\n\n get supportedLocales(): string[] {\n return this.config.supportedLocales;\n }\n\n get defaultLocale(): string {\n return this.config.defaultLocale;\n }\n\n get components(): Record<string, Dictionary<any>> {\n return this.config.components;\n }\n\n onLocaleChange(locale: string): Promise<void> | void {\n return this.config.onLocaleChange(locale);\n }\n\n detectLocale(req: HttpRequest<any, any>) {\n const fallbackLocale =\n this.config.defaultLocale ?? this.config.supportedLocales[0] ?? \"en-US\";\n const detectedLocale = this.config.detectLocale(req);\n if (this.config.supportedLocales.includes(detectedLocale)) {\n return detectedLocale;\n }\n\n const previousLocale = req.cookies.get(\"i18n-locale\");\n const locale =\n previousLocale ?? (req.headers.get(\"accept-language\") || fallbackLocale);\n\n const [_locale] = locale.split(\",\");\n\n if (this.config.supportedLocales.includes(_locale)) {\n return _locale;\n }\n\n if (_locale.length === 2) {\n for (const supportedLocale of this.config.supportedLocales) {\n if (supportedLocale.startsWith(_locale)) {\n return supportedLocale;\n }\n }\n }\n\n return fallbackLocale;\n }\n\n getPageTranslations(locale: string, scope: string) {\n if (this.translations[locale][scope]) {\n return this.translations[locale][scope];\n }\n return {};\n }\n}\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";AAIO,MAAM,CAAW,CAMH,aALZ,OAAQ,aAEf,aAAe,CAAC,EAChB,UAAY,GAEZ,WAAW,CAAQ,EAAqC,CAArC,cACjB,IAAM,EAAe,CAAC,EAEtB,QAAY,EAAO,KAAa,OAAO,QAAQ,KAAK,OAAO,QAAQ,EACjE,QAAW,KAAU,KAAK,OAAO,iBAAkB,CACjD,GAAI,CAAC,EAAa,GAChB,EAAa,GAAU,CAAC,EAE1B,EAAa,GAAQ,GAAS,CAAC,EAC/B,QAAW,KAAO,EAAU,CAC1B,EAAa,GAAQ,GAAO,EAAI,MAAQ,CAAC,EACzC,QAAY,EAAK,KAAU,OAAO,QAAQ,EAAI,UAAU,EACtD,KAAK,UAAY,GACjB,EAAa,GAAQ,GAAO,EAAI,MAAM,GAAO,EAAM,IAK3D,KAAK,aAAe,KAclB,cAAa,EAAY,CAC3B,OAAO,KAAK,WAAa,KAAK,OAAO,iBAAiB,OAAS,KAG7D,iBAAgB,EAAa,CAC/B,OAAO,KAAK,OAAO,oBAGjB,cAAa,EAAW,CAC1B,OAAO,KAAK,OAAO,iBAGjB,WAAU,EAAoC,CAChD,OAAO,KAAK,OAAO,WAGrB,cAAc,CAAC,EAAsC,CACnD,OAAO,KAAK,OAAO,eAAe,CAAM,EAG1C,YAAY,CAAC,EAA4B,CACvC,IAAM,EACJ,KAAK,OAAO,eAAiB,KAAK,OAAO,iBAAiB,IAAM,QAC5D,EAAiB,KAAK,OAAO,aAAa,CAAG,EACnD,GAAI,KAAK,OAAO,iBAAiB,SAAS,CAAc,EACtD,OAAO,EAIT,IAAM,EADiB,EAAI,QAAQ,IAAI,aAAa,IAE/B,EAAI,QAAQ,IAAI,iBAAiB,GAAK,IAEpD,GAAW,EAAO,MAAM,GAAG,EAElC,GAAI,KAAK,OAAO,iBAAiB,SAAS,CAAO,EAC/C,OAAO,EAGT,GAAI,EAAQ,SAAW,GACrB,QAAW,KAAmB,KAAK,OAAO,iBACxC,GAAI,EAAgB,WAAW,CAAO,EACpC,OAAO,EAKb,OAAO,EAGT,mBAAmB,CAAC,EAAgB,EAAe,CACjD,GAAI,KAAK,aAAa,GAAQ,GAC5B,OAAO,KAAK,aAAa,GAAQ,GAEnC,MAAO,CAAC,EAEZ",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "6BDD7227EB332BDD64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{D as
|
|
2
|
+
import{Cf as j}from"./chunk-dgsgjg53.js";function $(z){return z.split(".")}class X{static token="config";items;constructor(z={}){this.items=z}has(z){let H=this.items;for(let G of $(z)){if(H===null||typeof H!=="object"||!(G in H))return!1;H=H[G]}return!0}get(z,H){let G=this.items;for(let J of $(z)){if(G===null||typeof G!=="object"||!(J in G))return H;G=G[J]}return G===void 0?H:G}getMany(z){let H=Array.isArray(z)?z.map((J)=>[J,void 0]):Object.entries(z),G={};for(let[J,Y]of H)G[J]=this.get(J,Y);return G}set(z,H){let G=typeof z==="string"?[[z,H]]:Object.entries(z);for(let[J,Y]of G){let E=$(J),K=E.pop(),U=this.items;for(let Z of E){let F=U[Z];if(F===null||typeof F!=="object")U[Z]={};U=U[Z]}U[K]=Y}}prepend(z,H){let G=this.get(z,[]);G.unshift(H),this.set(z,G)}push(z,H){let G=this.get(z,[]);G.push(H),this.set(z,G)}merge(z){for(let[H,G]of Object.entries(z)){let J=this.items[H];if(J!==null&&typeof J==="object"&&!Array.isArray(J)&&G!==null&&typeof G==="object"&&!Array.isArray(G))this.items[H]={...J,...G};else this.items[H]=G}}all(){return this.items}}var W=Symbol.for("gemi.foundation.Application");class Q extends j{[W]=!0;static isApplication(z){return typeof z==="object"&&z!==null&&W in z}config;providers=[];booted=!1;constructor(z=new X){super();this.config=z,this.instance(X,z)}static currentInstance;static getInstance(){return Q.currentInstance}static setInstance(z){return Q.currentInstance=z,z}register(z){let H=this.providers.find((J)=>J instanceof z);if(H)return H;let G=new z(this);return G.register(),this.providers.push(G),G}registerMany(z){for(let H of z)this.register(H)}getProviders(){return[...this.providers]}isBooted(){return this.booted}async boot(){if(this.booted)return;for(let z of this.providers)await z.boot();this.booted=!0}flush(){super.flush(),this.instance(X,this.config),this.providers=[],this.booted=!1}}import{AsyncLocalStorage as _}from"async_hooks";var D=new _;function I(z){let H=D.getStore(),G=Q.isApplication(H)?H:Q.getInstance();if(!G)throw Error("No Application instance is available. Boot a Kernel before resolving services.");return z?G.make(z):G}
|
|
3
|
+
export{D as xf,X as yf,Q as zf,I as Af};
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=06BDE3AC754080D964756E2164756E21
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
"import type { ServiceToken } from \"../container/Container\";\nimport { kernelContext } from \"../kernel/context\";\nimport { Application } from \"./Application\";\n\n/**\n * Resolves the Application for the current async context. Reads the kernel\n * AsyncLocalStorage — there is exactly one ALS in the framework, and\n * `Kernel.run()` stores the Application in it, so this is the primary path for\n * anything running inside a request, a websocket message or a cron tick.\n *\n * The static instance (Laravel's `Container::setInstance`, set by\n * `Kernel.boot()`) is the fallback for code that runs outside any `run()`\n * scope — build-time tooling, module top level, a stray `setTimeout`.\n */\nexport function app(): Application;\nexport function app<T>(token: ServiceToken<T>): T;\nexport function app<T>(token?: ServiceToken<T>): Application | T {\n const store = kernelContext.getStore();\n const instance = Application.isApplication(store)\n ? store\n : Application.getInstance();\n\n if (!instance) {\n throw new Error(\n \"No Application instance is available. Boot a Kernel before resolving services.\",\n );\n }\n\n return token ? instance.make(token) : instance;\n}\n"
|
|
9
9
|
],
|
|
10
10
|
"mappings": ";yCAOA,SAAS,CAAQ,CAAC,EAAuB,CACvC,OAAO,EAAI,MAAM,GAAG,EAGf,MAAM,CAAW,OAGf,OAAQ,SAEP,MAER,WAAW,CAAC,EAAqB,CAAC,EAAG,CACnC,KAAK,MAAQ,EAGf,GAAG,CAAC,EAAsB,CACxB,IAAI,EAAc,KAAK,MACvB,QAAW,KAAW,EAAS,CAAG,EAAG,CACnC,GAAI,IAAW,MAAQ,OAAO,IAAW,UAAY,EAAE,KAAW,GAChE,MAAO,GAET,EAAS,EAAO,GAElB,MAAO,GAGT,GAAY,CAAC,EAAa,EAAqB,CAC7C,IAAI,EAAc,KAAK,MACvB,QAAW,KAAW,EAAS,CAAG,EAAG,CACnC,GAAI,IAAW,MAAQ,OAAO,IAAW,UAAY,EAAE,KAAW,GAChE,OAAO,EAET,EAAS,EAAO,GAElB,OAAO,IAAW,OAAa,EAAsB,EAKvD,OAAO,CAAC,EAA2D,CACjE,IAAM,EAAgC,MAAM,QAAQ,CAAI,EACpD,EAAK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06BDE3AC754080D964756E2164756E21",
|
|
12
12
|
"names": []
|
|
13
13
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
class A extends Error{constructor(p,q){super(`Target [${p}] is not bound in the container.`+(q.length>0?` Bound tokens: ${q.join(", ")}.`:" No tokens are bound \u2014 was the application booted?"));this.name="BindingResolutionError"}}class C{bindings=new Map;instances=new Map;bind(p,q){this.bindings.set(p.token,{factory:q,shared:!1}),this.instances.delete(p.token)}singleton(p,q){this.bindings.set(p.token,{factory:q,shared:!0}),this.instances.delete(p.token)}instance(p,q){return this.instances.set(p.token,q),q}bound(p){return this.bindings.has(p.token)||this.instances.has(p.token)}resolved(p){return this.instances.has(p.token)}make(p){let q=p.token;if(this.instances.has(q))return this.instances.get(q);let v=this.bindings.get(q);if(!v)throw new A(q,this.keys());let x=v.factory(this);if(v.shared)this.instances.set(q,x);return x}forget(p){this.instances.delete(p.token)}keys(){return[...new Set([...this.bindings.keys(),...this.instances.keys()])]}flush(){this.bindings.clear(),this.instances.clear()}}
|
|
3
|
-
export{A as
|
|
3
|
+
export{A as Bf,C as Cf};
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=0B7A8BC6BE86AE6364756E2164756E21
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"/**\n * Tokens are the service classes themselves, so `make(MailManager)` is typed\n * `MailManager` without a cast. The container keys its bindings off the class's\n * `static token` string rather than the constructor object: the built binary\n * (`dist/bin/gemi.js`) bundles its own copy of gemi while the app resolves\n * `gemi/*` to source, so the same service is two distinct class objects across\n * that boundary. A string survives it. Laravel binds both `'mail'` and\n * `MailManager::class` for the same reason.\n */\nexport type ServiceToken<T> = (abstract new (...args: any[]) => T) & {\n token: string;\n};\n\nexport type Factory<T> = (app: Container) => T;\n\ninterface Binding {\n factory: Factory<any>;\n shared: boolean;\n}\n\nexport class BindingResolutionError extends Error {\n constructor(token: string, known: string[]) {\n super(\n `Target [${token}] is not bound in the container.` +\n (known.length > 0\n ? ` Bound tokens: ${known.join(\", \")}.`\n : \" No tokens are bound — was the application booted?\"),\n );\n this.name = \"BindingResolutionError\";\n }\n}\n\nexport class Container {\n private bindings = new Map<string, Binding>();\n private instances = new Map<string, any>();\n\n bind<T>(token: ServiceToken<T>, factory: Factory<T>) {\n this.bindings.set(token.token, { factory, shared: false });\n this.instances.delete(token.token);\n }\n\n /**\n * Lazy by design — `factory` is not called until the first `make()`.\n */\n singleton<T>(token: ServiceToken<T>, factory: Factory<T>) {\n this.bindings.set(token.token, { factory, shared: true });\n this.instances.delete(token.token);\n }\n\n instance<T>(token: ServiceToken<T>, object: T): T {\n this.instances.set(token.token, object);\n return object;\n }\n\n bound<T>(token: ServiceToken<T>): boolean {\n return (\n this.bindings.has(token.token) || this.instances.has(token.token)\n );\n }\n\n resolved<T>(token: ServiceToken<T>): boolean {\n return this.instances.has(token.token);\n }\n\n make<T>(token: ServiceToken<T>): T {\n const key = token.token;\n\n if (this.instances.has(key)) {\n return this.instances.get(key) as T;\n }\n\n const binding = this.bindings.get(key);\n if (!binding) {\n throw new BindingResolutionError(key, this.keys());\n }\n\n const object = binding.factory(this) as T;\n if (binding.shared) {\n this.instances.set(key, object);\n }\n return object;\n }\n\n forget<T>(token: ServiceToken<T>) {\n this.instances.delete(token.token);\n }\n\n keys(): string[] {\n return [\n ...new Set([...this.bindings.keys(), ...this.instances.keys()]),\n ];\n }\n\n flush() {\n this.bindings.clear();\n this.instances.clear();\n }\n}\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";AAoBO,MAAM,UAA+B,KAAM,CAChD,WAAW,CAAC,EAAe,EAAiB,CAC1C,MACE,WAAW,qCACR,EAAM,OAAS,EACZ,kBAAkB,EAAM,KAAK,IAAI,KACjC,0DACR,EACA,KAAK,KAAO,yBAEhB,CAEO,MAAM,CAAU,CACb,SAAW,IAAI,IACf,UAAY,IAAI,IAExB,IAAO,CAAC,EAAwB,EAAqB,CACnD,KAAK,SAAS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bun
|
|
2
|
-
import{a as ps}from"./chunk-7pn0bnsc.js";import{b as Se,d as X,e as qs,f as Fs,g as Ws,i as Oo,j as Ko,k as as,l as ws,m as gt,n as Us,o as lo,p as Qt,q as ls,r as Es,s as Ps,t as ys,u as Zr,v as ro}from"./chunk-5txddtaa.js";import{w as us}from"./chunk-fck5yw2s.js";import{A as cs,E as dt,I as k,x as $o,y as Jr}from"./chunk-d6kgxmp7.js";import{J as hs}from"./chunk-dxxak51x.js";import{M as Hr}from"./chunk-74aj8ms2.js";import{N as Xr}from"./chunk-ma5rj4st.js";import"./chunk-32d510cd.js";import"./chunk-rxsmwbxv.js";import{X as Bs}from"./chunk-64bq12j3.js";import"./chunk-katt90qz.js";import{ha as ds}from"./chunk-wrypq618.js";import{mf as y}from"./chunk-4f69ygc8.js";var Z=y(($e)=>{Object.defineProperty($e,"__esModule",{value:!0});$e.resolveHttpAuthSchemeConfig=$e.resolveStsAuthConfig=$e.defaultSTSHttpAuthSchemeProvider=$e.defaultSTSHttpAuthSchemeParametersProvider=void 0;var bo=X(),J=$o(),ho=C(),No=async(e,t,r)=>{return{operation:(0,J.getSmithyContext)(t).operation,region:await(0,J.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};$e.defaultSTSHttpAuthSchemeParametersProvider=No;function qo(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Fo(e){return{schemeId:"smithy.api#noAuth"}}var Wo=(e)=>{let t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(Fo(e));break}default:t.push(qo(e))}return t};$e.defaultSTSHttpAuthSchemeProvider=Wo;var wo=(e)=>Object.assign(e,{stsClientCtor:ho.STSClient});$e.resolveStsAuthConfig=wo;var Uo=(e)=>{let t=$e.resolveStsAuthConfig(e),r=(0,bo.resolveAwsSdkSigV4Config)(t);return Object.assign(r,{authSchemePreference:(0,J.normalizeProvider)(e.authSchemePreference??[])})};$e.resolveHttpAuthSchemeConfig=Uo});var f=y((Ne)=>{Object.defineProperty(Ne,"__esModule",{value:!0});Ne.commonParams=Ne.resolveClientEndpointParameters=void 0;var Lo=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"})};Ne.resolveClientEndpointParameters=Lo;Ne.commonParams={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var et=y((Ce)=>{Object.defineProperty(Ce,"__esModule",{value:!0});Ce.ruleSet=void 0;var Ve="required",o="type",n="fn",i="argv",v="ref",Fe=!1,ee=!0,S="booleanEquals",p="stringEquals",ze="sigv4",Be="sts",ge="us-east-1",c="endpoint",We="https://sts.{Region}.{PartitionResult#dnsSuffix}",R="tree",M="error",oe="getAttr",we={[Ve]:!1,[o]:"string"},te={[Ve]:!0,default:!1,[o]:"boolean"},Qe={[v]:"Endpoint"},Ue={[n]:"isSet",[i]:[{[v]:"Region"}]},l={[v]:"Region"},Me={[n]:"aws.partition",[i]:[l],assign:"PartitionResult"},Ye={[v]:"UseFIPS"},He={[v]:"UseDualStack"},P={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:ze,signingName:Be,signingRegion:ge}]},headers:{}},_={},ke={conditions:[{[n]:p,[i]:[l,"aws-global"]}],[c]:P,[o]:c},Je={[n]:S,[i]:[Ye,!0]},Xe={[n]:S,[i]:[He,!0]},Le={[n]:oe,[i]:[{[v]:"PartitionResult"},"supportsFIPS"]},Ze={[v]:"PartitionResult"},je={[n]:S,[i]:[!0,{[n]:oe,[i]:[Ze,"supportsDualStack"]}]},Ge=[{[n]:"isSet",[i]:[Qe]}],Oe=[Je],Ke=[Xe],Go={version:"1.0",parameters:{Region:we,UseDualStack:te,UseFIPS:te,Endpoint:we,UseGlobalEndpoint:te},rules:[{conditions:[{[n]:S,[i]:[{[v]:"UseGlobalEndpoint"},ee]},{[n]:"not",[i]:Ge},Ue,Me,{[n]:S,[i]:[Ye,Fe]},{[n]:S,[i]:[He,Fe]}],rules:[{conditions:[{[n]:p,[i]:[l,"ap-northeast-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"ap-south-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"ap-southeast-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"ap-southeast-2"]}],endpoint:P,[o]:c},ke,{conditions:[{[n]:p,[i]:[l,"ca-central-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-central-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-north-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-west-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-west-2"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-west-3"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"sa-east-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,ge]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"us-east-2"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"us-west-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"us-west-2"]}],endpoint:P,[o]:c},{endpoint:{url:We,properties:{authSchemes:[{name:ze,signingName:Be,signingRegion:"{Region}"}]},headers:_},[o]:c}],[o]:R},{conditions:Ge,rules:[{conditions:Oe,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[o]:M},{conditions:Ke,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[o]:M},{endpoint:{url:Qe,properties:_,headers:_},[o]:c}],[o]:R},{conditions:[Ue],rules:[{conditions:[Me],rules:[{conditions:[Je,Xe],rules:[{conditions:[{[n]:S,[i]:[ee,Le]},je],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:_,headers:_},[o]:c}],[o]:R},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[o]:M}],[o]:R},{conditions:Oe,rules:[{conditions:[{[n]:S,[i]:[Le,ee]}],rules:[{conditions:[{[n]:p,[i]:[{[n]:oe,[i]:[Ze,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:_,headers:_},[o]:c},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:_,headers:_},[o]:c}],[o]:R},{error:"FIPS is enabled but this partition does not support FIPS",[o]:M}],[o]:R},{conditions:Ke,rules:[{conditions:[je],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:_,headers:_},[o]:c}],[o]:R},{error:"DualStack is enabled but this partition does not support DualStack",[o]:M}],[o]:R},ke,{endpoint:{url:We,properties:_,headers:_},[o]:c}],[o]:R}],[o]:R},{error:"Invalid Configuration: Missing Region",[o]:M}]};Ce.ruleSet=Go});var rt=y((tt)=>{Object.defineProperty(tt,"__esModule",{value:!0});tt.defaultEndpointResolver=void 0;var Vo=Ko(),re=Oo(),zo=et(),Bo=new re.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),go=(e,t={})=>{return Bo.get(e,()=>(0,re.resolveEndpoint)(zo.ruleSet,{endpointParams:e,logger:t.logger}))};tt.defaultEndpointResolver=go;re.customEndpointFunctions.aws=Vo.awsEndpointFunctions});var O=y((ne)=>{Object.defineProperty(ne,"__esModule",{value:!0});ne.STSServiceException=ne.__ServiceException=void 0;var st=k();Object.defineProperty(ne,"__ServiceException",{enumerable:!0,get:function(){return st.ServiceException}});class se extends st.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,se.prototype)}}ne.STSServiceException=se});var Ee=y((it)=>{Object.defineProperty(it,"__esModule",{value:!0});it.IDPCommunicationErrorException=it.InvalidIdentityTokenException=it.IDPRejectedClaimException=it.RegionDisabledException=it.PackedPolicyTooLargeException=it.MalformedPolicyDocumentException=it.ExpiredTokenException=void 0;var A=O();class ie extends A.STSServiceException{name="ExpiredTokenException";$fault="client";constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});Object.setPrototypeOf(this,ie.prototype)}}it.ExpiredTokenException=ie;class ce extends A.STSServiceException{name="MalformedPolicyDocumentException";$fault="client";constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e});Object.setPrototypeOf(this,ce.prototype)}}it.MalformedPolicyDocumentException=ce;class de extends A.STSServiceException{name="PackedPolicyTooLargeException";$fault="client";constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e});Object.setPrototypeOf(this,de.prototype)}}it.PackedPolicyTooLargeException=de;class ae extends A.STSServiceException{name="RegionDisabledException";$fault="client";constructor(e){super({name:"RegionDisabledException",$fault:"client",...e});Object.setPrototypeOf(this,ae.prototype)}}it.RegionDisabledException=ae;class ue extends A.STSServiceException{name="IDPRejectedClaimException";$fault="client";constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e});Object.setPrototypeOf(this,ue.prototype)}}it.IDPRejectedClaimException=ue;class pe extends A.STSServiceException{name="InvalidIdentityTokenException";$fault="client";constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e});Object.setPrototypeOf(this,pe.prototype)}}it.InvalidIdentityTokenException=pe;class le extends A.STSServiceException{name="IDPCommunicationErrorException";$fault="client";constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e});Object.setPrototypeOf(this,le.prototype)}}it.IDPCommunicationErrorException=le});var Te=y((Tt)=>{Object.defineProperty(Tt,"__esModule",{value:!0});Tt.AssumeRoleWithWebIdentity$=Tt.AssumeRole$=Tt.Tag$=Tt.ProvidedContext$=Tt.PolicyDescriptorType$=Tt.Credentials$=Tt.AssumeRoleWithWebIdentityResponse$=Tt.AssumeRoleWithWebIdentityRequest$=Tt.AssumeRoleResponse$=Tt.AssumeRoleRequest$=Tt.AssumedRoleUser$=Tt.errorTypeRegistries=Tt.RegionDisabledException$=Tt.PackedPolicyTooLargeException$=Tt.MalformedPolicyDocumentException$=Tt.InvalidIdentityTokenException$=Tt.IDPRejectedClaimException$=Tt.IDPCommunicationErrorException$=Tt.ExpiredTokenException$=Tt.STSServiceException$=void 0;var Co="Arn",fo="AccessKeyId",er="AssumeRole",tr="AssumedRoleId",or="AssumeRoleRequest",rr="AssumeRoleResponse",Pe="AssumedRoleUser",sr="AssumeRoleWithWebIdentity",nr="AssumeRoleWithWebIdentityRequest",ir="AssumeRoleWithWebIdentityResponse",cr="Audience",ye="Credentials",dr="ContextAssertion",at="DurationSeconds",ar="Expiration",ur="ExternalId",pr="ExpiredTokenException",lr="IDPCommunicationErrorException",Er="IDPRejectedClaimException",Pr="InvalidIdentityTokenException",yr="Key",_r="MalformedPolicyDocumentException",ut="Policy",pt="PolicyArns",Ir="ProviderArn",Rr="ProvidedContexts",Tr="ProvidedContextsListType",Sr="ProvidedContext",vr="PolicyDescriptorType",xr="ProviderId",lt="PackedPolicySize",Dr="PackedPolicyTooLargeException",mr="Provider",Et="RoleArn",Ar="RegionDisabledException",Pt="RoleSessionName",$r="SecretAccessKey",br="SubjectFromWebIdentityToken",_e="SourceIdentity",hr="SerialNumber",Nr="SessionToken",qr="Tags",Fr="TokenCode",Wr="TransitiveTagKeys",wr="Tag",Ur="Value",Mr="WebIdentityToken",kr="arn",Lr="accessKeySecretType",$="awsQueryError",b="client",jr="clientTokenType",h="error",N="httpError",q="message",Gr="policyDescriptorListType",yt="smithy.ts.sdk.synthetic.com.amazonaws.sts",Or="tagListType",d="com.amazonaws.sts",_t=dt(),F=Ee(),Kr=O(),It=_t.TypeRegistry.for(yt);Tt.STSServiceException$=[-3,yt,"STSServiceException",0,[],[]];It.registerError(Tt.STSServiceException$,Kr.STSServiceException);var x=_t.TypeRegistry.for(d);Tt.ExpiredTokenException$=[-3,d,pr,{[$]:["ExpiredTokenException",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.ExpiredTokenException$,F.ExpiredTokenException);Tt.IDPCommunicationErrorException$=[-3,d,lr,{[$]:["IDPCommunicationError",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.IDPCommunicationErrorException$,F.IDPCommunicationErrorException);Tt.IDPRejectedClaimException$=[-3,d,Er,{[$]:["IDPRejectedClaim",403],[h]:b,[N]:403},[q],[0]];x.registerError(Tt.IDPRejectedClaimException$,F.IDPRejectedClaimException);Tt.InvalidIdentityTokenException$=[-3,d,Pr,{[$]:["InvalidIdentityToken",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.InvalidIdentityTokenException$,F.InvalidIdentityTokenException);Tt.MalformedPolicyDocumentException$=[-3,d,_r,{[$]:["MalformedPolicyDocument",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.MalformedPolicyDocumentException$,F.MalformedPolicyDocumentException);Tt.PackedPolicyTooLargeException$=[-3,d,Dr,{[$]:["PackedPolicyTooLarge",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.PackedPolicyTooLargeException$,F.PackedPolicyTooLargeException);Tt.RegionDisabledException$=[-3,d,Ar,{[$]:["RegionDisabledException",403],[h]:b,[N]:403},[q],[0]];x.registerError(Tt.RegionDisabledException$,F.RegionDisabledException);Tt.errorTypeRegistries=[It,x];var Vr=[0,d,Lr,8,0],zr=[0,d,jr,8,0];Tt.AssumedRoleUser$=[3,d,Pe,0,[tr,Co],[0,0],2];Tt.AssumeRoleRequest$=[3,d,or,0,[Et,Pt,pt,ut,at,qr,Wr,ur,hr,Fr,_e,Rr],[0,0,()=>Rt,0,1,()=>gr,64,0,0,0,0,()=>Br],2];Tt.AssumeRoleResponse$=[3,d,rr,0,[ye,Pe,lt,_e],[[()=>Tt.Credentials$,0],()=>Tt.AssumedRoleUser$,1,0]];Tt.AssumeRoleWithWebIdentityRequest$=[3,d,nr,0,[Et,Pt,Mr,xr,pt,ut,at],[0,0,[()=>zr,0],0,()=>Rt,0,1],3];Tt.AssumeRoleWithWebIdentityResponse$=[3,d,ir,0,[ye,br,Pe,lt,mr,cr,_e],[[()=>Tt.Credentials$,0],0,()=>Tt.AssumedRoleUser$,1,0,0,0]];Tt.Credentials$=[3,d,ye,0,[fo,$r,Nr,ar],[0,[()=>Vr,0],0,4],4];Tt.PolicyDescriptorType$=[3,d,vr,0,[kr],[0]];Tt.ProvidedContext$=[3,d,Sr,0,[Ir,dr],[0,0]];Tt.Tag$=[3,d,wr,0,[yr,Ur],[0,0],2];var Rt=[1,d,Gr,0,()=>Tt.PolicyDescriptorType$],Br=[1,d,Tr,0,()=>Tt.ProvidedContext$],gr=[1,d,Or,0,()=>Tt.Tag$];Tt.AssumeRole$=[9,d,er,0,()=>Tt.AssumeRoleRequest$,()=>Tt.AssumeRoleResponse$];Tt.AssumeRoleWithWebIdentity$=[9,d,sr,0,()=>Tt.AssumeRoleWithWebIdentityRequest$,()=>Tt.AssumeRoleWithWebIdentityResponse$]});var Ot=y((jt)=>{Object.defineProperty(jt,"__esModule",{value:!0});jt.getRuntimeConfig=void 0;var Cr=X(),fr=Zr(),es=Se(),ts=k(),os=Xr(),kt=Jr(),Lt=Hr(),rs=Z(),ss=rt(),ns=Te(),is=(e)=>{return{apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??kt.fromBase64,base64Encoder:e?.base64Encoder??kt.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ss.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??rs.defaultSTSHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(t)=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Cr.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(t)=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new es.NoAuthSigner}],logger:e?.logger??new ts.NoOpLogger,protocol:e?.protocol??fr.AwsQueryProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:ns.errorTypeRegistries,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??os.parseUrl,utf8Decoder:e?.utf8Decoder??Lt.fromUtf8,utf8Encoder:e?.utf8Encoder??Lt.toUtf8}};jt.getRuntimeConfig=is});var Jt=y((Yt)=>{Object.defineProperty(Yt,"__esModule",{value:!0});Yt.getRuntimeConfig=void 0;var _s=ds(),Is=_s.__importDefault(ps()),ve=X(),Kt=ls(),K=gt(),Rs=Se(),Ts=Es(),Vt=Qt(),W=us(),zt=cs(),Bt=k(),Ss=Ps(),vs=ys(),xs=as(),Ds=Ot(),ms=(e)=>{(0,Bt.emitWarningIfUnsupportedVersion)(process.version);let t=(0,vs.resolveDefaultsModeConfig)(e),r=()=>t().then(Bt.loadConfigsForDefaultMode),a=(0,Ds.getRuntimeConfig)(e);(0,ve.emitWarningIfUnsupportedVersion)(process.version);let s={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,W.loadConfig)(ve.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,s),bodyLengthChecker:e?.bodyLengthChecker??Ss.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Kt.createDefaultUserAgentProvider)({serviceId:a.serviceId,clientVersion:Is.default.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(E)=>E.getIdentityProvider("aws.auth#sigv4")||(async(u)=>await e.credentialDefaultProvider(u?.__config||{})()),signer:new ve.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(E)=>E.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Rs.NoAuthSigner}],maxAttempts:e?.maxAttempts??(0,W.loadConfig)(Vt.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,W.loadConfig)(K.NODE_REGION_CONFIG_OPTIONS,{...K.NODE_REGION_CONFIG_FILE_OPTIONS,...s}),requestHandler:zt.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,W.loadConfig)({...Vt.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||xs.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Ts.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??zt.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,W.loadConfig)(K.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,s),useFipsEndpoint:e?.useFipsEndpoint??(0,W.loadConfig)(K.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,s),userAgentAppId:e?.userAgentAppId??(0,W.loadConfig)(Kt.NODE_APP_ID_CONFIG_OPTIONS,s)}};Yt.getRuntimeConfig=ms});var Ct=y((Xt)=>{Object.defineProperty(Xt,"__esModule",{value:!0});Xt.resolveHttpAuthRuntimeConfig=Xt.getHttpAuthExtensionConfiguration=void 0;var As=(e)=>{let{httpAuthSchemes:t,httpAuthSchemeProvider:r,credentials:a}=e;return{setHttpAuthScheme(s){let E=t.findIndex((u)=>u.schemeId===s.schemeId);if(E===-1)t.push(s);else t.splice(E,1,s)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(s){r=s},httpAuthSchemeProvider(){return r},setCredentials(s){a=s},credentials(){return a}}};Xt.getHttpAuthExtensionConfiguration=As;var $s=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};Xt.resolveHttpAuthRuntimeConfig=$s});var io=y((so)=>{Object.defineProperty(so,"__esModule",{value:!0});so.resolveRuntimeExtensions=void 0;var ft=ro(),eo=hs(),to=k(),oo=Ct(),Ns=(e,t)=>{let r=Object.assign((0,ft.getAwsRegionExtensionConfiguration)(e),(0,to.getDefaultExtensionConfiguration)(e),(0,eo.getHttpHandlerExtensionConfiguration)(e),(0,oo.getHttpAuthExtensionConfiguration)(e));return t.forEach((a)=>a.configure(r)),Object.assign(e,(0,ft.resolveAwsRegionExtensionConfiguration)(r),(0,to.resolveDefaultRuntimeConfig)(r),(0,eo.resolveHttpHandlerRuntimeConfig)(r),(0,oo.resolveHttpAuthRuntimeConfig)(r))};so.resolveRuntimeExtensions=Ns});var C=y((De)=>{Object.defineProperty(De,"__esModule",{value:!0});De.STSClient=De.__Client=void 0;var co=qs(),Ms=Fs(),ks=Ws(),ao=ws(),Ls=gt(),xe=Se(),js=dt(),Gs=Us(),Os=lo(),uo=Qt(),Eo=k();Object.defineProperty(De,"__Client",{enumerable:!0,get:function(){return Eo.Client}});var po=Z(),Ks=f(),Vs=Jt(),zs=io();class Po extends Eo.Client{config;constructor(...[e]){let t=(0,Vs.getRuntimeConfig)(e||{});super(t);this.initConfig=t;let r=(0,Ks.resolveClientEndpointParameters)(t),a=(0,ao.resolveUserAgentConfig)(r),s=(0,uo.resolveRetryConfig)(a),E=(0,Ls.resolveRegionConfig)(s),u=(0,co.resolveHostHeaderConfig)(E),T=(0,Os.resolveEndpointConfig)(u),D=(0,po.resolveHttpAuthSchemeConfig)(T),m=(0,zs.resolveRuntimeExtensions)(D,e?.extensions||[]);this.config=m,this.middlewareStack.use((0,js.getSchemaSerdePlugin)(this.config)),this.middlewareStack.use((0,ao.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,uo.getRetryPlugin)(this.config)),this.middlewareStack.use((0,Gs.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,co.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,Ms.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,ks.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,xe.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config,{httpAuthSchemeParametersProvider:po.defaultSTSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(U)=>new xe.DefaultIdentityProviderConfig({"aws.auth#sigv4":U.credentials})})),this.middlewareStack.use((0,xe.getHttpSigningPlugin)(this.config))}destroy(){super.destroy()}}De.STSClient=Po});var nn=y((I)=>{var w=C(),z=k(),_o=lo(),Io=f(),L=Te(),V=Ee(),me=Bs(),gs=ro(),Qs=O();class B extends z.Command.classBuilder().ep(Io.commonParams).m(function(e,t,r,a){return[_o.getEndpointPlugin(r,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(L.AssumeRole$).build(){}class g extends z.Command.classBuilder().ep(Io.commonParams).m(function(e,t,r,a){return[_o.getEndpointPlugin(r,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(L.AssumeRoleWithWebIdentity$).build(){}var Ys={AssumeRoleCommand:B,AssumeRoleWithWebIdentityCommand:g};class Ae extends w.STSClient{}z.createAggregatedClient(Ys,Ae);var Ro=(e)=>{if(typeof e?.Arn==="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}return},To=async(e,t,r,a={})=>{let s=typeof e==="function"?await e():e,E=typeof t==="function"?await t():t,u="",T=s??E??(u=await gs.stsRegionDefaultResolver(a)());return r?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${s} (credential provider clientConfig)`,`${E} (contextual client)`,`${u} (STS default: AWS_REGION, profile region, or us-east-1)`),T},Hs=(e,t)=>{let r,a;return async(s,E)=>{if(a=s,!r){let{logger:U=e?.parentClientConfig?.logger,profile:j=e?.parentClientConfig?.profile,region:Q,requestHandler:G=e?.parentClientConfig?.requestHandler,credentialProviderLogger:Y,userAgentAppId:H=e?.parentClientConfig?.userAgentAppId}=e,mo=await To(Q,e?.parentClientConfig?.region,Y,{logger:U,profile:j}),Ao=!So(G);r=new t({...e,userAgentAppId:H,profile:j,credentialDefaultProvider:()=>async()=>a,region:mo,requestHandler:Ao?G:void 0,logger:U})}let{Credentials:u,AssumedRoleUser:T}=await r.send(new B(E));if(!u||!u.AccessKeyId||!u.SecretAccessKey)throw Error(`Invalid response from STS.assumeRole call with role ${E.RoleArn}`);let D=Ro(T),m={accessKeyId:u.AccessKeyId,secretAccessKey:u.SecretAccessKey,sessionToken:u.SessionToken,expiration:u.Expiration,...u.CredentialScope&&{credentialScope:u.CredentialScope},...D&&{accountId:D}};return me.setCredentialFeature(m,"CREDENTIALS_STS_ASSUME_ROLE","i"),m}},Js=(e,t)=>{let r;return async(a)=>{if(!r){let{logger:D=e?.parentClientConfig?.logger,profile:m=e?.parentClientConfig?.profile,region:U,requestHandler:j=e?.parentClientConfig?.requestHandler,credentialProviderLogger:Q,userAgentAppId:G=e?.parentClientConfig?.userAgentAppId}=e,Y=await To(U,e?.parentClientConfig?.region,Q,{logger:D,profile:m}),H=!So(j);r=new t({...e,userAgentAppId:G,profile:m,region:Y,requestHandler:H?j:void 0,logger:D})}let{Credentials:s,AssumedRoleUser:E}=await r.send(new g(a));if(!s||!s.AccessKeyId||!s.SecretAccessKey)throw Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${a.RoleArn}`);let u=Ro(E),T={accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.SessionToken,expiration:s.Expiration,...s.CredentialScope&&{credentialScope:s.CredentialScope},...u&&{accountId:u}};if(u)me.setCredentialFeature(T,"RESOLVED_ACCOUNT_ID","T");return me.setCredentialFeature(T,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),T}},So=(e)=>{return e?.metadata?.handlerProtocol==="h2"},vo=(e,t)=>{if(!t)return e;else return class extends e{constructor(a){super(a);for(let s of t)this.middlewareStack.use(s)}}},xo=(e={},t)=>Hs(e,vo(w.STSClient,t)),Do=(e={},t)=>Js(e,vo(w.STSClient,t)),Xs=(e)=>(t)=>e({roleAssumer:xo(t),roleAssumerWithWebIdentity:Do(t),...t});I.$Command=z.Command;I.STSServiceException=Qs.STSServiceException;I.AssumeRoleCommand=B;I.AssumeRoleWithWebIdentityCommand=g;I.STS=Ae;I.decorateDefaultCredentialProvider=Xs;I.getDefaultRoleAssumer=xo;I.getDefaultRoleAssumerWithWebIdentity=Do;Object.prototype.hasOwnProperty.call(w,"__proto__")&&!Object.prototype.hasOwnProperty.call(I,"__proto__")&&Object.defineProperty(I,"__proto__",{enumerable:!0,value:w.__proto__});Object.keys(w).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(I,e))I[e]=w[e]});Object.prototype.hasOwnProperty.call(L,"__proto__")&&!Object.prototype.hasOwnProperty.call(I,"__proto__")&&Object.defineProperty(I,"__proto__",{enumerable:!0,value:L.__proto__});Object.keys(L).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(I,e))I[e]=L[e]});Object.prototype.hasOwnProperty.call(V,"__proto__")&&!Object.prototype.hasOwnProperty.call(I,"__proto__")&&Object.defineProperty(I,"__proto__",{enumerable:!0,value:V.__proto__});Object.keys(V).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(I,e))I[e]=V[e]})});export default nn();
|
|
2
|
+
import{a as ps}from"./chunk-3zxwscmf.js";import{b as Se,d as X,e as qs,f as Fs,g as Ws,i as Oo,j as Ko,k as as,l as ws,m as gt,n as Us,o as lo,p as Qt,q as ls,r as Es,s as Ps,t as ys,u as Zr,v as ro}from"./chunk-gw6agevz.js";import{w as us}from"./chunk-wbrj0gya.js";import{A as cs,E as dt,I as k,x as $o,y as Jr}from"./chunk-j0c6ytkj.js";import{J as hs}from"./chunk-5athahgr.js";import{M as Hr}from"./chunk-9m2tbf3n.js";import{N as Xr}from"./chunk-grdahng8.js";import"./chunk-vr90r27j.js";import"./chunk-tss5svjr.js";import{X as Bs}from"./chunk-3337e5g0.js";import"./chunk-xey9cbap.js";import{ha as ds}from"./chunk-zh2egcyb.js";import{Ef as y}from"./chunk-jhkjz9jr.js";var Z=y(($e)=>{Object.defineProperty($e,"__esModule",{value:!0});$e.resolveHttpAuthSchemeConfig=$e.resolveStsAuthConfig=$e.defaultSTSHttpAuthSchemeProvider=$e.defaultSTSHttpAuthSchemeParametersProvider=void 0;var bo=X(),J=$o(),ho=C(),No=async(e,t,r)=>{return{operation:(0,J.getSmithyContext)(t).operation,region:await(0,J.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};$e.defaultSTSHttpAuthSchemeParametersProvider=No;function qo(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Fo(e){return{schemeId:"smithy.api#noAuth"}}var Wo=(e)=>{let t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(Fo(e));break}default:t.push(qo(e))}return t};$e.defaultSTSHttpAuthSchemeProvider=Wo;var wo=(e)=>Object.assign(e,{stsClientCtor:ho.STSClient});$e.resolveStsAuthConfig=wo;var Uo=(e)=>{let t=$e.resolveStsAuthConfig(e),r=(0,bo.resolveAwsSdkSigV4Config)(t);return Object.assign(r,{authSchemePreference:(0,J.normalizeProvider)(e.authSchemePreference??[])})};$e.resolveHttpAuthSchemeConfig=Uo});var f=y((Ne)=>{Object.defineProperty(Ne,"__esModule",{value:!0});Ne.commonParams=Ne.resolveClientEndpointParameters=void 0;var Lo=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"})};Ne.resolveClientEndpointParameters=Lo;Ne.commonParams={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var et=y((Ce)=>{Object.defineProperty(Ce,"__esModule",{value:!0});Ce.ruleSet=void 0;var Ve="required",o="type",n="fn",i="argv",v="ref",Fe=!1,ee=!0,S="booleanEquals",p="stringEquals",ze="sigv4",Be="sts",ge="us-east-1",c="endpoint",We="https://sts.{Region}.{PartitionResult#dnsSuffix}",R="tree",M="error",oe="getAttr",we={[Ve]:!1,[o]:"string"},te={[Ve]:!0,default:!1,[o]:"boolean"},Qe={[v]:"Endpoint"},Ue={[n]:"isSet",[i]:[{[v]:"Region"}]},l={[v]:"Region"},Me={[n]:"aws.partition",[i]:[l],assign:"PartitionResult"},Ye={[v]:"UseFIPS"},He={[v]:"UseDualStack"},P={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:ze,signingName:Be,signingRegion:ge}]},headers:{}},_={},ke={conditions:[{[n]:p,[i]:[l,"aws-global"]}],[c]:P,[o]:c},Je={[n]:S,[i]:[Ye,!0]},Xe={[n]:S,[i]:[He,!0]},Le={[n]:oe,[i]:[{[v]:"PartitionResult"},"supportsFIPS"]},Ze={[v]:"PartitionResult"},je={[n]:S,[i]:[!0,{[n]:oe,[i]:[Ze,"supportsDualStack"]}]},Ge=[{[n]:"isSet",[i]:[Qe]}],Oe=[Je],Ke=[Xe],Go={version:"1.0",parameters:{Region:we,UseDualStack:te,UseFIPS:te,Endpoint:we,UseGlobalEndpoint:te},rules:[{conditions:[{[n]:S,[i]:[{[v]:"UseGlobalEndpoint"},ee]},{[n]:"not",[i]:Ge},Ue,Me,{[n]:S,[i]:[Ye,Fe]},{[n]:S,[i]:[He,Fe]}],rules:[{conditions:[{[n]:p,[i]:[l,"ap-northeast-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"ap-south-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"ap-southeast-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"ap-southeast-2"]}],endpoint:P,[o]:c},ke,{conditions:[{[n]:p,[i]:[l,"ca-central-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-central-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-north-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-west-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-west-2"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-west-3"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"sa-east-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,ge]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"us-east-2"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"us-west-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"us-west-2"]}],endpoint:P,[o]:c},{endpoint:{url:We,properties:{authSchemes:[{name:ze,signingName:Be,signingRegion:"{Region}"}]},headers:_},[o]:c}],[o]:R},{conditions:Ge,rules:[{conditions:Oe,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[o]:M},{conditions:Ke,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[o]:M},{endpoint:{url:Qe,properties:_,headers:_},[o]:c}],[o]:R},{conditions:[Ue],rules:[{conditions:[Me],rules:[{conditions:[Je,Xe],rules:[{conditions:[{[n]:S,[i]:[ee,Le]},je],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:_,headers:_},[o]:c}],[o]:R},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[o]:M}],[o]:R},{conditions:Oe,rules:[{conditions:[{[n]:S,[i]:[Le,ee]}],rules:[{conditions:[{[n]:p,[i]:[{[n]:oe,[i]:[Ze,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:_,headers:_},[o]:c},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:_,headers:_},[o]:c}],[o]:R},{error:"FIPS is enabled but this partition does not support FIPS",[o]:M}],[o]:R},{conditions:Ke,rules:[{conditions:[je],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:_,headers:_},[o]:c}],[o]:R},{error:"DualStack is enabled but this partition does not support DualStack",[o]:M}],[o]:R},ke,{endpoint:{url:We,properties:_,headers:_},[o]:c}],[o]:R}],[o]:R},{error:"Invalid Configuration: Missing Region",[o]:M}]};Ce.ruleSet=Go});var rt=y((tt)=>{Object.defineProperty(tt,"__esModule",{value:!0});tt.defaultEndpointResolver=void 0;var Vo=Ko(),re=Oo(),zo=et(),Bo=new re.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),go=(e,t={})=>{return Bo.get(e,()=>(0,re.resolveEndpoint)(zo.ruleSet,{endpointParams:e,logger:t.logger}))};tt.defaultEndpointResolver=go;re.customEndpointFunctions.aws=Vo.awsEndpointFunctions});var O=y((ne)=>{Object.defineProperty(ne,"__esModule",{value:!0});ne.STSServiceException=ne.__ServiceException=void 0;var st=k();Object.defineProperty(ne,"__ServiceException",{enumerable:!0,get:function(){return st.ServiceException}});class se extends st.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,se.prototype)}}ne.STSServiceException=se});var Ee=y((it)=>{Object.defineProperty(it,"__esModule",{value:!0});it.IDPCommunicationErrorException=it.InvalidIdentityTokenException=it.IDPRejectedClaimException=it.RegionDisabledException=it.PackedPolicyTooLargeException=it.MalformedPolicyDocumentException=it.ExpiredTokenException=void 0;var A=O();class ie extends A.STSServiceException{name="ExpiredTokenException";$fault="client";constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});Object.setPrototypeOf(this,ie.prototype)}}it.ExpiredTokenException=ie;class ce extends A.STSServiceException{name="MalformedPolicyDocumentException";$fault="client";constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e});Object.setPrototypeOf(this,ce.prototype)}}it.MalformedPolicyDocumentException=ce;class de extends A.STSServiceException{name="PackedPolicyTooLargeException";$fault="client";constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e});Object.setPrototypeOf(this,de.prototype)}}it.PackedPolicyTooLargeException=de;class ae extends A.STSServiceException{name="RegionDisabledException";$fault="client";constructor(e){super({name:"RegionDisabledException",$fault:"client",...e});Object.setPrototypeOf(this,ae.prototype)}}it.RegionDisabledException=ae;class ue extends A.STSServiceException{name="IDPRejectedClaimException";$fault="client";constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e});Object.setPrototypeOf(this,ue.prototype)}}it.IDPRejectedClaimException=ue;class pe extends A.STSServiceException{name="InvalidIdentityTokenException";$fault="client";constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e});Object.setPrototypeOf(this,pe.prototype)}}it.InvalidIdentityTokenException=pe;class le extends A.STSServiceException{name="IDPCommunicationErrorException";$fault="client";constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e});Object.setPrototypeOf(this,le.prototype)}}it.IDPCommunicationErrorException=le});var Te=y((Tt)=>{Object.defineProperty(Tt,"__esModule",{value:!0});Tt.AssumeRoleWithWebIdentity$=Tt.AssumeRole$=Tt.Tag$=Tt.ProvidedContext$=Tt.PolicyDescriptorType$=Tt.Credentials$=Tt.AssumeRoleWithWebIdentityResponse$=Tt.AssumeRoleWithWebIdentityRequest$=Tt.AssumeRoleResponse$=Tt.AssumeRoleRequest$=Tt.AssumedRoleUser$=Tt.errorTypeRegistries=Tt.RegionDisabledException$=Tt.PackedPolicyTooLargeException$=Tt.MalformedPolicyDocumentException$=Tt.InvalidIdentityTokenException$=Tt.IDPRejectedClaimException$=Tt.IDPCommunicationErrorException$=Tt.ExpiredTokenException$=Tt.STSServiceException$=void 0;var Co="Arn",fo="AccessKeyId",er="AssumeRole",tr="AssumedRoleId",or="AssumeRoleRequest",rr="AssumeRoleResponse",Pe="AssumedRoleUser",sr="AssumeRoleWithWebIdentity",nr="AssumeRoleWithWebIdentityRequest",ir="AssumeRoleWithWebIdentityResponse",cr="Audience",ye="Credentials",dr="ContextAssertion",at="DurationSeconds",ar="Expiration",ur="ExternalId",pr="ExpiredTokenException",lr="IDPCommunicationErrorException",Er="IDPRejectedClaimException",Pr="InvalidIdentityTokenException",yr="Key",_r="MalformedPolicyDocumentException",ut="Policy",pt="PolicyArns",Ir="ProviderArn",Rr="ProvidedContexts",Tr="ProvidedContextsListType",Sr="ProvidedContext",vr="PolicyDescriptorType",xr="ProviderId",lt="PackedPolicySize",Dr="PackedPolicyTooLargeException",mr="Provider",Et="RoleArn",Ar="RegionDisabledException",Pt="RoleSessionName",$r="SecretAccessKey",br="SubjectFromWebIdentityToken",_e="SourceIdentity",hr="SerialNumber",Nr="SessionToken",qr="Tags",Fr="TokenCode",Wr="TransitiveTagKeys",wr="Tag",Ur="Value",Mr="WebIdentityToken",kr="arn",Lr="accessKeySecretType",$="awsQueryError",b="client",jr="clientTokenType",h="error",N="httpError",q="message",Gr="policyDescriptorListType",yt="smithy.ts.sdk.synthetic.com.amazonaws.sts",Or="tagListType",d="com.amazonaws.sts",_t=dt(),F=Ee(),Kr=O(),It=_t.TypeRegistry.for(yt);Tt.STSServiceException$=[-3,yt,"STSServiceException",0,[],[]];It.registerError(Tt.STSServiceException$,Kr.STSServiceException);var x=_t.TypeRegistry.for(d);Tt.ExpiredTokenException$=[-3,d,pr,{[$]:["ExpiredTokenException",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.ExpiredTokenException$,F.ExpiredTokenException);Tt.IDPCommunicationErrorException$=[-3,d,lr,{[$]:["IDPCommunicationError",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.IDPCommunicationErrorException$,F.IDPCommunicationErrorException);Tt.IDPRejectedClaimException$=[-3,d,Er,{[$]:["IDPRejectedClaim",403],[h]:b,[N]:403},[q],[0]];x.registerError(Tt.IDPRejectedClaimException$,F.IDPRejectedClaimException);Tt.InvalidIdentityTokenException$=[-3,d,Pr,{[$]:["InvalidIdentityToken",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.InvalidIdentityTokenException$,F.InvalidIdentityTokenException);Tt.MalformedPolicyDocumentException$=[-3,d,_r,{[$]:["MalformedPolicyDocument",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.MalformedPolicyDocumentException$,F.MalformedPolicyDocumentException);Tt.PackedPolicyTooLargeException$=[-3,d,Dr,{[$]:["PackedPolicyTooLarge",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.PackedPolicyTooLargeException$,F.PackedPolicyTooLargeException);Tt.RegionDisabledException$=[-3,d,Ar,{[$]:["RegionDisabledException",403],[h]:b,[N]:403},[q],[0]];x.registerError(Tt.RegionDisabledException$,F.RegionDisabledException);Tt.errorTypeRegistries=[It,x];var Vr=[0,d,Lr,8,0],zr=[0,d,jr,8,0];Tt.AssumedRoleUser$=[3,d,Pe,0,[tr,Co],[0,0],2];Tt.AssumeRoleRequest$=[3,d,or,0,[Et,Pt,pt,ut,at,qr,Wr,ur,hr,Fr,_e,Rr],[0,0,()=>Rt,0,1,()=>gr,64,0,0,0,0,()=>Br],2];Tt.AssumeRoleResponse$=[3,d,rr,0,[ye,Pe,lt,_e],[[()=>Tt.Credentials$,0],()=>Tt.AssumedRoleUser$,1,0]];Tt.AssumeRoleWithWebIdentityRequest$=[3,d,nr,0,[Et,Pt,Mr,xr,pt,ut,at],[0,0,[()=>zr,0],0,()=>Rt,0,1],3];Tt.AssumeRoleWithWebIdentityResponse$=[3,d,ir,0,[ye,br,Pe,lt,mr,cr,_e],[[()=>Tt.Credentials$,0],0,()=>Tt.AssumedRoleUser$,1,0,0,0]];Tt.Credentials$=[3,d,ye,0,[fo,$r,Nr,ar],[0,[()=>Vr,0],0,4],4];Tt.PolicyDescriptorType$=[3,d,vr,0,[kr],[0]];Tt.ProvidedContext$=[3,d,Sr,0,[Ir,dr],[0,0]];Tt.Tag$=[3,d,wr,0,[yr,Ur],[0,0],2];var Rt=[1,d,Gr,0,()=>Tt.PolicyDescriptorType$],Br=[1,d,Tr,0,()=>Tt.ProvidedContext$],gr=[1,d,Or,0,()=>Tt.Tag$];Tt.AssumeRole$=[9,d,er,0,()=>Tt.AssumeRoleRequest$,()=>Tt.AssumeRoleResponse$];Tt.AssumeRoleWithWebIdentity$=[9,d,sr,0,()=>Tt.AssumeRoleWithWebIdentityRequest$,()=>Tt.AssumeRoleWithWebIdentityResponse$]});var Ot=y((jt)=>{Object.defineProperty(jt,"__esModule",{value:!0});jt.getRuntimeConfig=void 0;var Cr=X(),fr=Zr(),es=Se(),ts=k(),os=Xr(),kt=Jr(),Lt=Hr(),rs=Z(),ss=rt(),ns=Te(),is=(e)=>{return{apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??kt.fromBase64,base64Encoder:e?.base64Encoder??kt.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ss.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??rs.defaultSTSHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(t)=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Cr.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(t)=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new es.NoAuthSigner}],logger:e?.logger??new ts.NoOpLogger,protocol:e?.protocol??fr.AwsQueryProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:ns.errorTypeRegistries,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??os.parseUrl,utf8Decoder:e?.utf8Decoder??Lt.fromUtf8,utf8Encoder:e?.utf8Encoder??Lt.toUtf8}};jt.getRuntimeConfig=is});var Jt=y((Yt)=>{Object.defineProperty(Yt,"__esModule",{value:!0});Yt.getRuntimeConfig=void 0;var _s=ds(),Is=_s.__importDefault(ps()),ve=X(),Kt=ls(),K=gt(),Rs=Se(),Ts=Es(),Vt=Qt(),W=us(),zt=cs(),Bt=k(),Ss=Ps(),vs=ys(),xs=as(),Ds=Ot(),ms=(e)=>{(0,Bt.emitWarningIfUnsupportedVersion)(process.version);let t=(0,vs.resolveDefaultsModeConfig)(e),r=()=>t().then(Bt.loadConfigsForDefaultMode),a=(0,Ds.getRuntimeConfig)(e);(0,ve.emitWarningIfUnsupportedVersion)(process.version);let s={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,W.loadConfig)(ve.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,s),bodyLengthChecker:e?.bodyLengthChecker??Ss.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Kt.createDefaultUserAgentProvider)({serviceId:a.serviceId,clientVersion:Is.default.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(E)=>E.getIdentityProvider("aws.auth#sigv4")||(async(u)=>await e.credentialDefaultProvider(u?.__config||{})()),signer:new ve.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(E)=>E.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Rs.NoAuthSigner}],maxAttempts:e?.maxAttempts??(0,W.loadConfig)(Vt.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,W.loadConfig)(K.NODE_REGION_CONFIG_OPTIONS,{...K.NODE_REGION_CONFIG_FILE_OPTIONS,...s}),requestHandler:zt.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,W.loadConfig)({...Vt.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||xs.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Ts.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??zt.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,W.loadConfig)(K.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,s),useFipsEndpoint:e?.useFipsEndpoint??(0,W.loadConfig)(K.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,s),userAgentAppId:e?.userAgentAppId??(0,W.loadConfig)(Kt.NODE_APP_ID_CONFIG_OPTIONS,s)}};Yt.getRuntimeConfig=ms});var Ct=y((Xt)=>{Object.defineProperty(Xt,"__esModule",{value:!0});Xt.resolveHttpAuthRuntimeConfig=Xt.getHttpAuthExtensionConfiguration=void 0;var As=(e)=>{let{httpAuthSchemes:t,httpAuthSchemeProvider:r,credentials:a}=e;return{setHttpAuthScheme(s){let E=t.findIndex((u)=>u.schemeId===s.schemeId);if(E===-1)t.push(s);else t.splice(E,1,s)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(s){r=s},httpAuthSchemeProvider(){return r},setCredentials(s){a=s},credentials(){return a}}};Xt.getHttpAuthExtensionConfiguration=As;var $s=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};Xt.resolveHttpAuthRuntimeConfig=$s});var io=y((so)=>{Object.defineProperty(so,"__esModule",{value:!0});so.resolveRuntimeExtensions=void 0;var ft=ro(),eo=hs(),to=k(),oo=Ct(),Ns=(e,t)=>{let r=Object.assign((0,ft.getAwsRegionExtensionConfiguration)(e),(0,to.getDefaultExtensionConfiguration)(e),(0,eo.getHttpHandlerExtensionConfiguration)(e),(0,oo.getHttpAuthExtensionConfiguration)(e));return t.forEach((a)=>a.configure(r)),Object.assign(e,(0,ft.resolveAwsRegionExtensionConfiguration)(r),(0,to.resolveDefaultRuntimeConfig)(r),(0,eo.resolveHttpHandlerRuntimeConfig)(r),(0,oo.resolveHttpAuthRuntimeConfig)(r))};so.resolveRuntimeExtensions=Ns});var C=y((De)=>{Object.defineProperty(De,"__esModule",{value:!0});De.STSClient=De.__Client=void 0;var co=qs(),Ms=Fs(),ks=Ws(),ao=ws(),Ls=gt(),xe=Se(),js=dt(),Gs=Us(),Os=lo(),uo=Qt(),Eo=k();Object.defineProperty(De,"__Client",{enumerable:!0,get:function(){return Eo.Client}});var po=Z(),Ks=f(),Vs=Jt(),zs=io();class Po extends Eo.Client{config;constructor(...[e]){let t=(0,Vs.getRuntimeConfig)(e||{});super(t);this.initConfig=t;let r=(0,Ks.resolveClientEndpointParameters)(t),a=(0,ao.resolveUserAgentConfig)(r),s=(0,uo.resolveRetryConfig)(a),E=(0,Ls.resolveRegionConfig)(s),u=(0,co.resolveHostHeaderConfig)(E),T=(0,Os.resolveEndpointConfig)(u),D=(0,po.resolveHttpAuthSchemeConfig)(T),m=(0,zs.resolveRuntimeExtensions)(D,e?.extensions||[]);this.config=m,this.middlewareStack.use((0,js.getSchemaSerdePlugin)(this.config)),this.middlewareStack.use((0,ao.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,uo.getRetryPlugin)(this.config)),this.middlewareStack.use((0,Gs.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,co.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,Ms.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,ks.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,xe.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config,{httpAuthSchemeParametersProvider:po.defaultSTSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(U)=>new xe.DefaultIdentityProviderConfig({"aws.auth#sigv4":U.credentials})})),this.middlewareStack.use((0,xe.getHttpSigningPlugin)(this.config))}destroy(){super.destroy()}}De.STSClient=Po});var nn=y((I)=>{var w=C(),z=k(),_o=lo(),Io=f(),L=Te(),V=Ee(),me=Bs(),gs=ro(),Qs=O();class B extends z.Command.classBuilder().ep(Io.commonParams).m(function(e,t,r,a){return[_o.getEndpointPlugin(r,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(L.AssumeRole$).build(){}class g extends z.Command.classBuilder().ep(Io.commonParams).m(function(e,t,r,a){return[_o.getEndpointPlugin(r,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(L.AssumeRoleWithWebIdentity$).build(){}var Ys={AssumeRoleCommand:B,AssumeRoleWithWebIdentityCommand:g};class Ae extends w.STSClient{}z.createAggregatedClient(Ys,Ae);var Ro=(e)=>{if(typeof e?.Arn==="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}return},To=async(e,t,r,a={})=>{let s=typeof e==="function"?await e():e,E=typeof t==="function"?await t():t,u="",T=s??E??(u=await gs.stsRegionDefaultResolver(a)());return r?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${s} (credential provider clientConfig)`,`${E} (contextual client)`,`${u} (STS default: AWS_REGION, profile region, or us-east-1)`),T},Hs=(e,t)=>{let r,a;return async(s,E)=>{if(a=s,!r){let{logger:U=e?.parentClientConfig?.logger,profile:j=e?.parentClientConfig?.profile,region:Q,requestHandler:G=e?.parentClientConfig?.requestHandler,credentialProviderLogger:Y,userAgentAppId:H=e?.parentClientConfig?.userAgentAppId}=e,mo=await To(Q,e?.parentClientConfig?.region,Y,{logger:U,profile:j}),Ao=!So(G);r=new t({...e,userAgentAppId:H,profile:j,credentialDefaultProvider:()=>async()=>a,region:mo,requestHandler:Ao?G:void 0,logger:U})}let{Credentials:u,AssumedRoleUser:T}=await r.send(new B(E));if(!u||!u.AccessKeyId||!u.SecretAccessKey)throw Error(`Invalid response from STS.assumeRole call with role ${E.RoleArn}`);let D=Ro(T),m={accessKeyId:u.AccessKeyId,secretAccessKey:u.SecretAccessKey,sessionToken:u.SessionToken,expiration:u.Expiration,...u.CredentialScope&&{credentialScope:u.CredentialScope},...D&&{accountId:D}};return me.setCredentialFeature(m,"CREDENTIALS_STS_ASSUME_ROLE","i"),m}},Js=(e,t)=>{let r;return async(a)=>{if(!r){let{logger:D=e?.parentClientConfig?.logger,profile:m=e?.parentClientConfig?.profile,region:U,requestHandler:j=e?.parentClientConfig?.requestHandler,credentialProviderLogger:Q,userAgentAppId:G=e?.parentClientConfig?.userAgentAppId}=e,Y=await To(U,e?.parentClientConfig?.region,Q,{logger:D,profile:m}),H=!So(j);r=new t({...e,userAgentAppId:G,profile:m,region:Y,requestHandler:H?j:void 0,logger:D})}let{Credentials:s,AssumedRoleUser:E}=await r.send(new g(a));if(!s||!s.AccessKeyId||!s.SecretAccessKey)throw Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${a.RoleArn}`);let u=Ro(E),T={accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.SessionToken,expiration:s.Expiration,...s.CredentialScope&&{credentialScope:s.CredentialScope},...u&&{accountId:u}};if(u)me.setCredentialFeature(T,"RESOLVED_ACCOUNT_ID","T");return me.setCredentialFeature(T,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),T}},So=(e)=>{return e?.metadata?.handlerProtocol==="h2"},vo=(e,t)=>{if(!t)return e;else return class extends e{constructor(a){super(a);for(let s of t)this.middlewareStack.use(s)}}},xo=(e={},t)=>Hs(e,vo(w.STSClient,t)),Do=(e={},t)=>Js(e,vo(w.STSClient,t)),Xs=(e)=>(t)=>e({roleAssumer:xo(t),roleAssumerWithWebIdentity:Do(t),...t});I.$Command=z.Command;I.STSServiceException=Qs.STSServiceException;I.AssumeRoleCommand=B;I.AssumeRoleWithWebIdentityCommand=g;I.STS=Ae;I.decorateDefaultCredentialProvider=Xs;I.getDefaultRoleAssumer=xo;I.getDefaultRoleAssumerWithWebIdentity=Do;Object.prototype.hasOwnProperty.call(w,"__proto__")&&!Object.prototype.hasOwnProperty.call(I,"__proto__")&&Object.defineProperty(I,"__proto__",{enumerable:!0,value:w.__proto__});Object.keys(w).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(I,e))I[e]=w[e]});Object.prototype.hasOwnProperty.call(L,"__proto__")&&!Object.prototype.hasOwnProperty.call(I,"__proto__")&&Object.defineProperty(I,"__proto__",{enumerable:!0,value:L.__proto__});Object.keys(L).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(I,e))I[e]=L[e]});Object.prototype.hasOwnProperty.call(V,"__proto__")&&!Object.prototype.hasOwnProperty.call(I,"__proto__")&&Object.defineProperty(I,"__proto__",{enumerable:!0,value:V.__proto__});Object.keys(V).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(I,e))I[e]=V[e]})});export default nn();
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=DF4A7BE73A9D7DDC64756E2164756E21
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
"'use strict';\n\nvar STSClient = require('./STSClient');\nvar smithyClient = require('@smithy/smithy-client');\nvar middlewareEndpoint = require('@smithy/middleware-endpoint');\nvar EndpointParameters = require('./endpoint/EndpointParameters');\nvar schemas_0 = require('./schemas/schemas_0');\nvar errors = require('./models/errors');\nvar client = require('@aws-sdk/core/client');\nvar regionConfigResolver = require('@aws-sdk/region-config-resolver');\nvar STSServiceException = require('./models/STSServiceException');\n\nclass AssumeRoleCommand extends smithyClient.Command\n .classBuilder()\n .ep(EndpointParameters.commonParams)\n .m(function (Command, cs, config, o) {\n return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRole\", {})\n .n(\"STSClient\", \"AssumeRoleCommand\")\n .sc(schemas_0.AssumeRole$)\n .build() {\n}\n\nclass AssumeRoleWithWebIdentityCommand extends smithyClient.Command\n .classBuilder()\n .ep(EndpointParameters.commonParams)\n .m(function (Command, cs, config, o) {\n return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRoleWithWebIdentity\", {})\n .n(\"STSClient\", \"AssumeRoleWithWebIdentityCommand\")\n .sc(schemas_0.AssumeRoleWithWebIdentity$)\n .build() {\n}\n\nconst commands = {\n AssumeRoleCommand,\n AssumeRoleWithWebIdentityCommand,\n};\nclass STS extends STSClient.STSClient {\n}\nsmithyClient.createAggregatedClient(commands, STS);\n\nconst getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {\n if (typeof assumedRoleUser?.Arn === \"string\") {\n const arnComponents = assumedRoleUser.Arn.split(\":\");\n if (arnComponents.length > 4 && arnComponents[4] !== \"\") {\n return arnComponents[4];\n }\n }\n return undefined;\n};\nconst resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {\n const region = typeof _region === \"function\" ? await _region() : _region;\n const parentRegion = typeof _parentRegion === \"function\" ? await _parentRegion() : _parentRegion;\n let stsDefaultRegion = \"\";\n const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)());\n credentialProviderLogger?.debug?.(\"@aws-sdk/client-sts::resolveRegion\", \"accepting first of:\", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);\n return resolvedRegion;\n};\nconst getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {\n let stsClient;\n let closureSourceCreds;\n return async (sourceCreds, params) => {\n closureSourceCreds = sourceCreds;\n if (!stsClient) {\n const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId, } = stsOptions;\n const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {\n logger,\n profile,\n });\n const isCompatibleRequestHandler = !isH2(requestHandler);\n stsClient = new STSClient({\n ...stsOptions,\n userAgentAppId,\n profile,\n credentialDefaultProvider: () => async () => closureSourceCreds,\n region: resolvedRegion,\n requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,\n logger: logger,\n });\n }\n const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));\n if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);\n }\n const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);\n const credentials = {\n accessKeyId: Credentials.AccessKeyId,\n secretAccessKey: Credentials.SecretAccessKey,\n sessionToken: Credentials.SessionToken,\n expiration: Credentials.Expiration,\n ...(Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }),\n ...(accountId && { accountId }),\n };\n client.setCredentialFeature(credentials, \"CREDENTIALS_STS_ASSUME_ROLE\", \"i\");\n return credentials;\n };\n};\nconst getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient) => {\n let stsClient;\n return async (params) => {\n if (!stsClient) {\n const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId, } = stsOptions;\n const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {\n logger,\n profile,\n });\n const isCompatibleRequestHandler = !isH2(requestHandler);\n stsClient = new STSClient({\n ...stsOptions,\n userAgentAppId,\n profile,\n region: resolvedRegion,\n requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,\n logger: logger,\n });\n }\n const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));\n if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);\n }\n const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);\n const credentials = {\n accessKeyId: Credentials.AccessKeyId,\n secretAccessKey: Credentials.SecretAccessKey,\n sessionToken: Credentials.SessionToken,\n expiration: Credentials.Expiration,\n ...(Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }),\n ...(accountId && { accountId }),\n };\n if (accountId) {\n client.setCredentialFeature(credentials, \"RESOLVED_ACCOUNT_ID\", \"T\");\n }\n client.setCredentialFeature(credentials, \"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID\", \"k\");\n return credentials;\n };\n};\nconst isH2 = (requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\";\n};\n\nconst getCustomizableStsClientCtor = (baseCtor, customizations) => {\n if (!customizations)\n return baseCtor;\n else\n return class CustomizableSTSClient extends baseCtor {\n constructor(config) {\n super(config);\n for (const customization of customizations) {\n this.middlewareStack.use(customization);\n }\n }\n };\n};\nconst getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient.STSClient, stsPlugins));\nconst getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient.STSClient, stsPlugins));\nconst decorateDefaultCredentialProvider = (provider) => (input) => provider({\n roleAssumer: getDefaultRoleAssumer(input),\n roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input),\n ...input,\n});\n\nexports.$Command = smithyClient.Command;\nexports.STSServiceException = STSServiceException.STSServiceException;\nexports.AssumeRoleCommand = AssumeRoleCommand;\nexports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;\nexports.STS = STS;\nexports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;\nexports.getDefaultRoleAssumer = getDefaultRoleAssumer;\nexports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;\nObject.prototype.hasOwnProperty.call(STSClient, '__proto__') &&\n !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n Object.defineProperty(exports, '__proto__', {\n enumerable: true,\n value: STSClient['__proto__']\n });\n\nObject.keys(STSClient).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = STSClient[k];\n});\nObject.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&\n !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n Object.defineProperty(exports, '__proto__', {\n enumerable: true,\n value: schemas_0['__proto__']\n });\n\nObject.keys(schemas_0).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];\n});\nObject.prototype.hasOwnProperty.call(errors, '__proto__') &&\n !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n Object.defineProperty(exports, '__proto__', {\n enumerable: true,\n value: errors['__proto__']\n });\n\nObject.keys(errors).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];\n});\n"
|
|
18
18
|
],
|
|
19
19
|
"mappings": ";ovBACA,CAAO,SAAe,HAAS,OAAc,LAAE,AAAO,JAAK,LAAC,JACpD,yBAAsC,kBAA+B,8BAA2C,8CAAkD,OAC1K,IAAM,OACA,OACA,OACA,GAA6C,MAAO,EAAQ,EAAS,IAAU,CACjF,MAAO,CACH,WAAY,EAAG,EAAkB,kBAAkB,CAAO,EAAE,UAC5D,OAAS,MAAO,EAAG,EAAkB,mBAAmB,EAAO,MAAM,EAAE,IAClE,IAAM,CACH,MAAU,MAAM,yDAAyD,IAC1E,CACX,GAEI,8CAA6C,GACrD,SAAS,EAAgC,CAAC,EAAgB,CACtD,MAAO,CACH,SAAU,iBACV,kBAAmB,CACf,KAAM,MACN,OAAQ,EAAe,MAC3B,E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AAO,UAAU,eAAe,KAAK,EAAW,WAAW,GACvD,CAAC,OAAO,UAAU,eAAe,KAAK,EAAS,WAAW,GAC1D,OAAO,eAAe,EAAS,YAAa,CACxC,WAAY,GACZ,MAAO,EAAU,SACrB,CAAC,EAEL,OAAO,KAAK,CAAS,EAAE,QAAQ,QAAS,CAAC,EAAG,CACxC,GAAI,IAAM,WAAa,CAAC,OAAO,UAAU,eAAe,KAAK,EAAS,CAAC,EAAG,EAAQ,GAAK,EAAU,GACpG,EACD,OAAO,UAAU,eAAe,KAAK,EAAQ,WAAW,GACpD,CAAC,OAAO,UAAU,eAAe,KAAK,EAAS,WAAW,GAC1D,OAAO,eAAe,EAAS,YAAa,CACxC,WAAY,GACZ,MAAO,EAAO,SAClB,CAAC,EAEL,OAAO,KAAK,CAAM,EAAE,QAAQ,QAAS,CAAC,EAAG,CACrC,GAAI,IAAM,WAAa,CAAC,OAAO,UAAU,eAAe,KAAK,EAAS,CAAC,EAAG,EAAQ,GAAK,EAAO,GACjG",
|
|
20
|
-
"debugId": "
|
|
20
|
+
"debugId": "DF4A7BE73A9D7DDC64756E2164756E21",
|
|
21
21
|
"names": []
|
|
22
22
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import{existsSync as $,readdirSync as B}from"fs";import{join as Y,relative as G}from"path";function J(K,Q=[]){let U=[],X=(H)=>{let z=G(K,H).split("\\").join("/");return Q.some((q)=>z===q||z.startsWith(`${q}/`))},V=(H)=>{for(let z of B(H,{withFileTypes:!0}).sort((q,Z)=>q.name<Z.name?-1:q.name>Z.name?1:0)){let q=Y(H,z.name);if(X(q))continue;if(z.isDirectory()){if(z.name.startsWith(".")||z.name==="node_modules")continue;if($(Y(q,"package.json")))continue;V(q);continue}if(!z.name.endsWith(".ts")&&!z.name.endsWith(".tsx"))continue;if(z.name.endsWith(".d.ts"))continue;if(/\.(test|test-d|spec|bench)\.tsx?$/.test(z.name))continue;U.push(q)}};if(!$(K))return U;return V(K),U}class A extends Error{constructor(K,Q){super(K,Q);this.name="DiscoveryError"}}async function W(K,Q,U=[],X){let V=new Set;for(let H of J(K,U)){let z;try{z=await import(H)}catch(q){throw new A(`${H} could not be imported, so the classes in it could not be discovered:
|
|
3
3
|
${q.message}
|
|
4
4
|
List the classes explicitly in the config slice for this directory to skip the walk.`,{cause:q})}for(let q of Object.values(z)){if(typeof q==="function"&&q!==Q&&Object.prototype.isPrototypeOf.call(Q,q)){V.add(q);continue}X?.(q,H)}}return[...V]}function F(){return Y(process.cwd(),process.env.GEMI_PROJECT_DIR??"")}
|
|
5
|
-
export{J as
|
|
5
|
+
export{J as Sb,A as Tb,W as Ub,F as Vb};
|
|
6
6
|
|
|
7
|
-
//# debugId=
|
|
7
|
+
//# debugId=C7C9882AA58D0EE664756E2164756E21
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"import { existsSync, readdirSync } from \"node:fs\";\nimport { join, relative } from \"node:path\";\n\n/**\n * Finding the classes an application declared and never imported — the walk\n * #322 and #323 both end at.\n *\n * ### Why it has to run the files\n *\n * A job that is written and not listed does not fail; it disappears.\n * `QueueManager.next` looks a dispatched name up in the map its config built and\n * skips what is not there, so the dispatch is simply lost. A cron drifts worse:\n * nothing is waiting on a tick, so a job that never fires reports nothing to\n * anyone. What both come down to is that `app/config/queue.ts` naming every\n * `Job` subclass is the *only* thing putting those classes in the module graph —\n * the list and the directory are two spellings of one set, kept in step by hand.\n *\n * The way out of that is to read the directory, and there is no static read that\n * will do: the class does not exist until its module has run. So **every file\n * walked here is imported**, and a file that *does something* when imported does\n * it here — at boot, in production, on every start. `gemi check models` makes\n * the same trade for the same reason and pays it once per CI run; a caller of\n * this pays it once per process.\n *\n * ### What that asks of a caller\n *\n * **Point it at a directory of class declarations, not at `app/`.** The skip\n * rules on `sourceFiles` drop what certainly is not one — tests, benchmarks,\n * `.d.ts`, vendored packages — and nothing else. Widening the guesses is how a\n * discovery pass ends up quietly covering less than the directory holds, which\n * is the same silence in a new place.\n *\n * **Let a broken file stop the boot.** `discoverClasses` rethrows an import\n * failure naming the file rather than dropping it and carrying on, for the same\n * reason: four classes found out of five looks exactly like five out of five.\n *\n * **Leave a way out.** Discovery is what should happen when an app said\n * nothing. An app that lists its classes explicitly must not reach this file at\n * all — that is the escape hatch for a directory holding something this cannot\n * import, and it is the sentence an error from here should point at.\n *\n * ### One more thing worth knowing\n *\n * This imports by absolute path, while the application imports the same files\n * through the `@/app/*` alias. Bun keys its module registry by the *resolved*\n * path, so those two specifiers land on one module: a job already reached from\n * a controller is not evaluated a second time here, and the class object is the\n * same one. `gemi build` leaves that true in production — `packages: \"external\"`\n * keeps the app's own code out of `dist/server/server.mjs` and resolves it from\n * source at runtime, exactly as `gemi dev` does.\n *\n * Nothing here depends on that holding, and deliberately: `QueueManager` and the\n * `Scheduler`'s cross-reload registry are both keyed by name rather than by\n * class identity, so a build that did inline the app's modules would produce a\n * duplicate class object and still register the right job. Worth knowing before\n * writing a registry keyed the other way.\n */\n\n/**\n * The files under `dir` that could declare a class.\n *\n * Everything underneath it, because apps do group classes into folders, minus\n * what cannot be one. Each of these is going to be *imported*, so the exclusions\n * are about what is certainly not source rather than about what is probably not:\n *\n * - **Declaration files.** `.d.ts` has no runtime module behind it.\n * - **Tests, type tests and benchmarks**, by the suffix a runner already\n * recognises.\n * - **Dot-directories and `node_modules`.**\n * - **Any directory holding a `package.json`.** That is a package that happens\n * to live here — a vendored client, a generated SDK — not this app's source,\n * and importing its entry point runs somebody else's module graph. The\n * template has two under `app/models`.\n *\n * `ignore` is the escape hatch for the rest: a path prefix, relative to `dir`,\n * naming a file or a directory of adjacent code that runs something on import.\n * Nothing is ignored by default.\n *\n * The order is the same on every run over the same tree, which matters because\n * the caller is going to import in it: entries are sorted per directory before\n * recursing, and `readdirSync` order is the filesystem's rather than\n * alphabetical — a tree written `A.ts` then `B.ts` reads back `B.ts` first on\n * the machines this was tested on. Sorting per directory rather than sorting the\n * finished list is deliberate: for a tree holding both `a.ts` and `a/b.ts`, this\n * emits `a/b.ts` first, because the directory sorts before the file.\n *\n * A directory that does not exist yields an empty list rather than throwing.\n * \"The app has no jobs yet\" is an ordinary state and not this function's to\n * complain about — but it is indistinguishable from \"the app's source did not\n * ship\", so a caller that boots on the answer owes the reader a word about which\n * one it got.\n */\nexport function sourceFiles(dir: string, ignore: string[] = []): string[] {\n const out: string[] = [];\n\n const ignored = (path: string) => {\n const rel = relative(dir, path).split(\"\\\\\").join(\"/\");\n return ignore.some(\n (pattern) => rel === pattern || rel.startsWith(`${pattern}/`),\n );\n };\n\n const walk = (current: string) => {\n for (const entry of readdirSync(current, { withFileTypes: true }).sort(\n (a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0),\n )) {\n const path = join(current, entry.name);\n if (ignored(path)) continue;\n\n if (entry.isDirectory()) {\n if (entry.name.startsWith(\".\") || entry.name === \"node_modules\")\n continue;\n if (existsSync(join(path, \"package.json\"))) continue;\n walk(path);\n continue;\n }\n\n if (!entry.name.endsWith(\".ts\") && !entry.name.endsWith(\".tsx\")) continue;\n if (entry.name.endsWith(\".d.ts\")) continue;\n if (/\\.(test|test-d|spec|bench)\\.tsx?$/.test(entry.name)) continue;\n\n out.push(path);\n }\n };\n\n if (!existsSync(dir)) return out;\n\n walk(dir);\n return out;\n}\n\n/**\n * A class, as much of one as this file can name. `abstract` so that a base an\n * app never instantiates directly is a legal argument.\n */\ntype ClassLike = abstract new (...args: never[]) => unknown;\n\n/**\n * A file that would not import, reported with the file that would not import.\n *\n * Separate from a bare rethrow because the stack of a failed dynamic import\n * names the module that failed to *resolve*, several frames deep, and says\n * nothing about the walk that asked for it — so the reader learns that some\n * `?raw` specifier is unresolvable without learning that discovery is what\n * imported it, or that listing the classes explicitly is how they get their boot\n * back.\n */\nexport class DiscoveryError extends Error {\n constructor(message: string, options?: { cause?: unknown }) {\n super(message, options);\n this.name = \"DiscoveryError\";\n }\n}\n\n/**\n * Every exported class under `dir` whose prototype chain reaches `base`.\n *\n * `base` is a parameter rather than an import so that this file names no\n * service and stays cheap to depend on — `bin/check-models.ts` uses the walker\n * above and is bundled into `dist/bin/gemi.js`, which is not somewhere gemi's\n * service layer should end up. It is also what lets a test hand in a base class\n * of its own instead of standing up a project that can resolve `gemi/services`.\n *\n * `base` itself is never returned. A directory whose files import their base\n * from a sibling — the shape an app reaches for when several jobs share a gate —\n * re-exports it as often as not, and a framework that scheduled the abstract\n * base along with its subclasses would be running a job nobody wrote.\n *\n * A class is returned once no matter how many exports name it. A barrel in the\n * directory re-exporting everything beside it is the ordinary case, and it makes\n * every class reachable twice.\n *\n * The order is the walk's, and within a file the module namespace's, which the\n * language sorts by name. So the answer is the same on every run — worth having\n * where the caller is a scheduler and the alternative is a boot order that\n * depends on the filesystem.\n *\n * `onSkipped` is handed every export that did *not* match, with the file it came\n * from. Discovery's characteristic failure is a thing the author wrote and this\n * walk cannot see, and by the time an export has been discarded here the\n * information about why is gone — the caller is left holding \"four classes\"\n * where the directory holds five. A caller that can recognise its own\n * near-misses, as `discoverCommands` recognises a builder chain that was never\n * finished, uses this to say so by name instead.\n *\n * @throws DiscoveryError if a walked file cannot be imported. Not a skip: a file\n * that will not load is a class the caller was going to be told about and now is\n * not, which is the failure discovery exists to remove.\n */\nexport async function discoverClasses<T extends ClassLike>(\n dir: string,\n base: T,\n ignore: string[] = [],\n onSkipped?: (value: unknown, file: string) => void,\n): Promise<T[]> {\n const found = new Set<T>();\n\n for (const path of sourceFiles(dir, ignore)) {\n let module: Record<string, unknown>;\n\n try {\n module = (await import(path)) as Record<string, unknown>;\n } catch (error) {\n throw new DiscoveryError(\n `${path} could not be imported, so the classes in it could not be ` +\n `discovered:\\n ${(error as Error).message}\\n` +\n `List the classes explicitly in the config slice for this directory ` +\n `to skip the walk.`,\n { cause: error },\n );\n }\n\n for (const value of Object.values(module)) {\n if (\n typeof value === \"function\" &&\n value !== base &&\n Object.prototype.isPrototypeOf.call(base, value)\n ) {\n found.add(value as unknown as T);\n continue;\n }\n\n onSkipped?.(value, path);\n }\n }\n\n return [...found];\n}\n\n/**\n * The directory an app's `app/` sits in, as the running process can know it.\n *\n * `ROOT_DIR` is the obvious answer and is not available: `Server.start` awaits\n * `waitForBoot()` — every provider's `register` and `boot` — and only then\n * imports the http layer that sets it. Anything resolving paths during boot is\n * earlier than the variable it would want.\n *\n * What it can use is the same rule `httpProd` computes `ROOT_DIR` with a moment\n * later, which is why that file now calls this instead of repeating it. `gemi\n * dev` and `gemi start` both spawn the server with no `cwd`, so the process\n * inherits the CLI's, and the CLI takes `process.cwd()` for the project root\n * itself — `bun/preload.ts` reads `gemi.config` from it on the same assumption.\n *\n * `httpDev` computes a bare `process.cwd()`, so it and `httpProd` already\n * disagree whenever `GEMI_PROJECT_DIR` is set. Nothing in this repo sets it and\n * `gemi start` ignores it when locating the built entry point, so the two rules\n * are the same rule for every configuration that runs today; the divergence is\n * older than this function and wants its own fix.\n */\nexport function projectRoot(): string {\n return join(process.cwd(), process.env.GEMI_PROJECT_DIR ?? \"\");\n}\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";AAAA,qBAAS,iBAAY,WACrB,eAAS,cAAM,aA2FR,SAAS,CAAW,CAAC,EAAa,EAAmB,CAAC,EAAa,CACxE,IAAM,EAAgB,CAAC,EAEjB,EAAU,CAAC,IAAiB,CAChC,IAAM,EAAM,EAAS,EAAK,CAAI,EAAE,MAAM,IAAI,EAAE,KAAK,GAAG,EACpD,OAAO,EAAO,KACZ,CAAC,IAAY,IAAQ,GAAW,EAAI,WAAW,GAAG,IAAU,CAC9D,GAGI,EAAO,CAAC,IAAoB,CAChC,QAAW,KAAS,EAAY,EAAS,CAAE,cAAe,EAAK,CAAC,EAAE,KAChE,CAAC,EAAG,IAAO,EAAE,KAAO,EAAE,KAAO,GAAK,EAAE,KAAO,EAAE,KAAO,EAAI,CAC1D,EAAG,CACD,IAAM,EAAO,EAAK,EAAS,EAAM,IAAI,EACrC,GAAI,EAAQ,CAAI,EAAG,SAEnB,GAAI,EAAM,YAAY,EAAG,CACvB,GA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|
-
import{
|
|
2
|
+
import{Ef as a}from"./chunk-jhkjz9jr.js";var i=a((f)=>{function u(t){let r={};if(t=t.replace(/^\?/,""),t)for(let n of t.split("&")){let[e,s=null]=n.split("=");if(e=decodeURIComponent(e),s)s=decodeURIComponent(s);if(!(e in r))r[e]=s;else if(Array.isArray(r[e]))r[e].push(s);else r[e]=[r[e],s]}return r}f.parseQueryString=u});var U=a((d)=>{var y=i(),c=(t)=>{if(typeof t==="string")return c(new URL(t));let{hostname:r,pathname:n,port:e,protocol:s,search:o}=t,p;if(o)p=y.parseQueryString(o);return{hostname:r,port:e?parseInt(e):void 0,protocol:s,path:n,query:p}};d.parseUrl=c});
|
|
3
3
|
export{U as N};
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=DBF94DB5DDDA9CA364756E2164756E21
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
"'use strict';\n\nvar querystringParser = require('@smithy/querystring-parser');\n\nconst parseUrl = (url) => {\n if (typeof url === \"string\") {\n return parseUrl(new URL(url));\n }\n const { hostname, pathname, port, protocol, search } = url;\n let query;\n if (search) {\n query = querystringParser.parseQueryString(search);\n }\n return {\n hostname,\n port: port ? parseInt(port) : undefined,\n protocol,\n path: pathname,\n query,\n };\n};\n\nexports.parseUrl = parseUrl;\n"
|
|
7
7
|
],
|
|
8
8
|
"mappings": ";uDAEA,SAAS,CAAgB,CAAC,EAAa,CACnC,IAAM,EAAQ,CAAC,EAEf,GADA,EAAc,EAAY,QAAQ,MAAO,EAAE,EACvC,EACA,QAAW,KAAQ,EAAY,MAAM,GAAG,EAAG,CACvC,IAAK,EAAK,EAAQ,MAAQ,EAAK,MAAM,GAAG,EAExC,GADA,EAAM,mBAAmB,CAAG,EACxB,EACA,EAAQ,mBAAmB,CAAK,EAEpC,GAAI,EAAE,KAAO,GACT,EAAM,GAAO,EAEZ,QAAI,MAAM,QAAQ,EAAM,EAAI,EAC7B,EAAM,GAAK,KAAK,CAAK,EAGrB,OAAM,GAAO,CAAC,EAAM,GAAM,CAAK,EAI3C,OAAO,EAGH,mBAAmB,kBCxB3B,IAAI,MAEE,EAAW,CAAC,IAAQ,CACtB,GAAI,OAAO,IAAQ,SACf,OAAO,EAAS,IAAI,IAAI,CAAG,CAAC,EAEhC,IAAQ,WAAU,WAAU,OAAM,WAAU,UAAW,EACnD,EACJ,GAAI,EACA,EAAQ,EAAkB,iBAAiB,CAAM,EAErD,MAAO,CACH,WACA,KAAM,EAAO,SAAS,CAAI,EAAI,OAC9B,WACA,KAAM,EACN,OACJ,GAGI,WAAW",
|
|
9
|
-
"debugId": "
|
|
9
|
+
"debugId": "DBF94DB5DDDA9CA364756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|