@playcraft/build 0.0.24 → 0.0.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.
@@ -1027,7 +1027,11 @@ export class PlayableScriptsAdapter {
1027
1027
  `命令: ${cmd} ${args.join(' ')}\n` +
1028
1028
  `playable-scripts 批量构建可能需要更长时间,请考虑减少渠道/主题数量。`));
1029
1029
  }, options.timeout);
1030
- const child = spawn(cmd, args, {
1030
+ // shell: true 时 Node.js 把 cmd + args 拼接成 shell 字符串,
1031
+ // 但不会转义 args 中的特殊字符(如 URL 里的 &)。
1032
+ // 用单引号包裹每个 arg 防止 shell 解析(单引号内只有 ' 本身需要转义)。
1033
+ const shellSafeArgs = args.map(a => `'${a.replace(/'/g, "'\\''")}'`);
1034
+ const child = spawn(cmd, shellSafeArgs, {
1031
1035
  cwd: options.cwd,
1032
1036
  env: options.env,
1033
1037
  stdio: 'pipe',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcraft/build",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",