@playcraft/build 0.1.51 → 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 CHANGED
@@ -209,4 +209,4 @@ console.log(adapter.getDefaultFormat()); // "html"
209
209
 
210
210
  - `@playcraft/cli`:CLI 工具
211
211
  - `@playcraft/worker`:队列消费与异步构建
212
- - `@playcraft/backend`:类型定义用于参数校验
212
+ - `@playcraft/backend-business-server`:类型定义用于参数校验
@@ -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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcraft/build",
3
- "version": "0.1.51",
3
+ "version": "0.1.53-beta",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",