@catladder/cli 1.148.1 → 1.149.0

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.
@@ -13,7 +13,7 @@ var BUILD_ID = {
13
13
  var CURRENT_VERSION = {
14
14
  default: new BashExpression_1.BashExpression(
15
15
  // because we do shallow fetch, we need to ask the origin
16
- "$(tag=$(git ls-remote origin \"refs/tags/v*[0-9]\" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\///'); [ -z \"$tag\" ] && echo \"v0.0.0\" || echo \"$tag\")"),
16
+ "$(tag=$(git ls-remote origin \"refs/tags/v*[0-9]\" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z \"$tag\" ] && echo \"0.0.0\" || echo \"$tag\")"),
17
17
  };
18
18
  var getBuildInfoVariables = function (ctx) {
19
19
  var pipelineType = ctx.pipelineType;
@@ -1,8 +1,7 @@
1
1
  import type { Config } from "../types/config";
2
2
  /**
3
- *
4
- while technically not required, we group different envs in its own stage
5
- each job from `createJobs` that is defined as `envMode: "stagePerEnv"` will have `deploy dev`, etc. instead of just `deploy`
6
- this is just so that it looks nicer in gitlab and makes running mutliple manual tasks more easy to use
3
+ * while technically not required, we group different envs in its own stage
4
+ * each job from `createJobs` that is defined as `envMode: "stagePerEnv"` will have `deploy dev`, etc. instead of just `deploy`
5
+ * this is just so that it looks nicer in gitlab and makes running mutliple manual tasks more easy to use
7
6
  */
8
7
  export declare function getPipelineStages(config: Config): string[];
@@ -29,13 +29,12 @@ exports.getPipelineStages = void 0;
29
29
  var config_1 = require("../config");
30
30
  var jobs_1 = require("../types/jobs");
31
31
  /**
32
- *
33
- while technically not required, we group different envs in its own stage
34
- each job from `createJobs` that is defined as `envMode: "stagePerEnv"` will have `deploy dev`, etc. instead of just `deploy`
35
- this is just so that it looks nicer in gitlab and makes running mutliple manual tasks more easy to use
32
+ * while technically not required, we group different envs in its own stage
33
+ * each job from `createJobs` that is defined as `envMode: "stagePerEnv"` will have `deploy dev`, etc. instead of just `deploy`
34
+ * this is just so that it looks nicer in gitlab and makes running mutliple manual tasks more easy to use
36
35
  */
37
36
  function getPipelineStages(config) {
38
- var allEnvs = (0, config_1.getAllEnvsInAllComponents)(config);
37
+ var allEnvs = (0, config_1.getAllEnvsInAllComponents)(config).filter(function (e) { return e !== "local"; });
39
38
  var stages = jobs_1.BASE_STAGES.reduce(function (acc, baseStage) { return __spreadArray(__spreadArray(__spreadArray([], __read(acc), false), [
40
39
  baseStage
41
40
  ], false), __read(allEnvs.map(function (e) { return "".concat(baseStage, " ").concat(e); })), false); }, []);
@@ -1 +1 @@
1
- {"version":3,"file":"getPipelineStages.js","sourceRoot":"","sources":["../../../../../pipeline/src/pipeline/getPipelineStages.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCAAsD;AAEtD,sCAA4C;AAE5C;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,MAAc;IAC9C,IAAM,OAAO,GAAG,IAAA,kCAAyB,EAAC,MAAM,CAAC,CAAC;IAClD,IAAM,MAAM,GAAG,kBAAW,CAAC,MAAM,CAC/B,UAAC,GAAG,EAAE,SAAS,IAAK,4DACf,GAAG;QACN,SAAS;sBACN,OAAO,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,UAAG,SAAS,cAAI,CAAC,CAAE,EAAnB,CAAmB,CAAC,WAHxB,CAInB,EACD,EAAE,CACH,CAAC;IACF,OAAO,MAAM,CAAC;AAChB,CAAC;AAXD,8CAWC"}
1
+ {"version":3,"file":"getPipelineStages.js","sourceRoot":"","sources":["../../../../../pipeline/src/pipeline/getPipelineStages.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCAAsD;AAEtD,sCAA4C;AAE5C;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,MAAc;IAC9C,IAAM,OAAO,GAAG,IAAA,kCAAyB,EAAC,MAAM,CAAC,CAAC,MAAM,CACtD,UAAC,CAAC,IAAK,OAAA,CAAC,KAAK,OAAO,EAAb,CAAa,CACrB,CAAC;IACF,IAAM,MAAM,GAAG,kBAAW,CAAC,MAAM,CAC/B,UAAC,GAAG,EAAE,SAAS,IAAK,4DACf,GAAG;QACN,SAAS;sBACN,OAAO,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,UAAG,SAAS,cAAI,CAAC,CAAE,EAAnB,CAAmB,CAAC,WAHxB,CAInB,EACD,EAAE,CACH,CAAC;IACF,OAAO,MAAM,CAAC;AAChB,CAAC;AAbD,8CAaC"}
@@ -1,5 +1,9 @@
1
+ import { stringify } from "yaml";
1
2
  export declare const getAutoGeneratedHeader: (commentChar: string) => string;
2
3
  export declare const writeGeneratedFile: (path: string, content: string, { commentChar, }: {
3
4
  commentChar: string;
4
5
  }) => Promise<void>;
6
+ type StringifyOptions = Exclude<Parameters<typeof stringify>[2], null | undefined | string | number>;
7
+ export declare const yamlStringifyOptions: StringifyOptions;
5
8
  export declare const writeYamlfile: (path: string, data: any) => Promise<void>;
9
+ export {};
@@ -39,7 +39,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
39
39
  return (mod && mod.__esModule) ? mod : { "default": mod };
40
40
  };
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.writeYamlfile = exports.writeGeneratedFile = exports.getAutoGeneratedHeader = void 0;
42
+ exports.writeYamlfile = exports.yamlStringifyOptions = exports.writeGeneratedFile = exports.getAutoGeneratedHeader = void 0;
43
43
  var promises_1 = require("fs/promises");
44
44
  var yaml_1 = require("yaml");
45
45
  var packageInfos_1 = __importDefault(require("../packageInfos"));
@@ -71,10 +71,18 @@ var writeGeneratedFile = function (path_1, content_1, _a) { return __awaiter(voi
71
71
  });
72
72
  }); };
73
73
  exports.writeGeneratedFile = writeGeneratedFile;
74
+ exports.yamlStringifyOptions = {
75
+ // prevents colapsing long command statements into multiple lines
76
+ lineWidth: 0,
77
+ // represent multi line commands as single line json strings
78
+ doubleQuotedAsJSON: true,
79
+ // Better readability when bash commands most often use double quotes
80
+ singleQuote: true,
81
+ };
74
82
  var writeYamlfile = function (path, data) { return __awaiter(void 0, void 0, void 0, function () {
75
83
  return __generator(this, function (_a) {
76
84
  switch (_a.label) {
77
- case 0: return [4 /*yield*/, (0, exports.writeGeneratedFile)(path, (0, yaml_1.stringify)(data), {
85
+ case 0: return [4 /*yield*/, (0, exports.writeGeneratedFile)(path, (0, yaml_1.stringify)(data, exports.yamlStringifyOptions), {
78
86
  commentChar: "#",
79
87
  })];
80
88
  case 1:
@@ -1 +1 @@
1
- {"version":3,"file":"writeFiles.js","sourceRoot":"","sources":["../../../../../pipeline/src/utils/writeFiles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAAwC;AACxC,6BAAiC;AACjC,iEAA2C;AAEpC,IAAM,sBAAsB,GAAG,UAAC,WAAmB;IACxD,OAAO;QACL,mDAAmD;QACnD,yEAA8C,sBAAY,CAAC,OAAO,CAAE;QACpE,0DAAsC;QACtC,mDAAmD;KACpD;SACE,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,UAAG,WAAW,cAAI,IAAI,CAAE,EAAxB,CAAwB,CAAC;SACvC,IAAI,CAAC,IAAI,CAAC;SACV,MAAM,CAAC,IAAI,CAAC,CAAC;AAClB,CAAC,CAAC;AAVW,QAAA,sBAAsB,0BAUjC;AAEK,IAAM,kBAAkB,GAAG,uGAChC,IAAY,EACZ,OAAe,EACf,EAIC;QAHC,WAAW,iBAAA;;;oBAKb,qBAAM,IAAA,oBAAS,EACb,IAAI;gBACJ,0CAA0C;gBAC1C,CAAC,IAAA,8BAAsB,EAAC,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EACzD;oBACE,QAAQ,EAAE,OAAO;iBAClB,CACF,EAAA;;gBAPD,SAOC,CAAC;;;;KACH,CAAC;AAjBW,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