@heybox/hb-sdk 0.9.8-alpha.4 → 0.9.8

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 (28) hide show
  1. package/CHANGELOG.md +14 -2
  2. package/dist/cli-chunks/{build-Dy-XNxvH.cjs → build-BuYvQeZO.cjs} +4 -4
  3. package/dist/cli-chunks/{create-BsnNVF3S.cjs → create-4XrYdjC0.cjs} +1 -1
  4. package/dist/cli-chunks/{dev-Z173QHNa.cjs → dev-BIxJPUFK.cjs} +8 -8
  5. package/dist/cli-chunks/{doctor-BPSBJZ-1.cjs → doctor-XhNbYYVj.cjs} +1 -1
  6. package/dist/cli-chunks/{games-BOEcnynH.cjs → games-Cd9fgl6N.cjs} +1 -1
  7. package/dist/cli-chunks/{index-BWM8RdCP.cjs → index-Cr8tP0XZ.cjs} +17 -17
  8. package/dist/cli-chunks/{index-DAAXOHZz.cjs → index-aGcX-ULf.cjs} +1 -1
  9. package/dist/cli-chunks/{index.esm-BRVjOxG6.cjs → index.esm-UetP1FSl.cjs} +6 -6
  10. package/dist/cli-chunks/{login-exwaROqC.cjs → login-Dd55F6qr.cjs} +1 -1
  11. package/dist/cli-chunks/{project-vite-B4zLrFt4.cjs → project-vite-quIPuubf.cjs} +1 -1
  12. package/dist/cli-chunks/{remote-BvSowNUB.cjs → remote-BfI4Ag6B.cjs} +3 -3
  13. package/dist/cli-chunks/{runtime-permission-env-DdCaD_QO.cjs → runtime-permission-env-C1e5q2m5.cjs} +2 -2
  14. package/dist/cli-chunks/{skill-Ka66hZFi.cjs → skill-DY7-DQPL.cjs} +2 -2
  15. package/dist/cli-chunks/{version-BnLlT4-z.cjs → version-D4jIw125.cjs} +1 -1
  16. package/dist/cli.cjs +1 -1
  17. package/dist/devtools/browser-dev-host/assets/{browser-dev-host-BGslB0WH.js → browser-dev-host-x4xuSDs_.js} +1 -1
  18. package/dist/devtools/browser-dev-host/assets/{desktop-app-launch-1BY4EF_h.js → desktop-app-launch-C1gCwbuV.js} +1 -1
  19. package/dist/devtools/browser-dev-host/assets/{index-B-hYOhqM.js → index-C6l2jsZT.js} +3 -3
  20. package/dist/devtools/browser-dev-host/index.html +2 -2
  21. package/dist/index.cjs.js +3 -3
  22. package/dist/index.esm.js +3 -3
  23. package/dist/vite.cjs.js +46 -38
  24. package/dist/vite.esm.js +46 -38
  25. package/package.json +5 -5
  26. package/skill/skill.json +4 -4
  27. package/types/index.d.ts +2 -2
  28. package/types/vite/index.d.ts +2 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  本文件随 `@heybox/hb-sdk` npm 包公开分发,只记录外部小程序开发者可观察到的变化。
4
4
 
5
+ ## 0.9.8 - 2026-11-13
6
+
7
+ ### 行为调整
8
+
9
+ - [hb-sdk remote deploy](https://docs.xiaoheihe.cn/hb_sdk/guide/cli) 默认在审核通过后自动发布;需要手动控制上线时机时,请追加 `--no-auto-publish`,审核通过后再执行 `hb-sdk remote release <version>`。
10
+
11
+ ### 文档与工具
12
+
13
+ - [开发工作台](https://docs.xiaoheihe.cn/hb_sdk/guide/cli) 新增上传发布面板,可填写更新说明、选择审核后的发布方式,并查看校验、构建、上传和提审进度。
14
+ - [扫码预览](https://docs.xiaoheihe.cn/hb_sdk/guide/cli) 支持本地、审核和线上三种模式,显示对应版本与状态;本地预览要求手机与电脑处于同一局域网,审核预览仍受平台预览权限约束。
15
+ - 扫码预览支持二维码刷新、请求超时重试和缺少版本时的提示,本地服务重启后自动刷新预览二维码;工作台保留独立的桌面预览入口,并修复 Open 管理页跳转地址。
16
+
5
17
  ## 0.9.8-alpha.4 - 2026-11-13
6
18
 
7
19
  ### 文档与工具
@@ -347,7 +359,7 @@
347
359
  - [viewport.setDisplay()](https://docs.xiaoheihe.cn/hb_sdk/reference/sdk/viewport/setDisplay.html) 补充 `1.0.0` 返回值迁移预告;当前结果对象与错误行为保持不变,升级前请按说明准备兼容处理。
348
360
  - SDK Skill 在实现展示设置或升级 SDK 前主动提醒检查迁移说明、版本门槛及错误处理。
349
361
  - 补充 [network.request()](https://docs.xiaoheihe.cn/hb_sdk/reference/sdk/network/request.html) 的移动端请求头与签名兼容说明,明确请求成功不代表已附加客户端签名。
350
- - [终端权限申请](https://docs.xiaoheihe.cn/hb_sdk/guide/permissions#%E7%BB%88%E7%AB%AF%E6%9D%83%E9%99%90%E7%94%B3%E8%AF%B7)明确仅第三方主体需要提交申请,权限获批后仍须在项目中声明并启用。
362
+ - [终端权限申请](https://docs.xiaoheihe.cn/hb_sdk/guide/permissions#%E7%BB%88%E7%AB%AF%E6%9D%83%E9%99%90%E7%94%B3%E8%AF%B7)补充平台权限申请流程,权限获批后仍须在项目中声明并启用。
351
363
  - 补充[云端存储登录要求](https://docs.xiaoheihe.cn/hb_sdk/guide/cloud-storage#%E7%99%BB%E5%BD%95%E8%A6%81%E6%B1%82):四个方法均需登录小黑盒客户端,未登录时 Promise 以 `UNAUTHORIZED` 拒绝,并说明登录成功后重试的处理方式。
352
364
 
353
365
  ## 0.9.3-alpha.7 - 2026-10-23
@@ -389,7 +401,7 @@
389
401
 
390
402
  ### 文档与工具
391
403
 
392
- - [终端权限申请](https://docs.xiaoheihe.cn/hb_sdk/guide/permissions#%E7%BB%88%E7%AB%AF%E6%9D%83%E9%99%90%E7%94%B3%E8%AF%B7)明确仅第三方主体需要提交申请,权限获批后仍须在项目中声明并启用。
404
+ - [终端权限申请](https://docs.xiaoheihe.cn/hb_sdk/guide/permissions#%E7%BB%88%E7%AB%AF%E6%9D%83%E9%99%90%E7%94%B3%E8%AF%B7)补充平台权限申请流程,权限获批后仍须在项目中声明并启用。
393
405
 
394
406
  ## 0.9.3-alpha.1 - 2026-10-22
395
407
 
@@ -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-DdCaD_QO.cjs');
6
- var index = require('./index-BWM8RdCP.cjs');
5
+ var runtimePermissionEnv = require('./runtime-permission-env-C1e5q2m5.cjs');
6
+ var index = require('./index-Cr8tP0XZ.cjs');
7
7
  require('./index.esm-CvMA_ppV.cjs');
8
8
  require('node:crypto');
9
9
  require('node:fs');
10
10
  require('node:zlib');
11
- var projectVite = require('./project-vite-B4zLrFt4.cjs');
12
- require('./version-BnLlT4-z.cjs');
11
+ var projectVite = require('./project-vite-quIPuubf.cjs');
12
+ require('./version-D4jIw125.cjs');
13
13
  require('node:module');
14
14
  require('node:url');
15
15
  require('./_commonjs-dynamic-modules-DUamuDzp.cjs');
@@ -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-BWM8RdCP.cjs');
8
+ var index = require('./index-Cr8tP0XZ.cjs');
9
9
  var index_esm = require('./index.esm-CvMA_ppV.cjs');
10
10
  require('node:module');
11
11
  require('readline');
@@ -2,13 +2,13 @@
2
2
 
3
3
  var fs = require('node:fs/promises');
4
4
  var path = require('node:path');
5
- var remote = require('./remote-BvSowNUB.cjs');
6
- var index = require('./index-BWM8RdCP.cjs');
5
+ var remote = require('./remote-BfI4Ag6B.cjs');
6
+ var index = require('./index-Cr8tP0XZ.cjs');
7
7
  var node_crypto = require('node:crypto');
8
8
  var fs$1 = require('node:fs');
9
9
  var index_esm = require('./index.esm-CvMA_ppV.cjs');
10
- var version = require('./version-BnLlT4-z.cjs');
11
- var runtimePermissionEnv = require('./runtime-permission-env-DdCaD_QO.cjs');
10
+ var version = require('./version-D4jIw125.cjs');
11
+ var runtimePermissionEnv = require('./runtime-permission-env-C1e5q2m5.cjs');
12
12
  require('node:zlib');
13
13
  var os = require('node:os');
14
14
  var net = require('node:net');
@@ -30,7 +30,7 @@ var require$$0$2 = require('stream');
30
30
  var require$$0$3 = require('url');
31
31
  var require$$5 = require('zlib');
32
32
  var require$$1 = require('util');
33
- var projectVite = require('./project-vite-B4zLrFt4.cjs');
33
+ var projectVite = require('./project-vite-quIPuubf.cjs');
34
34
 
35
35
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
36
36
  const BROWSER_DEV_HOST_JSON_BODY_LIMIT = 1024 * 1024;
@@ -3466,8 +3466,8 @@ const DEFAULT_CHANNEL_TRANSPORT = {
3466
3466
  };
3467
3467
  const IPV4_LOOPBACK_ADDRESSES = new net.BlockList();
3468
3468
  IPV4_LOOPBACK_ADDRESSES.addSubnet('127.0.0.0', 8, 'ipv4');
3469
- const { WebSocket: WebSocket$1, WebSocketServer: WebSocketServer$1 } = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/dev-Z173QHNa.cjs', document.baseURI).href)))('ws');
3470
- 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-Z173QHNa.cjs', document.baseURI).href)))('parse5');
3469
+ const { WebSocket: WebSocket$1, WebSocketServer: WebSocketServer$1 } = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli-chunks/dev-BIxJPUFK.cjs', document.baseURI).href)))('ws');
3470
+ 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-BIxJPUFK.cjs', document.baseURI).href)))('parse5');
3471
3471
  const BROWSER_DEV_HOST_ROOT_CANDIDATES = [
3472
3472
  path.resolve(__dirname, 'devtools/browser-dev-host'),
3473
3473
  path.resolve(__dirname, '../devtools/browser-dev-host'),
@@ -12868,7 +12868,7 @@ function assertNodeRuntimeCapabilities(ctx, settings) {
12868
12868
  function createNodeRealtimeDriverRegistry() {
12869
12869
  const registry = createRuntimeRealtimeDriverRegistry();
12870
12870
  registry.registerLazy('node-websocket', async () => {
12871
- const mod = await Promise.resolve().then(function () { return require('./index.esm-BRVjOxG6.cjs'); });
12871
+ const mod = await Promise.resolve().then(function () { return require('./index.esm-UetP1FSl.cjs'); });
12872
12872
  return mod.createNodeWebSocketRuntimeDriver();
12873
12873
  });
12874
12874
  return registry;
@@ -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-BWM8RdCP.cjs');
6
+ var index = require('./index-Cr8tP0XZ.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-BWM8RdCP.cjs');
6
+ var index = require('./index-Cr8tP0XZ.cjs');
7
7
  require('node:module');
8
8
  require('readline');
9
9
  require('os');
@@ -242,19 +242,19 @@ function requireArgument () {
242
242
 
243
243
  var command = {};
244
244
 
245
- 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-BWM8RdCP.cjs', document.baseURI).href)));
245
+ 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-Cr8tP0XZ.cjs', document.baseURI).href)));
246
246
  function __require$4() { return require$5("node:events"); }
247
247
 
248
- 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-BWM8RdCP.cjs', document.baseURI).href)));
248
+ 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-Cr8tP0XZ.cjs', document.baseURI).href)));
249
249
  function __require$3() { return require$4("node:child_process"); }
250
250
 
251
- 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-BWM8RdCP.cjs', document.baseURI).href)));
251
+ 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-Cr8tP0XZ.cjs', document.baseURI).href)));
252
252
  function __require$2() { return require$3("node:path"); }
253
253
 
254
- 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-BWM8RdCP.cjs', document.baseURI).href)));
254
+ 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-Cr8tP0XZ.cjs', document.baseURI).href)));
255
255
  function __require$1() { return require$2("node:fs"); }
256
256
 
257
- 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-BWM8RdCP.cjs', document.baseURI).href)));
257
+ 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-Cr8tP0XZ.cjs', document.baseURI).href)));
258
258
  function __require() { return require$1("node:process"); }
259
259
 
260
260
  var help = {};
@@ -17253,7 +17253,7 @@ async function inspectFeedbackLog(file, size) {
17253
17253
  return { mimeType: 'text/plain', width: 0, height: 0 };
17254
17254
  }
17255
17255
  async function createFeedbackCosClient(getToken) {
17256
- const { default: COS } = await Promise.resolve().then(function () { return require('./index-DAAXOHZz.cjs'); }).then(function (n) { return n.index; });
17256
+ const { default: COS } = await Promise.resolve().then(function () { return require('./index-aGcX-ULf.cjs'); }).then(function (n) { return n.index; });
17257
17257
  const cos = new COS({
17258
17258
  getAuthorization(_options, callback) {
17259
17259
  void getToken().then((token) => callback({
@@ -21935,7 +21935,7 @@ function installDevPreviewCommands(dev) {
21935
21935
  }
21936
21936
 
21937
21937
  const CLI_VERSION_PLACEHOLDER = ['__HB', 'SDK', 'CLI', 'VERSION__'].join('_');
21938
- const BUILT_CLI_VERSION = '0.9.8-alpha.4';
21938
+ const BUILT_CLI_VERSION = '0.9.8';
21939
21939
  const PACKAGE_JSON_CANDIDATES$1 = [
21940
21940
  path.resolve(__dirname, '..', '..', 'package.json'),
21941
21941
  path.resolve(__dirname, '..', 'package.json'),
@@ -23347,39 +23347,39 @@ function createCommandLoggerResolver(options) {
23347
23347
  };
23348
23348
  }
23349
23349
  const defaultClearLoginStatus = async (...args) => {
23350
- const { clearLoginStatus } = await Promise.resolve().then(function () { return require('./login-exwaROqC.cjs'); });
23350
+ const { clearLoginStatus } = await Promise.resolve().then(function () { return require('./login-Dd55F6qr.cjs'); });
23351
23351
  return clearLoginStatus(...args);
23352
23352
  };
23353
23353
  const defaultLoginToHeybox = async (...args) => {
23354
- const { loginToHeybox } = await Promise.resolve().then(function () { return require('./login-exwaROqC.cjs'); });
23354
+ const { loginToHeybox } = await Promise.resolve().then(function () { return require('./login-Dd55F6qr.cjs'); });
23355
23355
  return loginToHeybox(...args);
23356
23356
  };
23357
23357
  const defaultPrintLoginStatus = async (...args) => {
23358
- const { printLoginStatus } = await Promise.resolve().then(function () { return require('./login-exwaROqC.cjs'); });
23358
+ const { printLoginStatus } = await Promise.resolve().then(function () { return require('./login-Dd55F6qr.cjs'); });
23359
23359
  return printLoginStatus(...args);
23360
23360
  };
23361
23361
  const defaultRunBuildCommand = async (...args) => {
23362
- const { runBuildCommand } = await Promise.resolve().then(function () { return require('./build-Dy-XNxvH.cjs'); });
23362
+ const { runBuildCommand } = await Promise.resolve().then(function () { return require('./build-BuYvQeZO.cjs'); });
23363
23363
  return runBuildCommand(...args);
23364
23364
  };
23365
23365
  const defaultRunCreateCommand = async (...args) => {
23366
- const { runCreateCommand } = await Promise.resolve().then(function () { return require('./create-BsnNVF3S.cjs'); });
23366
+ const { runCreateCommand } = await Promise.resolve().then(function () { return require('./create-4XrYdjC0.cjs'); });
23367
23367
  return runCreateCommand(...args);
23368
23368
  };
23369
23369
  const defaultRunDevCommand = async (...args) => {
23370
- const { runDevCommand } = await Promise.resolve().then(function () { return require('./dev-Z173QHNa.cjs'); }).then(function (n) { return n.dev; });
23370
+ const { runDevCommand } = await Promise.resolve().then(function () { return require('./dev-BIxJPUFK.cjs'); }).then(function (n) { return n.dev; });
23371
23371
  return runDevCommand(...args);
23372
23372
  };
23373
23373
  const defaultRunDoctorCommand = async (...args) => {
23374
- const { runDoctorCommand } = await Promise.resolve().then(function () { return require('./doctor-BPSBJZ-1.cjs'); });
23374
+ const { runDoctorCommand } = await Promise.resolve().then(function () { return require('./doctor-XhNbYYVj.cjs'); });
23375
23375
  return runDoctorCommand(...args);
23376
23376
  };
23377
23377
  const defaultRunSkillInstallCommand = async (...args) => {
23378
- const { runSkillInstallCommand } = await Promise.resolve().then(function () { return require('./skill-Ka66hZFi.cjs'); });
23378
+ const { runSkillInstallCommand } = await Promise.resolve().then(function () { return require('./skill-DY7-DQPL.cjs'); });
23379
23379
  return runSkillInstallCommand(...args);
23380
23380
  };
23381
23381
  const defaultRunRemoteCommand = async (...args) => {
23382
- const { runRemoteCommand } = await Promise.resolve().then(function () { return require('./remote-BvSowNUB.cjs'); }).then(function (n) { return n.remote; });
23382
+ const { runRemoteCommand } = await Promise.resolve().then(function () { return require('./remote-BfI4Ag6B.cjs'); }).then(function (n) { return n.remote; });
23383
23383
  return runRemoteCommand(...args);
23384
23384
  };
23385
23385
  function resolveStandaloneLogger(options, verbose) {
@@ -23505,7 +23505,7 @@ function parseNonNegativeInteger(value) {
23505
23505
  return parsed;
23506
23506
  }
23507
23507
  const defaultRunGameSearchCommand = async (...args) => {
23508
- const { runGameSearchCommand } = await Promise.resolve().then(function () { return require('./games-BOEcnynH.cjs'); });
23508
+ const { runGameSearchCommand } = await Promise.resolve().then(function () { return require('./games-Cd9fgl6N.cjs'); });
23509
23509
  return runGameSearchCommand(...args);
23510
23510
  };
23511
23511
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index$2 = require('./index-BWM8RdCP.cjs');
3
+ var index$2 = require('./index-Cr8tP0XZ.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');
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var dev = require('./dev-Z173QHNa.cjs');
3
+ var dev = require('./dev-BIxJPUFK.cjs');
4
4
  require('node:fs/promises');
5
5
  require('node:path');
6
- require('./remote-BvSowNUB.cjs');
6
+ require('./remote-BfI4Ag6B.cjs');
7
7
  require('./index.esm-CvMA_ppV.cjs');
8
- require('./runtime-permission-env-DdCaD_QO.cjs');
8
+ require('./runtime-permission-env-C1e5q2m5.cjs');
9
9
  require('node:fs');
10
- require('./version-BnLlT4-z.cjs');
11
- require('./index-BWM8RdCP.cjs');
10
+ require('./version-D4jIw125.cjs');
11
+ require('./index-Cr8tP0XZ.cjs');
12
12
  require('node:module');
13
13
  require('readline');
14
14
  require('os');
@@ -48,7 +48,7 @@ require('net');
48
48
  require('tls');
49
49
  require('url');
50
50
  require('zlib');
51
- require('./project-vite-B4zLrFt4.cjs');
51
+ require('./project-vite-quIPuubf.cjs');
52
52
 
53
53
  /**
54
54
  * @packageDocumentation
@@ -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-BWM8RdCP.cjs');
6
+ var index = require('./index-Cr8tP0XZ.cjs');
7
7
  var browser = require('./browser-RAy8e8cV.cjs');
8
8
  require('node:module');
9
9
  require('readline');
@@ -4,7 +4,7 @@ var fs = require('node:fs/promises');
4
4
  var node_module = require('node:module');
5
5
  var path = require('node:path');
6
6
  var node_url = require('node:url');
7
- var index = require('./index-BWM8RdCP.cjs');
7
+ var index = require('./index-Cr8tP0XZ.cjs');
8
8
 
9
9
  async function loadProjectVite(projectRoot) {
10
10
  const projectRequire = node_module.createRequire(path.join(projectRoot, 'package.json'));
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
3
  var index_esm = require('./index.esm-CvMA_ppV.cjs');
4
- var runtimePermissionEnv = require('./runtime-permission-env-DdCaD_QO.cjs');
4
+ var runtimePermissionEnv = require('./runtime-permission-env-C1e5q2m5.cjs');
5
5
  var node_crypto = require('node:crypto');
6
6
  var fs = require('node:fs/promises');
7
7
  var path = require('node:path');
8
8
  var fs$1 = require('node:fs');
9
9
  var sharp = require('sharp');
10
10
  var promises = require('node:readline/promises');
11
- var index = require('./index-BWM8RdCP.cjs');
11
+ var index = require('./index-Cr8tP0XZ.cjs');
12
12
  var childProcess = require('node:child_process');
13
13
  require('node:zlib');
14
14
 
@@ -604,7 +604,7 @@ function createDefaultCosClient(uploadToken, COS) {
604
604
  };
605
605
  }
606
606
  async function loadCosConstructor() {
607
- const cosModule = await Promise.resolve().then(function () { return require('./index-DAAXOHZz.cjs'); }).then(function (n) { return n.index; });
607
+ const cosModule = await Promise.resolve().then(function () { return require('./index-aGcX-ULf.cjs'); }).then(function (n) { return n.index; });
608
608
  return cosModule.default;
609
609
  }
610
610
  function formatSize(bytes) {
@@ -2,10 +2,10 @@
2
2
 
3
3
  var fs = require('node:fs');
4
4
  var path = require('node:path');
5
- var version = require('./version-BnLlT4-z.cjs');
5
+ var version = require('./version-D4jIw125.cjs');
6
6
  var fs$1 = require('node:fs/promises');
7
7
  var index_esm = require('./index.esm-CvMA_ppV.cjs');
8
- var index = require('./index-BWM8RdCP.cjs');
8
+ var index = require('./index-Cr8tP0XZ.cjs');
9
9
  var node_crypto = require('node:crypto');
10
10
  require('node:zlib');
11
11
  require('node:module');
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var version = require('./version-BnLlT4-z.cjs');
3
+ var version = require('./version-D4jIw125.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-BWM8RdCP.cjs');
7
+ var index = require('./index-Cr8tP0XZ.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.8-alpha.4';
6
+ : '0.9.8';
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-BWM8RdCP.cjs');
3
+ var index = require('./cli-chunks/index-Cr8tP0XZ.cjs');
4
4
  require('node:module');
5
5
  require('readline');
6
6
  require('os');
@@ -1,4 +1,4 @@
1
- import{m as Ff,H as Qa,a_ as Bf,bA as Vf,a4 as Gf,bh as $f,bi as Qf,n as ct,bK as B,ba as su,l as au,aM as qf,e as qa,aR as Yf,aD as Wf,k as Zf,aq as un,aN as Kf,bE as Br,aY as ln,aX as gs,aZ as Xn,b2 as cu,b4 as Xf,f as hi,w as Jf,_ as oa,aQ as eh,j as ps,au as ys,h as th,be as du,aI as rh,o as Ya,I as nh,b0 as uu,V as ih,A as oh,aF as sh,z as ah,bb as ch,bC as lu,bB as fu,b6 as dh,g as Es,aH as uh,b as qt,c as lh}from"./desktop-app-launch-1BY4EF_h.js";function fh(){return{targetId:"ui-preview-target",ownerId:"ui-preview-owner",adapterId:"browser-dev-host",kind:"browser",capabilities:{storage:!0,presentation:!0,sandboxList:!0,sandboxRead:!0},state:"attached",currentInstanceId:"ui-preview-instance",cdpTargetId:"ui-preview-browser-target",metadata:{displayName:"UI 预览(模拟)",browser:"Chrome",os:"macOS"},updatedAt:Date.now(),stale:!1}}function hh(){return[{key:"network",label:"网络请求",state:"approved",facts:{platformApproval:!0,temporary:!1,effective:!0,online:"enabled"}},{key:"companion",label:"桌面辅助应用",state:"temporary",facts:{platformApproval:!1,temporary:!0,effective:!0,online:"disabled"},releaseDifference:"发布前需要获得平台批准。"},{key:"network.useOfficialDomain",label:"官方域名",state:"unavailable",facts:{platformApproval:!1,temporary:!1,effective:!1,online:"disabled"},reason:"不支持本地临时授权,获得平台批准后才能使用。"}]}const xn={device:'[data-preview-target="device"]',screen:'[data-preview-target="screen"]',app:"#device iframe",workbench:'[data-testid="workbench-root"]'},Wa=15e3,mh=32*1024*1024,Za="data-hb-preview-capture-device",zo="data-hb-preview-capture-ancestor",Ka="data-hb-preview-capture-surface",Xa=64,gh=1024;function ph(e={}){const t=e.document??globalThis.document,r=t.defaultView,n=e.leaseMs??Wa;if(!Number.isFinite(n)||n<=0||n>Wa)throw Ve("INVALID_CAPTURE_LEASE","截图租约无效");let i;function o(d,u,f){d.attributes.push({element:u,name:f,previous:u.getAttribute(f)}),u.setAttribute(f,d.token)}function s(d){const u=i;if(!u||u.token!==d)return!1;const f=a(u),l=!!u.style?.isConnected;i=void 0,clearTimeout(u.timer),u.removeAbort?.(),u.removeResize?.(),u.observer?.disconnect(),u.style?.remove(),u.bounds?.remove();for(const{element:p,name:m,previous:E}of u.attributes)p.getAttribute(m)===d&&(E===null?p.removeAttribute(m):p.setAttribute(m,E));return u.overlay.remove(),l&&(r.scrollX!==u.scroll.x||r.scrollY!==u.scroll.y)&&r.scrollTo(u.scroll.x,u.scroll.y),f}function a(d){const{viewport:u,target:f,rect:l}=d;if(!f?.isConnected||!l||Date.now()>=d.expiresAt||r.innerWidth!==u.width||r.innerHeight!==u.height||r.devicePixelRatio!==u.devicePixelRatio)return!1;const p=f.getBoundingClientRect();return["left","top","width","height"].every(m=>Math.abs(p[m]-l[m])<.01)}async function c(d,u){if(u?.throwIfAborted(),!Number.isFinite(d.deadlineAt)||Date.now()>=d.deadlineAt)throw Ve("PREVIEW_TIMEOUT","截图操作已超时");if(d.scope==="workbench"||!Object.hasOwn(xn,d.scope))throw Ve("INVALID_CAPTURE_SCOPE","设备像素截图仅支持 device、screen 或 app");if(!d.operationId||d.operationId.length>128)throw Ve("INVALID_OPERATION","截图操作标识无效");if(!d.previewImage.startsWith("data:image/png;base64,")||d.previewImage.length>mh)throw Ve("INVALID_CAPTURE_IMAGE","共享窗口冻结图无效或过大");if(i)throw Ve("PREVIEW_BUSY","已有设备截图正在执行");const f=t.querySelectorAll(xn.device);if(f.length!==1)throw Ve("DEVICE_NOT_UNIQUE","设备画面不唯一或尚未创建");const l=f[0],p=d.scope==="device"?l:t.querySelector(xn[d.scope]);if(!p||p!==l&&!l.contains(p))throw Ve("CAPTURE_TARGET_UNAVAILABLE","截图内容尚未创建");const m=l.getBoundingClientRect();if(!(m.width>0&&m.height>0))throw Ve("CAPTURE_TARGET_UNAVAILABLE","设备画面当前不可见");const E=t.createElement("img");E.alt="",E.setAttribute("aria-hidden","true"),E.setAttribute("data-hb-preview-capture-freeze",""),E.style.cssText=`position:fixed;left:0;top:0;width:${r.innerWidth}px;height:${r.innerHeight}px;max-width:none;max-height:none;margin:0;border:0;padding:0;z-index:2147483647;pointer-events:auto;user-select:none;`,E.addEventListener("wheel",j=>j.preventDefault(),{passive:!1}),E.addEventListener("touchmove",j=>j.preventDefault(),{passive:!1});const w=Math.min(Date.now()+n,d.deadlineAt),I={operationId:d.operationId,token:r.crypto.randomUUID(),overlay:E,attributes:[],scroll:{x:r.scrollX,y:r.scrollY},viewport:{width:r.innerWidth,height:r.innerHeight,devicePixelRatio:r.devicePixelRatio},expiresAt:w};i=I,I.timer=setTimeout(()=>s(I.token),Math.max(0,w-Date.now()));const v=()=>s(I.token);u?.addEventListener("abort",v,{once:!0}),I.removeAbort=()=>u?.removeEventListener("abort",v);const y=()=>{const{viewport:j}=I;(r.innerWidth!==j.width||r.innerHeight!==j.height||r.devicePixelRatio!==j.devicePixelRatio)&&s(I.token)};r.addEventListener("resize",y),I.removeResize=()=>r.removeEventListener("resize",y);const O=()=>{if(u?.throwIfAborted(),i!==I||Date.now()>=w)throw Ve("CAPTURE_EXPIRED","截图布局租约已结束,请重新截图")};try{E.src=d.previewImage,await E.decode(),O();const j=I.token,b=`[${Za}="${j}"]`,T=r.getComputedStyle(l),D=new r.DOMMatrixReadOnly(T.transform==="none"?void 0:T.transform),x=Math.atan2(D.b,D.a),P=l.querySelector(".desktop-window__surface"),Q=P?P.offsetWidth:Number.parseFloat(T.width),R=P?P.offsetHeight:Number.parseFloat(T.height),L=T.backgroundColor,C=r.getComputedStyle(t.body).backgroundColor,z=ye=>!ye||ye==="transparent"||ye==="rgba(0, 0, 0, 0)",k=z(L)?z(C)?"#fff":C:L;if(!(Q>0&&R>0))throw Ve("CAPTURE_TARGET_UNAVAILABLE","设备布局尺寸无效");O(),t.body.append(E),o(I,l,Za),P&&o(I,P,Ka);for(let ye=l.parentElement;ye;ye=ye.parentElement)o(I,ye,zo);const S=t.createElement("style");I.style=S;const M=`
1
+ import{m as Ff,H as Qa,a_ as Bf,bA as Vf,a4 as Gf,bh as $f,bi as Qf,n as ct,bK as B,ba as su,l as au,aM as qf,e as qa,aR as Yf,aD as Wf,k as Zf,aq as un,aN as Kf,bE as Br,aY as ln,aX as gs,aZ as Xn,b2 as cu,b4 as Xf,f as hi,w as Jf,_ as oa,aQ as eh,j as ps,au as ys,h as th,be as du,aI as rh,o as Ya,I as nh,b0 as uu,V as ih,A as oh,aF as sh,z as ah,bb as ch,bC as lu,bB as fu,b6 as dh,g as Es,aH as uh,b as qt,c as lh}from"./desktop-app-launch-C1gCwbuV.js";function fh(){return{targetId:"ui-preview-target",ownerId:"ui-preview-owner",adapterId:"browser-dev-host",kind:"browser",capabilities:{storage:!0,presentation:!0,sandboxList:!0,sandboxRead:!0},state:"attached",currentInstanceId:"ui-preview-instance",cdpTargetId:"ui-preview-browser-target",metadata:{displayName:"UI 预览(模拟)",browser:"Chrome",os:"macOS"},updatedAt:Date.now(),stale:!1}}function hh(){return[{key:"network",label:"网络请求",state:"approved",facts:{platformApproval:!0,temporary:!1,effective:!0,online:"enabled"}},{key:"companion",label:"桌面辅助应用",state:"temporary",facts:{platformApproval:!1,temporary:!0,effective:!0,online:"disabled"},releaseDifference:"发布前需要获得平台批准。"},{key:"network.useOfficialDomain",label:"官方域名",state:"unavailable",facts:{platformApproval:!1,temporary:!1,effective:!1,online:"disabled"},reason:"不支持本地临时授权,获得平台批准后才能使用。"}]}const xn={device:'[data-preview-target="device"]',screen:'[data-preview-target="screen"]',app:"#device iframe",workbench:'[data-testid="workbench-root"]'},Wa=15e3,mh=32*1024*1024,Za="data-hb-preview-capture-device",zo="data-hb-preview-capture-ancestor",Ka="data-hb-preview-capture-surface",Xa=64,gh=1024;function ph(e={}){const t=e.document??globalThis.document,r=t.defaultView,n=e.leaseMs??Wa;if(!Number.isFinite(n)||n<=0||n>Wa)throw Ve("INVALID_CAPTURE_LEASE","截图租约无效");let i;function o(d,u,f){d.attributes.push({element:u,name:f,previous:u.getAttribute(f)}),u.setAttribute(f,d.token)}function s(d){const u=i;if(!u||u.token!==d)return!1;const f=a(u),l=!!u.style?.isConnected;i=void 0,clearTimeout(u.timer),u.removeAbort?.(),u.removeResize?.(),u.observer?.disconnect(),u.style?.remove(),u.bounds?.remove();for(const{element:p,name:m,previous:E}of u.attributes)p.getAttribute(m)===d&&(E===null?p.removeAttribute(m):p.setAttribute(m,E));return u.overlay.remove(),l&&(r.scrollX!==u.scroll.x||r.scrollY!==u.scroll.y)&&r.scrollTo(u.scroll.x,u.scroll.y),f}function a(d){const{viewport:u,target:f,rect:l}=d;if(!f?.isConnected||!l||Date.now()>=d.expiresAt||r.innerWidth!==u.width||r.innerHeight!==u.height||r.devicePixelRatio!==u.devicePixelRatio)return!1;const p=f.getBoundingClientRect();return["left","top","width","height"].every(m=>Math.abs(p[m]-l[m])<.01)}async function c(d,u){if(u?.throwIfAborted(),!Number.isFinite(d.deadlineAt)||Date.now()>=d.deadlineAt)throw Ve("PREVIEW_TIMEOUT","截图操作已超时");if(d.scope==="workbench"||!Object.hasOwn(xn,d.scope))throw Ve("INVALID_CAPTURE_SCOPE","设备像素截图仅支持 device、screen 或 app");if(!d.operationId||d.operationId.length>128)throw Ve("INVALID_OPERATION","截图操作标识无效");if(!d.previewImage.startsWith("data:image/png;base64,")||d.previewImage.length>mh)throw Ve("INVALID_CAPTURE_IMAGE","共享窗口冻结图无效或过大");if(i)throw Ve("PREVIEW_BUSY","已有设备截图正在执行");const f=t.querySelectorAll(xn.device);if(f.length!==1)throw Ve("DEVICE_NOT_UNIQUE","设备画面不唯一或尚未创建");const l=f[0],p=d.scope==="device"?l:t.querySelector(xn[d.scope]);if(!p||p!==l&&!l.contains(p))throw Ve("CAPTURE_TARGET_UNAVAILABLE","截图内容尚未创建");const m=l.getBoundingClientRect();if(!(m.width>0&&m.height>0))throw Ve("CAPTURE_TARGET_UNAVAILABLE","设备画面当前不可见");const E=t.createElement("img");E.alt="",E.setAttribute("aria-hidden","true"),E.setAttribute("data-hb-preview-capture-freeze",""),E.style.cssText=`position:fixed;left:0;top:0;width:${r.innerWidth}px;height:${r.innerHeight}px;max-width:none;max-height:none;margin:0;border:0;padding:0;z-index:2147483647;pointer-events:auto;user-select:none;`,E.addEventListener("wheel",j=>j.preventDefault(),{passive:!1}),E.addEventListener("touchmove",j=>j.preventDefault(),{passive:!1});const w=Math.min(Date.now()+n,d.deadlineAt),I={operationId:d.operationId,token:r.crypto.randomUUID(),overlay:E,attributes:[],scroll:{x:r.scrollX,y:r.scrollY},viewport:{width:r.innerWidth,height:r.innerHeight,devicePixelRatio:r.devicePixelRatio},expiresAt:w};i=I,I.timer=setTimeout(()=>s(I.token),Math.max(0,w-Date.now()));const v=()=>s(I.token);u?.addEventListener("abort",v,{once:!0}),I.removeAbort=()=>u?.removeEventListener("abort",v);const y=()=>{const{viewport:j}=I;(r.innerWidth!==j.width||r.innerHeight!==j.height||r.devicePixelRatio!==j.devicePixelRatio)&&s(I.token)};r.addEventListener("resize",y),I.removeResize=()=>r.removeEventListener("resize",y);const O=()=>{if(u?.throwIfAborted(),i!==I||Date.now()>=w)throw Ve("CAPTURE_EXPIRED","截图布局租约已结束,请重新截图")};try{E.src=d.previewImage,await E.decode(),O();const j=I.token,b=`[${Za}="${j}"]`,T=r.getComputedStyle(l),D=new r.DOMMatrixReadOnly(T.transform==="none"?void 0:T.transform),x=Math.atan2(D.b,D.a),P=l.querySelector(".desktop-window__surface"),Q=P?P.offsetWidth:Number.parseFloat(T.width),R=P?P.offsetHeight:Number.parseFloat(T.height),L=T.backgroundColor,C=r.getComputedStyle(t.body).backgroundColor,z=ye=>!ye||ye==="transparent"||ye==="rgba(0, 0, 0, 0)",k=z(L)?z(C)?"#fff":C:L;if(!(Q>0&&R>0))throw Ve("CAPTURE_TARGET_UNAVAILABLE","设备布局尺寸无效");O(),t.body.append(E),o(I,l,Za),P&&o(I,P,Ka);for(let ye=l.parentElement;ye;ye=ye.parentElement)o(I,ye,zo);const S=t.createElement("style");I.style=S;const M=`
2
2
  [${zo}="${j}"] {overflow:visible!important;scrollbar-width:none!important;}
3
3
  [${zo}="${j}"]::-webkit-scrollbar {display:none!important;}
4
4
  [${Ka}="${j}"] {transform:none!important;transition:none!important;}