diff --git a/src/platform/node/extension-manager/lib/handler.ts b/src/platform/node/extension-manager/lib/handler.ts index 5dacb5f92..e2d5604a0 100644 --- a/src/platform/node/extension-manager/lib/handler.ts +++ b/src/platform/node/extension-manager/lib/handler.ts @@ -97,8 +97,9 @@ export class ModuleHandler extends CoreHandler { // console.log(npmCli.commands.run('version')); // console.log('command', [command].concat(modules), this.baseDir); npmCli.load({ 'bin-links': false, verbose: true, prefix: this.baseDir }, (loaderr) => { + const moduleList = modules.map((it) => it + '@latest'); if (command === 'install') { - npmCli.commands.install(modules, (err, data) => { + npmCli.commands.install(moduleList, (err, data) => { process.chdir(this.baseDir); if (err) { reject(err); @@ -107,7 +108,7 @@ export class ModuleHandler extends CoreHandler { }); } if (command === 'uninstall') { - npmCli.commands.uninstall(modules, (err, data) => { + npmCli.commands.uninstall(moduleList, (err, data) => { process.chdir(this.baseDir); if (err) { reject(err); diff --git a/src/workbench/browser/src/app/pages/extension/list/extension-list.component.ts b/src/workbench/browser/src/app/pages/extension/list/extension-list.component.ts index ee3ab7605..67e6de2bd 100644 --- a/src/workbench/browser/src/app/pages/extension/list/extension-list.component.ts +++ b/src/workbench/browser/src/app/pages/extension/list/extension-list.component.ts @@ -44,7 +44,7 @@ export class ExtensionListComponent implements OnInit { } const res: any = await this.extensionService.requestList(); if (this.type === 'official') { - return new ExtensionList(res.data.filter((it) => it.author === 'Eolink')).search(keyword); + return new ExtensionList(res.data.filter((it) => it.author === 'Eoapi')).search(keyword); } return new ExtensionList(res.data).search(keyword); } diff --git a/src/workbench/browser/src/app/shared/components/sync-api/sync-api.component.ts b/src/workbench/browser/src/app/shared/components/sync-api/sync-api.component.ts index 6290e4c1e..070f662a7 100644 --- a/src/workbench/browser/src/app/shared/components/sync-api/sync-api.component.ts +++ b/src/workbench/browser/src/app/shared/components/sync-api/sync-api.component.ts @@ -21,24 +21,23 @@ export class SyncApiComponent implements OnInit { ...data, }); }); + const { key } = this.supportList.at(0); + this.pushType = key; } async submit() { const feature = this.featureMap.get(this.pushType); const action = feature.action || null; const module = window.eo.loadFeatureModule(this.pushType); // TODO 临时取值方式需要修改 - const { - url, - token: secretKey, - projectId, - } = window.eo.getModuleSettings('eoapi-feature-push-eolink.eolink.remoteServer'); + const { token: secretKey, projectId } = window.eo.getModuleSettings( + 'eoapi-feature-push-eolink.eolink.remoteServer' + ); if (module && module[action] && typeof module[action] === 'function') { this.storage.run('projectExport', [], async (result: StorageHandleResult) => { if (result.status === StorageHandleStatus.success) { result.data.version = packageJson.version; try { const output = await module[action](result.data, { - url, projectId, secretKey, });