@geekmidas/cli 10.0.0-alpha.62 → 10.0.0-alpha.64
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/README.md +2 -0
- package/dist/{HostingerProvider-DyD1Hin8.cjs → HostingerProvider-Bx2lHHvu.cjs} +3 -3
- package/dist/{HostingerProvider-DyD1Hin8.cjs.map → HostingerProvider-Bx2lHHvu.cjs.map} +1 -1
- package/dist/{HostingerProvider-B92qH4dC.mjs → HostingerProvider-Cd4aS5Kj.mjs} +2 -2
- package/dist/{HostingerProvider-B92qH4dC.mjs.map → HostingerProvider-Cd4aS5Kj.mjs.map} +1 -1
- package/dist/{LegacyStateStore-UHJEBLdn.cjs → LegacyStateStore-C2abV49N.cjs} +2 -2
- package/dist/{LegacyStateStore-UHJEBLdn.cjs.map → LegacyStateStore-C2abV49N.cjs.map} +1 -1
- package/dist/{LegacyStateStore-A8d2GdT7.mjs → LegacyStateStore-DIgkGaUP.mjs} +2 -2
- package/dist/{LegacyStateStore-A8d2GdT7.mjs.map → LegacyStateStore-DIgkGaUP.mjs.map} +1 -1
- package/dist/{LocalStateStore-B51rnfgn.mjs → LocalStateStore-Cy1ZBW7U.mjs} +2 -2
- package/dist/{LocalStateStore-B51rnfgn.mjs.map → LocalStateStore-Cy1ZBW7U.mjs.map} +1 -1
- package/dist/{LocalStateStore-COW3Ldwa.cjs → LocalStateStore-DiJqKyPy.cjs} +2 -2
- package/dist/{LocalStateStore-COW3Ldwa.cjs.map → LocalStateStore-DiJqKyPy.cjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-BSrgw7B0.cjs → OpenApiTsGenerator-BWuDRHe9.cjs} +2 -2
- package/dist/{OpenApiTsGenerator-BSrgw7B0.cjs.map → OpenApiTsGenerator-BWuDRHe9.cjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-q5B0z8Xg.mjs → OpenApiTsGenerator-C6v-IeHt.mjs} +2 -2
- package/dist/{OpenApiTsGenerator-q5B0z8Xg.mjs.map → OpenApiTsGenerator-C6v-IeHt.mjs.map} +1 -1
- package/dist/{S3StateStore-CJewPhgz.mjs → S3StateStore-D3x6ivBL.mjs} +2 -2
- package/dist/{S3StateStore-CJewPhgz.mjs.map → S3StateStore-D3x6ivBL.mjs.map} +1 -1
- package/dist/{S3StateStore-WUJGdRNL.cjs → S3StateStore-Ds0V1Lgm.cjs} +2 -2
- package/dist/{S3StateStore-WUJGdRNL.cjs.map → S3StateStore-Ds0V1Lgm.cjs.map} +1 -1
- package/dist/{SSMStateStore-Zejt42V8.cjs → SSMStateStore-CLipvx47.cjs} +2 -2
- package/dist/{SSMStateStore-Zejt42V8.cjs.map → SSMStateStore-CLipvx47.cjs.map} +1 -1
- package/dist/{SSMStateStore-iK5UKp9d.mjs → SSMStateStore-DfF174xQ.mjs} +2 -2
- package/dist/{SSMStateStore-iK5UKp9d.mjs.map → SSMStateStore-DfF174xQ.mjs.map} +1 -1
- package/dist/{bundler-CfH9frOS.cjs → bundler-C8uJf324.cjs} +4 -4
- package/dist/{bundler-CfH9frOS.cjs.map → bundler-C8uJf324.cjs.map} +1 -1
- package/dist/{bundler-DN5r4x5b.mjs → bundler-DYgm9xsd.mjs} +3 -3
- package/dist/{bundler-DN5r4x5b.mjs.map → bundler-DYgm9xsd.mjs.map} +1 -1
- package/dist/{cli-DYwxmfsW.mjs → cli-Bogz-zEj.mjs} +5 -4
- package/dist/{cli-DYwxmfsW.mjs.map → cli-Bogz-zEj.mjs.map} +1 -1
- package/dist/{cli-DOAUp80L.cjs → cli-D3jofJ6j.cjs} +7 -6
- package/dist/{cli-DOAUp80L.cjs.map → cli-D3jofJ6j.cjs.map} +1 -1
- package/dist/config-Be-4_I6H.d.cts +256 -0
- package/dist/config-Be-4_I6H.d.cts.map +1 -0
- package/dist/config-DqNRiQOp.d.mts +256 -0
- package/dist/config-DqNRiQOp.d.mts.map +1 -0
- package/dist/config.cjs +416 -13
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +4 -211
- package/dist/config.d.mts +4 -211
- package/dist/config.mjs +402 -3
- package/dist/config.mjs.map +1 -0
- package/dist/credentials-B70vmLcm.cjs +125 -0
- package/dist/credentials-B70vmLcm.cjs.map +1 -0
- package/dist/credentials-s0wMeZBU.mjs +108 -0
- package/dist/credentials-s0wMeZBU.mjs.map +1 -0
- package/dist/{define-CHBIEc5j.mjs → define-CYs0PEfZ.mjs} +2 -3
- package/dist/define-CYs0PEfZ.mjs.map +1 -0
- package/dist/{define-Cv_QvDrg.cjs → define-zUsP72ym.cjs} +2 -3
- package/dist/define-zUsP72ym.cjs.map +1 -0
- package/dist/deploy/public.cjs +166 -14
- package/dist/deploy/public.cjs.map +1 -0
- package/dist/deploy/public.d.cts +224 -3
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +224 -3
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +141 -10
- package/dist/deploy/public.mjs.map +1 -0
- package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
- package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
- package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
- package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
- package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
- package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
- package/dist/{deploy-DSaCYvcO.cjs → deploy-55rJkdKz.cjs} +17 -14
- package/dist/{deploy-DSaCYvcO.cjs.map → deploy-55rJkdKz.cjs.map} +1 -1
- package/dist/{deploy-Cg9fae7a.mjs → deploy-Dc2LBJaK.mjs} +13 -10
- package/dist/deploy-Dc2LBJaK.mjs.map +1 -0
- package/dist/{deploy-B7jvUORo.mjs → deploy-ZRXIPp1c.mjs} +11 -8
- package/dist/{deploy-B7jvUORo.mjs.map → deploy-ZRXIPp1c.mjs.map} +1 -1
- package/dist/{deploy-D8Qr-Xto.cjs → deploy-yUcR2OlW.cjs} +15 -12
- package/dist/deploy-yUcR2OlW.cjs.map +1 -0
- package/dist/derive-B4vDpzgP.mjs +150 -0
- package/dist/derive-B4vDpzgP.mjs.map +1 -0
- package/dist/derive-DAbo49sm.cjs +161 -0
- package/dist/derive-DAbo49sm.cjs.map +1 -0
- package/dist/discover-B6yPpvRV.d.mts +99 -0
- package/dist/discover-B6yPpvRV.d.mts.map +1 -0
- package/dist/discover-B_IkPukx.d.cts +99 -0
- package/dist/discover-B_IkPukx.d.cts.map +1 -0
- package/dist/{discover-Bc-4eA_p.cjs → discover-DHdECueV.cjs} +280 -1
- package/dist/discover-DHdECueV.cjs.map +1 -0
- package/dist/{discover-FrYvzkeC.mjs → discover-LMrqsWSU.mjs} +246 -3
- package/dist/discover-LMrqsWSU.mjs.map +1 -0
- package/dist/{dokploy-CD9PY-3D.mjs → dokploy-CepdXuMl.mjs} +3 -3
- package/dist/{dokploy-CD9PY-3D.mjs.map → dokploy-CepdXuMl.mjs.map} +1 -1
- package/dist/{dokploy-Ey2foJLv.cjs → dokploy-D1d37rvM.cjs} +3 -3
- package/dist/{dokploy-Ey2foJLv.cjs.map → dokploy-D1d37rvM.cjs.map} +1 -1
- package/dist/{encryption-ChBk3hTj.cjs → encryption-C9X98u2F.cjs} +5 -5
- package/dist/{encryption-ChBk3hTj.cjs.map → encryption-C9X98u2F.cjs.map} +1 -1
- package/dist/{encryption-CVwvGbsL.mjs → encryption-CKHjMpCr.mjs} +5 -5
- package/dist/{encryption-CVwvGbsL.mjs.map → encryption-CKHjMpCr.mjs.map} +1 -1
- package/dist/fakes-C9RiT6XG.mjs.map +1 -1
- package/dist/fakes-zW-jNAbQ.cjs.map +1 -1
- package/dist/{github-BCB3_LBX.mjs → github-D-byNI7T.mjs} +4 -4
- package/dist/{github-BCB3_LBX.mjs.map → github-D-byNI7T.mjs.map} +1 -1
- package/dist/{github-OUgPDlqg.cjs → github-Dd3tMa1u.cjs} +4 -4
- package/dist/{github-OUgPDlqg.cjs.map → github-Dd3tMa1u.cjs.map} +1 -1
- package/dist/{index-BtXDZQuF.d.cts → index-CJ2qsSpp.d.mts} +2 -2
- package/dist/{index-BtXDZQuF.d.cts.map → index-CJ2qsSpp.d.mts.map} +1 -1
- package/dist/{index-DrKzpHl-.d.mts → index-CfE9Y885.d.cts} +2 -2
- package/dist/{index-DrKzpHl-.d.mts.map → index-CfE9Y885.d.cts.map} +1 -1
- package/dist/index.cjs +111 -239
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +82 -210
- package/dist/index.mjs.map +1 -1
- package/dist/local-C7wnrcYK.cjs +586 -0
- package/dist/local-C7wnrcYK.cjs.map +1 -0
- package/dist/local-Cd8ZYQG3.mjs +473 -0
- package/dist/local-Cd8ZYQG3.mjs.map +1 -0
- package/dist/{migrate-BoHMqdCu.mjs → migrate-B4gngTLe.mjs} +6 -6
- package/dist/{migrate-BoHMqdCu.mjs.map → migrate-B4gngTLe.mjs.map} +1 -1
- package/dist/{migrate-dnaFMvOm.cjs → migrate-tx9-P9uz.cjs} +6 -6
- package/dist/{migrate-dnaFMvOm.cjs.map → migrate-tx9-P9uz.cjs.map} +1 -1
- package/dist/openapi.cjs +3 -3
- package/dist/openapi.d.cts +1 -1
- package/dist/openapi.d.mts +1 -1
- package/dist/openapi.mjs +3 -3
- package/dist/{ready-DQIy21W5.mjs → ready-bQfu9GES.mjs} +3 -3
- package/dist/{ready-DQIy21W5.mjs.map → ready-bQfu9GES.mjs.map} +1 -1
- package/dist/{ready-XlNx-Gbo.cjs → ready-brEhh68f.cjs} +3 -3
- package/dist/{ready-XlNx-Gbo.cjs.map → ready-brEhh68f.cjs.map} +1 -1
- package/dist/reconcile/public.cjs +1 -1
- package/dist/reconcile/public.d.cts +4 -77
- package/dist/reconcile/public.d.cts.map +1 -1
- package/dist/reconcile/public.d.mts +4 -77
- package/dist/reconcile/public.d.mts.map +1 -1
- package/dist/reconcile/public.mjs +1 -1
- package/dist/{resolve-wbv66HjD.cjs → resolve-BXsNQjMR.cjs} +9 -6
- package/dist/resolve-BXsNQjMR.cjs.map +1 -0
- package/dist/{resolve-CFCIkm7m.mjs → resolve-DZ2IJ0qY.mjs} +9 -6
- package/dist/resolve-DZ2IJ0qY.mjs.map +1 -0
- package/dist/{runtime-CMwtq0AL.cjs → runtime-BGNDrHzh.cjs} +2 -2
- package/dist/{runtime-CMwtq0AL.cjs.map → runtime-BGNDrHzh.cjs.map} +1 -1
- package/dist/{runtime-Dn_n-29S.d.cts → runtime-CJEYK4Gz.d.mts} +2 -2
- package/dist/{runtime-CXPlkZzs.d.mts.map → runtime-CJEYK4Gz.d.mts.map} +1 -1
- package/dist/{runtime-CXPlkZzs.d.mts → runtime-Cjq1jlVX.d.cts} +2 -2
- package/dist/{runtime-Dn_n-29S.d.cts.map → runtime-Cjq1jlVX.d.cts.map} +1 -1
- package/dist/{runtime-DbakJS8u.mjs → runtime-Cmn-FeYO.mjs} +2 -2
- package/dist/{runtime-DbakJS8u.mjs.map → runtime-Cmn-FeYO.mjs.map} +1 -1
- package/dist/sandbox/config-worker.cjs +43 -0
- package/dist/sandbox/config-worker.cjs.map +1 -0
- package/dist/sandbox/config-worker.d.cts +1 -0
- package/dist/sandbox/config-worker.d.mts +1 -0
- package/dist/sandbox/config-worker.mjs +44 -0
- package/dist/sandbox/config-worker.mjs.map +1 -0
- package/dist/sandbox/discover-worker.cjs +44 -0
- package/dist/sandbox/discover-worker.cjs.map +1 -0
- package/dist/sandbox/discover-worker.d.cts +1 -0
- package/dist/sandbox/discover-worker.d.mts +1 -0
- package/dist/sandbox/discover-worker.mjs +45 -0
- package/dist/sandbox/discover-worker.mjs.map +1 -0
- package/dist/sandbox-CL--ZDui.cjs +164 -0
- package/dist/sandbox-CL--ZDui.cjs.map +1 -0
- package/dist/sandbox-Dm247NGx.mjs +117 -0
- package/dist/sandbox-Dm247NGx.mjs.map +1 -0
- package/dist/sandbox-M8UnLhXE.d.cts +126 -0
- package/dist/sandbox-M8UnLhXE.d.cts.map +1 -0
- package/dist/sandbox-M8UnLhXE.d.mts +126 -0
- package/dist/sandbox-M8UnLhXE.d.mts.map +1 -0
- package/dist/{workspace-BFe57es7.mjs → schemas-Ckm_aBnF.cjs} +71 -982
- package/dist/schemas-Ckm_aBnF.cjs.map +1 -0
- package/dist/{workspace-B6zQO6RY.cjs → schemas-D2LCF689.mjs} +2 -1168
- package/dist/schemas-D2LCF689.mjs.map +1 -0
- package/dist/{sniffer-DHE2Nafd.mjs → sniffer-49KPbDgq.mjs} +131 -444
- package/dist/sniffer-49KPbDgq.mjs.map +1 -0
- package/dist/{sniffer-BsfPa-GA.cjs → sniffer-ByhbEW5A.cjs} +145 -512
- package/dist/sniffer-ByhbEW5A.cjs.map +1 -0
- package/dist/sst-BdALKEas.cjs +453 -0
- package/dist/sst-BdALKEas.cjs.map +1 -0
- package/dist/sst-Cper040I.mjs +430 -0
- package/dist/sst-Cper040I.mjs.map +1 -0
- package/dist/{store-BS8A7NcA.mjs → store-BaaonhkJ.mjs} +2 -2
- package/dist/{store-BS8A7NcA.mjs.map → store-BaaonhkJ.mjs.map} +1 -1
- package/dist/{store-KvNQwYaB.cjs → store-D_2ByRtW.cjs} +4 -4
- package/dist/{store-KvNQwYaB.cjs.map → store-D_2ByRtW.cjs.map} +1 -1
- package/dist/target/public.cjs +3 -3
- package/dist/target/public.d.cts +3 -3
- package/dist/target/public.d.mts +3 -3
- package/dist/target/public.mjs +3 -3
- package/dist/{terminal-6oL0vANs.cjs → terminal-Bdv--jhY.cjs} +16 -111
- package/dist/terminal-Bdv--jhY.cjs.map +1 -0
- package/dist/{terminal-ByZNjuig.mjs → terminal-D7Ntz6WE.mjs} +13 -90
- package/dist/terminal-D7Ntz6WE.mjs.map +1 -0
- package/dist/{types-DIA7Li-J.d.cts → types-B_bEQvb9.d.mts} +42 -7
- package/dist/types-B_bEQvb9.d.mts.map +1 -0
- package/dist/{types-CfLKGfC_.d.mts → types-DkrDOMxw.d.cts} +43 -6
- package/dist/types-DkrDOMxw.d.cts.map +1 -0
- package/dist/utils-D2Nk1Nv2.cjs +205 -0
- package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
- package/dist/utils-D_fxUqvU.mjs +156 -0
- package/dist/utils-D_fxUqvU.mjs.map +1 -0
- package/dist/vitest.cjs +2 -2
- package/dist/vitest.mjs +2 -2
- package/dist/workerRuntime-BXfhbe13.cjs +108 -0
- package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
- package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
- package/dist/workerRuntime-CsOyBRx2.mjs.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-BwgWJK7h.cjs +1196 -0
- package/dist/workspace-BwgWJK7h.cjs.map +1 -0
- package/dist/workspace-Bwit4q9O.mjs +1024 -0
- package/dist/workspace-Bwit4q9O.mjs.map +1 -0
- package/package.json +13 -13
- package/dist/config-BYh9S0cZ.cjs +0 -534
- package/dist/config-BYh9S0cZ.cjs.map +0 -1
- package/dist/config-Bf4-bROQ.mjs +0 -457
- package/dist/config-Bf4-bROQ.mjs.map +0 -1
- package/dist/config.d.cts.map +0 -1
- package/dist/config.d.mts.map +0 -1
- package/dist/define-CHBIEc5j.mjs.map +0 -1
- package/dist/define-Cv_QvDrg.cjs.map +0 -1
- package/dist/deploy-Cg9fae7a.mjs.map +0 -1
- package/dist/deploy-D8Qr-Xto.cjs.map +0 -1
- package/dist/discover-Bc-4eA_p.cjs.map +0 -1
- package/dist/discover-FrYvzkeC.mjs.map +0 -1
- package/dist/home-DOzBaWaL.cjs +0 -33
- package/dist/home-DOzBaWaL.cjs.map +0 -1
- package/dist/home-GI7pJl1M.mjs +0 -22
- package/dist/home-GI7pJl1M.mjs.map +0 -1
- package/dist/resolve-CFCIkm7m.mjs.map +0 -1
- package/dist/resolve-wbv66HjD.cjs.map +0 -1
- package/dist/sniffer-BsfPa-GA.cjs.map +0 -1
- package/dist/sniffer-DHE2Nafd.mjs.map +0 -1
- package/dist/terminal-6oL0vANs.cjs.map +0 -1
- package/dist/terminal-ByZNjuig.mjs.map +0 -1
- package/dist/types-CfLKGfC_.d.mts.map +0 -1
- package/dist/types-DIA7Li-J.d.cts.map +0 -1
- package/dist/workspace-B6zQO6RY.cjs.map +0 -1
- package/dist/workspace-BFe57es7.mjs.map +0 -1
package/dist/deploy/public.d.cts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { $ as DeployEventError, Q as DeployEvent,
|
|
2
|
-
import { a as
|
|
1
|
+
import { $ as DeployEventError, Q as DeployEvent, at as DeployResult, bt as DeployIdentity, ct as CredentialKind, dt as CredentialRequest, et as DeployEventType, ft as MissingCredential, gt as StateLocked, ht as storedCredentials, it as AppDeployResult, lt as CredentialKinds, mt as chainCredentials, nt as ResourceChange, ot as AwsCredential, pt as StoredCredentialsOptions, rt as ResourceVia, st as Credential, tt as DeployPhase, ut as CredentialProvider, vt as StateVersionConflict, xt as deployIdentity, z as AnyDeployTarget } from "../types-DkrDOMxw.cjs";
|
|
2
|
+
import { a as SandboxOutput, c as confineCwd, i as SandboxExecOptions, n as Sandbox, o as SandboxResult, r as SandboxCwdEscape, s as SecretNameInvalid, t as SECRETS_DIR_ENV } from "../sandbox-M8UnLhXE.cjs";
|
|
3
|
+
import { i as ConfigLoadFailed, o as ConfigObjectNotSerializable } from "../config-Be-4_I6H.cjs";
|
|
4
|
+
import { n as ConstructsNotSerializable, t as ConstructDiscoveryFailed } from "../discover-B_IkPukx.cjs";
|
|
5
|
+
import { a as TargetRuntimeMismatch, c as DeployTargetNotYetSupported, i as TargetPackageInvalid, l as UnknownDeployTarget, n as InvalidTargetOptions, o as ProviderRemoved, r as TargetEntryInvalid, s as TargetPackageNotFound, t as TargetRuntimeUndeclared } from "../runtime-Cjq1jlVX.cjs";
|
|
3
6
|
import { ConstructManifest } from "@geekmidas/manifest";
|
|
4
7
|
import "@geekmidas/envkit/sniffer";
|
|
5
8
|
//#region src/home.d.ts
|
|
@@ -16,6 +19,212 @@ export declare const GKM_HOME_ENV = "GKM_HOME";
|
|
|
16
19
|
/** The CLI's home: `GKM_HOME` if set, else `~/.gkm`. */
|
|
17
20
|
export declare function gkmHome(env?: NodeJS.ProcessEnv): string;
|
|
18
21
|
//#endregion
|
|
22
|
+
//#region src/run.d.ts
|
|
23
|
+
/** The program ran and exited unsuccessfully; its own output said why. */
|
|
24
|
+
export declare class CommandFailed extends Error {
|
|
25
|
+
readonly command: string;
|
|
26
|
+
readonly args: readonly string[];
|
|
27
|
+
readonly exitCode: number | null;
|
|
28
|
+
readonly signal: NodeJS.Signals | null;
|
|
29
|
+
constructor(command: string, args: readonly string[], exitCode: number | null, signal: NodeJS.Signals | null);
|
|
30
|
+
}
|
|
31
|
+
/** The program ran past its timeout and was killed. */
|
|
32
|
+
export declare class CommandTimedOut extends Error {
|
|
33
|
+
readonly command: string;
|
|
34
|
+
readonly args: readonly string[];
|
|
35
|
+
readonly timeoutMs: number;
|
|
36
|
+
constructor(command: string, args: readonly string[], timeoutMs: number);
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/sandbox/env.d.ts
|
|
40
|
+
/**
|
|
41
|
+
* What of the host's environment a local sandbox passes on.
|
|
42
|
+
*
|
|
43
|
+
* An allowlist, not a denylist: a credential's variable has any name its
|
|
44
|
+
* owner chose (`DOKPLOY_TOKEN`, `AWS_SECRET_ACCESS_KEY`, `MY_VAULT_TOKEN`), so
|
|
45
|
+
* the only safe default is to name what a program needs to *run* and pass
|
|
46
|
+
* nothing else.
|
|
47
|
+
*/
|
|
48
|
+
/**
|
|
49
|
+
* Variables a command needs to find programs, write temp files, print in the
|
|
50
|
+
* user's locale and reach the network through the host's proxy — and nothing
|
|
51
|
+
* that authenticates as anyone.
|
|
52
|
+
*
|
|
53
|
+
* Deliberately left out:
|
|
54
|
+
* - `NODE_OPTIONS`: it can `--require` or `--import` code into every node
|
|
55
|
+
* process, and CI often holds `--import tsx` there. A step that needs a
|
|
56
|
+
* loader passes its own.
|
|
57
|
+
* - `NODE_AUTH_TOKEN`, `NPM_TOKEN`, `npm_config_*`: registry tokens
|
|
58
|
+
* (`actions/setup-node` writes `NODE_AUTH_TOKEN`), which is why there is no
|
|
59
|
+
* `NODE_*` wildcard.
|
|
60
|
+
* - `AWS_*`, `DOCKER_*`, `DOKPLOY_*`, `GITHUB_TOKEN`, `TURBO_TOKEN`, `GKM_*`:
|
|
61
|
+
* credentials, or where the deploy keeps them.
|
|
62
|
+
* - `SHELL`, `EDITOR` and the rest of a login session: nothing here starts a
|
|
63
|
+
* shell.
|
|
64
|
+
*
|
|
65
|
+
* Proxies are passed: behind one, nothing installs or builds without it. A
|
|
66
|
+
* proxy URL with a password in it reaches the command too — a host that keeps
|
|
67
|
+
* one there and builds code it does not trust should pass a sandbox of its
|
|
68
|
+
* own.
|
|
69
|
+
*/
|
|
70
|
+
export declare const SANDBOX_ENV_ALLOWLIST: readonly (string | RegExp)[];
|
|
71
|
+
/**
|
|
72
|
+
* The allowlisted part of `source`, plus each of `extra` the host chose to
|
|
73
|
+
* pass on by name.
|
|
74
|
+
*/
|
|
75
|
+
export declare function allowlistedEnv(source?: NodeJS.ProcessEnv, extra?: readonly string[]): Record<string, string>;
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region src/docker/templates.d.ts
|
|
78
|
+
type PackageManager = 'pnpm' | 'npm' | 'yarn' | 'bun';
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/sandbox/install.d.ts
|
|
81
|
+
/** Long enough for a cold install of a large monorepo. */
|
|
82
|
+
export declare const INSTALL_TIMEOUT_MS: number;
|
|
83
|
+
interface InstallOptions {
|
|
84
|
+
/** The directory to install in. Defaults to the sandbox's root. */
|
|
85
|
+
cwd?: string;
|
|
86
|
+
/** Defaults to the one the lockfile above `cwd` names. */
|
|
87
|
+
packageManager?: PackageManager;
|
|
88
|
+
/**
|
|
89
|
+
* Skip every lifecycle script — dependencies' and the project's own —
|
|
90
|
+
* except those of {@link allowScripts}. Defaults to false: scripts run as
|
|
91
|
+
* a plain install runs them, under the package manager's own policy —
|
|
92
|
+
* npm 12 and pnpm 10 skip dependencies' scripts nobody approved.
|
|
93
|
+
*/
|
|
94
|
+
ignoreScripts?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* With `ignoreScripts`, the packages whose scripts still run: rebuilt by
|
|
97
|
+
* name once the install is done.
|
|
98
|
+
*/
|
|
99
|
+
allowScripts?: readonly string[];
|
|
100
|
+
/** Variables the install needs beyond the sandbox's own. */
|
|
101
|
+
env?: Readonly<Record<string, string>>;
|
|
102
|
+
/** Defaults to {@link INSTALL_TIMEOUT_MS}, for each command. */
|
|
103
|
+
timeoutMs?: number;
|
|
104
|
+
/** Where the package manager's output goes. Defaults to `inherit`. */
|
|
105
|
+
output?: SandboxOutput;
|
|
106
|
+
signal?: AbortSignal;
|
|
107
|
+
}
|
|
108
|
+
/** A name in `allowScripts` that is not a package name. */
|
|
109
|
+
export declare class InstallAllowlistNameInvalid extends Error {
|
|
110
|
+
readonly packageName: string;
|
|
111
|
+
constructor(packageName: string);
|
|
112
|
+
}
|
|
113
|
+
/** The package manager has no way to run only some packages' scripts. */
|
|
114
|
+
export declare class InstallScriptsAllowlistUnsupported extends Error {
|
|
115
|
+
readonly packageManager: string;
|
|
116
|
+
readonly allowScripts: readonly string[];
|
|
117
|
+
constructor(packageManager: string, allowScripts: readonly string[]);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Install the project's dependencies in `sandbox`.
|
|
121
|
+
*
|
|
122
|
+
* ```ts
|
|
123
|
+
* // A checkout nobody has reviewed: no scripts but esbuild's.
|
|
124
|
+
* await installDependencies(sandbox, {
|
|
125
|
+
* ignoreScripts: true,
|
|
126
|
+
* allowScripts: ['esbuild'],
|
|
127
|
+
* });
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* Resolves with each command's result, in order — with its output when
|
|
131
|
+
* `output` is `capture`.
|
|
132
|
+
*
|
|
133
|
+
* @throws {CommandFailed} when the package manager exits unsuccessfully.
|
|
134
|
+
* @throws {InstallScriptsAllowlistUnsupported} for an allowlist the package
|
|
135
|
+
* manager cannot honour, before anything is installed.
|
|
136
|
+
*/
|
|
137
|
+
export declare function installDependencies(sandbox: Sandbox, options?: InstallOptions): Promise<SandboxResult[]>;
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region src/sandbox/local.d.ts
|
|
140
|
+
interface LocalSandboxOptions {
|
|
141
|
+
/** The project. Every command runs at or below it. */
|
|
142
|
+
root: string;
|
|
143
|
+
/**
|
|
144
|
+
* `HOME` for every command. Defaults to the host's, because a build
|
|
145
|
+
* reuses the caches kept there — the pnpm store, corepack's package
|
|
146
|
+
* managers, turbo's cache — and a cold one re-downloads all of them.
|
|
147
|
+
* Point it at an empty directory to keep `~/.aws`, `~/.npmrc` and
|
|
148
|
+
* `~/.docker` out of reach of an SDK's default lookup — though, sharing
|
|
149
|
+
* the host's filesystem, a command that goes looking still finds them.
|
|
150
|
+
*/
|
|
151
|
+
home?: string;
|
|
152
|
+
/**
|
|
153
|
+
* Host variables to pass on beyond the allowlist, by name — a remote
|
|
154
|
+
* cache's `TURBO_TOKEN`, for a build the host trusts with it.
|
|
155
|
+
*/
|
|
156
|
+
passEnv?: readonly string[];
|
|
157
|
+
/** Where the allowlisted variables are read from. Defaults to `process.env`. */
|
|
158
|
+
hostEnv?: NodeJS.ProcessEnv;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* A child process on this machine, as this user, with an allowlisted
|
|
162
|
+
* environment.
|
|
163
|
+
*
|
|
164
|
+
* What it withholds from the command: the host's environment beyond
|
|
165
|
+
* {@link SANDBOX_ENV_ALLOWLIST}, a shell, a working directory outside the
|
|
166
|
+
* project, and any time past the timeout. What it does not: the host's
|
|
167
|
+
* filesystem, which the command can read and write as the user running the
|
|
168
|
+
* deploy. So it is not `isolating`, and it is the default for projects the
|
|
169
|
+
* host already trusts — the developer's own, a team's own CI. Code nobody
|
|
170
|
+
* vetted belongs in a sandbox that is.
|
|
171
|
+
*
|
|
172
|
+
* A timed-out command is sent SIGTERM, then SIGKILL; processes it started
|
|
173
|
+
* itself are its to stop.
|
|
174
|
+
*/
|
|
175
|
+
export declare class LocalSandbox implements Sandbox {
|
|
176
|
+
readonly root: string;
|
|
177
|
+
readonly isolating = false;
|
|
178
|
+
readonly env: Readonly<Record<string, string>>;
|
|
179
|
+
constructor(options: LocalSandboxOptions);
|
|
180
|
+
exec(command: string, args: readonly string[], options: SandboxExecOptions): Promise<SandboxResult>;
|
|
181
|
+
}
|
|
182
|
+
//#endregion
|
|
183
|
+
//#region src/sandbox/worker.d.ts
|
|
184
|
+
/** A worker ended without the answer it exists to give. */
|
|
185
|
+
export declare class SandboxWorkerFailed extends Error {
|
|
186
|
+
readonly step: string;
|
|
187
|
+
readonly exitCode: number | null;
|
|
188
|
+
readonly stderr: string;
|
|
189
|
+
constructor(step: string, exitCode: number | null, stderr: string);
|
|
190
|
+
}
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region src/target/sst/health.d.ts
|
|
193
|
+
/** Surfaces that never answered healthy. */
|
|
194
|
+
export declare class SurfacesUnhealthy extends Error {
|
|
195
|
+
readonly stage: string;
|
|
196
|
+
/** Each surface that failed, with the last thing it answered. */
|
|
197
|
+
readonly surfaces: readonly {
|
|
198
|
+
app: string;
|
|
199
|
+
url: string;
|
|
200
|
+
status?: number;
|
|
201
|
+
error?: string;
|
|
202
|
+
}[];
|
|
203
|
+
constructor(stage: string,
|
|
204
|
+
/** Each surface that failed, with the last thing it answered. */
|
|
205
|
+
surfaces: readonly {
|
|
206
|
+
app: string;
|
|
207
|
+
url: string;
|
|
208
|
+
status?: number;
|
|
209
|
+
error?: string;
|
|
210
|
+
}[]);
|
|
211
|
+
}
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/target/sst/outputs.d.ts
|
|
214
|
+
/** `.sst/outputs.json` is there, and is not JSON. */
|
|
215
|
+
export declare class SstOutputsUnreadable extends Error {
|
|
216
|
+
readonly path: string;
|
|
217
|
+
readonly reason: string;
|
|
218
|
+
constructor(path: string, reason: string);
|
|
219
|
+
}
|
|
220
|
+
//#endregion
|
|
221
|
+
//#region src/target/sst/index.d.ts
|
|
222
|
+
/** The workspace has no `sst.config.ts` for `sst deploy` to run. */
|
|
223
|
+
export declare class SstConfigNotFound extends Error {
|
|
224
|
+
readonly cwd: string;
|
|
225
|
+
constructor(cwd: string);
|
|
226
|
+
}
|
|
227
|
+
//#endregion
|
|
19
228
|
//#region src/deploy/deploy.d.ts
|
|
20
229
|
/**
|
|
21
230
|
* Where a run's progress lines go, besides its events. `@geekmidas/logger`'s
|
|
@@ -79,6 +288,18 @@ interface DeployInput {
|
|
|
79
288
|
* default), its stderr, or nowhere.
|
|
80
289
|
*/
|
|
81
290
|
childOutput?: 'inherit' | 'stderr' | 'ignore';
|
|
291
|
+
/**
|
|
292
|
+
* Where the project's own code runs: loading `gkm.config.ts`, discovering
|
|
293
|
+
* its constructs, sniffing each app's environment. Defaults to a
|
|
294
|
+
* `LocalSandbox` on the project — a child process here with an
|
|
295
|
+
* allowlisted environment, for a project the host trusts.
|
|
296
|
+
*
|
|
297
|
+
* A host deploying repositories it does not trust passes one that
|
|
298
|
+
* isolates — a container per build — and the config then reaches the
|
|
299
|
+
* deploy only as data. Credentials never enter a sandbox: they go from
|
|
300
|
+
* `credentials` to the steps that provision, push and release.
|
|
301
|
+
*/
|
|
302
|
+
sandbox?: Sandbox;
|
|
82
303
|
}
|
|
83
304
|
/** A deploy in progress. */
|
|
84
305
|
interface DeployRun extends AsyncIterable<DeployEvent> {
|
|
@@ -178,5 +399,5 @@ export declare class RegistryAmbiguous extends Error {
|
|
|
178
399
|
constructor(registry: string, registryIds: readonly string[]);
|
|
179
400
|
}
|
|
180
401
|
//#endregion
|
|
181
|
-
export { type AppDeployResult, type Credential, type CredentialKind, type CredentialKinds, type CredentialProvider, type CredentialRequest, type DeployEvent, type DeployEventError, type DeployEventType, type DeployIdentity, type DeployInput, type DeployLogger, type DeployPhase, type DeployResult, type DeployRun, DeployTargetNotYetSupported, InvalidTargetOptions, MissingCredential, ProviderRemoved, type ResourceChange, type ResourceVia, StateLocked, StateVersionConflict, type StoredCredentialsOptions, TargetEntryInvalid, TargetPackageInvalid, TargetPackageNotFound, TargetRuntimeMismatch, TargetRuntimeUndeclared, UnknownDeployTarget, chainCredentials, deployIdentity, storedCredentials };
|
|
402
|
+
export { type AppDeployResult, type AwsCredential, ConfigLoadFailed, ConfigObjectNotSerializable, ConstructDiscoveryFailed, ConstructsNotSerializable, type Credential, type CredentialKind, type CredentialKinds, type CredentialProvider, type CredentialRequest, type DeployEvent, type DeployEventError, type DeployEventType, type DeployIdentity, type DeployInput, type DeployLogger, type DeployPhase, type DeployResult, type DeployRun, DeployTargetNotYetSupported, type InstallOptions, InvalidTargetOptions, type LocalSandboxOptions, MissingCredential, ProviderRemoved, type ResourceChange, type ResourceVia, SECRETS_DIR_ENV, type Sandbox, SandboxCwdEscape, type SandboxExecOptions, type SandboxOutput, type SandboxResult, SecretNameInvalid, StateLocked, StateVersionConflict, type StoredCredentialsOptions, TargetEntryInvalid, TargetPackageInvalid, TargetPackageNotFound, TargetRuntimeMismatch, TargetRuntimeUndeclared, UnknownDeployTarget, chainCredentials, confineCwd, deployIdentity, storedCredentials };
|
|
182
403
|
//# sourceMappingURL=public.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.cts","names":[],"sources":["../../src/home.ts","../../src/deploy/deploy.ts","../../src/deploy/index.ts","../../src/deploy/orchestrate.ts","../../src/deploy/ownership.ts","../../src/deploy/registry.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"public.d.cts","names":[],"sources":["../../src/home.ts","../../src/run.ts","../../src/sandbox/env.ts","../../src/docker/templates.ts","../../src/sandbox/install.ts","../../src/sandbox/local.ts","../../src/sandbox/worker.ts","../../src/target/sst/health.ts","../../src/target/sst/outputs.ts","../../src/target/sst/index.ts","../../src/deploy/deploy.ts","../../src/deploy/index.ts","../../src/deploy/orchestrate.ts","../../src/deploy/ownership.ts","../../src/deploy/registry.ts"],"mappings":";;;;;;;;;;;;;;;;;qBAaa;;wBAGG,QAAQ,MAAK,OAAO;;;;qBCuBvB,sBAAsB;WAExB;WACA;WACA;WACA,QAAQ,OAAO;EAJzB,YACU,iBACA,yBACA,yBACA,QAAQ,OAAO;;;qBAUb,wBAAwB;WAE1B;WACA;WACA;EAHV,YACU,iBACA,yBACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBC3BE,0CAA0C;;;;;wBAyDvC,eACf,SAAQ,OAAO,YACf,4BACE;;;KCvFS;;;;qBCeC;UAEI;;EAEhB;;EAEA,iBAAiB;;;;;;;EAOjB;;;;;EAKA;;EAEA,MAAM,SAAS;;EAEf;;EAEA,SAAS;EACT,SAAS;;;qBAIG,oCAAoC;WAC3B;EAArB,YAAqB;;;qBAWT,2CAA2C;WAE7C;WACA;EAFV,YACU,wBACA;;;;;;;;;;;;;;;;;;;;wBAqJW,oBACrB,SAAS,SACT,UAAS,iBACP,QAAQ;;;UCpMM;;EAEhB;;;;;;;;;EASA;;;;;EAKA;;EAEA,UAAU,OAAO;;;;;;;;;;;;;;;;;qBA0BL,wBAAwB;WAC3B;WACA;WACA,KAAK,SAAS;EAEvB,YAAY,SAAS;EAUf,KACL,iBACA,yBACA,SAAS,qBACP,QAAQ;;;;;qBCpBC,4BAA4B;WAE9B;WACA;WACA;EAHV,YACU,cACA,yBACA;;;;;qBC1CE,0BAA0B;WAE5B;;WAEA;IACR;IACA;IACA;IACA;;EAPF,YACU,eAEA;;EAAA;IACR;IACA;IACA;IACA;;;;;;qBCZU,6BAA6B;WAE/B;WACA;EAFV,YACU,cACA;;;;;qBC2BE,0BAA0B;WACjB;EAArB,YAAqB;;;;;;;;UCpBL;EAChB,KAAK;EACL,KAAK;EACL,OAAO;;UAGS;;;;;EAKhB;;EAEA;;;;;EAKA;;;;;;EAMA,UAAU,eAAe;;EAEzB;;EAEA;;;;;;EAMA;;;;;;EAMA,cAAc;;EAEd,SAAS;;;;;;EAMT,SAAS;;;;;EAKT;;;;;EAKA;;;;;;;;;;;;EAYA,UAAU;;;UAIM,kBAAkB,cAAc;;;;;;WAMvC,QAAQ,QAAQ;;;;;;;;;;;;;;;;;;wBAqEV,OAAO,OAAO,cAAc;;;;qBCuU/B,4BAA4B;WAE9B;EADV,YACU,aACT;;;qBAWW,uBAAuB;WAEzB;WACA;WACA;EAHV,YACU,aACA,4BACA;;;;;qBCvcE,0BAA0B;WAE5B;WACA;EAFV,YACU,yBACA;;;qBAWE,yBAAyB;WAE3B;WACA;EAFV,YACU,eACA;;;qBAUE,uBAAuB;WAEzB;;WAEA;EAHV,YACU,gBAEA;;EAAA,kBACT;;;;;;;;qBC1EW,wBAAwB;WAE1B;WACA;WACA;;WAEA;EALV,YACU,qBACA,mBACA,kBAEA;;EAAA;;;;;qBChBE,8BAA8B;WACrB;EAArB,YAAqB;;;qBAUT,yBAAyB;WAChB;EAArB,YAAqB;;;qBAUT,0BAA0B;WAE5B;WACA;EAFV,YACU,kBACA"}
|
package/dist/deploy/public.d.mts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { a as SandboxOutput, c as confineCwd, i as SandboxExecOptions, n as Sandbox, o as SandboxResult, r as SandboxCwdEscape, s as SecretNameInvalid, t as SECRETS_DIR_ENV } from "../sandbox-M8UnLhXE.mjs";
|
|
2
|
+
import { $ as DeployEventError, Q as DeployEvent, at as DeployResult, bt as DeployIdentity, ct as CredentialKind, dt as CredentialRequest, et as DeployEventType, ft as MissingCredential, gt as StateLocked, ht as storedCredentials, it as AppDeployResult, lt as CredentialKinds, mt as chainCredentials, nt as ResourceChange, ot as AwsCredential, pt as StoredCredentialsOptions, rt as ResourceVia, st as Credential, tt as DeployPhase, ut as CredentialProvider, vt as StateVersionConflict, xt as deployIdentity, z as AnyDeployTarget } from "../types-B_bEQvb9.mjs";
|
|
3
|
+
import { i as ConfigLoadFailed, o as ConfigObjectNotSerializable } from "../config-DqNRiQOp.mjs";
|
|
4
|
+
import { n as ConstructsNotSerializable, t as ConstructDiscoveryFailed } from "../discover-B6yPpvRV.mjs";
|
|
5
|
+
import { a as TargetRuntimeMismatch, c as DeployTargetNotYetSupported, i as TargetPackageInvalid, l as UnknownDeployTarget, n as InvalidTargetOptions, o as ProviderRemoved, r as TargetEntryInvalid, s as TargetPackageNotFound, t as TargetRuntimeUndeclared } from "../runtime-CJEYK4Gz.mjs";
|
|
3
6
|
import { ConstructManifest } from "@geekmidas/manifest";
|
|
4
7
|
import "@geekmidas/envkit/sniffer";
|
|
5
8
|
//#region src/home.d.ts
|
|
@@ -16,6 +19,212 @@ export declare const GKM_HOME_ENV = "GKM_HOME";
|
|
|
16
19
|
/** The CLI's home: `GKM_HOME` if set, else `~/.gkm`. */
|
|
17
20
|
export declare function gkmHome(env?: NodeJS.ProcessEnv): string;
|
|
18
21
|
//#endregion
|
|
22
|
+
//#region src/run.d.ts
|
|
23
|
+
/** The program ran and exited unsuccessfully; its own output said why. */
|
|
24
|
+
export declare class CommandFailed extends Error {
|
|
25
|
+
readonly command: string;
|
|
26
|
+
readonly args: readonly string[];
|
|
27
|
+
readonly exitCode: number | null;
|
|
28
|
+
readonly signal: NodeJS.Signals | null;
|
|
29
|
+
constructor(command: string, args: readonly string[], exitCode: number | null, signal: NodeJS.Signals | null);
|
|
30
|
+
}
|
|
31
|
+
/** The program ran past its timeout and was killed. */
|
|
32
|
+
export declare class CommandTimedOut extends Error {
|
|
33
|
+
readonly command: string;
|
|
34
|
+
readonly args: readonly string[];
|
|
35
|
+
readonly timeoutMs: number;
|
|
36
|
+
constructor(command: string, args: readonly string[], timeoutMs: number);
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/sandbox/env.d.ts
|
|
40
|
+
/**
|
|
41
|
+
* What of the host's environment a local sandbox passes on.
|
|
42
|
+
*
|
|
43
|
+
* An allowlist, not a denylist: a credential's variable has any name its
|
|
44
|
+
* owner chose (`DOKPLOY_TOKEN`, `AWS_SECRET_ACCESS_KEY`, `MY_VAULT_TOKEN`), so
|
|
45
|
+
* the only safe default is to name what a program needs to *run* and pass
|
|
46
|
+
* nothing else.
|
|
47
|
+
*/
|
|
48
|
+
/**
|
|
49
|
+
* Variables a command needs to find programs, write temp files, print in the
|
|
50
|
+
* user's locale and reach the network through the host's proxy — and nothing
|
|
51
|
+
* that authenticates as anyone.
|
|
52
|
+
*
|
|
53
|
+
* Deliberately left out:
|
|
54
|
+
* - `NODE_OPTIONS`: it can `--require` or `--import` code into every node
|
|
55
|
+
* process, and CI often holds `--import tsx` there. A step that needs a
|
|
56
|
+
* loader passes its own.
|
|
57
|
+
* - `NODE_AUTH_TOKEN`, `NPM_TOKEN`, `npm_config_*`: registry tokens
|
|
58
|
+
* (`actions/setup-node` writes `NODE_AUTH_TOKEN`), which is why there is no
|
|
59
|
+
* `NODE_*` wildcard.
|
|
60
|
+
* - `AWS_*`, `DOCKER_*`, `DOKPLOY_*`, `GITHUB_TOKEN`, `TURBO_TOKEN`, `GKM_*`:
|
|
61
|
+
* credentials, or where the deploy keeps them.
|
|
62
|
+
* - `SHELL`, `EDITOR` and the rest of a login session: nothing here starts a
|
|
63
|
+
* shell.
|
|
64
|
+
*
|
|
65
|
+
* Proxies are passed: behind one, nothing installs or builds without it. A
|
|
66
|
+
* proxy URL with a password in it reaches the command too — a host that keeps
|
|
67
|
+
* one there and builds code it does not trust should pass a sandbox of its
|
|
68
|
+
* own.
|
|
69
|
+
*/
|
|
70
|
+
export declare const SANDBOX_ENV_ALLOWLIST: readonly (string | RegExp)[];
|
|
71
|
+
/**
|
|
72
|
+
* The allowlisted part of `source`, plus each of `extra` the host chose to
|
|
73
|
+
* pass on by name.
|
|
74
|
+
*/
|
|
75
|
+
export declare function allowlistedEnv(source?: NodeJS.ProcessEnv, extra?: readonly string[]): Record<string, string>;
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region src/docker/templates.d.ts
|
|
78
|
+
type PackageManager = 'pnpm' | 'npm' | 'yarn' | 'bun';
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/sandbox/install.d.ts
|
|
81
|
+
/** Long enough for a cold install of a large monorepo. */
|
|
82
|
+
export declare const INSTALL_TIMEOUT_MS: number;
|
|
83
|
+
interface InstallOptions {
|
|
84
|
+
/** The directory to install in. Defaults to the sandbox's root. */
|
|
85
|
+
cwd?: string;
|
|
86
|
+
/** Defaults to the one the lockfile above `cwd` names. */
|
|
87
|
+
packageManager?: PackageManager;
|
|
88
|
+
/**
|
|
89
|
+
* Skip every lifecycle script — dependencies' and the project's own —
|
|
90
|
+
* except those of {@link allowScripts}. Defaults to false: scripts run as
|
|
91
|
+
* a plain install runs them, under the package manager's own policy —
|
|
92
|
+
* npm 12 and pnpm 10 skip dependencies' scripts nobody approved.
|
|
93
|
+
*/
|
|
94
|
+
ignoreScripts?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* With `ignoreScripts`, the packages whose scripts still run: rebuilt by
|
|
97
|
+
* name once the install is done.
|
|
98
|
+
*/
|
|
99
|
+
allowScripts?: readonly string[];
|
|
100
|
+
/** Variables the install needs beyond the sandbox's own. */
|
|
101
|
+
env?: Readonly<Record<string, string>>;
|
|
102
|
+
/** Defaults to {@link INSTALL_TIMEOUT_MS}, for each command. */
|
|
103
|
+
timeoutMs?: number;
|
|
104
|
+
/** Where the package manager's output goes. Defaults to `inherit`. */
|
|
105
|
+
output?: SandboxOutput;
|
|
106
|
+
signal?: AbortSignal;
|
|
107
|
+
}
|
|
108
|
+
/** A name in `allowScripts` that is not a package name. */
|
|
109
|
+
export declare class InstallAllowlistNameInvalid extends Error {
|
|
110
|
+
readonly packageName: string;
|
|
111
|
+
constructor(packageName: string);
|
|
112
|
+
}
|
|
113
|
+
/** The package manager has no way to run only some packages' scripts. */
|
|
114
|
+
export declare class InstallScriptsAllowlistUnsupported extends Error {
|
|
115
|
+
readonly packageManager: string;
|
|
116
|
+
readonly allowScripts: readonly string[];
|
|
117
|
+
constructor(packageManager: string, allowScripts: readonly string[]);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Install the project's dependencies in `sandbox`.
|
|
121
|
+
*
|
|
122
|
+
* ```ts
|
|
123
|
+
* // A checkout nobody has reviewed: no scripts but esbuild's.
|
|
124
|
+
* await installDependencies(sandbox, {
|
|
125
|
+
* ignoreScripts: true,
|
|
126
|
+
* allowScripts: ['esbuild'],
|
|
127
|
+
* });
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* Resolves with each command's result, in order — with its output when
|
|
131
|
+
* `output` is `capture`.
|
|
132
|
+
*
|
|
133
|
+
* @throws {CommandFailed} when the package manager exits unsuccessfully.
|
|
134
|
+
* @throws {InstallScriptsAllowlistUnsupported} for an allowlist the package
|
|
135
|
+
* manager cannot honour, before anything is installed.
|
|
136
|
+
*/
|
|
137
|
+
export declare function installDependencies(sandbox: Sandbox, options?: InstallOptions): Promise<SandboxResult[]>;
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region src/sandbox/local.d.ts
|
|
140
|
+
interface LocalSandboxOptions {
|
|
141
|
+
/** The project. Every command runs at or below it. */
|
|
142
|
+
root: string;
|
|
143
|
+
/**
|
|
144
|
+
* `HOME` for every command. Defaults to the host's, because a build
|
|
145
|
+
* reuses the caches kept there — the pnpm store, corepack's package
|
|
146
|
+
* managers, turbo's cache — and a cold one re-downloads all of them.
|
|
147
|
+
* Point it at an empty directory to keep `~/.aws`, `~/.npmrc` and
|
|
148
|
+
* `~/.docker` out of reach of an SDK's default lookup — though, sharing
|
|
149
|
+
* the host's filesystem, a command that goes looking still finds them.
|
|
150
|
+
*/
|
|
151
|
+
home?: string;
|
|
152
|
+
/**
|
|
153
|
+
* Host variables to pass on beyond the allowlist, by name — a remote
|
|
154
|
+
* cache's `TURBO_TOKEN`, for a build the host trusts with it.
|
|
155
|
+
*/
|
|
156
|
+
passEnv?: readonly string[];
|
|
157
|
+
/** Where the allowlisted variables are read from. Defaults to `process.env`. */
|
|
158
|
+
hostEnv?: NodeJS.ProcessEnv;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* A child process on this machine, as this user, with an allowlisted
|
|
162
|
+
* environment.
|
|
163
|
+
*
|
|
164
|
+
* What it withholds from the command: the host's environment beyond
|
|
165
|
+
* {@link SANDBOX_ENV_ALLOWLIST}, a shell, a working directory outside the
|
|
166
|
+
* project, and any time past the timeout. What it does not: the host's
|
|
167
|
+
* filesystem, which the command can read and write as the user running the
|
|
168
|
+
* deploy. So it is not `isolating`, and it is the default for projects the
|
|
169
|
+
* host already trusts — the developer's own, a team's own CI. Code nobody
|
|
170
|
+
* vetted belongs in a sandbox that is.
|
|
171
|
+
*
|
|
172
|
+
* A timed-out command is sent SIGTERM, then SIGKILL; processes it started
|
|
173
|
+
* itself are its to stop.
|
|
174
|
+
*/
|
|
175
|
+
export declare class LocalSandbox implements Sandbox {
|
|
176
|
+
readonly root: string;
|
|
177
|
+
readonly isolating = false;
|
|
178
|
+
readonly env: Readonly<Record<string, string>>;
|
|
179
|
+
constructor(options: LocalSandboxOptions);
|
|
180
|
+
exec(command: string, args: readonly string[], options: SandboxExecOptions): Promise<SandboxResult>;
|
|
181
|
+
}
|
|
182
|
+
//#endregion
|
|
183
|
+
//#region src/sandbox/worker.d.ts
|
|
184
|
+
/** A worker ended without the answer it exists to give. */
|
|
185
|
+
export declare class SandboxWorkerFailed extends Error {
|
|
186
|
+
readonly step: string;
|
|
187
|
+
readonly exitCode: number | null;
|
|
188
|
+
readonly stderr: string;
|
|
189
|
+
constructor(step: string, exitCode: number | null, stderr: string);
|
|
190
|
+
}
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region src/target/sst/health.d.ts
|
|
193
|
+
/** Surfaces that never answered healthy. */
|
|
194
|
+
export declare class SurfacesUnhealthy extends Error {
|
|
195
|
+
readonly stage: string;
|
|
196
|
+
/** Each surface that failed, with the last thing it answered. */
|
|
197
|
+
readonly surfaces: readonly {
|
|
198
|
+
app: string;
|
|
199
|
+
url: string;
|
|
200
|
+
status?: number;
|
|
201
|
+
error?: string;
|
|
202
|
+
}[];
|
|
203
|
+
constructor(stage: string,
|
|
204
|
+
/** Each surface that failed, with the last thing it answered. */
|
|
205
|
+
surfaces: readonly {
|
|
206
|
+
app: string;
|
|
207
|
+
url: string;
|
|
208
|
+
status?: number;
|
|
209
|
+
error?: string;
|
|
210
|
+
}[]);
|
|
211
|
+
}
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/target/sst/outputs.d.ts
|
|
214
|
+
/** `.sst/outputs.json` is there, and is not JSON. */
|
|
215
|
+
export declare class SstOutputsUnreadable extends Error {
|
|
216
|
+
readonly path: string;
|
|
217
|
+
readonly reason: string;
|
|
218
|
+
constructor(path: string, reason: string);
|
|
219
|
+
}
|
|
220
|
+
//#endregion
|
|
221
|
+
//#region src/target/sst/index.d.ts
|
|
222
|
+
/** The workspace has no `sst.config.ts` for `sst deploy` to run. */
|
|
223
|
+
export declare class SstConfigNotFound extends Error {
|
|
224
|
+
readonly cwd: string;
|
|
225
|
+
constructor(cwd: string);
|
|
226
|
+
}
|
|
227
|
+
//#endregion
|
|
19
228
|
//#region src/deploy/deploy.d.ts
|
|
20
229
|
/**
|
|
21
230
|
* Where a run's progress lines go, besides its events. `@geekmidas/logger`'s
|
|
@@ -79,6 +288,18 @@ interface DeployInput {
|
|
|
79
288
|
* default), its stderr, or nowhere.
|
|
80
289
|
*/
|
|
81
290
|
childOutput?: 'inherit' | 'stderr' | 'ignore';
|
|
291
|
+
/**
|
|
292
|
+
* Where the project's own code runs: loading `gkm.config.ts`, discovering
|
|
293
|
+
* its constructs, sniffing each app's environment. Defaults to a
|
|
294
|
+
* `LocalSandbox` on the project — a child process here with an
|
|
295
|
+
* allowlisted environment, for a project the host trusts.
|
|
296
|
+
*
|
|
297
|
+
* A host deploying repositories it does not trust passes one that
|
|
298
|
+
* isolates — a container per build — and the config then reaches the
|
|
299
|
+
* deploy only as data. Credentials never enter a sandbox: they go from
|
|
300
|
+
* `credentials` to the steps that provision, push and release.
|
|
301
|
+
*/
|
|
302
|
+
sandbox?: Sandbox;
|
|
82
303
|
}
|
|
83
304
|
/** A deploy in progress. */
|
|
84
305
|
interface DeployRun extends AsyncIterable<DeployEvent> {
|
|
@@ -178,5 +399,5 @@ export declare class RegistryAmbiguous extends Error {
|
|
|
178
399
|
constructor(registry: string, registryIds: readonly string[]);
|
|
179
400
|
}
|
|
180
401
|
//#endregion
|
|
181
|
-
export { type AppDeployResult, type Credential, type CredentialKind, type CredentialKinds, type CredentialProvider, type CredentialRequest, type DeployEvent, type DeployEventError, type DeployEventType, type DeployIdentity, type DeployInput, type DeployLogger, type DeployPhase, type DeployResult, type DeployRun, DeployTargetNotYetSupported, InvalidTargetOptions, MissingCredential, ProviderRemoved, type ResourceChange, type ResourceVia, StateLocked, StateVersionConflict, type StoredCredentialsOptions, TargetEntryInvalid, TargetPackageInvalid, TargetPackageNotFound, TargetRuntimeMismatch, TargetRuntimeUndeclared, UnknownDeployTarget, chainCredentials, deployIdentity, storedCredentials };
|
|
402
|
+
export { type AppDeployResult, type AwsCredential, ConfigLoadFailed, ConfigObjectNotSerializable, ConstructDiscoveryFailed, ConstructsNotSerializable, type Credential, type CredentialKind, type CredentialKinds, type CredentialProvider, type CredentialRequest, type DeployEvent, type DeployEventError, type DeployEventType, type DeployIdentity, type DeployInput, type DeployLogger, type DeployPhase, type DeployResult, type DeployRun, DeployTargetNotYetSupported, type InstallOptions, InvalidTargetOptions, type LocalSandboxOptions, MissingCredential, ProviderRemoved, type ResourceChange, type ResourceVia, SECRETS_DIR_ENV, type Sandbox, SandboxCwdEscape, type SandboxExecOptions, type SandboxOutput, type SandboxResult, SecretNameInvalid, StateLocked, StateVersionConflict, type StoredCredentialsOptions, TargetEntryInvalid, TargetPackageInvalid, TargetPackageNotFound, TargetRuntimeMismatch, TargetRuntimeUndeclared, UnknownDeployTarget, chainCredentials, confineCwd, deployIdentity, storedCredentials };
|
|
182
403
|
//# sourceMappingURL=public.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.mts","names":[],"sources":["../../src/home.ts","../../src/deploy/deploy.ts","../../src/deploy/index.ts","../../src/deploy/orchestrate.ts","../../src/deploy/ownership.ts","../../src/deploy/registry.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"public.d.mts","names":[],"sources":["../../src/home.ts","../../src/run.ts","../../src/sandbox/env.ts","../../src/docker/templates.ts","../../src/sandbox/install.ts","../../src/sandbox/local.ts","../../src/sandbox/worker.ts","../../src/target/sst/health.ts","../../src/target/sst/outputs.ts","../../src/target/sst/index.ts","../../src/deploy/deploy.ts","../../src/deploy/index.ts","../../src/deploy/orchestrate.ts","../../src/deploy/ownership.ts","../../src/deploy/registry.ts"],"mappings":";;;;;;;;;;;;;;;;;qBAaa;;wBAGG,QAAQ,MAAK,OAAO;;;;qBCuBvB,sBAAsB;WAExB;WACA;WACA;WACA,QAAQ,OAAO;EAJzB,YACU,iBACA,yBACA,yBACA,QAAQ,OAAO;;;qBAUb,wBAAwB;WAE1B;WACA;WACA;EAHV,YACU,iBACA,yBACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBC3BE,0CAA0C;;;;;wBAyDvC,eACf,SAAQ,OAAO,YACf,4BACE;;;KCvFS;;;;qBCeC;UAEI;;EAEhB;;EAEA,iBAAiB;;;;;;;EAOjB;;;;;EAKA;;EAEA,MAAM,SAAS;;EAEf;;EAEA,SAAS;EACT,SAAS;;;qBAIG,oCAAoC;WAC3B;EAArB,YAAqB;;;qBAWT,2CAA2C;WAE7C;WACA;EAFV,YACU,wBACA;;;;;;;;;;;;;;;;;;;;wBAqJW,oBACrB,SAAS,SACT,UAAS,iBACP,QAAQ;;;UCpMM;;EAEhB;;;;;;;;;EASA;;;;;EAKA;;EAEA,UAAU,OAAO;;;;;;;;;;;;;;;;;qBA0BL,wBAAwB;WAC3B;WACA;WACA,KAAK,SAAS;EAEvB,YAAY,SAAS;EAUf,KACL,iBACA,yBACA,SAAS,qBACP,QAAQ;;;;;qBCpBC,4BAA4B;WAE9B;WACA;WACA;EAHV,YACU,cACA,yBACA;;;;;qBC1CE,0BAA0B;WAE5B;;WAEA;IACR;IACA;IACA;IACA;;EAPF,YACU,eAEA;;EAAA;IACR;IACA;IACA;IACA;;;;;;qBCZU,6BAA6B;WAE/B;WACA;EAFV,YACU,cACA;;;;;qBC2BE,0BAA0B;WACjB;EAArB,YAAqB;;;;;;;;UCpBL;EAChB,KAAK;EACL,KAAK;EACL,OAAO;;UAGS;;;;;EAKhB;;EAEA;;;;;EAKA;;;;;;EAMA,UAAU,eAAe;;EAEzB;;EAEA;;;;;;EAMA;;;;;;EAMA,cAAc;;EAEd,SAAS;;;;;;EAMT,SAAS;;;;;EAKT;;;;;EAKA;;;;;;;;;;;;EAYA,UAAU;;;UAIM,kBAAkB,cAAc;;;;;;WAMvC,QAAQ,QAAQ;;;;;;;;;;;;;;;;;;wBAqEV,OAAO,OAAO,cAAc;;;;qBCuU/B,4BAA4B;WAE9B;EADV,YACU,aACT;;;qBAWW,uBAAuB;WAEzB;WACA;WACA;EAHV,YACU,aACA,4BACA;;;;;qBCvcE,0BAA0B;WAE5B;WACA;EAFV,YACU,yBACA;;;qBAWE,yBAAyB;WAE3B;WACA;EAFV,YACU,eACA;;;qBAUE,uBAAuB;WAEzB;;WAEA;EAHV,YACU,gBAEA;;EAAA,kBACT;;;;;;;;qBC1EW,wBAAwB;WAE1B;WACA;WACA;;WAEA;EALV,YACU,qBACA,mBACA,kBAEA;;EAAA;;;;;qBChBE,8BAA8B;WACrB;EAArB,YAAqB;;;qBAUT,yBAAyB;WAChB;EAArB,YAAqB;;;qBAUT,0BAA0B;WAE5B;WACA;EAFV,YACU,kBACA"}
|