@heybox/hb-sdk 0.9.2-alpha.7 → 0.9.2-alpha.9
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/CHANGELOG.md +25 -0
- package/README.md +4 -2
- package/dist/card-controller.cjs.js +35 -3
- package/dist/card-controller.esm.js +35 -3
- package/dist/cli-chunks/{build-Do22AWbq.cjs → build-DvHmPnZZ.cjs} +5 -5
- package/dist/cli-chunks/{context-DQhjWa7X.cjs → context-DYlZV8UG.cjs} +2 -2
- package/dist/cli-chunks/{create-QuI_mw8x.cjs → create-CJ0cyrJG.cjs} +1 -1
- package/dist/cli-chunks/deploy-lock-CmKl9M1c.cjs +148 -0
- package/dist/cli-chunks/{dev-KAhj5UTy.cjs → dev-DhEZBjd6.cjs} +8 -8
- package/dist/cli-chunks/{doctor-DNoQWBpo.cjs → doctor-B8q0UuXs.cjs} +1 -1
- package/dist/cli-chunks/games-CmO-AKXg.cjs +140 -0
- package/dist/cli-chunks/{index-DZUYwb3h.cjs → index-CRwNLk5w.cjs} +1 -1
- package/dist/cli-chunks/{index-bZIxID9N.cjs → index-hYvQR19Q.cjs} +35 -16
- package/dist/cli-chunks/{index.esm-EWleN3S5.cjs → index.esm-DU7YhFWI.cjs} +6 -6
- package/dist/cli-chunks/{login-BYM3Nwau.cjs → login-DMJ45_Bs.cjs} +1 -1
- package/dist/cli-chunks/{project-vite-6eLmb4Em.cjs → project-vite-BGy9w-Bx.cjs} +1 -1
- package/dist/cli-chunks/{remote-dvOjaxJu.cjs → remote-CSuwqlKA.cjs} +33 -146
- package/dist/cli-chunks/{runtime-gate-BKc2zPV-.cjs → runtime-gate-BvcLwvzi.cjs} +3 -2
- package/dist/cli-chunks/{runtime-permission-env-B9SqoP85.cjs → runtime-permission-env-CbqmHz0r.cjs} +14 -2
- package/dist/cli-chunks/{skill-DFXZ0SK_.cjs → skill-CtKW2J0U.cjs} +2 -2
- package/dist/cli-chunks/{version-CwEOrhL1.cjs → version-BQMfLqms.cjs} +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/devtools/browser-dev-host/assets/{browser-dev-host-BitDUIsy.js → browser-dev-host-Cjw0mAi_.js} +1 -1
- package/dist/devtools/browser-dev-host/assets/{desktop-app-launch-B0yrI7xe.js → desktop-app-launch-D9lPBkUV.js} +1 -1
- package/dist/devtools/browser-dev-host/assets/{index-D_mC4Hvt.js → index-DrbZkH9C.js} +3 -3
- package/dist/devtools/browser-dev-host/index.html +2 -2
- package/dist/index.cjs.js +13 -5
- package/dist/index.esm.js +13 -5
- package/dist/miniapp-publish.cjs.js +35 -81
- package/dist/miniapp-publish.esm.js +35 -80
- package/dist/protocol.cjs.js +13 -0
- package/dist/protocol.esm.js +13 -0
- package/dist/templates/vanilla-vite-js/README.md.ejs +4 -0
- package/dist/vite.cjs.js +51 -3
- package/dist/vite.esm.js +51 -3
- package/package.json +5 -4
- package/skill/SKILL.md +9 -0
- package/skill/skill.json +5 -5
- package/types/card-controller.d.ts +35 -3
- package/types/index.d.ts +51 -51
- package/types/miniapp-publish/index.d.ts +28 -60
- package/types/protocol.d.ts +10 -10
- package/types/vite/index.d.ts +8 -1
package/types/protocol.d.ts
CHANGED
|
@@ -207,7 +207,7 @@ interface PathRoot {
|
|
|
207
207
|
* @see [FileHandle](/reference/symbols/root/interfaces/FileHandle) 查看创建、读写、状态与删除方法。
|
|
208
208
|
* @see [文件能力与沙箱](/guide/files-and-sandbox) 路径、权限、Host operation 与配额说明。
|
|
209
209
|
*
|
|
210
|
-
* @since 0.8.0
|
|
210
|
+
* @since 0.8.0
|
|
211
211
|
* @hbPlatform android
|
|
212
212
|
* @hbPlatform ios
|
|
213
213
|
* @hbPlatform ohos
|
|
@@ -276,7 +276,7 @@ interface PathRoot {
|
|
|
276
276
|
* @see [DirectoryHandle](/reference/symbols/root/interfaces/DirectoryHandle) 查看 `create()`、`exists()`、`list()` 与 `remove()`。
|
|
277
277
|
* @see [文件能力与沙箱](/guide/files-and-sandbox) 路径、权限、Host operation 与配额说明。
|
|
278
278
|
*
|
|
279
|
-
* @since 0.8.0
|
|
279
|
+
* @since 0.8.0
|
|
280
280
|
* @hbPlatform android
|
|
281
281
|
* @hbPlatform ios
|
|
282
282
|
* @hbPlatform ohos
|
|
@@ -381,7 +381,7 @@ interface FileHandle {
|
|
|
381
381
|
* @see {@link https://docs.xiaoheihe.cn/hb_sdk/guide/error-handling | 错误处理}
|
|
382
382
|
* @see {@link https://docs.xiaoheihe.cn/hb_sdk/guide/permissions | 权限声明}
|
|
383
383
|
*
|
|
384
|
-
* @since 0.8.0
|
|
384
|
+
* @since 0.8.0
|
|
385
385
|
* @hbPlatform android
|
|
386
386
|
* @hbPlatform ios
|
|
387
387
|
* @hbPlatform ohos
|
|
@@ -514,7 +514,7 @@ interface FileHandle {
|
|
|
514
514
|
* @see [files.pickFiles()](/reference/sdk/files/pickFiles) 取得当前 session 的精确外部文件授权。
|
|
515
515
|
* @see [文件能力与沙箱](/guide/files-and-sandbox) 查看权限、平台与 Host operation 说明。
|
|
516
516
|
*
|
|
517
|
-
* @since 0.8.0
|
|
517
|
+
* @since 0.8.0
|
|
518
518
|
* @hbPlatform android
|
|
519
519
|
* @hbPlatform ios
|
|
520
520
|
* @hbPlatform ohos
|
|
@@ -676,7 +676,7 @@ interface FileHandle {
|
|
|
676
676
|
* @see [files.saveFile()](/reference/sdk/files/saveFile) 让用户指定新的精确可写目标。
|
|
677
677
|
* @see [文件能力与沙箱](/guide/files-and-sandbox) 查看路径、权限、平台与配额边界。
|
|
678
678
|
*
|
|
679
|
-
* @since 0.8.0
|
|
679
|
+
* @since 0.8.0
|
|
680
680
|
* @hbPlatform android
|
|
681
681
|
* @hbPlatform ios
|
|
682
682
|
* @hbPlatform ohos
|
|
@@ -920,7 +920,7 @@ interface FileHandle {
|
|
|
920
920
|
* @see {@link https://docs.xiaoheihe.cn/hb_sdk/guide/error-handling | 错误处理}
|
|
921
921
|
* @see {@link https://docs.xiaoheihe.cn/hb_sdk/guide/permissions | 权限声明}
|
|
922
922
|
*
|
|
923
|
-
* @since 0.8.0
|
|
923
|
+
* @since 0.8.0
|
|
924
924
|
* @hbPlatform android
|
|
925
925
|
* @hbPlatform ios
|
|
926
926
|
* @hbPlatform ohos
|
|
@@ -1105,7 +1105,7 @@ interface DirectoryHandle extends PathRoot {
|
|
|
1105
1105
|
* @see [files.pickDirectory()](/reference/sdk/files/pickDirectory) 取得不可删除的外部目录授权。
|
|
1106
1106
|
* @see [文件能力与沙箱](/guide/files-and-sandbox) 查看来源、权限、平台和错误码边界。
|
|
1107
1107
|
*
|
|
1108
|
-
* @since 0.8.0
|
|
1108
|
+
* @since 0.8.0
|
|
1109
1109
|
* @hbPlatform android
|
|
1110
1110
|
* @hbPlatform ios
|
|
1111
1111
|
* @hbPlatform ohos
|
|
@@ -1386,7 +1386,7 @@ interface FilesModule {
|
|
|
1386
1386
|
* @see {@link https://docs.xiaoheihe.cn/hb_sdk/guide/error-handling | 错误处理}
|
|
1387
1387
|
* @see {@link https://docs.xiaoheihe.cn/hb_sdk/guide/permissions | 权限声明}
|
|
1388
1388
|
*
|
|
1389
|
-
* @since 0.8.0
|
|
1389
|
+
* @since 0.8.0
|
|
1390
1390
|
* @hbPlatform android
|
|
1391
1391
|
* @hbPlatform ios
|
|
1392
1392
|
* @hbPlatform ohos
|
|
@@ -1473,7 +1473,7 @@ interface FilesModule {
|
|
|
1473
1473
|
* @see {@link https://docs.xiaoheihe.cn/hb_sdk/guide/error-handling | 错误处理}
|
|
1474
1474
|
* @see {@link https://docs.xiaoheihe.cn/hb_sdk/guide/permissions | 权限声明}
|
|
1475
1475
|
*
|
|
1476
|
-
* @since 0.8.0
|
|
1476
|
+
* @since 0.8.0
|
|
1477
1477
|
* @hbPlatform android
|
|
1478
1478
|
* @hbPlatform ios
|
|
1479
1479
|
* @hbPlatform ohos
|
|
@@ -1559,7 +1559,7 @@ interface FilesModule {
|
|
|
1559
1559
|
* @see {@link https://docs.xiaoheihe.cn/hb_sdk/guide/error-handling | 错误处理}
|
|
1560
1560
|
* @see {@link https://docs.xiaoheihe.cn/hb_sdk/guide/permissions | 权限声明}
|
|
1561
1561
|
*
|
|
1562
|
-
* @since 0.8.0
|
|
1562
|
+
* @since 0.8.0
|
|
1563
1563
|
* @hbPlatform android
|
|
1564
1564
|
* @hbPlatform ios
|
|
1565
1565
|
* @hbPlatform ohos
|
package/types/vite/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ interface MiniappManifestPlugin {
|
|
|
27
27
|
/** 记录 Vite 根目录、输出目录、运行命令和开发期 HMR 地址。 */
|
|
28
28
|
configResolved: (resolved: MiniappManifestResolvedConfig) => void;
|
|
29
29
|
/** 为 `hb-sdk dev` 注册本机调试能力;生产构建不会创建开发服务。 */
|
|
30
|
-
configureServer: (
|
|
30
|
+
configureServer: (server: MiniappManifestDevServer) => void;
|
|
31
31
|
/** 保留 Rollup/Vite 已报告的构建错误,避免产物校验用二次错误掩盖原始原因。 */
|
|
32
32
|
buildEnd: (error?: Error) => void;
|
|
33
33
|
/** 向入口 HTML 注入 Runtime Gate 和平台 CSP;serve 时还会加入受限的 HMR 与日志调试支持。 */
|
|
@@ -42,6 +42,12 @@ interface MiniappManifestPlugin {
|
|
|
42
42
|
* 这是插件返回值暴露的 hook 类型,不是 `miniappManifest()` 的配置项。业务项目应让 Vite 创建并传入服务实例。
|
|
43
43
|
*/
|
|
44
44
|
interface MiniappManifestDevServer {
|
|
45
|
+
/** Vite 解析后的日志入口,兼容 Vite 5 及后续版本的开发服务 hook。 */
|
|
46
|
+
config: {
|
|
47
|
+
logger: {
|
|
48
|
+
warn: (message: string) => void;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
45
51
|
/** Vite 底层 HTTP 服务;middleware mode 或尚未监听时可能为空。 */
|
|
46
52
|
httpServer?: Server | null;
|
|
47
53
|
/** Vite 配置重载入口;插件会在重载期间保留当前本地调试快照。 */
|
|
@@ -226,6 +232,7 @@ declare const HB_SDK_MINI_PROGRAM_MANIFEST_ACCESS_TOKEN_ENV = "HB_SDK_MINI_PROGR
|
|
|
226
232
|
* @see [权限声明](/guide/permissions) `heybox.permissions` 严格 schema 与迁移规则。
|
|
227
233
|
* @see [窗口尺寸与可缩放性](/guide/window-size) `heybox.window` 字段与 Host 消费语义。
|
|
228
234
|
* @see [受管桌面程序](/guide/companion) Companion 声明、归档和本地联调边界。
|
|
235
|
+
* @since 0.3.1
|
|
229
236
|
*/
|
|
230
237
|
declare function miniappManifest(): MiniappManifestPlugin;
|
|
231
238
|
|