@catladder/cli 0.0.0-pipeline-variables-b2e3358e → 0.0.0-pipeline-variables-cd7d8402

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.
@@ -41220,7 +41220,7 @@ exports.readConfigSync = readConfigSync;
41220
41220
 
41221
41221
  exports.__esModule = true;
41222
41222
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
41223
- exports.PIPELINE_IMAGE_TAG = "pipeline-variables-b2e3358e" || 0;
41223
+ exports.PIPELINE_IMAGE_TAG = "pipeline-variables-cd7d8402" || 0;
41224
41224
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
41225
41225
 
41226
41226
  /***/ }),
@@ -43469,6 +43469,7 @@ var cloudRunJobs_1 = __nccwpck_require__(6321);
43469
43469
  var cloudRunServices_1 = __nccwpck_require__(7210);
43470
43470
  var common_1 = __nccwpck_require__(5655);
43471
43471
  var __1 = __nccwpck_require__(1344);
43472
+ var BashExpression_1 = __nccwpck_require__(1248);
43472
43473
  var constants_1 = __nccwpck_require__(9948);
43473
43474
  function getCloudRunDeployScripts(context) {
43474
43475
  var _a;
@@ -43493,10 +43494,17 @@ var writeEnvVarsIntoJSONFileScript = function (vars, filename) {
43493
43494
  value = _b[1];
43494
43495
  // we use yaml block literal to preserve newlines so we don't need to escape anything
43495
43496
  // then we indent each line of the value
43496
- return "printf \"%s: |\n%s\n\" \"".concat(key, "\" \"$(printf %s \"").concat(value.toString(), "\" | sed 's/^/ /')\" > ").concat(filename);
43497
+ return "printf \"%s: |\n%s\n\" \"".concat(key, "\" \"$(printf %s ").concat(bashEscape(value), " | sed 's/^/ /')\" >> ").concat(filename);
43497
43498
  })), false);
43498
43499
  return result;
43499
43500
  };
43501
+ var bashEscape = function (value) {
43502
+ if (value instanceof BashExpression_1.BashExpression) {
43503
+ return "\"".concat(value.toString(), "\""); // simply wrap it in double quotes is ok
43504
+ }
43505
+ // non-bash-expressions should interpreted literally, so we put them in single quotes, but we need to escape single quotes
43506
+ return "'".concat(value.replace(/'/g, "'\\''"), "'");
43507
+ };
43500
43508
 
43501
43509
  /***/ }),
43502
43510
 
@@ -356152,7 +356152,7 @@ exports.readConfigSync = readConfigSync;
356152
356152
 
356153
356153
  exports.__esModule = true;
356154
356154
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
356155
- exports.PIPELINE_IMAGE_TAG = "pipeline-variables-b2e3358e" || 0;
356155
+ exports.PIPELINE_IMAGE_TAG = "pipeline-variables-cd7d8402" || 0;
356156
356156
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
356157
356157
 
356158
356158
  /***/ }),
@@ -358401,6 +358401,7 @@ var cloudRunJobs_1 = __nccwpck_require__(66321);
358401
358401
  var cloudRunServices_1 = __nccwpck_require__(77210);
358402
358402
  var common_1 = __nccwpck_require__(75655);
358403
358403
  var __1 = __nccwpck_require__(81344);
358404
+ var BashExpression_1 = __nccwpck_require__(51248);
358404
358405
  var constants_1 = __nccwpck_require__(79948);
358405
358406
  function getCloudRunDeployScripts(context) {
358406
358407
  var _a;
@@ -358425,10 +358426,17 @@ var writeEnvVarsIntoJSONFileScript = function (vars, filename) {
358425
358426
  value = _b[1];
358426
358427
  // we use yaml block literal to preserve newlines so we don't need to escape anything
358427
358428
  // then we indent each line of the value
358428
- return "printf \"%s: |\n%s\n\" \"".concat(key, "\" \"$(printf %s \"").concat(value.toString(), "\" | sed 's/^/ /')\" > ").concat(filename);
358429
+ return "printf \"%s: |\n%s\n\" \"".concat(key, "\" \"$(printf %s ").concat(bashEscape(value), " | sed 's/^/ /')\" >> ").concat(filename);
358429
358430
  })), false);
358430
358431
  return result;
358431
358432
  };
358433
+ var bashEscape = function (value) {
358434
+ if (value instanceof BashExpression_1.BashExpression) {
358435
+ return "\"".concat(value.toString(), "\""); // simply wrap it in double quotes is ok
358436
+ }
358437
+ // non-bash-expressions should interpreted literally, so we put them in single quotes, but we need to escape single quotes
358438
+ return "'".concat(value.replace(/'/g, "'\\''"), "'");
358439
+ };
358432
358440
 
358433
358441
  /***/ }),
358434
358442
 
package/package.json CHANGED
@@ -52,7 +52,7 @@
52
52
  }
53
53
  ],
54
54
  "license": "MIT",
55
- "version": "0.0.0-pipeline-variables-b2e3358e",
55
+ "version": "0.0.0-pipeline-variables-cd7d8402",
56
56
  "scripts": {
57
57
  "lint": "eslint \"src/**/*.ts\"",
58
58
  "lint:fix": "eslint \"src/**/*.ts\" --fix",
@@ -74,7 +74,7 @@
74
74
  "ts-node": "^10.9.1"
75
75
  },
76
76
  "devDependencies": {
77
- "@catladder/pipeline": "0.0.0-pipeline-variables-b2e3358e",
77
+ "@catladder/pipeline": "0.0.0-pipeline-variables-cd7d8402",
78
78
  "@gitbeaker/rest": "^39.28.0",
79
79
  "@kubernetes/client-node": "^0.16.2",
80
80
  "@tsconfig/node14": "^1.0.1",