@heybox/hb-sdk 0.8.1-alpha.7 → 0.8.1-alpha.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.
- package/CHANGELOG.md +6 -1
- package/README.md +1 -1
- package/dist/cli-chunks/{build-C8oN_Ms9.cjs → build-BYWPo2MY.cjs} +4 -4
- package/dist/cli-chunks/{context-DZkqvg9S.cjs → context-B4tBsR6l.cjs} +11 -2
- package/dist/cli-chunks/{create-CToSHRfO.cjs → create-Dct-INxs.cjs} +1 -1
- package/dist/cli-chunks/{dev-CTA0lsLD.cjs → dev-6N5ruKiC.cjs} +165 -34
- package/dist/cli-chunks/{doctor-DRa_kjP1.cjs → doctor-9HtdddBL.cjs} +1 -1
- package/dist/cli-chunks/{index-zNpZDWhc.cjs → index-Bc4AXYHM.cjs} +15 -15
- package/dist/cli-chunks/{index-Bkl5YmtN.cjs → index-Cl5cfUqJ.cjs} +2 -2
- package/dist/cli-chunks/{index.esm-CGoUW47e.cjs → index.esm-DhXN7XjE.cjs} +7 -7
- package/dist/cli-chunks/{login-CCEPk2Ok.cjs → login-CTZgu8Q-.cjs} +2 -2
- package/dist/cli-chunks/{project-vite-couFw5bL.cjs → project-vite--h2M6eBb.cjs} +1 -1
- package/dist/cli-chunks/{remote-DQ70o-Km.cjs → remote-0hw42fDG.cjs} +6 -6
- package/dist/cli-chunks/{runtime-permission-env-BN43V7d0.cjs → runtime-permission-env-Bvggu6mn.cjs} +1 -1
- package/dist/cli-chunks/{session-C1R_39si.cjs → session-5fnHlEGO.cjs} +1 -1
- package/dist/cli-chunks/{skill-CVXOE5jH.cjs → skill-DrFEqmdD.cjs} +2 -2
- package/dist/cli-chunks/{version-DbDVL6vm.cjs → version-CccOA4so.cjs} +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/devtools/browser-dev-host/assets/browser-dev-host-BQ9v4rI1.js +101 -0
- package/dist/devtools/browser-dev-host/assets/{index-DocojUxT.js → index-8LTH05np.js} +2 -2
- package/dist/devtools/browser-dev-host/index.html +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/vite.cjs.js +1 -1
- package/dist/vite.esm.js +1 -1
- package/package.json +7 -7
- package/skill/SKILL.md +1 -1
- package/skill/references/api-root.md +1 -1
- package/skill/references/cli.md +2 -0
- package/skill/skill.json +5 -5
- package/types/protocol/dev-session.d.ts +2 -1
- package/dist/devtools/browser-dev-host/assets/browser-dev-host-CH6L1ZJI.js +0 -101
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<meta name="theme-color" content="#f4f5f7" />
|
|
7
7
|
<title>小程序工坊调试台</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-8LTH05np.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/desktop-app-launch-DnPRjCa3.js">
|
|
10
10
|
<link rel="stylesheet" crossorigin href="/assets/index-D-aNERAr.css">
|
|
11
11
|
</head>
|
package/dist/index.cjs.js
CHANGED
|
@@ -835,7 +835,7 @@ function createMessageId() {
|
|
|
835
835
|
/** 构建时替换为当前发布包的实际版本。 */
|
|
836
836
|
const HB_SDK_VERSION = typeof undefined === 'string'
|
|
837
837
|
? undefined
|
|
838
|
-
: '0.8.1-alpha.
|
|
838
|
+
: '0.8.1-alpha.8';
|
|
839
839
|
|
|
840
840
|
const RUNTIME_MODES = new Set(['production', 'preview', 'development', 'unknown']);
|
|
841
841
|
const OPERATING_SYSTEM_NAMES = new Set(['android', 'ios', 'ohos', 'windows', 'macos', 'linux', 'unknown']);
|
package/dist/index.esm.js
CHANGED
|
@@ -831,7 +831,7 @@ function createMessageId() {
|
|
|
831
831
|
/** 构建时替换为当前发布包的实际版本。 */
|
|
832
832
|
const HB_SDK_VERSION = typeof undefined === 'string'
|
|
833
833
|
? undefined
|
|
834
|
-
: '0.8.1-alpha.
|
|
834
|
+
: '0.8.1-alpha.8';
|
|
835
835
|
|
|
836
836
|
const RUNTIME_MODES = new Set(['production', 'preview', 'development', 'unknown']);
|
|
837
837
|
const OPERATING_SYSTEM_NAMES = new Set(['android', 'ios', 'ohos', 'windows', 'macos', 'linux', 'unknown']);
|
package/dist/vite.cjs.js
CHANGED
|
@@ -11,7 +11,7 @@ var _documentCurrentScript = typeof document !== 'undefined' ? document.currentS
|
|
|
11
11
|
/** 构建时替换为当前发布包的实际版本。 */
|
|
12
12
|
const HB_SDK_VERSION = typeof undefined === 'string'
|
|
13
13
|
? undefined
|
|
14
|
-
: '0.8.1-alpha.
|
|
14
|
+
: '0.8.1-alpha.8';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* iframe 与调试台页面的开发期 console 捕获转发。
|
package/dist/vite.esm.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heybox/hb-sdk",
|
|
3
|
-
"version": "0.8.1-alpha.
|
|
3
|
+
"version": "0.8.1-alpha.8",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"./src/index.ts",
|
|
6
6
|
"./src/core/singleton.ts",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"skills": "1.5.23",
|
|
63
63
|
"undici": "^7.28.0",
|
|
64
64
|
"ws": "^8.18.0",
|
|
65
|
-
"@heybox/hb-sdk-protocol": "0.8.1-alpha.
|
|
65
|
+
"@heybox/hb-sdk-protocol": "0.8.1-alpha.8"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"vite": ">=5"
|
|
@@ -113,13 +113,13 @@
|
|
|
113
113
|
"vue-tsc": "^3.3.7",
|
|
114
114
|
"vite": "^8.0.12",
|
|
115
115
|
"vitest": "^3.2.4",
|
|
116
|
+
"@heybox-domain/heybox-vue3-ui": "~0.1.0",
|
|
116
117
|
"@heybox/hb-api": "~1.28.3",
|
|
118
|
+
"@heybox/hb-sdk-runtime": "~0.8.1-alpha.8",
|
|
117
119
|
"@heybox-domain/heybox-theme": "~0.1.0",
|
|
118
|
-
"@heybox/hb-sdk-runtime": "~0.8.1-alpha.7",
|
|
119
|
-
"@heybox/runtime-policy": "~0.2.0",
|
|
120
|
-
"@heybox-domain/heybox-vue3-ui": "~0.1.0",
|
|
121
120
|
"@heybox/runtime-transport-fetch": "~0.2.0",
|
|
122
|
-
"@heybox/runtime": "~0.2.0"
|
|
121
|
+
"@heybox/runtime": "~0.2.0",
|
|
122
|
+
"@heybox/runtime-policy": "~0.2.0"
|
|
123
123
|
},
|
|
124
124
|
"publishConfig": {
|
|
125
125
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"check:compatibility-evidence": "node scripts/validate-compatibility-evidence.mjs",
|
|
172
172
|
"check:api-semver": "node ../../ops/jobs/hb-sdk-docs-contract/semantic-diff.cjs",
|
|
173
173
|
"clean": "rimraf ./dist && rimraf ./types",
|
|
174
|
-
"test:unit": "
|
|
174
|
+
"test:unit": "vitest run",
|
|
175
175
|
"test:types:characterization": "tsc -p tsconfig.characterization.json --noEmit --pretty false",
|
|
176
176
|
"test:types:browser-dev-host": "vue-tsc -p tsconfig.browser-dev-host.json --noEmit --pretty false",
|
|
177
177
|
"test:types": "pnpm run test:types:characterization && pnpm run test:types:browser-dev-host",
|
package/skill/SKILL.md
CHANGED
|
@@ -61,7 +61,7 @@ Apply these instructions when writing, reviewing, or debugging code that consume
|
|
|
61
61
|
|
|
62
62
|
1. Use `hb-sdk create <project-name>` to scaffold a workshop mini-program.
|
|
63
63
|
2. Use `hb-sdk dev` for Browser Mock and Mobile App debugging. Browser debugging can start without CLI login, project binding, or a remote Dev Context; capabilities that need those inputs fail explicitly. Mobile uses the single QR entry with the `open_inapp` and `heybox://` `openWindow` wrapper around a LAN short URL, then opens `heybox-mini-dev://sandbox` with the complete launch context.
|
|
64
|
-
3. The debugging page does not edit permissions. Treat the validated remote
|
|
64
|
+
3. The debugging page does not edit permissions. Treat the effective intersection of the current project declaration and validated remote approval as canonical Runtime input. Mobile debugging preserves `useOfficialDomain: true` only when both inputs allow it, refreshes the effective permissions before opening on a phone, and never accepts a browser-side permission override. Use `--port`, `--browser-dev-host-port`, and `--no-open` to control local endpoints and browser opening. Select a Mobile network interface the device can reach. `launch.json` is a LAN discovery document, not authentication, encryption, signing, or HMAC protection.
|
|
65
65
|
For real PC Companion debugging, configure local artifacts in `package.json#heybox.companions`, keep `miniappManifest()` enabled, bind the project, and ensure COA has approved `companion`. `hb-sdk dev` validates immutable snapshots without requiring an upload; config or artifact changes rotate the snapshot while existing Sessions retain their original artifact. Prepare and launch the new artifact explicitly. Check separate Browser, Mobile and PC Companion readiness in the debugging workbench. Without a local declaration, use Browser Fake only for state/UI integration.
|
|
66
66
|
4. Use `hb-sdk build [--env <name>] [--verbose]` as the recommended production build entry. It directly owns the Vite build, always cleans and writes `dist/`, and works without CLI login, project binding, or network access.
|
|
67
67
|
5. Declare the actual supported platforms in `package.json#heybox.platforms` and keep the no-argument `miniappManifest()` explicitly enabled in `vite.config.ts`; `hb-sdk build` must fail when the declaration, Manifest, or Runtime gate output is missing or inconsistent.
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
## Package metadata
|
|
28
28
|
|
|
29
29
|
- Package: `@heybox/hb-sdk`
|
|
30
|
-
- Version at generation time: `0.8.1-alpha.
|
|
30
|
+
- Version at generation time: `0.8.1-alpha.8`
|
|
31
31
|
- Public root export: `@heybox/hb-sdk`
|
|
32
32
|
- Protocol export: `@heybox/hb-sdk/protocol`
|
|
33
33
|
- Vite plugin export: `@heybox/hb-sdk/vite`
|
package/skill/references/cli.md
CHANGED
|
@@ -121,6 +121,8 @@ CLI 会启动页面服务并自动打开 Vue 3 本地调试台。左侧集中放
|
|
|
121
121
|
|
|
122
122
|
本地真 PC 调试 Companion 不要求先上传版本,但必须在 `package.json#heybox.companions` 中配置本地 ZIP、绑定项目,并由 COA 批准 `companion`;`miniappManifest()` 只保留构建配置。dev server 只向 loopback 提供 canonical Manifest 与固定 ZIP 路由;CLI 在签发或刷新本地启动票时绑定 Manifest 摘要。配置或 ZIP 变化后会校验并切换到新快照,已有 Session 保持原有产物,新产物须重新准备与启动。调试台分别展示浏览器、手机与 PC Companion 的就绪状态,以及本地 alias、target 和摘要短前缀;产物缺失、校验失败或授权不可用时显示明确阻塞原因,不影响浏览器联调。没有本地 Companion 配置时仍可使用 Browser Fake 做状态联调,但真实 PC Companion 会 fail closed。
|
|
123
123
|
|
|
124
|
+
手机 Dev Session 仅使用当前版本声明与平台批准结果求交后的有效权限,不接受调试页本地覆盖。两者均允许 `useOfficialDomain: true` 时,真机扫码调试会保留该配置;未批准、未声明或非法快照继续 fail closed。
|
|
125
|
+
|
|
124
126
|
Browser Mock 会自动在实时与兼容链路间切换。手机调试使用 `open_inapp`/`openWindow` 包裹的 LAN 短链接二维码(先开普通 H5 跳转页,再进入小程序并关闭中间页)。
|
|
125
127
|
|
|
126
128
|
### 2. 先用浏览器 Mock 验收
|
package/skill/skill.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hb-sdk",
|
|
3
|
-
"skillVersion": "0.8.1-alpha.
|
|
3
|
+
"skillVersion": "0.8.1-alpha.8+skill.8df6196da06d",
|
|
4
4
|
"sdk": {
|
|
5
5
|
"package": "@heybox/hb-sdk",
|
|
6
|
-
"version": "0.8.1-alpha.
|
|
7
|
-
"compatibility": "0.8.1-alpha.
|
|
6
|
+
"version": "0.8.1-alpha.8",
|
|
7
|
+
"compatibility": "0.8.1-alpha.8"
|
|
8
8
|
},
|
|
9
9
|
"distribution": {
|
|
10
10
|
"type": "npm",
|
|
11
11
|
"package": "@heybox/hb-sdk",
|
|
12
|
-
"version": "0.8.1-alpha.
|
|
12
|
+
"version": "0.8.1-alpha.8",
|
|
13
13
|
"path": "skill"
|
|
14
14
|
},
|
|
15
|
-
"integrity": "sha256-
|
|
15
|
+
"integrity": "sha256-8df6196da06d2647adf2fcc5c715f24e27824577c944fb6854d4986bd12d31ca"
|
|
16
16
|
}
|
|
@@ -12,7 +12,8 @@ export declare const MINI_PROGRAM_DEV_LAUNCH_SCHEMA_VERSION: 1;
|
|
|
12
12
|
/** Browser Dev Host 创建 Dev Session 时接收的请求。 */
|
|
13
13
|
export interface MiniProgramDevSessionCreatePayload {
|
|
14
14
|
mini_url_origin: string;
|
|
15
|
-
|
|
15
|
+
/** 仅用于兼容旧 Node 服务;当前服务端忽略该字段并自行读取远端权限。 */
|
|
16
|
+
runtime_permissions?: MiniProgramRuntimePermissionsSnapshot;
|
|
16
17
|
}
|
|
17
18
|
/** Browser Dev Host 创建 Dev Session 后返回的短期引用。 */
|
|
18
19
|
export interface MiniProgramDevSessionCreateResult {
|