@catladder/cli 0.0.0-main-18bd4513 → 0.0.0-main-4d1a3af5
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/bundles/cli/index.js +41 -18
- package/dist/cli/src/apps/cli/commands/project/setup/index.js +6 -3
- package/dist/cli/src/apps/cli/commands/project/setup/index.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/logSection.d.ts +2 -0
- package/dist/cli/src/apps/cli/commands/project/setup/logSection.js +17 -0
- package/dist/cli/src/apps/cli/commands/project/setup/logSection.js.map +1 -0
- package/dist/cli/src/apps/cli/commands/project/setup/setupContext.js +11 -15
- package/dist/cli/src/apps/cli/commands/project/setup/setupContext.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/apps/cli/commands/project/setup/index.ts +8 -3
- package/src/apps/cli/commands/project/setup/logSection.ts +22 -0
- package/src/apps/cli/commands/project/setup/setupContext.ts +14 -19
|
@@ -1985,18 +1985,21 @@ const setupAccessTokens_1 = __nccwpck_require__(84195);
|
|
|
1985
1985
|
const setupContext_1 = __nccwpck_require__(44310);
|
|
1986
1986
|
const setupTopic_1 = __nccwpck_require__(84290);
|
|
1987
1987
|
const setupAgents_1 = __nccwpck_require__(19287);
|
|
1988
|
+
const logSection_1 = __nccwpck_require__(96183);
|
|
1988
1989
|
const setupProject = async (instance, onlyComponents) => {
|
|
1989
1990
|
const allContext = await (0, getProjectConfig_1.getAllPipelineContexts)(onlyComponents);
|
|
1990
1991
|
instance.log("will setup those contexts:");
|
|
1991
1992
|
allContext.forEach((context) => {
|
|
1992
1993
|
instance.log(` - ${context.name}:${context.env}`);
|
|
1993
1994
|
});
|
|
1995
|
+
await (0, logSection_1.logSection)(instance, "base setup", async () => {
|
|
1996
|
+
await (0, setupAccessTokens_1.setupAccessTokens)(instance);
|
|
1997
|
+
await (0, setupTopic_1.setupTopic)(instance);
|
|
1998
|
+
await (0, setupAgents_1.setupAgents)(instance);
|
|
1999
|
+
});
|
|
1994
2000
|
for (const context of allContext) {
|
|
1995
2001
|
await (0, setupContext_1.setupContext)(instance, context);
|
|
1996
2002
|
}
|
|
1997
|
-
await (0, setupAccessTokens_1.setupAccessTokens)(instance);
|
|
1998
|
-
await (0, setupTopic_1.setupTopic)(instance);
|
|
1999
|
-
await (0, setupAgents_1.setupAgents)(instance);
|
|
2000
2003
|
instance.log("");
|
|
2001
2004
|
instance.log("gitlab is ready! 🥂");
|
|
2002
2005
|
instance.log("\n");
|
|
@@ -2016,6 +2019,30 @@ exports.setupProject = setupProject;
|
|
|
2016
2019
|
|
|
2017
2020
|
/***/ }),
|
|
2018
2021
|
|
|
2022
|
+
/***/ 96183:
|
|
2023
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
2024
|
+
|
|
2025
|
+
"use strict";
|
|
2026
|
+
|
|
2027
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2028
|
+
exports.logSection = void 0;
|
|
2029
|
+
const logSection = async (instance, title, work) => {
|
|
2030
|
+
instance.log("");
|
|
2031
|
+
instance.log("==================================================================================");
|
|
2032
|
+
instance.log("🐱 🔧 " + title + "...");
|
|
2033
|
+
instance.log("");
|
|
2034
|
+
await work();
|
|
2035
|
+
instance.log("");
|
|
2036
|
+
instance.log("✅ " + title + " done!");
|
|
2037
|
+
instance.log("");
|
|
2038
|
+
instance.log("==================================================================================");
|
|
2039
|
+
instance.log("");
|
|
2040
|
+
};
|
|
2041
|
+
exports.logSection = logSection;
|
|
2042
|
+
//# sourceMappingURL=logSection.js.map
|
|
2043
|
+
|
|
2044
|
+
/***/ }),
|
|
2045
|
+
|
|
2019
2046
|
/***/ 84195:
|
|
2020
2047
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
2021
2048
|
|
|
@@ -2302,22 +2329,18 @@ exports.setupContext = void 0;
|
|
|
2302
2329
|
const pipeline_1 = __nccwpck_require__(10603);
|
|
2303
2330
|
const setupCloudRun_1 = __nccwpck_require__(1082);
|
|
2304
2331
|
const setupKubernetes_1 = __nccwpck_require__(88412);
|
|
2332
|
+
const logSection_1 = __nccwpck_require__(96183);
|
|
2305
2333
|
const setupContext = async (instance, context) => {
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
await (0, setupKubernetes_1.setupKubernetes)(instance, context);
|
|
2317
|
-
}
|
|
2318
|
-
instance.log("");
|
|
2319
|
-
instance.log("✅ " + context.env + ":" + context.name + " done!");
|
|
2320
|
-
instance.log("");
|
|
2334
|
+
await (0, logSection_1.logSection)(instance, "setting up " + context.env + ":" + context.name, async () => {
|
|
2335
|
+
var _a, _b;
|
|
2336
|
+
if ((0, pipeline_1.isOfDeployType)((_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config, "google-cloudrun")) {
|
|
2337
|
+
await (0, setupCloudRun_1.setupCloudRun)(instance, context);
|
|
2338
|
+
}
|
|
2339
|
+
const deployConfig = (_b = context.deploy) === null || _b === void 0 ? void 0 : _b.config;
|
|
2340
|
+
if ((0, pipeline_1.isOfDeployType)(deployConfig, "kubernetes")) {
|
|
2341
|
+
await (0, setupKubernetes_1.setupKubernetes)(instance, context);
|
|
2342
|
+
}
|
|
2343
|
+
});
|
|
2321
2344
|
};
|
|
2322
2345
|
exports.setupContext = setupContext;
|
|
2323
2346
|
//# sourceMappingURL=setupContext.js.map
|
|
@@ -6,18 +6,21 @@ const setupAccessTokens_1 = require("./setupAccessTokens");
|
|
|
6
6
|
const setupContext_1 = require("./setupContext");
|
|
7
7
|
const setupTopic_1 = require("./setupTopic");
|
|
8
8
|
const setupAgents_1 = require("./setupAgents");
|
|
9
|
+
const logSection_1 = require("./logSection");
|
|
9
10
|
const setupProject = async (instance, onlyComponents) => {
|
|
10
11
|
const allContext = await (0, getProjectConfig_1.getAllPipelineContexts)(onlyComponents);
|
|
11
12
|
instance.log("will setup those contexts:");
|
|
12
13
|
allContext.forEach((context) => {
|
|
13
14
|
instance.log(` - ${context.name}:${context.env}`);
|
|
14
15
|
});
|
|
16
|
+
await (0, logSection_1.logSection)(instance, "base setup", async () => {
|
|
17
|
+
await (0, setupAccessTokens_1.setupAccessTokens)(instance);
|
|
18
|
+
await (0, setupTopic_1.setupTopic)(instance);
|
|
19
|
+
await (0, setupAgents_1.setupAgents)(instance);
|
|
20
|
+
});
|
|
15
21
|
for (const context of allContext) {
|
|
16
22
|
await (0, setupContext_1.setupContext)(instance, context);
|
|
17
23
|
}
|
|
18
|
-
await (0, setupAccessTokens_1.setupAccessTokens)(instance);
|
|
19
|
-
await (0, setupTopic_1.setupTopic)(instance);
|
|
20
|
-
await (0, setupAgents_1.setupAgents)(instance);
|
|
21
24
|
instance.log("");
|
|
22
25
|
instance.log("gitlab is ready! 🥂");
|
|
23
26
|
instance.log("\n");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/apps/cli/commands/project/setup/index.ts"],"names":[],"mappings":";;;AACA,6EAAgF;AAChF,2DAAwD;AACxD,iDAA8C;AAC9C,6CAA0C;AAC1C,+CAA4C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/apps/cli/commands/project/setup/index.ts"],"names":[],"mappings":";;;AACA,6EAAgF;AAChF,2DAAwD;AACxD,iDAA8C;AAC9C,6CAA0C;AAC1C,+CAA4C;AAC5C,6CAA0C;AAEnC,MAAM,YAAY,GAAG,KAAK,EAC/B,QAAyB,EACzB,cAAkC,EAClC,EAAE;IACF,MAAM,UAAU,GAAG,MAAM,IAAA,yCAAsB,EAAC,cAAc,CAAC,CAAC;IAChE,QAAQ,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAC3C,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,QAAQ,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,MAAM,IAAA,uBAAU,EAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,IAAI,EAAE;QAClD,MAAM,IAAA,qCAAiB,EAAC,QAAQ,CAAC,CAAC;QAClC,MAAM,IAAA,uBAAU,EAAC,QAAQ,CAAC,CAAC;QAC3B,MAAM,IAAA,yBAAW,EAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IACH,KAAK,MAAM,OAAO,IAAI,UAAU,EAAE,CAAC;QACjC,MAAM,IAAA,2BAAY,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC;IAED,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjB,QAAQ,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IACpC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnB,QAAQ,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;IACjD;QACE,kCAAkC;QAClC,2BAA2B;QAC3B,qDAAqD;QACrD,qBAAqB;QACrB,eAAe;KAChB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC;IAC9C,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnB,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC,CAAC;AAhCW,QAAA,YAAY,gBAgCvB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.logSection = void 0;
|
|
4
|
+
const logSection = async (instance, title, work) => {
|
|
5
|
+
instance.log("");
|
|
6
|
+
instance.log("==================================================================================");
|
|
7
|
+
instance.log("🐱 🔧 " + title + "...");
|
|
8
|
+
instance.log("");
|
|
9
|
+
await work();
|
|
10
|
+
instance.log("");
|
|
11
|
+
instance.log("✅ " + title + " done!");
|
|
12
|
+
instance.log("");
|
|
13
|
+
instance.log("==================================================================================");
|
|
14
|
+
instance.log("");
|
|
15
|
+
};
|
|
16
|
+
exports.logSection = logSection;
|
|
17
|
+
//# sourceMappingURL=logSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logSection.js","sourceRoot":"","sources":["../../../../../../../../src/apps/cli/commands/project/setup/logSection.ts"],"names":[],"mappings":";;;AAEO,MAAM,UAAU,GAAG,KAAK,EAC7B,QAAyB,EACzB,KAAa,EACb,IAAyB,EACzB,EAAE;IACF,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjB,QAAQ,CAAC,GAAG,CACV,oFAAoF,CACrF,CAAC;IACF,QAAQ,CAAC,GAAG,CAAC,QAAQ,GAAG,KAAK,GAAG,KAAK,CAAC,CAAC;IACvC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjB,MAAM,IAAI,EAAE,CAAC;IACb,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjB,QAAQ,CAAC,GAAG,CAAC,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC,CAAC;IACzC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjB,QAAQ,CAAC,GAAG,CACV,oFAAoF,CACrF,CAAC;IACF,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AACnB,CAAC,CAAC;AAnBW,QAAA,UAAU,cAmBrB"}
|
|
@@ -4,22 +4,18 @@ exports.setupContext = void 0;
|
|
|
4
4
|
const pipeline_1 = require("../../../../../../../pipeline/src/index.js");
|
|
5
5
|
const setupCloudRun_1 = require("./setupCloudRun");
|
|
6
6
|
const setupKubernetes_1 = require("./setupKubernetes");
|
|
7
|
+
const logSection_1 = require("./logSection");
|
|
7
8
|
const setupContext = async (instance, context) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
await (0, setupKubernetes_1.setupKubernetes)(instance, context);
|
|
19
|
-
}
|
|
20
|
-
instance.log("");
|
|
21
|
-
instance.log("✅ " + context.env + ":" + context.name + " done!");
|
|
22
|
-
instance.log("");
|
|
9
|
+
await (0, logSection_1.logSection)(instance, "setting up " + context.env + ":" + context.name, async () => {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
if ((0, pipeline_1.isOfDeployType)((_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config, "google-cloudrun")) {
|
|
12
|
+
await (0, setupCloudRun_1.setupCloudRun)(instance, context);
|
|
13
|
+
}
|
|
14
|
+
const deployConfig = (_b = context.deploy) === null || _b === void 0 ? void 0 : _b.config;
|
|
15
|
+
if ((0, pipeline_1.isOfDeployType)(deployConfig, "kubernetes")) {
|
|
16
|
+
await (0, setupKubernetes_1.setupKubernetes)(instance, context);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
23
19
|
};
|
|
24
20
|
exports.setupContext = setupContext;
|
|
25
21
|
//# sourceMappingURL=setupContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupContext.js","sourceRoot":"","sources":["../../../../../../../../src/apps/cli/commands/project/setup/setupContext.ts"],"names":[],"mappings":";;;AACA,kDAAqD;AAErD,mDAAgD;AAEhD,uDAAoD;
|
|
1
|
+
{"version":3,"file":"setupContext.js","sourceRoot":"","sources":["../../../../../../../../src/apps/cli/commands/project/setup/setupContext.ts"],"names":[],"mappings":";;;AACA,kDAAqD;AAErD,mDAAgD;AAEhD,uDAAoD;AACpD,6CAA0C;AAEnC,MAAM,YAAY,GAAG,KAAK,EAC/B,QAAyB,EACzB,OAAyB,EACzB,EAAE;IACF,MAAM,IAAA,uBAAU,EACd,QAAQ,EACR,aAAa,GAAG,OAAO,CAAC,GAAG,GAAG,GAAG,GAAG,OAAO,CAAC,IAAI,EAChD,KAAK,IAAI,EAAE;;QACT,IAAI,IAAA,yBAAc,EAAC,MAAA,OAAO,CAAC,MAAM,0CAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,CAAC;YAC9D,MAAM,IAAA,6BAAa,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACzC,CAAC;QAED,MAAM,YAAY,GAAG,MAAA,OAAO,CAAC,MAAM,0CAAE,MAAM,CAAC;QAC5C,IAAI,IAAA,yBAAc,EAAC,YAAY,EAAE,YAAY,CAAC,EAAE,CAAC;YAC/C,MAAM,IAAA,iCAAe,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC,CAAC;AAlBW,QAAA,YAAY,gBAkBvB"}
|