@heybox/hb-sdk 0.6.7 → 0.6.8-alpha.0
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 +226 -0
- package/README.md +65 -583
- package/dist/cli-chunks/{build-DaHCCSLH.cjs → build-BfhZ07Qv.cjs} +2 -2
- package/dist/cli-chunks/{context-cQXupHub.cjs → context-CqoGNt7d.cjs} +1 -1
- package/dist/cli-chunks/{create-D2dSw7bl.cjs → create-us7swTbU.cjs} +1 -1
- package/dist/cli-chunks/{dev-D6WhI3cC.cjs → dev-Bf49EoR8.cjs} +5 -5
- package/dist/cli-chunks/{doctor-CtNS5Tt2.cjs → doctor-CzETlRvH.cjs} +1 -1
- package/dist/cli-chunks/{index-B1w-Jpba.cjs → index-BMhV2-vd.cjs} +14 -14
- package/dist/cli-chunks/{index-C4y2G95g.cjs → index-Cd37cCQM.cjs} +1 -1
- package/dist/cli-chunks/{login-D-ZK-n1E.cjs → login-Cb5ShNVQ.cjs} +2 -2
- package/dist/cli-chunks/{project-vite-J4lrUja0.cjs → project-vite-WP6NzC3p.cjs} +1 -1
- package/dist/cli-chunks/{remote-BZNHAL5_.cjs → remote-Co84uKvV.cjs} +4 -4
- package/dist/cli-chunks/{session-5ryBp2wZ.cjs → session-9A8AY7YK.cjs} +1 -1
- package/dist/cli.cjs +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 +3 -1
- package/skill/references/api-protocol.md +0 -10
- package/skill/references/api-root.md +153 -353
- package/skill/references/safety-boundaries.md +6 -9
- package/skill/scripts/sync-references.mjs +10 -20
- package/skill/skill.json +4 -4
|
@@ -5,8 +5,8 @@ var fs = require('node:fs/promises');
|
|
|
5
5
|
var path = require('node:path');
|
|
6
6
|
var index$1 = require('./index-v4-6fbXX.cjs');
|
|
7
7
|
var runtimeGate = require('./runtime-gate-DfMJQGH9.cjs');
|
|
8
|
-
var index = require('./index-
|
|
9
|
-
var projectVite = require('./project-vite-
|
|
8
|
+
var index = require('./index-BMhV2-vd.cjs');
|
|
9
|
+
var projectVite = require('./project-vite-WP6NzC3p.cjs');
|
|
10
10
|
require('node:module');
|
|
11
11
|
require('path');
|
|
12
12
|
require('os');
|
|
@@ -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-BMhV2-vd.cjs');
|
|
9
9
|
require('node:module');
|
|
10
10
|
require('os');
|
|
11
11
|
require('readline');
|
|
@@ -9,9 +9,9 @@ var node_http = require('node:http');
|
|
|
9
9
|
var node_crypto = require('node:crypto');
|
|
10
10
|
var undici = require('undici');
|
|
11
11
|
var browser = require('./browser-RAy8e8cV.cjs');
|
|
12
|
-
var index = require('./index-
|
|
13
|
-
var projectVite = require('./project-vite-
|
|
14
|
-
var context = require('./context-
|
|
12
|
+
var index = require('./index-BMhV2-vd.cjs');
|
|
13
|
+
var projectVite = require('./project-vite-WP6NzC3p.cjs');
|
|
14
|
+
var context = require('./context-CqoGNt7d.cjs');
|
|
15
15
|
var fs$1 = require('node:fs/promises');
|
|
16
16
|
require('node:process');
|
|
17
17
|
require('node:buffer');
|
|
@@ -28,7 +28,7 @@ require('events');
|
|
|
28
28
|
require('stream');
|
|
29
29
|
require('buffer');
|
|
30
30
|
require('util');
|
|
31
|
-
require('./session-
|
|
31
|
+
require('./session-9A8AY7YK.cjs');
|
|
32
32
|
require('fs');
|
|
33
33
|
require('constants');
|
|
34
34
|
require('./index-v4-6fbXX.cjs');
|
|
@@ -1259,7 +1259,7 @@ function cloneDefaultPermissionState() {
|
|
|
1259
1259
|
/** 构建时替换为当前发布包的实际版本。 */
|
|
1260
1260
|
const HB_SDK_VERSION = typeof undefined === 'string'
|
|
1261
1261
|
? undefined
|
|
1262
|
-
: '0.6.
|
|
1262
|
+
: '0.6.8-alpha.0';
|
|
1263
1263
|
|
|
1264
1264
|
class DevPermissionOverrideStoreError extends Error {
|
|
1265
1265
|
code;
|
|
@@ -4,7 +4,7 @@ var fs$1 = require('node:fs');
|
|
|
4
4
|
var fs = require('node:fs/promises');
|
|
5
5
|
var os = require('node:os');
|
|
6
6
|
var path = require('node:path');
|
|
7
|
-
var index = require('./index-
|
|
7
|
+
var index = require('./index-BMhV2-vd.cjs');
|
|
8
8
|
require('node:module');
|
|
9
9
|
require('path');
|
|
10
10
|
require('os');
|
|
@@ -234,19 +234,19 @@ function requireArgument () {
|
|
|
234
234
|
|
|
235
235
|
var command = {};
|
|
236
236
|
|
|
237
|
-
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-
|
|
237
|
+
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-BMhV2-vd.cjs', document.baseURI).href)));
|
|
238
238
|
function __require$4() { return require$5("node:events"); }
|
|
239
239
|
|
|
240
|
-
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-
|
|
240
|
+
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-BMhV2-vd.cjs', document.baseURI).href)));
|
|
241
241
|
function __require$3() { return require$4("node:child_process"); }
|
|
242
242
|
|
|
243
|
-
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-
|
|
243
|
+
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-BMhV2-vd.cjs', document.baseURI).href)));
|
|
244
244
|
function __require$2() { return require$3("node:path"); }
|
|
245
245
|
|
|
246
|
-
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-
|
|
246
|
+
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-BMhV2-vd.cjs', document.baseURI).href)));
|
|
247
247
|
function __require$1() { return require$2("node:fs"); }
|
|
248
248
|
|
|
249
|
-
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-
|
|
249
|
+
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-BMhV2-vd.cjs', document.baseURI).href)));
|
|
250
250
|
function __require() { return require$1("node:process"); }
|
|
251
251
|
|
|
252
252
|
var help = {};
|
|
@@ -13347,7 +13347,7 @@ function getPathname(pathWithQuery) {
|
|
|
13347
13347
|
}
|
|
13348
13348
|
|
|
13349
13349
|
const CLI_VERSION_PLACEHOLDER = ['__HB', 'SDK', 'CLI', 'VERSION__'].join('_');
|
|
13350
|
-
const BUILT_CLI_VERSION = '0.6.
|
|
13350
|
+
const BUILT_CLI_VERSION = '0.6.8-alpha.0';
|
|
13351
13351
|
const PACKAGE_JSON_CANDIDATES = [
|
|
13352
13352
|
path.resolve(__dirname, '..', '..', 'package.json'),
|
|
13353
13353
|
path.resolve(__dirname, '..', 'package.json'),
|
|
@@ -13680,35 +13680,35 @@ function createCommandLoggerResolver(options) {
|
|
|
13680
13680
|
};
|
|
13681
13681
|
}
|
|
13682
13682
|
const defaultClearLoginStatus = async (...args) => {
|
|
13683
|
-
const { clearLoginStatus } = await Promise.resolve().then(function () { return require('./login-
|
|
13683
|
+
const { clearLoginStatus } = await Promise.resolve().then(function () { return require('./login-Cb5ShNVQ.cjs'); });
|
|
13684
13684
|
return clearLoginStatus(...args);
|
|
13685
13685
|
};
|
|
13686
13686
|
const defaultLoginToHeybox = async (...args) => {
|
|
13687
|
-
const { loginToHeybox } = await Promise.resolve().then(function () { return require('./login-
|
|
13687
|
+
const { loginToHeybox } = await Promise.resolve().then(function () { return require('./login-Cb5ShNVQ.cjs'); });
|
|
13688
13688
|
return loginToHeybox(...args);
|
|
13689
13689
|
};
|
|
13690
13690
|
const defaultPrintLoginStatus = async (...args) => {
|
|
13691
|
-
const { printLoginStatus } = await Promise.resolve().then(function () { return require('./login-
|
|
13691
|
+
const { printLoginStatus } = await Promise.resolve().then(function () { return require('./login-Cb5ShNVQ.cjs'); });
|
|
13692
13692
|
return printLoginStatus(...args);
|
|
13693
13693
|
};
|
|
13694
13694
|
const defaultRunBuildCommand = async (...args) => {
|
|
13695
|
-
const { runBuildCommand } = await Promise.resolve().then(function () { return require('./build-
|
|
13695
|
+
const { runBuildCommand } = await Promise.resolve().then(function () { return require('./build-BfhZ07Qv.cjs'); });
|
|
13696
13696
|
return runBuildCommand(...args);
|
|
13697
13697
|
};
|
|
13698
13698
|
const defaultRunCreateCommand = async (...args) => {
|
|
13699
|
-
const { runCreateCommand } = await Promise.resolve().then(function () { return require('./create-
|
|
13699
|
+
const { runCreateCommand } = await Promise.resolve().then(function () { return require('./create-us7swTbU.cjs'); });
|
|
13700
13700
|
return runCreateCommand(...args);
|
|
13701
13701
|
};
|
|
13702
13702
|
const defaultRunDevCommand = async (...args) => {
|
|
13703
|
-
const { runDevCommand } = await Promise.resolve().then(function () { return require('./dev-
|
|
13703
|
+
const { runDevCommand } = await Promise.resolve().then(function () { return require('./dev-Bf49EoR8.cjs'); });
|
|
13704
13704
|
return runDevCommand(...args);
|
|
13705
13705
|
};
|
|
13706
13706
|
const defaultRunDoctorCommand = async (...args) => {
|
|
13707
|
-
const { runDoctorCommand } = await Promise.resolve().then(function () { return require('./doctor-
|
|
13707
|
+
const { runDoctorCommand } = await Promise.resolve().then(function () { return require('./doctor-CzETlRvH.cjs'); });
|
|
13708
13708
|
return runDoctorCommand(...args);
|
|
13709
13709
|
};
|
|
13710
13710
|
const defaultRunRemoteCommand = async (...args) => {
|
|
13711
|
-
const { runRemoteCommand } = await Promise.resolve().then(function () { return require('./remote-
|
|
13711
|
+
const { runRemoteCommand } = await Promise.resolve().then(function () { return require('./remote-Co84uKvV.cjs'); });
|
|
13712
13712
|
return runRemoteCommand(...args);
|
|
13713
13713
|
};
|
|
13714
13714
|
function resolveStandaloneLogger(options, verbose) {
|
|
@@ -3,9 +3,9 @@
|
|
|
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 session = require('./session-
|
|
6
|
+
var session = require('./session-9A8AY7YK.cjs');
|
|
7
7
|
var browser = require('./browser-RAy8e8cV.cjs');
|
|
8
|
-
var index = require('./index-
|
|
8
|
+
var index = require('./index-BMhV2-vd.cjs');
|
|
9
9
|
require('node:path');
|
|
10
10
|
require('fs');
|
|
11
11
|
require('constants');
|
|
@@ -5,7 +5,7 @@ var fs$1 = require('node:fs/promises');
|
|
|
5
5
|
var node_module = require('node:module');
|
|
6
6
|
var path = require('node:path');
|
|
7
7
|
var node_url = require('node:url');
|
|
8
|
-
var index = require('./index-
|
|
8
|
+
var index = require('./index-BMhV2-vd.cjs');
|
|
9
9
|
|
|
10
10
|
function findProjectRoot(startDir) {
|
|
11
11
|
let current = path.resolve(startDir);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var promises = require('node:readline/promises');
|
|
4
|
-
var index = require('./index-
|
|
5
|
-
var session = require('./session-
|
|
4
|
+
var index = require('./index-BMhV2-vd.cjs');
|
|
5
|
+
var session = require('./session-9A8AY7YK.cjs');
|
|
6
6
|
var childProcess = require('node:child_process');
|
|
7
7
|
var fs = require('node:fs');
|
|
8
8
|
var fs$1 = require('node:fs/promises');
|
|
9
9
|
var path = require('node:path');
|
|
10
10
|
var index$1 = require('./index-v4-6fbXX.cjs');
|
|
11
11
|
var runtimeGate = require('./runtime-gate-DfMJQGH9.cjs');
|
|
12
|
-
var context = require('./context-
|
|
12
|
+
var context = require('./context-CqoGNt7d.cjs');
|
|
13
13
|
require('node:module');
|
|
14
14
|
require('path');
|
|
15
15
|
require('os');
|
|
@@ -191,7 +191,7 @@ async function createDefaultCosClient(uploadToken) {
|
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
193
|
async function loadCosConstructor() {
|
|
194
|
-
const cosModule = await Promise.resolve().then(function () { return require('./index-
|
|
194
|
+
const cosModule = await Promise.resolve().then(function () { return require('./index-Cd37cCQM.cjs'); }).then(function (n) { return n.index; });
|
|
195
195
|
return cosModule.default;
|
|
196
196
|
}
|
|
197
197
|
function formatSize(bytes) {
|
package/dist/cli.cjs
CHANGED
package/dist/index.cjs.js
CHANGED
package/dist/index.esm.js
CHANGED
package/dist/vite.cjs.js
CHANGED
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.6.
|
|
3
|
+
"version": "0.6.8-alpha.0",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"./src/index.ts",
|
|
6
6
|
"./src/core/singleton.ts",
|
|
@@ -42,6 +42,8 @@
|
|
|
42
42
|
"hb-sdk": "./bin/hb-sdk.cjs"
|
|
43
43
|
},
|
|
44
44
|
"files": [
|
|
45
|
+
"README.md",
|
|
46
|
+
"CHANGELOG.md",
|
|
45
47
|
"bin",
|
|
46
48
|
"dist",
|
|
47
49
|
"skill",
|
|
@@ -5,14 +5,12 @@
|
|
|
5
5
|
## Sources
|
|
6
6
|
|
|
7
7
|
- packages/hb-sdk/src/protocol.ts
|
|
8
|
-
- packages/hb-sdk/README.md
|
|
9
8
|
- apps/docs/hb-sdk/reference/index.md
|
|
10
9
|
|
|
11
10
|
## Contents
|
|
12
11
|
|
|
13
12
|
- [Host/runtime-only warning](#hostruntime-only-warning)
|
|
14
13
|
- [Public protocol entrypoint](#public-protocol-entrypoint)
|
|
15
|
-
- [Protocol context](#protocol-context)
|
|
16
14
|
- [Generated reference index](#generated-reference-index)
|
|
17
15
|
## Host/runtime-only warning
|
|
18
16
|
|
|
@@ -191,14 +189,6 @@ export type {
|
|
|
191
189
|
} from './modules/navigation';
|
|
192
190
|
```
|
|
193
191
|
|
|
194
|
-
## Protocol context
|
|
195
|
-
|
|
196
|
-
## SDK 与 Runtime
|
|
197
|
-
|
|
198
|
-
`@heybox/hb-sdk` 跑在 iframe 内部,由外部小程序业务页面使用。`@heybox/hb-sdk-runtime` 跑在 iframe 外部,由黑盒宿主壳层使用,负责启动 iframe、注入 nonce、维护 bridge server、注册能力 handler、转发宿主生命周期与登录态变化。
|
|
199
|
-
|
|
200
|
-
两者共享同一套 bridge 协议。协议字段、事件名或能力 payload 发生变化时,应按同一批次联动升级 SDK 与 runtime;不要只升级其中一侧后假定另一侧自动兼容。
|
|
201
|
-
|
|
202
192
|
## Generated reference index
|
|
203
193
|
|
|
204
194
|
|