@geekmidas/cli 1.10.20 → 1.10.22
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/CHANGELOG.md +12 -0
- package/bin/gkm.mjs +30 -0
- package/dist/index.cjs +93 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +93 -44
- package/dist/index.mjs.map +1 -1
- package/dist/{openapi-kvwpKbNe.mjs → openapi-DnIYqDH3.mjs} +5 -3
- package/dist/openapi-DnIYqDH3.mjs.map +1 -0
- package/dist/{openapi-CsCNpSf8.cjs → openapi-N_iCUhJU.cjs} +5 -3
- package/dist/openapi-N_iCUhJU.cjs.map +1 -0
- package/dist/openapi.cjs +1 -1
- package/dist/openapi.mjs +1 -1
- package/package.json +4 -4
- package/src/credentials/index.ts +2 -5
- package/src/debug.ts +68 -0
- package/src/dev/index.ts +34 -13
- package/src/generators/Generator.ts +6 -4
- package/src/index.ts +36 -52
- package/src/init/versions.ts +2 -2
- package/dist/openapi-CsCNpSf8.cjs.map +0 -1
- package/dist/openapi-kvwpKbNe.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @geekmidas/cli
|
|
2
2
|
|
|
3
|
+
## 1.10.22
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 🐛 [`acfc00a`](https://github.com/geekmidas/toolbox/commit/acfc00a0ec99691e978c3d0978f3ec63e1ec9869) Thanks [@geekmidas](https://github.com/geekmidas)! - Fix tsx loader for loading extentionless typescript files
|
|
8
|
+
|
|
9
|
+
## 1.10.21
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- ✨ [`9b56519`](https://github.com/geekmidas/toolbox/commit/9b5651989ccd1ca55c8b7150647c850eda056213) Thanks [@geekmidas](https://github.com/geekmidas)! - Add debugging and complete traces
|
|
14
|
+
|
|
3
15
|
## 1.10.20
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/bin/gkm.mjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { register } from 'node:module';
|
|
3
|
+
import { pathToFileURL } from 'node:url';
|
|
4
|
+
|
|
5
|
+
// Register tsx loader hooks BEFORE any .ts imports.
|
|
6
|
+
// --import tsx works but register() alone doesn't override
|
|
7
|
+
// Node 22's built-in strip-only type handling (which lacks enum support).
|
|
8
|
+
// Using --import via NODE_OPTIONS ensures tsx fully handles .ts files.
|
|
9
|
+
const nodeOptions = process.env.NODE_OPTIONS || '';
|
|
10
|
+
if (
|
|
11
|
+
!nodeOptions.includes('--import tsx') &&
|
|
12
|
+
!nodeOptions.includes('--import=tsx')
|
|
13
|
+
) {
|
|
14
|
+
const { execFileSync } = await import('node:child_process');
|
|
15
|
+
try {
|
|
16
|
+
execFileSync(process.execPath, process.argv.slice(1), {
|
|
17
|
+
stdio: 'inherit',
|
|
18
|
+
env: {
|
|
19
|
+
...process.env,
|
|
20
|
+
NODE_OPTIONS: `${nodeOptions} --import tsx`.trim(),
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
} catch (e) {
|
|
24
|
+
process.exit(e.status ?? 1);
|
|
25
|
+
}
|
|
26
|
+
process.exit(0);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// tsx is loaded — run the CLI
|
|
30
|
+
await import('../dist/index.mjs');
|
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const require_workspace = require('./workspace-4SP3Gx4Y.cjs');
|
|
|
4
4
|
const require_config = require('./config-D3ORuiUs.cjs');
|
|
5
5
|
const require_credentials = require('./credentials-C8DWtnMY.cjs');
|
|
6
6
|
const require_storage = require('./storage-DLEb8Dkd.cjs');
|
|
7
|
-
const require_openapi = require('./openapi-
|
|
7
|
+
const require_openapi = require('./openapi-N_iCUhJU.cjs');
|
|
8
8
|
const require_dokploy_api = require('./dokploy-api-DLgvEQlr.cjs');
|
|
9
9
|
const require_encryption = require('./encryption-BE0UOb8j.cjs');
|
|
10
10
|
const require_CachedStateProvider = require('./CachedStateProvider-D73dCqfH.cjs');
|
|
@@ -35,7 +35,7 @@ const prompts = require_chunk.__toESM(require("prompts"));
|
|
|
35
35
|
|
|
36
36
|
//#region package.json
|
|
37
37
|
var name = "@geekmidas/cli";
|
|
38
|
-
var version = "1.10.
|
|
38
|
+
var version = "1.10.21";
|
|
39
39
|
var description = "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs";
|
|
40
40
|
var private$1 = false;
|
|
41
41
|
var type = "module";
|
|
@@ -66,7 +66,7 @@ var exports$1 = {
|
|
|
66
66
|
"require": "./dist/openapi-react-query.cjs"
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
|
-
var bin = { "gkm": "./
|
|
69
|
+
var bin = { "gkm": "./bin/gkm.mjs" };
|
|
70
70
|
var scripts = {
|
|
71
71
|
"ts": "tsc --noEmit --skipLibCheck src/**/*.ts",
|
|
72
72
|
"sync-versions": "tsx scripts/sync-versions.ts",
|
|
@@ -740,8 +740,7 @@ async function prepareEntryCredentials(options) {
|
|
|
740
740
|
workspaceAppPort = appInfo.app.port;
|
|
741
741
|
secretsRoot = appInfo.workspaceRoot;
|
|
742
742
|
appName = appInfo.appName;
|
|
743
|
-
} catch
|
|
744
|
-
logger$13.log(`⚠️ Could not load workspace config: ${error.message}`);
|
|
743
|
+
} catch {
|
|
745
744
|
secretsRoot = findSecretsRoot(cwd);
|
|
746
745
|
appName = require_config.getAppNameFromCwd(cwd) ?? void 0;
|
|
747
746
|
}
|
|
@@ -1398,7 +1397,9 @@ async function devCommand(options) {
|
|
|
1398
1397
|
logger$11.log("✅ Rebuild complete, restarting server...");
|
|
1399
1398
|
await devServer.restart();
|
|
1400
1399
|
} catch (error) {
|
|
1401
|
-
|
|
1400
|
+
const err = error;
|
|
1401
|
+
logger$11.error(`❌ Rebuild failed: ${err.message}`);
|
|
1402
|
+
if (err.stack) logger$11.error(err.stack);
|
|
1402
1403
|
}
|
|
1403
1404
|
}, 300);
|
|
1404
1405
|
});
|
|
@@ -1806,7 +1807,11 @@ var EntryRunner = class {
|
|
|
1806
1807
|
this.isRunning = false;
|
|
1807
1808
|
});
|
|
1808
1809
|
await new Promise((resolve$4) => setTimeout(resolve$4, 500));
|
|
1809
|
-
if (this.isRunning)
|
|
1810
|
+
if (this.isRunning) {
|
|
1811
|
+
logger$11.log("");
|
|
1812
|
+
logger$11.log(` \x1b[32m✓ Ready\x1b[0m at \x1b[36mhttp://localhost:${this.port}\x1b[0m`);
|
|
1813
|
+
logger$11.log("");
|
|
1814
|
+
}
|
|
1810
1815
|
}
|
|
1811
1816
|
async restart() {
|
|
1812
1817
|
this.stopProcess();
|
|
@@ -1897,6 +1902,7 @@ var DevServer = class {
|
|
|
1897
1902
|
serverProcess = null;
|
|
1898
1903
|
isRunning = false;
|
|
1899
1904
|
actualPort;
|
|
1905
|
+
startTime = Date.now();
|
|
1900
1906
|
constructor(provider, requestedPort, portExplicit, enableOpenApi, telescope, studio, runtime = "node", appRoot = process.cwd(), secretsJsonPath) {
|
|
1901
1907
|
this.provider = provider;
|
|
1902
1908
|
this.requestedPort = requestedPort;
|
|
@@ -1910,6 +1916,7 @@ var DevServer = class {
|
|
|
1910
1916
|
this.actualPort = requestedPort;
|
|
1911
1917
|
}
|
|
1912
1918
|
async start() {
|
|
1919
|
+
this.startTime = Date.now();
|
|
1913
1920
|
if (this.isRunning) await this.stop();
|
|
1914
1921
|
if (this.portExplicit) {
|
|
1915
1922
|
const available = await isPortAvailable(this.requestedPort);
|
|
@@ -1921,7 +1928,7 @@ var DevServer = class {
|
|
|
1921
1928
|
}
|
|
1922
1929
|
const serverEntryPath = (0, node_path.join)(this.appRoot, ".gkm", this.provider, "server.ts");
|
|
1923
1930
|
await this.createServerEntry();
|
|
1924
|
-
logger$11.log(`\n
|
|
1931
|
+
logger$11.log(`\n⏳ Starting server...`);
|
|
1925
1932
|
this.serverProcess = (0, node_child_process.spawn)("npx", [
|
|
1926
1933
|
"tsx",
|
|
1927
1934
|
serverEntryPath,
|
|
@@ -1945,10 +1952,21 @@ var DevServer = class {
|
|
|
1945
1952
|
});
|
|
1946
1953
|
await new Promise((resolve$4) => setTimeout(resolve$4, 1e3));
|
|
1947
1954
|
if (this.isRunning) {
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
if (this.
|
|
1951
|
-
if (this.
|
|
1955
|
+
const base = `http://localhost:${this.actualPort}`;
|
|
1956
|
+
const lines = [` Local: ${base}`];
|
|
1957
|
+
if (this.enableOpenApi) lines.push(` API Docs: ${base}/__docs`);
|
|
1958
|
+
if (this.telescope) lines.push(` Telescope: ${base}${this.telescope.path}`);
|
|
1959
|
+
if (this.studio) lines.push(` Studio: ${base}${this.studio.path}`);
|
|
1960
|
+
const maxLen = Math.max(...lines.map((l) => l.length));
|
|
1961
|
+
const pad = (s) => s.padEnd(maxLen);
|
|
1962
|
+
const border = "─".repeat(maxLen + 2);
|
|
1963
|
+
logger$11.log("");
|
|
1964
|
+
logger$11.log(` \x1b[32m✓ Ready\x1b[0m in ${((Date.now() - this.startTime) / 1e3).toFixed(1)}s`);
|
|
1965
|
+
logger$11.log("");
|
|
1966
|
+
logger$11.log(` ┌${border}┐`);
|
|
1967
|
+
for (const line of lines) logger$11.log(` │ ${pad(line)} │`);
|
|
1968
|
+
logger$11.log(` └${border}┘`);
|
|
1969
|
+
logger$11.log("");
|
|
1952
1970
|
}
|
|
1953
1971
|
}
|
|
1954
1972
|
async stop() {
|
|
@@ -2410,6 +2428,34 @@ function assembleManifestField(infos, constructs) {
|
|
|
2410
2428
|
return groupInfosByPartition(infos, constructs);
|
|
2411
2429
|
}
|
|
2412
2430
|
|
|
2431
|
+
//#endregion
|
|
2432
|
+
//#region src/debug.ts
|
|
2433
|
+
let _debug = false;
|
|
2434
|
+
/**
|
|
2435
|
+
* Enable debug mode globally.
|
|
2436
|
+
* When enabled, verbose error details are shown everywhere.
|
|
2437
|
+
*/
|
|
2438
|
+
function enableDebug() {
|
|
2439
|
+
_debug = true;
|
|
2440
|
+
}
|
|
2441
|
+
/**
|
|
2442
|
+
* Format a fatal error for display.
|
|
2443
|
+
* Always includes the full stack trace since these are process-ending errors.
|
|
2444
|
+
*/
|
|
2445
|
+
function formatError(error) {
|
|
2446
|
+
if (!(error instanceof Error)) return String(error);
|
|
2447
|
+
let output$2 = error.stack ?? error.message;
|
|
2448
|
+
let cause = error.cause;
|
|
2449
|
+
while (cause) if (cause instanceof Error) {
|
|
2450
|
+
output$2 += `\n\nCaused by: ${cause.stack ?? cause.message}`;
|
|
2451
|
+
cause = cause.cause;
|
|
2452
|
+
} else {
|
|
2453
|
+
output$2 += `\n\nCaused by: ${String(cause)}`;
|
|
2454
|
+
break;
|
|
2455
|
+
}
|
|
2456
|
+
return output$2;
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2413
2459
|
//#endregion
|
|
2414
2460
|
//#region src/deploy/state.ts
|
|
2415
2461
|
/**
|
|
@@ -6799,9 +6845,9 @@ const GEEKMIDAS_VERSIONS = {
|
|
|
6799
6845
|
"@geekmidas/audit": "~2.0.0",
|
|
6800
6846
|
"@geekmidas/auth": "~2.0.0",
|
|
6801
6847
|
"@geekmidas/cache": "~1.1.0",
|
|
6802
|
-
"@geekmidas/client": "~4.0.
|
|
6848
|
+
"@geekmidas/client": "~4.0.1",
|
|
6803
6849
|
"@geekmidas/cloud": "~1.0.0",
|
|
6804
|
-
"@geekmidas/constructs": "~3.0.
|
|
6850
|
+
"@geekmidas/constructs": "~3.0.3",
|
|
6805
6851
|
"@geekmidas/db": "~1.0.1",
|
|
6806
6852
|
"@geekmidas/emailkit": "~1.0.0",
|
|
6807
6853
|
"@geekmidas/envkit": "~1.0.4",
|
|
@@ -12151,14 +12197,17 @@ function executeUpgrade(upgradable, pm, cwd) {
|
|
|
12151
12197
|
//#endregion
|
|
12152
12198
|
//#region src/index.ts
|
|
12153
12199
|
const program = new commander.Command();
|
|
12154
|
-
program.name("gkm").description("GeekMidas backend framework CLI").version(package_default.version).option("--cwd <path>", "Change working directory")
|
|
12200
|
+
program.name("gkm").description("GeekMidas backend framework CLI").version(package_default.version).option("--cwd <path>", "Change working directory").option("--debug", "Enable debug mode (verbose errors with stack traces)").hook("preAction", () => {
|
|
12201
|
+
const opts = program.opts();
|
|
12202
|
+
if (opts.debug) enableDebug();
|
|
12203
|
+
});
|
|
12155
12204
|
program.command("init").description("Scaffold a new project").argument("[name]", "Project name").option("--template <template>", "Project template (minimal, api, serverless, worker)").option("--skip-install", "Skip dependency installation", false).option("-y, --yes", "Skip prompts, use defaults", false).option("--monorepo", "Setup as monorepo with packages/models", false).option("--api-path <path>", "API app path in monorepo (default: apps/api)").option("--pm <manager>", "Package manager (pnpm, npm, yarn, bun)").action(async (name$1, options) => {
|
|
12156
12205
|
try {
|
|
12157
12206
|
const globalOptions = program.opts();
|
|
12158
12207
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12159
12208
|
await initCommand(name$1, options);
|
|
12160
12209
|
} catch (error) {
|
|
12161
|
-
console.error(error
|
|
12210
|
+
console.error(formatError(error));
|
|
12162
12211
|
process.exit(1);
|
|
12163
12212
|
}
|
|
12164
12213
|
});
|
|
@@ -12168,7 +12217,7 @@ program.command("setup").description("Setup development environment (secrets, Do
|
|
|
12168
12217
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12169
12218
|
await setupCommand(options);
|
|
12170
12219
|
} catch (error) {
|
|
12171
|
-
console.error(error
|
|
12220
|
+
console.error(formatError(error));
|
|
12172
12221
|
process.exit(1);
|
|
12173
12222
|
}
|
|
12174
12223
|
});
|
|
@@ -12201,7 +12250,7 @@ program.command("build").description("Build handlers from endpoints, functions,
|
|
|
12201
12250
|
stage: options.stage
|
|
12202
12251
|
});
|
|
12203
12252
|
} catch (error) {
|
|
12204
|
-
console.error(error
|
|
12253
|
+
console.error(formatError(error));
|
|
12205
12254
|
process.exit(1);
|
|
12206
12255
|
}
|
|
12207
12256
|
});
|
|
@@ -12217,7 +12266,7 @@ program.command("dev").description("Start development server with automatic relo
|
|
|
12217
12266
|
watch: options.watch
|
|
12218
12267
|
});
|
|
12219
12268
|
} catch (error) {
|
|
12220
|
-
console.error(error
|
|
12269
|
+
console.error(formatError(error));
|
|
12221
12270
|
process.exit(1);
|
|
12222
12271
|
}
|
|
12223
12272
|
});
|
|
@@ -12227,7 +12276,7 @@ program.command("exec").description("Run a command with secrets injected into Cr
|
|
|
12227
12276
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12228
12277
|
await execCommand(commandArgs);
|
|
12229
12278
|
} catch (error) {
|
|
12230
|
-
console.error(error
|
|
12279
|
+
console.error(formatError(error));
|
|
12231
12280
|
process.exit(1);
|
|
12232
12281
|
}
|
|
12233
12282
|
});
|
|
@@ -12240,7 +12289,7 @@ program.command("test").description("Run tests with secrets loaded from environm
|
|
|
12240
12289
|
pattern
|
|
12241
12290
|
});
|
|
12242
12291
|
} catch (error) {
|
|
12243
|
-
console.error(error
|
|
12292
|
+
console.error(formatError(error));
|
|
12244
12293
|
process.exit(1);
|
|
12245
12294
|
}
|
|
12246
12295
|
});
|
|
@@ -12265,7 +12314,7 @@ program.command("openapi").description("Generate OpenAPI specification from endp
|
|
|
12265
12314
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12266
12315
|
await require_openapi.openapiCommand({});
|
|
12267
12316
|
} catch (error) {
|
|
12268
|
-
console.error(error
|
|
12317
|
+
console.error(formatError(error));
|
|
12269
12318
|
process.exit(1);
|
|
12270
12319
|
}
|
|
12271
12320
|
});
|
|
@@ -12275,7 +12324,7 @@ program.command("generate:react-query").description("Generate React Query hooks
|
|
|
12275
12324
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12276
12325
|
await require_openapi_react_query.generateReactQueryCommand(options);
|
|
12277
12326
|
} catch (error) {
|
|
12278
|
-
console.error(error
|
|
12327
|
+
console.error(formatError(error));
|
|
12279
12328
|
process.exit(1);
|
|
12280
12329
|
}
|
|
12281
12330
|
});
|
|
@@ -12285,7 +12334,7 @@ program.command("docker").description("Generate Docker deployment files").option
|
|
|
12285
12334
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12286
12335
|
await dockerCommand(options);
|
|
12287
12336
|
} catch (error) {
|
|
12288
|
-
console.error(error
|
|
12337
|
+
console.error(formatError(error));
|
|
12289
12338
|
process.exit(1);
|
|
12290
12339
|
}
|
|
12291
12340
|
});
|
|
@@ -12314,7 +12363,7 @@ program.command("prepack").description("Generate Docker files for production dep
|
|
|
12314
12363
|
const _imageRef = registry ? `${registry}/api:${tag}` : `api:${tag}`;
|
|
12315
12364
|
}
|
|
12316
12365
|
} catch (error) {
|
|
12317
|
-
console.error(error
|
|
12366
|
+
console.error(formatError(error));
|
|
12318
12367
|
process.exit(1);
|
|
12319
12368
|
}
|
|
12320
12369
|
});
|
|
@@ -12324,7 +12373,7 @@ program.command("secrets:init").description("Initialize secrets for a deployment
|
|
|
12324
12373
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12325
12374
|
await secretsInitCommand(options);
|
|
12326
12375
|
} catch (error) {
|
|
12327
|
-
console.error(error
|
|
12376
|
+
console.error(formatError(error));
|
|
12328
12377
|
process.exit(1);
|
|
12329
12378
|
}
|
|
12330
12379
|
});
|
|
@@ -12334,7 +12383,7 @@ program.command("secrets:set").description("Set a custom secret for a stage").ar
|
|
|
12334
12383
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12335
12384
|
await secretsSetCommand(key, value, options);
|
|
12336
12385
|
} catch (error) {
|
|
12337
|
-
console.error(error
|
|
12386
|
+
console.error(formatError(error));
|
|
12338
12387
|
process.exit(1);
|
|
12339
12388
|
}
|
|
12340
12389
|
});
|
|
@@ -12344,7 +12393,7 @@ program.command("secrets:show").description("Show secrets for a stage").required
|
|
|
12344
12393
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12345
12394
|
await secretsShowCommand(options);
|
|
12346
12395
|
} catch (error) {
|
|
12347
|
-
console.error(error
|
|
12396
|
+
console.error(formatError(error));
|
|
12348
12397
|
process.exit(1);
|
|
12349
12398
|
}
|
|
12350
12399
|
});
|
|
@@ -12354,7 +12403,7 @@ program.command("secrets:rotate").description("Rotate service passwords").requir
|
|
|
12354
12403
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12355
12404
|
await secretsRotateCommand(options);
|
|
12356
12405
|
} catch (error) {
|
|
12357
|
-
console.error(error
|
|
12406
|
+
console.error(formatError(error));
|
|
12358
12407
|
process.exit(1);
|
|
12359
12408
|
}
|
|
12360
12409
|
});
|
|
@@ -12364,7 +12413,7 @@ program.command("secrets:import").description("Import secrets from a JSON file")
|
|
|
12364
12413
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12365
12414
|
await secretsImportCommand(file, options);
|
|
12366
12415
|
} catch (error) {
|
|
12367
|
-
console.error(error
|
|
12416
|
+
console.error(formatError(error));
|
|
12368
12417
|
process.exit(1);
|
|
12369
12418
|
}
|
|
12370
12419
|
});
|
|
@@ -12389,7 +12438,7 @@ program.command("secrets:push").description("Push secrets to remote provider (SS
|
|
|
12389
12438
|
await pushSecrets$1(options.stage, workspace);
|
|
12390
12439
|
console.log(`\n✓ Secrets pushed for stage "${options.stage}"`);
|
|
12391
12440
|
} catch (error) {
|
|
12392
|
-
console.error(error
|
|
12441
|
+
console.error(formatError(error));
|
|
12393
12442
|
process.exit(1);
|
|
12394
12443
|
}
|
|
12395
12444
|
});
|
|
@@ -12416,7 +12465,7 @@ program.command("secrets:pull").description("Pull secrets from remote provider (
|
|
|
12416
12465
|
await writeStageSecrets$1(secrets, workspace.root);
|
|
12417
12466
|
console.log(`\n✓ Secrets pulled for stage "${options.stage}"`);
|
|
12418
12467
|
} catch (error) {
|
|
12419
|
-
console.error(error
|
|
12468
|
+
console.error(formatError(error));
|
|
12420
12469
|
process.exit(1);
|
|
12421
12470
|
}
|
|
12422
12471
|
});
|
|
@@ -12442,7 +12491,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
|
|
|
12442
12491
|
console.log(`\n✓ Reconciled ${result.addedKeys.length} missing secret(s) for stage "${options.stage}":`);
|
|
12443
12492
|
for (const key of result.addedKeys) console.log(` + ${key}`);
|
|
12444
12493
|
} catch (error) {
|
|
12445
|
-
console.error(error
|
|
12494
|
+
console.error(formatError(error));
|
|
12446
12495
|
process.exit(1);
|
|
12447
12496
|
}
|
|
12448
12497
|
});
|
|
@@ -12467,7 +12516,7 @@ program.command("deploy").description("Deploy application to a provider").requir
|
|
|
12467
12516
|
skipBuild: options.skipBuild
|
|
12468
12517
|
});
|
|
12469
12518
|
} catch (error) {
|
|
12470
|
-
console.error(error
|
|
12519
|
+
console.error(formatError(error));
|
|
12471
12520
|
process.exit(1);
|
|
12472
12521
|
}
|
|
12473
12522
|
});
|
|
@@ -12483,7 +12532,7 @@ program.command("deploy:init").description("Initialize Dokploy deployment (creat
|
|
|
12483
12532
|
registryId: options.registryId
|
|
12484
12533
|
});
|
|
12485
12534
|
} catch (error) {
|
|
12486
|
-
console.error(error
|
|
12535
|
+
console.error(formatError(error));
|
|
12487
12536
|
process.exit(1);
|
|
12488
12537
|
}
|
|
12489
12538
|
});
|
|
@@ -12510,7 +12559,7 @@ program.command("deploy:list").description("List Dokploy resources (projects, re
|
|
|
12510
12559
|
});
|
|
12511
12560
|
}
|
|
12512
12561
|
} catch (error) {
|
|
12513
|
-
console.error(error
|
|
12562
|
+
console.error(formatError(error));
|
|
12514
12563
|
process.exit(1);
|
|
12515
12564
|
}
|
|
12516
12565
|
});
|
|
@@ -12528,7 +12577,7 @@ program.command("login").description("Authenticate with a deployment service").o
|
|
|
12528
12577
|
endpoint: options.endpoint
|
|
12529
12578
|
});
|
|
12530
12579
|
} catch (error) {
|
|
12531
|
-
console.error(error
|
|
12580
|
+
console.error(formatError(error));
|
|
12532
12581
|
process.exit(1);
|
|
12533
12582
|
}
|
|
12534
12583
|
});
|
|
@@ -12538,7 +12587,7 @@ program.command("logout").description("Remove stored credentials").option("--ser
|
|
|
12538
12587
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12539
12588
|
await logoutCommand({ service: options.service });
|
|
12540
12589
|
} catch (error) {
|
|
12541
|
-
console.error(error
|
|
12590
|
+
console.error(formatError(error));
|
|
12542
12591
|
process.exit(1);
|
|
12543
12592
|
}
|
|
12544
12593
|
});
|
|
@@ -12548,7 +12597,7 @@ program.command("whoami").description("Show current authentication status").acti
|
|
|
12548
12597
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12549
12598
|
await whoamiCommand();
|
|
12550
12599
|
} catch (error) {
|
|
12551
|
-
console.error(error
|
|
12600
|
+
console.error(formatError(error));
|
|
12552
12601
|
process.exit(1);
|
|
12553
12602
|
}
|
|
12554
12603
|
});
|
|
@@ -12558,7 +12607,7 @@ program.command("state:pull").description("Pull deployment state from remote to
|
|
|
12558
12607
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12559
12608
|
await statePullCommand(options);
|
|
12560
12609
|
} catch (error) {
|
|
12561
|
-
console.error(error
|
|
12610
|
+
console.error(formatError(error));
|
|
12562
12611
|
process.exit(1);
|
|
12563
12612
|
}
|
|
12564
12613
|
});
|
|
@@ -12568,7 +12617,7 @@ program.command("state:push").description("Push deployment state from local to r
|
|
|
12568
12617
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12569
12618
|
await statePushCommand(options);
|
|
12570
12619
|
} catch (error) {
|
|
12571
|
-
console.error(error
|
|
12620
|
+
console.error(formatError(error));
|
|
12572
12621
|
process.exit(1);
|
|
12573
12622
|
}
|
|
12574
12623
|
});
|
|
@@ -12578,7 +12627,7 @@ program.command("state:show").description("Show deployment state for a stage").r
|
|
|
12578
12627
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12579
12628
|
await stateShowCommand(options);
|
|
12580
12629
|
} catch (error) {
|
|
12581
|
-
console.error(error
|
|
12630
|
+
console.error(formatError(error));
|
|
12582
12631
|
process.exit(1);
|
|
12583
12632
|
}
|
|
12584
12633
|
});
|
|
@@ -12588,7 +12637,7 @@ program.command("state:diff").description("Compare local and remote deployment s
|
|
|
12588
12637
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12589
12638
|
await stateDiffCommand(options);
|
|
12590
12639
|
} catch (error) {
|
|
12591
|
-
console.error(error
|
|
12640
|
+
console.error(formatError(error));
|
|
12592
12641
|
process.exit(1);
|
|
12593
12642
|
}
|
|
12594
12643
|
});
|
|
@@ -12598,7 +12647,7 @@ program.command("upgrade").description("Upgrade all @geekmidas packages to their
|
|
|
12598
12647
|
if (globalOptions.cwd) process.chdir(globalOptions.cwd);
|
|
12599
12648
|
await upgradeCommand(options);
|
|
12600
12649
|
} catch (error) {
|
|
12601
|
-
console.error(error
|
|
12650
|
+
console.error(formatError(error));
|
|
12602
12651
|
process.exit(1);
|
|
12603
12652
|
}
|
|
12604
12653
|
});
|