@catladder/cli 1.84.0 → 1.86.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/apps/cli/commands/project/setup/index.js +11 -7
- package/dist/apps/cli/commands/project/setup/index.js.map +1 -1
- package/dist/apps/cli/commands/project/setup/setupTopic.d.ts +2 -0
- package/dist/apps/cli/commands/project/setup/setupTopic.js +69 -0
- package/dist/apps/cli/commands/project/setup/setupTopic.js.map +1 -0
- package/dist/bundles/catenv/index.js +1 -1
- package/dist/bundles/cli/index.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/apps/cli/commands/project/setup/index.ts +2 -0
- package/src/apps/cli/commands/project/setup/setupTopic.ts +22 -0
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"node": ">=12.0.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@catladder/pipeline": "1.
|
|
27
|
+
"@catladder/pipeline": "1.86.0",
|
|
28
28
|
"@kubernetes/client-node": "^0.16.2",
|
|
29
29
|
"@tsconfig/node14": "^1.0.1",
|
|
30
30
|
"@types/common-tags": "^1.8.0",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"typescript": "^4.5.4",
|
|
58
58
|
"vorpal": "^1.12.0"
|
|
59
59
|
},
|
|
60
|
-
"version": "1.
|
|
60
|
+
"version": "1.86.0"
|
|
61
61
|
}
|
|
@@ -3,6 +3,7 @@ import { getAllPipelineContexts } from "../../../../../config/getProjectConfig";
|
|
|
3
3
|
import { projectConfigSecrets } from "../commandConfigSecrets";
|
|
4
4
|
import { setupAccessTokens } from "./setupAccessTokens";
|
|
5
5
|
import { setupContext } from "./setupContext";
|
|
6
|
+
import { setupTopic } from "./setupTopic";
|
|
6
7
|
|
|
7
8
|
export const setupProject = async (instance: CommandInstance) => {
|
|
8
9
|
const allContext = await getAllPipelineContexts();
|
|
@@ -11,6 +12,7 @@ export const setupProject = async (instance: CommandInstance) => {
|
|
|
11
12
|
await setupContext(instance, context);
|
|
12
13
|
}
|
|
13
14
|
await setupAccessTokens(instance);
|
|
15
|
+
await setupTopic(instance);
|
|
14
16
|
instance.log("");
|
|
15
17
|
const { configSecrets } = await instance.prompt({
|
|
16
18
|
default: true,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { CommandInstance } from "vorpal";
|
|
2
|
+
import { doGitlabRequest, getProjectInfo } from "../../../../../utils/gitlab";
|
|
3
|
+
|
|
4
|
+
const catladderTopic = "catladder"
|
|
5
|
+
|
|
6
|
+
export const setupTopic = async (instance: CommandInstance) => {
|
|
7
|
+
const { id: projectId } = await getProjectInfo(
|
|
8
|
+
instance
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
const { topics } = await doGitlabRequest(
|
|
12
|
+
instance,
|
|
13
|
+
`projects/${projectId}`
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
await doGitlabRequest(
|
|
17
|
+
instance,
|
|
18
|
+
`projects/${projectId}`,
|
|
19
|
+
{ topics: [catladderTopic, ...topics] },
|
|
20
|
+
"PUT"
|
|
21
|
+
);
|
|
22
|
+
};
|