Skip to content

Commit fd6da04

Browse files
committed
Refactor auth-related files and clean up spec package
Moved authentication, identity, policy, protocol, and role zod schemas from 'system' to a new 'auth' directory. Added an 'auth/index.ts' barrel file. Updated imports in 'index.ts' and 'system/index.ts'. Removed QUERY_PROTOCOL_GUIDE.md and package-lock.json for cleanup.
1 parent b8e55ad commit fd6da04

File tree

11 files changed

+17
-3568
lines changed

11 files changed

+17
-3568
lines changed

packages/spec/QUERY_PROTOCOL_GUIDE.md

Lines changed: 0 additions & 750 deletions
This file was deleted.

packages/spec/package-lock.json

Lines changed: 0 additions & 2809 deletions
This file was deleted.

packages/spec/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
"types": "./dist/system/index.d.ts",
2222
"default": "./dist/system/index.js"
2323
},
24+
"./auth": {
25+
"types": "./dist/auth/index.d.ts",
26+
"default": "./dist/auth/index.js"
27+
},
2428
"./kernel": {
2529
"types": "./dist/kernel/index.d.ts",
2630
"default": "./dist/kernel/index.js"

packages/spec/src/auth/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export * from './config.zod';
2+
export * from './identity.zod';
3+
export * from './policy.zod';
4+
export * from './protocol';
5+
export * from './role.zod';

packages/spec/src/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,27 @@
1010
*
1111
* ### Style 1: Namespace Imports from Root
1212
* ```typescript
13-
* import { Data, UI, System, AI, API } from '@objectstack/spec';
13+
* import { Data, UI, System, Auth, AI, API } from '@objectstack/spec';
1414
*
1515
* const field: Data.Field = { name: 'task_name', type: 'text' };
16-
* const user: System.User = { id: 'u1', email: 'user@example.com' };
16+
* const user: Auth.User = { id: 'u1', email: 'user@example.com' };
1717
* ```
1818
*
1919
* ### Style 2: Namespace Imports via Subpath
2020
* ```typescript
2121
* import * as Data from '@objectstack/spec/data';
2222
* import * as UI from '@objectstack/spec/ui';
2323
* import * as System from '@objectstack/spec/system';
24+
* import * as Auth from '@objectstack/spec/auth';
2425
*
2526
* const field: Data.Field = { name: 'task_name', type: 'text' };
26-
* const user: System.User = { id: 'u1', email: 'user@example.com' };
27+
* const user: Auth.User = { id: 'u1', email: 'user@example.com' };
2728
* ```
2829
*
2930
* ### Style 3: Direct Subpath Imports
3031
* ```typescript
3132
* import { Field, FieldType } from '@objectstack/spec/data';
32-
* import { User, Session } from '@objectstack/spec/system';
33+
* import { User, Session } from '@objectstack/spec/auth';
3334
*
3435
* const field: Field = { name: 'task_name', type: 'text' };
3536
* const user: User = { id: 'u1', email: 'user@example.com' };
@@ -46,6 +47,7 @@ export * as Driver from './driver';
4647
export * as Permission from './permission';
4748
export * as UI from './ui';
4849
export * as System from './system';
50+
export * as Auth from './auth';
4951
export * as Kernel from './kernel';
5052
export * as Hub from './hub';
5153
export * as AI from './ai';

0 commit comments

Comments
 (0)