@autional-cn/shared 0.1.0-rc.2 → 0.1.0-rc.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +10 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autional-cn/shared",
3
- "version": "0.1.0-rc.2",
3
+ "version": "0.1.0-rc.3",
4
4
  "description": "Autional shared layer — API client, auth, types, hooks, utils",
5
5
  "license": "AGPL-3.0",
6
6
  "main": "./src/index.ts",
package/src/index.ts CHANGED
@@ -161,13 +161,16 @@ export type { TenantIndexGuardProps } from './components/TenantIndexGuard';
161
161
  export { buildTenantUrls } from './auth/build-tenant-urls';
162
162
  export { resolvePortalBasename } from './config/resolve-basename';
163
163
 
164
- // 这里原来有 4 行 re-export:GeneratedApi / ApiGenerated / GeneratedTypes / ApiTypes,
165
- // 全部指向 @autional-cn/api-generated。2026-09 实测:**全舰队 0 处使用它们**
166
- // (唯一的出现就是这 4 行自己),而它们正是那份 file: 依赖的唯一消费者。
167
- // 删掉之后 shared 才能作为 npm 包发布——否则发布出去的清单里会留着一条
168
- // file:../../scripts/generate/api-generated-package,消费方永远解析不到。
169
- // 真正的生成代码走的是 @autional-cn/shared/generated/{api,types,queries}(src/generated/*),
170
- // 五个子路径里全舰队都在用的是那一组,不是这一组。
164
+ // 生成代码的命名空间再导出(GeneratedApi / ApiGenerated / GeneratedTypes / ApiTypes)。
165
+ // 说明:这 4 行原先指向 @autional-cn/api-generated —— 那是各站逐站副本里用
166
+ // file:../../scripts/generate/api-generated-package 提供的本地包,一旦 shared 走 npm 发布
167
+ // 就必然解析不到(authenticator / security 的 tsc 就是这么炸的:TS2305 has no exported member)。
168
+ // 本包内的 src/generated/* 是同一份生成结果,因此改指包内相对路径;
169
+ // 消费方实际用到的类型面由逐站 tsc 验证。
170
+ export * as GeneratedApi from './generated/api';
171
+ export * as GeneratedTypes from './generated/types';
172
+ export * as ApiGenerated from './generated/api';
173
+ export * as ApiTypes from './generated/types';
171
174
 
172
175
  // Branding(租户品牌 → CSS 变量 / favicon / customCss)
173
176
  export {