mirror of
https://github.com/saltbo/zpan.git
synced 2026-08-28 15:51:29 +08:00
a1510906fb
Enable org-aware architecture: auto-create personal org on signup, first user promoted to admin (race-safe atomic SQL), requireAdmin middleware, org context resolution in auth middleware. - Add organization, member, invitation tables to auth schema - Add admin plugin fields (role, banned, banReason, banExpires) to user - Add session fields (impersonatedBy, activeOrganizationId) - Rename storage_quotas → org_quotas, matters.uid → matters.org_id - Add findPersonalOrg service with SQL-level metadata filtering - Widen Database type to include both app and auth schemas - Include auth schema in Cloudflare platform adapter - Update shared types for org-aware API (OrgQuota, Organization, Member) - Add DB migration 0001_org_and_admin_plugins - Add tests for admin role, org creation, requireAdmin, findPersonalOrg - Fix pre-existing shared package typecheck (add typescript devDep) Agent-Profile: https://agent-kanban.dev/agents/a6bb038c4226a87f Co-authored-by: Bob <aibob@mails.agent-kanban.dev>
24 lines
472 B
JSON
24 lines
472 B
JSON
{
|
|
"name": "@zpan/shared",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"type": "module",
|
|
"exports": {
|
|
"./types": "./src/types/index.ts",
|
|
"./schemas": "./src/schemas/index.ts",
|
|
"./constants": "./src/constants.ts"
|
|
},
|
|
"scripts": {
|
|
"test": "vitest run",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"zod": "^3.24.0"
|
|
},
|
|
"devDependencies": {
|
|
"@vitest/coverage-v8": "^4.1.2",
|
|
"typescript": "^5.7.0",
|
|
"vitest": "^4.1.2"
|
|
}
|
|
}
|