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

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 +11 -12
  2. package/src/index.ts +8 -5
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@autional-cn/shared",
3
- "version": "0.1.0-rc.1",
3
+ "version": "0.1.0-rc.2",
4
4
  "description": "Autional shared layer — API client, auth, types, hooks, utils",
5
+ "license": "AGPL-3.0",
5
6
  "main": "./src/index.ts",
6
7
  "module": "./src/index.ts",
7
8
  "types": "./src/index.ts",
@@ -14,33 +15,31 @@
14
15
  "./generated/queries": "./src/generated/queries.ts",
15
16
  "./package.json": "./package.json"
16
17
  },
18
+ "files": [
19
+ "src"
20
+ ],
17
21
  "sideEffects": false,
18
22
  "dependencies": {
19
23
  "@opentelemetry/api": "1.9.1",
20
24
  "@tanstack/react-query": "5.100.9",
25
+ "@types/lodash-es": "4.17.12",
26
+ "@types/node": "26.1.2",
27
+ "@types/react": "19.2.14",
28
+ "@types/react-dom": "19.2.3",
21
29
  "axios": "1.16.0",
22
30
  "lodash-es": "4.18.1",
23
31
  "zustand": "5.0.13"
24
32
  },
25
33
  "devDependencies": {
26
- "@autional-cn/tsconfig": "0.1.0-rc",
27
- "@types/lodash-es": "4.17.12",
28
- "@types/node": "26.1.2",
29
- "@types/react": "19.2.14",
30
- "@types/react-dom": "19.2.3",
31
34
  "react": "19.2.5",
32
35
  "react-dom": "19.2.5",
33
- "tsup": "8.5.1",
34
- "typescript": "5.8.3"
36
+ "typescript": "5.8.3",
37
+ "vitest": "3.2.0"
35
38
  },
36
39
  "peerDependencies": {
37
40
  "react": ">=18.0.0",
38
41
  "react-dom": ">=18.0.0"
39
42
  },
40
- "license": "AGPL-3.0",
41
- "files": [
42
- "src"
43
- ],
44
43
  "scripts": {
45
44
  "typecheck": "tsc --noEmit",
46
45
  "test": "vitest run"
package/src/index.ts CHANGED
@@ -128,6 +128,7 @@ export * from './seo';
128
128
 
129
129
  // Components
130
130
  export { RequireAuth } from './components/RequireAuth';
131
+ export { TenantRootRedirect } from './components/TenantRootRedirect';
131
132
  export { OAuthCallbackPage } from './components/OAuthCallbackPage';
132
133
  export { TenantSlugProvider, useTenantSlug } from './auth/tenant-slug-context';
133
134
  export { useTenantSlugFromUrl, extractSlugFromPath, registerNonTenantSegments, clearNonTenantSegments } from './auth/slug-from-url';
@@ -157,14 +158,16 @@ export {
157
158
  export { AuditStatsOnly } from './components/AuditStatsOnly';
158
159
  export { TenantIndexGuard, usePublicTenantSlugs } from './components/TenantIndexGuard';
159
160
  export type { TenantIndexGuardProps } from './components/TenantIndexGuard';
160
- export { TenantRootRedirect } from './components/TenantRootRedirect';
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。全舰队对这 4 个名字的使用 = 0 处,
166
- // 而它们正是那份 file: 依赖的唯一消费者 —— 删掉之后 shared 才能作为 npm 包发布。
167
- // 真正在用的生成代码是 @autional-cn/shared/generated/{api,types,queries}(包内 src/generated/*)。
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
+ // 五个子路径里全舰队都在用的是那一组,不是这一组。
168
171
 
169
172
  // Branding(租户品牌 → CSS 变量 / favicon / customCss)
170
173
  export {