@certd/pipeline 1.38.9 → 1.38.11
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 +14 -0
- package/dist/access/api.d.ts +1 -6
- package/dist/plugin/api.d.ts +7 -0
- package/dist/plugin/api.js +6 -0
- package/package.json +4 -4
- package/test/echo-plugin.js +0 -86
- package/test/index.test.js +0 -18
- package/test/pipeline/access-service-test.js +0 -65
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
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.38.11](https://github.com/certd/certd/compare/v1.38.10...v1.38.11) (2026-02-16)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @certd/pipeline
|
|
9
|
+
|
|
10
|
+
## [1.38.10](https://github.com/certd/certd/compare/v1.38.9...v1.38.10) (2026-02-15)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* 修复1panel 请求失败的bug ([0283662](https://github.com/certd/certd/commit/0283662931ff47d6b5d49f91a30c4a002fe1d108))
|
|
15
|
+
|
|
16
|
+
### Performance Improvements
|
|
17
|
+
|
|
18
|
+
* 所有授权增加测试按钮 ([7a3e68d](https://github.com/certd/certd/commit/7a3e68d656c1dcdcd814b69891bd2c2c6fe3098a))
|
|
19
|
+
|
|
6
20
|
## [1.38.9](https://github.com/certd/certd/compare/v1.38.8...v1.38.9) (2026-02-09)
|
|
7
21
|
|
|
8
22
|
**Note:** Version bump only for package @certd/pipeline
|
package/dist/access/api.d.ts
CHANGED
|
@@ -2,12 +2,7 @@ import { Registrable } from "../registry/index.js";
|
|
|
2
2
|
import { FormItemProps } from "../dt/index.js";
|
|
3
3
|
import { HttpClient, ILogger, utils } from "@certd/basic";
|
|
4
4
|
import { PluginRequestHandleReq } from "../plugin/index.js";
|
|
5
|
-
export type
|
|
6
|
-
id?: number;
|
|
7
|
-
title?: string;
|
|
8
|
-
access: T;
|
|
9
|
-
};
|
|
10
|
-
export type AccessRequestHandleReq<T = any> = PluginRequestHandleReq<AccessRequestHandleReqInput<T>>;
|
|
5
|
+
export type AccessRequestHandleReq<T = any> = PluginRequestHandleReq<T>;
|
|
11
6
|
export type AccessInputDefine = FormItemProps & {
|
|
12
7
|
title: string;
|
|
13
8
|
required?: boolean;
|
package/dist/plugin/api.d.ts
CHANGED
|
@@ -14,6 +14,11 @@ export type PluginRequestHandleReq<T = any> = {
|
|
|
14
14
|
action: string;
|
|
15
15
|
input: T;
|
|
16
16
|
data: any;
|
|
17
|
+
record: {
|
|
18
|
+
id: number;
|
|
19
|
+
type: string;
|
|
20
|
+
title: string;
|
|
21
|
+
};
|
|
17
22
|
};
|
|
18
23
|
export type UserInfo = {
|
|
19
24
|
role: "admin" | "user";
|
|
@@ -120,6 +125,8 @@ export declare abstract class AbstractTaskPlugin implements ITaskPlugin {
|
|
|
120
125
|
getStepFromPipeline(stepId: string): any;
|
|
121
126
|
getStepIdFromRefInput(ref?: string): string;
|
|
122
127
|
buildDomainGroupOptions(options: any[], domains: string[]): any[];
|
|
128
|
+
getLastStatus(): Runnable;
|
|
129
|
+
getLastOutput(key: string): any;
|
|
123
130
|
}
|
|
124
131
|
export type OutputVO = {
|
|
125
132
|
key: string;
|
package/dist/plugin/api.js
CHANGED
|
@@ -156,4 +156,10 @@ export class AbstractTaskPlugin {
|
|
|
156
156
|
buildDomainGroupOptions(options, domains) {
|
|
157
157
|
return utils.options.buildGroupOptions(options, domains);
|
|
158
158
|
}
|
|
159
|
+
getLastStatus() {
|
|
160
|
+
return this.ctx.lastStatus || {};
|
|
161
|
+
}
|
|
162
|
+
getLastOutput(key) {
|
|
163
|
+
return this.getLastStatus().status?.output?.[key];
|
|
164
|
+
}
|
|
159
165
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@certd/pipeline",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.38.
|
|
4
|
+
"version": "1.38.11",
|
|
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.38.
|
|
22
|
-
"@certd/plus-core": "^1.38.
|
|
21
|
+
"@certd/basic": "^1.38.11",
|
|
22
|
+
"@certd/plus-core": "^1.38.11",
|
|
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": "1f002159e2a3c73fb5e00341a344effa07d6f653"
|
|
49
49
|
}
|
package/test/echo-plugin.js
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
13
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
18
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
19
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
20
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
21
|
-
function step(op) {
|
|
22
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
23
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
24
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
25
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
26
|
-
switch (op[0]) {
|
|
27
|
-
case 0: case 1: t = op; break;
|
|
28
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
29
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
30
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
31
|
-
default:
|
|
32
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
33
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
34
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
35
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
36
|
-
if (t[2]) _.ops.pop();
|
|
37
|
-
_.trys.pop(); continue;
|
|
38
|
-
}
|
|
39
|
-
op = body.call(thisArg, _);
|
|
40
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
41
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
exports.__esModule = true;
|
|
45
|
-
exports.EchoPlugin = void 0;
|
|
46
|
-
var src_1 = require("../src");
|
|
47
|
-
var EchoPlugin = /** @class */ (function () {
|
|
48
|
-
function EchoPlugin() {
|
|
49
|
-
}
|
|
50
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
51
|
-
EchoPlugin.prototype.onInstance = function () {
|
|
52
|
-
return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
53
|
-
return [2 /*return*/];
|
|
54
|
-
}); });
|
|
55
|
-
};
|
|
56
|
-
EchoPlugin.prototype.execute = function () {
|
|
57
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
58
|
-
return __generator(this, function (_a) {
|
|
59
|
-
console.log("input :cert", this.cert);
|
|
60
|
-
return [2 /*return*/];
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, src_1.TaskInput)({
|
|
66
|
-
title: "cert",
|
|
67
|
-
component: {
|
|
68
|
-
name: "output-selector"
|
|
69
|
-
},
|
|
70
|
-
helper: "输出选择"
|
|
71
|
-
})
|
|
72
|
-
], EchoPlugin.prototype, "cert");
|
|
73
|
-
__decorate([
|
|
74
|
-
(0, src_1.TaskOutput)({
|
|
75
|
-
title: "cert info"
|
|
76
|
-
})
|
|
77
|
-
], EchoPlugin.prototype, "certInfo");
|
|
78
|
-
EchoPlugin = __decorate([
|
|
79
|
-
(0, src_1.IsTaskPlugin)({
|
|
80
|
-
name: "EchoPlugin",
|
|
81
|
-
title: "测试插件【echo】"
|
|
82
|
-
})
|
|
83
|
-
], EchoPlugin);
|
|
84
|
-
return EchoPlugin;
|
|
85
|
-
}());
|
|
86
|
-
exports.EchoPlugin = EchoPlugin;
|
package/test/index.test.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var chai_1 = require("chai");
|
|
4
|
-
require("mocha");
|
|
5
|
-
var echo_plugin_js_1 = require("./echo-plugin.js");
|
|
6
|
-
describe("task_plugin", function () {
|
|
7
|
-
it("#taskplugin", function () {
|
|
8
|
-
console.log("before new plugin");
|
|
9
|
-
var echoPlugin = new echo_plugin_js_1.EchoPlugin();
|
|
10
|
-
console.log("before set property", echoPlugin);
|
|
11
|
-
echoPlugin.cert = { test: 1 };
|
|
12
|
-
console.log("before execute");
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
echoPlugin.execute();
|
|
15
|
-
console.log("after execute");
|
|
16
|
-
(0, chai_1.expect)(echoPlugin.cert.test).eq(1);
|
|
17
|
-
});
|
|
18
|
-
});
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.AccessServiceTest = void 0;
|
|
51
|
-
// @ts-ignore
|
|
52
|
-
var user_secret_1 = require("../user.secret");
|
|
53
|
-
var AccessServiceTest = /** @class */ (function () {
|
|
54
|
-
function AccessServiceTest() {
|
|
55
|
-
}
|
|
56
|
-
AccessServiceTest.prototype.getById = function (id) {
|
|
57
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
58
|
-
return __generator(this, function (_a) {
|
|
59
|
-
return [2 /*return*/, __assign({}, user_secret_1.aliyunSecret)];
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
return AccessServiceTest;
|
|
64
|
-
}());
|
|
65
|
-
exports.AccessServiceTest = AccessServiceTest;
|