@catladder/cli 3.17.1 → 3.18.0
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 +1 -1
- 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
|
@@ -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"}
|