@catladder/cli 0.0.0-main-3cb199ba → 0.0.0-main-a4cbfda2

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.
@@ -38807,6 +38807,168 @@ exports.getBuildInfo = getBuildInfo;
38807
38807
 
38808
38808
  /***/ }),
38809
38809
 
38810
+ /***/ 2644:
38811
+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
38812
+
38813
+ "use strict";
38814
+
38815
+
38816
+ var __assign = this && this.__assign || function () {
38817
+ __assign = Object.assign || function (t) {
38818
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
38819
+ s = arguments[i];
38820
+
38821
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
38822
+ }
38823
+
38824
+ return t;
38825
+ };
38826
+
38827
+ return __assign.apply(this, arguments);
38828
+ };
38829
+
38830
+ var __read = this && this.__read || function (o, n) {
38831
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
38832
+ if (!m) return o;
38833
+ var i = m.call(o),
38834
+ r,
38835
+ ar = [],
38836
+ e;
38837
+
38838
+ try {
38839
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
38840
+ } catch (error) {
38841
+ e = {
38842
+ error: error
38843
+ };
38844
+ } finally {
38845
+ try {
38846
+ if (r && !r.done && (m = i["return"])) m.call(i);
38847
+ } finally {
38848
+ if (e) throw e.error;
38849
+ }
38850
+ }
38851
+
38852
+ return ar;
38853
+ };
38854
+
38855
+ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
38856
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
38857
+ if (ar || !(i in from)) {
38858
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
38859
+ ar[i] = from[i];
38860
+ }
38861
+ }
38862
+ return to.concat(ar || Array.prototype.slice.call(from));
38863
+ };
38864
+
38865
+ exports.__esModule = true;
38866
+ exports.createCustomBuildJobs = void 0;
38867
+
38868
+ var path_1 = __nccwpck_require__(1017);
38869
+
38870
+ var utils_1 = __nccwpck_require__(7461);
38871
+
38872
+ var constants_1 = __nccwpck_require__(1542);
38873
+
38874
+ var createBuildJob_1 = __nccwpck_require__(8063);
38875
+
38876
+ var docker_1 = __nccwpck_require__(3219);
38877
+
38878
+ var types_1 = __nccwpck_require__(1197);
38879
+
38880
+ var RUNNER_BUILD_VARIABLES = {
38881
+ KUBERNETES_CPU_REQUEST: "0.5",
38882
+ KUBERNETES_CPU_LIMIT: "2",
38883
+ KUBERNETES_MEMORY_REQUEST: "2Gi",
38884
+ KUBERNETES_MEMORY_LIMIT: "4Gi"
38885
+ };
38886
+
38887
+ var createCustomBuildJobs = function (context) {
38888
+ var _a, _b, _c, _d;
38889
+
38890
+ var buildConfig = context.componentConfig.build;
38891
+
38892
+ if (!(0, types_1.isOfBuildType)(buildConfig, "custom")) {
38893
+ throw new Error("deploy config is not custom");
38894
+ }
38895
+
38896
+ var appBuildJob = buildConfig.buildCommand !== null ? (0, createBuildJob_1.createBuildJob)(context, {
38897
+ image: buildConfig.jobImage,
38898
+ variables: __assign({}, RUNNER_BUILD_VARIABLES),
38899
+ script: __spreadArray([], __read((_a = (0, utils_1.ensureArray)(buildConfig.buildCommand)) !== null && _a !== void 0 ? _a : []), false),
38900
+ artifacts: {
38901
+ paths: __spreadArray([(0, path_1.join)(context.componentConfig.dir, "__build_info.json"), (0, path_1.join)(context.componentConfig.dir, "dist")], __read((_c = (_b = buildConfig.artifactsPaths) === null || _b === void 0 ? void 0 : _b.map(function (path) {
38902
+ return (0, path_1.join)(context.componentConfig.dir, path);
38903
+ })) !== null && _c !== void 0 ? _c : []), false)
38904
+ }
38905
+ }) : null;
38906
+ return __spreadArray(__spreadArray([], __read(appBuildJob ? [appBuildJob] : []), false), __read((0, docker_1.requiresDockerBuild)(context) ? [(0, docker_1.createDockerBuildJobDefault)(context, {
38907
+ script: [((_d = buildConfig.docker) === null || _d === void 0 ? void 0 : _d.type) === "nginx" ? "ensureNginxDockerfile" : "exit 0" // should not happen
38908
+ ],
38909
+ variables: {},
38910
+ needs: appBuildJob ? [constants_1.APP_BUILD_JOB_NAME] : []
38911
+ })] : []), false);
38912
+ };
38913
+
38914
+ exports.createCustomBuildJobs = createCustomBuildJobs;
38915
+
38916
+ /***/ }),
38917
+
38918
+ /***/ 3437:
38919
+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
38920
+
38921
+ "use strict";
38922
+
38923
+
38924
+ var __read = this && this.__read || function (o, n) {
38925
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
38926
+ if (!m) return o;
38927
+ var i = m.call(o),
38928
+ r,
38929
+ ar = [],
38930
+ e;
38931
+
38932
+ try {
38933
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
38934
+ } catch (error) {
38935
+ e = {
38936
+ error: error
38937
+ };
38938
+ } finally {
38939
+ try {
38940
+ if (r && !r.done && (m = i["return"])) m.call(i);
38941
+ } finally {
38942
+ if (e) throw e.error;
38943
+ }
38944
+ }
38945
+
38946
+ return ar;
38947
+ };
38948
+
38949
+ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
38950
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
38951
+ if (ar || !(i in from)) {
38952
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
38953
+ ar[i] = from[i];
38954
+ }
38955
+ }
38956
+ return to.concat(ar || Array.prototype.slice.call(from));
38957
+ };
38958
+
38959
+ exports.__esModule = true;
38960
+ exports.createCustomJobs = void 0;
38961
+
38962
+ var buildJob_1 = __nccwpck_require__(2644);
38963
+
38964
+ var createCustomJobs = function (context) {
38965
+ return __spreadArray([], __read((0, buildJob_1.createCustomBuildJobs)(context)), false);
38966
+ };
38967
+
38968
+ exports.createCustomJobs = createCustomJobs;
38969
+
38970
+ /***/ }),
38971
+
38810
38972
  /***/ 3219:
38811
38973
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
38812
38974
 
@@ -39012,6 +39174,8 @@ var __exportStar = this && this.__exportStar || function (m, exports) {
39012
39174
  exports.__esModule = true;
39013
39175
  exports.BUILD_TYPES = void 0;
39014
39176
 
39177
+ var custom_1 = __nccwpck_require__(3437);
39178
+
39015
39179
  var node_1 = __nccwpck_require__(6994);
39016
39180
 
39017
39181
  __exportStar(__nccwpck_require__(1197), exports);
@@ -39051,6 +39215,12 @@ exports.BUILD_TYPES = {
39051
39215
  startCommand: "node main.js"
39052
39216
  };
39053
39217
  }
39218
+ },
39219
+ custom: {
39220
+ jobs: custom_1.createCustomJobs,
39221
+ defaults: function () {
39222
+ return {};
39223
+ }
39054
39224
  }
39055
39225
  };
39056
39226
 
@@ -39889,7 +40059,7 @@ exports.readConfigSync = readConfigSync;
39889
40059
 
39890
40060
  exports.__esModule = true;
39891
40061
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
39892
- exports.PIPELINE_IMAGE_TAG = "main-3cb199ba" || 0;
40062
+ exports.PIPELINE_IMAGE_TAG = "main-a4cbfda2" || 0;
39893
40063
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
39894
40064
 
39895
40065
  /***/ }),
@@ -349678,6 +349678,168 @@ exports.getBuildInfo = getBuildInfo;
349678
349678
 
349679
349679
  /***/ }),
349680
349680
 
349681
+ /***/ 62644:
349682
+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
349683
+
349684
+ "use strict";
349685
+
349686
+
349687
+ var __assign = this && this.__assign || function () {
349688
+ __assign = Object.assign || function (t) {
349689
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
349690
+ s = arguments[i];
349691
+
349692
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
349693
+ }
349694
+
349695
+ return t;
349696
+ };
349697
+
349698
+ return __assign.apply(this, arguments);
349699
+ };
349700
+
349701
+ var __read = this && this.__read || function (o, n) {
349702
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
349703
+ if (!m) return o;
349704
+ var i = m.call(o),
349705
+ r,
349706
+ ar = [],
349707
+ e;
349708
+
349709
+ try {
349710
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
349711
+ } catch (error) {
349712
+ e = {
349713
+ error: error
349714
+ };
349715
+ } finally {
349716
+ try {
349717
+ if (r && !r.done && (m = i["return"])) m.call(i);
349718
+ } finally {
349719
+ if (e) throw e.error;
349720
+ }
349721
+ }
349722
+
349723
+ return ar;
349724
+ };
349725
+
349726
+ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
349727
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
349728
+ if (ar || !(i in from)) {
349729
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
349730
+ ar[i] = from[i];
349731
+ }
349732
+ }
349733
+ return to.concat(ar || Array.prototype.slice.call(from));
349734
+ };
349735
+
349736
+ exports.__esModule = true;
349737
+ exports.createCustomBuildJobs = void 0;
349738
+
349739
+ var path_1 = __nccwpck_require__(71017);
349740
+
349741
+ var utils_1 = __nccwpck_require__(37461);
349742
+
349743
+ var constants_1 = __nccwpck_require__(11542);
349744
+
349745
+ var createBuildJob_1 = __nccwpck_require__(58063);
349746
+
349747
+ var docker_1 = __nccwpck_require__(33219);
349748
+
349749
+ var types_1 = __nccwpck_require__(71197);
349750
+
349751
+ var RUNNER_BUILD_VARIABLES = {
349752
+ KUBERNETES_CPU_REQUEST: "0.5",
349753
+ KUBERNETES_CPU_LIMIT: "2",
349754
+ KUBERNETES_MEMORY_REQUEST: "2Gi",
349755
+ KUBERNETES_MEMORY_LIMIT: "4Gi"
349756
+ };
349757
+
349758
+ var createCustomBuildJobs = function (context) {
349759
+ var _a, _b, _c, _d;
349760
+
349761
+ var buildConfig = context.componentConfig.build;
349762
+
349763
+ if (!(0, types_1.isOfBuildType)(buildConfig, "custom")) {
349764
+ throw new Error("deploy config is not custom");
349765
+ }
349766
+
349767
+ var appBuildJob = buildConfig.buildCommand !== null ? (0, createBuildJob_1.createBuildJob)(context, {
349768
+ image: buildConfig.jobImage,
349769
+ variables: __assign({}, RUNNER_BUILD_VARIABLES),
349770
+ script: __spreadArray([], __read((_a = (0, utils_1.ensureArray)(buildConfig.buildCommand)) !== null && _a !== void 0 ? _a : []), false),
349771
+ artifacts: {
349772
+ paths: __spreadArray([(0, path_1.join)(context.componentConfig.dir, "__build_info.json"), (0, path_1.join)(context.componentConfig.dir, "dist")], __read((_c = (_b = buildConfig.artifactsPaths) === null || _b === void 0 ? void 0 : _b.map(function (path) {
349773
+ return (0, path_1.join)(context.componentConfig.dir, path);
349774
+ })) !== null && _c !== void 0 ? _c : []), false)
349775
+ }
349776
+ }) : null;
349777
+ return __spreadArray(__spreadArray([], __read(appBuildJob ? [appBuildJob] : []), false), __read((0, docker_1.requiresDockerBuild)(context) ? [(0, docker_1.createDockerBuildJobDefault)(context, {
349778
+ script: [((_d = buildConfig.docker) === null || _d === void 0 ? void 0 : _d.type) === "nginx" ? "ensureNginxDockerfile" : "exit 0" // should not happen
349779
+ ],
349780
+ variables: {},
349781
+ needs: appBuildJob ? [constants_1.APP_BUILD_JOB_NAME] : []
349782
+ })] : []), false);
349783
+ };
349784
+
349785
+ exports.createCustomBuildJobs = createCustomBuildJobs;
349786
+
349787
+ /***/ }),
349788
+
349789
+ /***/ 53437:
349790
+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
349791
+
349792
+ "use strict";
349793
+
349794
+
349795
+ var __read = this && this.__read || function (o, n) {
349796
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
349797
+ if (!m) return o;
349798
+ var i = m.call(o),
349799
+ r,
349800
+ ar = [],
349801
+ e;
349802
+
349803
+ try {
349804
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
349805
+ } catch (error) {
349806
+ e = {
349807
+ error: error
349808
+ };
349809
+ } finally {
349810
+ try {
349811
+ if (r && !r.done && (m = i["return"])) m.call(i);
349812
+ } finally {
349813
+ if (e) throw e.error;
349814
+ }
349815
+ }
349816
+
349817
+ return ar;
349818
+ };
349819
+
349820
+ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
349821
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
349822
+ if (ar || !(i in from)) {
349823
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
349824
+ ar[i] = from[i];
349825
+ }
349826
+ }
349827
+ return to.concat(ar || Array.prototype.slice.call(from));
349828
+ };
349829
+
349830
+ exports.__esModule = true;
349831
+ exports.createCustomJobs = void 0;
349832
+
349833
+ var buildJob_1 = __nccwpck_require__(62644);
349834
+
349835
+ var createCustomJobs = function (context) {
349836
+ return __spreadArray([], __read((0, buildJob_1.createCustomBuildJobs)(context)), false);
349837
+ };
349838
+
349839
+ exports.createCustomJobs = createCustomJobs;
349840
+
349841
+ /***/ }),
349842
+
349681
349843
  /***/ 33219:
349682
349844
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
349683
349845
 
@@ -349883,6 +350045,8 @@ var __exportStar = this && this.__exportStar || function (m, exports) {
349883
350045
  exports.__esModule = true;
349884
350046
  exports.BUILD_TYPES = void 0;
349885
350047
 
350048
+ var custom_1 = __nccwpck_require__(53437);
350049
+
349886
350050
  var node_1 = __nccwpck_require__(66994);
349887
350051
 
349888
350052
  __exportStar(__nccwpck_require__(71197), exports);
@@ -349922,6 +350086,12 @@ exports.BUILD_TYPES = {
349922
350086
  startCommand: "node main.js"
349923
350087
  };
349924
350088
  }
350089
+ },
350090
+ custom: {
350091
+ jobs: custom_1.createCustomJobs,
350092
+ defaults: function () {
350093
+ return {};
350094
+ }
349925
350095
  }
349926
350096
  };
349927
350097
 
@@ -350760,7 +350930,7 @@ exports.readConfigSync = readConfigSync;
350760
350930
 
350761
350931
  exports.__esModule = true;
350762
350932
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
350763
- exports.PIPELINE_IMAGE_TAG = "main-3cb199ba" || 0;
350933
+ exports.PIPELINE_IMAGE_TAG = "main-a4cbfda2" || 0;
350764
350934
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
350765
350935
 
350766
350936
  /***/ }),