mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 07:25:15 +00:00
fix(pm): parse name
This commit is contained in:
parent
3b7342456f
commit
c5b803a750
@ -2,7 +2,7 @@ import { Migration } from '../migration';
|
||||
|
||||
export default class extends Migration {
|
||||
on = 'afterSync'; // 'beforeLoad' or 'afterLoad'
|
||||
appVersion = '<1.0.0-alpha.1';
|
||||
appVersion = '<1.0.0-alpha.3';
|
||||
|
||||
async up() {
|
||||
const items = await this.pm.repository.find();
|
@ -530,6 +530,7 @@ export class PluginManager {
|
||||
const toBeUpdated = [];
|
||||
for (const name of pluginNames) {
|
||||
const { name: pluginName } = await PluginManager.parseName(name);
|
||||
console.log('pluginName', pluginName);
|
||||
const plugin = this.get(pluginName);
|
||||
if (!plugin) {
|
||||
throw new Error(`${pluginName} plugin does not exist`);
|
||||
@ -822,7 +823,7 @@ export class PluginManager {
|
||||
|
||||
const { packageName, tempFile, tempPackageContentDir } = await downloadAndUnzipToTempDir(file, authToken);
|
||||
|
||||
const name = options.name || packageName;
|
||||
const { name } = await PluginManager.parseName(packageName);
|
||||
|
||||
if (this.has(name)) {
|
||||
await removeTmpDir(tempFile, tempPackageContentDir);
|
||||
@ -857,7 +858,7 @@ export class PluginManager {
|
||||
authToken,
|
||||
);
|
||||
|
||||
const name = options.name || packageName;
|
||||
const { name } = await PluginManager.parseName(packageName);
|
||||
|
||||
if (this.has(name)) {
|
||||
await removeTmpDir(tempFile, tempPackageContentDir);
|
||||
|
Loading…
Reference in New Issue
Block a user