mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08: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 {
|
export default class extends Migration {
|
||||||
on = 'afterSync'; // 'beforeLoad' or 'afterLoad'
|
on = 'afterSync'; // 'beforeLoad' or 'afterLoad'
|
||||||
appVersion = '<1.0.0-alpha.1';
|
appVersion = '<1.0.0-alpha.3';
|
||||||
|
|
||||||
async up() {
|
async up() {
|
||||||
const items = await this.pm.repository.find();
|
const items = await this.pm.repository.find();
|
@ -530,6 +530,7 @@ export class PluginManager {
|
|||||||
const toBeUpdated = [];
|
const toBeUpdated = [];
|
||||||
for (const name of pluginNames) {
|
for (const name of pluginNames) {
|
||||||
const { name: pluginName } = await PluginManager.parseName(name);
|
const { name: pluginName } = await PluginManager.parseName(name);
|
||||||
|
console.log('pluginName', pluginName);
|
||||||
const plugin = this.get(pluginName);
|
const plugin = this.get(pluginName);
|
||||||
if (!plugin) {
|
if (!plugin) {
|
||||||
throw new Error(`${pluginName} plugin does not exist`);
|
throw new Error(`${pluginName} plugin does not exist`);
|
||||||
@ -822,7 +823,7 @@ export class PluginManager {
|
|||||||
|
|
||||||
const { packageName, tempFile, tempPackageContentDir } = await downloadAndUnzipToTempDir(file, authToken);
|
const { packageName, tempFile, tempPackageContentDir } = await downloadAndUnzipToTempDir(file, authToken);
|
||||||
|
|
||||||
const name = options.name || packageName;
|
const { name } = await PluginManager.parseName(packageName);
|
||||||
|
|
||||||
if (this.has(name)) {
|
if (this.has(name)) {
|
||||||
await removeTmpDir(tempFile, tempPackageContentDir);
|
await removeTmpDir(tempFile, tempPackageContentDir);
|
||||||
@ -857,7 +858,7 @@ export class PluginManager {
|
|||||||
authToken,
|
authToken,
|
||||||
);
|
);
|
||||||
|
|
||||||
const name = options.name || packageName;
|
const { name } = await PluginManager.parseName(packageName);
|
||||||
|
|
||||||
if (this.has(name)) {
|
if (this.has(name)) {
|
||||||
await removeTmpDir(tempFile, tempPackageContentDir);
|
await removeTmpDir(tempFile, tempPackageContentDir);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user