@catladder/cli 0.0.0-next-5f70052e → 0.0.0-next-3401f823

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.
@@ -5225,7 +5225,7 @@ exports.contextIsStoppable = contextIsStoppable;
5225
5225
  "use strict";
5226
5226
 
5227
5227
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5228
- exports.COLLAPSEABLE_SECTION_END = exports.COLLAPSEABLE_SECTION_START = void 0;
5228
+ exports.registerGlobalScriptFunction = exports.globalScriptFunctions = void 0;
5229
5229
  class GlobalScriptFunction {
5230
5230
  constructor(name, script) {
5231
5231
  this.name = name;
@@ -5240,13 +5240,16 @@ class GlobalScriptFunction {
5240
5240
  return `${this.name} ${args.join(" ")}`;
5241
5241
  }
5242
5242
  }
5243
- exports.COLLAPSEABLE_SECTION_START = new GlobalScriptFunction("collapseable_section_start", `local section_title="\${1}"
5244
- local section_description="\${2:-$section_title}"
5245
- echo -e "section_start:\`date +%s\`:\${section_title}[collapsed=true]\\r\\e[0K$\{section_description}"
5246
- `);
5247
- exports.COLLAPSEABLE_SECTION_END = new GlobalScriptFunction("collapseable_section_end", `local section_title="\${1}"
5248
- echo -e "section_end:\`date +%s\`:\${section_title}\\r\\e[0K"
5249
- `);
5243
+ exports.globalScriptFunctions = new Map();
5244
+ const registerGlobalScriptFunction = (name, script) => {
5245
+ if (exports.globalScriptFunctions.has(name)) {
5246
+ throw new Error(`Global script function ${name} already exists`);
5247
+ }
5248
+ const scriptFunction = new GlobalScriptFunction(name, script);
5249
+ exports.globalScriptFunctions.set(name, scriptFunction);
5250
+ return scriptFunction;
5251
+ };
5252
+ exports.registerGlobalScriptFunction = registerGlobalScriptFunction;
5250
5253
  //# sourceMappingURL=index.js.map
5251
5254
 
5252
5255
  /***/ }),
@@ -5870,37 +5873,14 @@ function getGitlabNeedsForWorkspaceJob(context, { needsStages, needs }, allJobs)
5870
5873
  /***/ }),
5871
5874
 
5872
5875
  /***/ 6551:
5873
- /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
5876
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
5874
5877
 
5875
5878
  "use strict";
5876
5879
 
5877
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5878
- if (k2 === undefined) k2 = k;
5879
- var desc = Object.getOwnPropertyDescriptor(m, k);
5880
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
5881
- desc = { enumerable: true, get: function() { return m[k]; } };
5882
- }
5883
- Object.defineProperty(o, k2, desc);
5884
- }) : (function(o, m, k, k2) {
5885
- if (k2 === undefined) k2 = k;
5886
- o[k2] = m[k];
5887
- }));
5888
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
5889
- Object.defineProperty(o, "default", { enumerable: true, value: v });
5890
- }) : function(o, v) {
5891
- o["default"] = v;
5892
- });
5893
- var __importStar = (this && this.__importStar) || function (mod) {
5894
- if (mod && mod.__esModule) return mod;
5895
- var result = {};
5896
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
5897
- __setModuleDefault(result, mod);
5898
- return result;
5899
- };
5900
5880
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5901
5881
  exports.createGitlabPipelineWithDefaults = void 0;
5902
5882
  const runner_1 = __nccwpck_require__(4058);
5903
- const GLOBAL_SCRIPTS = __importStar(__nccwpck_require__(2912));
5883
+ const globalScriptFunctions_1 = __nccwpck_require__(2912);
5904
5884
  const createGitlabPipelineWithDefaults = ({ image, variables, before_script, ...config }) => {
5905
5885
  return {
5906
5886
  image: image !== null && image !== void 0 ? image : (0, runner_1.getRunnerImage)("jobs-default"), // default image
@@ -5913,7 +5893,7 @@ const createGitlabPipelineWithDefaults = ({ image, variables, before_script, ...
5913
5893
  ...(variables !== null && variables !== void 0 ? variables : {}),
5914
5894
  },
5915
5895
  before_script: [
5916
- ...Object.values(GLOBAL_SCRIPTS).map((script) => script.toBashFunction()),
5896
+ ...[...globalScriptFunctions_1.globalScriptFunctions.values()].map((script) => script.toBashFunction()),
5917
5897
  ...(before_script !== null && before_script !== void 0 ? before_script : []),
5918
5898
  ],
5919
5899
  ...config,
@@ -6473,11 +6453,18 @@ const repeatOnFailure = (command, options) => {
6473
6453
  `;
6474
6454
  };
6475
6455
  exports.repeatOnFailure = repeatOnFailure;
6456
+ const start = (0, globalScriptFunctions_1.registerGlobalScriptFunction)("collapseable_section_start", `local section_title="\${1}"
6457
+ local section_description="\${2:-$section_title}"
6458
+ echo -e "section_start:\`date +%s\`:\${section_title}[collapsed=true]\\r\\e[0K$\{section_description}"
6459
+ `);
6460
+ const end = (0, globalScriptFunctions_1.registerGlobalScriptFunction)("collapseable_section_end", `local section_title="\${1}"
6461
+ echo -e "section_end:\`date +%s\`:\${section_title}\\r\\e[0K"
6462
+ `);
6476
6463
  const collapseableSection = (name, header) => (commands) => {
6477
6464
  return [
6478
- globalScriptFunctions_1.COLLAPSEABLE_SECTION_START.invoke(`"${name}"`, `"${header}"`),
6465
+ start.invoke(`"${name}"`, `"${header}"`),
6479
6466
  ...commands,
6480
- globalScriptFunctions_1.COLLAPSEABLE_SECTION_END.invoke(`"${name}"`),
6467
+ end.invoke(`"${name}"`),
6481
6468
  ];
6482
6469
  };
6483
6470
  exports.collapseableSection = collapseableSection;
@@ -8391,7 +8391,7 @@ exports.contextIsStoppable = contextIsStoppable;
8391
8391
  "use strict";
8392
8392
 
8393
8393
  Object.defineProperty(exports, "__esModule", ({ value: true }));
8394
- exports.COLLAPSEABLE_SECTION_END = exports.COLLAPSEABLE_SECTION_START = void 0;
8394
+ exports.registerGlobalScriptFunction = exports.globalScriptFunctions = void 0;
8395
8395
  class GlobalScriptFunction {
8396
8396
  constructor(name, script) {
8397
8397
  this.name = name;
@@ -8406,13 +8406,16 @@ class GlobalScriptFunction {
8406
8406
  return `${this.name} ${args.join(" ")}`;
8407
8407
  }
8408
8408
  }
8409
- exports.COLLAPSEABLE_SECTION_START = new GlobalScriptFunction("collapseable_section_start", `local section_title="\${1}"
8410
- local section_description="\${2:-$section_title}"
8411
- echo -e "section_start:\`date +%s\`:\${section_title}[collapsed=true]\\r\\e[0K$\{section_description}"
8412
- `);
8413
- exports.COLLAPSEABLE_SECTION_END = new GlobalScriptFunction("collapseable_section_end", `local section_title="\${1}"
8414
- echo -e "section_end:\`date +%s\`:\${section_title}\\r\\e[0K"
8415
- `);
8409
+ exports.globalScriptFunctions = new Map();
8410
+ const registerGlobalScriptFunction = (name, script) => {
8411
+ if (exports.globalScriptFunctions.has(name)) {
8412
+ throw new Error(`Global script function ${name} already exists`);
8413
+ }
8414
+ const scriptFunction = new GlobalScriptFunction(name, script);
8415
+ exports.globalScriptFunctions.set(name, scriptFunction);
8416
+ return scriptFunction;
8417
+ };
8418
+ exports.registerGlobalScriptFunction = registerGlobalScriptFunction;
8416
8419
  //# sourceMappingURL=index.js.map
8417
8420
 
8418
8421
  /***/ }),
@@ -9036,37 +9039,14 @@ function getGitlabNeedsForWorkspaceJob(context, { needsStages, needs }, allJobs)
9036
9039
  /***/ }),
9037
9040
 
9038
9041
  /***/ 66551:
9039
- /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
9042
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
9040
9043
 
9041
9044
  "use strict";
9042
9045
 
9043
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9044
- if (k2 === undefined) k2 = k;
9045
- var desc = Object.getOwnPropertyDescriptor(m, k);
9046
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9047
- desc = { enumerable: true, get: function() { return m[k]; } };
9048
- }
9049
- Object.defineProperty(o, k2, desc);
9050
- }) : (function(o, m, k, k2) {
9051
- if (k2 === undefined) k2 = k;
9052
- o[k2] = m[k];
9053
- }));
9054
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
9055
- Object.defineProperty(o, "default", { enumerable: true, value: v });
9056
- }) : function(o, v) {
9057
- o["default"] = v;
9058
- });
9059
- var __importStar = (this && this.__importStar) || function (mod) {
9060
- if (mod && mod.__esModule) return mod;
9061
- var result = {};
9062
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
9063
- __setModuleDefault(result, mod);
9064
- return result;
9065
- };
9066
9046
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9067
9047
  exports.createGitlabPipelineWithDefaults = void 0;
9068
9048
  const runner_1 = __nccwpck_require__(4058);
9069
- const GLOBAL_SCRIPTS = __importStar(__nccwpck_require__(12912));
9049
+ const globalScriptFunctions_1 = __nccwpck_require__(12912);
9070
9050
  const createGitlabPipelineWithDefaults = ({ image, variables, before_script, ...config }) => {
9071
9051
  return {
9072
9052
  image: image !== null && image !== void 0 ? image : (0, runner_1.getRunnerImage)("jobs-default"), // default image
@@ -9079,7 +9059,7 @@ const createGitlabPipelineWithDefaults = ({ image, variables, before_script, ...
9079
9059
  ...(variables !== null && variables !== void 0 ? variables : {}),
9080
9060
  },
9081
9061
  before_script: [
9082
- ...Object.values(GLOBAL_SCRIPTS).map((script) => script.toBashFunction()),
9062
+ ...[...globalScriptFunctions_1.globalScriptFunctions.values()].map((script) => script.toBashFunction()),
9083
9063
  ...(before_script !== null && before_script !== void 0 ? before_script : []),
9084
9064
  ],
9085
9065
  ...config,
@@ -9639,11 +9619,18 @@ const repeatOnFailure = (command, options) => {
9639
9619
  `;
9640
9620
  };
9641
9621
  exports.repeatOnFailure = repeatOnFailure;
9622
+ const start = (0, globalScriptFunctions_1.registerGlobalScriptFunction)("collapseable_section_start", `local section_title="\${1}"
9623
+ local section_description="\${2:-$section_title}"
9624
+ echo -e "section_start:\`date +%s\`:\${section_title}[collapsed=true]\\r\\e[0K$\{section_description}"
9625
+ `);
9626
+ const end = (0, globalScriptFunctions_1.registerGlobalScriptFunction)("collapseable_section_end", `local section_title="\${1}"
9627
+ echo -e "section_end:\`date +%s\`:\${section_title}\\r\\e[0K"
9628
+ `);
9642
9629
  const collapseableSection = (name, header) => (commands) => {
9643
9630
  return [
9644
- globalScriptFunctions_1.COLLAPSEABLE_SECTION_START.invoke(`"${name}"`, `"${header}"`),
9631
+ start.invoke(`"${name}"`, `"${header}"`),
9645
9632
  ...commands,
9646
- globalScriptFunctions_1.COLLAPSEABLE_SECTION_END.invoke(`"${name}"`),
9633
+ end.invoke(`"${name}"`),
9647
9634
  ];
9648
9635
  };
9649
9636
  exports.collapseableSection = collapseableSection;
@@ -5,6 +5,6 @@ declare class GlobalScriptFunction {
5
5
  toBashFunction(): string;
6
6
  invoke(...args: string[]): string;
7
7
  }
8
- export declare const COLLAPSEABLE_SECTION_START: GlobalScriptFunction;
9
- export declare const COLLAPSEABLE_SECTION_END: GlobalScriptFunction;
8
+ export declare const globalScriptFunctions: Map<string, GlobalScriptFunction>;
9
+ export declare const registerGlobalScriptFunction: (name: string, script: string) => GlobalScriptFunction;
10
10
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.COLLAPSEABLE_SECTION_END = exports.COLLAPSEABLE_SECTION_START = void 0;
3
+ exports.registerGlobalScriptFunction = exports.globalScriptFunctions = void 0;
4
4
  class GlobalScriptFunction {
5
5
  constructor(name, script) {
6
6
  this.name = name;
@@ -15,11 +15,14 @@ class GlobalScriptFunction {
15
15
  return `${this.name} ${args.join(" ")}`;
16
16
  }
17
17
  }
18
- exports.COLLAPSEABLE_SECTION_START = new GlobalScriptFunction("collapseable_section_start", `local section_title="\${1}"
19
- local section_description="\${2:-$section_title}"
20
- echo -e "section_start:\`date +%s\`:\${section_title}[collapsed=true]\\r\\e[0K$\{section_description}"
21
- `);
22
- exports.COLLAPSEABLE_SECTION_END = new GlobalScriptFunction("collapseable_section_end", `local section_title="\${1}"
23
- echo -e "section_end:\`date +%s\`:\${section_title}\\r\\e[0K"
24
- `);
18
+ exports.globalScriptFunctions = new Map();
19
+ const registerGlobalScriptFunction = (name, script) => {
20
+ if (exports.globalScriptFunctions.has(name)) {
21
+ throw new Error(`Global script function ${name} already exists`);
22
+ }
23
+ const scriptFunction = new GlobalScriptFunction(name, script);
24
+ exports.globalScriptFunctions.set(name, scriptFunction);
25
+ return scriptFunction;
26
+ };
27
+ exports.registerGlobalScriptFunction = registerGlobalScriptFunction;
25
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../pipeline/src/globalScriptFunctions/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAoB;IACxB,YACS,IAAY,EACZ,MAAc;QADd,SAAI,GAAJ,IAAI,CAAQ;QACZ,WAAM,GAAN,MAAM,CAAQ;IACpB,CAAC;IAEJ,cAAc;QACZ,OAAO,YAAY,IAAI,CAAC,IAAI;cAClB,IAAI,CAAC,MAAM;UACf,CAAC;IACT,CAAC;IACD,MAAM,CAAC,GAAG,IAAc;QACtB,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IAC1C,CAAC;CACF;AAEY,QAAA,0BAA0B,GAAG,IAAI,oBAAoB,CAChE,4BAA4B,EAC5B;;;CAGD,CACA,CAAC;AAEW,QAAA,wBAAwB,GAAG,IAAI,oBAAoB,CAC9D,0BAA0B,EAC1B;;CAED,CACA,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../pipeline/src/globalScriptFunctions/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAoB;IACxB,YACS,IAAY,EACZ,MAAc;QADd,SAAI,GAAJ,IAAI,CAAQ;QACZ,WAAM,GAAN,MAAM,CAAQ;IACpB,CAAC;IAEJ,cAAc;QACZ,OAAO,YAAY,IAAI,CAAC,IAAI;cAClB,IAAI,CAAC,MAAM;UACf,CAAC;IACT,CAAC;IACD,MAAM,CAAC,GAAG,IAAc;QACtB,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IAC1C,CAAC;CACF;AAEY,QAAA,qBAAqB,GAAG,IAAI,GAAG,EAAgC,CAAC;AAEtE,MAAM,4BAA4B,GAAG,CAAC,IAAY,EAAE,MAAc,EAAE,EAAE;IAC3E,IAAI,6BAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,0BAA0B,IAAI,iBAAiB,CAAC,CAAC;IACnE,CAAC;IACD,MAAM,cAAc,GAAG,IAAI,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC9D,6BAAqB,CAAC,GAAG,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IAChD,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;AAPW,QAAA,4BAA4B,gCAOvC"}
@@ -1,31 +1,8 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.createGitlabPipelineWithDefaults = void 0;
27
4
  const runner_1 = require("../../runner");
28
- const GLOBAL_SCRIPTS = __importStar(require("../../globalScriptFunctions"));
5
+ const globalScriptFunctions_1 = require("../../globalScriptFunctions");
29
6
  const createGitlabPipelineWithDefaults = ({ image, variables, before_script, ...config }) => {
30
7
  return {
31
8
  image: image !== null && image !== void 0 ? image : (0, runner_1.getRunnerImage)("jobs-default"), // default image
@@ -38,7 +15,7 @@ const createGitlabPipelineWithDefaults = ({ image, variables, before_script, ...
38
15
  ...(variables !== null && variables !== void 0 ? variables : {}),
39
16
  },
40
17
  before_script: [
41
- ...Object.values(GLOBAL_SCRIPTS).map((script) => script.toBashFunction()),
18
+ ...[...globalScriptFunctions_1.globalScriptFunctions.values()].map((script) => script.toBashFunction()),
42
19
  ...(before_script !== null && before_script !== void 0 ? before_script : []),
43
20
  ],
44
21
  ...config,
@@ -1 +1 @@
1
- {"version":3,"file":"createGitlabPipeline.js","sourceRoot":"","sources":["../../../../../../pipeline/src/pipeline/gitlab/createGitlabPipeline.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA8C;AAE9C,4EAA8D;AAGvD,MAAM,gCAAgC,GAAG,CAAC,EAC/C,KAAK,EACL,SAAS,EACT,aAAa,EACb,GAAG,MAAM,EAIV,EAAsB,EAAE;IACvB,OAAO;QACL,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAA,uBAAc,EAAC,cAAc,CAAC,EAAE,gBAAgB;QAChE,SAAS,EAAE;YACT,cAAc,EAAE,MAAM,EAAE,uFAAuF;YAC/G,0BAA0B,EAAE,MAAM,EAAE,kCAAkC;YACtE,uBAAuB,EAAE,MAAM,EAAE,gCAAgC;YACjE,wBAAwB,EAAE,IAAI,EAAE,0EAA0E;YAE1G,SAAS,EAAE,GAAG,EAAE,yBAAyB;YACzC,GAAG,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC;SACrB;QACD,aAAa,EAAE;YACb,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;YACzE,GAAG,CAAC,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,EAAE,CAAC;SACzB;QAED,GAAG,MAAM;KACV,CAAC;AACJ,CAAC,CAAC;AA3BW,QAAA,gCAAgC,oCA2B3C"}
1
+ {"version":3,"file":"createGitlabPipeline.js","sourceRoot":"","sources":["../../../../../../pipeline/src/pipeline/gitlab/createGitlabPipeline.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAE9C,uEAAoE;AAG7D,MAAM,gCAAgC,GAAG,CAAC,EAC/C,KAAK,EACL,SAAS,EACT,aAAa,EACb,GAAG,MAAM,EAIV,EAAsB,EAAE;IACvB,OAAO;QACL,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAA,uBAAc,EAAC,cAAc,CAAC,EAAE,gBAAgB;QAChE,SAAS,EAAE;YACT,cAAc,EAAE,MAAM,EAAE,uFAAuF;YAC/G,0BAA0B,EAAE,MAAM,EAAE,kCAAkC;YACtE,uBAAuB,EAAE,MAAM,EAAE,gCAAgC;YACjE,wBAAwB,EAAE,IAAI,EAAE,0EAA0E;YAE1G,SAAS,EAAE,GAAG,EAAE,yBAAyB;YACzC,GAAG,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC;SACrB;QACD,aAAa,EAAE;YACb,GAAG,CAAC,GAAG,6CAAqB,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CACpD,MAAM,CAAC,cAAc,EAAE,CACxB;YACD,GAAG,CAAC,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,EAAE,CAAC;SACzB;QAED,GAAG,MAAM;KACV,CAAC;AACJ,CAAC,CAAC;AA7BW,QAAA,gCAAgC,oCA6B3C"}
@@ -20,11 +20,18 @@ const repeatOnFailure = (command, options) => {
20
20
  `;
21
21
  };
22
22
  exports.repeatOnFailure = repeatOnFailure;
23
+ const start = (0, globalScriptFunctions_1.registerGlobalScriptFunction)("collapseable_section_start", `local section_title="\${1}"
24
+ local section_description="\${2:-$section_title}"
25
+ echo -e "section_start:\`date +%s\`:\${section_title}[collapsed=true]\\r\\e[0K$\{section_description}"
26
+ `);
27
+ const end = (0, globalScriptFunctions_1.registerGlobalScriptFunction)("collapseable_section_end", `local section_title="\${1}"
28
+ echo -e "section_end:\`date +%s\`:\${section_title}\\r\\e[0K"
29
+ `);
23
30
  const collapseableSection = (name, header) => (commands) => {
24
31
  return [
25
- globalScriptFunctions_1.COLLAPSEABLE_SECTION_START.invoke(`"${name}"`, `"${header}"`),
32
+ start.invoke(`"${name}"`, `"${header}"`),
26
33
  ...commands,
27
- globalScriptFunctions_1.COLLAPSEABLE_SECTION_END.invoke(`"${name}"`),
34
+ end.invoke(`"${name}"`),
28
35
  ];
29
36
  };
30
37
  exports.collapseableSection = collapseableSection;
@@ -1 +1 @@
1
- {"version":3,"file":"gitlab.js","sourceRoot":"","sources":["../../../../../pipeline/src/utils/gitlab.ts"],"names":[],"mappings":";;;AAAA,oEAGkC;AAE3B,MAAM,qBAAqB,GAAG,CAAC,MAAgB,EAAY,EAAE,CAAC;IACnE,QAAQ,EAAE,4BAA4B;IACtC,GAAG,MAAM;IACT,QAAQ,EAAE,WAAW;CACtB,CAAC;AAJW,QAAA,qBAAqB,yBAIhC;AAEK,MAAM,uBAAuB,GAAG,CAAC,IAAY,EAAE,EAAE,CACtD,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AADb,QAAA,uBAAuB,2BACV;AAEnB,MAAM,eAAe,GAAG,CAC7B,OAAe,EACf,OAEC,EACO,EAAE;IACV,OAAO;YACG,OAAO;;;cAGL,OAAO,CAAC,cAAc;;GAEjC,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,eAAe,mBAa1B;AAEK,MAAM,mBAAmB,GAC9B,CAAC,IAAY,EAAE,MAAc,EAAE,EAAE,CACjC,CAAC,QAAkB,EAAY,EAAE;IAC/B,OAAO;QACL,kDAA0B,CAAC,MAAM,CAAC,IAAI,IAAI,GAAG,EAAE,IAAI,MAAM,GAAG,CAAC;QAC7D,GAAG,QAAQ;QACX,gDAAwB,CAAC,MAAM,CAAC,IAAI,IAAI,GAAG,CAAC;KAC7C,CAAC;AACJ,CAAC,CAAC;AARS,QAAA,mBAAmB,uBAQ5B"}
1
+ {"version":3,"file":"gitlab.js","sourceRoot":"","sources":["../../../../../pipeline/src/utils/gitlab.ts"],"names":[],"mappings":";;;AAAA,oEAAwE;AAEjE,MAAM,qBAAqB,GAAG,CAAC,MAAgB,EAAY,EAAE,CAAC;IACnE,QAAQ,EAAE,4BAA4B;IACtC,GAAG,MAAM;IACT,QAAQ,EAAE,WAAW;CACtB,CAAC;AAJW,QAAA,qBAAqB,yBAIhC;AAEK,MAAM,uBAAuB,GAAG,CAAC,IAAY,EAAE,EAAE,CACtD,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AADb,QAAA,uBAAuB,2BACV;AAEnB,MAAM,eAAe,GAAG,CAC7B,OAAe,EACf,OAEC,EACO,EAAE;IACV,OAAO;YACG,OAAO;;;cAGL,OAAO,CAAC,cAAc;;GAEjC,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,eAAe,mBAa1B;AAEF,MAAM,KAAK,GAAG,IAAA,oDAA4B,EACxC,4BAA4B,EAC5B;;;CAGD,CACA,CAAC;AAEF,MAAM,GAAG,GAAG,IAAA,oDAA4B,EACtC,0BAA0B,EAC1B;;CAED,CACA,CAAC;AAEK,MAAM,mBAAmB,GAC9B,CAAC,IAAY,EAAE,MAAc,EAAE,EAAE,CACjC,CAAC,QAAkB,EAAY,EAAE;IAC/B,OAAO;QACL,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,GAAG,EAAE,IAAI,MAAM,GAAG,CAAC;QACxC,GAAG,QAAQ;QACX,GAAG,CAAC,MAAM,CAAC,IAAI,IAAI,GAAG,CAAC;KACxB,CAAC;AACJ,CAAC,CAAC;AARS,QAAA,mBAAmB,uBAQ5B"}