Skip to content

Commit

Permalink
feat: delete url config in sync-api component
Browse files Browse the repository at this point in the history
  • Loading branch information
kungfuboy committed Jun 1, 2022
1 parent 2a2602a commit 363977e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
5 changes: 3 additions & 2 deletions src/platform/node/extension-manager/lib/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down

0 comments on commit 363977e

Please sign in to comment.