@catladder/cli 0.0.0-new-cli-81ed6546 → 0.0.0-new-cli-52525b58
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 -2
- package/dist/bundles/catenv/index.js +1 -1
- package/dist/bundles/cli/index.js +128 -81
- package/dist/cli/src/cli.js +24 -5
- package/dist/cli/src/cli.js.map +1 -1
- package/dist/cli/src/commands/cloudSQL/commandRestoreDb.js +1 -1
- package/dist/cli/src/commands/cloudSQL/commandRestoreDb.js.map +1 -1
- package/dist/cli/src/commands/fun/commandDadjoke.js +1 -1
- package/dist/cli/src/commands/fun/commandDadjoke.js.map +1 -1
- package/dist/cli/src/commands/fun/commandStarwars.js +1 -1
- package/dist/cli/src/commands/fun/commandStarwars.js.map +1 -1
- package/dist/cli/src/commands/general/commandKubeCurrentContext.js +1 -1
- package/dist/cli/src/commands/general/commandKubeGetShell.js +1 -1
- package/dist/cli/src/commands/general/commandKubeListNamespaces.js +1 -1
- package/dist/cli/src/commands/general/commandKubeListPods.js +1 -1
- package/dist/cli/src/commands/general/commandKubeListSecrets.js +1 -1
- package/dist/cli/src/commands/general/commandKubePortForward.js +1 -1
- package/dist/cli/src/commands/general/commandKubeStopPortforward.js +1 -1
- package/dist/cli/src/commands/mongodb/commandMongoDestroyMember.js +1 -1
- package/dist/cli/src/commands/mongodb/commandMongoGetShell.js +1 -1
- package/dist/cli/src/commands/mongodb/commandMongoPortForward.js +1 -1
- package/dist/cli/src/commands/project/commandCloudSqlProxy.js +1 -1
- package/dist/cli/src/commands/project/commandCloudSqlProxy.js.map +1 -1
- package/dist/cli/src/commands/project/commandConfigSecrets.js +1 -1
- package/dist/cli/src/commands/project/commandDeletePods.js +1 -1
- package/dist/cli/src/commands/project/commandDeleteProject.js +1 -1
- package/dist/cli/src/commands/project/commandEnvVars.js +1 -1
- package/dist/cli/src/commands/project/commandGetMyTotalWorktime.js +1 -1
- package/dist/cli/src/commands/project/commandGetMyTotalWorktime.js.map +1 -1
- package/dist/cli/src/commands/project/commandGetShell.js +1 -1
- package/dist/cli/src/commands/project/commandGitlabCi.js +2 -2
- package/dist/cli/src/commands/project/commandListPods.js +1 -1
- package/dist/cli/src/commands/project/commandNamespace.js +1 -1
- package/dist/cli/src/commands/project/commandOpenEnv.js +1 -1
- package/dist/cli/src/commands/project/commandOpenGit.js +1 -1
- package/dist/cli/src/commands/project/commandOpenLogs.js +1 -1
- package/dist/cli/src/commands/project/commandPauseProject.js +1 -1
- package/dist/cli/src/commands/project/commandPortForward.js +1 -1
- package/dist/cli/src/commands/project/commandProjectRestoreDb.js +1 -1
- package/dist/cli/src/commands/project/commandProjectRestoreDb.js.map +1 -1
- package/dist/cli/src/commands/project/commandRenewToken.js +1 -1
- package/dist/cli/src/commands/project/commandSecretsClearBackups.js +1 -1
- package/dist/cli/src/commands/project/commandSecurityEvaluate.js +1 -1
- package/dist/cli/src/commands/project/commandSetup.js +1 -1
- package/dist/cli/src/commands/project/commandTriggerCronjob.js +2 -2
- package/dist/cli/src/commands/project/commandTriggerCronjob.js.map +1 -1
- package/dist/cli/src/commands/security/commandSecurityAuditCiJob.js +1 -1
- package/dist/cli/src/commands/security/commandSecurityAuditCreate.js +1 -1
- package/dist/cli/src/commands/security/commandSecurityAuditEvaluate.js +1 -1
- package/dist/cli/src/completion.js +64 -36
- package/dist/cli/src/completion.js.map +1 -1
- package/dist/pipeline/src/constants.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/cli.ts +29 -5
- package/src/commands/cloudSQL/commandRestoreDb.ts +1 -1
- package/src/commands/fun/commandDadjoke.ts +1 -1
- package/src/commands/fun/commandStarwars.ts +1 -1
- package/src/commands/general/commandKubeCurrentContext.ts +1 -1
- package/src/commands/general/commandKubeGetShell.ts +1 -1
- package/src/commands/general/commandKubeListNamespaces.ts +1 -1
- package/src/commands/general/commandKubeListPods.ts +1 -1
- package/src/commands/general/commandKubeListSecrets.ts +1 -1
- package/src/commands/general/commandKubePortForward.ts +1 -1
- package/src/commands/general/commandKubeStopPortforward.ts +1 -1
- package/src/commands/mongodb/commandMongoDestroyMember.ts +1 -1
- package/src/commands/mongodb/commandMongoGetShell.ts +1 -1
- package/src/commands/mongodb/commandMongoPortForward.ts +1 -1
- package/src/commands/project/commandCloudSqlProxy.ts +1 -1
- package/src/commands/project/commandConfigSecrets.ts +1 -1
- package/src/commands/project/commandDeletePods.ts +1 -1
- package/src/commands/project/commandDeleteProject.ts +1 -1
- package/src/commands/project/commandEnvVars.ts +1 -1
- package/src/commands/project/commandGetMyTotalWorktime.ts +1 -1
- package/src/commands/project/commandGetShell.ts +1 -1
- package/src/commands/project/commandGitlabCi.ts +2 -2
- package/src/commands/project/commandListPods.ts +1 -1
- package/src/commands/project/commandNamespace.ts +1 -1
- package/src/commands/project/commandOpenEnv.ts +1 -1
- package/src/commands/project/commandOpenGit.ts +1 -1
- package/src/commands/project/commandOpenLogs.ts +1 -1
- package/src/commands/project/commandPauseProject.ts +1 -1
- package/src/commands/project/commandPortForward.ts +1 -1
- package/src/commands/project/commandProjectRestoreDb.ts +1 -1
- package/src/commands/project/commandRenewToken.ts +1 -1
- package/src/commands/project/commandSecretsClearBackups.ts +1 -1
- package/src/commands/project/commandSecurityEvaluate.ts +1 -1
- package/src/commands/project/commandSetup.ts +1 -1
- package/src/commands/project/commandTriggerCronjob.ts +2 -2
- package/src/commands/security/commandSecurityAuditCiJob.ts +1 -1
- package/src/commands/security/commandSecurityAuditCreate.ts +1 -1
- package/src/commands/security/commandSecurityAuditEvaluate.ts +1 -1
- package/src/completion.ts +63 -42
package/README.md
CHANGED
|
@@ -25,8 +25,8 @@ catladder completion install
|
|
|
25
25
|
### Non-interactive mode
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
catladder project
|
|
29
|
-
catladder -y project
|
|
28
|
+
catladder project port-forward dev:web --pod-name=web-abc --local-port=3000 --remote-port=3000
|
|
29
|
+
catladder -y project delete dev:web
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## Contribution
|
|
@@ -2814,7 +2814,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
2814
2814
|
value: true
|
|
2815
2815
|
}));
|
|
2816
2816
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
2817
|
-
exports.PIPELINE_IMAGE_TAG = "new-cli-
|
|
2817
|
+
exports.PIPELINE_IMAGE_TAG = "new-cli-52525b58" || 0;
|
|
2818
2818
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
2819
2819
|
|
|
2820
2820
|
/***/ }),
|
|
@@ -1218,8 +1218,24 @@ const program = new commander_1.Command();
|
|
|
1218
1218
|
program.name("catladder").description("Panter CLI tool for cloud CI/CD and DevOps").version(packageInfos_1.default.version).option("-y, --yes", "skip all confirmation prompts");
|
|
1219
1219
|
// Collect all command defs for completion
|
|
1220
1220
|
const allCommandDefs = [];
|
|
1221
|
+
// Cache for intermediate subcommand groups (e.g., "project", "project cloudsql")
|
|
1222
|
+
const subcommandCache = new Map();
|
|
1223
|
+
/**
|
|
1224
|
+
* Get or create a chain of nested subcommands.
|
|
1225
|
+
* E.g., for ["project", "cloudsql"], ensures program.command("project").command("cloudsql") exists.
|
|
1226
|
+
*/
|
|
1227
|
+
function getOrCreateParent(parts) {
|
|
1228
|
+
if (parts.length === 0) return program;
|
|
1229
|
+
const key = parts.join(" ");
|
|
1230
|
+
if (subcommandCache.has(key)) return subcommandCache.get(key);
|
|
1231
|
+
const parent = getOrCreateParent(parts.slice(0, -1));
|
|
1232
|
+
const cmd = parent.command(parts[parts.length - 1]);
|
|
1233
|
+
subcommandCache.set(key, cmd);
|
|
1234
|
+
return cmd;
|
|
1235
|
+
}
|
|
1221
1236
|
/**
|
|
1222
1237
|
* Register a CommandDef with Commander.js.
|
|
1238
|
+
* - Command name can contain spaces for nesting (e.g., "project cloudsql proxy")
|
|
1223
1239
|
* - Inputs with `positional: true` become Commander positional args
|
|
1224
1240
|
* - Other inputs become optional --flags
|
|
1225
1241
|
* - --inputs accepts JSON for programmatic use
|
|
@@ -1236,14 +1252,17 @@ function registerCommand(def) {
|
|
|
1236
1252
|
flagInputs.push([name, inputDef]);
|
|
1237
1253
|
}
|
|
1238
1254
|
}
|
|
1239
|
-
//
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1255
|
+
// Split name into parent groups + leaf command
|
|
1256
|
+
const nameParts = def.name.split(" ");
|
|
1257
|
+
const parentParts = nameParts.slice(0, -1);
|
|
1258
|
+
const leafName = nameParts[nameParts.length - 1];
|
|
1259
|
+
// Build leaf command string with positional args
|
|
1260
|
+
let cmdStr = leafName;
|
|
1243
1261
|
for (const [name] of positionalInputs) {
|
|
1244
1262
|
cmdStr += ` [${name}]`;
|
|
1245
1263
|
}
|
|
1246
|
-
const
|
|
1264
|
+
const parent = getOrCreateParent(parentParts);
|
|
1265
|
+
const cmd = parent.command(cmdStr).description(def.description);
|
|
1247
1266
|
// Add --flag for each non-positional input
|
|
1248
1267
|
for (const [name, inputDef] of flagInputs) {
|
|
1249
1268
|
const flagName = name.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
@@ -1366,7 +1385,7 @@ const defineCommand_1 = __nccwpck_require__(39489);
|
|
|
1366
1385
|
const copyDb_1 = __nccwpck_require__(57151);
|
|
1367
1386
|
const startProxy_1 = __nccwpck_require__(95540);
|
|
1368
1387
|
exports.commandRestoreDb = (0, defineCommand_1.defineCommand)({
|
|
1369
|
-
name: "
|
|
1388
|
+
name: "cloudsql restore-db",
|
|
1370
1389
|
description: "restore a db from one source to another target",
|
|
1371
1390
|
group: "cloudSQL",
|
|
1372
1391
|
inputs: {
|
|
@@ -1488,7 +1507,7 @@ exports.commandDadjoke = void 0;
|
|
|
1488
1507
|
const node_fetch_1 = __importDefault(__nccwpck_require__(51479));
|
|
1489
1508
|
const defineCommand_1 = __nccwpck_require__(39489);
|
|
1490
1509
|
exports.commandDadjoke = (0, defineCommand_1.defineCommand)({
|
|
1491
|
-
name: "dadjoke",
|
|
1510
|
+
name: "fun dadjoke",
|
|
1492
1511
|
description: "something for jonas.",
|
|
1493
1512
|
group: "fun",
|
|
1494
1513
|
inputs: {},
|
|
@@ -1520,7 +1539,7 @@ exports.commandStarwars = void 0;
|
|
|
1520
1539
|
const child_process_promise_1 = __nccwpck_require__(51748);
|
|
1521
1540
|
const defineCommand_1 = __nccwpck_require__(39489);
|
|
1522
1541
|
exports.commandStarwars = (0, defineCommand_1.defineCommand)({
|
|
1523
|
-
name: "starwars",
|
|
1542
|
+
name: "fun starwars",
|
|
1524
1543
|
description: "Long time ago... in a galaxy far far away...",
|
|
1525
1544
|
group: "fun",
|
|
1526
1545
|
inputs: {},
|
|
@@ -1546,7 +1565,7 @@ exports.commandKubeCurrentContext = void 0;
|
|
|
1546
1565
|
const defineCommand_1 = __nccwpck_require__(39489);
|
|
1547
1566
|
const cluster_1 = __nccwpck_require__(5581);
|
|
1548
1567
|
exports.commandKubeCurrentContext = (0, defineCommand_1.defineCommand)({
|
|
1549
|
-
name: "kube
|
|
1568
|
+
name: "kube current-context",
|
|
1550
1569
|
description: "show current kubernetes context",
|
|
1551
1570
|
group: "general",
|
|
1552
1571
|
inputs: {},
|
|
@@ -1571,7 +1590,7 @@ const defineCommand_1 = __nccwpck_require__(39489);
|
|
|
1571
1590
|
const k8sApi_1 = __nccwpck_require__(90390);
|
|
1572
1591
|
const shell_1 = __nccwpck_require__(45381);
|
|
1573
1592
|
exports.commandKubeGetShell = (0, defineCommand_1.defineCommand)({
|
|
1574
|
-
name: "kube
|
|
1593
|
+
name: "kube get-shell",
|
|
1575
1594
|
description: "get a shell to a pod in the environment",
|
|
1576
1595
|
group: "general",
|
|
1577
1596
|
inputs: {
|
|
@@ -1613,7 +1632,7 @@ exports.commandKubeListNamespaces = void 0;
|
|
|
1613
1632
|
const defineCommand_1 = __nccwpck_require__(39489);
|
|
1614
1633
|
const k8sApi_1 = __nccwpck_require__(90390);
|
|
1615
1634
|
exports.commandKubeListNamespaces = (0, defineCommand_1.defineCommand)({
|
|
1616
|
-
name: "kube
|
|
1635
|
+
name: "kube list-namespaces",
|
|
1617
1636
|
description: "list all namespaces",
|
|
1618
1637
|
group: "general",
|
|
1619
1638
|
inputs: {},
|
|
@@ -1640,7 +1659,7 @@ exports.commandKubeListPods = void 0;
|
|
|
1640
1659
|
const defineCommand_1 = __nccwpck_require__(39489);
|
|
1641
1660
|
const k8sApi_1 = __nccwpck_require__(90390);
|
|
1642
1661
|
exports.commandKubeListPods = (0, defineCommand_1.defineCommand)({
|
|
1643
|
-
name: "kube
|
|
1662
|
+
name: "kube list-pods",
|
|
1644
1663
|
description: "list all pods of namespace",
|
|
1645
1664
|
group: "general",
|
|
1646
1665
|
inputs: {
|
|
@@ -1673,7 +1692,7 @@ exports.commandKubeListSecrets = void 0;
|
|
|
1673
1692
|
const defineCommand_1 = __nccwpck_require__(39489);
|
|
1674
1693
|
const k8sApi_1 = __nccwpck_require__(90390);
|
|
1675
1694
|
exports.commandKubeListSecrets = (0, defineCommand_1.defineCommand)({
|
|
1676
|
-
name: "kube
|
|
1695
|
+
name: "kube list-secrets",
|
|
1677
1696
|
description: "show secrets",
|
|
1678
1697
|
group: "general",
|
|
1679
1698
|
inputs: {
|
|
@@ -1707,7 +1726,7 @@ const defineCommand_1 = __nccwpck_require__(39489);
|
|
|
1707
1726
|
const k8sApi_1 = __nccwpck_require__(90390);
|
|
1708
1727
|
const portForward_1 = __nccwpck_require__(86070);
|
|
1709
1728
|
exports.commandKubePortForward = (0, defineCommand_1.defineCommand)({
|
|
1710
|
-
name: "kube
|
|
1729
|
+
name: "kube port-forward",
|
|
1711
1730
|
description: "start port-forwarding",
|
|
1712
1731
|
group: "general",
|
|
1713
1732
|
inputs: {
|
|
@@ -1759,7 +1778,7 @@ exports.commandKubeStopPortforward = void 0;
|
|
|
1759
1778
|
const defineCommand_1 = __nccwpck_require__(39489);
|
|
1760
1779
|
const portForwards_1 = __nccwpck_require__(77090);
|
|
1761
1780
|
exports.commandKubeStopPortforward = (0, defineCommand_1.defineCommand)({
|
|
1762
|
-
name: "kube
|
|
1781
|
+
name: "kube stop-portforward",
|
|
1763
1782
|
description: "stop a running port forward",
|
|
1764
1783
|
group: "general",
|
|
1765
1784
|
inputs: {
|
|
@@ -2091,7 +2110,7 @@ const removeFinalizerAndDelete = async (namespace, type, name) => {
|
|
|
2091
2110
|
return Promise.all([removeFinalizer(namespace, type, name), await deleteResource(namespace, type, name)]);
|
|
2092
2111
|
};
|
|
2093
2112
|
exports.commandMongoDestroyMember = (0, defineCommand_1.defineCommand)({
|
|
2094
|
-
name: "project
|
|
2113
|
+
name: "project mongo destroy-member",
|
|
2095
2114
|
description: "DESTROY a member of a replicaset in order to reinitialize it",
|
|
2096
2115
|
group: "mongodb",
|
|
2097
2116
|
inputs: {
|
|
@@ -2179,7 +2198,7 @@ const ensureCluster_1 = __nccwpck_require__(2490);
|
|
|
2179
2198
|
const utils_1 = __nccwpck_require__(38365);
|
|
2180
2199
|
const autocompletions_1 = __nccwpck_require__(52468);
|
|
2181
2200
|
exports.commandMongoGetShell = (0, defineCommand_1.defineCommand)({
|
|
2182
|
-
name: "project
|
|
2201
|
+
name: "project mongo get-shell",
|
|
2183
2202
|
description: "get a shell to a mongodb in the environment",
|
|
2184
2203
|
group: "mongodb",
|
|
2185
2204
|
inputs: {
|
|
@@ -2230,7 +2249,7 @@ const utils_1 = __nccwpck_require__(38365);
|
|
|
2230
2249
|
const clipboardy_1 = __importDefault(__nccwpck_require__(77983));
|
|
2231
2250
|
const autocompletions_1 = __nccwpck_require__(52468);
|
|
2232
2251
|
exports.commandMongoPortForward = (0, defineCommand_1.defineCommand)({
|
|
2233
|
-
name: "project
|
|
2252
|
+
name: "project mongo port-forward",
|
|
2234
2253
|
description: "port forward to a mongodb",
|
|
2235
2254
|
group: "mongodb",
|
|
2236
2255
|
inputs: {
|
|
@@ -2353,7 +2372,7 @@ const getJdbcUrl = ({
|
|
|
2353
2372
|
DB_USER
|
|
2354
2373
|
}, localPort) => `DATABASE_JDBC_URL="jdbc:postgresql://localhost:${localPort}/${DB_NAME}?schema=public&user=${DB_USER}&password=${DB_PASSWORD}"`;
|
|
2355
2374
|
exports.commandCloudSqlProxy = (0, defineCommand_1.defineCommand)({
|
|
2356
|
-
name: "project
|
|
2375
|
+
name: "project cloudsql proxy",
|
|
2357
2376
|
description: "proxy to cloud sql db",
|
|
2358
2377
|
group: "project",
|
|
2359
2378
|
inputs: {
|
|
@@ -2430,7 +2449,7 @@ const autocompletions_1 = __nccwpck_require__(52468);
|
|
|
2430
2449
|
// Full migration to CommandIO would require reworking the editor flow,
|
|
2431
2450
|
// so for now we bridge it.
|
|
2432
2451
|
exports.commandConfigSecrets = (0, defineCommand_1.defineCommand)({
|
|
2433
|
-
name: "project
|
|
2452
|
+
name: "project config-secrets",
|
|
2434
2453
|
description: "setup/update secrets stored in pass",
|
|
2435
2454
|
group: "project",
|
|
2436
2455
|
inputs: {
|
|
@@ -2471,7 +2490,7 @@ const projects_1 = __nccwpck_require__(57414);
|
|
|
2471
2490
|
const ensureCluster_1 = __nccwpck_require__(2490);
|
|
2472
2491
|
const autocompletions_1 = __nccwpck_require__(52468);
|
|
2473
2492
|
exports.commandDeletePods = (0, defineCommand_1.defineCommand)({
|
|
2474
|
-
name: "project
|
|
2493
|
+
name: "project delete-pods",
|
|
2475
2494
|
description: "delete / restart pods",
|
|
2476
2495
|
group: "project",
|
|
2477
2496
|
inputs: {
|
|
@@ -2525,7 +2544,7 @@ const defineCommand_1 = __nccwpck_require__(39489);
|
|
|
2525
2544
|
const projects_1 = __nccwpck_require__(57414);
|
|
2526
2545
|
const autocompletions_1 = __nccwpck_require__(52468);
|
|
2527
2546
|
exports.commandDeleteProject = (0, defineCommand_1.defineCommand)({
|
|
2528
|
-
name: "project
|
|
2547
|
+
name: "project delete",
|
|
2529
2548
|
description: "deletes a environment of a project (it deletes the namespace)",
|
|
2530
2549
|
group: "project",
|
|
2531
2550
|
inputs: {
|
|
@@ -2572,7 +2591,7 @@ const defineCommand_1 = __nccwpck_require__(39489);
|
|
|
2572
2591
|
const getProjectConfig_1 = __nccwpck_require__(50001);
|
|
2573
2592
|
const autocompletions_1 = __nccwpck_require__(52468);
|
|
2574
2593
|
exports.commandEnvVars = (0, defineCommand_1.defineCommand)({
|
|
2575
|
-
name: "project
|
|
2594
|
+
name: "project env-vars",
|
|
2576
2595
|
description: "list env vars",
|
|
2577
2596
|
group: "project",
|
|
2578
2597
|
inputs: {
|
|
@@ -2610,7 +2629,7 @@ exports.commandGetMyTotalWorktime = void 0;
|
|
|
2610
2629
|
const child_process_promise_1 = __nccwpck_require__(51748);
|
|
2611
2630
|
const defineCommand_1 = __nccwpck_require__(39489);
|
|
2612
2631
|
exports.commandGetMyTotalWorktime = (0, defineCommand_1.defineCommand)({
|
|
2613
|
-
name: "project
|
|
2632
|
+
name: "project worktime",
|
|
2614
2633
|
description: "show the total worktime that you spent on a project",
|
|
2615
2634
|
group: "project",
|
|
2616
2635
|
inputs: {},
|
|
@@ -2640,7 +2659,7 @@ const shell_1 = __nccwpck_require__(45381);
|
|
|
2640
2659
|
const ensureCluster_1 = __nccwpck_require__(2490);
|
|
2641
2660
|
const autocompletions_1 = __nccwpck_require__(52468);
|
|
2642
2661
|
exports.commandGetShell = (0, defineCommand_1.defineCommand)({
|
|
2643
|
-
name: "project
|
|
2662
|
+
name: "project get-shell",
|
|
2644
2663
|
description: "get a shell to a pod in the environment",
|
|
2645
2664
|
group: "project",
|
|
2646
2665
|
inputs: {
|
|
@@ -2732,7 +2751,7 @@ const findJobById = async (io, jobName) => {
|
|
|
2732
2751
|
};
|
|
2733
2752
|
};
|
|
2734
2753
|
exports.commandCiJobOpen = (0, defineCommand_1.defineCommand)({
|
|
2735
|
-
name: "project
|
|
2754
|
+
name: "project ci job-open",
|
|
2736
2755
|
description: "Open a Job",
|
|
2737
2756
|
group: "project",
|
|
2738
2757
|
inputs: {
|
|
@@ -2751,7 +2770,7 @@ exports.commandCiJobOpen = (0, defineCommand_1.defineCommand)({
|
|
|
2751
2770
|
}
|
|
2752
2771
|
});
|
|
2753
2772
|
exports.commandCiJobLog = (0, defineCommand_1.defineCommand)({
|
|
2754
|
-
name: "project
|
|
2773
|
+
name: "project ci job-log",
|
|
2755
2774
|
description: "Show a job's log",
|
|
2756
2775
|
group: "project",
|
|
2757
2776
|
inputs: {
|
|
@@ -2804,7 +2823,7 @@ const kubernetes_1 = __nccwpck_require__(45198);
|
|
|
2804
2823
|
const ensureCluster_1 = __nccwpck_require__(2490);
|
|
2805
2824
|
const autocompletions_1 = __nccwpck_require__(52468);
|
|
2806
2825
|
exports.commandListPods = (0, defineCommand_1.defineCommand)({
|
|
2807
|
-
name: "project
|
|
2826
|
+
name: "project list-pods",
|
|
2808
2827
|
description: "list pods of local project",
|
|
2809
2828
|
group: "project",
|
|
2810
2829
|
inputs: {
|
|
@@ -2839,7 +2858,7 @@ const defineCommand_1 = __nccwpck_require__(39489);
|
|
|
2839
2858
|
const projects_1 = __nccwpck_require__(57414);
|
|
2840
2859
|
const autocompletions_1 = __nccwpck_require__(52468);
|
|
2841
2860
|
exports.commandNamespace = (0, defineCommand_1.defineCommand)({
|
|
2842
|
-
name: "project
|
|
2861
|
+
name: "project namespace",
|
|
2843
2862
|
description: "show namespace of local project",
|
|
2844
2863
|
group: "project",
|
|
2845
2864
|
inputs: {
|
|
@@ -2879,7 +2898,7 @@ const getProjectConfig_1 = __nccwpck_require__(50001);
|
|
|
2879
2898
|
const ensureCluster_1 = __nccwpck_require__(2490);
|
|
2880
2899
|
const autocompletions_1 = __nccwpck_require__(52468);
|
|
2881
2900
|
exports.commandOpenEnv = (0, defineCommand_1.defineCommand)({
|
|
2882
|
-
name: "project
|
|
2901
|
+
name: "project open env",
|
|
2883
2902
|
description: "open the live environment",
|
|
2884
2903
|
group: "project",
|
|
2885
2904
|
inputs: {
|
|
@@ -2918,7 +2937,7 @@ exports.commandOpenGit = void 0;
|
|
|
2918
2937
|
const child_process_promise_1 = __nccwpck_require__(51748);
|
|
2919
2938
|
const defineCommand_1 = __nccwpck_require__(39489);
|
|
2920
2939
|
exports.commandOpenGit = (0, defineCommand_1.defineCommand)({
|
|
2921
|
-
name: "project
|
|
2940
|
+
name: "project open git",
|
|
2922
2941
|
description: "open the repo on gitlab / github in your browser",
|
|
2923
2942
|
group: "project",
|
|
2924
2943
|
inputs: {},
|
|
@@ -2944,7 +2963,7 @@ const getProjectConfig_1 = __nccwpck_require__(50001);
|
|
|
2944
2963
|
const openKubernetesDashboards_1 = __nccwpck_require__(1049);
|
|
2945
2964
|
const autocompletions_1 = __nccwpck_require__(52468);
|
|
2946
2965
|
exports.commandOpenLogs = (0, defineCommand_1.defineCommand)({
|
|
2947
|
-
name: "project
|
|
2966
|
+
name: "project open logs",
|
|
2948
2967
|
description: "open google cloud logs (stackdriver logs)",
|
|
2949
2968
|
group: "project",
|
|
2950
2969
|
inputs: {
|
|
@@ -2983,7 +3002,7 @@ const defineCommand_1 = __nccwpck_require__(39489);
|
|
|
2983
3002
|
const projects_1 = __nccwpck_require__(57414);
|
|
2984
3003
|
const autocompletions_1 = __nccwpck_require__(52468);
|
|
2985
3004
|
exports.commandPauseProject = (0, defineCommand_1.defineCommand)({
|
|
2986
|
-
name: "project
|
|
3005
|
+
name: "project pause",
|
|
2987
3006
|
description: "halts all running pods (scales to 0)",
|
|
2988
3007
|
group: "project",
|
|
2989
3008
|
inputs: {
|
|
@@ -3044,7 +3063,7 @@ const portForwards_1 = __nccwpck_require__(77090);
|
|
|
3044
3063
|
const open_1 = __importDefault(__nccwpck_require__(35186));
|
|
3045
3064
|
const autocompletions_1 = __nccwpck_require__(52468);
|
|
3046
3065
|
exports.commandPortForward = (0, defineCommand_1.defineCommand)({
|
|
3047
|
-
name: "project
|
|
3066
|
+
name: "project port-forward",
|
|
3048
3067
|
description: "start port-forwarding",
|
|
3049
3068
|
group: "project",
|
|
3050
3069
|
inputs: {
|
|
@@ -3146,7 +3165,7 @@ const hasCloudSql = context => {
|
|
|
3146
3165
|
return false;
|
|
3147
3166
|
};
|
|
3148
3167
|
exports.commandProjectRestoreDb = (0, defineCommand_1.defineCommand)({
|
|
3149
|
-
name: "project
|
|
3168
|
+
name: "project cloudsql restore-db",
|
|
3150
3169
|
description: "restores a project db from one source to another target",
|
|
3151
3170
|
group: "project",
|
|
3152
3171
|
inputs: {
|
|
@@ -3297,7 +3316,7 @@ exports.commandRenewToken = void 0;
|
|
|
3297
3316
|
const defineCommand_1 = __nccwpck_require__(39489);
|
|
3298
3317
|
const setupAccessTokens_1 = __nccwpck_require__(64775);
|
|
3299
3318
|
exports.commandRenewToken = (0, defineCommand_1.defineCommand)({
|
|
3300
|
-
name: "project
|
|
3319
|
+
name: "project renew-token",
|
|
3301
3320
|
description: "Configures the project access token for semantic release.",
|
|
3302
3321
|
group: "project",
|
|
3303
3322
|
inputs: {},
|
|
@@ -3321,7 +3340,7 @@ exports.commandSecretsClearBackups = void 0;
|
|
|
3321
3340
|
const defineCommand_1 = __nccwpck_require__(39489);
|
|
3322
3341
|
const gitlab_1 = __nccwpck_require__(4508);
|
|
3323
3342
|
exports.commandSecretsClearBackups = (0, defineCommand_1.defineCommand)({
|
|
3324
|
-
name: "project
|
|
3343
|
+
name: "project secrets-clear-backups",
|
|
3325
3344
|
description: "clears all backups",
|
|
3326
3345
|
group: "project",
|
|
3327
3346
|
inputs: {
|
|
@@ -3353,7 +3372,7 @@ const defineCommand_1 = __nccwpck_require__(39489);
|
|
|
3353
3372
|
const evaluateSecurityAudit_1 = __nccwpck_require__(64556);
|
|
3354
3373
|
const projects_1 = __nccwpck_require__(57414);
|
|
3355
3374
|
exports.commandSecurityEvaluate = (0, defineCommand_1.defineCommand)({
|
|
3356
|
-
name: "project
|
|
3375
|
+
name: "project security-evaluate",
|
|
3357
3376
|
description: "evaluate project's security audit document",
|
|
3358
3377
|
group: "project",
|
|
3359
3378
|
inputs: {},
|
|
@@ -3385,7 +3404,7 @@ exports.commandSetup = void 0;
|
|
|
3385
3404
|
const defineCommand_1 = __nccwpck_require__(39489);
|
|
3386
3405
|
const setup_1 = __nccwpck_require__(80426);
|
|
3387
3406
|
exports.commandSetup = (0, defineCommand_1.defineCommand)({
|
|
3388
|
-
name: "project
|
|
3407
|
+
name: "project setup",
|
|
3389
3408
|
description: "Initializes all environments and creates required resources, service accounts, etc.",
|
|
3390
3409
|
group: "project",
|
|
3391
3410
|
inputs: {
|
|
@@ -3452,7 +3471,7 @@ const runCronjob = async (io, namespace, jobName) => {
|
|
|
3452
3471
|
}
|
|
3453
3472
|
};
|
|
3454
3473
|
exports.commandTriggerCronjobGeneral = (0, defineCommand_1.defineCommand)({
|
|
3455
|
-
name: "trigger-cronjob",
|
|
3474
|
+
name: "kube trigger-cronjob",
|
|
3456
3475
|
description: "trigger cronjob",
|
|
3457
3476
|
group: "general",
|
|
3458
3477
|
inputs: {
|
|
@@ -3474,7 +3493,7 @@ exports.commandTriggerCronjobGeneral = (0, defineCommand_1.defineCommand)({
|
|
|
3474
3493
|
}
|
|
3475
3494
|
});
|
|
3476
3495
|
exports.commandTriggerCronjobProject = (0, defineCommand_1.defineCommand)({
|
|
3477
|
-
name: "project
|
|
3496
|
+
name: "project trigger-cronjob",
|
|
3478
3497
|
description: "trigger cronjob",
|
|
3479
3498
|
group: "project",
|
|
3480
3499
|
inputs: {
|
|
@@ -3521,7 +3540,7 @@ const evaluateSecurityAudit_1 = __nccwpck_require__(64556);
|
|
|
3521
3540
|
const createSecurityAuditMergeRequest_1 = __nccwpck_require__(90960);
|
|
3522
3541
|
const GITLAB_HOST = "https://git.panter.ch";
|
|
3523
3542
|
exports.commandSecurityAuditCiJob = (0, defineCommand_1.defineCommand)({
|
|
3524
|
-
name: "security
|
|
3543
|
+
name: "security audit ci-job",
|
|
3525
3544
|
description: "Evaluates security audit document. Creates MR with template if missing.",
|
|
3526
3545
|
group: "security",
|
|
3527
3546
|
inputs: {
|
|
@@ -3610,7 +3629,7 @@ const rest_1 = __nccwpck_require__(86856);
|
|
|
3610
3629
|
const createSecurityAuditMergeRequest_1 = __nccwpck_require__(90960);
|
|
3611
3630
|
const GITLAB_HOST = "https://git.panter.ch";
|
|
3612
3631
|
exports.commandSecurityAuditCreate = (0, defineCommand_1.defineCommand)({
|
|
3613
|
-
name: "security
|
|
3632
|
+
name: "security audit create",
|
|
3614
3633
|
description: "Creates a MR with the latest security audit template document",
|
|
3615
3634
|
group: "security",
|
|
3616
3635
|
inputs: {
|
|
@@ -3676,7 +3695,7 @@ const defineCommand_1 = __nccwpck_require__(39489);
|
|
|
3676
3695
|
const evaluateSecurityAudit_1 = __nccwpck_require__(64556);
|
|
3677
3696
|
const createSecurityAuditMergeRequest_1 = __nccwpck_require__(90960);
|
|
3678
3697
|
exports.commandSecurityAuditEvaluate = (0, defineCommand_1.defineCommand)({
|
|
3679
|
-
name: "security
|
|
3698
|
+
name: "security audit evaluate",
|
|
3680
3699
|
description: "Evaluates security audit document in given path",
|
|
3681
3700
|
group: "security",
|
|
3682
3701
|
inputs: {
|
|
@@ -3726,49 +3745,77 @@ const os_1 = __nccwpck_require__(70857);
|
|
|
3726
3745
|
* @returns Array of completion strings
|
|
3727
3746
|
*/
|
|
3728
3747
|
async function getCompletions(allCommands, words, cursorWord) {
|
|
3729
|
-
//
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3748
|
+
// Try to find a command by matching the longest prefix of words.
|
|
3749
|
+
// E.g., for words ["project", "cloudsql", "restore-db", "--source"],
|
|
3750
|
+
// we match "project cloudsql restore-db" and treat ["--source"] as args.
|
|
3751
|
+
const matched = findCommand(allCommands, words);
|
|
3752
|
+
if (matched) {
|
|
3753
|
+
const {
|
|
3754
|
+
command,
|
|
3755
|
+
argsAfterCommand
|
|
3756
|
+
} = matched;
|
|
3757
|
+
// Check if cursor is a --flag name
|
|
3758
|
+
if (cursorWord.startsWith("--")) {
|
|
3759
|
+
return getFlagCompletions(command, cursorWord);
|
|
3760
|
+
}
|
|
3761
|
+
// Check if previous word was a --flag (complete its value)
|
|
3762
|
+
const prevWord = argsAfterCommand[argsAfterCommand.length - 1];
|
|
3763
|
+
if (prevWord === null || prevWord === void 0 ? void 0 : prevWord.startsWith("--")) {
|
|
3764
|
+
const flagName = prevWord.replace(/^--/, "");
|
|
3765
|
+
const inputName = flagNameToInputName(flagName);
|
|
3766
|
+
const inputDef = command.inputs[inputName];
|
|
3767
|
+
if (inputDef && "choices" in inputDef && inputDef.choices) {
|
|
3768
|
+
return resolveChoicesForCompletion(inputDef, cursorWord);
|
|
3769
|
+
}
|
|
3770
|
+
return [];
|
|
3771
|
+
}
|
|
3772
|
+
// Complete positional inputs
|
|
3773
|
+
const positionalInputs = getPositionalInputs(command);
|
|
3774
|
+
const positionalArgs = argsAfterCommand.filter(w => !w.startsWith("--"));
|
|
3775
|
+
const positionalIndex = positionalArgs.length;
|
|
3776
|
+
const targetInput = positionalInputs[positionalIndex];
|
|
3777
|
+
if (targetInput) {
|
|
3778
|
+
const [, inputDef] = targetInput;
|
|
3779
|
+
if ("choices" in inputDef && inputDef.choices) {
|
|
3780
|
+
return resolveChoicesForCompletion(inputDef, cursorWord);
|
|
3781
|
+
}
|
|
3750
3782
|
}
|
|
3751
3783
|
return [];
|
|
3752
3784
|
}
|
|
3753
|
-
//
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
const [, inputDef] = targetInput;
|
|
3765
|
-
if ("choices" in inputDef && inputDef.choices) {
|
|
3766
|
-
return resolveChoicesForCompletion(inputDef, cursorWord);
|
|
3785
|
+
// No command matched. Complete subcommand names at the current level.
|
|
3786
|
+
const typed = words.join(" ");
|
|
3787
|
+
const prefix = typed ? typed + " " : "";
|
|
3788
|
+
const nextParts = new Set();
|
|
3789
|
+
for (const cmd of allCommands) {
|
|
3790
|
+
if (cmd.name.startsWith(prefix)) {
|
|
3791
|
+
const rest = cmd.name.slice(prefix.length);
|
|
3792
|
+
const nextPart = rest.split(" ")[0];
|
|
3793
|
+
if (nextPart && nextPart.startsWith(cursorWord)) {
|
|
3794
|
+
nextParts.add(nextPart);
|
|
3795
|
+
}
|
|
3767
3796
|
}
|
|
3768
3797
|
}
|
|
3769
|
-
return [];
|
|
3798
|
+
return [...nextParts].sort();
|
|
3770
3799
|
}
|
|
3771
3800
|
exports.getCompletions = getCompletions;
|
|
3801
|
+
/**
|
|
3802
|
+
* Find a command by matching the longest prefix of words against command names.
|
|
3803
|
+
* Returns the matched command and the remaining words (args/flags after the command name).
|
|
3804
|
+
*/
|
|
3805
|
+
function findCommand(allCommands, words) {
|
|
3806
|
+
// Try longest match first
|
|
3807
|
+
for (let i = words.length; i >= 1; i--) {
|
|
3808
|
+
const candidate = words.slice(0, i).join(" ");
|
|
3809
|
+
const command = allCommands.find(c => c.name === candidate);
|
|
3810
|
+
if (command) {
|
|
3811
|
+
return {
|
|
3812
|
+
command,
|
|
3813
|
+
argsAfterCommand: words.slice(i)
|
|
3814
|
+
};
|
|
3815
|
+
}
|
|
3816
|
+
}
|
|
3817
|
+
return null;
|
|
3818
|
+
}
|
|
3772
3819
|
function getPositionalInputs(command) {
|
|
3773
3820
|
return Object.entries(command.inputs).filter(([, def]) => def.positional);
|
|
3774
3821
|
}
|
|
@@ -7526,7 +7573,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
7526
7573
|
value: true
|
|
7527
7574
|
}));
|
|
7528
7575
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
7529
|
-
exports.PIPELINE_IMAGE_TAG = "new-cli-
|
|
7576
|
+
exports.PIPELINE_IMAGE_TAG = "new-cli-52525b58" || 0;
|
|
7530
7577
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
7531
7578
|
|
|
7532
7579
|
/***/ }),
|
package/dist/cli/src/cli.js
CHANGED
|
@@ -50,8 +50,24 @@ const program = new commander_1.Command();
|
|
|
50
50
|
program.name("catladder").description("Panter CLI tool for cloud CI/CD and DevOps").version(packageInfos_1.default.version).option("-y, --yes", "skip all confirmation prompts");
|
|
51
51
|
// Collect all command defs for completion
|
|
52
52
|
const allCommandDefs = [];
|
|
53
|
+
// Cache for intermediate subcommand groups (e.g., "project", "project cloudsql")
|
|
54
|
+
const subcommandCache = new Map();
|
|
55
|
+
/**
|
|
56
|
+
* Get or create a chain of nested subcommands.
|
|
57
|
+
* E.g., for ["project", "cloudsql"], ensures program.command("project").command("cloudsql") exists.
|
|
58
|
+
*/
|
|
59
|
+
function getOrCreateParent(parts) {
|
|
60
|
+
if (parts.length === 0) return program;
|
|
61
|
+
const key = parts.join(" ");
|
|
62
|
+
if (subcommandCache.has(key)) return subcommandCache.get(key);
|
|
63
|
+
const parent = getOrCreateParent(parts.slice(0, -1));
|
|
64
|
+
const cmd = parent.command(parts[parts.length - 1]);
|
|
65
|
+
subcommandCache.set(key, cmd);
|
|
66
|
+
return cmd;
|
|
67
|
+
}
|
|
53
68
|
/**
|
|
54
69
|
* Register a CommandDef with Commander.js.
|
|
70
|
+
* - Command name can contain spaces for nesting (e.g., "project cloudsql proxy")
|
|
55
71
|
* - Inputs with `positional: true` become Commander positional args
|
|
56
72
|
* - Other inputs become optional --flags
|
|
57
73
|
* - --inputs accepts JSON for programmatic use
|
|
@@ -68,14 +84,17 @@ function registerCommand(def) {
|
|
|
68
84
|
flagInputs.push([name, inputDef]);
|
|
69
85
|
}
|
|
70
86
|
}
|
|
71
|
-
//
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
87
|
+
// Split name into parent groups + leaf command
|
|
88
|
+
const nameParts = def.name.split(" ");
|
|
89
|
+
const parentParts = nameParts.slice(0, -1);
|
|
90
|
+
const leafName = nameParts[nameParts.length - 1];
|
|
91
|
+
// Build leaf command string with positional args
|
|
92
|
+
let cmdStr = leafName;
|
|
75
93
|
for (const [name] of positionalInputs) {
|
|
76
94
|
cmdStr += ` [${name}]`;
|
|
77
95
|
}
|
|
78
|
-
const
|
|
96
|
+
const parent = getOrCreateParent(parentParts);
|
|
97
|
+
const cmd = parent.command(cmdStr).description(def.description);
|
|
79
98
|
// Add --flag for each non-positional input
|
|
80
99
|
for (const [name, inputDef] of flagInputs) {
|
|
81
100
|
const flagName = name.replace(/([A-Z])/g, "-$1").toLowerCase();
|
package/dist/cli/src/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/cli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoC;AACpC,kEAA0C;AAC1C,uDAA2D;AAC3D,kDAA4D;AAE5D,6CAKsB;AAEtB,sBAAsB;AACtB,qDAAuC;AAEvC,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,WAAW,CAAC;KACjB,WAAW,CAAC,4CAA4C,CAAC;KACzD,OAAO,CAAC,sBAAY,CAAC,OAAO,CAAC;KAC7B,MAAM,CAAC,WAAW,EAAE,+BAA+B,CAAC,CAAC;AAExD,0CAA0C;AAC1C,MAAM,cAAc,GAAiB,EAAE,CAAC;AAExC
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/cli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoC;AACpC,kEAA0C;AAC1C,uDAA2D;AAC3D,kDAA4D;AAE5D,6CAKsB;AAEtB,sB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AC,GAAG,CAAC,CAAC,GAAG,EAAE,mCAAI,WAAW,CAAC;IACnE,OAAO,CAAC,GAAG,CAAC,IAAA,wCAA2B,EAAC,UAAU,CAAC,CAAC,CAAC;AACvD,CAAC,CAAC,CAAC;AAEL,aAAa;KACV,OAAO,CAAC,SAAS,CAAC;KAClB,WAAW,CAAC,4CAA4C,CAAC;KACzD,MAAM,CAAC,KAAK,IAAI,EAAE;;IACjB,MAAM,UAAU,GAAG,MAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,mCAAI,WAAW,CAAC;IACnE,MAAM,IAAA,+BAAkB,EAAC,UAAU,CAAC,CAAC;AACvC,CAAC,CAAC,CAAC;AAEL,aAAa;KACV,OAAO,CAAC,WAAW,CAAC;KACpB,WAAW,CAAC,2CAA2C,CAAC;KACxD,MAAM,CAAC,KAAK,IAAI,EAAE;;IACjB,MAAM,UAAU,GAAG,MAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,mCAAI,WAAW,CAAC;IACnE,MAAM,IAAA,iCAAoB,EAAC,UAAU,CAAC,CAAC;AACzC,CAAC,CAAC,CAAC;AAEL,kBAAkB;AAClB,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;IACtB,IAAA,kCAAmB,GAAE,CAAC;AACxB,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -8,7 +8,7 @@ const defineCommand_1 = require("../../core/defineCommand");
|
|
|
8
8
|
const copyDb_1 = require("../../gcloud/cloudSql/copyDb");
|
|
9
9
|
const startProxy_1 = require("../../gcloud/cloudSql/startProxy");
|
|
10
10
|
exports.commandRestoreDb = (0, defineCommand_1.defineCommand)({
|
|
11
|
-
name: "
|
|
11
|
+
name: "cloudsql restore-db",
|
|
12
12
|
description: "restore a db from one source to another target",
|
|
13
13
|
group: "cloudSQL",
|
|
14
14
|
inputs: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandRestoreDb.js","sourceRoot":"","sources":["../../../../../src/commands/cloudSQL/commandRestoreDb.ts"],"names":[],"mappings":";;;AAAA,4DAAyD;AACzD,yDAA2D;AAE3D,iEAAkF;AAErE,QAAA,gBAAgB,GAAG,IAAA,6BAAa,EAAC;IAC5C,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"commandRestoreDb.js","sourceRoot":"","sources":["../../../../../src/commands/cloudSQL/commandRestoreDb.ts"],"names":[],"mappings":";;;AAAA,4DAAyD;AACzD,yDAA2D;AAE3D,iEAAkF;AAErE,QAAA,gBAAgB,GAAG,IAAA,6BAAa,EAAC;IAC5C,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,gDAAgD;IAC7D,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE;QACN,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,qDAAqD;SAC/D;QACD,eAAe,EAAE;YACf,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,4BAA4B;YACrC,OAAO,EAAE,IAAI;SACd;QACD,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,sBAAsB;YAC/B,OAAO,EAAE,UAAU;SACpB;QACD,cAAc,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,sBAAsB,EAAE;QACnE,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,qBAAqB,EAAE;QAChE,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,sDAAsD;SAChE;QACD,eAAe,EAAE;YACf,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,4BAA4B;YACrC,OAAO,EAAE,IAAI;SACd;QACD,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,sBAAsB;YAC/B,OA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,SAAS,EAAE,UAAU;aACtB,CAAC,CAAC;QACL,CAAC;QAED,MAAM,cAAc,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACvD,MAAM,cAAc,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACvD,MAAM,YAAY,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAEnD,MAAM,cAAc,GAAG,MAAM,GAAG,CAAC,OAAO,CACtC,kBAAkB,cAAc,IAAI,YAAY,wBAAwB,cAAc,IAAI,YAAY,iBAAiB,CACxH,CAAC;QACF,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,OAAO;QACT,CAAC;QAED,IAAI,CAAC;YACH,MAAM,IAAA,oBAAW,EAAC;gBAChB,cAAc;gBACd,UAAU;gBACV,cAAc;gBACd,cAAc;gBACd,cAAc;gBACd,UAAU;gBACV,YAAY;gBACZ,YAAY;aACb,CAAC,CAAC;QACL,CAAC;gBAAS,CAAC;YACT,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,IAAI,EAAE,CAAC;YACpB,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,IAAI,EAAE,CAAC;QACtB,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -12,7 +12,7 @@ exports.commandDadjoke = void 0;
|
|
|
12
12
|
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
13
13
|
const defineCommand_1 = require("../../core/defineCommand");
|
|
14
14
|
exports.commandDadjoke = (0, defineCommand_1.defineCommand)({
|
|
15
|
-
name: "dadjoke",
|
|
15
|
+
name: "fun dadjoke",
|
|
16
16
|
description: "something for jonas.",
|
|
17
17
|
group: "fun",
|
|
18
18
|
inputs: {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandDadjoke.js","sourceRoot":"","sources":["../../../../../src/commands/fun/commandDadjoke.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AAC/B,4DAAyD;AAE5C,QAAA,cAAc,GAAG,IAAA,6BAAa,EAAC;IAC1C,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"commandDadjoke.js","sourceRoot":"","sources":["../../../../../src/commands/fun/commandDadjoke.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AAC/B,4DAAyD;AAE5C,QAAA,cAAc,GAAG,IAAA,6BAAa,EAAC;IAC1C,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,sBAAsB;IACnC,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QACrB,MAAM,MAAM,GAAG,MAAM,IAAA,oBAAK,EAAC,6BAA6B,EAAE;YACxD,OAAO,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE;SAClC,CAAC,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QACjC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACZ,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACd,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACd,CAAC;CACF,CAAC,CAAC"}
|