mirror of
https://github.com/nocobase/nocobase.git
synced 2026-09-21 05:44:51 +08:00
Merge branch 'next' into develop
This commit is contained in:
@@ -93,10 +93,18 @@ class Package {
|
||||
if (await fs.exists(file)) {
|
||||
return true;
|
||||
}
|
||||
file = path.resolve(process.cwd(), 'node_modules', this.packageName, 'package.json');
|
||||
if (await fs.exists(file)) {
|
||||
console.log(chalk.yellowBright(`Skipped: ${this.packageName} is in node_modules`));
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
async isDepPackage() {
|
||||
const pkg1 = path.resolve(process.cwd(), 'node_modules', this.packageName, 'package.json');
|
||||
const pkg2 = path.resolve(process.cwd(), process.env.PLUGIN_STORAGE_PATH, this.packageName, 'package.json');
|
||||
if (await fs.exists(pkg1) && await fs.exists(pkg2)) {
|
||||
const readPath1 = fs.realpathSync(pkg1);
|
||||
const readPath2 = fs.realpathSync(pkg2);
|
||||
if (readPath1 !== readPath2) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -117,6 +125,10 @@ class Package {
|
||||
console.log(chalk.yellowBright(`Skipped: ${this.packageName} is dev package`));
|
||||
return;
|
||||
}
|
||||
if (await this.isDepPackage()) {
|
||||
console.log(chalk.yellowBright(`Skipped: ${this.packageName} is dependency package`));
|
||||
return;
|
||||
}
|
||||
if (await this.isDownloaded(options.version)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user