@playcraft/build 0.1.52 → 0.1.53-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/engines/generic-adapter.js +10 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -84,6 +84,9 @@ export class GenericAdapter {
|
|
|
84
84
|
{ file: 'pnpm-lock.yaml', manager: 'pnpm' },
|
|
85
85
|
{ file: 'yarn.lock', manager: 'yarn' },
|
|
86
86
|
{ file: 'package-lock.json', manager: 'npm' },
|
|
87
|
+
{ file: 'npm-shrinkwrap.json', manager: 'npm' },
|
|
88
|
+
{ file: 'bun.lock', manager: 'bun' },
|
|
89
|
+
{ file: 'bun.lockb', manager: 'bun' },
|
|
87
90
|
];
|
|
88
91
|
for (const { file, manager } of lockFiles) {
|
|
89
92
|
try {
|
|
@@ -174,7 +177,7 @@ export class GenericAdapter {
|
|
|
174
177
|
*/
|
|
175
178
|
async runNpmBuild(packageManager, script) {
|
|
176
179
|
const cmd = packageManager === 'npm' ? 'npm' : packageManager;
|
|
177
|
-
const args = packageManager === 'npm' ? ['run', script] : [script];
|
|
180
|
+
const args = packageManager === 'npm' || packageManager === 'bun' ? ['run', script] : [script];
|
|
178
181
|
console.log(`[GenericAdapter] 运行: ${cmd} ${args.join(' ')}`);
|
|
179
182
|
await this.runCommandWithTimeout(cmd, args, {
|
|
180
183
|
cwd: this.projectDir,
|
|
@@ -342,6 +345,12 @@ export class GenericAdapter {
|
|
|
342
345
|
const entries = await fs.readdir(src, { withFileTypes: true });
|
|
343
346
|
for (const entry of entries) {
|
|
344
347
|
const srcPath = path.join(src, entry.name);
|
|
348
|
+
if (entry.name === '.playcraft.json')
|
|
349
|
+
continue;
|
|
350
|
+
if (path.basename(src) === '.playcraft' && ['skills', 'skill-artifacts', 'video-replication', 'workspace-context.json'].includes(entry.name))
|
|
351
|
+
continue;
|
|
352
|
+
if (entry.name === 'user_uploads' && path.basename(src) === '.tmp')
|
|
353
|
+
continue;
|
|
345
354
|
const destPath = path.join(dest, entry.name);
|
|
346
355
|
// 安全检查:确保目标路径在输出目录内
|
|
347
356
|
const resolvedDest = path.resolve(destPath);
|