@catladder/cli 0.0.0-fix-minor-catenv-command-fixes-78d05852 → 0.0.0-fix-cloud-run-memory-cpu-3ff798ea
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/dist/apps/catci/commands/security/topics.json +5 -0
- package/dist/apps/catenv/catenv.d.ts +2 -1
- package/dist/apps/catenv/catenv.js +2 -4
- package/dist/apps/catenv/catenv.js.map +1 -1
- package/dist/apps/catenv/writeDotEnvFiles.js +1 -1
- package/dist/apps/catenv/writeDotEnvFiles.js.map +1 -1
- package/dist/bundles/catci/index.js +2 -2
- package/dist/bundles/catenv/index.js +116 -62
- package/dist/bundles/cli/index.js +112 -8
- package/dist/catenv.js +3 -1
- package/dist/catenv.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -3
- package/src/apps/catci/commands/security/topics.json +5 -0
- package/src/apps/catenv/catenv.ts +6 -8
- package/src/apps/catenv/writeDotEnvFiles.ts +1 -1
- package/src/catenv.ts +6 -2
- package/dist/config/parseChoiceArgument.d.ts +0 -13
- package/dist/config/parseChoiceArgument.js +0 -43
- package/dist/config/parseChoiceArgument.js.map +0 -1
- package/src/config/parseChoiceArgument.ts +0 -50
|
@@ -14,6 +14,11 @@
|
|
|
14
14
|
"responsibles": 1,
|
|
15
15
|
"more": ""
|
|
16
16
|
},
|
|
17
|
+
{
|
|
18
|
+
"description": "No sensitive information (passwords, keys, user data, ...) is logged or traced",
|
|
19
|
+
"responsibles": 1,
|
|
20
|
+
"more": "[Logging guide](https://www.notion.so/panterch/Long-story-logging-022722bb878f4724ae5b49e17667b630?pvs=4#9e5a36b7158a4953b73ec6a345bd8989), [Tracing guide](https://www.notion.so/panterch/Long-story-tracing-d8a9ec1ac2ff4fa78cefa8991233224e?pvs=4#535121b5bf9741fbaf8654b4b64d879d)"
|
|
21
|
+
},
|
|
17
22
|
{
|
|
18
23
|
"description": "Passwords are stored hashed with salt and salt is not stored in the repository",
|
|
19
24
|
"responsibles": 1,
|
|
@@ -37,12 +37,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
exports.__esModule = true;
|
|
39
39
|
var getProjectConfig_1 = require("../../config/getProjectConfig");
|
|
40
|
-
var parseChoiceArgument_1 = require("../../config/parseChoiceArgument");
|
|
41
40
|
var printVariables_1 = require("./printVariables");
|
|
42
41
|
var writeDotEnvFiles_1 = require("./writeDotEnvFiles");
|
|
43
42
|
var writeEnvDTs_1 = require("./writeEnvDTs");
|
|
44
|
-
exports["default"] = (function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
45
|
-
var config
|
|
43
|
+
exports["default"] = (function (choice) { return __awaiter(void 0, void 0, void 0, function () {
|
|
44
|
+
var config;
|
|
46
45
|
return __generator(this, function (_a) {
|
|
47
46
|
switch (_a.label) {
|
|
48
47
|
case 0: return [4 /*yield*/, (0, getProjectConfig_1.getProjectConfig)()];
|
|
@@ -51,7 +50,6 @@ exports["default"] = (function () { return __awaiter(void 0, void 0, void 0, fun
|
|
|
51
50
|
if (!config) {
|
|
52
51
|
return [2 /*return*/];
|
|
53
52
|
}
|
|
54
|
-
choice = (0, parseChoiceArgument_1.parseChoiceArgument)(config);
|
|
55
53
|
return [4 /*yield*/, (0, printVariables_1.printVariables)(config, choice)];
|
|
56
54
|
case 2:
|
|
57
55
|
_a.sent();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catenv.js","sourceRoot":"","sources":["../../../src/apps/catenv/catenv.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAiE;AACjE,
|
|
1
|
+
{"version":3,"file":"catenv.js","sourceRoot":"","sources":["../../../src/apps/catenv/catenv.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAiE;AACjE,mDAAkD;AAElD,uDAAsD;AACtD,6CAA8C;AAE9C,sBAAe,UAAO,MAAe;;;;oBACpB,qBAAM,IAAA,mCAAgB,GAAE,EAAA;;gBAAjC,MAAM,GAAG,SAAwB;gBACvC,IAAI,CAAC,MAAM,EAAE;oBACX,sBAAO;iBACR;gBAED,qBAAM,IAAA,+BAAc,EAAC,MAAM,EAAE,MAAM,CAAC,EAAA;;gBAApC,SAAoC,CAAC;gBAErC,qBAAM,IAAA,mCAAgB,EAAC,MAAM,EAAE,MAAM,CAAC,EAAA;;gBAAtC,SAAsC,CAAC;gBAEvC,qBAAM,IAAA,2BAAa,EAAC,MAAM,EAAE,MAAM,CAAC,EAAA;;gBAAnC,SAAmC,CAAC;;;;KACrC,EAAC"}
|
|
@@ -53,7 +53,7 @@ var writeDotEnvFiles = function (config, choice) { return __awaiter(void 0, void
|
|
|
53
53
|
.filter(function (_a) {
|
|
54
54
|
var component = _a[1];
|
|
55
55
|
return component === null || component === void 0 ? void 0 : component.dotEnv;
|
|
56
|
-
})
|
|
56
|
+
}) // when set to true or "local"
|
|
57
57
|
.map(function (_a) {
|
|
58
58
|
var componentName = _a[0];
|
|
59
59
|
return componentName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeDotEnvFiles.js","sourceRoot":"","sources":["../../../src/apps/catenv/writeDotEnvFiles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,qCAAqC;AACrC,6BAA4B;AAC5B,kEAAmE;AACnE,iDAAkD;AAElD,iCAKiB;AAEV,IAAM,gBAAgB,GAAG,UAAO,MAAc,EAAE,MAAe;;;;oBAClC,qBAAM,IAAA,2CAAmC,EACzE,MAAM,EACN,MAAM,CACP,EAAA;;gBAHK,KAA4B,SAGjC,EAHO,GAAG,SAAA,EAAE,gBAAgB,sBAAA;gBAKvB,gCAAgC,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC;qBACvE,MAAM,CAAC,UAAC,EAAa;wBAAV,SAAS,QAAA;oBAAM,OAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,MAAM;gBAAjB,CAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"writeDotEnvFiles.js","sourceRoot":"","sources":["../../../src/apps/catenv/writeDotEnvFiles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,qCAAqC;AACrC,6BAA4B;AAC5B,kEAAmE;AACnE,iDAAkD;AAElD,iCAKiB;AAEV,IAAM,gBAAgB,GAAG,UAAO,MAAc,EAAE,MAAe;;;;oBAClC,qBAAM,IAAA,2CAAmC,EACzE,MAAM,EACN,MAAM,CACP,EAAA;;gBAHK,KAA4B,SAGjC,EAHO,GAAG,SAAA,EAAE,gBAAgB,sBAAA;gBAKvB,gCAAgC,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC;qBACvE,MAAM,CAAC,UAAC,EAAa;wBAAV,SAAS,QAAA;oBAAM,OAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,MAAM;gBAAjB,CAAiB,CAAC,CAAC,8BAA8B;qBAC3E,GAAG,CAAC,UAAC,EAAe;wBAAd,aAAa,QAAA;oBAAM,OAAA,aAAa;gBAAb,CAAa,CAAC,CAAC;gBAErC,kCAAkC,GAAG,gBAAgB;oBACzD,CAAC,CAAC,gCAAgC,CAAC,QAAQ,CAAC,gBAAgB,CAAC;wBAC3D,CAAC,CAAC,CAAC,gBAAgB,CAAC;wBACpB,CAAC,CAAC,EAAE;oBACN,CAAC,CAAC,gCAAgC,CAAC;gBACrB,qBAAM,IAAA,qBAAU,GAAE,EAAA;;gBAA5B,OAAO,GAAG,SAAkB;sBAE4B,EAAlC,yEAAkC;;;qBAAlC,CAAA,gDAAkC,CAAA;gBAAnD,aAAa;gBACJ,qBAAM,IAAA,qCAAkB,EAAC,IAAI,EAAE,GAAG,EAAE,aAAa,CAAC,EAAA;;gBAA9D,SAAS,GAAG,SAAkD;gBACpE,OAAO,SAAS,CAAC,mBAAmB,CAAC,CAAC;gBAChC,YAAY,GAAG,IAAA,4BAAoB,EAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;gBACpE,QAAQ,GAAG,IAAA,WAAI,EAAC,YAAY,EAAE,MAAM,CAAC,CAAC;gBAEtC,kBAAkB,GAAG,IAAA,yBAAiB,EAAC,SAAS,CAAC,CAAC;gBACxD,qBAAM,IAAA,oBAAS,EACb,QAAQ,EACR,0DAA0D;wBACxD,IAAA,0BAAkB,EAAC,kBAAkB,CAAC,CACzC,EAAA;;gBAJD,SAIC,CAAC;;;gBAXwB,IAAkC,CAAA;;;;;KAa/D,CAAC;AA9BW,QAAA,gBAAgB,oBA8B3B"}
|
|
@@ -71253,7 +71253,7 @@ exports.toString = toString;
|
|
|
71253
71253
|
/***/ ((module) => {
|
|
71254
71254
|
|
|
71255
71255
|
"use strict";
|
|
71256
|
-
module.exports = JSON.parse('[{"description":"No API keys or secrets are stored in repository","responsibles":1,"more":""},{"description":"The app does not provide password login","responsibles":1,"more":""},{"description":"Passwords are not stored","responsibles":1,"more":""},{"description":"Passwords are stored hashed with salt and salt is not stored in the repository","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/hash.md)"},{"description":"Input that ends up in DOM is properly sanitized","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/xss.md)"},{"description":"All user inputs have reasonable validations","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/validation.md)"},{"description":"The app is not using cookies","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"The app is using cookies and cookies are properly configured","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"The app uses JWT with a secret and the secret is not stored in the repository","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"Authorization and user roles (RBAC) were reviewed thoroughly","responsibles":2,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/authorization.md)"},{"description":"CORS headers do not use `*`","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cors.md)"},{"description":"CSP headers are properly configured (no `unsafe-inline` or `unsafe-eval`)","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/csp.md)"},{"description":"DoS defense mechanism is implemented","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/dos.md)"},{"description":"YAML/XML parsing is not used or used YAML/XML parsers have disabled DTD","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/dos.md)"},{"description":"The app implements CSRF prevention","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/csrf.md)"},{"description":"The app has a rate limitter","responsibles":1,"more":""},{"description":"The app has disabled GraphQL introspection and schema registry","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/graphql.md)"},{"description":"The app has set GraphQL complexity query limits","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/graphql.md)"},{"description":"`sitemap.xml` does not leak any routes with sensitive data","responsibles":1,"more":""},{"description":"Cloud storage is (private) configured to not leak any sensitive data publicly","responsibles":1,"more":""},{"description":"Security Dashboard checks weekly vulnerable dependencies https://dep.panter.swiss/","responsibles":1,"more":""},{"description":"The app has `.well-known/security.txt` https://securitytxt.org/","responsibles":1,"more":""}]');
|
|
71256
|
+
module.exports = JSON.parse('[{"description":"No API keys or secrets are stored in repository","responsibles":1,"more":""},{"description":"The app does not provide password login","responsibles":1,"more":""},{"description":"Passwords are not stored","responsibles":1,"more":""},{"description":"No sensitive information (passwords, keys, user data, ...) is logged or traced","responsibles":1,"more":"[Logging guide](https://www.notion.so/panterch/Long-story-logging-022722bb878f4724ae5b49e17667b630?pvs=4#9e5a36b7158a4953b73ec6a345bd8989), [Tracing guide](https://www.notion.so/panterch/Long-story-tracing-d8a9ec1ac2ff4fa78cefa8991233224e?pvs=4#535121b5bf9741fbaf8654b4b64d879d)"},{"description":"Passwords are stored hashed with salt and salt is not stored in the repository","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/hash.md)"},{"description":"Input that ends up in DOM is properly sanitized","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/xss.md)"},{"description":"All user inputs have reasonable validations","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/validation.md)"},{"description":"The app is not using cookies","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"The app is using cookies and cookies are properly configured","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"The app uses JWT with a secret and the secret is not stored in the repository","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"Authorization and user roles (RBAC) were reviewed thoroughly","responsibles":2,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/authorization.md)"},{"description":"CORS headers do not use `*`","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cors.md)"},{"description":"CSP headers are properly configured (no `unsafe-inline` or `unsafe-eval`)","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/csp.md)"},{"description":"DoS defense mechanism is implemented","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/dos.md)"},{"description":"YAML/XML parsing is not used or used YAML/XML parsers have disabled DTD","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/dos.md)"},{"description":"The app implements CSRF prevention","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/csrf.md)"},{"description":"The app has a rate limitter","responsibles":1,"more":""},{"description":"The app has disabled GraphQL introspection and schema registry","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/graphql.md)"},{"description":"The app has set GraphQL complexity query limits","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/graphql.md)"},{"description":"`sitemap.xml` does not leak any routes with sensitive data","responsibles":1,"more":""},{"description":"Cloud storage is (private) configured to not leak any sensitive data publicly","responsibles":1,"more":""},{"description":"Security Dashboard checks weekly vulnerable dependencies https://dep.panter.swiss/","responsibles":1,"more":""},{"description":"The app has `.well-known/security.txt` https://securitytxt.org/","responsibles":1,"more":""}]');
|
|
71257
71257
|
|
|
71258
71258
|
/***/ }),
|
|
71259
71259
|
|
|
@@ -71261,7 +71261,7 @@ module.exports = JSON.parse('[{"description":"No API keys or secrets are stored
|
|
|
71261
71261
|
/***/ ((module) => {
|
|
71262
71262
|
|
|
71263
71263
|
"use strict";
|
|
71264
|
-
module.exports = JSON.parse('{"name":"@catladder/cli","description":"Panter cli tool for Kubernetes","author":"Marco Wettstein <maw@panter.ch>","homepage":"https://git.panter.ch/catladder/catladder/#readme","bugs":"https://git.panter.ch/catladder/catladder/issues","repository":{"type":"git","url":"git+https://git.panter.ch/catladder/catladder.git","directory":"cli"},"keywords":["GitLab","cloud","cli","gitlab-ci","ci/cd","pipeline","deployment","devops","automation","typescript"],"contributors":[{"name":"Marco Wettstein","email":"maw@panter.ch"},{"name":"Michael Leu","email":"leu@panter.ch"},{"name":"Luboš Matejčík","email":"lma@panter.ch"},{"name":"Kaspar Vollenweider","email":"vok@panter.ch"},{"name":"Silvan Adrian","email":"sia@panter.ch"},{"name":"Stefan Bakocs","email":"stb@panter.ch"},{"name":"Lukas Brezina","email":"brl@panter.ch"}],"license":"MIT","version":"0.0.0","scripts":{"lint":"eslint \\"src/**/*.ts\\"","lint:fix":"eslint \\"src/**/*.ts\\" --fix","test":"yarn run lint","build":"yarn build:compile && yarn build:bundle","build:bundle":"./scripts/bundle","build:compile":"yarn tsc","build:watch":"yarn tsc -w"},"bin":{"catci":"./bin/catci","catenv":"./bin/catenv","catladder":"./bin/catladder"},"engines":{"node":">=12.0.0"},"dependencies":{"ts-node":"^10.9.1"},"devDependencies":{"@catladder/pipeline":"0.0.0","@gitbeaker/rest":"^39.28.0","@kubernetes/client-node":"^0.16.2","@tsconfig/node14":"^1.0.1","@types/common-tags":"^1.8.0","@types/fs-extra":"^5.0.4","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.185","@types/memoizee":"^0.4.2","@types/node-fetch":"^2.1.4","@types/request":"^2.48.1","@types/tmp":"^0.2.3","@types/update-notifier":"^2.5.0","@types/vorpal":"^1.12.0","@types/websocket":"^0.0.40","@types/yargs":"^13.0.0","child-process-promise":"^2.2.1","clipboardy":"^2.0.0","command-exists-promise":"^2.0.2","common-tags":"^1.8.0","connection-string-parser":"^1.0.4","dayjs":"^1.10.4","eslint":"^8.7.0","fs-extra":"^7.0.1","gitlab":"^4.4.1","js-yaml":"^4.1.0","lodash":"^4.17.21","memoizee":"^0.4.14","node-fetch":"^2.3.0","open":"^8.4.0","prettier":"^2.5.1","
|
|
71264
|
+
module.exports = JSON.parse('{"name":"@catladder/cli","description":"Panter cli tool for Kubernetes","author":"Marco Wettstein <maw@panter.ch>","homepage":"https://git.panter.ch/catladder/catladder/#readme","bugs":"https://git.panter.ch/catladder/catladder/issues","repository":{"type":"git","url":"git+https://git.panter.ch/catladder/catladder.git","directory":"cli"},"keywords":["GitLab","cloud","cli","gitlab-ci","ci/cd","pipeline","deployment","devops","automation","typescript"],"contributors":[{"name":"Marco Wettstein","email":"maw@panter.ch"},{"name":"Michael Leu","email":"leu@panter.ch"},{"name":"Luboš Matejčík","email":"lma@panter.ch"},{"name":"Kaspar Vollenweider","email":"vok@panter.ch"},{"name":"Silvan Adrian","email":"sia@panter.ch"},{"name":"Stefan Bakocs","email":"stb@panter.ch"},{"name":"Lukas Brezina","email":"brl@panter.ch"}],"license":"MIT","version":"0.0.0","scripts":{"lint":"eslint \\"src/**/*.ts\\"","lint:fix":"eslint \\"src/**/*.ts\\" --fix","test":"yarn run lint","build":"yarn build:compile && yarn build:bundle","build:bundle":"./scripts/bundle","build:compile":"yarn tsc","build:watch":"yarn tsc -w"},"bin":{"catci":"./bin/catci","catenv":"./bin/catenv","catladder":"./bin/catladder"},"engines":{"node":">=12.0.0"},"dependencies":{"ts-node":"^10.9.1"},"devDependencies":{"@catladder/pipeline":"0.0.0","@gitbeaker/rest":"^39.28.0","@kubernetes/client-node":"^0.16.2","@tsconfig/node14":"^1.0.1","@types/common-tags":"^1.8.0","@types/fs-extra":"^5.0.4","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.185","@types/memoizee":"^0.4.2","@types/node-fetch":"^2.1.4","@types/request":"^2.48.1","@types/tmp":"^0.2.3","@types/update-notifier":"^2.5.0","@types/vorpal":"^1.12.0","@types/websocket":"^0.0.40","@types/yargs":"^13.0.0","child-process-promise":"^2.2.1","clipboardy":"^2.0.0","command-exists-promise":"^2.0.2","common-tags":"^1.8.0","connection-string-parser":"^1.0.4","dayjs":"^1.10.4","eslint":"^8.7.0","fs-extra":"^7.0.1","gitlab":"^4.4.1","js-yaml":"^4.1.0","lodash":"^4.17.21","memoizee":"^0.4.14","node-fetch":"^2.3.0","open":"^8.4.0","prettier":"^2.5.1","tmp-promise":"^2.0.2","ts-results-es":"^4.1.0-alpha.1","typescript":"^4.5.4","vorpal":"^1.12.0"}}');
|
|
71265
71265
|
|
|
71266
71266
|
/***/ })
|
|
71267
71267
|
|
|
@@ -44,12 +44,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
44
44
|
};
|
|
45
45
|
exports.__esModule = true;
|
|
46
46
|
var getProjectConfig_1 = __nccwpck_require__(4146);
|
|
47
|
-
var parseChoiceArgument_1 = __nccwpck_require__(3008);
|
|
48
47
|
var printVariables_1 = __nccwpck_require__(7770);
|
|
49
48
|
var writeDotEnvFiles_1 = __nccwpck_require__(4295);
|
|
50
49
|
var writeEnvDTs_1 = __nccwpck_require__(4615);
|
|
51
|
-
exports["default"] = (function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
52
|
-
var config
|
|
50
|
+
exports["default"] = (function (choice) { return __awaiter(void 0, void 0, void 0, function () {
|
|
51
|
+
var config;
|
|
53
52
|
return __generator(this, function (_a) {
|
|
54
53
|
switch (_a.label) {
|
|
55
54
|
case 0: return [4 /*yield*/, (0, getProjectConfig_1.getProjectConfig)()];
|
|
@@ -58,7 +57,6 @@ exports["default"] = (function () { return __awaiter(void 0, void 0, void 0, fun
|
|
|
58
57
|
if (!config) {
|
|
59
58
|
return [2 /*return*/];
|
|
60
59
|
}
|
|
61
|
-
choice = (0, parseChoiceArgument_1.parseChoiceArgument)(config);
|
|
62
60
|
return [4 /*yield*/, (0, printVariables_1.printVariables)(config, choice)];
|
|
63
61
|
case 2:
|
|
64
62
|
_a.sent();
|
|
@@ -372,7 +370,7 @@ var writeDotEnvFiles = function (config, choice) { return __awaiter(void 0, void
|
|
|
372
370
|
.filter(function (_a) {
|
|
373
371
|
var component = _a[1];
|
|
374
372
|
return component === null || component === void 0 ? void 0 : component.dotEnv;
|
|
375
|
-
})
|
|
373
|
+
}) // when set to true or "local"
|
|
376
374
|
.map(function (_a) {
|
|
377
375
|
var componentName = _a[0];
|
|
378
376
|
return componentName;
|
|
@@ -545,7 +543,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
545
543
|
};
|
|
546
544
|
exports.__esModule = true;
|
|
547
545
|
var catenv_1 = __importDefault(__nccwpck_require__(3073));
|
|
548
|
-
|
|
546
|
+
var parseChoice_1 = __nccwpck_require__(3319);
|
|
547
|
+
var choice = process.argv[2] ? (0, parseChoice_1.parseChoice)(process.argv[2]) : null;
|
|
548
|
+
(0, catenv_1["default"])(choice).then(function () {
|
|
549
549
|
// we have to exit manually, because we have some file watches
|
|
550
550
|
process.exit();
|
|
551
551
|
});
|
|
@@ -886,56 +886,6 @@ exports.parseChoice = parseChoice;
|
|
|
886
886
|
|
|
887
887
|
/***/ }),
|
|
888
888
|
|
|
889
|
-
/***/ 3008:
|
|
890
|
-
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
891
|
-
|
|
892
|
-
"use strict";
|
|
893
|
-
|
|
894
|
-
exports.__esModule = true;
|
|
895
|
-
exports.parseChoiceArgument = exports.getEnvComponentArgument = void 0;
|
|
896
|
-
var pipeline_1 = __nccwpck_require__(5355);
|
|
897
|
-
var envTypes = Object.keys(pipeline_1.ENV_TYPES);
|
|
898
|
-
var getEnvComponentArgument = function () {
|
|
899
|
-
var _a;
|
|
900
|
-
var componentMatch = "([a-zA-Z0-9_-]+)";
|
|
901
|
-
var argRegexp = new RegExp("^((".concat(envTypes.join('|'), "):").concat(componentMatch, "|").concat(componentMatch, ")$"));
|
|
902
|
-
var envComponent = (_a = process.argv[2]) !== null && _a !== void 0 ? _a : '';
|
|
903
|
-
var _b = argRegexp.exec(envComponent), _c = _b[2], env = _c === void 0 ? 'local' : _c, componentNameWithEnv = _b[3], onlyComponentName = _b[4];
|
|
904
|
-
if (!(0, pipeline_1.isKnowEnvType)(env)) {
|
|
905
|
-
throw new Error("invalid env type! ".concat(env, ".\nEnv must be one of: ").concat(envTypes.join(', ')));
|
|
906
|
-
}
|
|
907
|
-
if (componentNameWithEnv === null || componentNameWithEnv === void 0 ? void 0 : componentNameWithEnv.length) {
|
|
908
|
-
return { env: env, componentName: componentNameWithEnv };
|
|
909
|
-
}
|
|
910
|
-
if (onlyComponentName === null || onlyComponentName === void 0 ? void 0 : onlyComponentName.length) {
|
|
911
|
-
return { env: env, componentName: onlyComponentName };
|
|
912
|
-
}
|
|
913
|
-
return { env: env };
|
|
914
|
-
};
|
|
915
|
-
exports.getEnvComponentArgument = getEnvComponentArgument;
|
|
916
|
-
/**
|
|
917
|
-
* Parses the environment component argument and returns a Choice object.
|
|
918
|
-
* @param envComponent - The environment component argument to parse.
|
|
919
|
-
* @returns The parsed Choice object.
|
|
920
|
-
* @throws Error if the env type is invalid.
|
|
921
|
-
*/
|
|
922
|
-
var parseChoiceArgument = function (_a) {
|
|
923
|
-
var components = _a.components;
|
|
924
|
-
var _b = (0, exports.getEnvComponentArgument)(), env = _b.env, componentName = _b.componentName;
|
|
925
|
-
var componentNames = Object.keys(components);
|
|
926
|
-
if ((componentName === null || componentName === void 0 ? void 0 : componentName.length) && !componentNames.includes(componentName)) {
|
|
927
|
-
throw new Error("invalid component name! Component must be one of: ".concat(componentNames.join(', ')));
|
|
928
|
-
}
|
|
929
|
-
if (componentName === null || componentName === void 0 ? void 0 : componentName.length) {
|
|
930
|
-
return { env: env, componentName: componentName };
|
|
931
|
-
}
|
|
932
|
-
return { env: env };
|
|
933
|
-
};
|
|
934
|
-
exports.parseChoiceArgument = parseChoiceArgument;
|
|
935
|
-
//# sourceMappingURL=parseChoiceArgument.js.map
|
|
936
|
-
|
|
937
|
-
/***/ }),
|
|
938
|
-
|
|
939
889
|
/***/ 8116:
|
|
940
890
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
941
891
|
|
|
@@ -39262,7 +39212,8 @@ var createAppBuildJob = function (context, _a) {
|
|
|
39262
39212
|
needs: [],
|
|
39263
39213
|
cache: [],
|
|
39264
39214
|
variables: __assign(__assign(__assign(__assign(__assign({}, constants_1.RUNNER_BUILD_RESOURCE_VARIABLES), variables !== null && variables !== void 0 ? variables : {}), context.environment.envVars), context.environment.jobOnlyVars.build.envVars), (_b = context.componentConfig.build.extraVars) !== null && _b !== void 0 ? _b : {}),
|
|
39265
|
-
script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(context.componentConfig.dotEnv
|
|
39215
|
+
script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(context.componentConfig.dotEnv === true // don't build when set to `local`
|
|
39216
|
+
? (0, writeDotEnv_1.writeDotEnv)(context) : []), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.componentConfig.dir)], false), __read((_c = (0, utils_1.ensureArray)(script)) !== null && _c !== void 0 ? _c : []), false),
|
|
39266
39217
|
artifacts: {
|
|
39267
39218
|
paths: [(0, path_1.join)(context.componentConfig.dir, "__build_info.json")],
|
|
39268
39219
|
reports: {
|
|
@@ -40967,7 +40918,7 @@ exports.readConfigSync = readConfigSync;
|
|
|
40967
40918
|
|
|
40968
40919
|
exports.__esModule = true;
|
|
40969
40920
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
40970
|
-
exports.PIPELINE_IMAGE_TAG = "fix-
|
|
40921
|
+
exports.PIPELINE_IMAGE_TAG = "fix-cloud-run-memory-cpu-3ff798ea" || 0;
|
|
40971
40922
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
40972
40923
|
|
|
40973
40924
|
/***/ }),
|
|
@@ -42808,6 +42759,7 @@ var createArgsString_1 = __nccwpck_require__(8686);
|
|
|
42808
42759
|
var jobName_1 = __nccwpck_require__(7311);
|
|
42809
42760
|
var common_1 = __nccwpck_require__(5655);
|
|
42810
42761
|
var getLabels_1 = __nccwpck_require__(486);
|
|
42762
|
+
var volumes_1 = __nccwpck_require__(8662);
|
|
42811
42763
|
var getJobRunScriptForJob = function (context, jobName, wait) {
|
|
42812
42764
|
var commonArgs = (0, common_1.getCommonCloudRunArgs)(context);
|
|
42813
42765
|
var commonArgsString = (0, createArgsString_1.createArgsString)(commonArgs);
|
|
@@ -42862,6 +42814,8 @@ var getJobCreateScripts = function (context) {
|
|
|
42862
42814
|
exports.getJobCreateScripts = getJobCreateScripts;
|
|
42863
42815
|
var getJobCreateScriptsForJob = function (context, jobName, job) {
|
|
42864
42816
|
var commonDeployArgs = (0, common_1.getCommonDeployArgs)(context);
|
|
42817
|
+
// due to some oversight from google, jobs create does not yet accept `--add-volume` 🤦
|
|
42818
|
+
// lucky, update on the other hand accepts it... so let's just imediatly update it
|
|
42865
42819
|
// we cannot upsert a job, so we have to create it and catch the error and then update
|
|
42866
42820
|
var commandArray = Array.isArray(job.command) ? job.command : job.command.split(" ");
|
|
42867
42821
|
var commonDeployArgsString = (0, createArgsString_1.createArgsString)(__assign(__assign({
|
|
@@ -42871,14 +42825,16 @@ var getJobCreateScriptsForJob = function (context, jobName, job) {
|
|
|
42871
42825
|
"cloud-run-job-name": jobName
|
|
42872
42826
|
})),
|
|
42873
42827
|
image: job.image || commonDeployArgs.image,
|
|
42828
|
+
cpu: job === null || job === void 0 ? void 0 : job.cpu,
|
|
42874
42829
|
memory: job.memory || "512Mi",
|
|
42875
42830
|
"task-timeout": job.timeout || "10m",
|
|
42876
42831
|
parallelism: job.parallelism || 1,
|
|
42877
42832
|
"env-vars-file": "____envvars.yaml",
|
|
42878
42833
|
"max-retries": 0
|
|
42879
42834
|
}));
|
|
42835
|
+
var requiresBeta = (job === null || job === void 0 ? void 0 : job.volumes) && Object.keys(job === null || job === void 0 ? void 0 : job.volumes).length > 0;
|
|
42880
42836
|
var argsString = "".concat(jobName, " ").concat(commonDeployArgsString);
|
|
42881
|
-
return __spreadArray(__spreadArray([], __read((0, gitlab_1.allowFailureInScripts)(["".concat((0, common_1.gcloudRunCmd)(), " jobs create ").concat(argsString)])), false), ["".concat((0, common_1.gcloudRunCmd)(), " jobs update ").concat(argsString)], false);
|
|
42837
|
+
return __spreadArray(__spreadArray([], __read((0, gitlab_1.allowFailureInScripts)(["".concat((0, common_1.gcloudRunCmd)(), " jobs create ").concat(argsString)])), false), ["".concat((0, common_1.gcloudRunCmd)(requiresBeta ? "beta" : undefined), " jobs update ").concat(argsString, " ").concat(createArgsString_1.createArgsString.apply(void 0, __spreadArray([], __read((0, volumes_1.createVolumeConfig)(job === null || job === void 0 ? void 0 : job.volumes, "job")), false)))], false);
|
|
42882
42838
|
};
|
|
42883
42839
|
var getCreateScheduleScripts = function (context) {
|
|
42884
42840
|
var jobsWithSchedule = getCloudRunJobsWithSchedule(context);
|
|
@@ -42956,12 +42912,44 @@ var __assign = this && this.__assign || function () {
|
|
|
42956
42912
|
};
|
|
42957
42913
|
return __assign.apply(this, arguments);
|
|
42958
42914
|
};
|
|
42915
|
+
var __read = this && this.__read || function (o, n) {
|
|
42916
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
42917
|
+
if (!m) return o;
|
|
42918
|
+
var i = m.call(o),
|
|
42919
|
+
r,
|
|
42920
|
+
ar = [],
|
|
42921
|
+
e;
|
|
42922
|
+
try {
|
|
42923
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
42924
|
+
} catch (error) {
|
|
42925
|
+
e = {
|
|
42926
|
+
error: error
|
|
42927
|
+
};
|
|
42928
|
+
} finally {
|
|
42929
|
+
try {
|
|
42930
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
42931
|
+
} finally {
|
|
42932
|
+
if (e) throw e.error;
|
|
42933
|
+
}
|
|
42934
|
+
}
|
|
42935
|
+
return ar;
|
|
42936
|
+
};
|
|
42937
|
+
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
42938
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
42939
|
+
if (ar || !(i in from)) {
|
|
42940
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
42941
|
+
ar[i] = from[i];
|
|
42942
|
+
}
|
|
42943
|
+
}
|
|
42944
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
42945
|
+
};
|
|
42959
42946
|
exports.__esModule = true;
|
|
42960
42947
|
exports.getServiceDeleteScript = exports.getServiceDeployScript = void 0;
|
|
42961
42948
|
var getLabels_1 = __nccwpck_require__(486);
|
|
42962
42949
|
var createArgsString_1 = __nccwpck_require__(8686);
|
|
42963
42950
|
var getServiceName_1 = __nccwpck_require__(9391);
|
|
42964
42951
|
var common_1 = __nccwpck_require__(5655);
|
|
42952
|
+
var volumes_1 = __nccwpck_require__(8662);
|
|
42965
42953
|
var getServiceDeployScript = function (context, service, nameSuffix) {
|
|
42966
42954
|
var _a, _b, _c, _d, _e;
|
|
42967
42955
|
var commonDeployArgs = (0, common_1.getCommonDeployArgs)(context);
|
|
@@ -42970,7 +42958,7 @@ var getServiceDeployScript = function (context, service, nameSuffix) {
|
|
|
42970
42958
|
var command = service !== true ? (_a = service === null || service === void 0 ? void 0 : service.command) !== null && _a !== void 0 ? _a : context.componentConfig.build.startCommand : undefined;
|
|
42971
42959
|
var commandArray = command ? Array.isArray(command) ? command : command.split(" ") : undefined;
|
|
42972
42960
|
var fullServiceName = "".concat(serviceName).concat(nameSuffix !== null && nameSuffix !== void 0 ? nameSuffix : "");
|
|
42973
|
-
var argsString = (0,
|
|
42961
|
+
var argsString = createArgsString_1.createArgsString.apply(void 0, __spreadArray([__assign(__assign({
|
|
42974
42962
|
// command as empty string resets it to default (uses the image's entrypoint)
|
|
42975
42963
|
command: commandArray ? '"' + commandArray.join(",") + '"' : '""'
|
|
42976
42964
|
}, commonDeployArgs), {
|
|
@@ -42981,13 +42969,16 @@ var getServiceDeployScript = function (context, service, nameSuffix) {
|
|
|
42981
42969
|
"min-instances": (_b = customConfig === null || customConfig === void 0 ? void 0 : customConfig.minInstances) !== null && _b !== void 0 ? _b : 0,
|
|
42982
42970
|
"max-instances": (_c = customConfig === null || customConfig === void 0 ? void 0 : customConfig.maxInstances) !== null && _c !== void 0 ? _c : 100,
|
|
42983
42971
|
"cpu-throttling": (customConfig === null || customConfig === void 0 ? void 0 : customConfig.noCpuThrottling) !== true,
|
|
42972
|
+
cpu: customConfig === null || customConfig === void 0 ? void 0 : customConfig.cpu,
|
|
42984
42973
|
memory: customConfig === null || customConfig === void 0 ? void 0 : customConfig.memory,
|
|
42985
42974
|
"allow-unauthenticated": (_d = customConfig === null || customConfig === void 0 ? void 0 : customConfig.allowUnauthenticated) !== null && _d !== void 0 ? _d : true,
|
|
42986
42975
|
ingress: (_e = customConfig === null || customConfig === void 0 ? void 0 : customConfig.ingress) !== null && _e !== void 0 ? _e : "all",
|
|
42987
42976
|
"cpu-boost": true,
|
|
42988
42977
|
"execution-environment": customConfig === null || customConfig === void 0 ? void 0 : customConfig.executionEnvironment
|
|
42989
|
-
}));
|
|
42990
|
-
|
|
42978
|
+
})], __read((0, volumes_1.createVolumeConfig)(customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes, "service")), false));
|
|
42979
|
+
// volumes require beta
|
|
42980
|
+
var requiresBeta = (customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes) && Object.keys(customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes).length > 0;
|
|
42981
|
+
return "".concat((0, common_1.gcloudRunCmd)(requiresBeta ? "beta" : undefined), " deploy ").concat(fullServiceName, " ").concat(argsString);
|
|
42991
42982
|
};
|
|
42992
42983
|
exports.getServiceDeployScript = getServiceDeployScript;
|
|
42993
42984
|
var getServiceDeleteScript = function (context, serviceSuffix) {
|
|
@@ -43296,6 +43287,69 @@ exports.getDeployJobVariables = getDeployJobVariables;
|
|
|
43296
43287
|
|
|
43297
43288
|
/***/ }),
|
|
43298
43289
|
|
|
43290
|
+
/***/ 8662:
|
|
43291
|
+
/***/ (function(__unused_webpack_module, exports) {
|
|
43292
|
+
|
|
43293
|
+
"use strict";
|
|
43294
|
+
|
|
43295
|
+
|
|
43296
|
+
var __read = this && this.__read || function (o, n) {
|
|
43297
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
43298
|
+
if (!m) return o;
|
|
43299
|
+
var i = m.call(o),
|
|
43300
|
+
r,
|
|
43301
|
+
ar = [],
|
|
43302
|
+
e;
|
|
43303
|
+
try {
|
|
43304
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
43305
|
+
} catch (error) {
|
|
43306
|
+
e = {
|
|
43307
|
+
error: error
|
|
43308
|
+
};
|
|
43309
|
+
} finally {
|
|
43310
|
+
try {
|
|
43311
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
43312
|
+
} finally {
|
|
43313
|
+
if (e) throw e.error;
|
|
43314
|
+
}
|
|
43315
|
+
}
|
|
43316
|
+
return ar;
|
|
43317
|
+
};
|
|
43318
|
+
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
43319
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
43320
|
+
if (ar || !(i in from)) {
|
|
43321
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
43322
|
+
ar[i] = from[i];
|
|
43323
|
+
}
|
|
43324
|
+
}
|
|
43325
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
43326
|
+
};
|
|
43327
|
+
exports.__esModule = true;
|
|
43328
|
+
exports.createVolumeConfig = void 0;
|
|
43329
|
+
var createVolumeConfig = function (volumes, type) {
|
|
43330
|
+
if (!volumes) {
|
|
43331
|
+
return [];
|
|
43332
|
+
}
|
|
43333
|
+
return __spreadArray(__spreadArray([], __read(Object.entries(volumes).map(function (_a) {
|
|
43334
|
+
var _b = __read(_a, 2),
|
|
43335
|
+
volumeName = _b[0],
|
|
43336
|
+
_c = _b[1],
|
|
43337
|
+
type = _c.type,
|
|
43338
|
+
bucket = _c.bucket,
|
|
43339
|
+
mountPath = _c.mountPath,
|
|
43340
|
+
readonly = _c.readonly;
|
|
43341
|
+
return {
|
|
43342
|
+
"add-volume": "name=".concat(volumeName, ",type=").concat(type, ",bucket=").concat(bucket).concat(readonly ? ",readonly=true" : ""),
|
|
43343
|
+
"add-volume-mount": "volume=".concat(volumeName, ",mount-path=").concat(mountPath)
|
|
43344
|
+
};
|
|
43345
|
+
})), false), [type === "service" ? {
|
|
43346
|
+
"execution-environment": "gen2"
|
|
43347
|
+
} : {}], false);
|
|
43348
|
+
};
|
|
43349
|
+
exports.createVolumeConfig = createVolumeConfig;
|
|
43350
|
+
|
|
43351
|
+
/***/ }),
|
|
43352
|
+
|
|
43299
43353
|
/***/ 1344:
|
|
43300
43354
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
43301
43355
|
|