@playcraft/build 0.1.53-beta → 0.1.54

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-business-server`:类型定义用于参数校验
212
+ - `@playcraft/backend`:类型定义用于参数校验
@@ -84,9 +84,6 @@ 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' },
90
87
  ];
91
88
  for (const { file, manager } of lockFiles) {
92
89
  try {
@@ -177,7 +174,7 @@ export class GenericAdapter {
177
174
  */
178
175
  async runNpmBuild(packageManager, script) {
179
176
  const cmd = packageManager === 'npm' ? 'npm' : packageManager;
180
- const args = packageManager === 'npm' || packageManager === 'bun' ? ['run', script] : [script];
177
+ const args = packageManager === 'npm' ? ['run', script] : [script];
181
178
  console.log(`[GenericAdapter] 运行: ${cmd} ${args.join(' ')}`);
182
179
  await this.runCommandWithTimeout(cmd, args, {
183
180
  cwd: this.projectDir,
@@ -345,12 +342,6 @@ export class GenericAdapter {
345
342
  const entries = await fs.readdir(src, { withFileTypes: true });
346
343
  for (const entry of entries) {
347
344
  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;
354
345
  const destPath = path.join(dest, entry.name);
355
346
  // 安全检查:确保目标路径在输出目录内
356
347
  const resolvedDest = path.resolve(destPath);
@@ -1069,7 +1069,8 @@ export class PlayableScriptsAdapter {
1069
1069
  if (parts.length >= 3) {
1070
1070
  // dist/<theme>/<channel>/<file>.html
1071
1071
  theme = parts[0];
1072
- channel = parts[1];
1072
+ // 兼容 devkit 的 <主题>_<渠道> 目录,目录渠道优先于文件名。
1073
+ channel = targetChannels.find((ch) => artifactMatchesChannel(parts[1], ch)) ?? parts[1];
1073
1074
  }
1074
1075
  else if (parts.length === 2) {
1075
1076
  // dist/<channel>/<file>.html 或 dist/<theme>/<file>.html
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcraft/build",
3
- "version": "0.1.53-beta",
3
+ "version": "0.1.54",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",