@baseworks/organization 0.2.0
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.
- package/dist/chunk-5UCSEIJS.js +64 -0
- package/dist/cli.d.ts +18 -0
- package/dist/cli.js +534 -0
- package/dist/index.d.ts +199 -0
- package/dist/index.js +335 -0
- package/dist/schema/pg/index.d.ts +562 -0
- package/dist/schema/pg/index.js +62 -0
- package/dist/schema/sqlite/index.d.ts +604 -0
- package/dist/schema/sqlite/index.js +12 -0
- package/package.json +37 -0
- package/src/__tests__/cli-env.test.ts +158 -0
- package/src/__tests__/cli-org.test.ts +154 -0
- package/src/__tests__/cli-proj.test.ts +157 -0
- package/src/__tests__/cli-ws.test.ts +156 -0
- package/src/__tests__/helpers.ts +29 -0
- package/src/cli.ts +682 -0
- package/src/index.ts +5 -0
- package/src/operations/bootstrap.ts +50 -0
- package/src/repo/environments.ts +82 -0
- package/src/repo/index.ts +9 -0
- package/src/repo/organizations.ts +96 -0
- package/src/repo/projects.ts +106 -0
- package/src/repo/workspaces.ts +87 -0
- package/src/schema/environments.ts +14 -0
- package/src/schema/index.ts +5 -0
- package/src/schema/organizations.ts +11 -0
- package/src/schema/pg/environments.ts +14 -0
- package/src/schema/pg/index.ts +4 -0
- package/src/schema/pg/organizations.ts +11 -0
- package/src/schema/pg/projects.ts +16 -0
- package/src/schema/pg/workspaces.ts +15 -0
- package/src/schema/projects.ts +16 -0
- package/src/schema/sqlite/environments.ts +14 -0
- package/src/schema/sqlite/index.ts +4 -0
- package/src/schema/sqlite/organizations.ts +11 -0
- package/src/schema/sqlite/projects.ts +16 -0
- package/src/schema/sqlite/workspaces.ts +15 -0
- package/src/schema/workspaces.ts +15 -0
- package/src/types.ts +88 -0
package/src/types.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// Plain interfaces — dialect-agnostic.
|
|
2
|
+
// Compatible with both SQLite and PostgreSQL schema inference.
|
|
3
|
+
|
|
4
|
+
export interface Organization {
|
|
5
|
+
id: string
|
|
6
|
+
shortId: string
|
|
7
|
+
slug: string
|
|
8
|
+
name: string
|
|
9
|
+
metadata: string | null
|
|
10
|
+
createdAt: number
|
|
11
|
+
updatedAt: number
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface NewOrganization {
|
|
15
|
+
id?: string
|
|
16
|
+
shortId?: string
|
|
17
|
+
slug?: string
|
|
18
|
+
name: string
|
|
19
|
+
metadata?: string | null
|
|
20
|
+
createdAt?: number
|
|
21
|
+
updatedAt?: number
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface Workspace {
|
|
25
|
+
id: string
|
|
26
|
+
organizationId: string
|
|
27
|
+
shortId: string
|
|
28
|
+
slug: string
|
|
29
|
+
name: string
|
|
30
|
+
isDefault: boolean
|
|
31
|
+
createdAt: number
|
|
32
|
+
updatedAt: number
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface NewWorkspace {
|
|
36
|
+
id?: string
|
|
37
|
+
organizationId: string
|
|
38
|
+
shortId?: string
|
|
39
|
+
slug?: string
|
|
40
|
+
name: string
|
|
41
|
+
isDefault?: boolean
|
|
42
|
+
createdAt?: number
|
|
43
|
+
updatedAt?: number
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface Project {
|
|
47
|
+
id: string
|
|
48
|
+
workspaceId: string
|
|
49
|
+
shortId: string
|
|
50
|
+
slug: string
|
|
51
|
+
name: string
|
|
52
|
+
isDefault: boolean
|
|
53
|
+
metadata: string | null
|
|
54
|
+
createdAt: number
|
|
55
|
+
updatedAt: number
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface NewProject {
|
|
59
|
+
id?: string
|
|
60
|
+
workspaceId: string
|
|
61
|
+
shortId?: string
|
|
62
|
+
slug?: string
|
|
63
|
+
name: string
|
|
64
|
+
isDefault?: boolean
|
|
65
|
+
metadata?: string | null
|
|
66
|
+
createdAt?: number
|
|
67
|
+
updatedAt?: number
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface Environment {
|
|
71
|
+
id: string
|
|
72
|
+
projectId: string
|
|
73
|
+
shortId: string
|
|
74
|
+
slug: string
|
|
75
|
+
name: string
|
|
76
|
+
createdAt: number
|
|
77
|
+
updatedAt: number
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface NewEnvironment {
|
|
81
|
+
id?: string
|
|
82
|
+
projectId: string
|
|
83
|
+
shortId?: string
|
|
84
|
+
slug?: string
|
|
85
|
+
name: string
|
|
86
|
+
createdAt?: number
|
|
87
|
+
updatedAt?: number
|
|
88
|
+
}
|