@heybox/hb-sdk 0.2.0-alpha.0 → 0.2.0-alpha.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/README.md +142 -468
- package/bin/hb-sdk.cjs +1 -1
- package/dist/cli.cjs +660 -182
- package/dist/devtools/mock-host/index.html +13 -387
- package/dist/devtools/mock-host/main.js +975 -0
- package/dist/index.cjs.js +50 -63
- package/dist/index.esm.js +51 -50
- package/dist/protocol.cjs.js +72 -13
- package/dist/protocol.esm.js +72 -14
- package/dist/templates/vue3-vite-ts/README.md.ejs +1 -5
- package/dist/templates/vue3-vite-ts/package.json.ejs +0 -1
- package/package.json +3 -1
- package/skill/SKILL.md +95 -0
- package/skill/references/api-protocol.md +135 -0
- package/skill/references/api-root.md +346 -0
- package/skill/references/cli.md +360 -0
- package/skill/references/examples.md +107 -0
- package/skill/references/llms-index.md +44 -0
- package/skill/references/recipes.md +374 -0
- package/skill/references/safety-boundaries.md +28 -0
- package/skill/references/smoke-evaluation.md +24 -0
- package/skill/scripts/check-references.mjs +14 -0
- package/skill/scripts/package-skill.mjs +60 -0
- package/skill/scripts/package-skill.sh +6 -0
- package/skill/scripts/skill-metadata.mjs +74 -0
- package/skill/scripts/sync-references.mjs +541 -0
- package/skill/scripts/validate-skill.mjs +233 -0
- package/skill/skill.json +11 -0
- package/types/index.d.ts +8 -6
- package/types/modules/auth/index.d.ts +2 -9
- package/types/modules/network/index.d.ts +6 -11
- package/types/modules/share/index.d.ts +3 -9
- package/types/modules/share/screenshot.d.ts +1 -7
- package/types/modules/share/show-share-menu.d.ts +1 -7
- package/types/modules/storage/index.d.ts +2 -16
- package/types/modules/user/get-info.d.ts +1 -7
- package/types/modules/user/index.d.ts +2 -8
- package/types/modules/viewport/index.d.ts +2 -9
- package/types/protocol/capabilities.d.ts +180 -0
- package/types/protocol.d.ts +8 -13
package/types/protocol.d.ts
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
export { MINI_PROGRAM_BRIDGE_NONCE_PARAM, MINI_PROGRAM_MESSAGE_NAMESPACE, MINI_PROGRAM_MESSAGE_VERSION, SDK_HANDSHAKE_METHOD, } from './protocol/constants';
|
|
2
2
|
export { isMiniProgramBridgeMessage } from './protocol/guards';
|
|
3
3
|
export type { MiniProgramBridgeError, MiniProgramBridgeMessage, MiniProgramBridgeMessageType, MiniProgramEventHandler, MiniProgramEventName, MiniProgramEventPayloadMap, } from './protocol/types';
|
|
4
|
-
export { AUTH_LOGIN_METHOD } from './
|
|
5
|
-
export type {
|
|
6
|
-
export {
|
|
7
|
-
export type { GetUserInfoPayload, GetUserInfoResult, MiniProgramUserInfo, MiniProgramUserInfoResult,
|
|
8
|
-
export { SHARE_SCREENSHOT_METHOD } from './modules/share/screenshot';
|
|
4
|
+
export { AUTH_LOGIN_METHOD, MINI_PROGRAM_PROTOCOL_CAPABILITIES, NETWORK_REQUEST_METHOD, SHARE_SCREENSHOT_METHOD, SHARE_SHOW_SHARE_MENU_METHOD, STORAGE_GET_STORAGE_METHOD, STORAGE_SET_STORAGE_METHOD, USER_GET_INFO_METHOD, VIEWPORT_GET_WINDOW_INFO_METHOD, } from './protocol/capabilities';
|
|
5
|
+
export type { MiniProgramAuthMethod, MiniProgramBridgeMethod, MiniProgramCapabilityDefinition, MiniProgramCapabilityModule, MiniProgramCapabilityPayload, MiniProgramCapabilityPayloadMap, MiniProgramCapabilityResult, MiniProgramCapabilityResultMap, MiniProgramCapabilityRisk, MiniProgramNetworkMethod, MiniProgramShareMethod, MiniProgramStorageMethod, MiniProgramUserMethod, MiniProgramViewportMethod, } from './protocol/capabilities';
|
|
6
|
+
export type { LoginPayload, LoginResult } from './modules/auth';
|
|
7
|
+
export type { GetUserInfoPayload, GetUserInfoResult, MiniProgramUserInfo, MiniProgramUserInfoResult, } from './modules/user';
|
|
9
8
|
export type { ScreenshotPayload, ScreenshotResult } from './modules/share/screenshot';
|
|
10
|
-
export { SHARE_SHOW_SHARE_MENU_METHOD } from './modules/share/show-share-menu';
|
|
11
9
|
export type { ShowShareMenuPayload, ShowShareMenuResult } from './modules/share/show-share-menu';
|
|
12
|
-
export type { MiniProgramScreenshotOptions, MiniProgramScreenshotRect, MiniProgramShareChannel,
|
|
13
|
-
export {
|
|
14
|
-
export type {
|
|
15
|
-
export {
|
|
16
|
-
export type { GetWindowInfoPayload, GetWindowInfoResult, MiniProgramSafeArea, MiniProgramViewportMethod, MiniProgramWindowInfoResult, } from './modules/viewport';
|
|
17
|
-
export { NETWORK_REQUEST_METHOD } from './modules/network';
|
|
18
|
-
export type { MiniProgramNetworkHeaders, MiniProgramNetworkMethod, MiniProgramNetworkParams, MiniProgramNetworkRequestConfig, MiniProgramNetworkResponse, MiniProgramNetworkValidateStatus, NetworkRequestPayload, NetworkResponsePayload, } from './modules/network';
|
|
10
|
+
export type { MiniProgramScreenshotOptions, MiniProgramScreenshotRect, MiniProgramShareChannel, MiniProgramShowShareMenuOptions, } from './modules/share';
|
|
11
|
+
export type { GetStoragePayload, GetStorageResult, SetStoragePayload, } from './modules/storage';
|
|
12
|
+
export type { GetWindowInfoPayload, GetWindowInfoResult, MiniProgramSafeArea, MiniProgramWindowInfoResult, } from './modules/viewport';
|
|
13
|
+
export type { MiniProgramNetworkHeaders, MiniProgramNetworkParams, MiniProgramNetworkRequestConfig, MiniProgramNetworkRequestMethod, MiniProgramNetworkResponse, MiniProgramNetworkValidateStatus, NetworkRequestPayload, NetworkResponsePayload, } from './modules/network';
|