feat(request): 统一 api-core 请求门面并收敛各端装配点
- api-core 抽出 RequestStrategy / SignatureStrategy 双注册表,新增客户端工厂
(createRopClient / createWebHostClient / createRpcGatewayClient / createRestClient),
消费层只传环境参数,装配点不再出现 new Request / strategies.* / register
- 四个小程序 ROP 壳、web 主壳 (platform-core/http.ts)、points 适配层统一走工厂装配;
老系统 RPC 网关收进 rpcGateway 策略,rpcCall 收敛为一行 request.post(method, params, { gateway })
- usedcar 配套修复会话闸门 (openSessionGate / waitSessionId) 与登录态 / 请求失败兜底,
消除启动瞬间 sessionId 未落地导致的「缺少 sessionId 参数」红字
- 新增 mp 小程序「构建 npm」一键链路:根 pnpm build:npm (= pnpm mp),
单 lane 用 pnpm build:npm --lane <name> 或进目录 pnpm build:npm;
.gitignore 忽略 api-core 的 miniprogram_dist
- 附带:.env.example 内网调试 IP 更新、usedcar libVersion 3.13.1→3.14.3
Showing
61 changed files
with
1350 additions
and
605 deletions
apps/mp/points/mp-npm.mjs
0 → 100644
apps/mp/sales/mp-npm.mjs
0 → 100644
apps/mp/store/mp-npm.mjs
0 → 100644
apps/mp/usedcar/mp-npm.mjs
0 → 100644
This diff is collapsed.
Click to expand it.
packages/api-core/src/Request.ts
0 → 100644
packages/api-core/src/clients.ts
0 → 100644
packages/api-core/src/errors.ts
0 → 100644
packages/api-core/src/facade.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/api-core/src/rop.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/api-core/src/strategies.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/api-core/test/clients.test.mjs
0 → 100644
packages/api-core/test/request.test.mjs
0 → 100644
This diff is collapsed.
Click to expand it.
packages/api-core/test/rop.test.mjs
0 → 100644
This diff is collapsed.
Click to expand it.
packages/api-core/test/strategy.test.mjs
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
scripts/mp-npm-core.mjs
0 → 100644
This diff is collapsed.
Click to expand it.
scripts/mp-npm.mjs
0 → 100644
-
Please register or sign in to post a comment