Merge branch 'next' into develop

This commit is contained in:
nocobase[bot]
2025-10-13 06:18:13 +00:00
+16 -4
View File
@@ -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;
}