Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@
"miniapps:dev:biobridge": "pnpm --filter @biochain/miniapp-biobridge dev"
},
"dependencies": {
"@biochain/android-focus-blur-guard": "workspace:*",
"@base-ui/react": "^1.0.0",
"@bfchain/util": "^5.0.0",
"@bfmeta/sign-util": "^1.3.10",
"@biochain/android-focus-blur-guard": "workspace:*",
"@biochain/bio-sdk": "workspace:*",
"@biochain/chain-effect": "workspace:*",
"@biochain/ecosystem-native": "workspace:*",
Expand Down Expand Up @@ -149,12 +149,12 @@
"@inquirer/prompts": "^8.0.2",
"@plaoc/cli": "^1.2.2",
"@playwright/test": "^1.57.0",
"@stackflow/config": "^1.0.1-canary.0",
"@storybook/addon-docs": "^10.1.4",
"@storybook/addon-vitest": "^10.1.4",
"@storybook/react": "^10.1.4",
"@storybook/react-vite": "^10.1.4",
"@storybook/test": "^8.6.14",
"@stackflow/config": "^1.0.1-canary.0",
"@tailwindcss/vite": "^4.0.0",
"@tanstack/ai": "^0.0.3",
"@testing-library/jest-dom": "^6.9.1",
Expand All @@ -171,11 +171,13 @@
"@types/semver": "^7.7.1",
"@types/ssh2-sftp-client": "^9.0.6",
"@typescript-eslint/parser": "^8.53.0",
"@vitejs/plugin-legacy": "^7.2.1",
"@vitejs/plugin-react": "^5.1.1",
"@vitest/browser": "^4.0.15",
"@vitest/browser-playwright": "^4.0.15",
"@vitest/coverage-istanbul": "^4.0.15",
"@vitest/coverage-v8": "^4.0.15",
"core-js": "^3.48.0",
"detect-port": "^2.1.0",
"dotenv": "^17.2.3",
"eslint-plugin-file-component-constraints": "workspace:*",
Expand All @@ -198,6 +200,7 @@
"ssh2-sftp-client": "^12.0.1",
"storybook": "^10.1.4",
"tailwindcss": "^4.0.0",
"terser": "^5.46.0",
"turbo": "^2.7.1",
"typescript": "~5.9.3",
"vite": "^7.2.7",
Expand Down
4 changes: 3 additions & 1 deletion packages/android-focus-blur-guard/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@biochain/android-focus-blur-guard",
"private": false,
"version": "0.1.0",
"description": "Android focus/blur loop guard for WebView and iframe contexts",
"type": "module",
Expand All @@ -9,7 +10,8 @@
"exports": {
".": {
"import": "./src/index.ts",
"types": "./src/index.ts"
"types": "./src/index.ts",
"default": "./src/index.ts"
}
},
"files": [
Expand Down
5 changes: 5 additions & 0 deletions packages/bio-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
{
"name": "@biochain/bio-sdk",
"private": false,
"version": "0.2.0",
"description": "Bio Ecosystem SDK for MiniApps - window.bio provider",
"type": "module",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
"exports": {
".": {
"import": "./src/index.ts",
"types": "./src/index.ts",
"default": "./src/index.ts"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/chain-effect/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@biochain/chain-effect",
"private": true,
"version": "0.1.0",
"description": "Effect TS based reactive chain data fetching",
"type": "module",
Expand Down
27 changes: 27 additions & 0 deletions packages/chain-effect/src/http.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { afterEach, describe, expect, it, vi } from 'vitest'
import { Effect } from 'effect'
import { httpFetch } from './http'

describe('httpFetch', () => {
afterEach(() => {
vi.restoreAllMocks()
})

it('serializes bigint body values before POST', async () => {
const fetchSpy = vi
.spyOn(globalThis, 'fetch')
.mockResolvedValue(new Response(JSON.stringify({ ok: true }), { status: 200 }))

await Effect.runPromise(
httpFetch({
url: 'https://example.test/api',
method: 'POST',
body: { amount: 1000000000n },
}),
)

expect(fetchSpy).toHaveBeenCalledTimes(1)
const requestInit = fetchSpy.mock.calls[0]?.[1]
expect(requestInit?.body).toBe('{"amount":"1000000000"}')
})
})
2 changes: 1 addition & 1 deletion packages/chain-effect/src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export function httpFetch<T>(options: FetchOptions<T>): Effect.Effect<T, FetchEr
};

if (method === 'POST' && body !== undefined) {
requestInit.body = JSON.stringify(body);
requestInit.body = stableStringify(body);
}

const response = await fetch(finalUrl, requestInit);
Expand Down
4 changes: 1 addition & 3 deletions packages/create-miniapp/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@biochain/create-miniapp",
"private": true,
"version": "0.1.0",
"description": "CLI 工具用于快速创建 Bio 生态 miniapp 项目",
"type": "module",
Expand Down Expand Up @@ -37,8 +38,5 @@
"oxlint": "^1.32.0",
"tsup": "^8.5.0",
"typescript": "^5.9.3"
},
"publishConfig": {
"access": "public"
}
}
3 changes: 2 additions & 1 deletion packages/dweb-compat/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@biochain/dweb-compat",
"private": true,
"version": "0.1.0",
"description": "dweb-plaoc 到 KeyApp bio provider 的兼容适配器",
"type": "module",
Expand Down Expand Up @@ -31,4 +32,4 @@
"typescript": "^5.9.3",
"vitest": "^4.0.0"
}
}
}
1 change: 1 addition & 0 deletions packages/e2e-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@biochain/e2e-tools",
"private": true,
"version": "0.1.0",
"description": "E2E 测试工具 - 截图审计、残留检测",
"type": "module",
Expand Down
1 change: 1 addition & 0 deletions packages/ecosystem-native/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@biochain/ecosystem-native",
"private": true,
"version": "0.1.0",
"description": "Native DOM components for Ecosystem desktop with Safari optimization",
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "eslint-plugin-file-component-constraints",
"private": true,
"version": "0.1.0",
"description": "ESLint plugin to enforce component usage constraints based on file patterns",
"main": "dist/index.js",
Expand Down
3 changes: 2 additions & 1 deletion packages/flow/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@biochain/flow",
"private": true,
"version": "0.1.0",
"description": "MCP Server & Workflow Framework for KeyApp",
"type": "module",
Expand Down Expand Up @@ -40,4 +41,4 @@
"framework"
],
"license": "MIT"
}
}
1 change: 1 addition & 0 deletions packages/i18n-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@biochain/i18n-tools",
"private": true,
"version": "0.1.0",
"description": "i18n 工具集 - 检查、验证、同步翻译",
"type": "module",
Expand Down
1 change: 1 addition & 0 deletions packages/key-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@biochain/key-ui",
"private": true,
"version": "0.1.0",
"description": "Shared UI components for KeyApp and MiniApps",
"type": "module",
Expand Down
1 change: 1 addition & 0 deletions packages/key-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@biochain/key-utils",
"private": true,
"version": "0.1.0",
"description": "Utility functions for KeyApp UI components",
"type": "module",
Expand Down
1 change: 1 addition & 0 deletions packages/keyapp-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@biochain/keyapp-sdk",
"private": true,
"version": "0.1.0",
"description": "KeyApp 小程序 SDK - 应用上下文 API",
"type": "module",
Expand Down
1 change: 1 addition & 0 deletions packages/theme-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@biochain/theme-tools",
"private": true,
"version": "0.1.0",
"description": "主题检查工具 - 验证暗色模式最佳实践",
"type": "module",
Expand Down
Loading