@playcraft/build 0.1.24 → 0.1.26
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
|
@@ -76,6 +76,9 @@ export class GenericAdapter {
|
|
|
76
76
|
{ file: 'pnpm-lock.yaml', manager: 'pnpm' },
|
|
77
77
|
{ file: 'yarn.lock', manager: 'yarn' },
|
|
78
78
|
{ file: 'package-lock.json', manager: 'npm' },
|
|
79
|
+
{ file: 'npm-shrinkwrap.json', manager: 'npm' },
|
|
80
|
+
{ file: 'bun.lock', manager: 'bun' },
|
|
81
|
+
{ file: 'bun.lockb', manager: 'bun' },
|
|
79
82
|
];
|
|
80
83
|
for (const { file, manager } of lockFiles) {
|
|
81
84
|
try {
|
|
@@ -163,7 +166,7 @@ export class GenericAdapter {
|
|
|
163
166
|
*/
|
|
164
167
|
async runNpmBuild(packageManager, script) {
|
|
165
168
|
const cmd = packageManager === 'npm' ? 'npm' : packageManager;
|
|
166
|
-
const args = packageManager === 'npm' ? ['run', script] : [script];
|
|
169
|
+
const args = packageManager === 'npm' || packageManager === 'bun' ? ['run', script] : [script];
|
|
167
170
|
console.log(`[GenericAdapter] 运行: ${cmd} ${args.join(' ')}`);
|
|
168
171
|
await this.runCommandWithTimeout(cmd, args, {
|
|
169
172
|
cwd: this.projectDir,
|
|
@@ -282,6 +285,12 @@ export class GenericAdapter {
|
|
|
282
285
|
const entries = await fs.readdir(src, { withFileTypes: true });
|
|
283
286
|
for (const entry of entries) {
|
|
284
287
|
const srcPath = path.join(src, entry.name);
|
|
288
|
+
if (entry.name === '.playcraft.json')
|
|
289
|
+
continue;
|
|
290
|
+
if (path.basename(src) === '.playcraft' && ['skills', 'skill-artifacts', 'video-replication', 'workspace-context.json'].includes(entry.name))
|
|
291
|
+
continue;
|
|
292
|
+
if (entry.name === 'user_uploads' && path.basename(src) === '.tmp')
|
|
293
|
+
continue;
|
|
285
294
|
const destPath = path.join(dest, entry.name);
|
|
286
295
|
// 安全检查:确保目标路径在输出目录内
|
|
287
296
|
const resolvedDest = path.resolve(destPath);
|