@htyf-mp/cli 0.2.0-alpha.12 → 0.2.0-alpha.13

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/debug.mjs +5 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htyf-mp/cli",
3
- "version": "0.2.0-alpha.12",
3
+ "version": "0.2.0-alpha.13",
4
4
  "description": "红糖云服app小程序模板-cli",
5
5
  "type": "module",
6
6
  "bin": {
package/src/debug.mjs CHANGED
@@ -13,15 +13,16 @@ import { printQrcode } from './utils-functions.mjs';
13
13
  /**
14
14
  * 小程序真机调试
15
15
  * @param {object} newAppInfo - 应用信息
16
+ * @param {boolean} isGodot - 是否为 Godot 项目
16
17
  */
17
- export async function mpDebugShell(newAppInfo) {
18
+ export async function mpDebugShell(newAppInfo, isGodot = false) {
18
19
  try {
19
- // 验证必需字段
20
- if (!newAppInfo.entry) {
20
+ // 验证必需字段(Godot 项目不需要 entry)
21
+ if (!isGodot && !newAppInfo.entry) {
21
22
  throw new Error('缺少必需的应用信息: entry');
22
23
  }
23
24
 
24
- const zipPath = await mpBuildShell(newAppInfo);
25
+ const zipPath = await mpBuildShell(newAppInfo, isGodot);
25
26
  const assetsPath = path.dirname(zipPath);
26
27
  const appJsonPath = path.join(assetsPath, 'app.json');
27
28