gemi 0.51.0 → 0.52.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/bin/gemi.js +30 -1
- package/dist/bin/gemi.js.map +4 -4
- package/dist/broadcasting/index.js +1 -1
- package/dist/bun/plugin.js +1 -1
- package/dist/bun/preload.js +1 -1
- package/dist/{chunk-5v36t9j3.js → chunk-092pj2j2.js} +3 -3
- package/dist/{chunk-5v36t9j3.js.map → chunk-092pj2j2.js.map} +1 -1
- package/dist/{chunk-zwpx6z5f.js → chunk-0h3jr9d9.js} +2 -2
- package/dist/{chunk-8zd6d5nd.js.map → chunk-0h3jr9d9.js.map} +1 -1
- package/dist/{chunk-98sj7tkf.js → chunk-0tbwn6er.js} +3 -3
- package/dist/{chunk-98sj7tkf.js.map → chunk-0tbwn6er.js.map} +1 -1
- package/dist/{chunk-hwwp6x2s.js → chunk-1ab1ptq5.js} +2 -2
- package/dist/{chunk-hwwp6x2s.js.map → chunk-1ab1ptq5.js.map} +1 -1
- package/dist/{chunk-eby61053.js → chunk-1ce7veh9.js} +3 -3
- package/dist/{chunk-eby61053.js.map → chunk-1ce7veh9.js.map} +1 -1
- package/dist/{chunk-dk01r6se.js → chunk-23g7qdpg.js} +2 -2
- package/dist/{chunk-dk01r6se.js.map → chunk-23g7qdpg.js.map} +1 -1
- package/dist/{chunk-fs091xz7.js → chunk-2gw6cyyj.js} +2 -2
- package/dist/{chunk-fs091xz7.js.map → chunk-2gw6cyyj.js.map} +1 -1
- package/dist/chunk-2qn472j4.js +5 -0
- package/dist/{chunk-8gb1w19q.js.map → chunk-2qn472j4.js.map} +1 -1
- package/dist/{chunk-pkzj7c5w.js → chunk-2sfz64xh.js} +2 -2
- package/dist/{chunk-pkzj7c5w.js.map → chunk-2sfz64xh.js.map} +1 -1
- package/dist/{chunk-q0xq0pt0.js → chunk-2yth3kk2.js} +4 -4
- package/dist/{chunk-q0xq0pt0.js.map → chunk-2yth3kk2.js.map} +1 -1
- package/dist/{chunk-gdegb5t0.js → chunk-38ma6gg3.js} +2 -2
- package/dist/{chunk-gdegb5t0.js.map → chunk-38ma6gg3.js.map} +1 -1
- package/dist/{chunk-8vnbvfmd.js → chunk-3y9nf09k.js} +2 -2
- package/dist/{chunk-8vnbvfmd.js.map → chunk-3y9nf09k.js.map} +1 -1
- package/dist/{chunk-8zd6d5nd.js → chunk-4e61qbp4.js} +2 -2
- package/dist/{chunk-zwpx6z5f.js.map → chunk-4e61qbp4.js.map} +1 -1
- package/dist/{chunk-nbx9mgmr.js → chunk-4t6a82fh.js} +2 -2
- package/dist/{chunk-nbx9mgmr.js.map → chunk-4t6a82fh.js.map} +1 -1
- package/dist/{chunk-mrf9tjev.js → chunk-53e48ce8.js} +2 -2
- package/dist/{chunk-mrf9tjev.js.map → chunk-53e48ce8.js.map} +1 -1
- package/dist/{chunk-j33n723q.js → chunk-5s45prj5.js} +3 -3
- package/dist/{chunk-j33n723q.js.map → chunk-5s45prj5.js.map} +1 -1
- package/dist/{chunk-16bnbtyn.js → chunk-68w225rv.js} +2 -2
- package/dist/{chunk-16bnbtyn.js.map → chunk-68w225rv.js.map} +1 -1
- package/dist/{chunk-rxeyhwqz.js → chunk-69w4egkg.js} +3 -3
- package/dist/{chunk-rxeyhwqz.js.map → chunk-69w4egkg.js.map} +1 -1
- package/dist/{chunk-8m3wq94b.js → chunk-6scjrbw7.js} +2 -2
- package/dist/{chunk-8m3wq94b.js.map → chunk-6scjrbw7.js.map} +1 -1
- package/dist/{chunk-asgfqcwd.js → chunk-88pq4gmf.js} +2 -2
- package/dist/{chunk-asgfqcwd.js.map → chunk-88pq4gmf.js.map} +1 -1
- package/dist/{chunk-p0z35s59.js → chunk-8p6rqegw.js} +1 -1
- package/dist/{chunk-5t2c9194.js → chunk-a0sy9f9x.js} +1 -1
- package/dist/{chunk-g4gjn481.js → chunk-cmq5t8p9.js} +3 -3
- package/dist/{chunk-g4gjn481.js.map → chunk-cmq5t8p9.js.map} +1 -1
- package/dist/{chunk-zznpmnp7.js → chunk-d1ahbza9.js} +3 -3
- package/dist/{chunk-zznpmnp7.js.map → chunk-d1ahbza9.js.map} +1 -1
- package/dist/{chunk-an6nq9yd.js → chunk-ebcgdv00.js} +3 -3
- package/dist/{chunk-an6nq9yd.js.map → chunk-ebcgdv00.js.map} +1 -1
- package/dist/{chunk-3z4nwzvp.js → chunk-et0j6jx8.js} +3 -3
- package/dist/{chunk-3z4nwzvp.js.map → chunk-et0j6jx8.js.map} +1 -1
- package/dist/chunk-f29vd5mc.js +5 -0
- package/dist/{chunk-45c8sqb7.js.map → chunk-f29vd5mc.js.map} +2 -2
- package/dist/{chunk-gvf1d636.js → chunk-faa987e4.js} +2 -2
- package/dist/{chunk-gvf1d636.js.map → chunk-faa987e4.js.map} +1 -1
- package/dist/{chunk-6wm9bsz9.js → chunk-h5g05qwb.js} +2 -2
- package/dist/{chunk-6wm9bsz9.js.map → chunk-h5g05qwb.js.map} +1 -1
- package/dist/{chunk-x80n922n.js → chunk-h7jv3ame.js} +2 -2
- package/dist/{chunk-x80n922n.js.map → chunk-h7jv3ame.js.map} +1 -1
- package/dist/chunk-ha7n1c94.js +7 -0
- package/dist/{chunk-bm6q0q1q.js.map → chunk-ha7n1c94.js.map} +3 -3
- package/dist/chunk-hbycemy5.js +6 -0
- package/dist/{chunk-ygpzyxr6.js.map → chunk-hbycemy5.js.map} +2 -2
- package/dist/{chunk-3fcgg506.js → chunk-j1knf8gv.js} +3 -3
- package/dist/{chunk-3fcgg506.js.map → chunk-j1knf8gv.js.map} +1 -1
- package/dist/chunk-jdfe4dmh.js +5 -0
- package/dist/chunk-jdfe4dmh.js.map +30 -0
- package/dist/{chunk-1sbm38g3.js → chunk-kaxvw75w.js} +3 -3
- package/dist/{chunk-1sbm38g3.js.map → chunk-kaxvw75w.js.map} +1 -1
- package/dist/{chunk-c4r1zh9q.js → chunk-km6x37ws.js} +4 -4
- package/dist/{chunk-c4r1zh9q.js.map → chunk-km6x37ws.js.map} +1 -1
- package/dist/{chunk-eyvtf769.js → chunk-kxzwem3g.js} +2 -2
- package/dist/{chunk-eyvtf769.js.map → chunk-kxzwem3g.js.map} +1 -1
- package/dist/{chunk-hnw1jy86.js → chunk-msz8rngs.js} +2 -2
- package/dist/{chunk-hnw1jy86.js.map → chunk-msz8rngs.js.map} +1 -1
- package/dist/chunk-mt2755rs.js +5 -0
- package/dist/{chunk-g0w87jtw.js.map → chunk-mt2755rs.js.map} +4 -3
- package/dist/chunk-p22rkf1g.js +8 -0
- package/dist/chunk-p22rkf1g.js.map +11 -0
- package/dist/{chunk-kv8p4h79.js → chunk-q09mmr05.js} +3 -3
- package/dist/{chunk-kv8p4h79.js.map → chunk-q09mmr05.js.map} +1 -1
- package/dist/chunk-qj4mmner.js +4 -0
- package/dist/{chunk-6x6gb7zg.js.map → chunk-qj4mmner.js.map} +3 -3
- package/dist/{chunk-d3tf618w.js → chunk-qx6sahe0.js} +2 -2
- package/dist/{chunk-d3tf618w.js.map → chunk-qx6sahe0.js.map} +1 -1
- package/dist/{chunk-w7fpm2pw.js → chunk-qyaqg07q.js} +2 -2
- package/dist/{chunk-w7fpm2pw.js.map → chunk-qyaqg07q.js.map} +1 -1
- package/dist/{chunk-a6w4tpwz.js → chunk-rq770c71.js} +2 -2
- package/dist/{chunk-a6w4tpwz.js.map → chunk-rq770c71.js.map} +1 -1
- package/dist/{chunk-zezdm4ep.js → chunk-t4n25km9.js} +3 -3
- package/dist/{chunk-zezdm4ep.js.map → chunk-t4n25km9.js.map} +1 -1
- package/dist/chunk-tmk4zfz9.js +33 -0
- package/dist/chunk-tmk4zfz9.js.map +18 -0
- package/dist/{chunk-k4mjcvsm.js → chunk-ttzkn1qd.js} +2 -2
- package/dist/{chunk-k4mjcvsm.js.map → chunk-ttzkn1qd.js.map} +1 -1
- package/dist/{chunk-94k8pjmf.js → chunk-tztqkat2.js} +3 -3
- package/dist/{chunk-94k8pjmf.js.map → chunk-tztqkat2.js.map} +1 -1
- package/dist/{chunk-ybqftmjx.js → chunk-vnjvd82s.js} +2 -2
- package/dist/{chunk-ybqftmjx.js.map → chunk-vnjvd82s.js.map} +1 -1
- package/dist/{chunk-0k5jhyry.js → chunk-xsmt86n3.js} +2 -2
- package/dist/{chunk-0k5jhyry.js.map → chunk-xsmt86n3.js.map} +1 -1
- package/dist/{chunk-ntr81h76.js → chunk-z4q1ty6w.js} +2 -2
- package/dist/{chunk-ntr81h76.js.map → chunk-z4q1ty6w.js.map} +1 -1
- package/dist/{chunk-53w1njqz.js → chunk-zhsaz9cr.js} +1 -1
- package/dist/config/index.js +1 -1
- package/dist/console/Command.d.ts +143 -0
- package/dist/console/Command.d.ts.map +1 -0
- package/dist/console/CommandRegistry.d.ts +46 -0
- package/dist/console/CommandRegistry.d.ts.map +1 -0
- package/dist/console/builder.d.ts +115 -0
- package/dist/console/builder.d.ts.map +1 -0
- package/dist/console/builder.test-d.d.ts +2 -0
- package/dist/console/builder.test-d.d.ts.map +1 -0
- package/dist/console/config.d.ts +40 -0
- package/dist/console/config.d.ts.map +1 -0
- package/dist/console/context.d.ts +90 -0
- package/dist/console/context.d.ts.map +1 -0
- package/dist/console/errors.d.ts +19 -0
- package/dist/console/errors.d.ts.map +1 -0
- package/dist/console/parse.d.ts +65 -0
- package/dist/console/parse.d.ts.map +1 -0
- package/dist/console/run.d.ts +2 -0
- package/dist/console/run.d.ts.map +1 -0
- package/dist/console/run.js +16 -0
- package/dist/console/run.js.map +14 -0
- package/dist/console/runner.d.ts +41 -0
- package/dist/console/runner.d.ts.map +1 -0
- package/dist/console/usage.d.ts +7 -0
- package/dist/console/usage.d.ts.map +1 -0
- 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 +2 -2
- 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/http/ViewRouter.d.ts.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/index.js.map +2 -2
- package/dist/kernel/Kernel.d.ts +29 -0
- package/dist/kernel/Kernel.d.ts.map +1 -1
- package/dist/kernel/index.js +3 -3
- package/dist/kernel/index.js.map +3 -3
- package/dist/orm/compile/nested-writes.d.ts +11 -3
- package/dist/orm/compile/nested-writes.d.ts.map +1 -1
- package/dist/orm/index.js +3 -3
- package/dist/orm/index.js.map +4 -4
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/services/cron/ScheduleServiceProvider.d.ts.map +1 -1
- package/dist/services/discovery.d.ts +15 -0
- package/dist/services/discovery.d.ts.map +1 -1
- package/dist/services/index.d.ts +8 -1
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +11 -11
- package/dist/services/index.js.map +2 -2
- package/dist/support/Service.d.ts +90 -0
- package/dist/support/Service.d.ts.map +1 -0
- package/dist/support/discover.d.ts +9 -1
- package/dist/support/discover.d.ts.map +1 -1
- package/dist/support/index.d.ts +1 -0
- package/dist/support/index.d.ts.map +1 -1
- package/dist/support/index.js +2 -2
- package/dist/support/index.js.map +4 -3
- package/package.json +2 -1
- package/dist/chunk-45c8sqb7.js +0 -5
- package/dist/chunk-6fym5bfg.js +0 -23
- package/dist/chunk-6fym5bfg.js.map +0 -36
- package/dist/chunk-6x6gb7zg.js +0 -4
- package/dist/chunk-8gb1w19q.js +0 -5
- package/dist/chunk-bm6q0q1q.js +0 -7
- package/dist/chunk-g0w87jtw.js +0 -5
- package/dist/chunk-j4rkk01q.js +0 -5
- package/dist/chunk-j4rkk01q.js.map +0 -10
- package/dist/chunk-ygpzyxr6.js +0 -6
- /package/dist/{chunk-p0z35s59.js.map → chunk-8p6rqegw.js.map} +0 -0
- /package/dist/{chunk-5t2c9194.js.map → chunk-a0sy9f9x.js.map} +0 -0
- /package/dist/{chunk-53w1njqz.js.map → chunk-zhsaz9cr.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{ye as
|
|
2
|
+
import{Ja as re}from"./chunk-tztqkat2.js";import{Qe as _,Te as a}from"./chunk-0h3jr9d9.js";var I=_((b)=>{Object.defineProperty(b,"__esModule",{value:!0});b.getHomeDir=void 0;var W=a("os"),V=a("path"),x={},G=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},U=()=>{let{HOME:e,USERPROFILE:t,HOMEPATH:r,HOMEDRIVE:o=`C:${V.sep}`}=process.env;if(e)return e;if(t)return t;if(r)return`${o}${r}`;let i=G();if(!x[i])x[i]=(0,W.homedir)();return x[i]};b.getHomeDir=U});var P=_((j)=>{Object.defineProperty(j,"__esModule",{value:!0});j.getSSOTokenFilepath=void 0;var X=a("crypto"),B=a("path"),J=I(),z=(e)=>{let r=(0,X.createHash)("sha1").update(e).digest("hex");return(0,B.join)((0,J.getHomeDir)(),".aws","sso","cache",`${r}.json`)};j.getSSOTokenFilepath=z});var R=_((C)=>{Object.defineProperty(C,"__esModule",{value:!0});C.getSSOTokenFromFile=C.tokenIntercept=void 0;var Q=a("fs/promises"),Y=P();C.tokenIntercept={};var Z=async(e)=>{if(C.tokenIntercept[e])return C.tokenIntercept[e];let t=(0,Y.getSSOTokenFilepath)(e),r=await(0,Q.readFile)(t,"utf8");return JSON.parse(r)};C.getSSOTokenFromFile=Z});var k=_((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.readFile=L.fileIntercept=L.filePromises=void 0;var ee=a("fs/promises");L.filePromises={};L.fileIntercept={};var te=(e,t)=>{if(L.fileIntercept[e]!==void 0)return L.fileIntercept[e];if(!L.filePromises[e]||t?.ignoreCache)L.filePromises[e]=(0,ee.readFile)(e,"utf8");return L.filePromises[e]};L.readFile=te});var ye=_((c)=>{var l=I(),O=P(),y=R(),g=a("path"),S=re(),f=k(),q="AWS_PROFILE",$="default",oe=(e)=>e.profile||process.env[q]||$,p=".",ie=(e)=>Object.entries(e).filter(([t])=>{let r=t.indexOf(p);if(r===-1)return!1;return Object.values(S.IniSectionType).includes(t.substring(0,r))}).reduce((t,[r,o])=>{let i=r.indexOf(p),n=r.substring(0,i)===S.IniSectionType.PROFILE?r.substring(i+1):r;return t[n]=o,t},{...e.default&&{default:e.default}}),ne="AWS_CONFIG_FILE",M=()=>process.env[ne]||g.join(l.getHomeDir(),".aws","config"),se="AWS_SHARED_CREDENTIALS_FILE",ce=()=>process.env[se]||g.join(l.getHomeDir(),".aws","credentials"),ae=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,le=["__proto__","profile __proto__"],T=(e)=>{let t={},r,o;for(let i of e.split(/\r?\n/)){let n=i.split(/(^|\s)[;#]/)[0].trim();if(n[0]==="["&&n[n.length-1]==="]"){r=void 0,o=void 0;let s=n.substring(1,n.length-1),u=ae.exec(s);if(u){let[,d,,m]=u;if(Object.values(S.IniSectionType).includes(d))r=[d,m].join(p)}else r=s;if(le.includes(s))throw Error(`Found invalid profile name "${s}"`)}else if(r){let s=n.indexOf("=");if(![0,-1].includes(s)){let[u,d]=[n.substring(0,s).trim(),n.substring(s+1).trim()];if(d==="")o=u;else{if(o&&i.trimStart()===i)o=void 0;t[r]=t[r]||{};let m=o?[o,u].join(p):u;t[r][m]=d}}}}return t},A=()=>({}),K=async(e={})=>{let{filepath:t=ce(),configFilepath:r=M()}=e,o=l.getHomeDir(),i="~/",n=t;if(t.startsWith("~/"))n=g.join(o,t.slice(2));let h=r;if(r.startsWith("~/"))h=g.join(o,r.slice(2));let s=await Promise.all([f.readFile(h,{ignoreCache:e.ignoreCache}).then(T).then(ie).catch(A),f.readFile(n,{ignoreCache:e.ignoreCache}).then(T).catch(A)]);return{configFile:s[0],credentialsFile:s[1]}},pe=(e)=>Object.entries(e).filter(([t])=>t.startsWith(S.IniSectionType.SSO_SESSION+p)).reduce((t,[r,o])=>({...t,[r.substring(r.indexOf(p)+1)]:o}),{}),ue=()=>({}),fe=async(e={})=>f.readFile(e.configFilepath??M()).then(T).then(pe).catch(ue),de=(...e)=>{let t={};for(let r of e)for(let[o,i]of Object.entries(r))if(t[o]!==void 0)Object.assign(t[o],i);else t[o]=i;return t},_e=async(e)=>{let t=await K(e);return de(t.configFile,t.credentialsFile)},Fe={getFileRecord(){return f.fileIntercept},interceptFile(e,t){f.fileIntercept[e]=Promise.resolve(t)},getTokenRecord(){return y.tokenIntercept},interceptToken(e,t){y.tokenIntercept[e]=t}};c.getSSOTokenFromFile=y.getSSOTokenFromFile;c.readFile=f.readFile;c.CONFIG_PREFIX_SEPARATOR=p;c.DEFAULT_PROFILE=$;c.ENV_PROFILE=q;c.externalDataInterceptor=Fe;c.getProfileName=oe;c.loadSharedConfigFiles=K;c.loadSsoSessionData=fe;c.parseKnownFiles=_e;Object.prototype.hasOwnProperty.call(l,"__proto__")&&!Object.prototype.hasOwnProperty.call(c,"__proto__")&&Object.defineProperty(c,"__proto__",{enumerable:!0,value:l.__proto__});Object.keys(l).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(c,e))c[e]=l[e]});Object.prototype.hasOwnProperty.call(O,"__proto__")&&!Object.prototype.hasOwnProperty.call(c,"__proto__")&&Object.defineProperty(c,"__proto__",{enumerable:!0,value:O.__proto__});Object.keys(O).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(c,e))c[e]=O[e]})});
|
|
3
|
+
export{ye as Ia};
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=A2826CBD3EB9A71D64756E2164756E21
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
"'use strict';\n\nvar getHomeDir = require('./getHomeDir');\nvar getSSOTokenFilepath = require('./getSSOTokenFilepath');\nvar getSSOTokenFromFile = require('./getSSOTokenFromFile');\nvar path = require('path');\nvar types = require('@smithy/types');\nvar readFile = require('./readFile');\n\nconst ENV_PROFILE = \"AWS_PROFILE\";\nconst DEFAULT_PROFILE = \"default\";\nconst getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE;\n\nconst CONFIG_PREFIX_SEPARATOR = \".\";\n\nconst getConfigData = (data) => Object.entries(data)\n .filter(([key]) => {\n const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);\n if (indexOfSeparator === -1) {\n return false;\n }\n return Object.values(types.IniSectionType).includes(key.substring(0, indexOfSeparator));\n})\n .reduce((acc, [key, value]) => {\n const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);\n const updatedKey = key.substring(0, indexOfSeparator) === types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;\n acc[updatedKey] = value;\n return acc;\n}, {\n ...(data.default && { default: data.default }),\n});\n\nconst ENV_CONFIG_PATH = \"AWS_CONFIG_FILE\";\nconst getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path.join(getHomeDir.getHomeDir(), \".aws\", \"config\");\n\nconst ENV_CREDENTIALS_PATH = \"AWS_SHARED_CREDENTIALS_FILE\";\nconst getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path.join(getHomeDir.getHomeDir(), \".aws\", \"credentials\");\n\nconst prefixKeyRegex = /^([\\w-]+)\\s([\"'])?([\\w-@\\+\\.%:/]+)\\2$/;\nconst profileNameBlockList = [\"__proto__\", \"profile __proto__\"];\nconst parseIni = (iniData) => {\n const map = {};\n let currentSection;\n let currentSubSection;\n for (const iniLine of iniData.split(/\\r?\\n/)) {\n const trimmedLine = iniLine.split(/(^|\\s)[;#]/)[0].trim();\n const isSection = trimmedLine[0] === \"[\" && trimmedLine[trimmedLine.length - 1] === \"]\";\n if (isSection) {\n currentSection = undefined;\n currentSubSection = undefined;\n const sectionName = trimmedLine.substring(1, trimmedLine.length - 1);\n const matches = prefixKeyRegex.exec(sectionName);\n if (matches) {\n const [, prefix, , name] = matches;\n if (Object.values(types.IniSectionType).includes(prefix)) {\n currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR);\n }\n }\n else {\n currentSection = sectionName;\n }\n if (profileNameBlockList.includes(sectionName)) {\n throw new Error(`Found invalid profile name \"${sectionName}\"`);\n }\n }\n else if (currentSection) {\n const indexOfEqualsSign = trimmedLine.indexOf(\"=\");\n if (![0, -1].includes(indexOfEqualsSign)) {\n const [name, value] = [\n trimmedLine.substring(0, indexOfEqualsSign).trim(),\n trimmedLine.substring(indexOfEqualsSign + 1).trim(),\n ];\n if (value === \"\") {\n currentSubSection = name;\n }\n else {\n if (currentSubSection && iniLine.trimStart() === iniLine) {\n currentSubSection = undefined;\n }\n map[currentSection] = map[currentSection] || {};\n const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name;\n map[currentSection][key] = value;\n }\n }\n }\n }\n return map;\n};\n\nconst swallowError$1 = () => ({});\nconst loadSharedConfigFiles = async (init = {}) => {\n const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;\n const homeDir = getHomeDir.getHomeDir();\n const relativeHomeDirPrefix = \"~/\";\n let resolvedFilepath = filepath;\n if (filepath.startsWith(relativeHomeDirPrefix)) {\n resolvedFilepath = path.join(homeDir, filepath.slice(2));\n }\n let resolvedConfigFilepath = configFilepath;\n if (configFilepath.startsWith(relativeHomeDirPrefix)) {\n resolvedConfigFilepath = path.join(homeDir, configFilepath.slice(2));\n }\n const parsedFiles = await Promise.all([\n readFile.readFile(resolvedConfigFilepath, {\n ignoreCache: init.ignoreCache,\n })\n .then(parseIni)\n .then(getConfigData)\n .catch(swallowError$1),\n readFile.readFile(resolvedFilepath, {\n ignoreCache: init.ignoreCache,\n })\n .then(parseIni)\n .catch(swallowError$1),\n ]);\n return {\n configFile: parsedFiles[0],\n credentialsFile: parsedFiles[1],\n };\n};\n\nconst getSsoSessionData = (data) => Object.entries(data)\n .filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR))\n .reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {});\n\nconst swallowError = () => ({});\nconst loadSsoSessionData = async (init = {}) => readFile.readFile(init.configFilepath ?? getConfigFilepath())\n .then(parseIni)\n .then(getSsoSessionData)\n .catch(swallowError);\n\nconst mergeConfigFiles = (...files) => {\n const merged = {};\n for (const file of files) {\n for (const [key, values] of Object.entries(file)) {\n if (merged[key] !== undefined) {\n Object.assign(merged[key], values);\n }\n else {\n merged[key] = values;\n }\n }\n }\n return merged;\n};\n\nconst parseKnownFiles = async (init) => {\n const parsedFiles = await loadSharedConfigFiles(init);\n return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile);\n};\n\nconst externalDataInterceptor = {\n getFileRecord() {\n return readFile.fileIntercept;\n },\n interceptFile(path, contents) {\n readFile.fileIntercept[path] = Promise.resolve(contents);\n },\n getTokenRecord() {\n return getSSOTokenFromFile.tokenIntercept;\n },\n interceptToken(id, contents) {\n getSSOTokenFromFile.tokenIntercept[id] = contents;\n },\n};\n\nexports.getSSOTokenFromFile = getSSOTokenFromFile.getSSOTokenFromFile;\nexports.readFile = readFile.readFile;\nexports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR;\nexports.DEFAULT_PROFILE = DEFAULT_PROFILE;\nexports.ENV_PROFILE = ENV_PROFILE;\nexports.externalDataInterceptor = externalDataInterceptor;\nexports.getProfileName = getProfileName;\nexports.loadSharedConfigFiles = loadSharedConfigFiles;\nexports.loadSsoSessionData = loadSsoSessionData;\nexports.parseKnownFiles = parseKnownFiles;\nObject.prototype.hasOwnProperty.call(getHomeDir, '__proto__') &&\n !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n Object.defineProperty(exports, '__proto__', {\n enumerable: true,\n value: getHomeDir['__proto__']\n });\n\nObject.keys(getHomeDir).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = getHomeDir[k];\n});\nObject.prototype.hasOwnProperty.call(getSSOTokenFilepath, '__proto__') &&\n !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n Object.defineProperty(exports, '__proto__', {\n enumerable: true,\n value: getSSOTokenFilepath['__proto__']\n });\n\nObject.keys(getSSOTokenFilepath).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = getSSOTokenFilepath[k];\n});\n"
|
|
10
10
|
],
|
|
11
11
|
"mappings": ";+GACA,CAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,aAAkB,OAC1B,IAAM,UACA,YACA,EAAe,CAAC,EAChB,EAAqB,IAAM,CAC7B,GAAI,SAAW,QAAQ,QACnB,MAAO,GAAG,QAAQ,QAAQ,IAE9B,MAAO,WAEL,EAAa,IAAM,CACrB,IAAQ,OAAM,cAAa,WAAU,YAAY,KAAK,EAAO,OAAU,QAAQ,IAC/E,GAAI,EACA,OAAO,EACX,GAAI,EACA,OAAO,EACX,GAAI,EACA,MAAO,GAAG,IAAY,IAC1B,IAAM,EAAkB,EAAmB,EAC3C,GAAI,CAAC,EAAa,GACd,EAAa,IAAoB,EAAG,EAAK,SAAS,EACtD,OAAO,EAAa,IAEhB,aAAa,kBCxBrB,OAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,sBAA2B,OACnC,IAAM,cACA,YACA,MACA,EAAsB,CAAC,IAAO,CAEhC,IAAM,GADU,EAAG,EAAS,YAAY,MAAM,EACrB,OAAO,CAAE,EAAE,OAAO,KAAK,EAChD,OAAQ,EAAG,EAAO,OAAO,EAAG,EAAa,YAAY,EAAG,OAAQ,MAAO,QAAS,GAAG,QAAgB,GAE/F,sBAAsB,kBCV9B,OAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,sBAA8B,iBAAsB,OAC5D,IAAM,mBACA,MACE,iBAAiB,CAAC,EAC1B,IAAM,EAAsB,MAAO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
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Cb as W,Db as M,Eb as I}from"./chunk-ha7n1c94.js";import{Ce as E}from"./chunk-3y9nf09k.js";import{Me as C}from"./chunk-mt2755rs.js";function p(_){return _}function z(){return{jobs:[],jobsDir:"app/jobs",concurrency:1}}function R(){let _=process.env.APP_DIR,Q=process.env.ROOT_DIR,F=Bun.env.NODE_ENV==="production"?`${Q}/dist/server/bootstrap.mjs`:`${_}/bootstrap.ts`,V=new File([`
|
|
3
|
+
import { app } from "${F}"
|
|
4
|
+
self.onmessage = async (event) => {
|
|
5
|
+
const clone = app.clone()
|
|
6
|
+
let result = null;
|
|
7
|
+
let error = null;
|
|
8
|
+
try {
|
|
9
|
+
result = clone.dispatchJob(event.data.jobName, event.data.args)
|
|
10
|
+
} catch (err) {
|
|
11
|
+
error = err
|
|
12
|
+
}
|
|
13
|
+
clone.destroy()
|
|
14
|
+
if(error) {
|
|
15
|
+
self.postMessage({error});
|
|
16
|
+
} else {
|
|
17
|
+
self.postMessage({result});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
`],"worker.ts"),H=URL.createObjectURL(V);return new Worker(H)}async function x(_,Q){let F=R();return F.postMessage({jobName:_,args:Q}),await new Promise((V,H)=>{F.onmessage=(G)=>{let K=G.data;if("error"in K)H(K.error);else V(K.result)}})}class O{static token="queue";queue=new Set;activeRunningJobsCount=0;isRunning=!1;jobs={};config;constructor(_={}){this.config=E(z(),_),this.useJobs(this.config.jobs)}useJobs(_){this.config.jobs=_,this.jobs={};for(let Q of _){if(this.jobs[Q.name]){console.error(`Two queued jobs are named "${Q.name}" \u2014 the first is registered `+"and this one is not, so dispatching either would have run one of them. A class name is the queue's key, so only one job can hold it. Rename one.");continue}this.jobs[Q.name]=Q}}get registeredJobs(){return[...this.config.jobs]}dispatchJob(_,Q){if(this.jobs[_])return new this.jobs[_]().run(JSON.parse(Q))}async next(){if(!this.isRunning)this.isRunning=!0;if(this.activeRunningJobsCount>=this.config.concurrency)return await new Promise((Q)=>setTimeout(Q,1000)),this.next();let _=this.queue.values().next().value;if(_)if(this.queue.delete(_),this.jobs[_.class])this.run(_);else console.error(`Dropped a queued job: nothing is registered under the name "${_.class}". If the class exists, it was not `+"discovered \u2014 check that it is under the queue slice's jobsDir "+"(app/jobs by default), or list it in app/config/queue.ts.");if(this.queue.size===0){this.isRunning=!1;return}await this.next()}async run(_){let Q=this.jobs[_.class],F=new Q,V=JSON.parse(_.args);this.activeRunningJobsCount++;try{let H=await(F.worker?x(_.class,_.args):F.run(...V));F.onSuccess(H,...V)}catch(H){if(F.onFail(H,...V),_.retries>=F.maxAttempts-1)F.onDeadletter(H,...V);else this.push(Q,_.args,_.retries+1)}this.activeRunningJobsCount--}push(_,Q,F=0){if(this.queue.add({class:_.name,args:Q,createdAt:Date.now(),retries:F}),!this.isRunning)this.next()}}class k extends Error{code;constructor(_,Q=1){super(_);this.code=Q;this.name="CommandFailed"}}class ${static commandName="unset";static description="";static args=[];static options=[];run(_){}}function h(_){return _}function U(){return{commands:[],commandsDir:"app/commands"}}var P=Symbol.for("gemi.console.builder");function D(_){if(_.trim()==="")throw Error("A command name cannot be empty.");if(/[{}]/.test(_)||/\s/.test(_))throw Error(`Invalid command name ${JSON.stringify(_)}. gemi does not parse a signature string; the name is the whole of it. Declare arguments with .arg() and flags with .option():
|
|
21
|
+
|
|
22
|
+
defineCommand("mail:send")
|
|
23
|
+
.arg("user", { required: true })
|
|
24
|
+
.option("queue", { type: "boolean" })
|
|
25
|
+
.handle(async ({ args, options }) => { ... })`)}function l(_){D(_);let Q=[],F=[],V="",H={[P]:_,describe(G){return V=G,H},arg(G,K={}){if(K.required&&K.default!==void 0)throw Error(`Argument "${G}" of command "${_}" is both required and has a default. An argument that is supplied when absent cannot also be `+"absent \u2014 drop one.");if(K.variadic&&K.default!==void 0)throw Error(`Argument "${G}" of command "${_}" is variadic and has a default. A variadic argument collects the remaining values and is an empty list when there are none, so the default could never `+"apply \u2014 drop it, or drop `variadic`.");let Y=Q.find((X)=>X.variadic);if(Y)throw Error(`Argument "${G}" of command "${_}" is declared after the variadic argument "${Y.name}", which collects everything that follows, so "${G}" could never receive a value. A variadic argument must be declared last.`);if(Q.some((X)=>X.name===G))throw Error(`Command "${_}" declares the argument "${G}" twice.`);return Q.push({...K,name:G}),H},option(G,K){if(F.some((Z)=>Z.name===G))throw Error(`Command "${_}" declares the option "${G}" twice.`);let Y="alias"in K?K.alias:void 0,X=Y===void 0?void 0:F.find((Z)=>("alias"in Z)&&Z.alias===Y);if(X)throw Error(`Options "${X.name}" and "${G}" of command "${_}" both use the alias "-${Y}".`);return F.push({...K,name:G}),H},handle(G){let K=_,Y=V,X=class extends ${static commandName=K;static description=Y;static args=[...Q];static options=[...F];run(Z){return G(Z)}};return delete H[P],Object.defineProperty(X,"name",{value:K,configurable:!0}),X}};return H}function T(_){return typeof _==="object"&&_!==null&&typeof _[P]==="string"}class q{name;cron;shouldRun(){return!0}callback(){}onTick(){}onComplete(){}static exp(_){return _}}function i(_){return _}function B(){return{jobs:[],jobsDir:"app/cron"}}class J{static name="unset";worker=!1;maxAttempts=3;run(..._){}onFail(_,...Q){}onSuccess(_,...Q){}onDeadletter(_,...Q){}static dispatch(..._){if(this.name==="unset")throw Error("Cannot dispatch a job with no name");C(O).push(this,JSON.stringify(_))}}import{existsSync as A}from"fs";import{dirname as y,isAbsolute as N,join as v}from"path";function L(_){return N(_)?_:v(I(),_)}function S(_,Q,F){if(A(_)||A(y(_)))return;console.warn(`No ${Q} were discovered: neither ${_} nor the directory above it exists, so this process cannot see the application's source. If this is a deploy that ships only the build output, list the classes explicitly in app/config/${F}.ts so they travel with it.`)}async function $_(_=z().jobsDir){let Q=L(_);S(Q,"queue jobs","queue");let F=await M(Q,J);return w(F),F}function w(_){for(let Q of _){if(Object.getOwnPropertyDescriptor(Q,"name")?.writable)continue;console.warn(`Queued job ${Q.name} does not declare \`static name\`, so it is registered under its class name. A production build minifies the class that dispatches it and renames it, while discovery reads this `+"file from source and does not \u2014 so the dispatch would be dropped in "+`production and nowhere else. Add: static name = "${Q.name}";`)}}async function z_(_=B().jobsDir){let Q=L(_);return S(Q,"cron jobs","schedule"),await M(Q,q)}async function M_(_=U().commandsDir){let Q=L(_);S(Q,"commands","command");let F=[],V=await M(Q,$,[],(H,G)=>{if(T(H))F.push(G)});return j(F),V}function j(_){if(_.length===0)return;let Q=_.length===1?`${_[0]} exports a command builder that never called \`.handle()\``:`${_.length} files export a command builder that never called \`.handle()\`:
|
|
26
|
+
${_.join(`
|
|
27
|
+
`)}`;throw new W(`${Q}, so there is no command to run. \`.handle()\` is what turns `+`the chain into a command \u2014 finish it:
|
|
28
|
+
|
|
29
|
+
`+` export default defineCommand("my-command")
|
|
30
|
+
.handle(async ({ line }) => { line("hello") })`)}
|
|
31
|
+
export{p as kb,z as lb,O as mb,k as nb,$ as ob,h as pb,U as qb,l as rb,q as sb,i as tb,B as ub,J as vb,$_ as wb,z_ as xb,M_ as yb};
|
|
32
|
+
|
|
33
|
+
//# debugId=D1A465A9DBBC085B64756E2164756E21
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../services/queue/config.ts", "../services/queue/QueueManager.ts", "../console/Command.ts", "../console/config.ts", "../console/builder.ts", "../services/cron/CronJob.ts", "../services/cron/config.ts", "../services/queue/Job.ts", "../services/discovery.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import type { Job } from \"./Job\";\n\n// Config key: `queue`. Derived from `QueueServiceProvider`.\nexport interface QueueConfig {\n /**\n * The `Job` subclasses this application dispatches, or nothing.\n *\n * ### Why \"or nothing\" is the point\n *\n * A dispatch that names a job the `QueueManager` has never heard of does not\n * fail — `next()` looks the name up in this list, and what is not there is\n * dropped with a line on stderr and nothing else. `Job.dispatch` has already\n * returned by then, so nothing upstream can be told. The list is therefore a\n * second spelling of `app/jobs`, kept in step by hand, and the cost of the\n * two disagreeing is paid by whatever was supposed to happen after the\n * dispatch.\n *\n * Leaving this out spells it once: the jobs are the classes under `jobsDir`.\n *\n * ### The rule, exactly\n *\n * **Declared wins, and `[]` is declared.** A `jobs` that is present is used\n * verbatim and no directory is read — that is the escape hatch for an app\n * whose jobs live somewhere this cannot walk, for one that deliberately\n * registers a subset, and for a deploy that ships no source. An empty array\n * means an app with no jobs and says so; it does not mean \"find some\".\n *\n * **Absent or `undefined` discovers.** `undefined` counts as absent for the\n * same reason `withDefaults` treats it that way everywhere else: a key spread\n * in from an optional value is an omission, not an instruction.\n */\n jobs?: Array<new () => Job>;\n\n /**\n * Where to look when `jobs` was not declared. Relative to the project root,\n * or absolute.\n *\n * Every `.ts`/`.tsx` file underneath it is imported at boot and every exported\n * class extending `Job` is registered, so this wants to be a directory of job\n * declarations rather than a directory that merely contains some. Moving the\n * jobs is what this field is for; pointing it at `app/` is not.\n */\n jobsDir?: string;\n\n concurrency?: number;\n}\n\nexport function defineQueueConfig(config: QueueConfig): QueueConfig {\n return config;\n}\n\nexport function queueConfigDefaults(): Required<QueueConfig> {\n return {\n jobs: [],\n jobsDir: \"app/jobs\",\n concurrency: 1,\n };\n}\n",
|
|
6
|
+
"import { Job } from \"./Job\";\nimport { queueConfigDefaults, type QueueConfig } from \"./config\";\nimport { withDefaults } from \"../../support/withDefaults\";\n\nfunction createWorker() {\n const APP_DIR = process.env.APP_DIR;\n const ROOT_DIR = process.env.ROOT_DIR;\n\n const appPath =\n process.env.NODE_ENV === \"production\"\n ? `${ROOT_DIR}/dist/server/bootstrap.mjs`\n : `${APP_DIR}/bootstrap.ts`;\n\n const file = new File(\n [\n `\n import { app } from \"${appPath}\"\n self.onmessage = async (event) => {\n const clone = app.clone()\n let result = null;\n let error = null;\n try {\n result = clone.dispatchJob(event.data.jobName, event.data.args)\n } catch (err) {\n error = err\n }\n clone.destroy()\n if(error) {\n self.postMessage({error});\n } else {\n self.postMessage({result});\n }\n };\n `,\n ],\n \"worker.ts\",\n );\n const url = URL.createObjectURL(file);\n return new Worker(url);\n}\n\n// TODO: terminate worker after the job is done\nasync function runInWorker(jobName: string, args: string) {\n const worker = createWorker();\n worker.postMessage({ jobName, args });\n return await new Promise((resolve, reject) => {\n worker.onmessage = (e) => {\n const data = e.data;\n if (\"error\" in data) {\n reject(data.error);\n } else {\n resolve(data.result);\n }\n };\n });\n}\n\ntype JobDefinition = {\n class: string;\n args: string;\n createdAt: number;\n retries: number;\n};\n\nexport class QueueManager {\n static token = \"queue\";\n\n queue: Set<JobDefinition> = new Set();\n activeRunningJobsCount = 0;\n isRunning = false;\n jobs: Record<string, new () => Job> = {};\n\n readonly config: Required<QueueConfig>;\n\n constructor(config: QueueConfig = {}) {\n this.config = withDefaults(queueConfigDefaults(), config);\n this.useJobs(this.config.jobs);\n }\n\n /**\n * Replaces the registered set, for the provider to hand over what it found\n * under `app/jobs`.\n *\n * This exists because the two phases disagree about when the answer is\n * knowable. The manager is constructed in `register()`, which is synchronous\n * and must resolve nothing; reading a directory and importing what is in it is\n * neither. So the manager is built from whatever the config slice declared —\n * nothing, when the app left `jobs` out — and the discovered set arrives in\n * `boot()`.\n *\n * The consequence worth knowing: anything that constructs an application and\n * skips phase two sees an empty registry, and every dispatch against an empty\n * registry is dropped — loudly on stderr, but after `Job.dispatch` has already\n * returned, so no caller finds out. An app that lists its jobs explicitly is\n * unaffected, because that list is already in place by the end of `register()`.\n */\n useJobs(jobs: Array<new () => Job>) {\n this.config.jobs = jobs;\n\n // Built one at a time rather than by `Object.fromEntries`, which resolves a\n // repeated key by keeping the last and saying nothing.\n //\n // Two classes with one name is the worst failure in this subsystem, and it\n // is worse than the dropped dispatch the rest of this file is about: the\n // registry is keyed by class name, a dispatch carries a class name, so\n // `SendEmail.dispatch(...)` on the one under `app/jobs/auth` would run the\n // body of the one under `app/jobs/billing`. Nothing is dropped and nothing\n // errors — the wrong work happens and reports success.\n //\n // Discovery is what makes it ordinary. A hand-written list forces an import\n // alias in one visible file the moment two names clash; a directory walk\n // does not, and `auth/SendEmail.ts` beside `billing/SendEmail.ts` is a\n // perfectly natural thing to write. So the first claim wins and the second\n // is refused out loud — the same rule `Scheduler.start` applies to a cron\n // name, and the reverse of the silent last-wins this replaces.\n this.jobs = {};\n for (const job of jobs) {\n const taken = this.jobs[job.name];\n if (taken) {\n console.error(\n `Two queued jobs are named \"${job.name}\" — the first is registered ` +\n `and this one is not, so dispatching either would have run one of ` +\n `them. A class name is the queue's key, so only one job can hold ` +\n `it. Rename one.`,\n );\n continue;\n }\n this.jobs[job.name] = job;\n }\n }\n\n /**\n * What the manager was handed, discovered or declared.\n *\n * The registry is keyed by name, and a name is exactly what a dispatch\n * carries, so \"is this job registered?\" is a question with a silent wrong\n * answer — `next()` drops an unknown name long after the caller moved on.\n * This is where a test asks it out loud.\n *\n * It reports what came in, not what the registry accepted, so a name claimed\n * twice appears twice here — deliberately, the same way `Scheduler.jobs`\n * does. A test walking this should see the collision rather than have it\n * tidied away. A copy, so that walk cannot edit the registry underneath it.\n */\n get registeredJobs(): ReadonlyArray<new () => Job> {\n return [...this.config.jobs];\n }\n\n dispatchJob(jobName: string, args: string) {\n if (this.jobs[jobName]) {\n const job = new this.jobs[jobName]();\n return job.run(JSON.parse(args));\n }\n }\n\n async next() {\n if (!this.isRunning) {\n this.isRunning = true;\n }\n\n if (this.activeRunningJobsCount >= this.config.concurrency) {\n await new Promise((resolve) => setTimeout(resolve, 1000));\n return this.next();\n }\n\n const jobDefinition = this.queue.values().next().value as\n | JobDefinition\n | undefined;\n\n if (jobDefinition) {\n // Taken off the queue before anything decides what to do with it. The\n // delete used to live inside the `if` below, so a name the registry could\n // not resolve left the head in place, the `size === 0` check below was\n // never reached, and `next()` recursed on the same entry until the stack\n // gave out. An unregistered dispatch is meant to be a dropped job, not a\n // crash — and discovery makes an empty registry newly reachable (a deploy\n // that ships no source finds nothing to register), so the difference\n // stopped being theoretical.\n this.queue.delete(jobDefinition);\n\n if (this.jobs[jobDefinition.class]) {\n this.run(jobDefinition);\n } else {\n // The one place this is observable. A dispatch carries a name, the\n // registry is keyed by name, and a name nobody registered matches\n // nothing — which is exactly the silence #322 is about, except here it\n // has already happened and the work is gone. Saying so is all that is\n // left to do about it.\n console.error(\n `Dropped a queued job: nothing is registered under the name ` +\n `\"${jobDefinition.class}\". If the class exists, it was not ` +\n `discovered — check that it is under the queue slice's jobsDir ` +\n `(app/jobs by default), or list it in app/config/queue.ts.`,\n );\n }\n }\n\n if (this.queue.size === 0) {\n this.isRunning = false;\n return;\n }\n\n await this.next();\n }\n\n private async run(jobDefinition: JobDefinition) {\n const Job = this.jobs[jobDefinition.class];\n const jobInstance = new Job();\n const args: any[] = JSON.parse(jobDefinition.args);\n\n this.activeRunningJobsCount++;\n\n try {\n const result = await (jobInstance.worker\n ? runInWorker(jobDefinition.class, jobDefinition.args)\n : jobInstance.run(...args));\n\n jobInstance.onSuccess(result, ...args);\n } catch (err) {\n jobInstance.onFail(err, ...args);\n if (jobDefinition.retries >= jobInstance.maxAttempts - 1) {\n jobInstance.onDeadletter(err, ...args);\n } else {\n this.push(Job, jobDefinition.args, jobDefinition.retries + 1);\n }\n }\n\n this.activeRunningJobsCount--;\n }\n\n push(job: new () => Job, args: string, retries = 0) {\n this.queue.add({\n class: job.name,\n args,\n createdAt: Date.now(),\n retries,\n });\n if (!this.isRunning) {\n this.next();\n }\n }\n}\n",
|
|
7
|
+
"/**\n * A command an operator runs by hand: `gemi run backfill-avatars --dry-run`.\n *\n * This file is the *runtime* shape — the base class discovery walks the\n * prototype chain for, and the statics the runner reads. It is not the\n * authoring surface. Applications write commands with `defineCommand` in\n * `./builder`, which produces one of these; see that file for why the authoring\n * surface is a builder and not a class body.\n *\n * ### Why the schema is descriptors and not a signature string\n *\n * Laravel spells this `protected $signature = 'mail:send {user} {--queue}'`, and\n * the string is the whole schema. It reads beautifully and TypeScript cannot see\n * a word of it: a brace in the wrong place is a parse error the first time\n * somebody runs the command, months after it was written, and the parser is a\n * piece of framework surface with its own failure modes. The descriptors below\n * say the same thing in a shape the compiler checks — and, through the builder,\n * in a shape that types the handler's own body.\n *\n * ### Why the name is declared and never falls back to the class name\n *\n * `Job` keys off `static name`, which shadows `Function.name`. That is the right\n * trade there: a job's name *is* its class name, and the shadow is what makes it\n * a string literal that survives minification. Here it is the wrong one twice\n * over. A command's name is a CLI token (`backfill-avatars`, `db:seed`) with no\n * relationship to the class name, so an implicit fallback would only ever be\n * wrong; and shadowing `Function.name` costs the one error anybody will actually\n * hit — \"two commands claim `db:seed`\" — the ability to say *which two*.\n *\n * ### The minification hazard does not reach here\n *\n * `services/discovery.ts` warns about a job that never declared `static name`,\n * because two halves have to agree on one string across a bundler: the\n * dispatcher, minified into `dist/server/server.mjs`, and discovery, reading the\n * source. A command has one half — a human types the name and it is matched\n * against discovery-on-source. Nothing in the server bundle names a command, and\n * `gemi build` keeps `app/commands` out of the bundle anyway. So there is no\n * `warnIfNameWillNotSurviveTheBuild` equivalent below, and adding one by analogy\n * would be noise.\n *\n * If a `Command.call(\"db:seed\")` reachable from a controller is ever added, that\n * changes — and `commandName` being a declared string literal already covers it,\n * which is one more reason not to fall back to the class binding.\n */\n\n/** A positional argument. `variadic` collects the rest and must come last. */\nexport interface ArgSpec {\n description?: string;\n /**\n * Missing it is a usage error rather than an `undefined` in the handler.\n * Mutually exclusive with `default` — an argument that is supplied when absent\n * cannot also be absent, and declaring both is refused rather than silently\n * resolved in one direction.\n */\n required?: boolean;\n /** Collects every remaining positional. Only legal on the last argument. */\n variadic?: boolean;\n /** Supplied when the argument is absent, which makes it always present. */\n default?: string;\n}\n\n/**\n * A flag. The `type` decides both how the value is parsed and what the handler\n * sees, which is why it is required rather than defaulted to `string`: a\n * `--dry-run` declared without a type would arrive as the string `\"\"`, and every\n * `if (options.dryRun)` over it would be wrong in the one direction nobody\n * tests.\n */\nexport type OptionSpec =\n | {\n type: \"boolean\";\n description?: string;\n /** Single character, without the dash. */\n alias?: string;\n default?: boolean;\n }\n | {\n type: \"string\";\n description?: string;\n alias?: string;\n default?: string;\n required?: boolean;\n }\n | {\n type: \"number\";\n description?: string;\n alias?: string;\n default?: number;\n required?: boolean;\n };\n\n/** An argument as stored on the class: the spec, plus the name it was given. */\nexport type CommandArgument = ArgSpec & { name: string };\n\n/** An option as stored on the class: the spec, plus the name it was given. */\nexport type CommandOption = OptionSpec & { name: string };\n\n/** What a handler may return. `void` and `0` mean the same thing. */\nexport type CommandResult = Promise<number | void> | number | void;\n\n/**\n * A command that failed on purpose.\n *\n * The distinction `bin/check-models.ts` draws between `CheckModelsError` and\n * everything else, in the one place an application can reach it: this is a\n * sentence written for the terminal and is printed without a stack, while\n * anything else that escapes a handler is a bug and keeps its stack.\n */\nexport class CommandFailed extends Error {\n constructor(\n message: string,\n readonly code: number = 1,\n ) {\n super(message);\n this.name = \"CommandFailed\";\n }\n}\n\n/**\n * The base class. Discovery finds subclasses of this; the runner reads the\n * statics and calls `run`.\n *\n * Subclassing it by hand works and is what `defineCommand` does under the hood,\n * but it gives up the typing that is the whole point of the builder — `run`'s\n * parameter cannot be inferred from statics declared on the subclass, because\n * TypeScript does not contextually type an overriding method's parameters. Write\n * commands with `defineCommand`.\n */\nexport class Command {\n /**\n * The name typed on the command line. Mandatory: there is no sensible default\n * and the class name is not one.\n */\n static commandName = \"unset\";\n\n /** One line, printed by `gemi run` with no name and at the top of `--help`. */\n static description = \"\";\n\n /** Positional arguments, in order. A variadic one must be last. */\n static args: CommandArgument[] = [];\n\n /** Flags. Declared in camelCase; `dryRun` is spelled `--dry-run` on the CLI. */\n static options: CommandOption[] = [];\n\n /**\n * The body.\n *\n * Runs inside `kernel.run()`, so `app(MailManager)` and a model read resolve\n * exactly as they do in a request handler. Resolve services *here* rather than\n * at module load: a command file is imported by discovery before the container\n * has finished booting, and a service captured at the top of the file is\n * captured from a container that is not ready.\n */\n run(_ctx: any): CommandResult {}\n}\n\n/** The type of a class `defineCommand(...).handle(...)` produces. */\nexport type CommandClass = typeof Command;\n",
|
|
8
|
+
"import type { CommandClass } from \"./Command\";\n\n// Config key: `command`. Consumed by `gemi run`, and by nothing at boot.\n//\n// Named `command` rather than `console` on purpose. An app declares its slices\n// by importing them into `app/kernel/Kernel.ts`, and a file called\n// `app/config/console.ts` arrives there as `import console from\n// \"../config/console\"` — which shadows the global `console` for the rest of that\n// module. Every application would inherit that, silently. `command` also matches\n// the singular slice names already in use: `route`, `queue`, `schedule`, `log`.\nexport interface CommandConfig {\n /**\n * The `Command` classes this application can run, or nothing.\n *\n * ### The rule, exactly\n *\n * **Declared wins, and `[]` is declared.** A `commands` that is present is\n * used verbatim and no directory is read — the escape hatch for an app whose\n * commands live somewhere the walk cannot reach, and for a deploy that ships\n * no source. An empty array means an app with no commands and says so; it does\n * not mean \"find some\".\n *\n * **Absent or `undefined` discovers.** `undefined` counts as absent for the\n * same reason `withDefaults` treats it that way everywhere else: a key spread\n * in from an optional value is an omission, not an instruction.\n *\n * ### One way this differs from `queue` and `schedule`\n *\n * There, the cost of the list and the directory disagreeing is silence — a\n * dispatch dropped with a line on stderr nobody reads, a report that stops\n * arriving. Here it is a person typing `gemi run thing` and being told, in\n * those words, that there is no command called `thing`. The rule is kept for\n * consistency and for the source-less-deploy case, not because the stakes are\n * the same.\n */\n commands?: CommandClass[];\n\n /**\n * Where to look when `commands` was not declared. Relative to the project\n * root, or absolute.\n *\n * Every `.ts`/`.tsx` file underneath is imported when a command is run, so\n * this wants to be a directory of command declarations rather than a directory\n * that merely contains some.\n */\n commandsDir?: string;\n}\n\nexport function defineCommandConfig(config: CommandConfig): CommandConfig {\n return config;\n}\n\nexport function commandConfigDefaults(): Required<CommandConfig> {\n return {\n commands: [],\n commandsDir: \"app/commands\",\n };\n}\n",
|
|
9
|
+
"import {\n Command,\n type ArgSpec,\n type CommandArgument,\n type CommandClass,\n type CommandOption,\n type CommandResult,\n type OptionSpec,\n} from \"./Command\";\nimport type { CommandContext } from \"./context\";\n\n/**\n * Declaring a command, in the one shape that can type its own body.\n *\n * ### Why a builder and not a class\n *\n * The point of declaring arguments and options at all is that the handler then\n * knows what it has. A class body cannot deliver that, and the reason is a hard\n * TypeScript rule rather than a matter of arrangement: **TypeScript does not\n * contextually type a method's parameters from the base-class method it\n * overrides.** So both class-shaped designs fail in the same place:\n *\n * ```ts\n * class Backfill extends Command {\n * static args = [{ name: \"since\", required: true }];\n * async run(ctx) {} // implicit any\n * }\n *\n * class Backfill extends Command.define({ since: { required: true } }) {\n * async run(ctx) {} // still implicit any — the\n * } // configured base's signature does\n * // not flow into the override\n * ```\n *\n * The author's only way out is to restate the type by hand, which is the\n * ceremony the descriptors existed to remove — and which nothing enforces, so a\n * wrong restatement compiles.\n *\n * A **function expression passed as an argument is contextually typed**. That is\n * the entire mechanism here, and it is why this is a builder rather than sugar:\n * `.handle(fn)` carries the accumulated argument and option types into `fn`'s\n * parameter with nothing written by hand and nothing to keep in step.\n *\n * ### What it produces\n *\n * A `Command` subclass, so nothing downstream knows the difference: discovery\n * finds it by prototype chain, and the registry, parser and `--help` read the\n * same statics they would read off a hand-written class. The builder is an\n * authoring surface over one runtime shape, not a second mechanism.\n */\n\n/**\n * Marks a builder that was never finished. `discoverCommands` looks for this on\n * the exports it is about to discard — see the note on `handle` below.\n */\nexport const BUILDER_BRAND: unique symbol = Symbol.for(\"gemi.console.builder\");\n\n/** Flattens an accumulated intersection so editor hovers stay readable. */\ntype Simplify<T> = { [K in keyof T]: T[K] } & {};\n\n/**\n * What the handler sees for one argument.\n *\n * The order matters: `variadic` first because it wins over everything, then the\n * two ways an argument is guaranteed present. Anything else can be absent and\n * says so.\n */\nexport type ArgValue<S> = S extends { variadic: true }\n ? string[]\n : S extends { required: true }\n ? string\n : S extends { default: string }\n ? string\n : string | undefined;\n\n/** What the handler sees for one option. */\nexport type OptionValue<S> = S extends { type: \"boolean\" }\n ? boolean\n : S extends { type: \"number\" }\n ? S extends { default: number }\n ? number\n : S extends { required: true }\n ? number\n : number | undefined\n : S extends { default: string }\n ? string\n : S extends { required: true }\n ? string\n : string | undefined;\n\nexport interface CommandBuilder<\n A extends Record<string, unknown>,\n O extends Record<string, unknown>,\n> {\n /** One line, shown in the listing and at the top of `--help`. */\n describe(text: string): CommandBuilder<A, O>;\n\n /**\n * A positional argument. Declared in the order it is read from the command\n * line; a `variadic` one must be last.\n */\n arg<N extends string, const S extends ArgSpec = {}>(\n name: N,\n spec?: S,\n ): CommandBuilder<A & { [K in N]: ArgValue<S> }, O>;\n\n /**\n * A flag. Declared in camelCase and spelled in kebab-case on the command line,\n * so `.option(\"dryRun\", …)` is `--dry-run` for the operator and\n * `options.dryRun` in the handler — no string key nobody can autocomplete, and\n * no CLI flag with a capital letter in it.\n */\n option<N extends string, const S extends OptionSpec>(\n name: N,\n spec: S,\n ): CommandBuilder<A, O & { [K in N]: OptionValue<S> }>;\n\n /**\n * The body, and the terminal of the chain.\n *\n * A builder that never reaches here is not a class, so discovery would skip it\n * and the command would simply vanish from `gemi run` with nothing raised —\n * the silence #322 and #323 exist to remove, reintroduced by a new authoring\n * surface. `discoverCommands` therefore looks for `BUILDER_BRAND` among the\n * exports it discards and refuses the file by name.\n */\n handle(\n fn: (ctx: CommandContext<Simplify<A>, Simplify<O>>) => CommandResult,\n ): CommandClass;\n}\n\n/**\n * Refused early, where the author is looking.\n *\n * The whitespace and brace checks are aimed at one specific reader: somebody who\n * knows Laravel and reaches for `defineCommand(\"mail:send {user} {--queue}\")`.\n * Without this they get a command registered under a name containing a space,\n * which can never be typed and never runs, and no explanation.\n */\nfunction assertUsableName(name: string): void {\n if (name.trim() === \"\") {\n throw new Error(\"A command name cannot be empty.\");\n }\n\n if (/[{}]/.test(name) || /\\s/.test(name)) {\n throw new Error(\n `Invalid command name ${JSON.stringify(name)}. gemi does not parse a ` +\n `signature string; the name is the whole of it. Declare arguments ` +\n `with .arg() and flags with .option():\\n\\n` +\n ` defineCommand(\"mail:send\")\\n` +\n ` .arg(\"user\", { required: true })\\n` +\n ` .option(\"queue\", { type: \"boolean\" })\\n` +\n ` .handle(async ({ args, options }) => { ... })`,\n );\n }\n}\n\nexport function defineCommand(name: string): CommandBuilder<{}, {}> {\n assertUsableName(name);\n\n const args: CommandArgument[] = [];\n const options: CommandOption[] = [];\n let description = \"\";\n\n const builder = {\n [BUILDER_BRAND]: name,\n\n describe(text: string) {\n description = text;\n return builder;\n },\n\n arg(argName: string, spec: ArgSpec = {}) {\n // Checked here rather than at parse time because both of these are\n // mistakes in the declaration, and the declaration is what the author is\n // looking at right now. At parse time they would surface as a confusing\n // usage error in front of an operator who cannot fix them.\n if (spec.required && spec.default !== undefined) {\n throw new Error(\n `Argument \"${argName}\" of command \"${name}\" is both required and has ` +\n `a default. An argument that is supplied when absent cannot also be ` +\n `absent — drop one.`,\n );\n }\n\n // A variadic collects whatever is left, so there is no \"absent\" for a\n // default to fill — the empty list is the answer. Refused rather than\n // ignored, for the same reason as the pair above: a declaration the parser\n // silently drops reads, to whoever wrote it, exactly like one it honours.\n if (spec.variadic && spec.default !== undefined) {\n throw new Error(\n `Argument \"${argName}\" of command \"${name}\" is variadic and has a ` +\n `default. A variadic argument collects the remaining values and is ` +\n `an empty list when there are none, so the default could never ` +\n `apply — drop it, or drop \\`variadic\\`.`,\n );\n }\n\n const variadic = args.find((existing) => existing.variadic);\n if (variadic) {\n throw new Error(\n `Argument \"${argName}\" of command \"${name}\" is declared after the ` +\n `variadic argument \"${variadic.name}\", which collects everything ` +\n `that follows, so \"${argName}\" could never receive a value. A ` +\n `variadic argument must be declared last.`,\n );\n }\n\n if (args.some((existing) => existing.name === argName)) {\n throw new Error(\n `Command \"${name}\" declares the argument \"${argName}\" twice.`,\n );\n }\n\n args.push({ ...spec, name: argName });\n return builder;\n },\n\n option(optionName: string, spec: OptionSpec) {\n if (options.some((existing) => existing.name === optionName)) {\n throw new Error(\n `Command \"${name}\" declares the option \"${optionName}\" twice.`,\n );\n }\n\n const alias = \"alias\" in spec ? spec.alias : undefined;\n const clash =\n alias === undefined\n ? undefined\n : options.find(\n (existing) => \"alias\" in existing && existing.alias === alias,\n );\n if (clash) {\n throw new Error(\n `Options \"${clash.name}\" and \"${optionName}\" of command \"${name}\" ` +\n `both use the alias \"-${alias}\".`,\n );\n }\n\n options.push({ ...spec, name: optionName });\n return builder;\n },\n\n handle(fn: (ctx: any) => CommandResult) {\n const commandName = name;\n const commandDescription = description;\n\n const cls = class extends Command {\n static commandName = commandName;\n static description = commandDescription;\n // Copied, not aliased. The builder goes on owning `args`/`options` and\n // mutating them on every subsequent `.arg()`/`.option()`, so storing the\n // instances themselves let a chain reach back into a class it had\n // already produced — and `--help` and the parser both read these\n // statics, so the printed usage and the accepted arguments would change\n // under a command that was finished.\n static args = [...args];\n static options = [...options];\n\n run(ctx: any) {\n return fn(ctx);\n }\n };\n\n // This chain produced a command, so it is no longer unfinished. The brand\n // exists to catch a file that exports a builder and never calls `.handle()`\n // — see `refuseUnfinishedBuilders` in `services/discovery.ts`. Leaving it\n // set meant the natural way to share declarations,\n //\n // export const base = defineCommand(\"reindex\").option(\"verbose\", ...);\n // export default base.handle(async () => {});\n //\n // left a branded object among the file's exports and aborted the whole of\n // `gemi run` — every command in the project unrunnable, under a message\n // that was untrue for that file.\n delete (builder as Record<PropertyKey, unknown>)[BUILDER_BRAND];\n\n // An anonymous class expression reports `name === \"\"`, and the duplicate-\n // name error's whole job is to say *which two*. Give it the one name it\n // has.\n Object.defineProperty(cls, \"name\", {\n value: commandName,\n configurable: true,\n });\n\n return cls;\n },\n };\n\n return builder as unknown as CommandBuilder<{}, {}>;\n}\n\n/** True for a builder that never called `.handle()`. */\nexport function isUnfinishedBuilder(\n value: unknown,\n): value is { [BUILDER_BRAND]: string } {\n return (\n typeof value === \"object\" &&\n value !== null &&\n typeof (value as Record<PropertyKey, unknown>)[BUILDER_BRAND] === \"string\"\n );\n}\n",
|
|
10
|
+
"// A cron expression accepted by `Bun.cron`: a 5-field expression\n// (`minute hour day-of-month month day-of-week`, interpreted in UTC) or one of\n// the nicknames below. The `string & {}` member keeps arbitrary expressions\n// assignable while still surfacing the nicknames in editor autocomplete.\nexport type CronExpression =\n | \"@yearly\"\n | \"@annually\"\n | \"@monthly\"\n | \"@weekly\"\n | \"@daily\"\n | \"@midnight\"\n | \"@hourly\"\n | (string & {});\n\nexport class CronJob {\n name: string;\n cron: CronExpression;\n\n /**\n * Decides whether this tick happens at all. Evaluated once per tick, before\n * anything else; returning `false` skips `onTick`, `callback` and\n * `onComplete` alike.\n *\n * ### Why this is a member and not a line the job writes for itself\n *\n * A job that reports outward — mails a digest, opens a Sentry issue, pings a\n * channel — must not fire from a laptop, and the guard for that has to cover\n * the whole tick. There was nowhere to write it. gemi calls `onTick` and\n * `onComplete` *outside* `callback`, so a guard placed in a lifecycle hook\n * only stops the hook it lives in: an early `return` at the top of `callback`\n * leaves the job still announcing that it started and still announcing that\n * it finished, which for an outward-reporting job is most of the damage.\n *\n * The only construct that covered every hook was an abstract base class that\n * shadowed `callback` with the guard and renamed the real body to `run()` —\n * and that costs the app the framework's own vocabulary. A job then reads\n * `async run()` while every page of the documentation reads `async\n * callback()`, so the next person to follow the docs writes a `callback` the\n * base class never calls: no error, no output, a job that silently does\n * nothing. Forgetting *this* member fails the other way round — the job runs,\n * which is what it did before anyone asked for a gate.\n *\n * ### What it gates\n *\n * Work, not registration. A job whose gate returns `false` is still\n * scheduled, still holds its `Bun.cron` handle, and still appears in\n * `app(Scheduler).jobs` — \"is it scheduled\" and \"will it do anything\" are\n * different questions and the second one is answered per tick. That is also\n * why this is a method: a field would be read once, when the scheduler\n * constructs the job at boot, and would freeze whatever it saw then.\n *\n * A gate that throws is logged and treated as `false`. Cron work recurs, so\n * a skipped tick is recovered by the next one, while an email sent from the\n * wrong machine is not recovered at all.\n *\n * ### Composing with a base class\n *\n * Nothing here calls `super` for you. A subclass that overrides `shouldRun`\n * for its own reason silently replaces whatever its base was gating on, so\n * narrow rather than redefine:\n *\n * ```typescript\n * async shouldRun() {\n * return (await super.shouldRun()) && this.hasSubscribers();\n * }\n * ```\n *\n * A shared base should annotate its return type as written here rather than\n * let it be inferred: a base returning a plain `boolean` narrows the\n * signature its subclasses inherit, and the `await super` above then does not\n * typecheck against it.\n */\n shouldRun(): Promise<boolean> | boolean {\n return true;\n }\n\n callback(): Promise<void> | void {}\n onTick(): Promise<void> | void {}\n onComplete(): Promise<void> | void {}\n\n static exp(expression: CronExpression) {\n return expression;\n }\n}\n",
|
|
11
|
+
"import type { CronJob } from \"./CronJob\";\n\n// Config key: `schedule`. Consumed by `ScheduleServiceProvider`.\nexport interface ScheduleConfig {\n /**\n * The `CronJob` subclasses this application runs on a schedule, or nothing.\n *\n * ### Why \"or nothing\" is the point\n *\n * A cron job that is written and not listed here never fires, and unlike a\n * dropped dispatch there is no caller left waiting to notice: nothing is\n * downstream of a tick that did not happen. The report is simply not sent,\n * for as long as it takes somebody to ask why they stopped seeing it. That is\n * the whole failure — the file exists, the expression is right, and the class\n * was never in the module graph.\n *\n * Leaving this out spells the schedule once: the jobs are the classes under\n * `jobsDir`.\n *\n * ### The rule, exactly\n *\n * **Declared wins, and `[]` is declared.** A `jobs` that is present is used\n * verbatim and no directory is read — the escape hatch for an app whose jobs\n * live somewhere this cannot walk, for one that runs a deliberate subset, and\n * for a deploy that ships no source. An empty array means an app with nothing\n * scheduled and says so; it does not mean \"find some\".\n *\n * **Absent or `undefined` discovers.** `undefined` counts as absent for the\n * same reason `withDefaults` treats it that way everywhere else: a key spread\n * in from an optional value is an omission, not an instruction.\n *\n * Either way the set the scheduler ended up with is readable afterwards, as\n * `app(Scheduler).jobs` — an app that used to import this array to assert\n * something about its own schedule asks the scheduler instead.\n */\n jobs?: Array<new () => CronJob>;\n\n /**\n * Where to look when `jobs` was not declared. Relative to the project root,\n * or absolute.\n *\n * Every `.ts`/`.tsx` file underneath it is imported at boot and every exported\n * class extending `CronJob` is scheduled, so this wants to be a directory of\n * cron declarations rather than a directory that merely contains some. Moving\n * the jobs is what this field is for; pointing it at `app/` is not.\n */\n jobsDir?: string;\n}\n\nexport function defineScheduleConfig(config: ScheduleConfig): ScheduleConfig {\n return config;\n}\n\nexport function scheduleConfigDefaults(): Required<ScheduleConfig> {\n return {\n jobs: [],\n jobsDir: \"app/cron\",\n };\n}\n",
|
|
12
|
+
"import { app } from \"../../foundation/app\";\nimport { QueueManager } from \"./QueueManager\";\n\nexport class Job {\n static name = \"unset\";\n worker = false;\n maxAttempts = 3;\n\n run(..._args: any[]): Promise<any> | any {}\n\n onFail(_error: Error, ..._args: any[]): void {}\n onSuccess(_result: any, ..._args: any[]): void {}\n onDeadletter(_error: Error, ..._args: any[]): void {}\n\n static dispatch<T extends Job>(\n this: new () => T,\n ...args: Parameters<T[\"run\"]>\n ): void {\n if (this.name === \"unset\") {\n throw new Error(\"Cannot dispatch a job with no name\");\n }\n\n app(QueueManager).push(this, JSON.stringify(args));\n }\n}\n",
|
|
13
|
+
"import { existsSync } from \"node:fs\";\nimport { dirname, isAbsolute, join } from \"node:path\";\n\nimport {\n discoverClasses,\n DiscoveryError,\n projectRoot,\n} from \"../support/discover\";\nimport { Command, type CommandClass } from \"../console/Command\";\nimport { commandConfigDefaults } from \"../console/config\";\nimport { isUnfinishedBuilder } from \"../console/builder\";\nimport { CronJob } from \"./cron/CronJob\";\nimport { scheduleConfigDefaults } from \"./cron/config\";\nimport { Job } from \"./queue/Job\";\nimport { queueConfigDefaults } from \"./queue/config\";\n\n/**\n * Reading an application's jobs off the filesystem, for the two subsystems that\n * were asking every app to write its job list twice.\n *\n * Both functions here are the same call to `discoverClasses` with a different\n * base class, which is deliberate: one walk, one set of skip rules, one answer\n * to \"what does this app have\". They are exported from `gemi/services` rather\n * than kept private to the providers because the list stopped being something\n * an app could import — a test that used to walk the exported `jobs` array\n * needs somewhere to ask the same question, and so does a script.\n *\n * What the providers add on top of these is the decision of *whether* to ask,\n * which is the config's to make and not this file's.\n */\n\n/**\n * A directory the app named, resolved the way the app meant it.\n *\n * Relative paths hang off the project root rather than `process.cwd()` at the\n * moment of the call, because a config slice saying `app/jobs` means the app's\n * `app/jobs` and not whatever directory somebody happened to launch a script\n * from. Absolute paths are taken as given, which is what makes these callable\n * from a test that has no project around it.\n */\nfunction resolveDir(dir: string): string {\n return isAbsolute(dir) ? dir : join(projectRoot(), dir);\n}\n\n/**\n * Says something when the directory is missing *and so is the tree it lives in*.\n *\n * A missing directory has two readings and they want opposite responses. An app\n * that has never written a cron job has no `app/cron`, and warning about that on\n * every boot for the rest of its life is noise — the answer \"you have no cron\n * jobs\" is correct and uninteresting. But a deploy that ships `dist/` and\n * `node_modules/` without the source has no `app/cron` *and no `app/`*, and\n * there discovery quietly returns nothing while the app very much does have\n * jobs: the exact silence #322 and #323 exist to remove, reintroduced one layer\n * down and in production only.\n *\n * The parent directory is what tells them apart. If neither the directory nor\n * the one above it is there, the tree this was pointed into is not there\n * either, and that is worth a sentence.\n */\nfunction warnIfSourceIsMissing(\n resolved: string,\n subject: string,\n slice: string,\n) {\n if (existsSync(resolved) || existsSync(dirname(resolved))) return;\n\n console.warn(\n `No ${subject} were discovered: neither ${resolved} nor the directory ` +\n `above it exists, so this process cannot see the application's source. ` +\n `If this is a deploy that ships only the build output, list the classes ` +\n `explicitly in app/config/${slice}.ts so they travel with it.`,\n );\n}\n\n/**\n * The `Job` subclasses under `dir`, defaulting to the config slice's `app/jobs`.\n *\n * This is what a `queue` config slice with no `jobs` key resolves to. Call it\n * directly to ask the question a test used to answer by importing the array:\n * every job this application would register, in the order it would register\n * them.\n *\n * Every file underneath is imported, so calling this runs the app's job modules\n * — the cost `discoverClasses` documents at length, paid once per call.\n */\nexport async function discoverJobs(\n dir: string = queueConfigDefaults().jobsDir,\n): Promise<Array<new () => Job>> {\n const resolved = resolveDir(dir);\n warnIfSourceIsMissing(resolved, \"queue jobs\", \"queue\");\n const jobs = await discoverClasses(resolved, Job);\n warnIfNameWillNotSurviveTheBuild(jobs);\n return jobs;\n}\n\n/**\n * Says something about a discovered job that never declared `static name`.\n *\n * This is the one hazard discovery introduces rather than removes, and it is\n * production-only. `gemi build` minifies the server entry, and app code\n * reachable from it — a controller, and every job class that controller\n * imports to dispatch — is bundled and minified with it. Minification renames\n * the class binding, and a class's implicit `.name` is that binding: a\n * `TestJob` in the bundle reports `\"D\"`. Discovery, meanwhile, imports\n * `app/jobs/TestJob.ts` from source at runtime, where it is still `\"TestJob\"`.\n * The queue is keyed by that name, so the two halves stop agreeing and the\n * dispatch is dropped — in production, and only there.\n *\n * A declared `static name = \"TestJob\"` is a string literal, which survives\n * minification intact, and the two halves agree again. `docs/jobs-and-queues.md`\n * has always called it required; before discovery an app could get away without\n * it, because the explicit `jobs` array was bundled too and both sides were\n * wrong in the same way.\n *\n * The check is exact rather than a guess: a `static name = \"...\"` class field\n * defines a *writable* own property, while the implicit class name is\n * non-writable. Cron is unaffected — `CronJob.name` is an instance field\n * holding a string literal, not the class binding.\n */\nfunction warnIfNameWillNotSurviveTheBuild(jobs: Array<new () => Job>) {\n for (const job of jobs) {\n if (Object.getOwnPropertyDescriptor(job, \"name\")?.writable) continue;\n\n console.warn(\n `Queued job ${job.name} does not declare \\`static name\\`, so it is ` +\n `registered under its class name. A production build minifies the ` +\n `class that dispatches it and renames it, while discovery reads this ` +\n `file from source and does not — so the dispatch would be dropped in ` +\n `production and nowhere else. Add: static name = \"${job.name}\";`,\n );\n }\n}\n\n/**\n * The `CronJob` subclasses under `dir`, defaulting to the config slice's\n * `app/cron`.\n *\n * This is what a `schedule` config slice with no `jobs` key resolves to. Call it\n * directly to ask the question a test used to answer by importing the array —\n * though after boot `app(Scheduler).jobs` is the better one, because it is what\n * the scheduler actually took rather than what this would find if asked again.\n *\n * Every file underneath is imported, so calling this runs the app's cron\n * modules — the cost `discoverClasses` documents at length, paid once per call.\n */\nexport async function discoverCronJobs(\n dir: string = scheduleConfigDefaults().jobsDir,\n): Promise<Array<new () => CronJob>> {\n const resolved = resolveDir(dir);\n warnIfSourceIsMissing(resolved, \"cron jobs\", \"schedule\");\n return await discoverClasses(resolved, CronJob);\n}\n\n/**\n * The `Command` subclasses under `dir`, defaulting to the config slice's\n * `app/commands`.\n *\n * This is what a `commands`-less `command` slice resolves to, and what\n * `gemi run` lists. Unlike the two above it is not called during boot — a\n * command registry has one consumer, and importing every file under\n * `app/commands` into every server process would be a cost paid on every start\n * for code no request reaches.\n *\n * Every file underneath is imported, so calling this runs the app's command\n * modules — the cost `discoverClasses` documents at length, paid once per call.\n */\nexport async function discoverCommands(\n dir: string = commandConfigDefaults().commandsDir,\n): Promise<CommandClass[]> {\n const resolved = resolveDir(dir);\n warnIfSourceIsMissing(resolved, \"commands\", \"command\");\n\n const unfinished: string[] = [];\n\n const commands = await discoverClasses(\n resolved,\n Command,\n [],\n (value, file) => {\n if (isUnfinishedBuilder(value)) unfinished.push(file);\n },\n );\n\n refuseUnfinishedBuilders(unfinished);\n\n return commands as CommandClass[];\n}\n\n/**\n * Stops the walk for a builder chain that was never finished.\n *\n * This is the one silence the builder introduces, and it is the exact shape\n * #322 and #323 exist to remove. `defineCommand(...).arg(...)` without a\n * trailing `.handle(...)` is a plain object rather than a class, so\n * `discoverClasses` discards it along with every constant and helper a command\n * file happens to export — and the command disappears from `gemi run` with\n * nothing raised. The author sees a listing containing every command except the\n * one they just wrote.\n *\n * A throw rather than a warning, because there is no reading of an unfinished\n * builder under which the author meant it: the chain builds a description of a\n * command and then discards it.\n *\n * \"Unfinished\" is decided by `.handle()` clearing the brand, not by the export\n * still being a builder object. Those differ for the natural way to share\n * declarations —\n *\n * export const base = defineCommand(\"reindex\").option(\"verbose\", …);\n * export default base.handle(async () => {});\n *\n * — where `base` is a builder that *did* produce a command. Keying off the shape\n * alone made that file abort the whole of `gemi run`, taking every other command\n * in the project down with it, under a message that was untrue for it.\n */\nfunction refuseUnfinishedBuilders(files: string[]): void {\n if (files.length === 0) return;\n\n const subject =\n files.length === 1\n ? `${files[0]} exports a command builder that never called \\`.handle()\\``\n : `${files.length} files export a command builder that never called ` +\n `\\`.handle()\\`:\\n ${files.join(\"\\n \")}`;\n\n throw new DiscoveryError(\n `${subject}, so there is no command to run. \\`.handle()\\` is what turns ` +\n `the chain into a command — finish it:\\n\\n` +\n ` export default defineCommand(\"my-command\")\\n` +\n ` .handle(async ({ line }) => { line(\"hello\") })`,\n );\n}\n"
|
|
14
|
+
],
|
|
15
|
+
"mappings": ";uJA+CO,GAAS,LAAiB,CAAC,EAAkC,CAClE,OAAO,EAGF,SAAS,CAAmB,EAA0B,CAC3D,MAAO,CACL,KAAM,CAAC,EACP,QAAS,WACT,YAAa,CACf,ECpDF,SAAS,CAAY,EAAG,CACtB,IAAM,EAAU,QAAQ,IAAI,QACtB,EAAW,QAAQ,IAAI,SAEvB,EACJ,mBAAyB,aACrB,GAAG,8BACH,GAAG,iBAEH,EAAO,IAAI,KACf,CACE;AAAA,6BACuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAkBzB,EACA,WACF,EACM,EAAM,IAAI,gBAAgB,CAAI,EACpC,OAAO,IAAI,OAAO,CAAG,EAIvB,eAAe,CAAW,CAAC,EAAiB,EAAc,CACxD,IAAM,EAAS,EAAa,EAE5B,OADA,EAAO,YAAY,CAAE,UAAS,MAAK,CAAC,EAC7B,MAAM,IAAI,QAAQ,CAAC,EAAS,IAAW,CAC5C,EAAO,UAAY,CAAC,IAAM,CACxB,IAAM,EAAO,EAAE,KACf,GAAI,UAAW,EACb,EAAO,EAAK,KAAK,EAEjB,OAAQ,EAAK,MAAM,GAGxB,EAUI,MAAM,CAAa,OACjB,OAAQ,QAEf,MAA4B,IAAI,IAChC,uBAAyB,EACzB,UAAY,GACZ,KAAsC,CAAC,EAE9B,OAET,WAAW,CAAC,EAAsB,CAAC,EAAG,CACpC,KAAK,OAAS,EAAa,EAAoB,EAAG,CAAM,EACxD,KAAK,QAAQ,KAAK,OAAO,IAAI,EAoB/B,OAAO,CAAC,EAA4B,CAClC,KAAK,OAAO,KAAO,EAkBnB,KAAK,KAAO,CAAC,EACb,QAAW,KAAO,EA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a,UAAU,EAChD,MAAM,EAAgB,EAAU,CAAO,EAgBhD,eAAsB,EAAgB,CACpC,EAAc,EAAsB,EAAE,YACb,CACzB,IAAM,EAAW,EAAW,CAAG,EAC/B,EAAsB,EAAU,WAAY,SAAS,EAErD,IAAM,EAAuB,CAAC,EAExB,EAAW,MAAM,EACrB,EACA,EACA,CAAC,EACD,CAAC,EAAO,IAAS,CACf,GAAI,EAAoB,CAAK,EAAG,EAAW,KAAK,CAAI,EAExD,EAIA,OAFA,EAAyB,CAAU,EAE5B,EA6BT,SAAS,CAAwB,CAAC,EAAuB,CACvD,GAAI,EAAM,SAAW,EAAG,OAExB,IAAM,EACJ,EAAM,SAAW,EACb,GAAG,EAAM,+DACT,GAAG,EAAM;AAAA,MACc,EAAM,KAAK;AAAA,KAAQ,IAEhD,MAAM,IAAI,EACR,GAAG,iEACD;AAAA;AAAA,EACA;AAAA,qDAEJ",
|
|
16
|
+
"debugId": "D1A465A9DBBC085B64756E2164756E21",
|
|
17
|
+
"names": []
|
|
18
|
+
}
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"import type { Application } from \"../foundation/Application\";\n\n/**\n * Both hooks default to no-ops. `register()` binds services into the container\n * and must not resolve any of them; `boot()` runs after every provider has\n * registered, so it may resolve freely.\n */\nexport abstract class ServiceProvider {\n constructor(protected app: Application) {}\n\n register(): void {}\n\n boot(): void | Promise<void> {}\n}\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";AAOO,MAAe,CAAgB,CACd,IAAtB,WAAW,CAAW,EAAkB,CAAlB,WAEtB,QAAQ,EAAS,EAEjB,IAAI,EAAyB,EAC/B",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "655094B3589CAB3764756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{A as
|
|
2
|
+
import{Qe as h}from"./chunk-0h3jr9d9.js";var A=h((f)=>{f.HttpAuthLocation=void 0;(function(t){t.HEADER="header",t.QUERY="query"})(f.HttpAuthLocation||(f.HttpAuthLocation={}));f.HttpApiKeyAuthLocation=void 0;(function(t){t.HEADER="header",t.QUERY="query"})(f.HttpApiKeyAuthLocation||(f.HttpApiKeyAuthLocation={}));f.EndpointURLScheme=void 0;(function(t){t.HTTP="http",t.HTTPS="https"})(f.EndpointURLScheme||(f.EndpointURLScheme={}));f.AlgorithmId=void 0;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(f.AlgorithmId||(f.AlgorithmId={}));var x=(t)=>{let o=[];if(t.sha256!==void 0)o.push({algorithmId:()=>f.AlgorithmId.SHA256,checksumConstructor:()=>t.sha256});if(t.md5!=null)o.push({algorithmId:()=>f.AlgorithmId.MD5,checksumConstructor:()=>t.md5});return{addChecksumAlgorithm(s){o.push(s)},checksumAlgorithms(){return o}}},d=(t)=>{let o={};return t.checksumAlgorithms().forEach((s)=>{o[s.algorithmId()]=s.checksumConstructor()}),o},a=(t)=>{return x(t)},E=(t)=>{return d(t)};f.FieldPosition=void 0;(function(t){t[t.HEADER=0]="HEADER",t[t.TRAILER=1]="TRAILER"})(f.FieldPosition||(f.FieldPosition={}));var m="__smithy_context";f.IniSectionType=void 0;(function(t){t.PROFILE="profile",t.SSO_SESSION="sso-session",t.SERVICES="services"})(f.IniSectionType||(f.IniSectionType={}));f.RequestHandlerProtocol=void 0;(function(t){t.HTTP_0_9="http/0.9",t.HTTP_1_0="http/1.0",t.TDS_8_0="tds/8.0"})(f.RequestHandlerProtocol||(f.RequestHandlerProtocol={}));f.SMITHY_CONTEXT_KEY=m;f.getDefaultClientConfiguration=a;f.resolveDefaultRuntimeConfig=E});
|
|
3
|
+
export{A as Ja};
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=83DCF0CC9F5E23E064756E2164756E21
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"'use strict';\n\nexports.HttpAuthLocation = void 0;\n(function (HttpAuthLocation) {\n HttpAuthLocation[\"HEADER\"] = \"header\";\n HttpAuthLocation[\"QUERY\"] = \"query\";\n})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {}));\n\nexports.HttpApiKeyAuthLocation = void 0;\n(function (HttpApiKeyAuthLocation) {\n HttpApiKeyAuthLocation[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation[\"QUERY\"] = \"query\";\n})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {}));\n\nexports.EndpointURLScheme = void 0;\n(function (EndpointURLScheme) {\n EndpointURLScheme[\"HTTP\"] = \"http\";\n EndpointURLScheme[\"HTTPS\"] = \"https\";\n})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {}));\n\nexports.AlgorithmId = void 0;\n(function (AlgorithmId) {\n AlgorithmId[\"MD5\"] = \"md5\";\n AlgorithmId[\"CRC32\"] = \"crc32\";\n AlgorithmId[\"CRC32C\"] = \"crc32c\";\n AlgorithmId[\"SHA1\"] = \"sha1\";\n AlgorithmId[\"SHA256\"] = \"sha256\";\n})(exports.AlgorithmId || (exports.AlgorithmId = {}));\nconst getChecksumConfiguration = (runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== undefined) {\n checksumAlgorithms.push({\n algorithmId: () => exports.AlgorithmId.SHA256,\n checksumConstructor: () => runtimeConfig.sha256,\n });\n }\n if (runtimeConfig.md5 != undefined) {\n checksumAlgorithms.push({\n algorithmId: () => exports.AlgorithmId.MD5,\n checksumConstructor: () => runtimeConfig.md5,\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n },\n };\n};\nconst resolveChecksumRuntimeConfig = (clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n};\n\nconst getDefaultClientConfiguration = (runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n};\nconst resolveDefaultRuntimeConfig = (config) => {\n return resolveChecksumRuntimeConfig(config);\n};\n\nexports.FieldPosition = void 0;\n(function (FieldPosition) {\n FieldPosition[FieldPosition[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition[FieldPosition[\"TRAILER\"] = 1] = \"TRAILER\";\n})(exports.FieldPosition || (exports.FieldPosition = {}));\n\nconst SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\nexports.IniSectionType = void 0;\n(function (IniSectionType) {\n IniSectionType[\"PROFILE\"] = \"profile\";\n IniSectionType[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType[\"SERVICES\"] = \"services\";\n})(exports.IniSectionType || (exports.IniSectionType = {}));\n\nexports.RequestHandlerProtocol = void 0;\n(function (RequestHandlerProtocol) {\n RequestHandlerProtocol[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol[\"TDS_8_0\"] = \"tds/8.0\";\n})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {}));\n\nexports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY;\nexports.getDefaultClientConfiguration = getDefaultClientConfiguration;\nexports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig;\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";uDAEQ,mBAAwB,QAC/B,QAAS,CAAC,EAAkB,CACzB,EAAiB,OAAY,SAC7B,EAAiB,MAAW,UACrB,qBAA6B,mBAAmB,CAAC,EAAE,EAEtD,yBAA8B,QACrC,QAAS,CAAC,EAAwB,CAC/B,EAAuB,OAAY,SACnC,EAAuB,MAAW,UAC3B,2BAAmC,yBAAyB,CAAC,EAAE,EAElE,oBAAyB,QAChC,QAAS,CAAC,EAAmB,CAC1B,EAAkB,KAAU,OAC5B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,EAAuB,QAAa,YAC7B,2BAAmC,yBAAyB,CAAC,EAAE,EAElE,qBAAqB,EACrB,gCAAgC,EAChC,8BAA8B",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "83DCF0CC9F5E23E064756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{a as Nt}from"./chunk-8zd6d5nd.js";import{$ as Hr,U as er,W as L,X as At,Y as Wt,Z as Yt,aa as Lr,ba as Rt,ca as jt,da as ar,ea as Bt,fa as Jt,ga as lr,ha as Mt,ia as Ut,ja as wt,ka as xt,la as pt,ma as Xt}from"./chunk-rxeyhwqz.js";import{na as Ft}from"./chunk-an6nq9yd.js";import"./chunk-zezdm4ep.js";import{Aa as M,pa as Nr,qa as at,sa as Dt,wa as He}from"./chunk-q0xq0pt0.js";import{Ba as zt}from"./chunk-3fcgg506.js";import"./chunk-zznpmnp7.js";import{Fa as ut}from"./chunk-dk01r6se.js";import{Ga as lt}from"./chunk-kv8p4h79.js";import"./chunk-94k8pjmf.js";import"./chunk-1sbm38g3.js";import{Ja as bt}from"./chunk-5v36t9j3.js";import{Ie as p}from"./chunk-zwpx6z5f.js";var V=p((se)=>{Object.defineProperty(se,"__esModule",{value:!0});se.resolveHttpAuthSchemeConfig=se.defaultSigninHttpAuthSchemeProvider=se.defaultSigninHttpAuthSchemeParametersProvider=void 0;var Mr=L(),H=Nr(),Ur=async(e,r,t)=>{return{operation:(0,H.getSmithyContext)(r).operation,region:await(0,H.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};se.defaultSigninHttpAuthSchemeParametersProvider=Ur;function wr(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:e.region},propertiesExtractor:(r,t)=>({signingProperties:{config:r,context:t}})}}function xr(e){return{schemeId:"smithy.api#noAuth"}}var gr=(e)=>{let r=[];switch(e.operation){case"CreateOAuth2Token":{r.push(xr(e));break}default:r.push(wr(e))}return r};se.defaultSigninHttpAuthSchemeProvider=gr;var fr=(e)=>{let r=(0,Mr.resolveAwsSdkSigV4Config)(e);return Object.assign(r,{authSchemePreference:(0,H.normalizeProvider)(e.authSchemePreference??[])})};se.resolveHttpAuthSchemeConfig=fr});var Se=p((Ee)=>{Object.defineProperty(Ee,"__esModule",{value:!0});Ee.ruleSet=void 0;var ve="required",o="fn",n="argv",c="ref",ne=!0,ie="isSet",S="booleanEquals",I="error",E="endpoint",l="tree",N="PartitionResult",z="stringEquals",de={[ve]:!0,default:!1,type:"boolean"},ue={[ve]:!1,type:"string"},ae={[c]:"Endpoint"},A={[o]:S,[n]:[{[c]:"UseFIPS"},!0]},W={[o]:S,[n]:[{[c]:"UseDualStack"},!0]},s={},Y={[o]:"getAttr",[n]:[{[c]:N},"name"]},R={[o]:S,[n]:[{[c]:"UseFIPS"},!1]},F={[o]:S,[n]:[{[c]:"UseDualStack"},!1]},le={[o]:"getAttr",[n]:[{[c]:N},"supportsFIPS"]},pe={[o]:S,[n]:[!0,{[o]:"getAttr",[n]:[{[c]:N},"supportsDualStack"]}]},ce=[{[c]:"Region"}],hr={version:"1.0",parameters:{UseDualStack:de,UseFIPS:de,Endpoint:ue,Region:ue},rules:[{conditions:[{[o]:ie,[n]:[ae]}],rules:[{conditions:[A],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:I},{rules:[{conditions:[W],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:I},{endpoint:{url:ae,properties:s,headers:s},type:E}],type:l}],type:l},{rules:[{conditions:[{[o]:ie,[n]:ce}],rules:[{conditions:[{[o]:"aws.partition",[n]:ce,assign:N}],rules:[{conditions:[{[o]:z,[n]:[Y,"aws"]},R,F],endpoint:{url:"https://{Region}.signin.aws.amazon.com",properties:s,headers:s},type:E},{conditions:[{[o]:z,[n]:[Y,"aws-cn"]},R,F],endpoint:{url:"https://{Region}.signin.amazonaws.cn",properties:s,headers:s},type:E},{conditions:[{[o]:z,[n]:[Y,"aws-us-gov"]},R,F],endpoint:{url:"https://{Region}.signin.amazonaws-us-gov.com",properties:s,headers:s},type:E},{conditions:[A,W],rules:[{conditions:[{[o]:S,[n]:[ne,le]},pe],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:s,headers:s},type:E}],type:l},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:I}],type:l},{conditions:[A,F],rules:[{conditions:[{[o]:S,[n]:[le,ne]}],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",properties:s,headers:s},type:E}],type:l},{error:"FIPS is enabled but this partition does not support FIPS",type:I}],type:l},{conditions:[R,W],rules:[{conditions:[pe],rules:[{endpoint:{url:"https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:s,headers:s},type:E}],type:l},{error:"DualStack is enabled but this partition does not support DualStack",type:I}],type:l},{endpoint:{url:"https://signin.{Region}.{PartitionResult#dnsSuffix}",properties:s,headers:s},type:E}],type:l}],type:l},{error:"Invalid Configuration: Missing Region",type:I}],type:l}]};Ee.ruleSet=hr});var Ie=p((Pe)=>{Object.defineProperty(Pe,"__esModule",{value:!0});Pe.defaultEndpointResolver=void 0;var Vr=Lr(),j=Hr(),zr=Se(),Ar=new j.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Wr=(e,r={})=>{return Ar.get(e,()=>(0,j.resolveEndpoint)(zr.ruleSet,{endpointParams:e,logger:r.logger}))};Pe.defaultEndpointResolver=Wr;j.customEndpointFunctions.aws=Vr.awsEndpointFunctions});var U=p((J)=>{Object.defineProperty(J,"__esModule",{value:!0});J.SigninServiceException=J.__ServiceException=void 0;var qe=M();Object.defineProperty(J,"__ServiceException",{enumerable:!0,get:function(){return qe.ServiceException}});class B extends qe.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,B.prototype)}}J.SigninServiceException=B});var k=p((be)=>{Object.defineProperty(be,"__esModule",{value:!0});be.ValidationException=be.TooManyRequestsError=be.InternalServerException=be.AccessDeniedException=void 0;var w=U();class X extends w.SigninServiceException{name="AccessDeniedException";$fault="client";error;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});Object.setPrototypeOf(this,X.prototype),this.error=e.error}}be.AccessDeniedException=X;class Q extends w.SigninServiceException{name="InternalServerException";$fault="server";error;constructor(e){super({name:"InternalServerException",$fault:"server",...e});Object.setPrototypeOf(this,Q.prototype),this.error=e.error}}be.InternalServerException=Q;class Z extends w.SigninServiceException{name="TooManyRequestsError";$fault="client";error;constructor(e){super({name:"TooManyRequestsError",$fault:"client",...e});Object.setPrototypeOf(this,Z.prototype),this.error=e.error}}be.TooManyRequestsError=Z;class K extends w.SigninServiceException{name="ValidationException";$fault="client";error;constructor(e){super({name:"ValidationException",$fault:"client",...e});Object.setPrototypeOf(this,K.prototype),this.error=e.error}}be.ValidationException=K});var C=p((We)=>{Object.defineProperty(We,"__esModule",{value:!0});We.CreateOAuth2Token$=We.CreateOAuth2TokenResponseBody$=We.CreateOAuth2TokenResponse$=We.CreateOAuth2TokenRequestBody$=We.CreateOAuth2TokenRequest$=We.AccessToken$=We.errorTypeRegistries=We.ValidationException$=We.TooManyRequestsError$=We.InternalServerException$=We.AccessDeniedException$=We.SigninServiceException$=void 0;var Jr="AccessDeniedException",Xr="AccessToken",Qr="CreateOAuth2Token",Zr="CreateOAuth2TokenRequest",Kr="CreateOAuth2TokenRequestBody",kr="CreateOAuth2TokenResponseBody",Tr="CreateOAuth2TokenResponse",mr="InternalServerException",Cr="RefreshToken",_r="TooManyRequestsError",et="ValidationException",Fe="accessKeyId",Ne="accessToken",T="client",Me="clientId",Ue="codeVerifier",rt="code",y="error",we="expiresIn",xe="grantType",tt="http",m="httpError",ge="idToken",d="jsonName",g="message",x="refreshToken",fe="redirectUri",Le="smithy.ts.sdk.synthetic.com.amazonaws.signin",Ge="secretAccessKey",$e="sessionToken",st="server",ot="tokenInput",nt="tokenOutput",he="tokenType",u="com.amazonaws.signin",Ve=He(),f=k(),it=U(),ze=Ve.TypeRegistry.for(Le);We.SigninServiceException$=[-3,Le,"SigninServiceException",0,[],[]];ze.registerError(We.SigninServiceException$,it.SigninServiceException);var q=Ve.TypeRegistry.for(u);We.AccessDeniedException$=[-3,u,Jr,{[y]:T},[y,g],[0,0],2];q.registerError(We.AccessDeniedException$,f.AccessDeniedException);We.InternalServerException$=[-3,u,mr,{[y]:st,[m]:500},[y,g],[0,0],2];q.registerError(We.InternalServerException$,f.InternalServerException);We.TooManyRequestsError$=[-3,u,_r,{[y]:T,[m]:429},[y,g],[0,0],2];q.registerError(We.TooManyRequestsError$,f.TooManyRequestsError);We.ValidationException$=[-3,u,et,{[y]:T,[m]:400},[y,g],[0,0],2];q.registerError(We.ValidationException$,f.ValidationException);We.errorTypeRegistries=[ze,q];var Ae=[0,u,Cr,8,0];We.AccessToken$=[3,u,Xr,8,[Fe,Ge,$e],[[0,{[d]:Fe}],[0,{[d]:Ge}],[0,{[d]:$e}]],3];We.CreateOAuth2TokenRequest$=[3,u,Zr,0,[ot],[[()=>We.CreateOAuth2TokenRequestBody$,16]],1];We.CreateOAuth2TokenRequestBody$=[3,u,Kr,0,[Me,xe,rt,fe,Ue,x],[[0,{[d]:Me}],[0,{[d]:xe}],0,[0,{[d]:fe}],[0,{[d]:Ue}],[()=>Ae,{[d]:x}]],2];We.CreateOAuth2TokenResponse$=[3,u,Tr,0,[nt],[[()=>We.CreateOAuth2TokenResponseBody$,16]],1];We.CreateOAuth2TokenResponseBody$=[3,u,kr,0,[Ne,he,we,x,ge],[[()=>We.AccessToken$,{[d]:Ne}],[0,{[d]:he}],[1,{[d]:we}],[()=>Ae,{[d]:x}],[0,{[d]:ge}]],4];We.CreateOAuth2Token$=[9,u,Qr,{[tt]:["POST","/v1/token",200]},()=>We.CreateOAuth2TokenRequest$,()=>We.CreateOAuth2TokenResponse$]});var sr=p((rr)=>{Object.defineProperty(rr,"__esModule",{value:!0});rr.getRuntimeConfig=void 0;var ct=L(),vt=pt(),Et=er(),yt=M(),St=lt(),Ce=at(),_e=ut(),Pt=V(),Ot=Ie(),It=C(),qt=(e)=>{return{apiVersion:"2023-01-01",base64Decoder:e?.base64Decoder??Ce.fromBase64,base64Encoder:e?.base64Encoder??Ce.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ot.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Pt.defaultSigninHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(r)=>r.getIdentityProvider("aws.auth#sigv4"),signer:new ct.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(r)=>r.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Et.NoAuthSigner}],logger:e?.logger??new yt.NoOpLogger,protocol:e?.protocol??vt.AwsRestJsonProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:It.errorTypeRegistries,version:"2023-01-01",serviceTarget:"Signin"},serviceId:e?.serviceId??"Signin",urlParser:e?.urlParser??St.parseUrl,utf8Decoder:e?.utf8Decoder??_e.fromUtf8,utf8Encoder:e?.utf8Encoder??_e.toUtf8}};rr.getRuntimeConfig=qt});var vr=p((pr)=>{Object.defineProperty(pr,"__esModule",{value:!0});pr.getRuntimeConfig=void 0;var gt=bt(),ft=gt.__importDefault(Nt()),or=L(),nr=Mt(),G=ar(),Gt=Ut(),ir=lr(),P=Ft(),dr=Dt(),ur=M(),$t=wt(),ht=xt(),Ht=Rt(),Lt=sr(),Vt=(e)=>{(0,ur.emitWarningIfUnsupportedVersion)(process.version);let r=(0,ht.resolveDefaultsModeConfig)(e),t=()=>r().then(ur.loadConfigsForDefaultMode),a=(0,Lt.getRuntimeConfig)(e);(0,or.emitWarningIfUnsupportedVersion)(process.version);let i={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:r,authSchemePreference:e?.authSchemePreference??(0,P.loadConfig)(or.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,i),bodyLengthChecker:e?.bodyLengthChecker??$t.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,nr.createDefaultUserAgentProvider)({serviceId:a.serviceId,clientVersion:ft.default.version}),maxAttempts:e?.maxAttempts??(0,P.loadConfig)(ir.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,P.loadConfig)(G.NODE_REGION_CONFIG_OPTIONS,{...G.NODE_REGION_CONFIG_FILE_OPTIONS,...i}),requestHandler:dr.NodeHttpHandler.create(e?.requestHandler??t),retryMode:e?.retryMode??(0,P.loadConfig)({...ir.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await t()).retryMode||Ht.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Gt.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??dr.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,P.loadConfig)(G.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,i),useFipsEndpoint:e?.useFipsEndpoint??(0,P.loadConfig)(G.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,i),userAgentAppId:e?.userAgentAppId??(0,P.loadConfig)(nr.NODE_APP_ID_CONFIG_OPTIONS,i)}};pr.getRuntimeConfig=Vt});var vs=p((v)=>{var Er=At(),Qt=Wt(),Zt=Yt(),yr=jt(),Kt=ar(),_=er(),kt=He(),Tt=Bt(),qr=Jt(),Sr=lr(),O=M(),Pr=V(),mt=vr(),Or=Xt(),Ir=zt(),D=C(),$=k(),Ct=U(),_t=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"signin"})},es={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},rs=(e)=>{let{httpAuthSchemes:r,httpAuthSchemeProvider:t,credentials:a}=e;return{setHttpAuthScheme(i){let b=r.findIndex((h)=>h.schemeId===i.schemeId);if(b===-1)r.push(i);else r.splice(b,1,i)},httpAuthSchemes(){return r},setHttpAuthSchemeProvider(i){t=i},httpAuthSchemeProvider(){return t},setCredentials(i){a=i},credentials(){return a}}},ts=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}},ss=(e,r)=>{let t=Object.assign(Or.getAwsRegionExtensionConfiguration(e),O.getDefaultExtensionConfiguration(e),Ir.getHttpHandlerExtensionConfiguration(e),rs(e));return r.forEach((a)=>a.configure(t)),Object.assign(e,Or.resolveAwsRegionExtensionConfiguration(t),O.resolveDefaultRuntimeConfig(t),Ir.resolveHttpHandlerRuntimeConfig(t),ts(t))};class ee extends O.Client{config;constructor(...[e]){let r=mt.getRuntimeConfig(e||{});super(r);this.initConfig=r;let t=_t(r),a=yr.resolveUserAgentConfig(t),i=Sr.resolveRetryConfig(a),b=Kt.resolveRegionConfig(i),h=Er.resolveHostHeaderConfig(b),Dr=qr.resolveEndpointConfig(h),br=Pr.resolveHttpAuthSchemeConfig(Dr),Rr=ss(br,e?.extensions||[]);this.config=Rr,this.middlewareStack.use(kt.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(yr.getUserAgentPlugin(this.config)),this.middlewareStack.use(Sr.getRetryPlugin(this.config)),this.middlewareStack.use(Tt.getContentLengthPlugin(this.config)),this.middlewareStack.use(Er.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Qt.getLoggerPlugin(this.config)),this.middlewareStack.use(Zt.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(_.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Pr.defaultSigninHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(Fr)=>new _.DefaultIdentityProviderConfig({"aws.auth#sigv4":Fr.credentials})})),this.middlewareStack.use(_.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class re extends O.Command.classBuilder().ep(es).m(function(e,r,t,a){return[qr.getEndpointPlugin(t,e.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(D.CreateOAuth2Token$).build(){}var os={CreateOAuth2TokenCommand:re};class te extends ee{}O.createAggregatedClient(os,te);var ns={AUTHCODE_EXPIRED:"AUTHCODE_EXPIRED",INSUFFICIENT_PERMISSIONS:"INSUFFICIENT_PERMISSIONS",INVALID_REQUEST:"INVALID_REQUEST",SERVER_ERROR:"server_error",TOKEN_EXPIRED:"TOKEN_EXPIRED",USER_CREDENTIALS_CHANGED:"USER_CREDENTIALS_CHANGED"};v.$Command=O.Command;v.__Client=O.Client;v.SigninServiceException=Ct.SigninServiceException;v.CreateOAuth2TokenCommand=re;v.OAuth2ErrorCode=ns;v.Signin=te;v.SigninClient=ee;Object.prototype.hasOwnProperty.call(D,"__proto__")&&!Object.prototype.hasOwnProperty.call(v,"__proto__")&&Object.defineProperty(v,"__proto__",{enumerable:!0,value:D.__proto__});Object.keys(D).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(v,e))v[e]=D[e]});Object.prototype.hasOwnProperty.call($,"__proto__")&&!Object.prototype.hasOwnProperty.call(v,"__proto__")&&Object.defineProperty(v,"__proto__",{enumerable:!0,value:$.__proto__});Object.keys($).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(v,e))v[e]=$[e]})});export default vs();
|
|
2
|
+
import{a as Nt}from"./chunk-4e61qbp4.js";import{$ as Hr,U as er,W as L,X as At,Y as Wt,Z as Yt,aa as Lr,ba as Rt,ca as jt,da as ar,ea as Bt,fa as Jt,ga as lr,ha as Mt,ia as Ut,ja as wt,ka as xt,la as pt,ma as Xt}from"./chunk-69w4egkg.js";import{na as Nr,oa as at,qa as Dt,ua as He,ya as M}from"./chunk-2yth3kk2.js";import{za as zt}from"./chunk-j1knf8gv.js";import"./chunk-d1ahbza9.js";import{Fa as ut}from"./chunk-23g7qdpg.js";import{Ga as Ft}from"./chunk-ebcgdv00.js";import{Ha as lt}from"./chunk-q09mmr05.js";import"./chunk-t4n25km9.js";import"./chunk-tztqkat2.js";import"./chunk-kaxvw75w.js";import{La as bt}from"./chunk-092pj2j2.js";import{Qe as p}from"./chunk-0h3jr9d9.js";var V=p((se)=>{Object.defineProperty(se,"__esModule",{value:!0});se.resolveHttpAuthSchemeConfig=se.defaultSigninHttpAuthSchemeProvider=se.defaultSigninHttpAuthSchemeParametersProvider=void 0;var Mr=L(),H=Nr(),Ur=async(e,r,t)=>{return{operation:(0,H.getSmithyContext)(r).operation,region:await(0,H.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};se.defaultSigninHttpAuthSchemeParametersProvider=Ur;function wr(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:e.region},propertiesExtractor:(r,t)=>({signingProperties:{config:r,context:t}})}}function xr(e){return{schemeId:"smithy.api#noAuth"}}var gr=(e)=>{let r=[];switch(e.operation){case"CreateOAuth2Token":{r.push(xr(e));break}default:r.push(wr(e))}return r};se.defaultSigninHttpAuthSchemeProvider=gr;var fr=(e)=>{let r=(0,Mr.resolveAwsSdkSigV4Config)(e);return Object.assign(r,{authSchemePreference:(0,H.normalizeProvider)(e.authSchemePreference??[])})};se.resolveHttpAuthSchemeConfig=fr});var Se=p((Ee)=>{Object.defineProperty(Ee,"__esModule",{value:!0});Ee.ruleSet=void 0;var ve="required",o="fn",n="argv",c="ref",ne=!0,ie="isSet",S="booleanEquals",I="error",E="endpoint",l="tree",N="PartitionResult",z="stringEquals",de={[ve]:!0,default:!1,type:"boolean"},ue={[ve]:!1,type:"string"},ae={[c]:"Endpoint"},A={[o]:S,[n]:[{[c]:"UseFIPS"},!0]},W={[o]:S,[n]:[{[c]:"UseDualStack"},!0]},s={},Y={[o]:"getAttr",[n]:[{[c]:N},"name"]},R={[o]:S,[n]:[{[c]:"UseFIPS"},!1]},F={[o]:S,[n]:[{[c]:"UseDualStack"},!1]},le={[o]:"getAttr",[n]:[{[c]:N},"supportsFIPS"]},pe={[o]:S,[n]:[!0,{[o]:"getAttr",[n]:[{[c]:N},"supportsDualStack"]}]},ce=[{[c]:"Region"}],hr={version:"1.0",parameters:{UseDualStack:de,UseFIPS:de,Endpoint:ue,Region:ue},rules:[{conditions:[{[o]:ie,[n]:[ae]}],rules:[{conditions:[A],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:I},{rules:[{conditions:[W],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:I},{endpoint:{url:ae,properties:s,headers:s},type:E}],type:l}],type:l},{rules:[{conditions:[{[o]:ie,[n]:ce}],rules:[{conditions:[{[o]:"aws.partition",[n]:ce,assign:N}],rules:[{conditions:[{[o]:z,[n]:[Y,"aws"]},R,F],endpoint:{url:"https://{Region}.signin.aws.amazon.com",properties:s,headers:s},type:E},{conditions:[{[o]:z,[n]:[Y,"aws-cn"]},R,F],endpoint:{url:"https://{Region}.signin.amazonaws.cn",properties:s,headers:s},type:E},{conditions:[{[o]:z,[n]:[Y,"aws-us-gov"]},R,F],endpoint:{url:"https://{Region}.signin.amazonaws-us-gov.com",properties:s,headers:s},type:E},{conditions:[A,W],rules:[{conditions:[{[o]:S,[n]:[ne,le]},pe],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:s,headers:s},type:E}],type:l},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:I}],type:l},{conditions:[A,F],rules:[{conditions:[{[o]:S,[n]:[le,ne]}],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",properties:s,headers:s},type:E}],type:l},{error:"FIPS is enabled but this partition does not support FIPS",type:I}],type:l},{conditions:[R,W],rules:[{conditions:[pe],rules:[{endpoint:{url:"https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:s,headers:s},type:E}],type:l},{error:"DualStack is enabled but this partition does not support DualStack",type:I}],type:l},{endpoint:{url:"https://signin.{Region}.{PartitionResult#dnsSuffix}",properties:s,headers:s},type:E}],type:l}],type:l},{error:"Invalid Configuration: Missing Region",type:I}],type:l}]};Ee.ruleSet=hr});var Ie=p((Pe)=>{Object.defineProperty(Pe,"__esModule",{value:!0});Pe.defaultEndpointResolver=void 0;var Vr=Lr(),j=Hr(),zr=Se(),Ar=new j.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Wr=(e,r={})=>{return Ar.get(e,()=>(0,j.resolveEndpoint)(zr.ruleSet,{endpointParams:e,logger:r.logger}))};Pe.defaultEndpointResolver=Wr;j.customEndpointFunctions.aws=Vr.awsEndpointFunctions});var U=p((J)=>{Object.defineProperty(J,"__esModule",{value:!0});J.SigninServiceException=J.__ServiceException=void 0;var qe=M();Object.defineProperty(J,"__ServiceException",{enumerable:!0,get:function(){return qe.ServiceException}});class B extends qe.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,B.prototype)}}J.SigninServiceException=B});var k=p((be)=>{Object.defineProperty(be,"__esModule",{value:!0});be.ValidationException=be.TooManyRequestsError=be.InternalServerException=be.AccessDeniedException=void 0;var w=U();class X extends w.SigninServiceException{name="AccessDeniedException";$fault="client";error;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});Object.setPrototypeOf(this,X.prototype),this.error=e.error}}be.AccessDeniedException=X;class Q extends w.SigninServiceException{name="InternalServerException";$fault="server";error;constructor(e){super({name:"InternalServerException",$fault:"server",...e});Object.setPrototypeOf(this,Q.prototype),this.error=e.error}}be.InternalServerException=Q;class Z extends w.SigninServiceException{name="TooManyRequestsError";$fault="client";error;constructor(e){super({name:"TooManyRequestsError",$fault:"client",...e});Object.setPrototypeOf(this,Z.prototype),this.error=e.error}}be.TooManyRequestsError=Z;class K extends w.SigninServiceException{name="ValidationException";$fault="client";error;constructor(e){super({name:"ValidationException",$fault:"client",...e});Object.setPrototypeOf(this,K.prototype),this.error=e.error}}be.ValidationException=K});var C=p((We)=>{Object.defineProperty(We,"__esModule",{value:!0});We.CreateOAuth2Token$=We.CreateOAuth2TokenResponseBody$=We.CreateOAuth2TokenResponse$=We.CreateOAuth2TokenRequestBody$=We.CreateOAuth2TokenRequest$=We.AccessToken$=We.errorTypeRegistries=We.ValidationException$=We.TooManyRequestsError$=We.InternalServerException$=We.AccessDeniedException$=We.SigninServiceException$=void 0;var Jr="AccessDeniedException",Xr="AccessToken",Qr="CreateOAuth2Token",Zr="CreateOAuth2TokenRequest",Kr="CreateOAuth2TokenRequestBody",kr="CreateOAuth2TokenResponseBody",Tr="CreateOAuth2TokenResponse",mr="InternalServerException",Cr="RefreshToken",_r="TooManyRequestsError",et="ValidationException",Fe="accessKeyId",Ne="accessToken",T="client",Me="clientId",Ue="codeVerifier",rt="code",y="error",we="expiresIn",xe="grantType",tt="http",m="httpError",ge="idToken",d="jsonName",g="message",x="refreshToken",fe="redirectUri",Le="smithy.ts.sdk.synthetic.com.amazonaws.signin",Ge="secretAccessKey",$e="sessionToken",st="server",ot="tokenInput",nt="tokenOutput",he="tokenType",u="com.amazonaws.signin",Ve=He(),f=k(),it=U(),ze=Ve.TypeRegistry.for(Le);We.SigninServiceException$=[-3,Le,"SigninServiceException",0,[],[]];ze.registerError(We.SigninServiceException$,it.SigninServiceException);var q=Ve.TypeRegistry.for(u);We.AccessDeniedException$=[-3,u,Jr,{[y]:T},[y,g],[0,0],2];q.registerError(We.AccessDeniedException$,f.AccessDeniedException);We.InternalServerException$=[-3,u,mr,{[y]:st,[m]:500},[y,g],[0,0],2];q.registerError(We.InternalServerException$,f.InternalServerException);We.TooManyRequestsError$=[-3,u,_r,{[y]:T,[m]:429},[y,g],[0,0],2];q.registerError(We.TooManyRequestsError$,f.TooManyRequestsError);We.ValidationException$=[-3,u,et,{[y]:T,[m]:400},[y,g],[0,0],2];q.registerError(We.ValidationException$,f.ValidationException);We.errorTypeRegistries=[ze,q];var Ae=[0,u,Cr,8,0];We.AccessToken$=[3,u,Xr,8,[Fe,Ge,$e],[[0,{[d]:Fe}],[0,{[d]:Ge}],[0,{[d]:$e}]],3];We.CreateOAuth2TokenRequest$=[3,u,Zr,0,[ot],[[()=>We.CreateOAuth2TokenRequestBody$,16]],1];We.CreateOAuth2TokenRequestBody$=[3,u,Kr,0,[Me,xe,rt,fe,Ue,x],[[0,{[d]:Me}],[0,{[d]:xe}],0,[0,{[d]:fe}],[0,{[d]:Ue}],[()=>Ae,{[d]:x}]],2];We.CreateOAuth2TokenResponse$=[3,u,Tr,0,[nt],[[()=>We.CreateOAuth2TokenResponseBody$,16]],1];We.CreateOAuth2TokenResponseBody$=[3,u,kr,0,[Ne,he,we,x,ge],[[()=>We.AccessToken$,{[d]:Ne}],[0,{[d]:he}],[1,{[d]:we}],[()=>Ae,{[d]:x}],[0,{[d]:ge}]],4];We.CreateOAuth2Token$=[9,u,Qr,{[tt]:["POST","/v1/token",200]},()=>We.CreateOAuth2TokenRequest$,()=>We.CreateOAuth2TokenResponse$]});var sr=p((rr)=>{Object.defineProperty(rr,"__esModule",{value:!0});rr.getRuntimeConfig=void 0;var ct=L(),vt=pt(),Et=er(),yt=M(),St=lt(),Ce=at(),_e=ut(),Pt=V(),Ot=Ie(),It=C(),qt=(e)=>{return{apiVersion:"2023-01-01",base64Decoder:e?.base64Decoder??Ce.fromBase64,base64Encoder:e?.base64Encoder??Ce.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ot.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Pt.defaultSigninHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(r)=>r.getIdentityProvider("aws.auth#sigv4"),signer:new ct.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(r)=>r.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Et.NoAuthSigner}],logger:e?.logger??new yt.NoOpLogger,protocol:e?.protocol??vt.AwsRestJsonProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:It.errorTypeRegistries,version:"2023-01-01",serviceTarget:"Signin"},serviceId:e?.serviceId??"Signin",urlParser:e?.urlParser??St.parseUrl,utf8Decoder:e?.utf8Decoder??_e.fromUtf8,utf8Encoder:e?.utf8Encoder??_e.toUtf8}};rr.getRuntimeConfig=qt});var vr=p((pr)=>{Object.defineProperty(pr,"__esModule",{value:!0});pr.getRuntimeConfig=void 0;var gt=bt(),ft=gt.__importDefault(Nt()),or=L(),nr=Mt(),G=ar(),Gt=Ut(),ir=lr(),P=Ft(),dr=Dt(),ur=M(),$t=wt(),ht=xt(),Ht=Rt(),Lt=sr(),Vt=(e)=>{(0,ur.emitWarningIfUnsupportedVersion)(process.version);let r=(0,ht.resolveDefaultsModeConfig)(e),t=()=>r().then(ur.loadConfigsForDefaultMode),a=(0,Lt.getRuntimeConfig)(e);(0,or.emitWarningIfUnsupportedVersion)(process.version);let i={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:r,authSchemePreference:e?.authSchemePreference??(0,P.loadConfig)(or.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,i),bodyLengthChecker:e?.bodyLengthChecker??$t.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,nr.createDefaultUserAgentProvider)({serviceId:a.serviceId,clientVersion:ft.default.version}),maxAttempts:e?.maxAttempts??(0,P.loadConfig)(ir.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,P.loadConfig)(G.NODE_REGION_CONFIG_OPTIONS,{...G.NODE_REGION_CONFIG_FILE_OPTIONS,...i}),requestHandler:dr.NodeHttpHandler.create(e?.requestHandler??t),retryMode:e?.retryMode??(0,P.loadConfig)({...ir.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await t()).retryMode||Ht.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Gt.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??dr.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,P.loadConfig)(G.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,i),useFipsEndpoint:e?.useFipsEndpoint??(0,P.loadConfig)(G.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,i),userAgentAppId:e?.userAgentAppId??(0,P.loadConfig)(nr.NODE_APP_ID_CONFIG_OPTIONS,i)}};pr.getRuntimeConfig=Vt});var vs=p((v)=>{var Er=At(),Qt=Wt(),Zt=Yt(),yr=jt(),Kt=ar(),_=er(),kt=He(),Tt=Bt(),qr=Jt(),Sr=lr(),O=M(),Pr=V(),mt=vr(),Or=Xt(),Ir=zt(),D=C(),$=k(),Ct=U(),_t=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"signin"})},es={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},rs=(e)=>{let{httpAuthSchemes:r,httpAuthSchemeProvider:t,credentials:a}=e;return{setHttpAuthScheme(i){let b=r.findIndex((h)=>h.schemeId===i.schemeId);if(b===-1)r.push(i);else r.splice(b,1,i)},httpAuthSchemes(){return r},setHttpAuthSchemeProvider(i){t=i},httpAuthSchemeProvider(){return t},setCredentials(i){a=i},credentials(){return a}}},ts=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}},ss=(e,r)=>{let t=Object.assign(Or.getAwsRegionExtensionConfiguration(e),O.getDefaultExtensionConfiguration(e),Ir.getHttpHandlerExtensionConfiguration(e),rs(e));return r.forEach((a)=>a.configure(t)),Object.assign(e,Or.resolveAwsRegionExtensionConfiguration(t),O.resolveDefaultRuntimeConfig(t),Ir.resolveHttpHandlerRuntimeConfig(t),ts(t))};class ee extends O.Client{config;constructor(...[e]){let r=mt.getRuntimeConfig(e||{});super(r);this.initConfig=r;let t=_t(r),a=yr.resolveUserAgentConfig(t),i=Sr.resolveRetryConfig(a),b=Kt.resolveRegionConfig(i),h=Er.resolveHostHeaderConfig(b),Dr=qr.resolveEndpointConfig(h),br=Pr.resolveHttpAuthSchemeConfig(Dr),Rr=ss(br,e?.extensions||[]);this.config=Rr,this.middlewareStack.use(kt.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(yr.getUserAgentPlugin(this.config)),this.middlewareStack.use(Sr.getRetryPlugin(this.config)),this.middlewareStack.use(Tt.getContentLengthPlugin(this.config)),this.middlewareStack.use(Er.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Qt.getLoggerPlugin(this.config)),this.middlewareStack.use(Zt.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(_.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Pr.defaultSigninHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(Fr)=>new _.DefaultIdentityProviderConfig({"aws.auth#sigv4":Fr.credentials})})),this.middlewareStack.use(_.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class re extends O.Command.classBuilder().ep(es).m(function(e,r,t,a){return[qr.getEndpointPlugin(t,e.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(D.CreateOAuth2Token$).build(){}var os={CreateOAuth2TokenCommand:re};class te extends ee{}O.createAggregatedClient(os,te);var ns={AUTHCODE_EXPIRED:"AUTHCODE_EXPIRED",INSUFFICIENT_PERMISSIONS:"INSUFFICIENT_PERMISSIONS",INVALID_REQUEST:"INVALID_REQUEST",SERVER_ERROR:"server_error",TOKEN_EXPIRED:"TOKEN_EXPIRED",USER_CREDENTIALS_CHANGED:"USER_CREDENTIALS_CHANGED"};v.$Command=O.Command;v.__Client=O.Client;v.SigninServiceException=Ct.SigninServiceException;v.CreateOAuth2TokenCommand=re;v.OAuth2ErrorCode=ns;v.Signin=te;v.SigninClient=ee;Object.prototype.hasOwnProperty.call(D,"__proto__")&&!Object.prototype.hasOwnProperty.call(v,"__proto__")&&Object.defineProperty(v,"__proto__",{enumerable:!0,value:D.__proto__});Object.keys(D).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(v,e))v[e]=D[e]});Object.prototype.hasOwnProperty.call($,"__proto__")&&!Object.prototype.hasOwnProperty.call(v,"__proto__")&&Object.defineProperty(v,"__proto__",{enumerable:!0,value:$.__proto__});Object.keys($).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(v,e))v[e]=$[e]})});export default vs();
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=B9FF853AC5CE3C2864756E2164756E21
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
"'use strict';\n\nvar middlewareHostHeader = require('@aws-sdk/middleware-host-header');\nvar middlewareLogger = require('@aws-sdk/middleware-logger');\nvar middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');\nvar middlewareUserAgent = require('@aws-sdk/middleware-user-agent');\nvar configResolver = require('@smithy/config-resolver');\nvar core = require('@smithy/core');\nvar schema = require('@smithy/core/schema');\nvar middlewareContentLength = require('@smithy/middleware-content-length');\nvar middlewareEndpoint = require('@smithy/middleware-endpoint');\nvar middlewareRetry = require('@smithy/middleware-retry');\nvar smithyClient = require('@smithy/smithy-client');\nvar httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');\nvar runtimeConfig = require('./runtimeConfig');\nvar regionConfigResolver = require('@aws-sdk/region-config-resolver');\nvar protocolHttp = require('@smithy/protocol-http');\nvar schemas_0 = require('./schemas/schemas_0');\nvar errors = require('./models/errors');\nvar SigninServiceException = require('./models/SigninServiceException');\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"signin\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SigninClient extends smithyClient.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);\n const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);\n const _config_4 = configResolver.resolveRegionConfig(_config_3);\n const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);\n const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);\n const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));\n this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));\n this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));\n this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));\n this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSigninHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(core.getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nclass CreateOAuth2TokenCommand extends smithyClient.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"Signin\", \"CreateOAuth2Token\", {})\n .n(\"SigninClient\", \"CreateOAuth2TokenCommand\")\n .sc(schemas_0.CreateOAuth2Token$)\n .build() {\n}\n\nconst commands = {\n CreateOAuth2TokenCommand,\n};\nclass Signin extends SigninClient {\n}\nsmithyClient.createAggregatedClient(commands, Signin);\n\nconst OAuth2ErrorCode = {\n AUTHCODE_EXPIRED: \"AUTHCODE_EXPIRED\",\n INSUFFICIENT_PERMISSIONS: \"INSUFFICIENT_PERMISSIONS\",\n INVALID_REQUEST: \"INVALID_REQUEST\",\n SERVER_ERROR: \"server_error\",\n TOKEN_EXPIRED: \"TOKEN_EXPIRED\",\n USER_CREDENTIALS_CHANGED: \"USER_CREDENTIALS_CHANGED\",\n};\n\nexports.$Command = smithyClient.Command;\nexports.__Client = smithyClient.Client;\nexports.SigninServiceException = SigninServiceException.SigninServiceException;\nexports.CreateOAuth2TokenCommand = CreateOAuth2TokenCommand;\nexports.OAuth2ErrorCode = OAuth2ErrorCode;\nexports.Signin = Signin;\nexports.SigninClient = SigninClient;\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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|
+
"debugId": "B9FF853AC5CE3C2864756E2164756E21",
|
|
17
17
|
"names": []
|
|
18
18
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{qa as B,sa as p,ya as _}from"./chunk-2yth3kk2.js";import{za as v}from"./chunk-j1knf8gv.js";import{Aa as D}from"./chunk-d1ahbza9.js";import"./chunk-23g7qdpg.js";import"./chunk-q09mmr05.js";import"./chunk-tztqkat2.js";import{Ka as d}from"./chunk-kaxvw75w.js";import"./chunk-092pj2j2.js";import{Pe as n}from"./chunk-0h3jr9d9.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=EB6D0C7A7508496164756E2164756E21
|
|
@@ -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": ";6XAAA,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,MAA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