@heybox/hb-sdk 0.9.5-alpha.2 → 0.9.5-alpha.4

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 (36) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +1 -1
  3. package/dist/cli-chunks/{artifact-BQm9xFcY.cjs → artifact-Ugqa6hRL.cjs} +3 -3
  4. package/dist/cli-chunks/{build-D6tP7Uje.cjs → build-D_o_QRjp.cjs} +5 -5
  5. package/dist/cli-chunks/{create-BBXC3wLI.cjs → create-C1D1kfK1.cjs} +1 -1
  6. package/dist/cli-chunks/{dev-XoWrqt1g.cjs → dev-BYJDJ6ke.cjs} +67 -12
  7. package/dist/cli-chunks/{dev-context-Gh3m20fd.cjs → dev-context-Dh5ZouxP.cjs} +2 -2
  8. package/dist/cli-chunks/{doctor-Cuc3EQQ8.cjs → doctor-ScJqxOUG.cjs} +1 -1
  9. package/dist/cli-chunks/{games-CoddgAux.cjs → games-DnIZgZPn.cjs} +1 -1
  10. package/dist/cli-chunks/{index-CS6WpCn8.cjs → index-2pJPXX7y.cjs} +17 -17
  11. package/dist/cli-chunks/{index-_1anHmAG.cjs → index-CW36RfnA.cjs} +1 -1
  12. package/dist/cli-chunks/{index.esm-CrdqnD7E.cjs → index.esm-DNEjZuBT.cjs} +6 -6
  13. package/dist/cli-chunks/{login-Bk3T3PMe.cjs → login-BnnzOwbT.cjs} +1 -1
  14. package/dist/cli-chunks/{project-vite-CL-SW3RW.cjs → project-vite-N357IKfz.cjs} +1 -1
  15. package/dist/cli-chunks/{remote-Dfg2HLIt.cjs → remote-CaHGCahf.cjs} +6 -6
  16. package/dist/cli-chunks/{runtime-permission-env-CgH1Dz4q.cjs → runtime-permission-env-DidMNelj.cjs} +2 -2
  17. package/dist/cli-chunks/{skill-BGxlDR-g.cjs → skill-CRBhszbC.cjs} +2 -2
  18. package/dist/cli-chunks/{version-B1hlMGq2.cjs → version-BzAY2vKb.cjs} +1 -1
  19. package/dist/cli.cjs +1 -1
  20. package/dist/devtools/browser-dev-host/assets/brand-watermark-FfehWVaf.svg +8 -0
  21. package/dist/devtools/browser-dev-host/assets/browser-dev-host-ChhgKXkj.js +102 -0
  22. package/dist/devtools/browser-dev-host/assets/desktop-app-launch-BaoJXhJT.js +6 -0
  23. package/dist/devtools/browser-dev-host/assets/index-D5U_vWLN.js +567 -0
  24. package/dist/devtools/browser-dev-host/assets/index-DSTlrpnQ.css +1 -0
  25. package/dist/devtools/browser-dev-host/index.html +3 -3
  26. package/dist/index.cjs.js +1 -1
  27. package/dist/index.esm.js +1 -1
  28. package/dist/vite.cjs.js +1 -1
  29. package/dist/vite.esm.js +1 -1
  30. package/package.json +6 -6
  31. package/skill/skill.json +4 -4
  32. package/types/index.d.ts +2 -1
  33. package/dist/devtools/browser-dev-host/assets/browser-dev-host-BHv7t_Sz.js +0 -102
  34. package/dist/devtools/browser-dev-host/assets/desktop-app-launch-DlaXmxAI.js +0 -6
  35. package/dist/devtools/browser-dev-host/assets/index-CmITJMxu.js +0 -567
  36. package/dist/devtools/browser-dev-host/assets/index-h-fYisyX.css +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  本文件随 `@heybox/hb-sdk` npm 包公开分发,只记录外部小程序开发者可观察到的变化。
4
4
 
5
+ ## 0.9.5-alpha.4 - 2026-10-30
6
+
7
+ ### 文档与工具
8
+
9
+ - 修正 [auth.getAccountState()](https://docs.xiaoheihe.cn/hb_sdk/reference/sdk/auth/getAccountState) 的类型注释,明确 Mobile 账号快照及切号后重新打开小程序的要求。
10
+
11
+ ## 0.9.5-alpha.3 - 2026-10-30
12
+
13
+ ### 新增能力
14
+
15
+ - [hb-sdk dev](https://docs.xiaoheihe.cn/hb_sdk/guide/cli) 调试台新增“桌面”预览,按[窗口尺寸声明](https://docs.xiaoheihe.cn/hb_sdk/guide/window-size.html)初始化窗口,支持拖拽缩放、最大化与还原、最小化后恢复同一实例,以及关闭后重新打开;系统信息跟随运行 CLI 的本机,`viewport.setDisplay()` 返回不支持。
16
+
17
+ ### 文档与工具
18
+
19
+ - 桌面预览使用深色标题栏和胶囊窗口操作区,“更多”中支持复制链接与刷新;修复刷新按钮被工具栏挤压成椭圆的问题。
20
+
5
21
  ## 0.9.5-alpha.2 - 2026-10-29
6
22
 
7
23
  ### 文档与工具
package/README.md CHANGED
@@ -505,7 +505,7 @@ CLI 会复用已验证产物、跳过该 ZIP 的网络上传;Web 文件及发
505
505
 
506
506
  `hb-sdk create` 默认生成可直接删除的 Vanilla JavaScript + Vite HelloWorld,只保留 SDK Toast 示例、三端 Manifest 和开发/构建/部署命令,不绑定业务框架或项目内测试工具。
507
507
 
508
- `hb-sdk dev` 会启动 Vue 3 Browser Dev Host。左侧诊断面板集中展示结构化日志、当前小程序作用域内的 Storage 快照和问题;日志区分 App、SDK、Network、Runtime、Host 来源,支持毫秒级时间、结果、耗时、重复计数、脱敏详情展开以及来源/级别筛选。右侧设备预览可在 iPhone 16 Pro Max(`440 x 956`)与 Pixel 9 Pro(`410 x 914`)间切换。切换预设只改变设备外框和 viewport,不会重新加载 iframe 或重启 Runtime;授权与操作弹窗、Toast、Loading 和振动反馈都限制在预览框内。
508
+ `hb-sdk dev` 会启动 Vue 3 Browser Dev Host。左侧诊断面板集中展示结构化日志、当前小程序作用域内的 Storage 快照和问题;日志区分 App、SDK、Network、Runtime、Host 来源,支持毫秒级时间、结果、耗时、重复计数、脱敏详情展开以及来源/级别筛选。右侧设备预览可在 iPhone 16 Pro Max(`440 x 956`)、Pixel 9 Pro(`410 x 914`)与“桌面”间切换。手机预设只改变设备外框和 viewport,不会重新加载 iframe 或重启 Runtime;切换手机与桌面会重新加载小程序并建立新实例。桌面模式按 `package.json#heybox.window` 初始化可缩放窗口,支持拖拽缩放、最大化/还原、最小化后恢复同一实例、关闭后重新打开新实例;系统信息与视口按运行 `hb-sdk dev` 的本机与窗口内容尺寸上报,`viewport.setDisplay()` 返回不支持,不模拟旋转或全屏。授权与操作弹窗、Toast、Loading 和振动反馈都限制在预览框内。
509
509
 
510
510
  配置 `package.json#heybox.companions`(平台写在 `package.json#heybox.platforms`)并启用无参 `miniappManifest()` 后,dev server 只向 loopback 提供 canonical Companion Manifest 和固定 ZIP 路由。CLI 在每次签发或刷新本地启动票前绑定 Manifest 摘要;普通 Web HMR 不改变 snapshot,权限声明、Companion 配置或产物变化会触发新快照与 Runtime 重建。调试台不展示 Browser、手机和 PC 的汇总就绪状态;真实入口不可用时只在对应入口内说明原因,并继续保留本地临时权限与线上未批准警告。未配置 Companion 时真实 PC Companion 保持不可用,Browser Fake 可继续做状态联调。
511
511
 
@@ -3,9 +3,9 @@
3
3
  var fs = require('node:fs');
4
4
  var fs$1 = require('node:fs/promises');
5
5
  var path = require('node:path');
6
- var runtimePermissionEnv = require('./runtime-permission-env-CgH1Dz4q.cjs');
7
- require('./version-B1hlMGq2.cjs');
8
- var index = require('./index-CS6WpCn8.cjs');
6
+ var runtimePermissionEnv = require('./runtime-permission-env-DidMNelj.cjs');
7
+ require('./version-BzAY2vKb.cjs');
8
+ var index = require('./index-2pJPXX7y.cjs');
9
9
  var node_crypto = require('node:crypto');
10
10
  require('node:zlib');
11
11
  require('node:module');
@@ -2,14 +2,14 @@
2
2
 
3
3
  var fs = require('node:fs/promises');
4
4
  var path = require('node:path');
5
- var runtimePermissionEnv = require('./runtime-permission-env-CgH1Dz4q.cjs');
6
- var index = require('./index-CS6WpCn8.cjs');
5
+ var runtimePermissionEnv = require('./runtime-permission-env-DidMNelj.cjs');
6
+ var index = require('./index-2pJPXX7y.cjs');
7
7
  require('node:crypto');
8
8
  require('node:fs');
9
9
  require('node:zlib');
10
- var artifact = require('./artifact-BQm9xFcY.cjs');
11
- var projectVite = require('./project-vite-CL-SW3RW.cjs');
12
- require('./version-B1hlMGq2.cjs');
10
+ var artifact = require('./artifact-Ugqa6hRL.cjs');
11
+ var projectVite = require('./project-vite-N357IKfz.cjs');
12
+ require('./version-BzAY2vKb.cjs');
13
13
  require('node:async_hooks');
14
14
  require('node:module');
15
15
  require('readline');
@@ -5,7 +5,7 @@ var fs = require('node:fs/promises');
5
5
  var path = require('node:path');
6
6
  var require$$0 = require('fs');
7
7
  var require$$1 = require('path');
8
- var index = require('./index-CS6WpCn8.cjs');
8
+ var index = require('./index-2pJPXX7y.cjs');
9
9
  require('node:module');
10
10
  require('readline');
11
11
  require('os');
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CS6WpCn8.cjs');
3
+ var index = require('./index-2pJPXX7y.cjs');
4
4
  var node_crypto = require('node:crypto');
5
5
  var fs = require('node:fs');
6
6
  var path = require('node:path');
7
- var runtimePermissionEnv = require('./runtime-permission-env-CgH1Dz4q.cjs');
8
- var version = require('./version-B1hlMGq2.cjs');
7
+ var runtimePermissionEnv = require('./runtime-permission-env-DidMNelj.cjs');
8
+ var version = require('./version-BzAY2vKb.cjs');
9
9
  require('node:zlib');
10
- var devContext = require('./dev-context-Gh3m20fd.cjs');
10
+ var devContext = require('./dev-context-Dh5ZouxP.cjs');
11
11
  var os = require('node:os');
12
12
  var net = require('node:net');
13
13
  var promises = require('node:dns/promises');
@@ -18,7 +18,7 @@ var fs$1 = require('node:fs/promises');
18
18
  var require$$0$1 = require('crypto');
19
19
  var require$$0 = require('buffer');
20
20
  var browser = require('./browser-RAy8e8cV.cjs');
21
- var projectVite = require('./project-vite-CL-SW3RW.cjs');
21
+ var projectVite = require('./project-vite-N357IKfz.cjs');
22
22
 
23
23
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
24
24
  const DEFAULT_DEV_CONTEXT_TIMEOUT_MS = 3000;
@@ -3056,8 +3056,8 @@ const DEFAULT_CHANNEL_TRANSPORT = {
3056
3056
  };
3057
3057
  const IPV4_LOOPBACK_ADDRESSES = new net.BlockList();
3058
3058
  IPV4_LOOPBACK_ADDRESSES.addSubnet('127.0.0.0', 8, 'ipv4');
3059
- const { WebSocket, WebSocketServer } = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/dev-XoWrqt1g.cjs', document.baseURI).href)))('ws');
3060
- const { parse: parseHtml } = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/dev-XoWrqt1g.cjs', document.baseURI).href)))('parse5');
3059
+ const { WebSocket, WebSocketServer } = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/dev-BYJDJ6ke.cjs', document.baseURI).href)))('ws');
3060
+ const { parse: parseHtml } = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/dev-BYJDJ6ke.cjs', document.baseURI).href)))('parse5');
3061
3061
  const BROWSER_DEV_HOST_ROOT_CANDIDATES = [
3062
3062
  path.resolve(__dirname, 'devtools/browser-dev-host'),
3063
3063
  path.resolve(__dirname, '../devtools/browser-dev-host'),
@@ -3093,6 +3093,8 @@ async function startBrowserDevHostServer(options) {
3093
3093
  miniProgram: options.miniProgram,
3094
3094
  miniProgramSupportsDesktop: options.miniProgramSupportsDesktop,
3095
3095
  workspaceCardsEnabled: options.workspaceCardsEnabled === true,
3096
+ windowForm: options.windowForm,
3097
+ hostPlatform: options.hostPlatform,
3096
3098
  mobileLaunchRedirect: initialMobileLaunchRedirect,
3097
3099
  nativeAppLaunchUnavailableReason: options.nativeAppLaunchUnavailableReason,
3098
3100
  miniProgramManifestAccessToken: options.miniProgramManifestAccessToken,
@@ -7110,6 +7112,33 @@ function resolveRequestAuth(ctx, requirement) {
7110
7112
  }
7111
7113
  return auth.require(requirement.realm, requirement.profile);
7112
7114
  }
7115
+ /**
7116
+ * 验证宿主能够代行当前请求声明的认证域,不能用宿主账号替代其它 realm/profile。
7117
+ *
7118
+ * @param ctx - 当前 runtime 上下文。
7119
+ * @param policy - 当前请求策略。
7120
+ * @param auth - 请求保留的认证声明。
7121
+ */
7122
+ function assertHostAuthRequirement(ctx, policy, auth) {
7123
+ const hostKey = policy.hostAuthKey;
7124
+ if (!hostKey?.realm) {
7125
+ throw new RuntimeAuthRequiredError('host-auth-key-missing');
7126
+ }
7127
+ if (!auth || auth === 'none') {
7128
+ return;
7129
+ }
7130
+ const requestKey = typeof auth === 'object'
7131
+ ? auth
7132
+ : ctx.auth && isRuntimeAuthManager$1(ctx.auth)
7133
+ ? { profile: ctx.auth.defaultProfile, realm: ctx.auth.defaultRealm }
7134
+ : ctx.auth?.getSession().authKey;
7135
+ if (!requestKey?.realm) {
7136
+ throw new RuntimeAuthRequiredError('host-auth-request-key-missing');
7137
+ }
7138
+ if (requestKey.realm !== hostKey.realm || requestKey.profile !== hostKey.profile) {
7139
+ throw new RuntimeAuthRequiredError('host-auth-key-mismatch');
7140
+ }
7141
+ }
7113
7142
  /**
7114
7143
  * 判断错误是否来自主动取消。
7115
7144
  *
@@ -7433,8 +7462,12 @@ function createRuntimeRequest(options) {
7433
7462
  observation.attemptCount = Math.max(observation.attemptCount, attempt + 1);
7434
7463
  const policyResolvedConfig = await applyPolicy(config, attempt, channel, channelPolicy);
7435
7464
  const authRequirement = normalizeAuthRequirement(policyResolvedConfig.auth);
7436
- const requestAuth = resolveRequestAuth(ctx, authRequirement);
7437
- if (attempt === 0 && shouldRequireAuth(policyResolvedConfig.auth)) {
7465
+ const hostAuth = policy?.authExecution === 'host';
7466
+ if (hostAuth) {
7467
+ assertHostAuthRequirement(ctx, policy, policyResolvedConfig.auth);
7468
+ }
7469
+ const requestAuth = hostAuth ? undefined : resolveRequestAuth(ctx, authRequirement);
7470
+ if (!hostAuth && attempt === 0 && shouldRequireAuth(policyResolvedConfig.auth)) {
7438
7471
  if (!requestAuth) {
7439
7472
  throw new RuntimeAuthRequiredError(`request:${policyResolvedConfig.url}`);
7440
7473
  }
@@ -7481,8 +7514,8 @@ function createRuntimeRequest(options) {
7481
7514
  data: await policy.resolveResponseData(response, policyContext),
7482
7515
  };
7483
7516
  }
7484
- const authExpired = (await requestAuth?.isAuthExpired?.(response)) ?? false;
7485
- if (authExpired || (await policy?.isAuthExpired?.(response, policyContext))) {
7517
+ const authExpired = !hostAuth && ((await requestAuth?.isAuthExpired?.(response)) || (await policy?.isAuthExpired?.(response, policyContext)));
7518
+ if (authExpired) {
7486
7519
  observation.status = response.status;
7487
7520
  if (attempt === 0 && (await refreshForReplay(requestAuth ?? ctx.auth))) {
7488
7521
  return send(config, observation, attempt + 1);
@@ -12183,7 +12216,7 @@ function assertNodeRuntimeCapabilities(ctx, settings) {
12183
12216
  function createNodeRealtimeDriverRegistry() {
12184
12217
  const registry = createRuntimeRealtimeDriverRegistry();
12185
12218
  registry.registerLazy('node-websocket', async () => {
12186
- const mod = await Promise.resolve().then(function () { return require('./index.esm-CrdqnD7E.cjs'); });
12219
+ const mod = await Promise.resolve().then(function () { return require('./index.esm-DNEjZuBT.cjs'); });
12187
12220
  return mod.createNodeWebSocketRuntimeDriver();
12188
12221
  });
12189
12222
  return registry;
@@ -16517,12 +16550,30 @@ const COMPANION_ARTIFACT_ACCESS_TOKEN_ENV = 'HB_SDK_COMPANION_ARTIFACT_ACCESS_TO
16517
16550
  // 本地 PC 调试 manifest 的专用令牌:开窗时扩展还没拿到 LocalDevelopmentBinding,只能靠启动 URI 带来。
16518
16551
  const MINI_PROGRAM_MANIFEST_ACCESS_TOKEN_ENV = 'HB_SDK_MINI_PROGRAM_MANIFEST_ACCESS_TOKEN';
16519
16552
  const COMPANION_ARTIFACT_ACCESS_TOKEN_HEADER = 'x-hb-sdk-companion-dev-token';
16553
+ /**
16554
+ * 把 Node 的 `process.platform` 归一为桌面预览使用的系统名。
16555
+ *
16556
+ * 桌面模式下 SDK `environment.getInfo()` 返回的是**运行 CLI 的电脑**,而不是浏览器看到的系统;
16557
+ * 未知平台回落到 `'unknown'`,不猜测成 Windows。
16558
+ */
16559
+ function resolveHostPlatform(platform) {
16560
+ if (platform === 'darwin')
16561
+ return 'macos';
16562
+ if (platform === 'win32')
16563
+ return 'windows';
16564
+ if (platform === 'linux')
16565
+ return 'linux';
16566
+ return 'unknown';
16567
+ }
16520
16568
  async function runDevCommand(options, runtime = {}) {
16521
16569
  const logger = runtime.logger ?? index.createCliLogger();
16522
16570
  const fetchImpl = runtime.fetchImpl ?? fetch;
16523
16571
  const openUrl = runtime.openExternalUrl ?? browser.openExternalUrl;
16524
16572
  const projectRoot = projectVite.findProjectRoot(runtime.cwd ?? process.cwd());
16525
16573
  const workspaceCardsDeclared = runtimePermissionEnv.readMiniappWorkspaceCardsFromPackageJson(projectRoot).declaration !== undefined;
16574
+ // 与 build 使用同一个声明校验入口:非法声明直接冒泡,避免调试台用错误尺寸静默预览。
16575
+ const windowForm = runtimePermissionEnv.readMiniappWindowFromPackageJson(projectRoot);
16576
+ const hostPlatform = runtime.hostPlatform ?? resolveHostPlatform(process.platform);
16526
16577
  const companionArtifactAccessToken = (runtime.randomBytes ?? node_crypto.randomBytes)(32).toString('base64url');
16527
16578
  const miniProgramManifestAccessToken = (runtime.randomBytes ?? node_crypto.randomBytes)(32).toString('base64url');
16528
16579
  const devSessionId = node_crypto.randomBytes(16).toString('hex');
@@ -16703,6 +16754,9 @@ async function runDevCommand(options, runtime = {}) {
16703
16754
  // 只在项目声明了桌面平台时向调试台暴露「在桌面端打开」入口。
16704
16755
  miniProgramSupportsDesktop: sessionView.miniProgramSupportsDesktop,
16705
16756
  workspaceCardsEnabled: workspaceCardsDeclared,
16757
+ // 桌面预览按项目声明初始化窗口尺寸,并按运行 CLI 的真实系统生成环境信息。
16758
+ windowForm,
16759
+ hostPlatform,
16706
16760
  cliAuth: runtime.cliAuth ?? createBrowserDevHostCliAuth({ env: runtime.env, fetchImpl }),
16707
16761
  onMobileDevSessionCreated: ({ devContextUrl, miniUrlOrigin }) => {
16708
16762
  mobileDevContextUrlsByOrigin.set(miniUrlOrigin, devContextUrl);
@@ -17078,6 +17132,7 @@ function isPrivateIPv4(address) {
17078
17132
  var dev = /*#__PURE__*/Object.freeze({
17079
17133
  __proto__: null,
17080
17134
  createMiniProgramDevLaunchVitePlugin: createMiniProgramDevLaunchVitePlugin,
17135
+ resolveHostPlatform: resolveHostPlatform,
17081
17136
  runDevCommand: runDevCommand
17082
17137
  });
17083
17138
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CS6WpCn8.cjs');
4
- var runtimePermissionEnv = require('./runtime-permission-env-CgH1Dz4q.cjs');
3
+ var index = require('./index-2pJPXX7y.cjs');
4
+ var runtimePermissionEnv = require('./runtime-permission-env-DidMNelj.cjs');
5
5
  var node_crypto = require('node:crypto');
6
6
  var fs = require('node:fs/promises');
7
7
  var path = require('node:path');
@@ -3,7 +3,7 @@
3
3
  var fs = require('node:fs/promises');
4
4
  var os = require('node:os');
5
5
  var path = require('node:path');
6
- var index = require('./index-CS6WpCn8.cjs');
6
+ var index = require('./index-2pJPXX7y.cjs');
7
7
  require('node:module');
8
8
  require('readline');
9
9
  require('os');
@@ -3,7 +3,7 @@
3
3
  var node_crypto = require('node:crypto');
4
4
  var fs = require('node:fs/promises');
5
5
  var path = require('node:path');
6
- var index = require('./index-CS6WpCn8.cjs');
6
+ var index = require('./index-2pJPXX7y.cjs');
7
7
  require('node:module');
8
8
  require('readline');
9
9
  require('os');
@@ -240,19 +240,19 @@ function requireArgument () {
240
240
 
241
241
  var command = {};
242
242
 
243
- const require$5 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-CS6WpCn8.cjs', document.baseURI).href)));
243
+ const require$5 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-2pJPXX7y.cjs', document.baseURI).href)));
244
244
  function __require$4() { return require$5("node:events"); }
245
245
 
246
- const require$4 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-CS6WpCn8.cjs', document.baseURI).href)));
246
+ const require$4 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-2pJPXX7y.cjs', document.baseURI).href)));
247
247
  function __require$3() { return require$4("node:child_process"); }
248
248
 
249
- const require$3 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-CS6WpCn8.cjs', document.baseURI).href)));
249
+ const require$3 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-2pJPXX7y.cjs', document.baseURI).href)));
250
250
  function __require$2() { return require$3("node:path"); }
251
251
 
252
- const require$2 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-CS6WpCn8.cjs', document.baseURI).href)));
252
+ const require$2 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-2pJPXX7y.cjs', document.baseURI).href)));
253
253
  function __require$1() { return require$2("node:fs"); }
254
254
 
255
- const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-CS6WpCn8.cjs', document.baseURI).href)));
255
+ const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/index-2pJPXX7y.cjs', document.baseURI).href)));
256
256
  function __require() { return require$1("node:process"); }
257
257
 
258
258
  var help = {};
@@ -17251,7 +17251,7 @@ async function inspectFeedbackLog(file, size) {
17251
17251
  return { mimeType: 'text/plain', width: 0, height: 0 };
17252
17252
  }
17253
17253
  async function createFeedbackCosClient(getToken) {
17254
- const { default: COS } = await Promise.resolve().then(function () { return require('./index-_1anHmAG.cjs'); }).then(function (n) { return n.index; });
17254
+ const { default: COS } = await Promise.resolve().then(function () { return require('./index-CW36RfnA.cjs'); }).then(function (n) { return n.index; });
17255
17255
  const cos = new COS({
17256
17256
  getAuthorization(_options, callback) {
17257
17257
  void getToken().then((token) => callback({
@@ -20452,7 +20452,7 @@ function installDevLogCommands(dev) {
20452
20452
  }
20453
20453
 
20454
20454
  const CLI_VERSION_PLACEHOLDER = ['__HB', 'SDK', 'CLI', 'VERSION__'].join('_');
20455
- const BUILT_CLI_VERSION = '0.9.5-alpha.2';
20455
+ const BUILT_CLI_VERSION = '0.9.5-alpha.4';
20456
20456
  const PACKAGE_JSON_CANDIDATES$1 = [
20457
20457
  path.resolve(__dirname, '..', '..', 'package.json'),
20458
20458
  path.resolve(__dirname, '..', 'package.json'),
@@ -21717,39 +21717,39 @@ function createCommandLoggerResolver(options) {
21717
21717
  };
21718
21718
  }
21719
21719
  const defaultClearLoginStatus = async (...args) => {
21720
- const { clearLoginStatus } = await Promise.resolve().then(function () { return require('./login-Bk3T3PMe.cjs'); });
21720
+ const { clearLoginStatus } = await Promise.resolve().then(function () { return require('./login-BnnzOwbT.cjs'); });
21721
21721
  return clearLoginStatus(...args);
21722
21722
  };
21723
21723
  const defaultLoginToHeybox = async (...args) => {
21724
- const { loginToHeybox } = await Promise.resolve().then(function () { return require('./login-Bk3T3PMe.cjs'); });
21724
+ const { loginToHeybox } = await Promise.resolve().then(function () { return require('./login-BnnzOwbT.cjs'); });
21725
21725
  return loginToHeybox(...args);
21726
21726
  };
21727
21727
  const defaultPrintLoginStatus = async (...args) => {
21728
- const { printLoginStatus } = await Promise.resolve().then(function () { return require('./login-Bk3T3PMe.cjs'); });
21728
+ const { printLoginStatus } = await Promise.resolve().then(function () { return require('./login-BnnzOwbT.cjs'); });
21729
21729
  return printLoginStatus(...args);
21730
21730
  };
21731
21731
  const defaultRunBuildCommand = async (...args) => {
21732
- const { runBuildCommand } = await Promise.resolve().then(function () { return require('./build-D6tP7Uje.cjs'); });
21732
+ const { runBuildCommand } = await Promise.resolve().then(function () { return require('./build-D_o_QRjp.cjs'); });
21733
21733
  return runBuildCommand(...args);
21734
21734
  };
21735
21735
  const defaultRunCreateCommand = async (...args) => {
21736
- const { runCreateCommand } = await Promise.resolve().then(function () { return require('./create-BBXC3wLI.cjs'); });
21736
+ const { runCreateCommand } = await Promise.resolve().then(function () { return require('./create-C1D1kfK1.cjs'); });
21737
21737
  return runCreateCommand(...args);
21738
21738
  };
21739
21739
  const defaultRunDevCommand = async (...args) => {
21740
- const { runDevCommand } = await Promise.resolve().then(function () { return require('./dev-XoWrqt1g.cjs'); }).then(function (n) { return n.dev; });
21740
+ const { runDevCommand } = await Promise.resolve().then(function () { return require('./dev-BYJDJ6ke.cjs'); }).then(function (n) { return n.dev; });
21741
21741
  return runDevCommand(...args);
21742
21742
  };
21743
21743
  const defaultRunDoctorCommand = async (...args) => {
21744
- const { runDoctorCommand } = await Promise.resolve().then(function () { return require('./doctor-Cuc3EQQ8.cjs'); });
21744
+ const { runDoctorCommand } = await Promise.resolve().then(function () { return require('./doctor-ScJqxOUG.cjs'); });
21745
21745
  return runDoctorCommand(...args);
21746
21746
  };
21747
21747
  const defaultRunSkillInstallCommand = async (...args) => {
21748
- const { runSkillInstallCommand } = await Promise.resolve().then(function () { return require('./skill-BGxlDR-g.cjs'); });
21748
+ const { runSkillInstallCommand } = await Promise.resolve().then(function () { return require('./skill-CRBhszbC.cjs'); });
21749
21749
  return runSkillInstallCommand(...args);
21750
21750
  };
21751
21751
  const defaultRunRemoteCommand = async (...args) => {
21752
- const { runRemoteCommand } = await Promise.resolve().then(function () { return require('./remote-Dfg2HLIt.cjs'); });
21752
+ const { runRemoteCommand } = await Promise.resolve().then(function () { return require('./remote-CaHGCahf.cjs'); });
21753
21753
  return runRemoteCommand(...args);
21754
21754
  };
21755
21755
  function resolveStandaloneLogger(options, verbose) {
@@ -21841,7 +21841,7 @@ function parseNonNegativeInteger(value) {
21841
21841
  return parsed;
21842
21842
  }
21843
21843
  const defaultRunGameSearchCommand = async (...args) => {
21844
- const { runGameSearchCommand } = await Promise.resolve().then(function () { return require('./games-CoddgAux.cjs'); });
21844
+ const { runGameSearchCommand } = await Promise.resolve().then(function () { return require('./games-DnIZgZPn.cjs'); });
21845
21845
  return runGameSearchCommand(...args);
21846
21846
  };
21847
21847
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index$2 = require('./index-CS6WpCn8.cjs');
3
+ var index$2 = require('./index-2pJPXX7y.cjs');
4
4
  var require$$0$3 = require('fs');
5
5
  var require$$0$2 = require('crypto');
6
6
  var require$$1$2 = require('path');
@@ -11,8 +11,8 @@ var require$$0$3 = require('url');
11
11
  var require$$5 = require('zlib');
12
12
  var require$$0 = require('buffer');
13
13
  var require$$1 = require('util');
14
- var index = require('./index-CS6WpCn8.cjs');
15
- var dev = require('./dev-XoWrqt1g.cjs');
14
+ var index = require('./index-2pJPXX7y.cjs');
15
+ var dev = require('./dev-BYJDJ6ke.cjs');
16
16
  require('node:module');
17
17
  require('readline');
18
18
  require('os');
@@ -28,10 +28,10 @@ require('node:fs/promises');
28
28
  require('node:zlib');
29
29
  require('node:readline/promises');
30
30
  require('node:timers/promises');
31
- require('./runtime-permission-env-CgH1Dz4q.cjs');
32
- require('./version-B1hlMGq2.cjs');
31
+ require('./runtime-permission-env-DidMNelj.cjs');
32
+ require('./version-BzAY2vKb.cjs');
33
33
  require('node:async_hooks');
34
- require('./dev-context-Gh3m20fd.cjs');
34
+ require('./dev-context-Dh5ZouxP.cjs');
35
35
  require('sharp');
36
36
  require('node:os');
37
37
  require('node:net');
@@ -44,7 +44,7 @@ require('node:buffer');
44
44
  require('node:url');
45
45
  require('node:util');
46
46
  require('node:child_process');
47
- require('./project-vite-CL-SW3RW.cjs');
47
+ require('./project-vite-N357IKfz.cjs');
48
48
 
49
49
  var bufferUtil = {exports: {}};
50
50
 
@@ -3,7 +3,7 @@
3
3
  var promises = require('node:readline/promises');
4
4
  var node_crypto = require('node:crypto');
5
5
  var node_http = require('node:http');
6
- var index = require('./index-CS6WpCn8.cjs');
6
+ var index = require('./index-2pJPXX7y.cjs');
7
7
  var browser = require('./browser-RAy8e8cV.cjs');
8
8
  require('node:module');
9
9
  require('readline');
@@ -5,7 +5,7 @@ var fs$1 = require('node:fs/promises');
5
5
  var node_module = require('node:module');
6
6
  var path = require('node:path');
7
7
  var node_url = require('node:url');
8
- var index = require('./index-CS6WpCn8.cjs');
8
+ var index = require('./index-2pJPXX7y.cjs');
9
9
 
10
10
  function findProjectRoot(startDir) {
11
11
  let current = path.resolve(startDir);
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var runtimePermissionEnv = require('./runtime-permission-env-CgH1Dz4q.cjs');
4
- var devContext = require('./dev-context-Gh3m20fd.cjs');
3
+ var runtimePermissionEnv = require('./runtime-permission-env-DidMNelj.cjs');
4
+ var devContext = require('./dev-context-Dh5ZouxP.cjs');
5
5
  var promises = require('node:readline/promises');
6
- var index = require('./index-CS6WpCn8.cjs');
6
+ var index = require('./index-2pJPXX7y.cjs');
7
7
  var childProcess = require('node:child_process');
8
8
  var fs = require('node:fs');
9
9
  var fs$1 = require('node:fs/promises');
10
10
  var path = require('node:path');
11
11
  var node_crypto = require('node:crypto');
12
12
  require('node:zlib');
13
- var artifact = require('./artifact-BQm9xFcY.cjs');
14
- require('./version-B1hlMGq2.cjs');
13
+ var artifact = require('./artifact-Ugqa6hRL.cjs');
14
+ require('./version-BzAY2vKb.cjs');
15
15
  require('node:async_hooks');
16
16
  require('sharp');
17
17
  require('node:module');
@@ -308,7 +308,7 @@ function createDefaultCosClient(uploadToken, COS) {
308
308
  };
309
309
  }
310
310
  async function loadCosConstructor() {
311
- const cosModule = await Promise.resolve().then(function () { return require('./index-_1anHmAG.cjs'); }).then(function (n) { return n.index; });
311
+ const cosModule = await Promise.resolve().then(function () { return require('./index-CW36RfnA.cjs'); }).then(function (n) { return n.index; });
312
312
  return cosModule.default;
313
313
  }
314
314
  function formatSize(bytes) {
@@ -2,9 +2,9 @@
2
2
 
3
3
  var fs = require('node:fs');
4
4
  var path = require('node:path');
5
- var version$1 = require('./version-B1hlMGq2.cjs');
5
+ var version$1 = require('./version-BzAY2vKb.cjs');
6
6
  require('node:crypto');
7
- var index = require('./index-CS6WpCn8.cjs');
7
+ var index = require('./index-2pJPXX7y.cjs');
8
8
  var node_async_hooks = require('node:async_hooks');
9
9
 
10
10
  /**
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var version = require('./version-B1hlMGq2.cjs');
3
+ var version = require('./version-BzAY2vKb.cjs');
4
4
  var fs = require('node:fs/promises');
5
5
  var path = require('node:path');
6
6
  var childProcess = require('node:child_process');
7
- var index = require('./index-CS6WpCn8.cjs');
7
+ var index = require('./index-2pJPXX7y.cjs');
8
8
  require('node:module');
9
9
  require('readline');
10
10
  require('os');
@@ -3,6 +3,6 @@
3
3
  /** 构建时替换为当前发布包的实际版本。 */
4
4
  const HB_SDK_VERSION = typeof undefined === 'string'
5
5
  ? undefined
6
- : '0.9.5-alpha.2';
6
+ : '0.9.5-alpha.4';
7
7
 
8
8
  exports.HB_SDK_VERSION = HB_SDK_VERSION;
package/dist/cli.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./cli-chunks/index-CS6WpCn8.cjs');
3
+ var index = require('./cli-chunks/index-2pJPXX7y.cjs');
4
4
  require('node:module');
5
5
  require('readline');
6
6
  require('os');
@@ -0,0 +1,8 @@
1
+ <svg preserveAspectRatio="none" overflow="visible" style="display: block;" width="47.0269" height="14.0004" viewBox="0 0 47.0269 14.0004" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g id="&#229;&#176;&#143;&#233;&#187;&#145;&#231;&#155;&#146;logo-&#230;&#151;&#160;&#229;&#137;&#175;&#230;&#160;&#135;&#233;&#162;&#152;&#228;&#184;&#173;&#230;&#150;&#135;-&#233;&#187;&#145;">
3
+ <g id="&#229;&#176;&#143;&#233;&#187;&#145;&#231;&#155;&#146;logo-&#230;&#151;&#160;&#229;&#173;&#151;&#230;&#151;&#160;&#230;&#161;&#134;-&#233;&#187;&#145;">
4
+ <path id="&#229;&#176;&#143;&#233;&#187;&#145;&#231;&#155;&#146;logo-&#230;&#151;&#160;&#229;&#173;&#151;&#230;&#151;&#160;&#230;&#161;&#134;-&#233;&#187;&#145;_2" d="M1.87988 2.6582C2.04076 2.56554 2.24192 2.68262 2.24219 2.86816V8.59863C2.24219 8.74204 2.31858 8.87553 2.44336 8.94824L4.18262 9.95605C4.31742 10.0326 4.48438 9.93571 4.48438 9.78027V8.375C4.48438 8.24172 4.59279 8.13188 4.72559 8.13184H6.49316C6.62582 8.13206 6.73438 8.24182 6.73438 8.375V13.7578C6.73416 13.9434 6.53297 14.0605 6.37207 13.9678L4.48438 12.875L2.24219 11.5762L0.201172 10.3945C0.0764134 10.3218 0 10.1883 0 10.0449V3.97949C0 3.83609 0.0763943 3.7026 0.201172 3.62988L0.208984 3.62598L1.87988 2.6582ZM4.49219 0.243164C4.49219 0.0574091 4.69351 -0.0604915 4.85449 0.0322266L6.74023 1.12695L8.98242 2.42578L11.0254 3.60742C11.1501 3.6801 11.2265 3.8137 11.2266 3.95703V10.0225C11.2266 10.1658 11.1501 10.2993 11.0254 10.3721L11.0176 10.376L9.34668 11.3437C9.18569 11.4367 8.98442 11.3196 8.98438 11.1338V5.40332C8.98433 5.25996 8.90795 5.12641 8.7832 5.05371L7.04395 4.0459C6.90919 3.96948 6.7423 4.06636 6.74219 4.22168V5.62793C6.74203 5.76105 6.63364 5.87003 6.50098 5.87012H4.7334C4.60081 5.86994 4.49234 5.761 4.49219 5.62793V0.243164Z" fill="white" fill-opacity="0.4"/>
5
+ </g>
6
+ <path id="Combined-Shape" d="M42.1655 1.61619L41.2345 1.58606C40.0014 2.92851 38.3338 3.86287 36.4557 4.16437L36.4553 5.07361C37.2801 4.95314 38.4537 4.75624 39.1624 4.40649V4.74329H44.3086V4.41815C44.9591 4.74458 46.167 4.94148 47.0266 5.07361L47.0269 4.19664C46.9978 4.18714 46.9687 4.17761 46.9397 4.16806C45.0662 3.87277 43.4009 2.94799 42.1655 1.61619ZM41.7413 2.6111C41.3812 3.0308 40.8352 3.46216 40.0801 3.90518H43.3793C42.6474 3.47382 42.1014 3.04246 41.7413 2.6111ZM38.1517 7.89234V5.35082H45.3309V6.79859C45.3309 7.40265 44.8429 7.89234 44.241 7.89234H38.1517ZM43.6475 6.94801C43.9485 6.94801 44.1924 6.70317 44.1924 6.40114V6.28349H39.2902V6.94801H43.6475ZM36.5718 11.0051H37.7219V8.47526H45.7258V11.0051H46.8759V11.9961H36.5718V11.0051ZM38.8836 11.0051H40.0336V9.33669H38.8836V11.0051ZM42.2989 9.33669H41.1605V11.0051H42.2989V9.33669ZM44.599 9.33669H43.4257V11.0051H44.599V9.33669ZM16.2157 11.2551L16.5767 12.2552H18.9855C19.5664 12.0843 19.7666 11.7201 19.7666 10.8238V1.78206L18.237 1.72377V10.3924C18.237 10.9987 18.1092 11.1852 17.5052 11.1968L16.2157 11.2551ZM34.5926 10.4754C35.043 10.9935 35.5475 11.6658 35.6451 12.2552H34.2306C34.005 11.8007 33.6513 11.182 33.0945 10.4754H34.5926ZM32.0672 10.4754C32.4212 11.0552 32.8589 11.8327 32.905 12.2552H31.468L31.167 11.4028C31.0755 11.1505 30.9336 10.8776 30.8172 10.6538C30.7839 10.5898 30.7527 10.5297 30.7254 10.4754H32.0672ZM30.022 12.2355L30.0266 12.2552H28.8201C28.7777 11.9985 28.7259 11.7103 28.6577 11.3976L28.3781 10.4754H29.5836C29.7405 11.0178 29.9072 11.7388 30.022 12.2354L30.022 12.2355ZM27.4031 10.4754C27.2303 10.9279 26.924 11.5212 26.478 12.2552H24.9669C25.3313 11.7573 25.8088 11.0491 26.1433 10.4754H27.4031ZM26.479 9.82763L26.4789 9.8277H26.5952L26.5951 9.82763H34.0002L34.0001 9.8277H34.0002L34.0002 9.82763H35.5762V8.75506H31.0973V8.09053H34.8443V6.98299H31.0973V6.3651H33.6796C34.2815 6.3651 34.7695 5.87541 34.7695 5.27134V2.01652H25.9239V6.3651H29.6426V6.98299H25.8491V8.09053H29.6426V8.75506H25.1172V9.82763H26.479ZM29.6426 2.9479V5.25755H27.1088V2.9479H29.6426ZM31.0973 2.9479H33.5845V4.71067C33.5845 5.01271 33.3406 5.25755 33.0396 5.25755H31.0973V2.9479ZM22.5803 4.30408L22.5693 4.25305H20.9741L21.0779 4.69792L21.078 4.69823C21.3055 5.65282 21.5335 6.44018 21.7619 7.05961C22.0204 7.7604 22.5082 8.61881 23.2223 9.63383L23.2416 9.66124H24.6973L24.4842 9.30435C23.9332 8.37309 23.5522 7.63652 23.3397 7.09342C23.1076 6.50065 22.8544 5.57175 22.5803 4.30408ZM16.7512 4.33228L16.7693 4.25305H15.1746L15.1635 4.30408C14.8894 5.57175 14.6362 6.50065 14.4042 7.09342C14.1722 7.68603 13.7399 8.50872 13.1052 9.56298L13.0461 9.66124H14.5022L14.5215 9.63383C15.2356 8.61881 15.7234 7.7604 15.9819 7.05961C16.2389 6.36282 16.4952 5.4534 16.7512 4.33228ZM28.2098 3.16812H28.2106H28.2116C28.3966 3.16811 28.593 3.16809 28.7786 3.1681C28.7786 3.94539 29.2949 5.04639 29.2949 5.04639H28.3268C28.3268 5.04639 27.7137 4.23685 27.5524 3.1681C27.7038 3.16815 27.944 3.16813 28.208 3.16812H28.2089H28.2098ZM32.5089 3.16812H32.5097H32.5106C32.7749 3.16813 33.0155 3.16815 33.1671 3.1681C33.0058 4.23685 32.3927 5.04639 32.3927 5.04639H31.4246C31.4246 5.04639 31.9409 3.94539 31.9409 3.1681C32.1261 3.16809 32.3221 3.16811 32.5067 3.16812H32.5078H32.5089Z" fill-rule="evenodd" clip-rule="evenodd" fill="white" fill-opacity="0.4"/>
7
+ </g>
8
+ </svg>