@geekmidas/cli 10.0.0-alpha.63 → 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/dist/{HostingerProvider-mJ7YruxH.cjs → HostingerProvider-Bx2lHHvu.cjs} +3 -3
- package/dist/{HostingerProvider-mJ7YruxH.cjs.map → HostingerProvider-Bx2lHHvu.cjs.map} +1 -1
- package/dist/{HostingerProvider-DBBwpDjn.mjs → HostingerProvider-Cd4aS5Kj.mjs} +2 -2
- package/dist/{HostingerProvider-DBBwpDjn.mjs.map → HostingerProvider-Cd4aS5Kj.mjs.map} +1 -1
- package/dist/{LegacyStateStore-CP7SZwTP.cjs → LegacyStateStore-C2abV49N.cjs} +2 -2
- package/dist/{LegacyStateStore-CP7SZwTP.cjs.map → LegacyStateStore-C2abV49N.cjs.map} +1 -1
- package/dist/{LegacyStateStore-Q3GmKOdw.mjs → LegacyStateStore-DIgkGaUP.mjs} +2 -2
- package/dist/{LegacyStateStore-Q3GmKOdw.mjs.map → LegacyStateStore-DIgkGaUP.mjs.map} +1 -1
- package/dist/{LocalStateStore-BGIXcrvX.mjs → LocalStateStore-Cy1ZBW7U.mjs} +2 -2
- package/dist/{LocalStateStore-BGIXcrvX.mjs.map → LocalStateStore-Cy1ZBW7U.mjs.map} +1 -1
- package/dist/{LocalStateStore-sS8mvLeq.cjs → LocalStateStore-DiJqKyPy.cjs} +2 -2
- package/dist/{LocalStateStore-sS8mvLeq.cjs.map → LocalStateStore-DiJqKyPy.cjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-CjHWFRDd.cjs → OpenApiTsGenerator-BWuDRHe9.cjs} +2 -2
- package/dist/{OpenApiTsGenerator-CjHWFRDd.cjs.map → OpenApiTsGenerator-BWuDRHe9.cjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-CnAwhGxi.mjs → OpenApiTsGenerator-C6v-IeHt.mjs} +2 -2
- package/dist/{OpenApiTsGenerator-CnAwhGxi.mjs.map → OpenApiTsGenerator-C6v-IeHt.mjs.map} +1 -1
- package/dist/{S3StateStore-D7l_lWJ3.mjs → S3StateStore-D3x6ivBL.mjs} +2 -2
- package/dist/{S3StateStore-D7l_lWJ3.mjs.map → S3StateStore-D3x6ivBL.mjs.map} +1 -1
- package/dist/{S3StateStore-6jqITH2F.cjs → S3StateStore-Ds0V1Lgm.cjs} +2 -2
- package/dist/{S3StateStore-6jqITH2F.cjs.map → S3StateStore-Ds0V1Lgm.cjs.map} +1 -1
- package/dist/{SSMStateStore-B__F7IJa.cjs → SSMStateStore-CLipvx47.cjs} +2 -2
- package/dist/{SSMStateStore-B__F7IJa.cjs.map → SSMStateStore-CLipvx47.cjs.map} +1 -1
- package/dist/{SSMStateStore-CAQDVpoc.mjs → SSMStateStore-DfF174xQ.mjs} +2 -2
- package/dist/{SSMStateStore-CAQDVpoc.mjs.map → SSMStateStore-DfF174xQ.mjs.map} +1 -1
- package/dist/{bundler-DLfOn0ls.cjs → bundler-C8uJf324.cjs} +3 -3
- package/dist/{bundler-DLfOn0ls.cjs.map → bundler-C8uJf324.cjs.map} +1 -1
- package/dist/{bundler-DyWI41Iy.mjs → bundler-DYgm9xsd.mjs} +3 -3
- package/dist/{bundler-DyWI41Iy.mjs.map → bundler-DYgm9xsd.mjs.map} +1 -1
- package/dist/{cli-PkVF28LM.mjs → cli-Bogz-zEj.mjs} +5 -4
- package/dist/{cli-PkVF28LM.mjs.map → cli-Bogz-zEj.mjs.map} +1 -1
- package/dist/{cli-D-ZM-X2s.cjs → cli-D3jofJ6j.cjs} +7 -6
- package/dist/{cli-D-ZM-X2s.cjs.map → cli-D3jofJ6j.cjs.map} +1 -1
- package/dist/{config-CemHVcIr.d.cts → config-Be-4_I6H.d.cts} +3 -3
- package/dist/{config-C2BUosLm.d.mts.map → config-Be-4_I6H.d.cts.map} +1 -1
- package/dist/{config-C2BUosLm.d.mts → config-DqNRiQOp.d.mts} +3 -3
- package/dist/{config-CemHVcIr.d.cts.map → config-DqNRiQOp.d.mts.map} +1 -1
- package/dist/config.cjs +416 -17
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +3 -3
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +401 -2
- 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 +32 -26
- package/dist/deploy/public.cjs.map +1 -1
- package/dist/deploy/public.d.cts +40 -4
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +40 -4
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +15 -12
- package/dist/deploy/public.mjs.map +1 -1
- package/dist/{deploy-ABBI0lf1.cjs → deploy-55rJkdKz.cjs} +17 -14
- package/dist/{deploy-ABBI0lf1.cjs.map → deploy-55rJkdKz.cjs.map} +1 -1
- package/dist/{deploy-CGW-QY9D.mjs → deploy-Dc2LBJaK.mjs} +8 -7
- package/dist/{deploy-CGW-QY9D.mjs.map → deploy-Dc2LBJaK.mjs.map} +1 -1
- package/dist/{deploy-CG8bfFij.mjs → deploy-ZRXIPp1c.mjs} +11 -8
- package/dist/{deploy-CG8bfFij.mjs.map → deploy-ZRXIPp1c.mjs.map} +1 -1
- package/dist/{deploy-BiMrP9i7.cjs → deploy-yUcR2OlW.cjs} +12 -11
- package/dist/{deploy-BiMrP9i7.cjs.map → deploy-yUcR2OlW.cjs.map} +1 -1
- 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-C_6COHEv.cjs → discover-DHdECueV.cjs} +6 -157
- package/dist/discover-DHdECueV.cjs.map +1 -0
- package/dist/{discover-BaT6bpnA.mjs → discover-LMrqsWSU.mjs} +8 -117
- package/dist/discover-LMrqsWSU.mjs.map +1 -0
- package/dist/{dokploy-CwdmlyQL.mjs → dokploy-CepdXuMl.mjs} +3 -3
- package/dist/{dokploy-CwdmlyQL.mjs.map → dokploy-CepdXuMl.mjs.map} +1 -1
- package/dist/{dokploy-QJxMhxdf.cjs → dokploy-D1d37rvM.cjs} +3 -3
- package/dist/{dokploy-QJxMhxdf.cjs.map → dokploy-D1d37rvM.cjs.map} +1 -1
- package/dist/{encryption-DXw3jj0c.cjs → encryption-C9X98u2F.cjs} +5 -5
- package/dist/{encryption-DXw3jj0c.cjs.map → encryption-C9X98u2F.cjs.map} +1 -1
- package/dist/{encryption-CbQG_ayW.mjs → encryption-CKHjMpCr.mjs} +5 -5
- package/dist/{encryption-CbQG_ayW.mjs.map → encryption-CKHjMpCr.mjs.map} +1 -1
- package/dist/{github-ciwbIwVa.mjs → github-D-byNI7T.mjs} +4 -4
- package/dist/{github-ciwbIwVa.mjs.map → github-D-byNI7T.mjs.map} +1 -1
- package/dist/{github-BH_mETav.cjs → github-Dd3tMa1u.cjs} +4 -4
- package/dist/{github-BH_mETav.cjs.map → github-Dd3tMa1u.cjs.map} +1 -1
- package/dist/{index-DrKzpHl-.d.mts → index-CJ2qsSpp.d.mts} +2 -2
- package/dist/{index-BtXDZQuF.d.cts.map → index-CJ2qsSpp.d.mts.map} +1 -1
- package/dist/{index-BtXDZQuF.d.cts → index-CfE9Y885.d.cts} +2 -2
- package/dist/{index-DrKzpHl-.d.mts.map → index-CfE9Y885.d.cts.map} +1 -1
- package/dist/index.cjs +100 -235
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +71 -206
- 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-ImBKTBcW.mjs → migrate-B4gngTLe.mjs} +6 -6
- package/dist/{migrate-ImBKTBcW.mjs.map → migrate-B4gngTLe.mjs.map} +1 -1
- package/dist/{migrate-6oa9y_f2.cjs → migrate-tx9-P9uz.cjs} +6 -6
- package/dist/{migrate-6oa9y_f2.cjs.map → migrate-tx9-P9uz.cjs.map} +1 -1
- package/dist/openapi.cjs +2 -2
- package/dist/openapi.d.cts +1 -1
- package/dist/openapi.d.mts +1 -1
- package/dist/openapi.mjs +2 -2
- package/dist/{ready-Bpdnn2ON.mjs → ready-bQfu9GES.mjs} +3 -3
- package/dist/{ready-Bpdnn2ON.mjs.map → ready-bQfu9GES.mjs.map} +1 -1
- package/dist/{ready-BiG0rt4h.cjs → ready-brEhh68f.cjs} +3 -3
- package/dist/{ready-BiG0rt4h.cjs.map → ready-brEhh68f.cjs.map} +1 -1
- package/dist/reconcile/public.cjs +1 -1
- package/dist/reconcile/public.d.cts +1 -1
- package/dist/reconcile/public.d.mts +1 -1
- package/dist/reconcile/public.mjs +1 -1
- package/dist/{resolve-xytBTtG4.cjs → resolve-BXsNQjMR.cjs} +9 -6
- package/dist/resolve-BXsNQjMR.cjs.map +1 -0
- package/dist/{resolve-B1T0hUaR.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/discover-worker.cjs +1 -1
- package/dist/sandbox/discover-worker.mjs +1 -1
- 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/{sniffer-aO_-s5vq.mjs → sniffer-49KPbDgq.mjs} +25 -470
- package/dist/sniffer-49KPbDgq.mjs.map +1 -0
- package/dist/{sniffer-D_SYc_pO.cjs → sniffer-ByhbEW5A.cjs} +38 -567
- 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-D0f1u0LG.cjs → terminal-Bdv--jhY.cjs} +16 -111
- package/dist/terminal-Bdv--jhY.cjs.map +1 -0
- package/dist/{terminal-gMxAo9Dj.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 +1 -1
- package/dist/vitest.mjs +1 -1
- 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-Kl4NG9IH.cjs → workspace-BwgWJK7h.cjs} +5 -5
- package/dist/workspace-BwgWJK7h.cjs.map +1 -0
- package/dist/{workspace-Dh7rr7l4.mjs → workspace-Bwit4q9O.mjs} +5 -5
- package/dist/workspace-Bwit4q9O.mjs.map +1 -0
- package/package.json +13 -13
- package/dist/config-BEJYKd4s.cjs +0 -648
- package/dist/config-BEJYKd4s.cjs.map +0 -1
- package/dist/config-LKKCVCnC.mjs +0 -547
- package/dist/config-LKKCVCnC.mjs.map +0 -1
- package/dist/define-CHBIEc5j.mjs.map +0 -1
- package/dist/define-Cv_QvDrg.cjs.map +0 -1
- package/dist/discover-BaT6bpnA.mjs.map +0 -1
- package/dist/discover-C_6COHEv.cjs.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-B1T0hUaR.mjs.map +0 -1
- package/dist/resolve-xytBTtG4.cjs.map +0 -1
- package/dist/sniffer-D_SYc_pO.cjs.map +0 -1
- package/dist/sniffer-aO_-s5vq.mjs.map +0 -1
- package/dist/terminal-D0f1u0LG.cjs.map +0 -1
- package/dist/terminal-gMxAo9Dj.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-Dh7rr7l4.mjs.map +0 -1
- package/dist/workspace-Kl4NG9IH.cjs.map +0 -1
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { n as __require, t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { _ as storeHostingerToken, g as storeDokployCredentials, h as removeDokployCredentials, l as getCredentialsPath, s as run$1, t as LocalSandbox, u as getDokployCredentials } from "./local-Cd8ZYQG3.mjs";
|
|
3
|
+
import { d as output, r as discover, s as nodeWithTsx } from "./discover-LMrqsWSU.mjs";
|
|
4
|
+
import { i as activeSandbox } from "./sandbox-Dm247NGx.mjs";
|
|
5
|
+
import { t as appKey } from "./derive-B4vDpzgP.mjs";
|
|
6
|
+
import { E as TEST_STAGE, p as getPublicEnvPrefix, t as allConstructGlobs } from "./workspace-Bwit4q9O.mjs";
|
|
7
|
+
import { ConfigNotFound, NotInAnApp, loadConfig, loadWorkspaceAppInfo, loadWorkspaceConfig } from "./config.mjs";
|
|
6
8
|
import { i as toEmbeddableSecrets } from "./storage-BzaUxmqe.mjs";
|
|
7
|
-
import { i as FileSecretsStore, n as secretsStoreFor } from "./store-
|
|
8
|
-
import { r as runtimeOf } from "./runtime-
|
|
9
|
+
import { i as FileSecretsStore, n as secretsStoreFor } from "./store-BaaonhkJ.mjs";
|
|
10
|
+
import { r as runtimeOf } from "./runtime-Cmn-FeYO.mjs";
|
|
9
11
|
import { i as DEFAULT_STORAGE, n as DEFAULT_CACHE, r as DEFAULT_EVENTS$1, t as readFakes } from "./fakes-C9RiT6XG.mjs";
|
|
10
12
|
import { basename, dirname, join, parse, resolve } from "node:path";
|
|
11
13
|
import { stdin, stdout } from "node:process";
|
|
12
14
|
import * as readline from "node:readline/promises";
|
|
13
|
-
import { copyFileSync, existsSync,
|
|
14
|
-
import { mkdir,
|
|
15
|
-
import { hostname, networkInterfaces,
|
|
15
|
+
import { copyFileSync, existsSync, readFileSync, unlinkSync } from "node:fs";
|
|
16
|
+
import { mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
|
|
17
|
+
import { hostname, networkInterfaces, userInfo } from "node:os";
|
|
16
18
|
import { promisify } from "node:util";
|
|
17
19
|
import { DEFAULT_POSTGRES_VERSION, cacheTable, cookieDomain, dependenciesOf, dependentsOf, externalApiUrl, kebabCase, mobileOrigins, provideKey, providedKeyFor, provisionOrder, publicEnvFor, schemeBase } from "@geekmidas/manifest";
|
|
18
20
|
import { fileURLToPath } from "node:url";
|
|
@@ -105,128 +107,6 @@ async function prompt(message, options) {
|
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
109
|
//#endregion
|
|
108
|
-
//#region src/auth/credentials.ts
|
|
109
|
-
/**
|
|
110
|
-
* Get the path to the credentials directory
|
|
111
|
-
*/
|
|
112
|
-
function getCredentialsDir(options) {
|
|
113
|
-
if (options?.home) return options.home;
|
|
114
|
-
return options?.root ? join(options.root, ".gkm") : gkmHome();
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Get the path to the credentials file
|
|
118
|
-
*/
|
|
119
|
-
function getCredentialsPath(options) {
|
|
120
|
-
return join(getCredentialsDir(options), "credentials.json");
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Ensure the credentials directory exists
|
|
124
|
-
*/
|
|
125
|
-
function ensureCredentialsDir(options) {
|
|
126
|
-
const dir = getCredentialsDir(options);
|
|
127
|
-
if (!existsSync(dir)) mkdirSync(dir, {
|
|
128
|
-
recursive: true,
|
|
129
|
-
mode: 448
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Read stored credentials from disk
|
|
134
|
-
*/
|
|
135
|
-
async function readCredentials(options) {
|
|
136
|
-
const path = getCredentialsPath(options);
|
|
137
|
-
if (!existsSync(path)) return {};
|
|
138
|
-
try {
|
|
139
|
-
const content = await readFile(path, "utf-8");
|
|
140
|
-
return JSON.parse(content);
|
|
141
|
-
} catch {
|
|
142
|
-
return {};
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Write credentials to disk
|
|
147
|
-
*/
|
|
148
|
-
async function writeCredentials(credentials, options) {
|
|
149
|
-
ensureCredentialsDir(options);
|
|
150
|
-
const path = getCredentialsPath(options);
|
|
151
|
-
await writeFile(path, JSON.stringify(credentials, null, 2), { mode: 384 });
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Store Dokploy credentials
|
|
155
|
-
*/
|
|
156
|
-
async function storeDokployCredentials(token, endpoint, options) {
|
|
157
|
-
const credentials = await readCredentials(options);
|
|
158
|
-
credentials.dokploy = {
|
|
159
|
-
token,
|
|
160
|
-
endpoint,
|
|
161
|
-
storedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
162
|
-
};
|
|
163
|
-
await writeCredentials(credentials, options);
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Get stored Dokploy credentials
|
|
167
|
-
*/
|
|
168
|
-
async function getDokployCredentials(options) {
|
|
169
|
-
const credentials = await readCredentials(options);
|
|
170
|
-
const token = process.env.DOKPLOY_API_TOKEN ?? credentials.dokploy?.token;
|
|
171
|
-
const endpoint = process.env.DOKPLOY_ENDPOINT ?? credentials.dokploy?.endpoint;
|
|
172
|
-
if (!token || !endpoint) return null;
|
|
173
|
-
return {
|
|
174
|
-
token,
|
|
175
|
-
endpoint: endpoint.replace(/\/$/, ""),
|
|
176
|
-
...credentials.dokploy?.registryId ? { registryId: credentials.dokploy.registryId } : {}
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Remove Dokploy credentials
|
|
181
|
-
*/
|
|
182
|
-
async function removeDokployCredentials(options) {
|
|
183
|
-
const credentials = await readCredentials(options);
|
|
184
|
-
if (!credentials.dokploy) return false;
|
|
185
|
-
delete credentials.dokploy;
|
|
186
|
-
await writeCredentials(credentials, options);
|
|
187
|
-
return true;
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Get Dokploy API token, checking stored credentials first, then environment
|
|
191
|
-
*/
|
|
192
|
-
async function getDokployToken(options) {
|
|
193
|
-
const envToken = process.env.DOKPLOY_API_TOKEN;
|
|
194
|
-
if (envToken) return envToken;
|
|
195
|
-
const stored = await getDokployCredentials(options);
|
|
196
|
-
if (stored) return stored.token;
|
|
197
|
-
return null;
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Get Dokploy registry ID from stored credentials
|
|
201
|
-
*/
|
|
202
|
-
async function getDokployRegistryId(options) {
|
|
203
|
-
return (await getDokployCredentials(options))?.registryId ?? void 0;
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Store Hostinger API token
|
|
207
|
-
*
|
|
208
|
-
* @param token - API token from hpanel.hostinger.com/profile/api
|
|
209
|
-
*/
|
|
210
|
-
async function storeHostingerToken(token, options) {
|
|
211
|
-
const credentials = await readCredentials(options);
|
|
212
|
-
credentials.hostinger = {
|
|
213
|
-
token,
|
|
214
|
-
storedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
215
|
-
};
|
|
216
|
-
await writeCredentials(credentials, options);
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Get stored Hostinger API token
|
|
220
|
-
*
|
|
221
|
-
* Checks environment variable first (HOSTINGER_API_TOKEN),
|
|
222
|
-
* then falls back to stored credentials.
|
|
223
|
-
*/
|
|
224
|
-
async function getHostingerToken(options) {
|
|
225
|
-
const envToken = process.env.HOSTINGER_API_TOKEN;
|
|
226
|
-
if (envToken) return envToken;
|
|
227
|
-
return (await readCredentials(options)).hostinger?.token ?? null;
|
|
228
|
-
}
|
|
229
|
-
//#endregion
|
|
230
110
|
//#region src/auth/index.ts
|
|
231
111
|
const logger$2 = console;
|
|
232
112
|
/**
|
|
@@ -2430,7 +2310,7 @@ var UnassignedPort = class extends Error {
|
|
|
2430
2310
|
* Every call is scoped to the generated compose file. Nothing here can touch a
|
|
2431
2311
|
* container this project did not generate.
|
|
2432
2312
|
*/
|
|
2433
|
-
const run
|
|
2313
|
+
const run = promisify(execFile);
|
|
2434
2314
|
/**
|
|
2435
2315
|
* The generated file, then the project's own if it has one.
|
|
2436
2316
|
*
|
|
@@ -2473,7 +2353,7 @@ function shown(args, services) {
|
|
|
2473
2353
|
const dockerCli = {
|
|
2474
2354
|
async publishedPort(composePath, service, inside) {
|
|
2475
2355
|
try {
|
|
2476
|
-
const { stdout } = await run
|
|
2356
|
+
const { stdout } = await run("docker", [
|
|
2477
2357
|
"compose",
|
|
2478
2358
|
...composeFiles(composePath),
|
|
2479
2359
|
"port",
|
|
@@ -2498,11 +2378,11 @@ const dockerCli = {
|
|
|
2498
2378
|
...services
|
|
2499
2379
|
];
|
|
2500
2380
|
if (options.show) return shown(args, services);
|
|
2501
|
-
await run
|
|
2381
|
+
await run("docker", args);
|
|
2502
2382
|
},
|
|
2503
2383
|
async copyOut(composePath, service, from, to) {
|
|
2504
2384
|
await mkdir(dirname(to), { recursive: true });
|
|
2505
|
-
await run
|
|
2385
|
+
await run("docker", [
|
|
2506
2386
|
"compose",
|
|
2507
2387
|
...composeFiles(composePath),
|
|
2508
2388
|
"cp",
|
|
@@ -2511,7 +2391,7 @@ const dockerCli = {
|
|
|
2511
2391
|
]);
|
|
2512
2392
|
},
|
|
2513
2393
|
async reload(composePath, service) {
|
|
2514
|
-
await run
|
|
2394
|
+
await run("docker", [
|
|
2515
2395
|
"compose",
|
|
2516
2396
|
...composeFiles(composePath),
|
|
2517
2397
|
"exec",
|
|
@@ -2526,7 +2406,7 @@ const dockerCli = {
|
|
|
2526
2406
|
async healthy(composePath, services) {
|
|
2527
2407
|
if (services.length === 0) return true;
|
|
2528
2408
|
try {
|
|
2529
|
-
const { stdout } = await run
|
|
2409
|
+
const { stdout } = await run("docker", [
|
|
2530
2410
|
"compose",
|
|
2531
2411
|
...composeFiles(composePath),
|
|
2532
2412
|
"ps",
|
|
@@ -3478,331 +3358,6 @@ function localAddress(port) {
|
|
|
3478
3358
|
return `http://localhost:${port}`;
|
|
3479
3359
|
}
|
|
3480
3360
|
//#endregion
|
|
3481
|
-
//#region src/run.ts
|
|
3482
|
-
/**
|
|
3483
|
-
* Start a program with an argument array, never a shell string.
|
|
3484
|
-
*
|
|
3485
|
-
* `gkm build`, `gkm docker` and `gkm deploy` pass values that come from the
|
|
3486
|
-
* workspace — image refs, tags, build args, package names — to `docker` and
|
|
3487
|
-
* `turbo`. Joined into a string and handed to a shell, a package named
|
|
3488
|
-
* `x;curl …|sh` or a tag holding `$(…)` became part of the command line, which
|
|
3489
|
-
* matters most where the CLI builds a repository it didn't write: a CI job for a
|
|
3490
|
-
* fork, a shared build runner. Here every value reaches the program as one
|
|
3491
|
-
* `argv` element, whatever it contains.
|
|
3492
|
-
*/
|
|
3493
|
-
/** Long enough for a cold image build; short enough that a hung one ends. */
|
|
3494
|
-
const DEFAULT_TIMEOUT_MS = 18e5;
|
|
3495
|
-
/** How long a timed-out child has to exit on SIGTERM before it is killed. */
|
|
3496
|
-
const KILL_GRACE_MS$1 = 5e3;
|
|
3497
|
-
/** The command line as a person would read it — for messages, never to run. */
|
|
3498
|
-
function display(command, args) {
|
|
3499
|
-
return [command, ...args].join(" ");
|
|
3500
|
-
}
|
|
3501
|
-
/** The program ran and exited unsuccessfully; its own output said why. */
|
|
3502
|
-
var CommandFailed = class extends Error {
|
|
3503
|
-
command;
|
|
3504
|
-
args;
|
|
3505
|
-
exitCode;
|
|
3506
|
-
signal;
|
|
3507
|
-
constructor(command, args, exitCode, signal) {
|
|
3508
|
-
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.`);
|
|
3509
|
-
this.command = command;
|
|
3510
|
-
this.args = args;
|
|
3511
|
-
this.exitCode = exitCode;
|
|
3512
|
-
this.signal = signal;
|
|
3513
|
-
this.name = "CommandFailed";
|
|
3514
|
-
}
|
|
3515
|
-
};
|
|
3516
|
-
/** The program ran past its timeout and was killed. */
|
|
3517
|
-
var CommandTimedOut = class extends Error {
|
|
3518
|
-
command;
|
|
3519
|
-
args;
|
|
3520
|
-
timeoutMs;
|
|
3521
|
-
constructor(command, args, timeoutMs) {
|
|
3522
|
-
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.`);
|
|
3523
|
-
this.command = command;
|
|
3524
|
-
this.args = args;
|
|
3525
|
-
this.timeoutMs = timeoutMs;
|
|
3526
|
-
this.name = "CommandTimedOut";
|
|
3527
|
-
}
|
|
3528
|
-
};
|
|
3529
|
-
/**
|
|
3530
|
-
* Run `command` with `args`, resolving when it exits 0.
|
|
3531
|
-
*
|
|
3532
|
-
* Rejects with {@link CommandFailed} on any other exit, {@link CommandTimedOut}
|
|
3533
|
-
* once `timeoutMs` passes (after the child is gone), and with the spawn error
|
|
3534
|
-
* itself when the program cannot be started at all — `ENOENT` already names it.
|
|
3535
|
-
*/
|
|
3536
|
-
async function run(command, args, options = {}) {
|
|
3537
|
-
await spawnChild(command, args, options, false);
|
|
3538
|
-
}
|
|
3539
|
-
/**
|
|
3540
|
-
* {@link run}, resolving with what the program wrote to stdout — for a value
|
|
3541
|
-
* the CLI reads back, such as the digest `docker inspect` reports. stderr still
|
|
3542
|
-
* reaches the terminal, so a failure explains itself the same way.
|
|
3543
|
-
*/
|
|
3544
|
-
function runOutput(command, args, options = {}) {
|
|
3545
|
-
return spawnChild(command, args, options, true);
|
|
3546
|
-
}
|
|
3547
|
-
function spawnChild(command, args, options, capture) {
|
|
3548
|
-
const { timeoutMs = DEFAULT_TIMEOUT_MS, ...spawnOptions } = options;
|
|
3549
|
-
return new Promise((resolve, reject) => {
|
|
3550
|
-
const child = spawn(command, [...args], {
|
|
3551
|
-
stdio: "inherit",
|
|
3552
|
-
...spawnOptions,
|
|
3553
|
-
...capture ? { stdio: [
|
|
3554
|
-
"ignore",
|
|
3555
|
-
"pipe",
|
|
3556
|
-
"inherit"
|
|
3557
|
-
] } : {},
|
|
3558
|
-
shell: false
|
|
3559
|
-
});
|
|
3560
|
-
let stdout = "";
|
|
3561
|
-
child.stdout?.on("data", (chunk) => {
|
|
3562
|
-
stdout += chunk.toString();
|
|
3563
|
-
});
|
|
3564
|
-
let timedOut = false;
|
|
3565
|
-
let killer;
|
|
3566
|
-
const timer = setTimeout(() => {
|
|
3567
|
-
timedOut = true;
|
|
3568
|
-
child.kill("SIGTERM");
|
|
3569
|
-
killer = setTimeout(() => child.kill("SIGKILL"), KILL_GRACE_MS$1);
|
|
3570
|
-
killer.unref?.();
|
|
3571
|
-
}, timeoutMs);
|
|
3572
|
-
timer.unref?.();
|
|
3573
|
-
const settle = () => {
|
|
3574
|
-
clearTimeout(timer);
|
|
3575
|
-
if (killer) clearTimeout(killer);
|
|
3576
|
-
};
|
|
3577
|
-
child.on("error", (error) => {
|
|
3578
|
-
settle();
|
|
3579
|
-
reject(spawnOptions.signal?.aborted ? spawnOptions.signal.reason : error);
|
|
3580
|
-
});
|
|
3581
|
-
child.on("close", (code, signal) => {
|
|
3582
|
-
settle();
|
|
3583
|
-
if (spawnOptions.signal?.aborted) reject(spawnOptions.signal.reason);
|
|
3584
|
-
else if (timedOut) reject(new CommandTimedOut(command, args, timeoutMs));
|
|
3585
|
-
else if (code === 0) resolve(stdout);
|
|
3586
|
-
else reject(new CommandFailed(command, args, code, signal));
|
|
3587
|
-
});
|
|
3588
|
-
});
|
|
3589
|
-
}
|
|
3590
|
-
//#endregion
|
|
3591
|
-
//#region src/sandbox/env.ts
|
|
3592
|
-
/**
|
|
3593
|
-
* What of the host's environment a local sandbox passes on.
|
|
3594
|
-
*
|
|
3595
|
-
* An allowlist, not a denylist: a credential's variable has any name its
|
|
3596
|
-
* owner chose (`DOKPLOY_TOKEN`, `AWS_SECRET_ACCESS_KEY`, `MY_VAULT_TOKEN`), so
|
|
3597
|
-
* the only safe default is to name what a program needs to *run* and pass
|
|
3598
|
-
* nothing else.
|
|
3599
|
-
*/
|
|
3600
|
-
/**
|
|
3601
|
-
* Variables a command needs to find programs, write temp files, print in the
|
|
3602
|
-
* user's locale and reach the network through the host's proxy — and nothing
|
|
3603
|
-
* that authenticates as anyone.
|
|
3604
|
-
*
|
|
3605
|
-
* Deliberately left out:
|
|
3606
|
-
* - `NODE_OPTIONS`: it can `--require` or `--import` code into every node
|
|
3607
|
-
* process, and CI often holds `--import tsx` there. A step that needs a
|
|
3608
|
-
* loader passes its own.
|
|
3609
|
-
* - `NODE_AUTH_TOKEN`, `NPM_TOKEN`, `npm_config_*`: registry tokens
|
|
3610
|
-
* (`actions/setup-node` writes `NODE_AUTH_TOKEN`), which is why there is no
|
|
3611
|
-
* `NODE_*` wildcard.
|
|
3612
|
-
* - `AWS_*`, `DOCKER_*`, `DOKPLOY_*`, `GITHUB_TOKEN`, `TURBO_TOKEN`, `GKM_*`:
|
|
3613
|
-
* credentials, or where the deploy keeps them.
|
|
3614
|
-
* - `SHELL`, `EDITOR` and the rest of a login session: nothing here starts a
|
|
3615
|
-
* shell.
|
|
3616
|
-
*
|
|
3617
|
-
* Proxies are passed: behind one, nothing installs or builds without it. A
|
|
3618
|
-
* proxy URL with a password in it reaches the command too — a host that keeps
|
|
3619
|
-
* one there and builds code it does not trust should pass a sandbox of its
|
|
3620
|
-
* own.
|
|
3621
|
-
*/
|
|
3622
|
-
const SANDBOX_ENV_ALLOWLIST = [
|
|
3623
|
-
"PATH",
|
|
3624
|
-
"HOME",
|
|
3625
|
-
"USER",
|
|
3626
|
-
"LOGNAME",
|
|
3627
|
-
"TMPDIR",
|
|
3628
|
-
"TMP",
|
|
3629
|
-
"TEMP",
|
|
3630
|
-
"LANG",
|
|
3631
|
-
"LANGUAGE",
|
|
3632
|
-
"TZ",
|
|
3633
|
-
/^LC_[A-Z]+$/,
|
|
3634
|
-
"TERM",
|
|
3635
|
-
"COLORTERM",
|
|
3636
|
-
"NO_COLOR",
|
|
3637
|
-
"FORCE_COLOR",
|
|
3638
|
-
"CI",
|
|
3639
|
-
"NODE_ENV",
|
|
3640
|
-
"NODE_EXTRA_CA_CERTS",
|
|
3641
|
-
"COREPACK_HOME",
|
|
3642
|
-
"PNPM_HOME",
|
|
3643
|
-
"XDG_CACHE_HOME",
|
|
3644
|
-
"XDG_DATA_HOME",
|
|
3645
|
-
"HTTP_PROXY",
|
|
3646
|
-
"HTTPS_PROXY",
|
|
3647
|
-
"NO_PROXY",
|
|
3648
|
-
"http_proxy",
|
|
3649
|
-
"https_proxy",
|
|
3650
|
-
"no_proxy",
|
|
3651
|
-
"SystemRoot",
|
|
3652
|
-
"SYSTEMROOT",
|
|
3653
|
-
"windir",
|
|
3654
|
-
"WINDIR",
|
|
3655
|
-
"ComSpec",
|
|
3656
|
-
"COMSPEC",
|
|
3657
|
-
"PATHEXT",
|
|
3658
|
-
"USERPROFILE",
|
|
3659
|
-
"APPDATA",
|
|
3660
|
-
"LOCALAPPDATA"
|
|
3661
|
-
];
|
|
3662
|
-
function allowed(name) {
|
|
3663
|
-
return SANDBOX_ENV_ALLOWLIST.some((entry) => typeof entry === "string" ? entry === name : entry.test(name));
|
|
3664
|
-
}
|
|
3665
|
-
/**
|
|
3666
|
-
* The allowlisted part of `source`, plus each of `extra` the host chose to
|
|
3667
|
-
* pass on by name.
|
|
3668
|
-
*/
|
|
3669
|
-
function allowlistedEnv(source = process.env, extra = []) {
|
|
3670
|
-
const env = {};
|
|
3671
|
-
for (const [name, value] of Object.entries(source)) {
|
|
3672
|
-
if (value === void 0) continue;
|
|
3673
|
-
if (allowed(name) || extra.includes(name)) env[name] = value;
|
|
3674
|
-
}
|
|
3675
|
-
return env;
|
|
3676
|
-
}
|
|
3677
|
-
//#endregion
|
|
3678
|
-
//#region src/sandbox/local.ts
|
|
3679
|
-
/** How long a timed-out command has to exit on SIGTERM before SIGKILL. */
|
|
3680
|
-
const KILL_GRACE_MS = 5e3;
|
|
3681
|
-
/** Where `output` sends a child's streams. */
|
|
3682
|
-
const STDIO = {
|
|
3683
|
-
capture: [
|
|
3684
|
-
"ignore",
|
|
3685
|
-
"pipe",
|
|
3686
|
-
"pipe"
|
|
3687
|
-
],
|
|
3688
|
-
inherit: "inherit",
|
|
3689
|
-
stderr: [
|
|
3690
|
-
"ignore",
|
|
3691
|
-
2,
|
|
3692
|
-
2
|
|
3693
|
-
],
|
|
3694
|
-
ignore: "ignore"
|
|
3695
|
-
};
|
|
3696
|
-
/**
|
|
3697
|
-
* A child process on this machine, as this user, with an allowlisted
|
|
3698
|
-
* environment.
|
|
3699
|
-
*
|
|
3700
|
-
* What it withholds from the command: the host's environment beyond
|
|
3701
|
-
* {@link SANDBOX_ENV_ALLOWLIST}, a shell, a working directory outside the
|
|
3702
|
-
* project, and any time past the timeout. What it does not: the host's
|
|
3703
|
-
* filesystem, which the command can read and write as the user running the
|
|
3704
|
-
* deploy. So it is not `isolating`, and it is the default for projects the
|
|
3705
|
-
* host already trusts — the developer's own, a team's own CI. Code nobody
|
|
3706
|
-
* vetted belongs in a sandbox that is.
|
|
3707
|
-
*
|
|
3708
|
-
* A timed-out command is sent SIGTERM, then SIGKILL; processes it started
|
|
3709
|
-
* itself are its to stop.
|
|
3710
|
-
*/
|
|
3711
|
-
var LocalSandbox = class {
|
|
3712
|
-
root;
|
|
3713
|
-
isolating = false;
|
|
3714
|
-
env;
|
|
3715
|
-
constructor(options) {
|
|
3716
|
-
this.root = resolve(options.root);
|
|
3717
|
-
this.env = {
|
|
3718
|
-
...allowlistedEnv(options.hostEnv ?? process.env, options.passEnv),
|
|
3719
|
-
...options.home ? {
|
|
3720
|
-
HOME: options.home,
|
|
3721
|
-
USERPROFILE: options.home
|
|
3722
|
-
} : {}
|
|
3723
|
-
};
|
|
3724
|
-
}
|
|
3725
|
-
async exec(command, args, options) {
|
|
3726
|
-
const cwd = confineCwd(this.root, options.cwd);
|
|
3727
|
-
assertSecretNames(options.secrets);
|
|
3728
|
-
options.signal?.throwIfAborted();
|
|
3729
|
-
const secretsDir = await mountSecrets(options.secrets);
|
|
3730
|
-
try {
|
|
3731
|
-
return await spawnConfined(command, args, {
|
|
3732
|
-
...options,
|
|
3733
|
-
cwd,
|
|
3734
|
-
env: secretsDir ? {
|
|
3735
|
-
...options.env,
|
|
3736
|
-
[SECRETS_DIR_ENV]: secretsDir
|
|
3737
|
-
} : options.env
|
|
3738
|
-
});
|
|
3739
|
-
} finally {
|
|
3740
|
-
if (secretsDir) await rm(secretsDir, {
|
|
3741
|
-
recursive: true,
|
|
3742
|
-
force: true
|
|
3743
|
-
});
|
|
3744
|
-
}
|
|
3745
|
-
}
|
|
3746
|
-
};
|
|
3747
|
-
/**
|
|
3748
|
-
* Each secret as a 0600 file in a fresh 0700 directory outside the project —
|
|
3749
|
-
* where nothing the build writes, packs or commits will pick it up.
|
|
3750
|
-
*/
|
|
3751
|
-
async function mountSecrets(secrets) {
|
|
3752
|
-
if (!secrets || Object.keys(secrets).length === 0) return void 0;
|
|
3753
|
-
const dir = await mkdtemp(join(tmpdir(), "gkm-secrets-"));
|
|
3754
|
-
for (const [name, value] of Object.entries(secrets)) await writeFile(join(dir, name), value, { mode: 384 });
|
|
3755
|
-
return dir;
|
|
3756
|
-
}
|
|
3757
|
-
function spawnConfined(command, args, options) {
|
|
3758
|
-
const { output = "capture", signal, timeoutMs } = options;
|
|
3759
|
-
return new Promise((resolvePromise, reject) => {
|
|
3760
|
-
const child = spawn(command, [...args], {
|
|
3761
|
-
cwd: options.cwd,
|
|
3762
|
-
env: { ...options.env },
|
|
3763
|
-
stdio: STDIO[output],
|
|
3764
|
-
shell: false,
|
|
3765
|
-
...signal ? { signal } : {}
|
|
3766
|
-
});
|
|
3767
|
-
let stdout = "";
|
|
3768
|
-
let stderr = "";
|
|
3769
|
-
child.stdout?.on("data", (chunk) => {
|
|
3770
|
-
stdout += chunk.toString();
|
|
3771
|
-
});
|
|
3772
|
-
child.stderr?.on("data", (chunk) => {
|
|
3773
|
-
stderr += chunk.toString();
|
|
3774
|
-
});
|
|
3775
|
-
let timedOut = false;
|
|
3776
|
-
let killer;
|
|
3777
|
-
const timer = setTimeout(() => {
|
|
3778
|
-
timedOut = true;
|
|
3779
|
-
child.kill("SIGTERM");
|
|
3780
|
-
killer = setTimeout(() => child.kill("SIGKILL"), KILL_GRACE_MS);
|
|
3781
|
-
killer.unref?.();
|
|
3782
|
-
}, timeoutMs);
|
|
3783
|
-
timer.unref?.();
|
|
3784
|
-
const settle = () => {
|
|
3785
|
-
clearTimeout(timer);
|
|
3786
|
-
if (killer) clearTimeout(killer);
|
|
3787
|
-
};
|
|
3788
|
-
child.on("error", (error) => {
|
|
3789
|
-
settle();
|
|
3790
|
-
reject(signal?.aborted ? signal.reason : error);
|
|
3791
|
-
});
|
|
3792
|
-
child.on("close", (code, killedBy) => {
|
|
3793
|
-
settle();
|
|
3794
|
-
if (signal?.aborted) reject(signal.reason);
|
|
3795
|
-
else if (timedOut) reject(new CommandTimedOut(command, args, timeoutMs));
|
|
3796
|
-
else resolvePromise({
|
|
3797
|
-
exitCode: code,
|
|
3798
|
-
signal: killedBy ?? null,
|
|
3799
|
-
stdout,
|
|
3800
|
-
stderr
|
|
3801
|
-
});
|
|
3802
|
-
});
|
|
3803
|
-
});
|
|
3804
|
-
}
|
|
3805
|
-
//#endregion
|
|
3806
3361
|
//#region src/secrets/encryption.ts
|
|
3807
3362
|
var encryption_exports = /* @__PURE__ */ __exportAll({
|
|
3808
3363
|
encryptSecrets: () => encryptSecrets,
|
|
@@ -4227,17 +3782,17 @@ function isStateStore(value) {
|
|
|
4227
3782
|
async function createStateStore(options) {
|
|
4228
3783
|
const { config, workspaceRoot, workspaceName } = options;
|
|
4229
3784
|
if (!config || config.provider === "local") {
|
|
4230
|
-
const { LocalStateStore } = await import("./LocalStateStore-
|
|
3785
|
+
const { LocalStateStore } = await import("./LocalStateStore-Cy1ZBW7U.mjs").then((n) => n.n);
|
|
4231
3786
|
return new LocalStateStore(workspaceRoot);
|
|
4232
3787
|
}
|
|
4233
3788
|
if (isStateStore(config.provider)) return config.provider;
|
|
4234
3789
|
if (isStateProvider(config.provider)) {
|
|
4235
|
-
const { LegacyStateStore } = await import("./LegacyStateStore-
|
|
3790
|
+
const { LegacyStateStore } = await import("./LegacyStateStore-DIgkGaUP.mjs");
|
|
4236
3791
|
return new LegacyStateStore(config.provider, { warn: options.warn });
|
|
4237
3792
|
}
|
|
4238
3793
|
if (config.provider === "ssm") {
|
|
4239
3794
|
if (!workspaceName) throw new StateStoreNeedsWorkspaceName("ssm");
|
|
4240
|
-
const { SSMStateStore } = await import("./SSMStateStore-
|
|
3795
|
+
const { SSMStateStore } = await import("./SSMStateStore-DfF174xQ.mjs");
|
|
4241
3796
|
const ssm = config;
|
|
4242
3797
|
return SSMStateStore.create({
|
|
4243
3798
|
workspaceName,
|
|
@@ -4247,7 +3802,7 @@ async function createStateStore(options) {
|
|
|
4247
3802
|
}
|
|
4248
3803
|
if (config.provider === "s3") {
|
|
4249
3804
|
if (!workspaceName) throw new StateStoreNeedsWorkspaceName("s3");
|
|
4250
|
-
const { S3StateStore } = await import("./S3StateStore-
|
|
3805
|
+
const { S3StateStore } = await import("./S3StateStore-D3x6ivBL.mjs");
|
|
4251
3806
|
const s3 = config;
|
|
4252
3807
|
return S3StateStore.create({
|
|
4253
3808
|
workspaceName,
|
|
@@ -5425,7 +4980,7 @@ async function buildDockerImage(imageName, options, cwd) {
|
|
|
5425
4980
|
logger.log(`\n🐳 Building Docker image: ${fullImageName}`);
|
|
5426
4981
|
const cleanup = ensureLockfile(cwd);
|
|
5427
4982
|
try {
|
|
5428
|
-
await run("docker", [
|
|
4983
|
+
await run$1("docker", [
|
|
5429
4984
|
"build",
|
|
5430
4985
|
"--file=.gkm/docker/Dockerfile",
|
|
5431
4986
|
`--tag=${fullImageName}`,
|
|
@@ -5454,7 +5009,7 @@ async function pushDockerImage(imageName, options, cwd) {
|
|
|
5454
5009
|
const fullImageName = validateImageRef(`${registry}/${imageName}:${tag}`);
|
|
5455
5010
|
logger.log(`\n🚀 Pushing Docker image: ${fullImageName}`);
|
|
5456
5011
|
try {
|
|
5457
|
-
await run("docker", ["push", fullImageName], { cwd });
|
|
5012
|
+
await run$1("docker", ["push", fullImageName], { cwd });
|
|
5458
5013
|
logger.log(`✅ Docker image pushed: ${fullImageName}`);
|
|
5459
5014
|
} catch (error) {
|
|
5460
5015
|
throw new DockerPushFailed(fullImageName, error);
|
|
@@ -6691,6 +6246,6 @@ async function sniffAllApps(apps, workspacePath, options = {}) {
|
|
|
6691
6246
|
return results;
|
|
6692
6247
|
}
|
|
6693
6248
|
//#endregion
|
|
6694
|
-
export {
|
|
6249
|
+
export { pgClient as $, StateStoreBusy as A, FAKE_ENV as B, setDnsRecord as C, loginCommand as Ct, DocumentStateStore as D, canPrompt as Dt, setPostgresBackupId as E, whoamiCommand as Et, newLockHolder as F, workspace_exports as G, constructGlobs as H, withGeneratedSecrets as I, applyPostgres as J, LOCAL_CA_PATH as K, encryptSecrets as L, StateVersionConflict as M, contentVersion as N, StageStateMissing as O, prompt as Ot, createStateStore as P, composeFor as Q, encryption_exports as R, setDeployedImage as S, prepareEntryCredentials as St, setGeneratedSecret as T, validateDokployToken as Tt, derivedContainers as U, backendsOf as V, reconcileWorkspace as W, postgresStatements as X, postgresDatabaseNames as Y, quoteIdentifier as Z, getBackupState as _, createEntryWrapper as _t, DockerBuildFailed as a, resourceName as at, setApplicationId as b, loadEnvFiles as bt, dockerCommand as c, eventsBackendFor as ct, generateDockerignore as d, DEFAULT_IMAGES as dt, appEnvKeys as et, generateSlimDockerfile as f, describeServices as ft, createEmptyState as g, createCredentialsPreload as gt, resolveHost as h, primaryPortKey as ht, DokployApiError as i, planFor as it, StateStoreWithoutLocking as j, StateLocked as k, siteDockerfile as l, providerOf as lt, isMainFrontendApp as m, portKeys as mt, sniffAppEnvironment as n, envFor as nt, DockerPushFailed as o, hostFor as ot, validateImageRef as p, fakeKey as pt, forgetState as q, DokployApi as r, localRolePassword as rt, appPackageName as s, cacheBackendFor as st, sniffAllApps as t, networkEnv as tt, detectPackageManager as u, storageBackendFor as ut, getGeneratedSecret as v, findAvailablePort as vt, setDnsVerification as w, logoutCommand as wt, setBackupState as x, loadSecretsForApp as xt, isDnsVerified as y, isPortAvailable as yt, keyFingerprint as z };
|
|
6695
6250
|
|
|
6696
|
-
//# sourceMappingURL=sniffer-
|
|
6251
|
+
//# sourceMappingURL=sniffer-49KPbDgq.mjs.map
|