@geekmidas/cli 10.0.0-alpha.94 → 10.0.0-alpha.96
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/{GoDaddyProvider-BRZUWD8z.mjs → GoDaddyProvider-BsUKjGcg.mjs} +3 -3
- package/dist/{GoDaddyProvider-BRZUWD8z.mjs.map → GoDaddyProvider-BsUKjGcg.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-DzguxU_a.cjs → GoDaddyProvider-DyHXHDHe.cjs} +3 -3
- package/dist/{GoDaddyProvider-DzguxU_a.cjs.map → GoDaddyProvider-DyHXHDHe.cjs.map} +1 -1
- package/dist/{HostingerProvider-Cjh_2Ml6.mjs → HostingerProvider-BNpS9aRJ.mjs} +2 -2
- package/dist/{HostingerProvider-Cjh_2Ml6.mjs.map → HostingerProvider-BNpS9aRJ.mjs.map} +1 -1
- package/dist/{HostingerProvider-OdQmKXE3.cjs → HostingerProvider-DR1iws1P.cjs} +2 -2
- package/dist/{HostingerProvider-OdQmKXE3.cjs.map → HostingerProvider-DR1iws1P.cjs.map} +1 -1
- package/dist/{LegacyStateStore-BQZb6-j2.mjs → LegacyStateStore-B6SOqRFi.mjs} +3 -3
- package/dist/{LegacyStateStore-BQZb6-j2.mjs.map → LegacyStateStore-B6SOqRFi.mjs.map} +1 -1
- package/dist/{LegacyStateStore-D50dgUPc.cjs → LegacyStateStore-BnMcONE0.cjs} +3 -3
- package/dist/{LegacyStateStore-D50dgUPc.cjs.map → LegacyStateStore-BnMcONE0.cjs.map} +1 -1
- package/dist/{LocalStateStore-BSaS2535.mjs → LocalStateStore-6CrsZzqI.mjs} +2 -2
- package/dist/{LocalStateStore-BSaS2535.mjs.map → LocalStateStore-6CrsZzqI.mjs.map} +1 -1
- package/dist/{LocalStateStore-EFBUjuMX.cjs → LocalStateStore-pd4bbdJJ.cjs} +2 -2
- package/dist/{LocalStateStore-EFBUjuMX.cjs.map → LocalStateStore-pd4bbdJJ.cjs.map} +1 -1
- package/dist/{S3StateStore-C5mv8To3.cjs → S3StateStore-CoGk6ZKU.cjs} +2 -2
- package/dist/{S3StateStore-C5mv8To3.cjs.map → S3StateStore-CoGk6ZKU.cjs.map} +1 -1
- package/dist/{S3StateStore-CrFq4UZU.mjs → S3StateStore-DP_7Q4yb.mjs} +2 -2
- package/dist/{S3StateStore-CrFq4UZU.mjs.map → S3StateStore-DP_7Q4yb.mjs.map} +1 -1
- package/dist/{SSMStateStore-D3Z6mZnA.mjs → SSMStateStore-Bo6_KDYY.mjs} +2 -2
- package/dist/{SSMStateStore-D3Z6mZnA.mjs.map → SSMStateStore-Bo6_KDYY.mjs.map} +1 -1
- package/dist/{SSMStateStore-DuZCH7_v.cjs → SSMStateStore-D9s4_Do3.cjs} +2 -2
- package/dist/{SSMStateStore-DuZCH7_v.cjs.map → SSMStateStore-D9s4_Do3.cjs.map} +1 -1
- package/dist/{add-C85isXFl.mjs → add-BQS2QZHp.mjs} +22 -51
- package/dist/add-BQS2QZHp.mjs.map +1 -0
- package/dist/{add-DsVDdvon.cjs → add-CjURJ-vI.cjs} +23 -52
- package/dist/add-CjURJ-vI.cjs.map +1 -0
- package/dist/{bundler-BSHog8CH.mjs → bundler-BMM3UsGm.mjs} +5 -5
- package/dist/{bundler-BSHog8CH.mjs.map → bundler-BMM3UsGm.mjs.map} +1 -1
- package/dist/{bundler-BEgUKc4j.cjs → bundler-DmLJQ7AY.cjs} +5 -5
- package/dist/{bundler-BEgUKc4j.cjs.map → bundler-DmLJQ7AY.cjs.map} +1 -1
- package/dist/{cli-BvBdv660.cjs → cli-C2c-jOVK.cjs} +4 -4
- package/dist/{cli-BvBdv660.cjs.map → cli-C2c-jOVK.cjs.map} +1 -1
- package/dist/{cli-BsFenyaf.mjs → cli-Ce6NgaQF.mjs} +4 -4
- package/dist/{cli-BsFenyaf.mjs.map → cli-Ce6NgaQF.mjs.map} +1 -1
- package/dist/{compose-D2RFYd_f.mjs → compose-BJDPFBAN.mjs} +43 -47
- package/dist/compose-BJDPFBAN.mjs.map +1 -0
- package/dist/{compose-Cd09gW-n.cjs → compose-ETFKqkTu.cjs} +60 -64
- package/dist/compose-ETFKqkTu.cjs.map +1 -0
- package/dist/{config-Ngesg4O8.d.mts → config-4yirvxS8.d.cts} +4 -4
- package/dist/{config-DvHNMoOp.d.cts.map → config-4yirvxS8.d.cts.map} +1 -1
- package/dist/{config-DvHNMoOp.d.cts → config-C8NPCn1l.d.mts} +4 -4
- package/dist/{config-Ngesg4O8.d.mts.map → config-C8NPCn1l.d.mts.map} +1 -1
- package/dist/config.cjs +1 -1
- package/dist/config.d.cts +3 -3
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +1 -1
- package/dist/{credentials-DpfnUvIR.mjs → credentials-B5N5yKk6.mjs} +4 -132
- package/dist/credentials-B5N5yKk6.mjs.map +1 -0
- package/dist/{credentials-D7XJypNd.cjs → credentials-Zqr3QQYB.cjs} +3 -173
- package/dist/credentials-Zqr3QQYB.cjs.map +1 -0
- package/dist/deploy/public.cjs +16 -15
- package/dist/deploy/public.cjs.map +1 -1
- package/dist/deploy/public.d.cts +5 -5
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +5 -5
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +11 -10
- package/dist/deploy/public.mjs.map +1 -1
- package/dist/deploy-BdN0ym2i.cjs +2057 -0
- package/dist/deploy-BdN0ym2i.cjs.map +1 -0
- package/dist/deploy-DktQl7ti.mjs +2008 -0
- package/dist/deploy-DktQl7ti.mjs.map +1 -0
- package/dist/{discover-CTzOSGUF.d.cts → discover-BtFofyQB.d.cts} +2 -2
- package/dist/{discover-CTzOSGUF.d.cts.map → discover-BtFofyQB.d.cts.map} +1 -1
- package/dist/{discover-CihAtaoj.d.mts → discover-D-MdXZgm.d.mts} +2 -2
- package/dist/{discover-CihAtaoj.d.mts.map → discover-D-MdXZgm.d.mts.map} +1 -1
- package/dist/dns-BjHECDO7.mjs +44 -0
- package/dist/dns-BjHECDO7.mjs.map +1 -0
- package/dist/dns-C-X6PLkV.cjs +663 -0
- package/dist/dns-C-X6PLkV.cjs.map +1 -0
- package/dist/dns-C2EeR6n2.mjs +610 -0
- package/dist/dns-C2EeR6n2.mjs.map +1 -0
- package/dist/dns-ClI7-d5g.cjs +55 -0
- package/dist/dns-ClI7-d5g.cjs.map +1 -0
- package/dist/{dokploy-CV7GcobZ.cjs → dokploy-CD_Bc4EV.cjs} +2 -2
- package/dist/{dokploy-CV7GcobZ.cjs.map → dokploy-CD_Bc4EV.cjs.map} +1 -1
- package/dist/{dokploy-D_aat2Xj.mjs → dokploy-CxtkS5hl.mjs} +2 -2
- package/dist/{dokploy-D_aat2Xj.mjs.map → dokploy-CxtkS5hl.mjs.map} +1 -1
- package/dist/{encryption-_4qKqtTx.mjs → encryption-BgQd4f2S.mjs} +3 -3
- package/dist/{encryption-_4qKqtTx.mjs.map → encryption-BgQd4f2S.mjs.map} +1 -1
- package/dist/{encryption-DFcivJaO.cjs → encryption-CqVfz-m7.cjs} +3 -3
- package/dist/{encryption-DFcivJaO.cjs.map → encryption-CqVfz-m7.cjs.map} +1 -1
- package/dist/{engine-Bv-LZpmj.cjs → engine-OVVKtPmW.cjs} +18 -36
- package/dist/engine-OVVKtPmW.cjs.map +1 -0
- package/dist/{engine-DPMHThkg.mjs → engine-YlXzlTUl.mjs} +14 -32
- package/dist/{engine-DPMHThkg.mjs.map → engine-YlXzlTUl.mjs.map} +1 -1
- package/dist/{github-Br42NMrW.cjs → github-CsMloeSL.cjs} +9 -7
- package/dist/{github-Br42NMrW.cjs.map → github-CsMloeSL.cjs.map} +1 -1
- package/dist/{github-xsDT19im.mjs → github-DuuvqI3Z.mjs} +5 -3
- package/dist/{github-xsDT19im.mjs.map → github-DuuvqI3Z.mjs.map} +1 -1
- package/dist/{index-CwLvFqtH.d.cts → index-5eL8rM6H.d.mts} +2 -2
- package/dist/{index-BlpcClwM.d.mts.map → index-5eL8rM6H.d.mts.map} +1 -1
- package/dist/{index-BlpcClwM.d.mts → index-Dz-gyjm_.d.cts} +2 -2
- package/dist/{index-CwLvFqtH.d.cts.map → index-Dz-gyjm_.d.cts.map} +1 -1
- package/dist/index.cjs +54 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +52 -51
- package/dist/index.mjs.map +1 -1
- package/dist/{local-B7Zv1NoA.mjs → local-BwC2v2Y8.mjs} +2 -2
- package/dist/{local-B7Zv1NoA.mjs.map → local-BwC2v2Y8.mjs.map} +1 -1
- package/dist/{local-OPC9BCZt.cjs → local-DNhnkugT.cjs} +3 -3
- package/dist/{local-OPC9BCZt.cjs.map → local-DNhnkugT.cjs.map} +1 -1
- package/dist/{migrate-D5jUz20_.cjs → migrate-BAmJeVq1.cjs} +3 -3
- package/dist/{migrate-D5jUz20_.cjs.map → migrate-BAmJeVq1.cjs.map} +1 -1
- package/dist/{migrate-SkWJotn5.cjs → migrate-BdkoNdIu.cjs} +3 -3
- package/dist/{migrate-SkWJotn5.cjs.map → migrate-BdkoNdIu.cjs.map} +1 -1
- package/dist/{migrate-DhvFPGLi.mjs → migrate-CB8B6W9y.mjs} +3 -3
- package/dist/{migrate-DhvFPGLi.mjs.map → migrate-CB8B6W9y.mjs.map} +1 -1
- package/dist/{migrate-B7evHv7O.mjs → migrate-CsPFHgTs.mjs} +3 -3
- package/dist/{migrate-B7evHv7O.mjs.map → migrate-CsPFHgTs.mjs.map} +1 -1
- package/dist/openapi.cjs +1 -1
- package/dist/openapi.d.cts +1 -1
- package/dist/openapi.d.mts +1 -1
- package/dist/openapi.mjs +1 -1
- package/dist/reconcile/public.d.cts +2 -2
- package/dist/reconcile/public.d.mts +2 -2
- package/dist/{resolve-CFEOtRsl.cjs → resolve-BDatNOoG.cjs} +4 -4
- package/dist/{resolve-CFEOtRsl.cjs.map → resolve-BDatNOoG.cjs.map} +1 -1
- package/dist/{resolve-Dyd1S2wn.mjs → resolve-CUne0qOm.mjs} +4 -4
- package/dist/{resolve-Dyd1S2wn.mjs.map → resolve-CUne0qOm.mjs.map} +1 -1
- package/dist/{rollback-NroNbGC0.mjs → rollback-CCdEEEcF.mjs} +7 -8
- package/dist/{rollback-NroNbGC0.mjs.map → rollback-CCdEEEcF.mjs.map} +1 -1
- package/dist/{rollback-D720SFhV.cjs → rollback-CuG3DkTY.cjs} +8 -9
- package/dist/{rollback-D720SFhV.cjs.map → rollback-CuG3DkTY.cjs.map} +1 -1
- package/dist/run-BJLIerMM.mjs +133 -0
- package/dist/run-BJLIerMM.mjs.map +1 -0
- package/dist/run-fVZ-rLnc.cjs +174 -0
- package/dist/run-fVZ-rLnc.cjs.map +1 -0
- package/dist/{runtime-VktAo_8B.d.cts → runtime-DUQdM-mW.d.cts} +2 -2
- package/dist/{runtime-BRCq6dQ7.d.mts.map → runtime-DUQdM-mW.d.cts.map} +1 -1
- package/dist/{runtime-BRCq6dQ7.d.mts → runtime-Vr6mleo2.d.mts} +2 -2
- package/dist/{runtime-VktAo_8B.d.cts.map → runtime-Vr6mleo2.d.mts.map} +1 -1
- package/dist/{sandbox-D1gd0iDz.d.cts → sandbox-BbJmh2rI.d.cts} +2 -2
- package/dist/{sandbox-D1gd0iDz.d.cts.map → sandbox-BbJmh2rI.d.cts.map} +1 -1
- package/dist/{sandbox-zHnRLCj0.d.mts → sandbox-DGOsMPMf.d.mts} +2 -2
- package/dist/{sandbox-zHnRLCj0.d.mts.map → sandbox-DGOsMPMf.d.mts.map} +1 -1
- package/dist/{secrets-DAvi_O9g.cjs → secrets-C5qROlbp.cjs} +3 -3
- package/dist/{secrets-DAvi_O9g.cjs.map → secrets-C5qROlbp.cjs.map} +1 -1
- package/dist/{secrets-CwLauUB_.mjs → secrets-ZikTIxEm.mjs} +3 -3
- package/dist/{secrets-CwLauUB_.mjs.map → secrets-ZikTIxEm.mjs.map} +1 -1
- package/dist/{seeds-BCg8X36S.cjs → seeds-BjXW-Krf.cjs} +193 -946
- package/dist/seeds-BjXW-Krf.cjs.map +1 -0
- package/dist/{seeds-CTxTZa-R.mjs → seeds-CbJSne1A.mjs} +156 -825
- package/dist/seeds-CbJSne1A.mjs.map +1 -0
- package/dist/{sniffer-DCcuzHz_.mjs → sniffer-DQGBYY8i.mjs} +8 -8
- package/dist/{sniffer-DCcuzHz_.mjs.map → sniffer-DQGBYY8i.mjs.map} +1 -1
- package/dist/{sniffer-C0z3NB2A.cjs → sniffer-NPD1dyab.cjs} +8 -8
- package/dist/{sniffer-C0z3NB2A.cjs.map → sniffer-NPD1dyab.cjs.map} +1 -1
- package/dist/{sst-DRDSDwOk.mjs → sst-CGdjHn2A.mjs} +4 -3
- package/dist/{sst-DRDSDwOk.mjs.map → sst-CGdjHn2A.mjs.map} +1 -1
- package/dist/{sst-DKNH243z.cjs → sst-DGuHDxVU.cjs} +5 -4
- package/dist/{sst-DKNH243z.cjs.map → sst-DGuHDxVU.cjs.map} +1 -1
- package/dist/{stack-NrdH5ngX.mjs → stack-BFq3K-_z.mjs} +14 -52
- package/dist/stack-BFq3K-_z.mjs.map +1 -0
- package/dist/{stack-B3fPDTBg.cjs → stack-DOVvEd1T.cjs} +14 -52
- package/dist/stack-DOVvEd1T.cjs.map +1 -0
- package/dist/{stages-veC4TcQe.mjs → stages-BEn2ArJZ.mjs} +4 -3
- package/dist/{stages-veC4TcQe.mjs.map → stages-BEn2ArJZ.mjs.map} +1 -1
- package/dist/{stages-CkqP1N4S.cjs → stages-Cw6urZyJ.cjs} +5 -4
- package/dist/{stages-CkqP1N4S.cjs.map → stages-Cw6urZyJ.cjs.map} +1 -1
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.d.cts +2 -2
- package/dist/target/public.d.mts +2 -2
- package/dist/target/public.mjs +1 -1
- package/dist/{terminal-CkUYuAPd.cjs → terminal-CPHuH4S1.cjs} +2 -2
- package/dist/{terminal-CkUYuAPd.cjs.map → terminal-CPHuH4S1.cjs.map} +1 -1
- package/dist/{terminal-DAHs2Zko.mjs → terminal-iNmAXXjs.mjs} +2 -2
- package/dist/{terminal-DAHs2Zko.mjs.map → terminal-iNmAXXjs.mjs.map} +1 -1
- package/dist/{types-DMoaFrjg.d.mts → types-bkqVscdN.d.mts} +12 -3
- package/dist/types-bkqVscdN.d.mts.map +1 -0
- package/dist/{types-DXyaSmqu.d.cts → types-dipJRmKV.d.cts} +12 -3
- package/dist/types-dipJRmKV.d.cts.map +1 -0
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.d.cts +2 -2
- package/dist/workspace/index.d.mts +2 -2
- package/dist/workspace/index.mjs +1 -1
- package/dist/{workspace-DWK1PTXP.mjs → workspace-CqFUjObk.mjs} +54 -2
- package/dist/workspace-CqFUjObk.mjs.map +1 -0
- package/dist/{workspace-cSyi5nb1.cjs → workspace-DDkm4y6D.cjs} +71 -1
- package/dist/workspace-DDkm4y6D.cjs.map +1 -0
- package/package.json +15 -15
- package/dist/add-C85isXFl.mjs.map +0 -1
- package/dist/add-DsVDdvon.cjs.map +0 -1
- package/dist/compose-Cd09gW-n.cjs.map +0 -1
- package/dist/compose-D2RFYd_f.mjs.map +0 -1
- package/dist/credentials-D7XJypNd.cjs.map +0 -1
- package/dist/credentials-DpfnUvIR.mjs.map +0 -1
- package/dist/deploy-C911Akkn.cjs +0 -670
- package/dist/deploy-C911Akkn.cjs.map +0 -1
- package/dist/deploy-CeJ5D0xn.mjs +0 -641
- package/dist/deploy-CeJ5D0xn.mjs.map +0 -1
- package/dist/engine-Bv-LZpmj.cjs.map +0 -1
- package/dist/providers-BFeP_mYw.cjs +0 -1098
- package/dist/providers-BFeP_mYw.cjs.map +0 -1
- package/dist/providers-sTj-BG0S.mjs +0 -1079
- package/dist/providers-sTj-BG0S.mjs.map +0 -1
- package/dist/seeds-BCg8X36S.cjs.map +0 -1
- package/dist/seeds-CTxTZa-R.mjs.map +0 -1
- package/dist/stack-B3fPDTBg.cjs.map +0 -1
- package/dist/stack-NrdH5ngX.mjs.map +0 -1
- package/dist/types-DMoaFrjg.d.mts.map +0 -1
- package/dist/types-DXyaSmqu.d.cts.map +0 -1
- package/dist/workspace-DWK1PTXP.mjs.map +0 -1
- package/dist/workspace-cSyi5nb1.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { b as NormalizedAppConfig, jt as GkmError, r as GkmConfig, v as LoadedConfig, x as NormalizedWorkspace } from "./types-
|
|
2
|
-
import { n as Sandbox } from "./sandbox-
|
|
3
|
-
import "./index-
|
|
1
|
+
import { b as NormalizedAppConfig, jt as GkmError, r as GkmConfig, v as LoadedConfig, x as NormalizedWorkspace } from "./types-bkqVscdN.mjs";
|
|
2
|
+
import { n as Sandbox } from "./sandbox-DGOsMPMf.mjs";
|
|
3
|
+
import "./index-5eL8rM6H.mjs";
|
|
4
4
|
import { ConstructManifest } from "@geekmidas/manifest";
|
|
5
5
|
//#region src/dev/discovery.d.ts
|
|
6
6
|
/** Where an app is in its life. `stopped` is a server that exited on its own. */
|
|
@@ -266,4 +266,4 @@ interface WorkspaceAppInfo {
|
|
|
266
266
|
declare function loadWorkspaceAppInfo(cwd?: string): Promise<WorkspaceAppInfo>;
|
|
267
267
|
//#endregion
|
|
268
268
|
export { DiscoveredApp as C, DiscoveryResponse as D, DiscoveryEvent as E, DataApiKind as S, DiscoveredWorkspace as T, loadWorkspaceAppInfo as _, ConfigNotFound as a, parseModuleConfig as b, NotABackendApp as c, WorkspaceAppInfo as d, WorkspaceDeclaresNoConstructs as f, loadConfig as g, loadAppConfig as h, ConfigLoadFailed as i, NotInAnApp as l, findWorkspaceRoot as m, CONFIG_LOAD_TIMEOUT_MS as n, ConfigObjectNotSerializable as o, defineConfig as p, ConfigDiscoveryResult as r, LoadConfigOptions as s, AppConfigResult as t, ParsedModuleConfig as u, loadWorkspaceConfig as v, DiscoveredDataApi as w, AppStatus as x, loadWorkspaceSettings as y };
|
|
269
|
-
//# sourceMappingURL=config-
|
|
269
|
+
//# sourceMappingURL=config-C8NPCn1l.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-C8NPCn1l.d.mts","names":[],"sources":["../src/dev/discovery.ts","../src/config.ts"],"mappings":";;;;;;KAqFY;;KAGA;;;;;;UAyBK;;EAEhB;;EAEA;;UA8BgB;EAChB,MAAM;;EAEN;;EAEA;;EAEA;;UAGgB;EAChB;EACA;EACA;;EAEA;EACA;EACA,QAAQ;EACR;;EAEA;EACA,UAAU;;UAGM;;EAEhB;EACA;EACA;EACA;EACA,UAAU;;EAEV,WAAW;EACX,MAAM;;;UAIU;EAChB;;EAEA;IAAQ;IAAa;;;EAErB;EACA,YAAY;;;KAID;EACP;EAAkB,UAAU;;EAC5B;EAAiD;;EAEnD;EACA;EACA,KAAK;;;;;;;;;;;;;;;;;;;;;iBCpJQ,aAAa,QAAQ,YAAY;UAIhC;EAChB;EACA;;;;;;;;;;;;;;;;;;;iBAoBe,kBACf,sBACA,uBACE;UAac;EAChB;EACA;;;;;;;;iBAgDe,kBAAkB;;cAKrB,uBAAuB;WACd;EAArB,YAAqB;;UAaL;;;;;;;;EAQhB,UAAU;;;;;EAKV;;;;;;;cAQY;;cAGA,yBAAyB;WAE3B;WACA;EAFV,YACU,oBACA;;;;;;;cAYE,oCAAoC;WAEtC;WACA;EAFV,YACU,oBACA;;;;;;;;iBA0GW,WACrB,eACE,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuCW,sBACrB,cACA,UAAS,oBACP,QAAQ;iBAKW,oBACrB,cACA,UAAS,oBACP,QAAQ;;;;;;;;cAmEE,sCAAsC;WAC7B;EAArB,YAAqB;;UAWL;EAChB;EACA,KAAK;EACL,WAAW;EACX,WAAW;EACX;EACA;;;cAqCY,mBAAmB;WAErB;WACA,MAAM,SAAS;EAFzB,YACU,aACA,MAAM,SAAS;;;;;;;;;;;;;;;iBAoCJ,cACrB,eACE,QAAQ;;cAkBE,uBAAuB;WACd;EAArB,YAAqB;;UAQL;;EAEhB;EACA,KAAK;EACL,WAAW;EACX;;;;;;;;;iBAUqB,qBACrB,eACE,QAAQ"}
|
package/dist/config.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const require_schemas = require("./schemas-BObwxB_t.cjs");
|
|
|
4
4
|
const require_discover = require("./discover-DPgu-ScS.cjs");
|
|
5
5
|
const require_sandbox = require("./sandbox-CHv3OYXg.cjs");
|
|
6
6
|
const require_derive = require("./derive-DAbo49sm.cjs");
|
|
7
|
-
const require_workspace = require("./workspace-
|
|
7
|
+
const require_workspace = require("./workspace-DDkm4y6D.cjs");
|
|
8
8
|
let node_path = require("node:path");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
10
10
|
//#region src/config.ts
|
package/dist/config.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as WorkspaceConfig, m as DevConfig, r as GkmConfig, v as LoadedConfig } from "./types-
|
|
2
|
-
import { l as defineWorkspace } from "./index-
|
|
3
|
-
import { C as DiscoveredApp, D as DiscoveryResponse, E as DiscoveryEvent, S as DataApiKind, T as DiscoveredWorkspace, _ as loadWorkspaceAppInfo, a as ConfigNotFound, b as parseModuleConfig, c as NotABackendApp, d as WorkspaceAppInfo, f as WorkspaceDeclaresNoConstructs, g as loadConfig, h as loadAppConfig, i as ConfigLoadFailed, l as NotInAnApp, m as findWorkspaceRoot, n as CONFIG_LOAD_TIMEOUT_MS, o as ConfigObjectNotSerializable, p as defineConfig, r as ConfigDiscoveryResult, s as LoadConfigOptions, t as AppConfigResult, u as ParsedModuleConfig, v as loadWorkspaceConfig, w as DiscoveredDataApi, x as AppStatus, y as loadWorkspaceSettings } from "./config-
|
|
1
|
+
import { D as WorkspaceConfig, m as DevConfig, r as GkmConfig, v as LoadedConfig } from "./types-dipJRmKV.cjs";
|
|
2
|
+
import { l as defineWorkspace } from "./index-Dz-gyjm_.cjs";
|
|
3
|
+
import { C as DiscoveredApp, D as DiscoveryResponse, E as DiscoveryEvent, S as DataApiKind, T as DiscoveredWorkspace, _ as loadWorkspaceAppInfo, a as ConfigNotFound, b as parseModuleConfig, c as NotABackendApp, d as WorkspaceAppInfo, f as WorkspaceDeclaresNoConstructs, g as loadConfig, h as loadAppConfig, i as ConfigLoadFailed, l as NotInAnApp, m as findWorkspaceRoot, n as CONFIG_LOAD_TIMEOUT_MS, o as ConfigObjectNotSerializable, p as defineConfig, r as ConfigDiscoveryResult, s as LoadConfigOptions, t as AppConfigResult, u as ParsedModuleConfig, v as loadWorkspaceConfig, w as DiscoveredDataApi, x as AppStatus, y as loadWorkspaceSettings } from "./config-4yirvxS8.cjs";
|
|
4
4
|
export { AppConfigResult, type AppStatus, CONFIG_LOAD_TIMEOUT_MS, ConfigDiscoveryResult, ConfigLoadFailed, ConfigNotFound, ConfigObjectNotSerializable, type DataApiKind, type DevConfig, type DiscoveredApp, type DiscoveredDataApi, type DiscoveredWorkspace, type DiscoveryEvent, type DiscoveryResponse, type GkmConfig, LoadConfigOptions, type LoadedConfig, NotABackendApp, NotInAnApp, ParsedModuleConfig, WorkspaceAppInfo, type WorkspaceConfig, WorkspaceDeclaresNoConstructs, defineConfig, defineWorkspace, findWorkspaceRoot, loadAppConfig, loadConfig, loadWorkspaceAppInfo, loadWorkspaceConfig, loadWorkspaceSettings, parseModuleConfig };
|
package/dist/config.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as WorkspaceConfig, m as DevConfig, r as GkmConfig, v as LoadedConfig } from "./types-
|
|
2
|
-
import { l as defineWorkspace } from "./index-
|
|
3
|
-
import { C as DiscoveredApp, D as DiscoveryResponse, E as DiscoveryEvent, S as DataApiKind, T as DiscoveredWorkspace, _ as loadWorkspaceAppInfo, a as ConfigNotFound, b as parseModuleConfig, c as NotABackendApp, d as WorkspaceAppInfo, f as WorkspaceDeclaresNoConstructs, g as loadConfig, h as loadAppConfig, i as ConfigLoadFailed, l as NotInAnApp, m as findWorkspaceRoot, n as CONFIG_LOAD_TIMEOUT_MS, o as ConfigObjectNotSerializable, p as defineConfig, r as ConfigDiscoveryResult, s as LoadConfigOptions, t as AppConfigResult, u as ParsedModuleConfig, v as loadWorkspaceConfig, w as DiscoveredDataApi, x as AppStatus, y as loadWorkspaceSettings } from "./config-
|
|
1
|
+
import { D as WorkspaceConfig, m as DevConfig, r as GkmConfig, v as LoadedConfig } from "./types-bkqVscdN.mjs";
|
|
2
|
+
import { l as defineWorkspace } from "./index-5eL8rM6H.mjs";
|
|
3
|
+
import { C as DiscoveredApp, D as DiscoveryResponse, E as DiscoveryEvent, S as DataApiKind, T as DiscoveredWorkspace, _ as loadWorkspaceAppInfo, a as ConfigNotFound, b as parseModuleConfig, c as NotABackendApp, d as WorkspaceAppInfo, f as WorkspaceDeclaresNoConstructs, g as loadConfig, h as loadAppConfig, i as ConfigLoadFailed, l as NotInAnApp, m as findWorkspaceRoot, n as CONFIG_LOAD_TIMEOUT_MS, o as ConfigObjectNotSerializable, p as defineConfig, r as ConfigDiscoveryResult, s as LoadConfigOptions, t as AppConfigResult, u as ParsedModuleConfig, v as loadWorkspaceConfig, w as DiscoveredDataApi, x as AppStatus, y as loadWorkspaceSettings } from "./config-C8NPCn1l.mjs";
|
|
4
4
|
export { AppConfigResult, type AppStatus, CONFIG_LOAD_TIMEOUT_MS, ConfigDiscoveryResult, ConfigLoadFailed, ConfigNotFound, ConfigObjectNotSerializable, type DataApiKind, type DevConfig, type DiscoveredApp, type DiscoveredDataApi, type DiscoveredWorkspace, type DiscoveryEvent, type DiscoveryResponse, type GkmConfig, LoadConfigOptions, type LoadedConfig, NotABackendApp, NotInAnApp, ParsedModuleConfig, WorkspaceAppInfo, type WorkspaceConfig, WorkspaceDeclaresNoConstructs, defineConfig, defineWorkspace, findWorkspaceRoot, loadAppConfig, loadConfig, loadWorkspaceAppInfo, loadWorkspaceConfig, loadWorkspaceSettings, parseModuleConfig };
|
package/dist/config.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { a as discriminatedUnion, d as record, f as string, h as unknown, n as a
|
|
|
3
3
|
import { c as runWorker, d as output, r as discover } from "./discover-qjFapetL.mjs";
|
|
4
4
|
import { i as activeSandbox } from "./sandbox-CbVB7uOD.mjs";
|
|
5
5
|
import { n as derivedApps } from "./derive-B4vDpzgP.mjs";
|
|
6
|
-
import { a as allConstructGlobs, b as isWorkspaceConfig, d as getAppGkmConfig, l as defineWorkspace, m as processConfig } from "./workspace-
|
|
6
|
+
import { a as allConstructGlobs, b as isWorkspaceConfig, d as getAppGkmConfig, l as defineWorkspace, m as processConfig } from "./workspace-CqFUjObk.mjs";
|
|
7
7
|
import { dirname, join, parse, resolve, sep } from "node:path";
|
|
8
8
|
import { existsSync, realpathSync } from "node:fs";
|
|
9
9
|
//#region src/config.ts
|
|
@@ -1,26 +1,8 @@
|
|
|
1
1
|
import { t as GkmError } from "./errors-D8Gwp5kU.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { s as gkmHome } from "./run-BJLIerMM.mjs";
|
|
3
|
+
import { join } from "node:path";
|
|
3
4
|
import { existsSync, mkdirSync } from "node:fs";
|
|
4
5
|
import { readFile, writeFile } from "node:fs/promises";
|
|
5
|
-
import { homedir } from "node:os";
|
|
6
|
-
import { spawn } from "node:child_process";
|
|
7
|
-
//#region src/home.ts
|
|
8
|
-
/**
|
|
9
|
-
* Where the CLI keeps what belongs to a person rather than a project: stage
|
|
10
|
-
* keys and stored provider credentials.
|
|
11
|
-
*
|
|
12
|
-
* `GKM_HOME` names it, so a CI job, a shared build runner or a test can give
|
|
13
|
-
* every run its own instead of reaching into whoever's home directory the
|
|
14
|
-
* process happens to have. Unset, it is `~/.gkm`, where it has always been.
|
|
15
|
-
*/
|
|
16
|
-
/** The environment variable that moves the CLI's home. */
|
|
17
|
-
const GKM_HOME_ENV = "GKM_HOME";
|
|
18
|
-
/** The CLI's home: `GKM_HOME` if set, else `~/.gkm`. */
|
|
19
|
-
function gkmHome(env = process.env) {
|
|
20
|
-
const configured = env[GKM_HOME_ENV];
|
|
21
|
-
return configured ? resolve(configured) : join(homedir(), ".gkm");
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
6
|
//#region src/auth/credentials.ts
|
|
25
7
|
/**
|
|
26
8
|
* Get the path to the credentials directory
|
|
@@ -164,116 +146,6 @@ async function removeGoDaddyCredentials(options) {
|
|
|
164
146
|
return true;
|
|
165
147
|
}
|
|
166
148
|
//#endregion
|
|
167
|
-
//#region src/run.ts
|
|
168
|
-
/**
|
|
169
|
-
* Start a program with an argument array, never a shell string.
|
|
170
|
-
*
|
|
171
|
-
* `gkm build`, `gkm docker` and `gkm deploy` pass values that come from the
|
|
172
|
-
* workspace — image refs, tags, build args, package names — to `docker` and
|
|
173
|
-
* `turbo`. Joined into a string and handed to a shell, a package named
|
|
174
|
-
* `x;curl …|sh` or a tag holding `$(…)` became part of the command line, which
|
|
175
|
-
* matters most where the CLI builds a repository it didn't write: a CI job for a
|
|
176
|
-
* fork, a shared build runner. Here every value reaches the program as one
|
|
177
|
-
* `argv` element, whatever it contains.
|
|
178
|
-
*/
|
|
179
|
-
/** Long enough for a cold image build; short enough that a hung one ends. */
|
|
180
|
-
const DEFAULT_TIMEOUT_MS = 18e5;
|
|
181
|
-
/** How long a timed-out child has to exit on SIGTERM before it is killed. */
|
|
182
|
-
const KILL_GRACE_MS = 5e3;
|
|
183
|
-
/** The command line as a person would read it — for messages, never to run. */
|
|
184
|
-
function display(command, args) {
|
|
185
|
-
return [command, ...args].join(" ");
|
|
186
|
-
}
|
|
187
|
-
/** The program ran and exited unsuccessfully; its own output said why. */
|
|
188
|
-
var CommandFailed = class extends Error {
|
|
189
|
-
command;
|
|
190
|
-
args;
|
|
191
|
-
exitCode;
|
|
192
|
-
signal;
|
|
193
|
-
constructor(command, args, exitCode, signal) {
|
|
194
|
-
super(`\`${display(command, args)}\` ${exitCode === null ? `was stopped by ${signal ?? "a signal"}` : `exited with code ${exitCode}`}. Its output above says why; run it by hand to see it again.`);
|
|
195
|
-
this.command = command;
|
|
196
|
-
this.args = args;
|
|
197
|
-
this.exitCode = exitCode;
|
|
198
|
-
this.signal = signal;
|
|
199
|
-
this.name = "CommandFailed";
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
/** The program ran past its timeout and was killed. */
|
|
203
|
-
var CommandTimedOut = class extends Error {
|
|
204
|
-
command;
|
|
205
|
-
args;
|
|
206
|
-
timeoutMs;
|
|
207
|
-
constructor(command, args, timeoutMs) {
|
|
208
|
-
super(`\`${display(command, args)}\` was still running after ${Math.round(timeoutMs / 1e3)}s and was stopped. Check what it was waiting on — a registry, the Docker daemon, a prompt — and run it again.`);
|
|
209
|
-
this.command = command;
|
|
210
|
-
this.args = args;
|
|
211
|
-
this.timeoutMs = timeoutMs;
|
|
212
|
-
this.name = "CommandTimedOut";
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
/**
|
|
216
|
-
* Run `command` with `args`, resolving when it exits 0.
|
|
217
|
-
*
|
|
218
|
-
* Rejects with {@link CommandFailed} on any other exit, {@link CommandTimedOut}
|
|
219
|
-
* once `timeoutMs` passes (after the child is gone), and with the spawn error
|
|
220
|
-
* itself when the program cannot be started at all — `ENOENT` already names it.
|
|
221
|
-
*/
|
|
222
|
-
async function run(command, args, options = {}) {
|
|
223
|
-
await spawnChild(command, args, options, false);
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* {@link run}, resolving with what the program wrote to stdout — for a value
|
|
227
|
-
* the CLI reads back, such as the digest `docker inspect` reports. stderr still
|
|
228
|
-
* reaches the terminal, so a failure explains itself the same way.
|
|
229
|
-
*/
|
|
230
|
-
function runOutput(command, args, options = {}) {
|
|
231
|
-
return spawnChild(command, args, options, true);
|
|
232
|
-
}
|
|
233
|
-
function spawnChild(command, args, options, capture) {
|
|
234
|
-
const { timeoutMs = DEFAULT_TIMEOUT_MS, ...spawnOptions } = options;
|
|
235
|
-
return new Promise((resolve, reject) => {
|
|
236
|
-
const child = spawn(command, [...args], {
|
|
237
|
-
stdio: "inherit",
|
|
238
|
-
...spawnOptions,
|
|
239
|
-
...capture ? { stdio: [
|
|
240
|
-
"ignore",
|
|
241
|
-
"pipe",
|
|
242
|
-
"inherit"
|
|
243
|
-
] } : {},
|
|
244
|
-
shell: false
|
|
245
|
-
});
|
|
246
|
-
let stdout = "";
|
|
247
|
-
child.stdout?.on("data", (chunk) => {
|
|
248
|
-
stdout += chunk.toString();
|
|
249
|
-
});
|
|
250
|
-
let timedOut = false;
|
|
251
|
-
let killer;
|
|
252
|
-
const timer = setTimeout(() => {
|
|
253
|
-
timedOut = true;
|
|
254
|
-
child.kill("SIGTERM");
|
|
255
|
-
killer = setTimeout(() => child.kill("SIGKILL"), KILL_GRACE_MS);
|
|
256
|
-
killer.unref?.();
|
|
257
|
-
}, timeoutMs);
|
|
258
|
-
timer.unref?.();
|
|
259
|
-
const settle = () => {
|
|
260
|
-
clearTimeout(timer);
|
|
261
|
-
if (killer) clearTimeout(killer);
|
|
262
|
-
};
|
|
263
|
-
child.on("error", (error) => {
|
|
264
|
-
settle();
|
|
265
|
-
reject(spawnOptions.signal?.aborted ? spawnOptions.signal.reason : error);
|
|
266
|
-
});
|
|
267
|
-
child.on("close", (code, signal) => {
|
|
268
|
-
settle();
|
|
269
|
-
if (spawnOptions.signal?.aborted) reject(spawnOptions.signal.reason);
|
|
270
|
-
else if (timedOut) reject(new CommandTimedOut(command, args, timeoutMs));
|
|
271
|
-
else if (code === 0) resolve(stdout);
|
|
272
|
-
else reject(new CommandFailed(command, args, code, signal));
|
|
273
|
-
});
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
//#endregion
|
|
277
149
|
//#region src/deploy/credentials.ts
|
|
278
150
|
/**
|
|
279
151
|
* How a deploy gets the credentials it acts with.
|
|
@@ -390,6 +262,6 @@ function storedCredentials(options = {}) {
|
|
|
390
262
|
} };
|
|
391
263
|
}
|
|
392
264
|
//#endregion
|
|
393
|
-
export {
|
|
265
|
+
export { getDokployCredentials as a, getHostingerToken as c, removeGoDaddyCredentials as d, storeDokployCredentials as f, getCredentialsPath as i, readCredentials as l, storeHostingerToken as m, chainCredentials as n, getDokployRegistryId as o, storeGoDaddyToken as p, storedCredentials as r, getDokployToken as s, MissingCredential as t, removeDokployCredentials as u };
|
|
394
266
|
|
|
395
|
-
//# sourceMappingURL=credentials-
|
|
267
|
+
//# sourceMappingURL=credentials-B5N5yKk6.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials-B5N5yKk6.mjs","names":[],"sources":["../src/auth/credentials.ts","../src/deploy/credentials.ts"],"sourcesContent":["import { existsSync, mkdirSync } from 'node:fs';\nimport { readFile, unlink, writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { gkmHome } from '../home';\n\n/**\n * Stored credentials for various services\n */\nexport interface StoredCredentials {\n\tdokploy?: {\n\t\t/** API token */\n\t\ttoken: string;\n\t\t/** Dokploy endpoint URL */\n\t\tendpoint: string;\n\t\t/** Registry ID in Dokploy (for Docker image pulls) */\n\t\tregistryId?: string;\n\t\t/** When the credentials were stored */\n\t\tstoredAt: string;\n\t};\n\thostinger?: {\n\t\t/** API token from hpanel.hostinger.com/profile/api */\n\t\ttoken: string;\n\t\t/** When the credentials were stored */\n\t\tstoredAt: string;\n\t};\n\tgodaddy?: {\n\t\t/** A Personal Access Token, scoped to domains.dns:update */\n\t\ttoken: string;\n\t\t/** When the credentials were stored */\n\t\tstoredAt: string;\n\t};\n}\n\n/**\n * Options for credential operations\n */\nexport interface CredentialOptions {\n\t/**\n\t * A directory whose `.gkm` holds the credentials. Default: the CLI's home\n\t * (`GKM_HOME`, else `~/.gkm`).\n\t */\n\troot?: string;\n\t/** The CLI's home itself, holding `credentials.json`. Wins over `root`. */\n\thome?: string;\n}\n\n/**\n * Get the path to the credentials directory\n */\nexport function getCredentialsDir(options?: CredentialOptions): string {\n\tif (options?.home) return options.home;\n\treturn options?.root ? join(options.root, '.gkm') : gkmHome();\n}\n\n/**\n * Get the path to the credentials file\n */\nexport function getCredentialsPath(options?: CredentialOptions): string {\n\treturn join(getCredentialsDir(options), 'credentials.json');\n}\n\n/**\n * Ensure the credentials directory exists\n */\nfunction ensureCredentialsDir(options?: CredentialOptions): void {\n\tconst dir = getCredentialsDir(options);\n\tif (!existsSync(dir)) {\n\t\tmkdirSync(dir, { recursive: true, mode: 0o700 });\n\t}\n}\n\n/**\n * Read stored credentials from disk\n */\nexport async function readCredentials(\n\toptions?: CredentialOptions,\n): Promise<StoredCredentials> {\n\tconst path = getCredentialsPath(options);\n\n\tif (!existsSync(path)) {\n\t\treturn {};\n\t}\n\n\ttry {\n\t\tconst content = await readFile(path, 'utf-8');\n\t\treturn JSON.parse(content) as StoredCredentials;\n\t} catch {\n\t\treturn {};\n\t}\n}\n\n/**\n * Write credentials to disk\n */\nexport async function writeCredentials(\n\tcredentials: StoredCredentials,\n\toptions?: CredentialOptions,\n): Promise<void> {\n\tensureCredentialsDir(options);\n\tconst path = getCredentialsPath(options);\n\n\tawait writeFile(path, JSON.stringify(credentials, null, 2), {\n\t\tmode: 0o600, // Owner read/write only\n\t});\n}\n\n/**\n * Store Dokploy credentials\n */\nexport async function storeDokployCredentials(\n\ttoken: string,\n\tendpoint: string,\n\toptions?: CredentialOptions,\n): Promise<void> {\n\tconst credentials = await readCredentials(options);\n\n\tcredentials.dokploy = {\n\t\ttoken,\n\t\tendpoint,\n\t\tstoredAt: new Date().toISOString(),\n\t};\n\n\tawait writeCredentials(credentials, options);\n}\n\n/**\n * Get stored Dokploy credentials\n */\nexport async function getDokployCredentials(\n\toptions?: CredentialOptions,\n): Promise<{\n\ttoken: string;\n\tendpoint: string;\n\tregistryId?: string;\n} | null> {\n\tconst credentials = await readCredentials(options);\n\n\t// The environment first, and each half independently.\n\t//\n\t// `getDokployToken` has always read `DOKPLOY_API_TOKEN` while this — the\n\t// function the deploy path actually calls — read only the file. So a CI job\n\t// given the token as a secret had a token and nowhere to send it, and the\n\t// only way through was committing a credentials file or running an\n\t// interactive login on the runner.\n\t//\n\t// Read separately rather than as a pair because they arrive separately: a\n\t// token is a secret and belongs in the environment, while an endpoint is\n\t// configuration and usually belongs in `deploy.dokploy.endpoint`. Requiring\n\t// both from the same place is what made either one useless alone.\n\tconst token = process.env.DOKPLOY_API_TOKEN ?? credentials.dokploy?.token;\n\tconst endpoint =\n\t\tprocess.env.DOKPLOY_ENDPOINT ?? credentials.dokploy?.endpoint;\n\n\tif (!token || !endpoint) return null;\n\n\treturn {\n\t\ttoken,\n\t\tendpoint: endpoint.replace(/\\/$/, ''),\n\t\t...(credentials.dokploy?.registryId\n\t\t\t? { registryId: credentials.dokploy.registryId }\n\t\t\t: {}),\n\t};\n}\n\n/**\n * Remove Dokploy credentials\n */\nexport async function removeDokployCredentials(\n\toptions?: CredentialOptions,\n): Promise<boolean> {\n\tconst credentials = await readCredentials(options);\n\n\tif (!credentials.dokploy) {\n\t\treturn false;\n\t}\n\n\tdelete credentials.dokploy;\n\tawait writeCredentials(credentials, options);\n\treturn true;\n}\n\n/**\n * Remove all stored credentials\n */\nexport async function removeAllCredentials(\n\toptions?: CredentialOptions,\n): Promise<void> {\n\tconst path = getCredentialsPath(options);\n\n\tif (existsSync(path)) {\n\t\tawait unlink(path);\n\t}\n}\n\n/**\n * Get Dokploy API token, checking stored credentials first, then environment\n */\nexport async function getDokployToken(\n\toptions?: CredentialOptions,\n): Promise<string | null> {\n\t// First check environment variable (takes precedence)\n\tconst envToken = process.env.DOKPLOY_API_TOKEN;\n\tif (envToken) {\n\t\treturn envToken;\n\t}\n\n\t// Then check stored credentials\n\tconst stored = await getDokployCredentials(options);\n\tif (stored) {\n\t\treturn stored.token;\n\t}\n\n\treturn null;\n}\n\n/**\n * Get Dokploy endpoint from stored credentials\n */\nexport async function getDokployEndpoint(\n\toptions?: CredentialOptions,\n): Promise<string | null> {\n\tconst stored = await getDokployCredentials(options);\n\treturn stored?.endpoint ?? null;\n}\n\n/**\n * Store Dokploy registry ID\n */\nexport async function storeDokployRegistryId(\n\tregistryId: string,\n\toptions?: CredentialOptions,\n): Promise<void> {\n\tconst credentials = await readCredentials(options);\n\n\tif (!credentials.dokploy) {\n\t\tthrow new Error(\n\t\t\t'Dokploy credentials not found. Run \"gkm login --service dokploy\" first.',\n\t\t);\n\t}\n\n\tcredentials.dokploy.registryId = registryId;\n\tawait writeCredentials(credentials, options);\n}\n\n/**\n * Get Dokploy registry ID from stored credentials\n */\nexport async function getDokployRegistryId(\n\toptions?: CredentialOptions,\n): Promise<string | undefined> {\n\tconst stored = await getDokployCredentials(options);\n\treturn stored?.registryId ?? undefined;\n}\n\n// ============================================\n// Hostinger credentials\n// ============================================\n\n/**\n * Store Hostinger API token\n *\n * @param token - API token from hpanel.hostinger.com/profile/api\n */\nexport async function storeHostingerToken(\n\ttoken: string,\n\toptions?: CredentialOptions,\n): Promise<void> {\n\tconst credentials = await readCredentials(options);\n\n\tcredentials.hostinger = {\n\t\ttoken,\n\t\tstoredAt: new Date().toISOString(),\n\t};\n\n\tawait writeCredentials(credentials, options);\n}\n\n/**\n * Get stored Hostinger API token\n *\n * Checks environment variable first (HOSTINGER_API_TOKEN),\n * then falls back to stored credentials.\n */\nexport async function getHostingerToken(\n\toptions?: CredentialOptions,\n): Promise<string | null> {\n\t// First check environment variable (takes precedence)\n\tconst envToken = process.env.HOSTINGER_API_TOKEN;\n\tif (envToken) {\n\t\treturn envToken;\n\t}\n\n\t// Then check stored credentials\n\tconst credentials = await readCredentials(options);\n\treturn credentials.hostinger?.token ?? null;\n}\n\n/**\n * Remove Hostinger credentials\n */\nexport async function removeHostingerCredentials(\n\toptions?: CredentialOptions,\n): Promise<boolean> {\n\tconst credentials = await readCredentials(options);\n\n\tif (!credentials.hostinger) {\n\t\treturn false;\n\t}\n\n\tdelete credentials.hostinger;\n\tawait writeCredentials(credentials, options);\n\treturn true;\n}\n\n// ============================================\n// GoDaddy credentials\n// ============================================\n\n/**\n * Store a GoDaddy Personal Access Token.\n */\nexport async function storeGoDaddyToken(\n\ttoken: string,\n\toptions?: CredentialOptions,\n): Promise<void> {\n\tconst credentials = await readCredentials(options);\n\n\tcredentials.godaddy = {\n\t\ttoken,\n\t\tstoredAt: new Date().toISOString(),\n\t};\n\n\tawait writeCredentials(credentials, options);\n}\n\n/**\n * Remove GoDaddy credentials\n */\nexport async function removeGoDaddyCredentials(\n\toptions?: CredentialOptions,\n): Promise<boolean> {\n\tconst credentials = await readCredentials(options);\n\n\tif (!credentials.godaddy) {\n\t\treturn false;\n\t}\n\n\tdelete credentials.godaddy;\n\tawait writeCredentials(credentials, options);\n\treturn true;\n}\n","/**\n * How a deploy gets the credentials it acts with.\n *\n * `deploy()` never prompts and never reads a terminal: it asks a\n * `CredentialProvider` and, when the provider has nothing, stops with\n * `MissingCredential` naming what it needed and how to supply it. Whether to\n * ask a person, read a vault or fail is the caller's decision — `gkm deploy`\n * prompts at a terminal and stores what was typed; a CI job sets the\n * environment; a host passes its own provider.\n */\n\nimport { readCredentials } from '../auth/credentials';\nimport { GkmError } from '../errors';\n\n/**\n * What each kind of credential is asked for with, and what it is.\n *\n * A target that needs a kind the CLI does not know declares it by augmenting\n * this interface, and lists it in its `credentials`:\n *\n * ```ts\n * declare module '@geekmidas/cli/target' {\n * interface CredentialKinds {\n * fly: { request: { org: string }; value: { token: string } };\n * }\n * }\n * ```\n */\nexport interface CredentialKinds {\n\t/** The Dokploy API a stage deploys through. */\n\tdokploy: {\n\t\t/** `deploy.dokploy.endpoint`, when the config names one. */\n\t\trequest: { endpoint?: string };\n\t\tvalue: { endpoint: string; token: string };\n\t};\n\t/**\n\t * A container registry login, for Dokploy to pull with. Asked for only when\n\t * Dokploy has no registry for `deploy.registry` and one has to be\n\t * created.\n\t */\n\tregistry: {\n\t\t/** `deploy.registry`. */\n\t\trequest: { url: string };\n\t\tvalue: { username: string; password: string };\n\t};\n\t/**\n\t * The AWS account a stage deploys to, for the SST target's `sst deploy`.\n\t * Handed to that one command's environment and to nothing else.\n\t */\n\taws: {\n\t\t/** The stage, for a provider that keeps one account per stage. */\n\t\trequest: { stage: string };\n\t\tvalue: AwsCredential;\n\t};\n\t/**\n\t * A GoDaddy Personal Access Token, for a `dns` domain whose provider is\n\t * `godaddy`. Read on the machine that writes the records — never the\n\t * server's.\n\t */\n\tgodaddy: {\n\t\trequest: Record<never, never>;\n\t\tvalue: GoDaddyCredential;\n\t};\n\t/**\n\t * A Hostinger API token, for a `dns` domain whose provider is\n\t * `hostinger`. Like GoDaddy's, read where the records are written.\n\t */\n\thostinger: {\n\t\trequest: Record<never, never>;\n\t\tvalue: HostingerCredential;\n\t};\n}\n\n/** A Hostinger API token, from hpanel.hostinger.com/profile/api. */\nexport interface HostingerCredential {\n\ttoken: string;\n}\n\n/** A GoDaddy Personal Access Token, sent as `Authorization: Bearer <token>`. */\nexport interface GoDaddyCredential {\n\ttoken: string;\n}\n\n/**\n * Who to act as on AWS: a named profile, or keys.\n *\n * Never both. Given both, every AWS SDK takes the keys and ignores the\n * profile, so `--profile prod` with staging's keys still exported would deploy\n * production's stack into staging's account — the reason `secretsStoreFor`\n * resolves a named profile on its own, and why this cannot express the mix.\n */\nexport type AwsCredential =\n\t| {\n\t\t\t/** A profile in `~/.aws/config` — keys, SSO, an assumed role. */\n\t\t\tprofile: string;\n\t\t\tregion?: string;\n\t }\n\t| {\n\t\t\taccessKeyId: string;\n\t\t\tsecretAccessKey: string;\n\t\t\t/** Present for temporary keys: an assumed role, GitHub's OIDC. */\n\t\t\tsessionToken?: string;\n\t\t\tregion?: string;\n\t };\n\nexport type CredentialKind = keyof CredentialKinds;\n\n/** What a deploy asks a provider for. */\nexport type CredentialRequest<K extends CredentialKind = CredentialKind> = {\n\t[P in K]: { kind: P } & CredentialKinds[P]['request'];\n}[K];\n\n/** What a provider answers with. */\nexport type Credential<K extends CredentialKind> = CredentialKinds[K]['value'];\n\nexport interface CredentialProvider {\n\t/**\n\t * The credential `request` asks for, or `undefined` when this provider has\n\t * none — the deploy then raises {@link MissingCredential}.\n\t */\n\tget<K extends CredentialKind>(\n\t\trequest: CredentialRequest<K>,\n\t\toptions?: { signal?: AbortSignal },\n\t): Promise<Credential<K> | undefined>;\n}\n\n/**\n * How to supply each kind the CLI knows, for the error that says it is\n * missing. A target's own kinds are its to explain.\n */\nconst HOW_TO_PROVIDE: Partial<Record<CredentialKind, string>> = {\n\tdokploy:\n\t\t\"Set DOKPLOY_API_TOKEN (and DOKPLOY_ENDPOINT, or deploy.dokploy.endpoint in gkm.config.ts), run `gkm login --provider dokploy`, or pass them through the deploy's CredentialProvider.\",\n\tregistry:\n\t\t'Add the registry in Dokploy (Settings → Docker Registry) and set deploy.dokploy.registryId, set DOCKER_REGISTRY_USERNAME and DOCKER_REGISTRY_PASSWORD, or run `gkm deploy` at a terminal to be asked for them.',\n\tgodaddy:\n\t\t'Set GODADDY_API_TOKEN to a Personal Access Token scoped to domains.dns:update (create one in the GoDaddy developer dashboard), or run `gkm login --provider godaddy`.',\n\thostinger:\n\t\t'Set HOSTINGER_API_TOKEN to a token from hpanel.hostinger.com/profile/api, or run `gkm login --provider hostinger`.',\n\taws: \"Set AWS_PROFILE to the stage account's profile, or AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY (and AWS_SESSION_TOKEN) — in CI, the keys aws-actions/configure-aws-credentials exports — or pass them through the deploy's CredentialProvider.\",\n};\n\n/** A deploy needed a credential, and its provider had none. */\nexport class MissingCredential extends GkmError {\n\tconstructor(\n\t\treadonly kind: CredentialKind,\n\t\t/** What it was for: the Dokploy endpoint or the registry URL. */\n\t\treadonly target: string | undefined,\n\t\t/** How to supply it. */\n\t\treadonly howToProvide: string = HOW_TO_PROVIDE[kind] ??\n\t\t\t\"Pass it through the deploy's CredentialProvider.\",\n\t) {\n\t\tconst what =\n\t\t\tkind === 'dokploy'\n\t\t\t\t? `No Dokploy credentials${target ? ` for ${target}` : ''}.`\n\t\t\t\t: kind === 'registry'\n\t\t\t\t\t? `Dokploy has no registry for ${target ?? 'the configured registry'}, and there are no credentials to create one with.`\n\t\t\t\t\t: kind === 'aws'\n\t\t\t\t\t\t? `No AWS credentials${target ? ` for the \"${target}\" stage` : ''}.`\n\t\t\t\t\t\t: kind === 'godaddy'\n\t\t\t\t\t\t\t? `No GoDaddy API token${target ? ` for ${target}` : ''}.`\n\t\t\t\t\t\t\t: kind === 'hostinger'\n\t\t\t\t\t\t\t\t? `No Hostinger API token${target ? ` for ${target}` : ''}.`\n\t\t\t\t\t\t\t\t: `No \"${String(kind)}\" credentials${target ? ` for ${target}` : ''}.`;\n\t\tsuper(`${what} ${howToProvide}`);\n\t\tthis.name = 'MissingCredential';\n\t}\n}\n\n/** Whatever was asked for, from the first provider that has it. */\nexport function chainCredentials(\n\t...providers: CredentialProvider[]\n): CredentialProvider {\n\treturn {\n\t\tasync get(request, options) {\n\t\t\tfor (const provider of providers) {\n\t\t\t\tconst found = await provider.get(request, options);\n\t\t\t\tif (found) return found;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t},\n\t};\n}\n\nexport interface StoredCredentialsOptions {\n\t/** Where to read the variables from. Defaults to `process.env`. */\n\tenv?: NodeJS.ProcessEnv;\n\t/**\n\t * The CLI's home, whose `credentials.json` holds stored logins. Defaults\n\t * to `GKM_HOME`, else `~/.gkm`.\n\t */\n\thome?: string;\n}\n\n/**\n * Credentials from the environment, then from what `gkm login` stored. What\n * `deploy()` uses when it is handed no provider.\n *\n * - Dokploy: `DOKPLOY_API_TOKEN` / `DOKPLOY_ENDPOINT`, each falling back to\n * the stored login, and the endpoint finally to `deploy.dokploy.endpoint`.\n * Each half is read on its own: a token is a secret and belongs in the\n * environment, an endpoint is configuration and belongs in the config.\n * - Registry: `DOCKER_REGISTRY_USERNAME` / `DOCKER_REGISTRY_PASSWORD`.\n * - AWS: `AWS_PROFILE` when it is set, and then nothing else; otherwise\n * `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` / `AWS_SESSION_TOKEN`. The\n * profile winning is `secretsStoreFor`'s rule: a profile is a choice of\n * account someone made, exported keys may be left over from another.\n * Read here, by name, and handed only to the command that deploys — the\n * sandbox every other step runs in passes no `AWS_*` on.\n */\nexport function storedCredentials(\n\toptions: StoredCredentialsOptions = {},\n): CredentialProvider {\n\tconst env = options.env ?? process.env;\n\n\treturn {\n\t\tasync get(asked) {\n\t\t\t// The union, so a switch on `kind` narrows it: `K` itself never is.\n\t\t\tconst request = asked as CredentialRequest;\n\t\t\tswitch (request.kind) {\n\t\t\t\tcase 'dokploy': {\n\t\t\t\t\tconst stored = (\n\t\t\t\t\t\tawait readCredentials(\n\t\t\t\t\t\t\toptions.home ? { home: options.home } : undefined,\n\t\t\t\t\t\t)\n\t\t\t\t\t).dokploy;\n\t\t\t\t\tconst token = env.DOKPLOY_API_TOKEN ?? stored?.token;\n\t\t\t\t\tconst endpoint =\n\t\t\t\t\t\tenv.DOKPLOY_ENDPOINT ?? stored?.endpoint ?? request.endpoint;\n\t\t\t\t\tif (!token || !endpoint) return undefined;\n\t\t\t\t\treturn { endpoint: endpoint.replace(/\\/$/, ''), token } as never;\n\t\t\t\t}\n\t\t\t\tcase 'registry': {\n\t\t\t\t\tconst username = env.DOCKER_REGISTRY_USERNAME;\n\t\t\t\t\tconst password = env.DOCKER_REGISTRY_PASSWORD;\n\t\t\t\t\tif (!username || !password) return undefined;\n\t\t\t\t\treturn { username, password } as never;\n\t\t\t\t}\n\t\t\t\tcase 'godaddy': {\n\t\t\t\t\t// The environment first, then the stored login.\n\t\t\t\t\tconst token =\n\t\t\t\t\t\tenv.GODADDY_API_TOKEN ||\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tawait readCredentials(\n\t\t\t\t\t\t\t\toptions.home ? { home: options.home } : undefined,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t).godaddy?.token;\n\t\t\t\t\tif (!token) return undefined;\n\t\t\t\t\treturn { token } as never;\n\t\t\t\t}\n\t\t\t\tcase 'hostinger': {\n\t\t\t\t\tconst token =\n\t\t\t\t\t\tenv.HOSTINGER_API_TOKEN ||\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tawait readCredentials(\n\t\t\t\t\t\t\t\toptions.home ? { home: options.home } : undefined,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t).hostinger?.token;\n\t\t\t\t\tif (!token) return undefined;\n\t\t\t\t\treturn { token } as never;\n\t\t\t\t}\n\t\t\t\tcase 'aws': {\n\t\t\t\t\tconst region = env.AWS_REGION ?? env.AWS_DEFAULT_REGION;\n\t\t\t\t\tconst where = region ? { region } : {};\n\t\t\t\t\tif (env.AWS_PROFILE) {\n\t\t\t\t\t\treturn { profile: env.AWS_PROFILE, ...where } as never;\n\t\t\t\t\t}\n\t\t\t\t\tconst accessKeyId = env.AWS_ACCESS_KEY_ID;\n\t\t\t\t\tconst secretAccessKey = env.AWS_SECRET_ACCESS_KEY;\n\t\t\t\t\tif (!accessKeyId || !secretAccessKey) return undefined;\n\t\t\t\t\treturn {\n\t\t\t\t\t\taccessKeyId,\n\t\t\t\t\t\tsecretAccessKey,\n\t\t\t\t\t\t...(env.AWS_SESSION_TOKEN\n\t\t\t\t\t\t\t? { sessionToken: env.AWS_SESSION_TOKEN }\n\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t...where,\n\t\t\t\t\t} as never;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// A kind a target declared: nothing stored here can answer it.\n\t\t\treturn undefined;\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;AAiDA,SAAgB,kBAAkB,SAAqC;CACtE,IAAI,SAAS,MAAM,OAAO,QAAQ;CAClC,OAAO,SAAS,OAAO,KAAK,QAAQ,MAAM,MAAM,IAAI,QAAQ;AAC7D;;;;AAKA,SAAgB,mBAAmB,SAAqC;CACvE,OAAO,KAAK,kBAAkB,OAAO,GAAG,kBAAkB;AAC3D;;;;AAKA,SAAS,qBAAqB,SAAmC;CAChE,MAAM,MAAM,kBAAkB,OAAO;CACrC,IAAI,CAAC,WAAW,GAAG,GAClB,UAAU,KAAK;EAAE,WAAW;EAAM,MAAM;CAAM,CAAC;AAEjD;;;;AAKA,eAAsB,gBACrB,SAC6B;CAC7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AAS;IACZ,IAAI,CAAC,OAAO,OAAO,KAAA;IACnB,OAAO,EAAE,MAAM;GAChB;GACA,KAAK,aAAa;IACjB,MAAM,QACL,IAAI,wBAEH,MAAM,gBACL,QAAQ,OAAO,EAAE,MAAM,QAAQ,KAAK,IAAI,KAAA,CACzC,EAAA,CACC,WAAW;IACd,IAAI,CAAC,OAAO,OAAO,KAAA;IACnB,OAAO,EAAE,MAAM;GAChB;GACA,KAAK,OAAO;IACX,MAAM,SAAS,IAAI,cAAc,IAAI;IACrC,MAAM,QAAQ,SAAS,EAAE,OAAO,IAAI,CAAC;IACrC,IAAI,IAAI,aACP,OAAO;KAAE,SAAS,IAAI;KAAa,GAAG;IAAM;IAE7C,MAAM,cAAc,IAAI;IACxB,MAAM,kBAAkB,IAAI;IAC5B,IAAI,CAAC,eAAe,CAAC,iBAAiB,OAAO,KAAA;IAC7C,OAAO;KACN;KACA;KACA,GAAI,IAAI,oBACL,EAAE,cAAc,IAAI,kBAAkB,IACtC,CAAC;KACJ,GAAG;IACJ;GACD;EACD;CAGD,EACD;AACD"}
|
|
@@ -1,33 +1,15 @@
|
|
|
1
1
|
const require_errors = require("./errors-DMC4Umsb.cjs");
|
|
2
|
+
const require_run = require("./run-fVZ-rLnc.cjs");
|
|
2
3
|
let node_path = require("node:path");
|
|
3
4
|
let node_fs = require("node:fs");
|
|
4
5
|
let node_fs_promises = require("node:fs/promises");
|
|
5
|
-
let node_os = require("node:os");
|
|
6
|
-
let node_child_process = require("node:child_process");
|
|
7
|
-
//#region src/home.ts
|
|
8
|
-
/**
|
|
9
|
-
* Where the CLI keeps what belongs to a person rather than a project: stage
|
|
10
|
-
* keys and stored provider credentials.
|
|
11
|
-
*
|
|
12
|
-
* `GKM_HOME` names it, so a CI job, a shared build runner or a test can give
|
|
13
|
-
* every run its own instead of reaching into whoever's home directory the
|
|
14
|
-
* process happens to have. Unset, it is `~/.gkm`, where it has always been.
|
|
15
|
-
*/
|
|
16
|
-
/** The environment variable that moves the CLI's home. */
|
|
17
|
-
const GKM_HOME_ENV = "GKM_HOME";
|
|
18
|
-
/** The CLI's home: `GKM_HOME` if set, else `~/.gkm`. */
|
|
19
|
-
function gkmHome(env = process.env) {
|
|
20
|
-
const configured = env[GKM_HOME_ENV];
|
|
21
|
-
return configured ? (0, node_path.resolve)(configured) : (0, node_path.join)((0, node_os.homedir)(), ".gkm");
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
6
|
//#region src/auth/credentials.ts
|
|
25
7
|
/**
|
|
26
8
|
* Get the path to the credentials directory
|
|
27
9
|
*/
|
|
28
10
|
function getCredentialsDir(options) {
|
|
29
11
|
if (options?.home) return options.home;
|
|
30
|
-
return options?.root ? (0, node_path.join)(options.root, ".gkm") : gkmHome();
|
|
12
|
+
return options?.root ? (0, node_path.join)(options.root, ".gkm") : require_run.gkmHome();
|
|
31
13
|
}
|
|
32
14
|
/**
|
|
33
15
|
* Get the path to the credentials file
|
|
@@ -164,116 +146,6 @@ async function removeGoDaddyCredentials(options) {
|
|
|
164
146
|
return true;
|
|
165
147
|
}
|
|
166
148
|
//#endregion
|
|
167
|
-
//#region src/run.ts
|
|
168
|
-
/**
|
|
169
|
-
* Start a program with an argument array, never a shell string.
|
|
170
|
-
*
|
|
171
|
-
* `gkm build`, `gkm docker` and `gkm deploy` pass values that come from the
|
|
172
|
-
* workspace — image refs, tags, build args, package names — to `docker` and
|
|
173
|
-
* `turbo`. Joined into a string and handed to a shell, a package named
|
|
174
|
-
* `x;curl …|sh` or a tag holding `$(…)` became part of the command line, which
|
|
175
|
-
* matters most where the CLI builds a repository it didn't write: a CI job for a
|
|
176
|
-
* fork, a shared build runner. Here every value reaches the program as one
|
|
177
|
-
* `argv` element, whatever it contains.
|
|
178
|
-
*/
|
|
179
|
-
/** Long enough for a cold image build; short enough that a hung one ends. */
|
|
180
|
-
const DEFAULT_TIMEOUT_MS = 18e5;
|
|
181
|
-
/** How long a timed-out child has to exit on SIGTERM before it is killed. */
|
|
182
|
-
const KILL_GRACE_MS = 5e3;
|
|
183
|
-
/** The command line as a person would read it — for messages, never to run. */
|
|
184
|
-
function display(command, args) {
|
|
185
|
-
return [command, ...args].join(" ");
|
|
186
|
-
}
|
|
187
|
-
/** The program ran and exited unsuccessfully; its own output said why. */
|
|
188
|
-
var CommandFailed = class extends Error {
|
|
189
|
-
command;
|
|
190
|
-
args;
|
|
191
|
-
exitCode;
|
|
192
|
-
signal;
|
|
193
|
-
constructor(command, args, exitCode, signal) {
|
|
194
|
-
super(`\`${display(command, args)}\` ${exitCode === null ? `was stopped by ${signal ?? "a signal"}` : `exited with code ${exitCode}`}. Its output above says why; run it by hand to see it again.`);
|
|
195
|
-
this.command = command;
|
|
196
|
-
this.args = args;
|
|
197
|
-
this.exitCode = exitCode;
|
|
198
|
-
this.signal = signal;
|
|
199
|
-
this.name = "CommandFailed";
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
/** The program ran past its timeout and was killed. */
|
|
203
|
-
var CommandTimedOut = class extends Error {
|
|
204
|
-
command;
|
|
205
|
-
args;
|
|
206
|
-
timeoutMs;
|
|
207
|
-
constructor(command, args, timeoutMs) {
|
|
208
|
-
super(`\`${display(command, args)}\` was still running after ${Math.round(timeoutMs / 1e3)}s and was stopped. Check what it was waiting on — a registry, the Docker daemon, a prompt — and run it again.`);
|
|
209
|
-
this.command = command;
|
|
210
|
-
this.args = args;
|
|
211
|
-
this.timeoutMs = timeoutMs;
|
|
212
|
-
this.name = "CommandTimedOut";
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
/**
|
|
216
|
-
* Run `command` with `args`, resolving when it exits 0.
|
|
217
|
-
*
|
|
218
|
-
* Rejects with {@link CommandFailed} on any other exit, {@link CommandTimedOut}
|
|
219
|
-
* once `timeoutMs` passes (after the child is gone), and with the spawn error
|
|
220
|
-
* itself when the program cannot be started at all — `ENOENT` already names it.
|
|
221
|
-
*/
|
|
222
|
-
async function run(command, args, options = {}) {
|
|
223
|
-
await spawnChild(command, args, options, false);
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* {@link run}, resolving with what the program wrote to stdout — for a value
|
|
227
|
-
* the CLI reads back, such as the digest `docker inspect` reports. stderr still
|
|
228
|
-
* reaches the terminal, so a failure explains itself the same way.
|
|
229
|
-
*/
|
|
230
|
-
function runOutput(command, args, options = {}) {
|
|
231
|
-
return spawnChild(command, args, options, true);
|
|
232
|
-
}
|
|
233
|
-
function spawnChild(command, args, options, capture) {
|
|
234
|
-
const { timeoutMs = DEFAULT_TIMEOUT_MS, ...spawnOptions } = options;
|
|
235
|
-
return new Promise((resolve, reject) => {
|
|
236
|
-
const child = (0, node_child_process.spawn)(command, [...args], {
|
|
237
|
-
stdio: "inherit",
|
|
238
|
-
...spawnOptions,
|
|
239
|
-
...capture ? { stdio: [
|
|
240
|
-
"ignore",
|
|
241
|
-
"pipe",
|
|
242
|
-
"inherit"
|
|
243
|
-
] } : {},
|
|
244
|
-
shell: false
|
|
245
|
-
});
|
|
246
|
-
let stdout = "";
|
|
247
|
-
child.stdout?.on("data", (chunk) => {
|
|
248
|
-
stdout += chunk.toString();
|
|
249
|
-
});
|
|
250
|
-
let timedOut = false;
|
|
251
|
-
let killer;
|
|
252
|
-
const timer = setTimeout(() => {
|
|
253
|
-
timedOut = true;
|
|
254
|
-
child.kill("SIGTERM");
|
|
255
|
-
killer = setTimeout(() => child.kill("SIGKILL"), KILL_GRACE_MS);
|
|
256
|
-
killer.unref?.();
|
|
257
|
-
}, timeoutMs);
|
|
258
|
-
timer.unref?.();
|
|
259
|
-
const settle = () => {
|
|
260
|
-
clearTimeout(timer);
|
|
261
|
-
if (killer) clearTimeout(killer);
|
|
262
|
-
};
|
|
263
|
-
child.on("error", (error) => {
|
|
264
|
-
settle();
|
|
265
|
-
reject(spawnOptions.signal?.aborted ? spawnOptions.signal.reason : error);
|
|
266
|
-
});
|
|
267
|
-
child.on("close", (code, signal) => {
|
|
268
|
-
settle();
|
|
269
|
-
if (spawnOptions.signal?.aborted) reject(spawnOptions.signal.reason);
|
|
270
|
-
else if (timedOut) reject(new CommandTimedOut(command, args, timeoutMs));
|
|
271
|
-
else if (code === 0) resolve(stdout);
|
|
272
|
-
else reject(new CommandFailed(command, args, code, signal));
|
|
273
|
-
});
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
//#endregion
|
|
277
149
|
//#region src/deploy/credentials.ts
|
|
278
150
|
/**
|
|
279
151
|
* How a deploy gets the credentials it acts with.
|
|
@@ -390,30 +262,6 @@ function storedCredentials(options = {}) {
|
|
|
390
262
|
} };
|
|
391
263
|
}
|
|
392
264
|
//#endregion
|
|
393
|
-
Object.defineProperty(exports, "CommandFailed", {
|
|
394
|
-
enumerable: true,
|
|
395
|
-
get: function() {
|
|
396
|
-
return CommandFailed;
|
|
397
|
-
}
|
|
398
|
-
});
|
|
399
|
-
Object.defineProperty(exports, "CommandTimedOut", {
|
|
400
|
-
enumerable: true,
|
|
401
|
-
get: function() {
|
|
402
|
-
return CommandTimedOut;
|
|
403
|
-
}
|
|
404
|
-
});
|
|
405
|
-
Object.defineProperty(exports, "DEFAULT_TIMEOUT_MS", {
|
|
406
|
-
enumerable: true,
|
|
407
|
-
get: function() {
|
|
408
|
-
return DEFAULT_TIMEOUT_MS;
|
|
409
|
-
}
|
|
410
|
-
});
|
|
411
|
-
Object.defineProperty(exports, "GKM_HOME_ENV", {
|
|
412
|
-
enumerable: true,
|
|
413
|
-
get: function() {
|
|
414
|
-
return GKM_HOME_ENV;
|
|
415
|
-
}
|
|
416
|
-
});
|
|
417
265
|
Object.defineProperty(exports, "MissingCredential", {
|
|
418
266
|
enumerable: true,
|
|
419
267
|
get: function() {
|
|
@@ -456,12 +304,6 @@ Object.defineProperty(exports, "getHostingerToken", {
|
|
|
456
304
|
return getHostingerToken;
|
|
457
305
|
}
|
|
458
306
|
});
|
|
459
|
-
Object.defineProperty(exports, "gkmHome", {
|
|
460
|
-
enumerable: true,
|
|
461
|
-
get: function() {
|
|
462
|
-
return gkmHome;
|
|
463
|
-
}
|
|
464
|
-
});
|
|
465
307
|
Object.defineProperty(exports, "readCredentials", {
|
|
466
308
|
enumerable: true,
|
|
467
309
|
get: function() {
|
|
@@ -480,18 +322,6 @@ Object.defineProperty(exports, "removeGoDaddyCredentials", {
|
|
|
480
322
|
return removeGoDaddyCredentials;
|
|
481
323
|
}
|
|
482
324
|
});
|
|
483
|
-
Object.defineProperty(exports, "run", {
|
|
484
|
-
enumerable: true,
|
|
485
|
-
get: function() {
|
|
486
|
-
return run;
|
|
487
|
-
}
|
|
488
|
-
});
|
|
489
|
-
Object.defineProperty(exports, "runOutput", {
|
|
490
|
-
enumerable: true,
|
|
491
|
-
get: function() {
|
|
492
|
-
return runOutput;
|
|
493
|
-
}
|
|
494
|
-
});
|
|
495
325
|
Object.defineProperty(exports, "storeDokployCredentials", {
|
|
496
326
|
enumerable: true,
|
|
497
327
|
get: function() {
|
|
@@ -517,4 +347,4 @@ Object.defineProperty(exports, "storedCredentials", {
|
|
|
517
347
|
}
|
|
518
348
|
});
|
|
519
349
|
|
|
520
|
-
//# sourceMappingURL=credentials-
|
|
350
|
+
//# sourceMappingURL=credentials-Zqr3QQYB.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials-Zqr3QQYB.cjs","names":["join","gkmHome","existsSync","readFile","writeFile","GkmError"],"sources":["../src/auth/credentials.ts","../src/deploy/credentials.ts"],"sourcesContent":["import { existsSync, mkdirSync } from 'node:fs';\nimport { readFile, unlink, writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { gkmHome } from '../home';\n\n/**\n * Stored credentials for various services\n */\nexport interface StoredCredentials {\n\tdokploy?: {\n\t\t/** API token */\n\t\ttoken: string;\n\t\t/** Dokploy endpoint URL */\n\t\tendpoint: string;\n\t\t/** Registry ID in Dokploy (for Docker image pulls) */\n\t\tregistryId?: string;\n\t\t/** When the credentials were stored */\n\t\tstoredAt: string;\n\t};\n\thostinger?: {\n\t\t/** API token from hpanel.hostinger.com/profile/api */\n\t\ttoken: string;\n\t\t/** When the credentials were stored */\n\t\tstoredAt: string;\n\t};\n\tgodaddy?: {\n\t\t/** A Personal Access Token, scoped to domains.dns:update */\n\t\ttoken: string;\n\t\t/** When the credentials were stored */\n\t\tstoredAt: string;\n\t};\n}\n\n/**\n * Options for credential operations\n */\nexport interface CredentialOptions {\n\t/**\n\t * A directory whose `.gkm` holds the credentials. Default: the CLI's home\n\t * (`GKM_HOME`, else `~/.gkm`).\n\t */\n\troot?: string;\n\t/** The CLI's home itself, holding `credentials.json`. Wins over `root`. */\n\thome?: string;\n}\n\n/**\n * Get the path to the credentials directory\n */\nexport function getCredentialsDir(options?: CredentialOptions): string {\n\tif (options?.home) return options.home;\n\treturn options?.root ? join(options.root, '.gkm') : gkmHome();\n}\n\n/**\n * Get the path to the credentials file\n */\nexport function getCredentialsPath(options?: CredentialOptions): string {\n\treturn join(getCredentialsDir(options), 'credentials.json');\n}\n\n/**\n * Ensure the credentials directory exists\n */\nfunction ensureCredentialsDir(options?: CredentialOptions): void {\n\tconst dir = getCredentialsDir(options);\n\tif (!existsSync(dir)) {\n\t\tmkdirSync(dir, { recursive: true, mode: 0o700 });\n\t}\n}\n\n/**\n * Read stored credentials from disk\n */\nexport async function readCredentials(\n\toptions?: CredentialOptions,\n): Promise<StoredCredentials> {\n\tconst path = getCredentialsPath(options);\n\n\tif (!existsSync(path)) {\n\t\treturn {};\n\t}\n\n\ttry {\n\t\tconst content = await readFile(path, 'utf-8');\n\t\treturn JSON.parse(content) as StoredCredentials;\n\t} catch {\n\t\treturn {};\n\t}\n}\n\n/**\n * Write credentials to disk\n */\nexport async function writeCredentials(\n\tcredentials: StoredCredentials,\n\toptions?: CredentialOptions,\n): Promise<void> {\n\tensureCredentialsDir(options);\n\tconst path = getCredentialsPath(options);\n\n\tawait writeFile(path, JSON.stringify(credentials, null, 2), {\n\t\tmode: 0o600, // Owner read/write only\n\t});\n}\n\n/**\n * Store Dokploy credentials\n */\nexport async function storeDokployCredentials(\n\ttoken: string,\n\tendpoint: string,\n\toptions?: CredentialOptions,\n): Promise<void> {\n\tconst credentials = await readCredentials(options);\n\n\tcredentials.dokploy = {\n\t\ttoken,\n\t\tendpoint,\n\t\tstoredAt: new Date().toISOString(),\n\t};\n\n\tawait writeCredentials(credentials, options);\n}\n\n/**\n * Get stored Dokploy credentials\n */\nexport async function getDokployCredentials(\n\toptions?: CredentialOptions,\n): Promise<{\n\ttoken: string;\n\tendpoint: string;\n\tregistryId?: string;\n} | null> {\n\tconst credentials = await readCredentials(options);\n\n\t// The environment first, and each half independently.\n\t//\n\t// `getDokployToken` has always read `DOKPLOY_API_TOKEN` while this — the\n\t// function the deploy path actually calls — read only the file. So a CI job\n\t// given the token as a secret had a token and nowhere to send it, and the\n\t// only way through was committing a credentials file or running an\n\t// interactive login on the runner.\n\t//\n\t// Read separately rather than as a pair because they arrive separately: a\n\t// token is a secret and belongs in the environment, while an endpoint is\n\t// configuration and usually belongs in `deploy.dokploy.endpoint`. Requiring\n\t// both from the same place is what made either one useless alone.\n\tconst token = process.env.DOKPLOY_API_TOKEN ?? credentials.dokploy?.token;\n\tconst endpoint =\n\t\tprocess.env.DOKPLOY_ENDPOINT ?? credentials.dokploy?.endpoint;\n\n\tif (!token || !endpoint) return null;\n\n\treturn {\n\t\ttoken,\n\t\tendpoint: endpoint.replace(/\\/$/, ''),\n\t\t...(credentials.dokploy?.registryId\n\t\t\t? { registryId: credentials.dokploy.registryId }\n\t\t\t: {}),\n\t};\n}\n\n/**\n * Remove Dokploy credentials\n */\nexport async function removeDokployCredentials(\n\toptions?: CredentialOptions,\n): Promise<boolean> {\n\tconst credentials = await readCredentials(options);\n\n\tif (!credentials.dokploy) {\n\t\treturn false;\n\t}\n\n\tdelete credentials.dokploy;\n\tawait writeCredentials(credentials, options);\n\treturn true;\n}\n\n/**\n * Remove all stored credentials\n */\nexport async function removeAllCredentials(\n\toptions?: CredentialOptions,\n): Promise<void> {\n\tconst path = getCredentialsPath(options);\n\n\tif (existsSync(path)) {\n\t\tawait unlink(path);\n\t}\n}\n\n/**\n * Get Dokploy API token, checking stored credentials first, then environment\n */\nexport async function getDokployToken(\n\toptions?: CredentialOptions,\n): Promise<string | null> {\n\t// First check environment variable (takes precedence)\n\tconst envToken = process.env.DOKPLOY_API_TOKEN;\n\tif (envToken) {\n\t\treturn envToken;\n\t}\n\n\t// Then check stored credentials\n\tconst stored = await getDokployCredentials(options);\n\tif (stored) {\n\t\treturn stored.token;\n\t}\n\n\treturn null;\n}\n\n/**\n * Get Dokploy endpoint from stored credentials\n */\nexport async function getDokployEndpoint(\n\toptions?: CredentialOptions,\n): Promise<string | null> {\n\tconst stored = await getDokployCredentials(options);\n\treturn stored?.endpoint ?? null;\n}\n\n/**\n * Store Dokploy registry ID\n */\nexport async function storeDokployRegistryId(\n\tregistryId: string,\n\toptions?: CredentialOptions,\n): Promise<void> {\n\tconst credentials = await readCredentials(options);\n\n\tif (!credentials.dokploy) {\n\t\tthrow new Error(\n\t\t\t'Dokploy credentials not found. Run \"gkm login --service dokploy\" first.',\n\t\t);\n\t}\n\n\tcredentials.dokploy.registryId = registryId;\n\tawait writeCredentials(credentials, options);\n}\n\n/**\n * Get Dokploy registry ID from stored credentials\n */\nexport async function getDokployRegistryId(\n\toptions?: CredentialOptions,\n): Promise<string | undefined> {\n\tconst stored = await getDokployCredentials(options);\n\treturn stored?.registryId ?? undefined;\n}\n\n// ============================================\n// Hostinger credentials\n// ============================================\n\n/**\n * Store Hostinger API token\n *\n * @param token - API token from hpanel.hostinger.com/profile/api\n */\nexport async function storeHostingerToken(\n\ttoken: string,\n\toptions?: CredentialOptions,\n): Promise<void> {\n\tconst credentials = await readCredentials(options);\n\n\tcredentials.hostinger = {\n\t\ttoken,\n\t\tstoredAt: new Date().toISOString(),\n\t};\n\n\tawait writeCredentials(credentials, options);\n}\n\n/**\n * Get stored Hostinger API token\n *\n * Checks environment variable first (HOSTINGER_API_TOKEN),\n * then falls back to stored credentials.\n */\nexport async function getHostingerToken(\n\toptions?: CredentialOptions,\n): Promise<string | null> {\n\t// First check environment variable (takes precedence)\n\tconst envToken = process.env.HOSTINGER_API_TOKEN;\n\tif (envToken) {\n\t\treturn envToken;\n\t}\n\n\t// Then check stored credentials\n\tconst credentials = await readCredentials(options);\n\treturn credentials.hostinger?.token ?? null;\n}\n\n/**\n * Remove Hostinger credentials\n */\nexport async function removeHostingerCredentials(\n\toptions?: CredentialOptions,\n): Promise<boolean> {\n\tconst credentials = await readCredentials(options);\n\n\tif (!credentials.hostinger) {\n\t\treturn false;\n\t}\n\n\tdelete credentials.hostinger;\n\tawait writeCredentials(credentials, options);\n\treturn true;\n}\n\n// ============================================\n// GoDaddy credentials\n// ============================================\n\n/**\n * Store a GoDaddy Personal Access Token.\n */\nexport async function storeGoDaddyToken(\n\ttoken: string,\n\toptions?: CredentialOptions,\n): Promise<void> {\n\tconst credentials = await readCredentials(options);\n\n\tcredentials.godaddy = {\n\t\ttoken,\n\t\tstoredAt: new Date().toISOString(),\n\t};\n\n\tawait writeCredentials(credentials, options);\n}\n\n/**\n * Remove GoDaddy credentials\n */\nexport async function removeGoDaddyCredentials(\n\toptions?: CredentialOptions,\n): Promise<boolean> {\n\tconst credentials = await readCredentials(options);\n\n\tif (!credentials.godaddy) {\n\t\treturn false;\n\t}\n\n\tdelete credentials.godaddy;\n\tawait writeCredentials(credentials, options);\n\treturn true;\n}\n","/**\n * How a deploy gets the credentials it acts with.\n *\n * `deploy()` never prompts and never reads a terminal: it asks a\n * `CredentialProvider` and, when the provider has nothing, stops with\n * `MissingCredential` naming what it needed and how to supply it. Whether to\n * ask a person, read a vault or fail is the caller's decision — `gkm deploy`\n * prompts at a terminal and stores what was typed; a CI job sets the\n * environment; a host passes its own provider.\n */\n\nimport { readCredentials } from '../auth/credentials';\nimport { GkmError } from '../errors';\n\n/**\n * What each kind of credential is asked for with, and what it is.\n *\n * A target that needs a kind the CLI does not know declares it by augmenting\n * this interface, and lists it in its `credentials`:\n *\n * ```ts\n * declare module '@geekmidas/cli/target' {\n * interface CredentialKinds {\n * fly: { request: { org: string }; value: { token: string } };\n * }\n * }\n * ```\n */\nexport interface CredentialKinds {\n\t/** The Dokploy API a stage deploys through. */\n\tdokploy: {\n\t\t/** `deploy.dokploy.endpoint`, when the config names one. */\n\t\trequest: { endpoint?: string };\n\t\tvalue: { endpoint: string; token: string };\n\t};\n\t/**\n\t * A container registry login, for Dokploy to pull with. Asked for only when\n\t * Dokploy has no registry for `deploy.registry` and one has to be\n\t * created.\n\t */\n\tregistry: {\n\t\t/** `deploy.registry`. */\n\t\trequest: { url: string };\n\t\tvalue: { username: string; password: string };\n\t};\n\t/**\n\t * The AWS account a stage deploys to, for the SST target's `sst deploy`.\n\t * Handed to that one command's environment and to nothing else.\n\t */\n\taws: {\n\t\t/** The stage, for a provider that keeps one account per stage. */\n\t\trequest: { stage: string };\n\t\tvalue: AwsCredential;\n\t};\n\t/**\n\t * A GoDaddy Personal Access Token, for a `dns` domain whose provider is\n\t * `godaddy`. Read on the machine that writes the records — never the\n\t * server's.\n\t */\n\tgodaddy: {\n\t\trequest: Record<never, never>;\n\t\tvalue: GoDaddyCredential;\n\t};\n\t/**\n\t * A Hostinger API token, for a `dns` domain whose provider is\n\t * `hostinger`. Like GoDaddy's, read where the records are written.\n\t */\n\thostinger: {\n\t\trequest: Record<never, never>;\n\t\tvalue: HostingerCredential;\n\t};\n}\n\n/** A Hostinger API token, from hpanel.hostinger.com/profile/api. */\nexport interface HostingerCredential {\n\ttoken: string;\n}\n\n/** A GoDaddy Personal Access Token, sent as `Authorization: Bearer <token>`. */\nexport interface GoDaddyCredential {\n\ttoken: string;\n}\n\n/**\n * Who to act as on AWS: a named profile, or keys.\n *\n * Never both. Given both, every AWS SDK takes the keys and ignores the\n * profile, so `--profile prod` with staging's keys still exported would deploy\n * production's stack into staging's account — the reason `secretsStoreFor`\n * resolves a named profile on its own, and why this cannot express the mix.\n */\nexport type AwsCredential =\n\t| {\n\t\t\t/** A profile in `~/.aws/config` — keys, SSO, an assumed role. */\n\t\t\tprofile: string;\n\t\t\tregion?: string;\n\t }\n\t| {\n\t\t\taccessKeyId: string;\n\t\t\tsecretAccessKey: string;\n\t\t\t/** Present for temporary keys: an assumed role, GitHub's OIDC. */\n\t\t\tsessionToken?: string;\n\t\t\tregion?: string;\n\t };\n\nexport type CredentialKind = keyof CredentialKinds;\n\n/** What a deploy asks a provider for. */\nexport type CredentialRequest<K extends CredentialKind = CredentialKind> = {\n\t[P in K]: { kind: P } & CredentialKinds[P]['request'];\n}[K];\n\n/** What a provider answers with. */\nexport type Credential<K extends CredentialKind> = CredentialKinds[K]['value'];\n\nexport interface CredentialProvider {\n\t/**\n\t * The credential `request` asks for, or `undefined` when this provider has\n\t * none — the deploy then raises {@link MissingCredential}.\n\t */\n\tget<K extends CredentialKind>(\n\t\trequest: CredentialRequest<K>,\n\t\toptions?: { signal?: AbortSignal },\n\t): Promise<Credential<K> | undefined>;\n}\n\n/**\n * How to supply each kind the CLI knows, for the error that says it is\n * missing. A target's own kinds are its to explain.\n */\nconst HOW_TO_PROVIDE: Partial<Record<CredentialKind, string>> = {\n\tdokploy:\n\t\t\"Set DOKPLOY_API_TOKEN (and DOKPLOY_ENDPOINT, or deploy.dokploy.endpoint in gkm.config.ts), run `gkm login --provider dokploy`, or pass them through the deploy's CredentialProvider.\",\n\tregistry:\n\t\t'Add the registry in Dokploy (Settings → Docker Registry) and set deploy.dokploy.registryId, set DOCKER_REGISTRY_USERNAME and DOCKER_REGISTRY_PASSWORD, or run `gkm deploy` at a terminal to be asked for them.',\n\tgodaddy:\n\t\t'Set GODADDY_API_TOKEN to a Personal Access Token scoped to domains.dns:update (create one in the GoDaddy developer dashboard), or run `gkm login --provider godaddy`.',\n\thostinger:\n\t\t'Set HOSTINGER_API_TOKEN to a token from hpanel.hostinger.com/profile/api, or run `gkm login --provider hostinger`.',\n\taws: \"Set AWS_PROFILE to the stage account's profile, or AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY (and AWS_SESSION_TOKEN) — in CI, the keys aws-actions/configure-aws-credentials exports — or pass them through the deploy's CredentialProvider.\",\n};\n\n/** A deploy needed a credential, and its provider had none. */\nexport class MissingCredential extends GkmError {\n\tconstructor(\n\t\treadonly kind: CredentialKind,\n\t\t/** What it was for: the Dokploy endpoint or the registry URL. */\n\t\treadonly target: string | undefined,\n\t\t/** How to supply it. */\n\t\treadonly howToProvide: string = HOW_TO_PROVIDE[kind] ??\n\t\t\t\"Pass it through the deploy's CredentialProvider.\",\n\t) {\n\t\tconst what =\n\t\t\tkind === 'dokploy'\n\t\t\t\t? `No Dokploy credentials${target ? ` for ${target}` : ''}.`\n\t\t\t\t: kind === 'registry'\n\t\t\t\t\t? `Dokploy has no registry for ${target ?? 'the configured registry'}, and there are no credentials to create one with.`\n\t\t\t\t\t: kind === 'aws'\n\t\t\t\t\t\t? `No AWS credentials${target ? ` for the \"${target}\" stage` : ''}.`\n\t\t\t\t\t\t: kind === 'godaddy'\n\t\t\t\t\t\t\t? `No GoDaddy API token${target ? ` for ${target}` : ''}.`\n\t\t\t\t\t\t\t: kind === 'hostinger'\n\t\t\t\t\t\t\t\t? `No Hostinger API token${target ? ` for ${target}` : ''}.`\n\t\t\t\t\t\t\t\t: `No \"${String(kind)}\" credentials${target ? ` for ${target}` : ''}.`;\n\t\tsuper(`${what} ${howToProvide}`);\n\t\tthis.name = 'MissingCredential';\n\t}\n}\n\n/** Whatever was asked for, from the first provider that has it. */\nexport function chainCredentials(\n\t...providers: CredentialProvider[]\n): CredentialProvider {\n\treturn {\n\t\tasync get(request, options) {\n\t\t\tfor (const provider of providers) {\n\t\t\t\tconst found = await provider.get(request, options);\n\t\t\t\tif (found) return found;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t},\n\t};\n}\n\nexport interface StoredCredentialsOptions {\n\t/** Where to read the variables from. Defaults to `process.env`. */\n\tenv?: NodeJS.ProcessEnv;\n\t/**\n\t * The CLI's home, whose `credentials.json` holds stored logins. Defaults\n\t * to `GKM_HOME`, else `~/.gkm`.\n\t */\n\thome?: string;\n}\n\n/**\n * Credentials from the environment, then from what `gkm login` stored. What\n * `deploy()` uses when it is handed no provider.\n *\n * - Dokploy: `DOKPLOY_API_TOKEN` / `DOKPLOY_ENDPOINT`, each falling back to\n * the stored login, and the endpoint finally to `deploy.dokploy.endpoint`.\n * Each half is read on its own: a token is a secret and belongs in the\n * environment, an endpoint is configuration and belongs in the config.\n * - Registry: `DOCKER_REGISTRY_USERNAME` / `DOCKER_REGISTRY_PASSWORD`.\n * - AWS: `AWS_PROFILE` when it is set, and then nothing else; otherwise\n * `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` / `AWS_SESSION_TOKEN`. The\n * profile winning is `secretsStoreFor`'s rule: a profile is a choice of\n * account someone made, exported keys may be left over from another.\n * Read here, by name, and handed only to the command that deploys — the\n * sandbox every other step runs in passes no `AWS_*` on.\n */\nexport function storedCredentials(\n\toptions: StoredCredentialsOptions = {},\n): CredentialProvider {\n\tconst env = options.env ?? process.env;\n\n\treturn {\n\t\tasync get(asked) {\n\t\t\t// The union, so a switch on `kind` narrows it: `K` itself never is.\n\t\t\tconst request = asked as CredentialRequest;\n\t\t\tswitch (request.kind) {\n\t\t\t\tcase 'dokploy': {\n\t\t\t\t\tconst stored = (\n\t\t\t\t\t\tawait readCredentials(\n\t\t\t\t\t\t\toptions.home ? { home: options.home } : undefined,\n\t\t\t\t\t\t)\n\t\t\t\t\t).dokploy;\n\t\t\t\t\tconst token = env.DOKPLOY_API_TOKEN ?? stored?.token;\n\t\t\t\t\tconst endpoint =\n\t\t\t\t\t\tenv.DOKPLOY_ENDPOINT ?? stored?.endpoint ?? request.endpoint;\n\t\t\t\t\tif (!token || !endpoint) return undefined;\n\t\t\t\t\treturn { endpoint: endpoint.replace(/\\/$/, ''), token } as never;\n\t\t\t\t}\n\t\t\t\tcase 'registry': {\n\t\t\t\t\tconst username = env.DOCKER_REGISTRY_USERNAME;\n\t\t\t\t\tconst password = env.DOCKER_REGISTRY_PASSWORD;\n\t\t\t\t\tif (!username || !password) return undefined;\n\t\t\t\t\treturn { username, password } as never;\n\t\t\t\t}\n\t\t\t\tcase 'godaddy': {\n\t\t\t\t\t// The environment first, then the stored login.\n\t\t\t\t\tconst token =\n\t\t\t\t\t\tenv.GODADDY_API_TOKEN ||\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tawait readCredentials(\n\t\t\t\t\t\t\t\toptions.home ? { home: options.home } : undefined,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t).godaddy?.token;\n\t\t\t\t\tif (!token) return undefined;\n\t\t\t\t\treturn { token } as never;\n\t\t\t\t}\n\t\t\t\tcase 'hostinger': {\n\t\t\t\t\tconst token =\n\t\t\t\t\t\tenv.HOSTINGER_API_TOKEN ||\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tawait readCredentials(\n\t\t\t\t\t\t\t\toptions.home ? { home: options.home } : undefined,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t).hostinger?.token;\n\t\t\t\t\tif (!token) return undefined;\n\t\t\t\t\treturn { token } as never;\n\t\t\t\t}\n\t\t\t\tcase 'aws': {\n\t\t\t\t\tconst region = env.AWS_REGION ?? env.AWS_DEFAULT_REGION;\n\t\t\t\t\tconst where = region ? { region } : {};\n\t\t\t\t\tif (env.AWS_PROFILE) {\n\t\t\t\t\t\treturn { profile: env.AWS_PROFILE, ...where } as never;\n\t\t\t\t\t}\n\t\t\t\t\tconst accessKeyId = env.AWS_ACCESS_KEY_ID;\n\t\t\t\t\tconst secretAccessKey = env.AWS_SECRET_ACCESS_KEY;\n\t\t\t\t\tif (!accessKeyId || !secretAccessKey) return undefined;\n\t\t\t\t\treturn {\n\t\t\t\t\t\taccessKeyId,\n\t\t\t\t\t\tsecretAccessKey,\n\t\t\t\t\t\t...(env.AWS_SESSION_TOKEN\n\t\t\t\t\t\t\t? { sessionToken: env.AWS_SESSION_TOKEN }\n\t\t\t\t\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AAI;IAC5B,IAAI,CAAC,eAAe,CAAC,iBAAiB,OAAO,KAAA;IAC7C,OAAO;KACN;KACA;KACA,GAAI,IAAI,oBACL,EAAE,cAAc,IAAI,kBAAkB,IACtC,CAAC;KACJ,GAAG;IACJ;GACD;EACD;CAGD,EACD;AACD"}
|
package/dist/deploy/public.cjs
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_errors = require("../errors-DMC4Umsb.cjs");
|
|
3
|
-
const
|
|
3
|
+
const require_run = require("../run-fVZ-rLnc.cjs");
|
|
4
|
+
const require_credentials = require("../credentials-Zqr3QQYB.cjs");
|
|
4
5
|
const require_discover = require("../discover-DPgu-ScS.cjs");
|
|
5
6
|
const require_sandbox = require("../sandbox-CHv3OYXg.cjs");
|
|
6
|
-
const require_workspace = require("../workspace-
|
|
7
|
+
const require_workspace = require("../workspace-DDkm4y6D.cjs");
|
|
7
8
|
const require_define = require("../define-crmMcXFS.cjs");
|
|
8
9
|
const require_config = require("../config.cjs");
|
|
9
|
-
const require_seeds = require("../seeds-
|
|
10
|
-
const require_resolve = require("../resolve-
|
|
11
|
-
const require_local = require("../local-
|
|
12
|
-
const require_sniffer = require("../sniffer-
|
|
13
|
-
const require_deploy = require("../deploy-
|
|
14
|
-
const require_engine = require("../engine-
|
|
15
|
-
const require_rollback = require("../rollback-
|
|
10
|
+
const require_seeds = require("../seeds-BjXW-Krf.cjs");
|
|
11
|
+
const require_resolve = require("../resolve-BDatNOoG.cjs");
|
|
12
|
+
const require_local = require("../local-DNhnkugT.cjs");
|
|
13
|
+
const require_sniffer = require("../sniffer-NPD1dyab.cjs");
|
|
14
|
+
const require_deploy = require("../deploy-BdN0ym2i.cjs");
|
|
15
|
+
const require_engine = require("../engine-OVVKtPmW.cjs");
|
|
16
|
+
const require_rollback = require("../rollback-CuG3DkTY.cjs");
|
|
16
17
|
const require_provider = require("../provider-BqpjG9QM.cjs");
|
|
17
|
-
const require_sst = require("../sst-
|
|
18
|
+
const require_sst = require("../sst-DGuHDxVU.cjs");
|
|
18
19
|
let node_path = require("node:path");
|
|
19
20
|
let node_fs = require("node:fs");
|
|
20
21
|
//#region src/sandbox/install.ts
|
|
@@ -134,15 +135,15 @@ async function installDependencies(sandbox, options = {}) {
|
|
|
134
135
|
...options.signal ? { signal: options.signal } : {}
|
|
135
136
|
});
|
|
136
137
|
results.push(result);
|
|
137
|
-
if (result.exitCode !== 0) throw new
|
|
138
|
+
if (result.exitCode !== 0) throw new require_run.CommandFailed(command, args, result.exitCode, result.signal);
|
|
138
139
|
}
|
|
139
140
|
return results;
|
|
140
141
|
}
|
|
141
142
|
//#endregion
|
|
142
143
|
exports.AllowDevServicesTakesNoValue = require_seeds.AllowDevServicesTakesNoValue;
|
|
143
144
|
exports.BackendDeployFailed = require_engine.BackendDeployFailed;
|
|
144
|
-
exports.CommandFailed =
|
|
145
|
-
exports.CommandTimedOut =
|
|
145
|
+
exports.CommandFailed = require_run.CommandFailed;
|
|
146
|
+
exports.CommandTimedOut = require_run.CommandTimedOut;
|
|
146
147
|
exports.ConfigLoadFailed = require_config.ConfigLoadFailed;
|
|
147
148
|
exports.ConfigObjectNotSerializable = require_config.ConfigObjectNotSerializable;
|
|
148
149
|
exports.ConstructDiscoveryFailed = require_discover.ConstructDiscoveryFailed;
|
|
@@ -156,7 +157,7 @@ exports.DeploymentTimedOut = require_sniffer.DeploymentTimedOut;
|
|
|
156
157
|
exports.DevServicesNeedServerTarget = require_seeds.DevServicesNeedServerTarget;
|
|
157
158
|
exports.ExternalServicesNotConfigured = require_seeds.ExternalServicesNotConfigured;
|
|
158
159
|
exports.FrontendDeployFailed = require_engine.FrontendDeployFailed;
|
|
159
|
-
exports.GKM_HOME_ENV =
|
|
160
|
+
exports.GKM_HOME_ENV = require_run.GKM_HOME_ENV;
|
|
160
161
|
exports.HealthCheckTimedOut = require_engine.HealthCheckTimedOut;
|
|
161
162
|
exports.INSTALL_TIMEOUT_MS = INSTALL_TIMEOUT_MS;
|
|
162
163
|
exports.InstallAllowlistNameInvalid = InstallAllowlistNameInvalid;
|
|
@@ -202,7 +203,7 @@ exports.chainCredentials = require_credentials.chainCredentials;
|
|
|
202
203
|
exports.confineCwd = require_sandbox.confineCwd;
|
|
203
204
|
exports.deploy = require_deploy.deploy;
|
|
204
205
|
exports.deployIdentity = require_seeds.deployIdentity;
|
|
205
|
-
exports.gkmHome =
|
|
206
|
+
exports.gkmHome = require_run.gkmHome;
|
|
206
207
|
exports.installDependencies = installDependencies;
|
|
207
208
|
exports.rollbackStage = require_rollback.rollbackStage;
|
|
208
209
|
exports.storedCredentials = require_credentials.storedCredentials;
|