@geekmidas/cli 10.0.0-alpha.162 → 10.0.0-alpha.163
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/{cli-Brr1IVq1.mjs → cli-BAn-gJ6S.mjs} +2 -2
- package/dist/{cli-Brr1IVq1.mjs.map → cli-BAn-gJ6S.mjs.map} +1 -1
- package/dist/{cli-D--xSSlK.cjs → cli-CI-wO3-w.cjs} +2 -2
- package/dist/{cli-D--xSSlK.cjs.map → cli-CI-wO3-w.cjs.map} +1 -1
- package/dist/deploy/public.cjs +1 -1
- package/dist/deploy/public.mjs +1 -1
- package/dist/{deploy-Bb-o2KYC.mjs → deploy-C4Qb-A-z.mjs} +26 -6
- package/dist/{deploy-Bb-o2KYC.mjs.map → deploy-C4Qb-A-z.mjs.map} +1 -1
- package/dist/{deploy-Ck0zXkM7.cjs → deploy-CGywNg5R.cjs} +26 -6
- package/dist/{deploy-Ck0zXkM7.cjs.map → deploy-CGywNg5R.cjs.map} +1 -1
- package/dist/{destroy-JHapr9UF.cjs → destroy-IUx8vz1q.cjs} +2 -2
- package/dist/{destroy-JHapr9UF.cjs.map → destroy-IUx8vz1q.cjs.map} +1 -1
- package/dist/{destroy-DIV6l_94.mjs → destroy-xjqqzAmU.mjs} +2 -2
- package/dist/{destroy-DIV6l_94.mjs.map → destroy-xjqqzAmU.mjs.map} +1 -1
- package/dist/{github-CRvdaD2Y.cjs → github-82k5-OZO.cjs} +4 -3
- package/dist/github-82k5-OZO.cjs.map +1 -0
- package/dist/{github-BOXn5NEP.mjs → github-DxgGIvq1.mjs} +4 -3
- package/dist/github-DxgGIvq1.mjs.map +1 -0
- package/dist/index.cjs +27 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +27 -27
- package/dist/index.mjs.map +1 -1
- package/dist/{serverSetup-BoxtHWkI.cjs → serverSetup-BXk8SGuz.cjs} +2 -2
- package/dist/{serverSetup-BoxtHWkI.cjs.map → serverSetup-BXk8SGuz.cjs.map} +1 -1
- package/dist/{serverSetup-DxcbUlwE.mjs → serverSetup-CzoKT3nH.mjs} +2 -2
- package/dist/{serverSetup-DxcbUlwE.mjs.map → serverSetup-CzoKT3nH.mjs.map} +1 -1
- package/package.json +15 -15
- package/dist/github-BOXn5NEP.mjs.map +0 -1
- package/dist/github-CRvdaD2Y.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as storedCredentials } from "./credentials-DhCCRQJp.mjs";
|
|
2
2
|
import { f as loadRawWorkspaceConfig } from "./config-Da9bxnkT.mjs";
|
|
3
|
-
import { t as deploy } from "./deploy-
|
|
3
|
+
import { t as deploy } from "./deploy-C4Qb-A-z.mjs";
|
|
4
4
|
import { s as formatError } from "./index.mjs";
|
|
5
5
|
import { n as targetForProvider } from "./provider-CEOKk8NS.mjs";
|
|
6
6
|
import { terminalCredentials } from "./terminal-BqqGsi0O.mjs";
|
|
@@ -77,4 +77,4 @@ async function deployCli(options, streams = { stdout: process.stdout }) {
|
|
|
77
77
|
//#endregion
|
|
78
78
|
export { deployCli };
|
|
79
79
|
|
|
80
|
-
//# sourceMappingURL=cli-
|
|
80
|
+
//# sourceMappingURL=cli-BAn-gJ6S.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-
|
|
1
|
+
{"version":3,"file":"cli-BAn-gJ6S.mjs","names":[],"sources":["../src/deploy/cli.ts"],"sourcesContent":["/**\n * `gkm deploy`: the terminal around `deploy()`. CLI layer only.\n *\n * Everything that belongs to a person at a terminal lives here and nowhere\n * below it: prompting for a missing login (and storing it), printing progress,\n * and turning the outcome into an exit code. The deploy itself is the same\n * `deploy()` a host calls.\n */\n\nimport { loadRawWorkspaceConfig } from '../config';\nimport { formatError } from '../debug';\nimport { targetForProvider } from '../target/provider';\nimport { storedCredentials } from './credentials';\nimport { deploy } from './deploy';\nimport { terminalCredentials } from './terminal';\n\nexport interface DeployCliOptions {\n\t/** The project directory: `--cwd`, else where the command was run. */\n\tcwd: string;\n\t/** `--target`: where to deploy. Defaults to `deploy.default`. */\n\ttarget?: string;\n\t/** `--provider`, deprecated: `dokploy` means `--target dokploy`. */\n\tprovider?: string;\n\tstage: string;\n\ttag?: string;\n\t/**\n\t * Print each event as one JSON object per line on stdout, instead of the\n\t * progress lines. Nothing prompts: a missing credential fails the run.\n\t */\n\tjson?: boolean;\n\t/** Plan only: create, change, build and push nothing. */\n\tdryRun?: boolean;\n\t/** On a failed release, roll back every app, not only the failed ones. */\n\tatomic?: boolean;\n\t/** `--allow-dev-services`. */\n\tallowDevServices?: boolean;\n\t/** `--skip-dns`. */\n\tskipDns?: boolean;\n\t/** `--rotate-keys`. */\n\trotateKeys?: boolean;\n\t/** `--retire-old-keys`. */\n\tretireOldKeys?: boolean;\n}\n\n/** Where the command writes. The process's own streams, outside tests. */\nexport interface DeployCliStreams {\n\tstdout: Pick<NodeJS.WriteStream, 'write'>;\n}\n\n/**\n * Run `gkm deploy` and resolve with its exit code: 0 when the run finished,\n * 1 when anything stopped it.\n */\nexport async function deployCli(\n\toptions: DeployCliOptions,\n\tstreams: DeployCliStreams = { stdout: process.stdout },\n): Promise<number> {\n\tlet target = options.target;\n\tif (options.provider !== undefined && target === undefined) {\n\t\ttry {\n\t\t\t// On stderr, so a `--json` run's stdout still carries only events.\n\t\t\ttarget = targetForProvider(options.provider, (message) =>\n\t\t\t\tconsole.warn(message),\n\t\t\t);\n\t\t} catch (error) {\n\t\t\tconsole.error(formatError(error));\n\t\t\treturn 1;\n\t\t}\n\t}\n\n\t// Loaded here, with the environment `gkm deploy` was run in, and handed\n\t// to the run: a reload in its sandbox sees only an allowlist of it, so a\n\t// setting the config reads from the environment would differ by step.\n\tlet config: Awaited<ReturnType<typeof loadRawWorkspaceConfig>>['config'];\n\ttry {\n\t\t({ config } = await loadRawWorkspaceConfig(options.cwd));\n\t} catch (error) {\n\t\tconsole.error(formatError(error));\n\t\treturn 1;\n\t}\n\n\tconst input = {\n\t\tcwd: options.cwd,\n\t\tconfig,\n\t\tstage: options.stage,\n\t\t...(target ? { target } : {}),\n\t\t...(options.tag ? { tag: options.tag } : {}),\n\t\t...(options.dryRun ? { dryRun: true } : {}),\n\t\t...(options.atomic ? { atomic: true } : {}),\n\t\t...(options.allowDevServices ? { allowDevServices: true } : {}),\n\t\t...(options.skipDns ? { skipDns: true } : {}),\n\t\t...(options.rotateKeys ? { rotateKeys: true } : {}),\n\t\t...(options.retireOldKeys ? { retireOldKeys: true } : {}),\n\t};\n\n\tif (options.json) {\n\t\t// stdout carries the events and nothing else: docker's own output goes\n\t\t// to stderr, and nobody is asked anything — a prompt would be written\n\t\t// into the stream a program is parsing.\n\t\tconst run = deploy({\n\t\t\t...input,\n\t\t\tcredentials: storedCredentials(),\n\t\t\tchildOutput: 'stderr',\n\t\t});\n\t\tfor await (const event of run) {\n\t\t\tstreams.stdout.write(`${JSON.stringify(event)}\\n`);\n\t\t}\n\t\treturn run.result.then(\n\t\t\t() => 0,\n\t\t\t(error) => {\n\t\t\t\tconsole.error(formatError(error));\n\t\t\t\treturn 1;\n\t\t\t},\n\t\t);\n\t}\n\n\t// The lines arrive as they are written, rather than as events read back a\n\t// tick later, so they interleave with a prompt exactly as they always did.\n\tconst run = deploy({\n\t\t...input,\n\t\tcredentials: terminalCredentials(storedCredentials()),\n\t\tlogger: {\n\t\t\tinfo: (message) => console.log(message),\n\t\t\twarn: (message) => console.warn(message),\n\t\t\terror: (message) => console.error(message),\n\t\t},\n\t});\n\n\ttry {\n\t\tawait run.result;\n\t\treturn 0;\n\t} catch (error) {\n\t\tconsole.error(formatError(error));\n\t\treturn 1;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqDA,eAAsB,UACrB,SACA,UAA4B,EAAE,QAAQ,QAAQ,OAAO,GACnC;CAClB,IAAI,SAAS,QAAQ;CACrB,IAAI,QAAQ,aAAa,KAAA,KAAa,WAAW,KAAA,GAChD,IAAI;EAEH,SAAS,kBAAkB,QAA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Q,YAAY,QAAQ,MAAM,OAAO;EAC1C;CACD,CAAC;CAED,IAAI;EACH,MAAM,IAAI;EACV,OAAO;CACR,SAAS,OAAO;EACf,QAAQ,MAAM,YAAY,KAAK,CAAC;EAChC,OAAO;CACR;AACD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_credentials = require("./credentials-BR3dNNtO.cjs");
|
|
2
2
|
const require_config = require("./config-CLXSXbcs.cjs");
|
|
3
|
-
const require_deploy = require("./deploy-
|
|
3
|
+
const require_deploy = require("./deploy-CGywNg5R.cjs");
|
|
4
4
|
const require_index = require("./index.cjs");
|
|
5
5
|
const require_provider = require("./provider-BqpjG9QM.cjs");
|
|
6
6
|
const require_terminal = require("./terminal-8AA2uK0U.cjs");
|
|
@@ -77,4 +77,4 @@ async function deployCli(options, streams = { stdout: process.stdout }) {
|
|
|
77
77
|
//#endregion
|
|
78
78
|
exports.deployCli = deployCli;
|
|
79
79
|
|
|
80
|
-
//# sourceMappingURL=cli-
|
|
80
|
+
//# sourceMappingURL=cli-CI-wO3-w.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-
|
|
1
|
+
{"version":3,"file":"cli-CI-wO3-w.cjs","names":["targetForProvider","formatError","loadRawWorkspaceConfig","deploy","storedCredentials","terminalCredentials"],"sources":["../src/deploy/cli.ts"],"sourcesContent":["/**\n * `gkm deploy`: the terminal around `deploy()`. CLI layer only.\n *\n * Everything that belongs to a person at a terminal lives here and nowhere\n * below it: prompting for a missing login (and storing it), printing progress,\n * and turning the outcome into an exit code. The deploy itself is the same\n * `deploy()` a host calls.\n */\n\nimport { loadRawWorkspaceConfig } from '../config';\nimport { formatError } from '../debug';\nimport { targetForProvider } from '../target/provider';\nimport { storedCredentials } from './credentials';\nimport { deploy } from './deploy';\nimport { terminalCredentials } from './terminal';\n\nexport interface DeployCliOptions {\n\t/** The project directory: `--cwd`, else where the command was run. */\n\tcwd: string;\n\t/** `--target`: where to deploy. Defaults to `deploy.default`. */\n\ttarget?: string;\n\t/** `--provider`, deprecated: `dokploy` means `--target dokploy`. */\n\tprovider?: string;\n\tstage: string;\n\ttag?: string;\n\t/**\n\t * Print each event as one JSON object per line on stdout, instead of the\n\t * progress lines. Nothing prompts: a missing credential fails the run.\n\t */\n\tjson?: boolean;\n\t/** Plan only: create, change, build and push nothing. */\n\tdryRun?: boolean;\n\t/** On a failed release, roll back every app, not only the failed ones. */\n\tatomic?: boolean;\n\t/** `--allow-dev-services`. */\n\tallowDevServices?: boolean;\n\t/** `--skip-dns`. */\n\tskipDns?: boolean;\n\t/** `--rotate-keys`. */\n\trotateKeys?: boolean;\n\t/** `--retire-old-keys`. */\n\tretireOldKeys?: boolean;\n}\n\n/** Where the command writes. The process's own streams, outside tests. */\nexport interface DeployCliStreams {\n\tstdout: Pick<NodeJS.WriteStream, 'write'>;\n}\n\n/**\n * Run `gkm deploy` and resolve with its exit code: 0 when the run finished,\n * 1 when anything stopped it.\n */\nexport async function deployCli(\n\toptions: DeployCliOptions,\n\tstreams: DeployCliStreams = { stdout: process.stdout },\n): Promise<number> {\n\tlet target = options.target;\n\tif (options.provider !== undefined && target === undefined) {\n\t\ttry {\n\t\t\t// On stderr, so a `--json` run's stdout still carries only events.\n\t\t\ttarget = targetForProvider(options.provider, (message) =>\n\t\t\t\tconsole.warn(message),\n\t\t\t);\n\t\t} catch (error) {\n\t\t\tconsole.error(formatError(error));\n\t\t\treturn 1;\n\t\t}\n\t}\n\n\t// Loaded here, with the environment `gkm deploy` was run in, and handed\n\t// to the run: a reload in its sandbox sees only an allowlist of it, so a\n\t// setting the config reads from the environment would differ by step.\n\tlet config: Awaited<ReturnType<typeof loadRawWorkspaceConfig>>['config'];\n\ttry {\n\t\t({ config } = await loadRawWorkspaceConfig(options.cwd));\n\t} catch (error) {\n\t\tconsole.error(formatError(error));\n\t\treturn 1;\n\t}\n\n\tconst input = {\n\t\tcwd: options.cwd,\n\t\tconfig,\n\t\tstage: options.stage,\n\t\t...(target ? { target } : {}),\n\t\t...(options.tag ? { tag: options.tag } : {}),\n\t\t...(options.dryRun ? { dryRun: true } : {}),\n\t\t...(options.atomic ? { atomic: true } : {}),\n\t\t...(options.allowDevServices ? { allowDevServices: true } : {}),\n\t\t...(options.skipDns ? { skipDns: true } : {}),\n\t\t...(options.rotateKeys ? { rotateKeys: true } : {}),\n\t\t...(options.retireOldKeys ? { retireOldKeys: true } : {}),\n\t};\n\n\tif (options.json) {\n\t\t// stdout carries the events and nothing else: docker's own output goes\n\t\t// to stderr, and nobody is asked anything — a prompt would be written\n\t\t// into the stream a program is parsing.\n\t\tconst run = deploy({\n\t\t\t...input,\n\t\t\tcredentials: storedCredentials(),\n\t\t\tchildOutput: 'stderr',\n\t\t});\n\t\tfor await (const event of run) {\n\t\t\tstreams.stdout.write(`${JSON.stringify(event)}\\n`);\n\t\t}\n\t\treturn run.result.then(\n\t\t\t() => 0,\n\t\t\t(error) => {\n\t\t\t\tconsole.error(formatError(error));\n\t\t\t\treturn 1;\n\t\t\t},\n\t\t);\n\t}\n\n\t// The lines arrive as they are written, rather than as events read back a\n\t// tick later, so they interleave with a prompt exactly as they always did.\n\tconst run = deploy({\n\t\t...input,\n\t\tcredentials: terminalCredentials(storedCredentials()),\n\t\tlogger: {\n\t\t\tinfo: (message) => console.log(message),\n\t\t\twarn: (message) => console.warn(message),\n\t\t\terror: (message) => console.error(message),\n\t\t},\n\t});\n\n\ttry {\n\t\tawait run.result;\n\t\treturn 0;\n\t} catch (error) {\n\t\tconsole.error(formatError(error));\n\t\treturn 1;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqDA,eAAsB,UACrB,SACA,UAA4B,EAAE,QAAQ,QAAQ,OAAO,GACnC;CAClB,IAAI,SAAS,QAAQ;CACrB,IAAI,QAAQ,aAAa,KAAA,KAAa,WAAW,KAAA,GAChD,IAAI;EAEH,SAASA,iBAAAA,kBAAkB,QAAQ,WAAW,YAC7C,QAAQ,KAAK,OAAO,CACrB;CAC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AY,QAAQ,KAAK,OAAO;GACvC,QAAQ,YAAY,QAAQ,MAAM,OAAO;EAC1C;CACD,CAAC;CAED,IAAI;EACH,MAAM,IAAI;EACV,OAAO;CACR,SAAS,OAAO;EACf,QAAQ,MAAMH,cAAAA,YAAY,KAAK,CAAC;EAChC,OAAO;CACR;AACD"}
|
package/dist/deploy/public.cjs
CHANGED
|
@@ -10,7 +10,7 @@ const require_resolve = require("../resolve-DDcPuS_G.cjs");
|
|
|
10
10
|
const require_notes = require("../notes-B9ro_R3x.cjs");
|
|
11
11
|
const require_local = require("../local-vSeEreyp.cjs");
|
|
12
12
|
const require_sniffer = require("../sniffer-B2jgjk-F.cjs");
|
|
13
|
-
const require_deploy = require("../deploy-
|
|
13
|
+
const require_deploy = require("../deploy-CGywNg5R.cjs");
|
|
14
14
|
const require_seeds = require("../seeds-D7q1zKCJ.cjs");
|
|
15
15
|
const require_engine = require("../engine-_zA1Selg.cjs");
|
|
16
16
|
const require_rollback = require("../rollback-CvlebzBY.cjs");
|
package/dist/deploy/public.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { i as TargetRuntimeMismatch, l as TargetPackageNotFound, n as TargetEntr
|
|
|
9
9
|
import { c as DevServicesNeedServerTarget, l as ExternalServicesNotConfigured, o as AllowDevServicesTakesNoValue, s as DEV_SERVICES, t as StageProviderDisabled } from "../notes-CdbUjLBC.mjs";
|
|
10
10
|
import { n as SANDBOX_ENV_ALLOWLIST, r as allowlistedEnv, t as LocalSandbox } from "../local-Bqx5Xj3z.mjs";
|
|
11
11
|
import { a as DeploymentTimedOut, f as StateLocked, g as StateVersionConflict, i as DeploymentFailed, u as LocalStateInCi } from "../sniffer-Csft3UaJ.mjs";
|
|
12
|
-
import { a as UnknownDeployApps, i as TargetBuildsNothing, n as NoDeployableApps, r as RollbackFailed, t as deploy } from "../deploy-
|
|
12
|
+
import { a as UnknownDeployApps, i as TargetBuildsNothing, n as NoDeployableApps, r as RollbackFailed, t as deploy } from "../deploy-C4Qb-A-z.mjs";
|
|
13
13
|
import { t as DeploySeedsFailed } from "../seeds-y1rzXlAc.mjs";
|
|
14
14
|
import { _ as RegistryNotConfigured, g as RegistryAmbiguous, h as HealthCheckTimedOut, m as DeployMigrationsFailed, n as FrontendDeployFailed, r as MissingEnvVars, t as BackendDeployFailed, v as RegistryNotFound, y as ProjectNotOwned } from "../engine-Viv9p-yK.mjs";
|
|
15
15
|
import { i as rollbackStage, n as RollbackNeedsApp, r as StageNeverDeployed, t as NothingToRollBack } from "../rollback-xLGFZaHy.mjs";
|
|
@@ -2633,13 +2633,33 @@ async function ensureSesEmail(ctx) {
|
|
|
2633
2633
|
}
|
|
2634
2634
|
}
|
|
2635
2635
|
/**
|
|
2636
|
-
* The domain as an SES identity
|
|
2637
|
-
* through the stage's DNS.
|
|
2638
|
-
*
|
|
2639
|
-
*
|
|
2636
|
+
* The domain as an SES identity that signs what it sends with Easy DKIM: its
|
|
2637
|
+
* three CNAMEs, through the stage's DNS.
|
|
2638
|
+
*
|
|
2639
|
+
* The check is DKIM's own status, not the domain's: a domain verified by its
|
|
2640
|
+
* older TXT record is verified, and sends unsigned until DKIM is set up on it.
|
|
2641
|
+
* One whose DKIM is verified is left as it is, signing turned back on if it
|
|
2642
|
+
* was turned off; any other — new, verified only by TXT, or created by
|
|
2643
|
+
* another stack and never finished — is asked for its tokens, which SES
|
|
2644
|
+
* answers without making a second identity.
|
|
2640
2645
|
*/
|
|
2641
2646
|
async function ensureIdentity(ctx, { SES, ses }, domain) {
|
|
2642
|
-
|
|
2647
|
+
const { DkimAttributes } = await ses.send(new SES.GetIdentityDkimAttributesCommand({ Identities: [domain] }));
|
|
2648
|
+
const dkim = DkimAttributes?.[domain];
|
|
2649
|
+
if (dkim?.DkimVerificationStatus === "Success") {
|
|
2650
|
+
if (dkim.DkimEnabled) return;
|
|
2651
|
+
await ctx.change({
|
|
2652
|
+
construct: "email",
|
|
2653
|
+
resource: `SES identity ${domain}`,
|
|
2654
|
+
change: "turn DKIM signing back on"
|
|
2655
|
+
}, async () => {
|
|
2656
|
+
await ses.send(new SES.SetIdentityDkimEnabledCommand({
|
|
2657
|
+
Identity: domain,
|
|
2658
|
+
DkimEnabled: true
|
|
2659
|
+
}));
|
|
2660
|
+
});
|
|
2661
|
+
return;
|
|
2662
|
+
}
|
|
2643
2663
|
let tokens = [];
|
|
2644
2664
|
await ctx.change({
|
|
2645
2665
|
construct: "email",
|
|
@@ -3629,4 +3649,4 @@ async function load(input, sandbox) {
|
|
|
3629
3649
|
//#endregion
|
|
3630
3650
|
export { UnknownDeployApps as a, defaultCdnClients as c, TargetBuildsNothing as i, backupsUserName as l, NoDeployableApps as n, defaultClients as o, RollbackFailed as r, cdnName as s, deploy as t };
|
|
3631
3651
|
|
|
3632
|
-
//# sourceMappingURL=deploy-
|
|
3652
|
+
//# sourceMappingURL=deploy-C4Qb-A-z.mjs.map
|