@certd/pipeline 1.38.12 → 1.39.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/CHANGELOG.md +4 -0
- package/dist/plugin/api.d.ts +2 -0
- package/dist/plugin/api.js +6 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @certd/pipeline
|
|
9
|
+
|
|
6
10
|
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @certd/pipeline
|
package/dist/plugin/api.d.ts
CHANGED
|
@@ -96,6 +96,7 @@ export type TaskInstanceContext = {
|
|
|
96
96
|
signal: AbortSignal;
|
|
97
97
|
utils: typeof utils;
|
|
98
98
|
user: UserInfo;
|
|
99
|
+
projectId?: number;
|
|
99
100
|
emitter: TaskEmitter;
|
|
100
101
|
serviceGetter?: IServiceGetter;
|
|
101
102
|
};
|
|
@@ -122,6 +123,7 @@ export declare abstract class AbstractTaskPlugin implements ITaskPlugin {
|
|
|
122
123
|
buildCertName(domain: string, prefix?: string): string;
|
|
123
124
|
onRequest(req: PluginRequestHandleReq<any>): Promise<any>;
|
|
124
125
|
isAdmin(): boolean;
|
|
126
|
+
checkAdmin(): void;
|
|
125
127
|
getStepFromPipeline(stepId: string): any;
|
|
126
128
|
getStepIdFromRefInput(ref?: string): string;
|
|
127
129
|
buildDomainGroupOptions(options: any[], domains: string[]): any[];
|
package/dist/plugin/api.js
CHANGED
|
@@ -42,9 +42,7 @@ export class AbstractTaskPlugin {
|
|
|
42
42
|
this.registerSecret(cert.one);
|
|
43
43
|
}
|
|
44
44
|
if (this.ctx?.define?.onlyAdmin) {
|
|
45
|
-
|
|
46
|
-
throw new Error("只有管理员才能运行此任务");
|
|
47
|
-
}
|
|
45
|
+
this.checkAdmin();
|
|
48
46
|
}
|
|
49
47
|
}
|
|
50
48
|
async getAccess(accessId, isCommon = false) {
|
|
@@ -140,6 +138,11 @@ export class AbstractTaskPlugin {
|
|
|
140
138
|
isAdmin() {
|
|
141
139
|
return this.ctx.user.role === "admin";
|
|
142
140
|
}
|
|
141
|
+
checkAdmin() {
|
|
142
|
+
if (!this.isAdmin()) {
|
|
143
|
+
throw new Error("只有“管理员”或“系统级项目”才有权限运行此插件任务");
|
|
144
|
+
}
|
|
145
|
+
}
|
|
143
146
|
getStepFromPipeline(stepId) {
|
|
144
147
|
let found = null;
|
|
145
148
|
RunnableCollection.each(this.ctx.pipeline.stages, step => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@certd/pipeline",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.39.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"compile": "tsc --skipLibCheck --watch"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@certd/basic": "^1.
|
|
22
|
-
"@certd/plus-core": "^1.
|
|
21
|
+
"@certd/basic": "^1.39.0",
|
|
22
|
+
"@certd/plus-core": "^1.39.0",
|
|
23
23
|
"dayjs": "^1.11.7",
|
|
24
24
|
"lodash-es": "^4.17.21",
|
|
25
25
|
"reflect-metadata": "^0.1.13"
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"tslib": "^2.8.1",
|
|
46
46
|
"typescript": "^5.4.2"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
|
49
49
|
}
|