@catladder/cli 1.5.3 → 1.5.7

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/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "catladder": "./bin/catladder"
17
17
  },
18
18
  "dependencies": {
19
- "@catladder/pipeline": "1.5.3",
19
+ "@catladder/pipeline": "1.5.7",
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": "^3.12.0",
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.3"
58
+ "version": "1.5.7"
59
59
  }
@@ -62,7 +62,7 @@ metadata:
62
62
  name: ${serviceAccountName}
63
63
  rules:
64
64
  - apiGroups: ["", "extensions", "apps", "networking.k8s.io", "batch"]
65
- resources: ["deployments", "replicasets", "pods", "secrets", "configmaps", "services", "ingresses", "serviceaccounts", "jobs", "cronjobs"]
65
+ resources: ["deployments", "replicasets", "statefulsets", "pods", "secrets", "configmaps", "services", "ingresses", "serviceaccounts", "jobs", "cronjobs"]
66
66
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] # You can also use ["*"]
67
67
  ---
68
68
  kind: RoleBinding
@@ -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(gitRoot + "/catladder.ts", content, {
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 " + gitRoot + "/catladder.ts");
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
- gitRoot + "/catladder.yml",
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 " + gitRoot + "/catladder.ts");
67
+ await exec("git add " + file);
66
68
  }
67
69
  vorpal.log("done!");
68
70
  vorpal.log("");
@@ -145,7 +145,9 @@ export const migrateV2 = async (vorpal: Vorpal) => {
145
145
  const { env, ...baseValues } =
146
146
  (await readYaml(dir + "/values.yml")) ?? {};
147
147
 
148
- const startCommand = baseValues?.application?.command?.join(" ");
148
+ const startCommand = Array.isArray(baseValues?.application?.command)
149
+ ? baseValues?.application?.command.join(" ")
150
+ : baseValues?.application?.command
149
151
  return {
150
152
  vars: env ? transformVars(env) : undefined,
151
153
  dir: dir,