@catladder/cli 1.5.1 → 1.5.5
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 +4 -2
- package/dist/apps/cli/commands/shared/index.js +1 -1
- package/dist/apps/cli/commands/shared/index.js.map +1 -1
- package/dist/apps/cli/config/writeConfig.js +8 -6
- package/dist/apps/cli/config/writeConfig.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/apps/cli/commands/shared/index.ts +3 -1
- package/src/apps/cli/config/writeConfig.ts +7 -5
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"catladder": "./bin/catladder"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@catladder/pipeline": "1.5.
|
|
19
|
+
"@catladder/pipeline": "1.5.5",
|
|
20
20
|
"@kubernetes/client-node": "^0.16.2",
|
|
21
21
|
"child-process-promise": "^2.2.1",
|
|
22
22
|
"command-exists-promise": "^2.0.2",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dayjs": "^1.10.4",
|
|
25
25
|
"fs-extra": "^7.0.1",
|
|
26
26
|
"gitlab": "^4.4.1",
|
|
27
|
-
"js-yaml": "^
|
|
27
|
+
"js-yaml": "^4.1.0",
|
|
28
28
|
"lodash": "^4.17.21",
|
|
29
29
|
"memoizee": "^0.4.14",
|
|
30
30
|
"node-fetch": "^2.3.0",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"eslint": "^8.7.0",
|
|
56
56
|
"typescript": "^4.5.4"
|
|
57
57
|
},
|
|
58
|
-
"version": "1.5.
|
|
58
|
+
"version": "1.5.5"
|
|
59
59
|
}
|
|
@@ -24,8 +24,10 @@ export const openGoogleCloudKubernetesDashboard = async (
|
|
|
24
24
|
googleAuthUserNumber = 0
|
|
25
25
|
) => {
|
|
26
26
|
//gke_skynet-164509_europe-west1-d_production
|
|
27
|
+
// ?authuser=1&project=skynet-swiss&pageState=pageState%3D(%22savedViews%22:(%22c%22:%5B%22gke%2Feurope-west6-a%2Fch-production%22%5D,%22n%22:%5B%22pvl-bike2school-review%22%5D,%22i%22:%224e42e0b9cd6147f8a4fba7516752ec48%22))
|
|
28
|
+
// ?authuser=1&project=skynet-swiss&pageState=(%22savedViews%22:(%22i%22:%2279802e2b154d46d480dff4e086e87875%22,%22c%22:%5B%22gke%2Feurope-west6-a%2Fch-production%22%5D,%22n%22:%5B%22pvl-bike2school-review%22%5D))
|
|
27
29
|
|
|
28
|
-
const pageState = `
|
|
30
|
+
const pageState = `("savedViews":("c":["gke/${cluster.region}/${cluster.name}"],"n":["${namespace}"],"i":"4e42e0b9cd6147f8a4fba7516752ec48"))`;
|
|
29
31
|
const url = `https://console.cloud.google.com/kubernetes/workload?authuser=${googleAuthUserNumber}&project=${
|
|
30
32
|
cluster.projectId
|
|
31
33
|
}&pageState=${encodeURIComponent(pageState)}`;
|
|
@@ -23,6 +23,7 @@ export const writeConfig = async (
|
|
|
23
23
|
});
|
|
24
24
|
vorpal.log("");
|
|
25
25
|
if (configType === TS) {
|
|
26
|
+
const file = gitRoot + "/catladder.ts";
|
|
26
27
|
const content = format(
|
|
27
28
|
`
|
|
28
29
|
import type { Config } from "@catladder/pipeline";
|
|
@@ -40,19 +41,20 @@ export const writeConfig = async (
|
|
|
40
41
|
}
|
|
41
42
|
);
|
|
42
43
|
|
|
43
|
-
await writeFile(
|
|
44
|
+
await writeFile(file, content, {
|
|
44
45
|
encoding: "utf-8",
|
|
45
46
|
});
|
|
46
47
|
vorpal.log("adding type @catladder/pipeline....");
|
|
47
|
-
await spawn("yarn add @catladder/pipeline -DW", {
|
|
48
|
+
await spawn("yarn add --non-interactive @catladder/pipeline -DW", {
|
|
48
49
|
shell: true,
|
|
49
50
|
});
|
|
50
|
-
await exec("git add " +
|
|
51
|
+
await exec("git add " + file);
|
|
51
52
|
} else {
|
|
53
|
+
const file = gitRoot + "/catladder.yml";
|
|
52
54
|
const content = dump(config);
|
|
53
55
|
|
|
54
56
|
await writeFile(
|
|
55
|
-
|
|
57
|
+
file,
|
|
56
58
|
content +
|
|
57
59
|
"\n\n" +
|
|
58
60
|
(options.endComment
|
|
@@ -62,7 +64,7 @@ export const writeConfig = async (
|
|
|
62
64
|
encoding: "utf-8",
|
|
63
65
|
}
|
|
64
66
|
);
|
|
65
|
-
await exec("git add " +
|
|
67
|
+
await exec("git add " + file);
|
|
66
68
|
}
|
|
67
69
|
vorpal.log("done!");
|
|
68
70
|
vorpal.log("");
|