@heybox/hb-sdk 0.9.1-alpha.8 → 0.9.1
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 +123 -17
- package/README.md +18 -17
- package/dist/cli-chunks/_commonjs-dynamic-modules-DUamuDzp.cjs +7 -0
- package/dist/cli-chunks/browser-RAy8e8cV.cjs +635 -0
- package/dist/cli-chunks/{build-CQkpLf81.cjs → build-DCp9C9V4.cjs} +10 -14
- package/dist/cli-chunks/{context-CqJDNtEi.cjs → context-Bg6C5ow7.cjs} +10 -5
- package/dist/cli-chunks/{create-BRuR2M7y.cjs → create-D5bX2Xvw.cjs} +7 -12
- package/dist/cli-chunks/{dev-KJAFHEg_.cjs → dev-CFjwhG3q.cjs} +195 -82
- package/dist/cli-chunks/{doctor-DhiUViwk.cjs → doctor-CMz_Kf7-.cjs} +9 -13
- package/dist/cli-chunks/{index-9trmrUtW.cjs → index-B_KKGIBN.cjs} +13591 -10542
- package/dist/cli-chunks/{index-rxAV5dza.cjs → index-YnVa6S_p.cjs} +9 -10
- package/dist/cli-chunks/{index.esm-Cv9FlhXy.cjs → index.esm-CgZPnqEA.cjs} +43 -43
- package/dist/cli-chunks/{login-5DEcU9eL.cjs → login-Df_v6jNs.cjs} +13 -12
- package/dist/cli-chunks/{project-vite-CXWFwbEz.cjs → project-vite-By8cnIwP.cjs} +1 -1
- package/dist/cli-chunks/{remote-laUZaGpI.cjs → remote-ClIJz-e2.cjs} +42 -71
- package/dist/cli-chunks/{runtime-gate-DmJhPcNQ.cjs → runtime-gate-DKiyNwX2.cjs} +9 -13
- package/dist/cli-chunks/{runtime-permission-env-Gy2dH17F.cjs → runtime-permission-env-BNQ2fx4w.cjs} +82 -2794
- package/dist/cli-chunks/{skill--mZIZkyn.cjs → skill-Bk-EBSbJ.cjs} +10 -14
- package/dist/cli-chunks/{version-BMp9qmtC.cjs → version-CG_VNZGM.cjs} +1 -1
- package/dist/cli.cjs +11 -16
- package/dist/devtools/browser-dev-host/assets/browser-dev-host-C1g2tadT.js +102 -0
- package/dist/devtools/browser-dev-host/assets/{desktop-app-launch-BU-vzcs0.js → desktop-app-launch-sH2a_jbj.js} +1 -1
- package/dist/devtools/browser-dev-host/assets/{index-BRxbUJVN.css → index-7Cq8iNcD.css} +1 -1
- package/dist/devtools/browser-dev-host/assets/{index-BZBZfB4t.js → index-Bpxbe1lP.js} +4 -4
- package/dist/devtools/browser-dev-host/index.html +3 -3
- package/dist/index.cjs.js +16 -8
- package/dist/index.esm.js +16 -8
- package/dist/miniapp-publish.cjs.js +27 -0
- package/dist/miniapp-publish.esm.js +27 -0
- package/dist/protocol.cjs.js +1 -1
- package/dist/protocol.esm.js +1 -1
- package/dist/vite.cjs.js +36 -1
- package/dist/vite.esm.js +36 -1
- package/docs/runtime-host-migration.md +4 -2
- package/package.json +6 -5
- package/skill/SKILL.md +10 -0
- package/skill/skill.json +5 -5
- package/types/index.d.ts +124 -94
- package/types/miniapp-publish/index.d.ts +3 -0
- package/types/protocol.d.ts +47 -39
- package/types/vite/index.d.ts +1 -0
- package/dist/cli-chunks/browser-YVckob3g.cjs +0 -15
- package/dist/devtools/browser-dev-host/assets/browser-dev-host-COdk-39n.js +0 -102
|
@@ -3,10 +3,10 @@
|
|
|
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 runtimePermissionEnv = require('./runtime-permission-env-
|
|
6
|
+
var runtimePermissionEnv = require('./runtime-permission-env-BNQ2fx4w.cjs');
|
|
7
7
|
var fs$1 = require('node:fs');
|
|
8
8
|
var sharp = require('sharp');
|
|
9
|
-
var index = require('./index-
|
|
9
|
+
var index = require('./index-B_KKGIBN.cjs');
|
|
10
10
|
|
|
11
11
|
async function inspectBasicInfoImage(bytes, sourcePath, kind) {
|
|
12
12
|
const inspected = await inspectDecodedBasicInfoImage(bytes, kind);
|
|
@@ -376,13 +376,17 @@ function createBrowserDevPermissionState(context) {
|
|
|
376
376
|
}
|
|
377
377
|
: cloneDefaultPermissionState();
|
|
378
378
|
}
|
|
379
|
-
/** Mobile Dev Session
|
|
379
|
+
/** Mobile Dev Session 使用本地声明与平台基线,不读取 Browser 模拟权限状态。 */
|
|
380
380
|
function createMobileDevSessionRuntimePermissions(context) {
|
|
381
381
|
if (context.source !== 'remote') {
|
|
382
382
|
return { schema_version: 1, entries: [] };
|
|
383
383
|
}
|
|
384
|
-
|
|
385
|
-
|
|
384
|
+
// 历史内部调用没有本地声明,沿用旧快照适配;新 CLI 始终显式提供声明(可为空)。
|
|
385
|
+
if (context.declaredPermissions === undefined) {
|
|
386
|
+
const state = createBrowserDevPermissionState(context);
|
|
387
|
+
return createDevRuntimePermissions(context.runtimePermissions, state, state.networkRequest.useOfficialDomain);
|
|
388
|
+
}
|
|
389
|
+
return runtimePermissionEnv.composeLocalDevRuntimePermissions({ declaredPermissions: context.declaredPermissions, runtimePermissions: context.runtimePermissions }).runtimePermissions;
|
|
386
390
|
}
|
|
387
391
|
function cloneDefaultPermissionState() {
|
|
388
392
|
return {
|
|
@@ -623,6 +627,7 @@ async function createLocalDevLaunchToken(options, runtime = {}) {
|
|
|
623
627
|
const api = await resolveRemoteApiClient(options, runtime);
|
|
624
628
|
return api.createLocalDevLaunchToken({
|
|
625
629
|
mini_program_id: miniProgramId,
|
|
630
|
+
...(options.developmentSnapshot ? { development_snapshot: options.developmentSnapshot } : {}),
|
|
626
631
|
...(options.companionManifestSha256
|
|
627
632
|
? { companion_manifest_sha256: options.companionManifestSha256 }
|
|
628
633
|
: {}),
|
|
@@ -5,24 +5,19 @@ 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-
|
|
8
|
+
var index = require('./index-B_KKGIBN.cjs');
|
|
9
9
|
require('node:module');
|
|
10
|
-
require('os');
|
|
11
|
-
require('constants');
|
|
12
|
-
require('stream');
|
|
13
|
-
require('util');
|
|
14
|
-
require('assert');
|
|
15
10
|
require('readline');
|
|
11
|
+
require('os');
|
|
16
12
|
require('tty');
|
|
13
|
+
require('assert');
|
|
17
14
|
require('events');
|
|
15
|
+
require('stream');
|
|
18
16
|
require('buffer');
|
|
17
|
+
require('util');
|
|
19
18
|
require('node:crypto');
|
|
20
|
-
require('
|
|
21
|
-
require('node:
|
|
22
|
-
require('node:url');
|
|
23
|
-
require('node:util');
|
|
24
|
-
require('node:child_process');
|
|
25
|
-
require('node:os');
|
|
19
|
+
require('constants');
|
|
20
|
+
require('node:zlib');
|
|
26
21
|
|
|
27
22
|
var ejs = {};
|
|
28
23
|
|