@heybox/hb-sdk 0.8.0-alpha → 0.8.0-alpha.2
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 +36 -1
- package/README.md +67 -14
- package/THIRD_PARTY_NOTICES.md +1755 -0
- package/dist/cli-chunks/{build-DJWFSM1B.cjs → build-CCLWgXyA.cjs} +2 -2
- package/dist/cli-chunks/{context-DV2UK1Nz.cjs → context-Brh56h56.cjs} +1 -26
- package/dist/cli-chunks/{create-2HfoB48V.cjs → create-BZ-hi2s1.cjs} +1 -1
- package/dist/cli-chunks/{dev-Dgt2zS9k.cjs → dev-CoSXtEYa.cjs} +335 -516
- package/dist/cli-chunks/{doctor-C95gIao_.cjs → doctor-EsCYJGhV.cjs} +1 -1
- package/dist/cli-chunks/{index-D62ANeBv.cjs → index-BL5eEPap.cjs} +14 -14
- package/dist/cli-chunks/{index-BjoSXl8C.cjs → index-CS6Q0o5C.cjs} +1 -1
- package/dist/cli-chunks/{index.esm-CigcxJ2B.cjs → index.esm-BoBHPfpq.cjs} +5 -5
- package/dist/cli-chunks/{login-Cumknwdx.cjs → login-CILLxGuf.cjs} +2 -2
- package/dist/cli-chunks/{project-vite-CcE-HMmd.cjs → project-vite-Qu6Xe9Dn.cjs} +1 -1
- package/dist/cli-chunks/{remote-DDdP3xcE.cjs → remote-DRuTQ51u.cjs} +4 -4
- package/dist/cli-chunks/{session-BDi_AZSv.cjs → session-D-_N3WVL.cjs} +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/devtools/browser-dev-host/assets/browser-dev-host-uq-Wac6k.js +97 -0
- package/dist/devtools/browser-dev-host/assets/heybox-logo-CogNENsk.svg +6 -0
- package/dist/devtools/browser-dev-host/assets/index-CeP6SLB3.js +567 -0
- package/dist/devtools/browser-dev-host/assets/index-KD2f3Jdz.css +1 -0
- package/dist/devtools/browser-dev-host/assets/workbench-state-D-1U0JRq.js +5 -0
- package/dist/devtools/browser-dev-host/index.html +6 -435
- package/dist/index.cjs.js +924 -28
- package/dist/index.esm.js +924 -29
- package/dist/protocol.cjs.js +208 -6
- package/dist/protocol.esm.js +182 -7
- package/dist/vite.cjs.js +1 -1
- package/dist/vite.esm.js +1 -1
- package/package.json +23 -9
- package/skill/SKILL.md +9 -5
- package/skill/references/api-protocol.md +99 -3
- package/skill/references/api-root.md +141 -14
- package/skill/references/cli.md +21 -17
- package/skill/references/examples.md +29 -0
- package/skill/references/recipes.md +105 -1
- package/skill/references/safety-boundaries.md +11 -0
- package/skill/scripts/sync-references.mjs +34 -2
- package/skill/skill.json +4 -4
- package/types/core/client.d.ts +17 -1
- package/types/core/sdk.d.ts +3 -0
- package/types/core/singleton.d.ts +3 -0
- package/types/index.d.ts +4 -2
- package/types/modules/files/index.d.ts +5 -0
- package/types/modules/files/registry.d.ts +35 -0
- package/types/modules/files/types.d.ts +159 -0
- package/types/modules/network/index.d.ts +50 -3
- package/types/protocol/capabilities.d.ts +2 -2
- package/types/protocol/constants.d.ts +1 -1
- package/types/protocol/guards.d.ts +1 -1
- package/types/protocol/types.d.ts +1 -1
- package/types/protocol.d.ts +4 -3
- package/dist/devtools/browser-dev-host/main.js +0 -12263
|
@@ -5,8 +5,8 @@ var fs = require('node:fs/promises');
|
|
|
5
5
|
var path = require('node:path');
|
|
6
6
|
var runtimePermissionEnv = require('./runtime-permission-env-CjsCe5bp.cjs');
|
|
7
7
|
var runtimeGate = require('./runtime-gate-DFjw66kF.cjs');
|
|
8
|
-
var index = require('./index-
|
|
9
|
-
var projectVite = require('./project-vite-
|
|
8
|
+
var index = require('./index-BL5eEPap.cjs');
|
|
9
|
+
var projectVite = require('./project-vite-Qu6Xe9Dn.cjs');
|
|
10
10
|
require('node:async_hooks');
|
|
11
11
|
require('node:module');
|
|
12
12
|
require('path');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var session = require('./session-
|
|
3
|
+
var session = require('./session-D-_N3WVL.cjs');
|
|
4
4
|
var runtimePermissionEnv = require('./runtime-permission-env-CjsCe5bp.cjs');
|
|
5
5
|
var fs$1 = require('node:fs');
|
|
6
6
|
var fs = require('node:fs/promises');
|
|
@@ -45,23 +45,6 @@ function isRecord(value) {
|
|
|
45
45
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
function parseBrowserDevPermissionState(value) {
|
|
49
|
-
if (!isPlainRecord(value) || !hasExactKeys(value, ['networkRequest']))
|
|
50
|
-
return undefined;
|
|
51
|
-
const networkRequest = value.networkRequest;
|
|
52
|
-
if (!isPlainRecord(networkRequest) || !hasExactKeys(networkRequest, ['status', 'useOfficialDomain']))
|
|
53
|
-
return undefined;
|
|
54
|
-
if (networkRequest.status !== 'enabled' && networkRequest.status !== 'disabled')
|
|
55
|
-
return undefined;
|
|
56
|
-
if (typeof networkRequest.useOfficialDomain !== 'boolean')
|
|
57
|
-
return undefined;
|
|
58
|
-
return {
|
|
59
|
-
networkRequest: {
|
|
60
|
-
status: networkRequest.status,
|
|
61
|
-
useOfficialDomain: networkRequest.useOfficialDomain,
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
48
|
function shouldSkipMiniappPlatformCsp(runtimePermissions) {
|
|
66
49
|
const parsed = parseMiniProgramRuntimePermissions(runtimePermissions);
|
|
67
50
|
const networkRequest = parsed.permissions['network.request'];
|
|
@@ -104,13 +87,6 @@ function cloneDefaultPermissionState() {
|
|
|
104
87
|
networkRequest: { ...DEFAULT_PERMISSION_STATE.networkRequest },
|
|
105
88
|
};
|
|
106
89
|
}
|
|
107
|
-
function isPlainRecord(value) {
|
|
108
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value) && Object.getPrototypeOf(value) === Object.prototype;
|
|
109
|
-
}
|
|
110
|
-
function hasExactKeys(value, keys) {
|
|
111
|
-
const actualKeys = Object.keys(value);
|
|
112
|
-
return actualKeys.length === keys.length && keys.every((key) => Object.hasOwn(value, key));
|
|
113
|
-
}
|
|
114
90
|
|
|
115
91
|
function createRemoteApiClient(options) {
|
|
116
92
|
return {
|
|
@@ -425,7 +401,6 @@ exports.createBrowserDevRuntimePermissions = createBrowserDevRuntimePermissions;
|
|
|
425
401
|
exports.createLocalDevLaunchToken = createLocalDevLaunchToken;
|
|
426
402
|
exports.createRemoteApiClientForEnvironment = createRemoteApiClientForEnvironment;
|
|
427
403
|
exports.getBoundMiniProgram = getBoundMiniProgram;
|
|
428
|
-
exports.parseBrowserDevPermissionState = parseBrowserDevPermissionState;
|
|
429
404
|
exports.parseMiniProgramRuntimePermissions = parseMiniProgramRuntimePermissions;
|
|
430
405
|
exports.readBoundMiniProgramId = readBoundMiniProgramId;
|
|
431
406
|
exports.readBoundMiniProgramIdFromPackageJson = readBoundMiniProgramIdFromPackageJson;
|
|
@@ -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-
|
|
8
|
+
var index = require('./index-BL5eEPap.cjs');
|
|
9
9
|
require('node:module');
|
|
10
10
|
require('os');
|
|
11
11
|
require('readline');
|