@heybox/hb-sdk-protocol 0.9.1-alpha.4 → 0.9.1-alpha.6
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/README.md +13 -1
- package/dist/card-actions.cjs.js +9 -0
- package/dist/card-actions.esm.js +7 -0
- package/dist/index.cjs.js +6537 -0
- package/dist/index.esm.js +6518 -1
- package/generated/permission-catalog.json +32 -1
- package/package.json +17 -6
- package/types/index.d.ts +6352 -9
- package/types/workspace-card-actions.d.ts +7 -0
- package/src/bridge.ts +0 -196
- package/src/capabilities.ts +0 -682
- package/src/constants.ts +0 -36
- package/src/guards.ts +0 -835
- package/src/index.ts +0 -9
- package/src/local-dev-grant.ts +0 -145
- package/src/native-host-contract.generated.ts +0 -60
- package/src/native-host-contract.source.json +0 -479
- package/src/native-host.ts +0 -213
- package/src/payloads.ts +0 -1107
- package/src/permission-catalog.ts +0 -204
- package/src/permissions.ts +0 -216
- package/types/bridge.d.ts +0 -163
- package/types/capabilities.d.ts +0 -608
- package/types/constants.d.ts +0 -33
- package/types/guards.d.ts +0 -660
- package/types/local-dev-grant.d.ts +0 -67
- package/types/native-host-contract.generated.d.ts +0 -18
- package/types/native-host.d.ts +0 -147
- package/types/payloads.d.ts +0 -1017
- package/types/permission-catalog.d.ts +0 -126
- package/types/permissions.d.ts +0 -159
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"hash": "
|
|
2
|
+
"hash": "afb4d36de51cde7bb0932ac0f3d391440925845a68707c57a5a47487287698e1",
|
|
3
3
|
"permissions": [
|
|
4
4
|
{
|
|
5
5
|
"key": "userInfo",
|
|
@@ -169,6 +169,23 @@
|
|
|
169
169
|
"声明后仍需平台批准,并继续执行可信用户手势、Host 能力和当前版本 Manifest 校验。"
|
|
170
170
|
]
|
|
171
171
|
},
|
|
172
|
+
{
|
|
173
|
+
"key": "cloud_storage",
|
|
174
|
+
"name": "云端存储",
|
|
175
|
+
"description": "读写按小程序和当前登录用户隔离的云端键值数据。",
|
|
176
|
+
"access": "declaration",
|
|
177
|
+
"risk": "medium",
|
|
178
|
+
"config": {},
|
|
179
|
+
"methods": [
|
|
180
|
+
"cloud.storage.getItem",
|
|
181
|
+
"cloud.storage.setItem",
|
|
182
|
+
"cloud.storage.removeItem",
|
|
183
|
+
"cloud.storage.getKeys"
|
|
184
|
+
],
|
|
185
|
+
"conditions": [
|
|
186
|
+
"云端存储按登录用户隔离并受容量配额限制。"
|
|
187
|
+
]
|
|
188
|
+
},
|
|
172
189
|
{
|
|
173
190
|
"key": "appProtocol",
|
|
174
191
|
"name": "应用协议执行",
|
|
@@ -182,6 +199,20 @@
|
|
|
182
199
|
"conditions": [
|
|
183
200
|
"最高危险权限:批准后该入口可执行任意协议,并绕过其他 SDK 能力权限及专用授权流程。"
|
|
184
201
|
]
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"key": "workspaceCards",
|
|
205
|
+
"name": "工作区卡片",
|
|
206
|
+
"description": "在已绑定游戏的桌面工作区展示受审核卡片。",
|
|
207
|
+
"access": "platform-approval",
|
|
208
|
+
"risk": "high",
|
|
209
|
+
"config": {},
|
|
210
|
+
"methods": [
|
|
211
|
+
"workspaceCards.requestRefresh"
|
|
212
|
+
],
|
|
213
|
+
"conditions": [
|
|
214
|
+
"需平台批准、Host 支持与有效执行租约;不隐式授予网络或存储权限。"
|
|
215
|
+
]
|
|
185
216
|
}
|
|
186
217
|
],
|
|
187
218
|
"noDeclarationMethods": [
|
package/package.json
CHANGED
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heybox/hb-sdk-protocol",
|
|
3
|
-
"version": "0.9.1-alpha.
|
|
3
|
+
"version": "0.9.1-alpha.6",
|
|
4
4
|
"description": "Heybox mini-program iframe bridge wire contracts.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
|
-
"heybox": "./
|
|
8
|
+
"heybox": "./dist/index.esm.js",
|
|
9
9
|
"types": "./types/index.d.ts",
|
|
10
10
|
"import": "./dist/index.esm.js",
|
|
11
11
|
"require": "./dist/index.cjs.js",
|
|
12
12
|
"default": "./dist/index.esm.js"
|
|
13
|
+
},
|
|
14
|
+
"./card-actions": {
|
|
15
|
+
"heybox": "./dist/card-actions.esm.js",
|
|
16
|
+
"types": "./types/workspace-card-actions.d.ts",
|
|
17
|
+
"import": "./dist/card-actions.esm.js",
|
|
18
|
+
"require": "./dist/card-actions.cjs.js",
|
|
19
|
+
"default": "./dist/card-actions.esm.js"
|
|
13
20
|
}
|
|
14
21
|
},
|
|
15
22
|
"files": [
|
|
16
23
|
"dist",
|
|
17
24
|
"generated",
|
|
18
25
|
"types",
|
|
19
|
-
"src",
|
|
20
26
|
"README.md"
|
|
21
27
|
],
|
|
22
28
|
"license": "ISC",
|
|
@@ -28,6 +34,9 @@
|
|
|
28
34
|
"rollup": "^4.52.4",
|
|
29
35
|
"typescript": "^5.9.3",
|
|
30
36
|
"vitest": "^3.2.4",
|
|
37
|
+
"@ai-desktop/view-contract": "file:vendor/view-contract-2.2.2-6ac49bbf6410.tgz",
|
|
38
|
+
"rollup-plugin-dts": "6.4.0",
|
|
39
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
31
40
|
"@heybox/hb-types": "~1.0.2"
|
|
32
41
|
},
|
|
33
42
|
"publishConfig": {
|
|
@@ -38,7 +47,7 @@
|
|
|
38
47
|
"prebuild:package": "pnpm run check:native-host-contract",
|
|
39
48
|
"build:package": "pnpm run clean && pnpm run build:lib && pnpm run build:types",
|
|
40
49
|
"build:lib": "rollup -c rollup.config.ts --configPlugin 'typescript={\"tsconfig\":\"tsconfig.build.json\"}'",
|
|
41
|
-
"build:types": "tsc -p tsconfig.dts.json",
|
|
50
|
+
"build:types": "tsc -p tsconfig.dts.json && node scripts/bundle-declarations.mjs",
|
|
42
51
|
"test:types": "tsc -p tsconfig.dts.json --noEmit --pretty false",
|
|
43
52
|
"clean": "rimraf ./dist && rimraf ./types",
|
|
44
53
|
"check:boundary": "node scripts/check-boundary.cjs",
|
|
@@ -47,7 +56,9 @@
|
|
|
47
56
|
"gen:permission-catalog": "pnpm run build:lib && node scripts/generate-permission-catalog.mjs",
|
|
48
57
|
"check:permission-catalog": "pnpm run build:lib && node scripts/generate-permission-catalog.mjs --check",
|
|
49
58
|
"pretest:unit": "pnpm run check:native-host-contract && pnpm run build:types",
|
|
50
|
-
"test:unit": "NODE_OPTIONS='--conditions=heybox' vitest run",
|
|
51
|
-
"test:watch": "NODE_OPTIONS='--conditions=heybox' vitest"
|
|
59
|
+
"test:unit": "NODE_OPTIONS='--conditions=heybox' vitest run __tests__ && node --test scripts/check-bundled-contract.test.mjs",
|
|
60
|
+
"test:watch": "NODE_OPTIONS='--conditions=heybox' vitest __tests__",
|
|
61
|
+
"check:bundled-contract": "node scripts/check-bundled-contract.mjs",
|
|
62
|
+
"postbuild:package": "node scripts/check-bundled-contract.mjs"
|
|
52
63
|
}
|
|
53
64
|
}
|