diff --git a/packages/core/pipeline/src/core/executor.ts b/packages/core/pipeline/src/core/executor.ts index b6d19a5f4..6007f963d 100644 --- a/packages/core/pipeline/src/core/executor.ts +++ b/packages/core/pipeline/src/core/executor.ts @@ -389,6 +389,9 @@ export class Executor { }; await instance.setCtx(taskCtx); + if (!(instance instanceof AbstractTaskPlugin)) { + throw new Error(`插件类型错误:${step.type}不是AbstractTaskPlugin的实例`); + } await instance.onInstance(); const result = await instance.execute(); //执行结果处理 @@ -398,6 +401,7 @@ export class Executor { } //输出上下文变量到output context forEach(define.output, (item: any, key: any) => { + // @ts-ignore step.status!.output[key] = instance[key]; // const stepOutputKey = `step.${step.id}.${key}`; // this.runtime.context[stepOutputKey] = instance[key]; @@ -411,7 +415,8 @@ export class Executor { merge(vars, instance._result.pipelineVars); await this.pipelineContext.setObj("vars", vars); } - if (Object.keys(instance._result.pipelinePrivateVars).length > 0) { + // @ts-ignore + if (Object.keys(instance._result?.pipelinePrivateVars).length > 0) { // 判断 pipelineVars 有值时更新 let vars = await this.pipelineContext.getObj("privateVars"); vars = vars || {}; diff --git a/packages/libs/lib-server/src/system/basic/service/plus-service.ts b/packages/libs/lib-server/src/system/basic/service/plus-service.ts index ad5b9c1ad..5fadece9e 100644 --- a/packages/libs/lib-server/src/system/basic/service/plus-service.ts +++ b/packages/libs/lib-server/src/system/basic/service/plus-service.ts @@ -164,7 +164,7 @@ export class PlusService { baseURL: plusRequestService.getBaseURL(), method: "post", headers: { - Authorization: `Berear ${token}`, + Authorization: `Bearer ${token}`, }, }); const res = await http.request(config); @@ -173,4 +173,9 @@ export class PlusService { } return res.data; } + + async request(config: HttpRequestConfig) { + const plusRequestService = await this.getPlusRequestService(); + return await plusRequestService.request(config); + } } diff --git a/packages/ui/certd-client/src/layout/layout-basic.vue b/packages/ui/certd-client/src/layout/layout-basic.vue index 39a2f3f78..111de3101 100644 --- a/packages/ui/certd-client/src/layout/layout-basic.vue +++ b/packages/ui/certd-client/src/layout/layout-basic.vue @@ -108,10 +108,10 @@ const projectStore = useProjectStore(); + diff --git a/packages/ui/certd-client/src/layout/layout-pass.vue b/packages/ui/certd-client/src/layout/layout-pass.vue index ef62eba7f..617e275d4 100644 --- a/packages/ui/certd-client/src/layout/layout-pass.vue +++ b/packages/ui/certd-client/src/layout/layout-pass.vue @@ -2,9 +2,8 @@ - - +--> +const settingsStore = useSettingStore(); + diff --git a/packages/ui/certd-client/src/locales/langs/en-US/certd/common.ts b/packages/ui/certd-client/src/locales/langs/en-US/certd/common.ts index 8b5aa3fdd..3be5ef990 100644 --- a/packages/ui/certd-client/src/locales/langs/en-US/certd/common.ts +++ b/packages/ui/certd-client/src/locales/langs/en-US/certd/common.ts @@ -46,6 +46,7 @@ export default { default: "Default", success: "Success", test: "Test", + operation: "Operation", testButton: "Test", operationSuccess: "Operation successful", batch_delete: "Batch Delete", diff --git a/packages/ui/certd-client/src/locales/langs/en-US/certd/sys-plugin.ts b/packages/ui/certd-client/src/locales/langs/en-US/certd/sys-plugin.ts index 830f78a40..ab7fe623b 100644 --- a/packages/ui/certd-client/src/locales/langs/en-US/certd/sys-plugin.ts +++ b/packages/ui/certd-client/src/locales/langs/en-US/certd/sys-plugin.ts @@ -42,6 +42,36 @@ export default { pluginGroup: "Plugin Group", pluginManagement: "Plugin Management", pluginBetaWarning: "Custom plugins are in BETA and may have breaking changes in future", + localPlugin: "Installed", + pluginMarket: "Plugin Market", + installedStorePlugin: "Installed", + onlinePluginManagement: "Online Plugins", + onlinePluginSearch: "Search online plugins", + onlinePluginSync: "Sync Plugin Market", + onlinePluginSyncFirst: "Sync the plugin market list first, then search and install plugins", + onlinePluginSyncSuccess: "Plugin market list synced successfully", + onlinePluginLastSyncTime: "Last synced: {time}", + onlinePluginNotSynced: "Plugin market has not been synced", + onlinePluginRefresh: "Refresh List", + onlinePluginInstall: "Install", + onlinePluginUpdate: "Update", + onlinePluginReinstall: "Reinstall", + onlinePluginUninstall: "Uninstall", + onlinePluginStatus: "Status", + onlinePluginInstalled: "Installed", + onlinePluginEnabled: "Enabled", + onlinePluginDisabled: "Disabled", + onlinePluginClickToEnable: "Click to enable", + onlinePluginClickToDisable: "Click to disable", + onlinePluginDownloadCount: "Downloads: {count}", + onlinePluginNotInstalled: "Not Installed", + onlinePluginUpgradeAvailable: "Upgradeable", + onlinePluginCurrentVersion: "Current {version}", + onlinePluginAlreadyLatest: "Already up to date", + onlinePluginClickToUpdate: "Click to update", + onlinePluginInstallSuccess: "Online plugin installed successfully", + onlinePluginUninstallSuccess: "Online plugin uninstalled successfully", + onlinePluginDeleteConfirm: 'Are you sure you want to uninstall online plugin "{name}"? Pipelines using this plugin may fail after deletion.', pleaseSelectRecord: "Please select records first", clearRuntimeDeps: "Clear Runtime Deps Cache", clearRuntimeDepsTooltip: "Restart the certd container after clearing, otherwise cached modules will not be reloaded", diff --git a/packages/ui/certd-client/src/locales/langs/zh-CN/certd/common.ts b/packages/ui/certd-client/src/locales/langs/zh-CN/certd/common.ts index 70b6a89ac..042a46e74 100644 --- a/packages/ui/certd-client/src/locales/langs/zh-CN/certd/common.ts +++ b/packages/ui/certd-client/src/locales/langs/zh-CN/certd/common.ts @@ -50,6 +50,7 @@ export default { default: "默认", success: "成功", test: "测试", + operation: "操作", testButton: "测试", operationSuccess: "操作成功", batch_delete: "批量删除", diff --git a/packages/ui/certd-client/src/locales/langs/zh-CN/certd/sys-plugin.ts b/packages/ui/certd-client/src/locales/langs/zh-CN/certd/sys-plugin.ts index fd4c67246..bb40ea29e 100644 --- a/packages/ui/certd-client/src/locales/langs/zh-CN/certd/sys-plugin.ts +++ b/packages/ui/certd-client/src/locales/langs/zh-CN/certd/sys-plugin.ts @@ -41,6 +41,36 @@ export default { pluginGroup: "插件分组", pluginManagement: "插件管理", pluginBetaWarning: "自定义插件处于BETA测试版,后续可能会有破坏性变更", + localPlugin: "本地插件", + pluginMarket: "插件市场", + installedStorePlugin: "已安装", + onlinePluginManagement: "在线插件", + onlinePluginSearch: "搜索在线插件", + onlinePluginSync: "同步插件市场", + onlinePluginSyncFirst: "请先同步插件市场列表,然后再搜索和安装插件", + onlinePluginSyncSuccess: "插件市场列表同步成功", + onlinePluginLastSyncTime: "上次同步时间:{time}", + onlinePluginNotSynced: "尚未同步插件市场", + onlinePluginRefresh: "刷新列表", + onlinePluginInstall: "安装", + onlinePluginUpdate: "更新", + onlinePluginReinstall: "重新安装", + onlinePluginUninstall: "卸载", + onlinePluginStatus: "状态", + onlinePluginInstalled: "已安装", + onlinePluginEnabled: "已启用", + onlinePluginDisabled: "已禁用", + onlinePluginClickToEnable: "点击启用", + onlinePluginClickToDisable: "点击禁用", + onlinePluginDownloadCount: "下载量:{count}", + onlinePluginNotInstalled: "未安装", + onlinePluginUpgradeAvailable: "可更新", + onlinePluginCurrentVersion: "当前 {version}", + onlinePluginAlreadyLatest: "当前已是最新版本", + onlinePluginClickToUpdate: "点击更新", + onlinePluginInstallSuccess: "在线插件安装成功", + onlinePluginUninstallSuccess: "在线插件卸载成功", + onlinePluginDeleteConfirm: "确定要卸载在线插件「{name}」吗?如果该插件已被流水线使用,删除可能会导致执行失败。", pleaseSelectRecord: "请先勾选记录", clearRuntimeDeps: "清理第三方依赖缓存", clearRuntimeDepsTooltip: "清除后需重启 certd 容器,否则已缓存模块不会重新读取", diff --git a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/step-form/index.vue b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/step-form/index.vue index e053a2b8b..ecdcb8a62 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/step-form/index.vue +++ b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/step-form/index.vue @@ -12,59 +12,21 @@