@ebowwa/codespaces-types 1.1.0 → 1.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/compile → compile}/index.js +41 -15
- package/compile/index.ts +553 -0
- package/compile/resources.js +116 -0
- package/compile/resources.ts +157 -0
- package/compile/schemas/resources.js +127 -0
- package/compile/schemas/resources.ts +144 -0
- package/{dist/compile → compile}/terminal-websocket.js +4 -1
- package/compile/terminal-websocket.ts +133 -0
- package/compile/time.js +30 -0
- package/compile/time.ts +32 -0
- package/{dist/compile → compile}/user/distributions.js +0 -1
- package/{dist/compile/user/distributions.d.ts → compile/user/distributions.ts} +0 -1
- package/{dist/compile → compile}/validation.js +23 -17
- package/compile/validation.ts +98 -0
- package/index.js +21 -0
- package/index.ts +5 -0
- package/package.json +38 -45
- package/runtime/ai.js +505 -0
- package/runtime/ai.ts +501 -0
- package/runtime/api.js +677 -0
- package/runtime/api.ts +857 -0
- package/runtime/database.js +94 -0
- package/runtime/database.ts +107 -0
- package/runtime/env.js +63 -0
- package/runtime/env.ts +68 -0
- package/{dist/runtime → runtime}/glm.js +7 -4
- package/runtime/glm.ts +36 -0
- package/runtime/index.js +28 -0
- package/{dist/runtime/index.js → runtime/index.ts} +1 -0
- package/runtime/ssh.js +47 -0
- package/runtime/ssh.ts +58 -0
- package/README.md +0 -65
- package/dist/compile/index.d.ts +0 -437
- package/dist/compile/index.d.ts.map +0 -1
- package/dist/compile/resources.d.ts +0 -69
- package/dist/compile/resources.d.ts.map +0 -1
- package/dist/compile/resources.js +0 -113
- package/dist/compile/schemas/resources.d.ts +0 -166
- package/dist/compile/schemas/resources.d.ts.map +0 -1
- package/dist/compile/schemas/resources.js +0 -123
- package/dist/compile/terminal-websocket.d.ts +0 -109
- package/dist/compile/terminal-websocket.d.ts.map +0 -1
- package/dist/compile/time.d.ts +0 -7
- package/dist/compile/time.d.ts.map +0 -1
- package/dist/compile/time.js +0 -27
- package/dist/compile/user/distributions.d.ts.map +0 -1
- package/dist/compile/validation.d.ts +0 -44
- package/dist/compile/validation.d.ts.map +0 -1
- package/dist/runtime/ai.d.ts +0 -1336
- package/dist/runtime/ai.d.ts.map +0 -1
- package/dist/runtime/ai.js +0 -416
- package/dist/runtime/api.d.ts +0 -1304
- package/dist/runtime/api.d.ts.map +0 -1
- package/dist/runtime/api.js +0 -673
- package/dist/runtime/database.d.ts +0 -376
- package/dist/runtime/database.d.ts.map +0 -1
- package/dist/runtime/database.js +0 -91
- package/dist/runtime/env.d.ts +0 -121
- package/dist/runtime/env.d.ts.map +0 -1
- package/dist/runtime/env.js +0 -54
- package/dist/runtime/glm.d.ts +0 -17
- package/dist/runtime/glm.d.ts.map +0 -1
- package/dist/runtime/index.d.ts +0 -13
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/ssh.d.ts +0 -111
- package/dist/runtime/ssh.d.ts.map +0 -1
- package/dist/runtime/ssh.js +0 -44
|
@@ -1,376 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schemas for database operations validation
|
|
3
|
-
*/
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
/**
|
|
6
|
-
* Active port schema
|
|
7
|
-
*/
|
|
8
|
-
export declare const ActivePortSchema: z.ZodObject<{
|
|
9
|
-
port: z.ZodNumber;
|
|
10
|
-
protocol: z.ZodEnum<["tcp", "udp"]>;
|
|
11
|
-
service: z.ZodOptional<z.ZodString>;
|
|
12
|
-
state: z.ZodEnum<["open", "closed", "filtered"]>;
|
|
13
|
-
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
port: number;
|
|
15
|
-
protocol: "tcp" | "udp";
|
|
16
|
-
state: "open" | "closed" | "filtered";
|
|
17
|
-
service?: string | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
port: number;
|
|
20
|
-
protocol: "tcp" | "udp";
|
|
21
|
-
state: "open" | "closed" | "filtered";
|
|
22
|
-
service?: string | undefined;
|
|
23
|
-
}>;
|
|
24
|
-
/**
|
|
25
|
-
* Environment metadata schema for database operations
|
|
26
|
-
*/
|
|
27
|
-
export declare const EnvironmentMetadataSchema: z.ZodObject<{
|
|
28
|
-
id: z.ZodString;
|
|
29
|
-
description: z.ZodOptional<z.ZodString>;
|
|
30
|
-
project: z.ZodOptional<z.ZodString>;
|
|
31
|
-
owner: z.ZodOptional<z.ZodString>;
|
|
32
|
-
purpose: z.ZodOptional<z.ZodString>;
|
|
33
|
-
environmentType: z.ZodOptional<z.ZodEnum<["development", "staging", "production", "testing"]>>;
|
|
34
|
-
hoursActive: z.ZodOptional<z.ZodNumber>;
|
|
35
|
-
lastActive: z.ZodOptional<z.ZodString>;
|
|
36
|
-
activePorts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
37
|
-
port: z.ZodNumber;
|
|
38
|
-
protocol: z.ZodEnum<["tcp", "udp"]>;
|
|
39
|
-
service: z.ZodOptional<z.ZodString>;
|
|
40
|
-
state: z.ZodEnum<["open", "closed", "filtered"]>;
|
|
41
|
-
}, "strip", z.ZodTypeAny, {
|
|
42
|
-
port: number;
|
|
43
|
-
protocol: "tcp" | "udp";
|
|
44
|
-
state: "open" | "closed" | "filtered";
|
|
45
|
-
service?: string | undefined;
|
|
46
|
-
}, {
|
|
47
|
-
port: number;
|
|
48
|
-
protocol: "tcp" | "udp";
|
|
49
|
-
state: "open" | "closed" | "filtered";
|
|
50
|
-
service?: string | undefined;
|
|
51
|
-
}>, "many">>;
|
|
52
|
-
sshKeyPath: z.ZodOptional<z.ZodString>;
|
|
53
|
-
bootstrapStatus: z.ZodOptional<z.ZodEnum<["bootstrapping", "ready", "failed"]>>;
|
|
54
|
-
permissions: z.ZodOptional<z.ZodObject<{
|
|
55
|
-
seedConfig: z.ZodOptional<z.ZodObject<{
|
|
56
|
-
sourceEnvironmentId: z.ZodOptional<z.ZodString>;
|
|
57
|
-
dependencySnapshot: z.ZodOptional<z.ZodString>;
|
|
58
|
-
setupScript: z.ZodOptional<z.ZodString>;
|
|
59
|
-
}, "strip", z.ZodTypeAny, {
|
|
60
|
-
sourceEnvironmentId?: string | undefined;
|
|
61
|
-
dependencySnapshot?: string | undefined;
|
|
62
|
-
setupScript?: string | undefined;
|
|
63
|
-
}, {
|
|
64
|
-
sourceEnvironmentId?: string | undefined;
|
|
65
|
-
dependencySnapshot?: string | undefined;
|
|
66
|
-
setupScript?: string | undefined;
|
|
67
|
-
}>>;
|
|
68
|
-
logins: z.ZodOptional<z.ZodObject<{
|
|
69
|
-
github: z.ZodOptional<z.ZodObject<{
|
|
70
|
-
enabled: z.ZodBoolean;
|
|
71
|
-
username: z.ZodOptional<z.ZodString>;
|
|
72
|
-
tokenScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
73
|
-
}, "strip", z.ZodTypeAny, {
|
|
74
|
-
enabled: boolean;
|
|
75
|
-
username?: string | undefined;
|
|
76
|
-
tokenScopes?: string[] | undefined;
|
|
77
|
-
}, {
|
|
78
|
-
enabled: boolean;
|
|
79
|
-
username?: string | undefined;
|
|
80
|
-
tokenScopes?: string[] | undefined;
|
|
81
|
-
}>>;
|
|
82
|
-
doppler: z.ZodOptional<z.ZodObject<{
|
|
83
|
-
enabled: z.ZodBoolean;
|
|
84
|
-
project: z.ZodOptional<z.ZodString>;
|
|
85
|
-
config: z.ZodOptional<z.ZodString>;
|
|
86
|
-
}, "strip", z.ZodTypeAny, {
|
|
87
|
-
enabled: boolean;
|
|
88
|
-
project?: string | undefined;
|
|
89
|
-
config?: string | undefined;
|
|
90
|
-
}, {
|
|
91
|
-
enabled: boolean;
|
|
92
|
-
project?: string | undefined;
|
|
93
|
-
config?: string | undefined;
|
|
94
|
-
}>>;
|
|
95
|
-
tailscale: z.ZodOptional<z.ZodObject<{
|
|
96
|
-
enabled: z.ZodBoolean;
|
|
97
|
-
authKey: z.ZodOptional<z.ZodString>;
|
|
98
|
-
hostname: z.ZodOptional<z.ZodString>;
|
|
99
|
-
}, "strip", z.ZodTypeAny, {
|
|
100
|
-
enabled: boolean;
|
|
101
|
-
authKey?: string | undefined;
|
|
102
|
-
hostname?: string | undefined;
|
|
103
|
-
}, {
|
|
104
|
-
enabled: boolean;
|
|
105
|
-
authKey?: string | undefined;
|
|
106
|
-
hostname?: string | undefined;
|
|
107
|
-
}>>;
|
|
108
|
-
}, "strip", z.ZodTypeAny, {
|
|
109
|
-
github?: {
|
|
110
|
-
enabled: boolean;
|
|
111
|
-
username?: string | undefined;
|
|
112
|
-
tokenScopes?: string[] | undefined;
|
|
113
|
-
} | undefined;
|
|
114
|
-
doppler?: {
|
|
115
|
-
enabled: boolean;
|
|
116
|
-
project?: string | undefined;
|
|
117
|
-
config?: string | undefined;
|
|
118
|
-
} | undefined;
|
|
119
|
-
tailscale?: {
|
|
120
|
-
enabled: boolean;
|
|
121
|
-
authKey?: string | undefined;
|
|
122
|
-
hostname?: string | undefined;
|
|
123
|
-
} | undefined;
|
|
124
|
-
}, {
|
|
125
|
-
github?: {
|
|
126
|
-
enabled: boolean;
|
|
127
|
-
username?: string | undefined;
|
|
128
|
-
tokenScopes?: string[] | undefined;
|
|
129
|
-
} | undefined;
|
|
130
|
-
doppler?: {
|
|
131
|
-
enabled: boolean;
|
|
132
|
-
project?: string | undefined;
|
|
133
|
-
config?: string | undefined;
|
|
134
|
-
} | undefined;
|
|
135
|
-
tailscale?: {
|
|
136
|
-
enabled: boolean;
|
|
137
|
-
authKey?: string | undefined;
|
|
138
|
-
hostname?: string | undefined;
|
|
139
|
-
} | undefined;
|
|
140
|
-
}>>;
|
|
141
|
-
vpns: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
142
|
-
name: z.ZodString;
|
|
143
|
-
type: z.ZodEnum<["wireguard", "openvpn", "tailscale"]>;
|
|
144
|
-
config: z.ZodString;
|
|
145
|
-
connected: z.ZodBoolean;
|
|
146
|
-
}, "strip", z.ZodTypeAny, {
|
|
147
|
-
type: "tailscale" | "wireguard" | "openvpn";
|
|
148
|
-
name: string;
|
|
149
|
-
config: string;
|
|
150
|
-
connected: boolean;
|
|
151
|
-
}, {
|
|
152
|
-
type: "tailscale" | "wireguard" | "openvpn";
|
|
153
|
-
name: string;
|
|
154
|
-
config: string;
|
|
155
|
-
connected: boolean;
|
|
156
|
-
}>, "many">>;
|
|
157
|
-
plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
158
|
-
}, "strip", z.ZodTypeAny, {
|
|
159
|
-
plugins?: Record<string, any> | undefined;
|
|
160
|
-
seedConfig?: {
|
|
161
|
-
sourceEnvironmentId?: string | undefined;
|
|
162
|
-
dependencySnapshot?: string | undefined;
|
|
163
|
-
setupScript?: string | undefined;
|
|
164
|
-
} | undefined;
|
|
165
|
-
logins?: {
|
|
166
|
-
github?: {
|
|
167
|
-
enabled: boolean;
|
|
168
|
-
username?: string | undefined;
|
|
169
|
-
tokenScopes?: string[] | undefined;
|
|
170
|
-
} | undefined;
|
|
171
|
-
doppler?: {
|
|
172
|
-
enabled: boolean;
|
|
173
|
-
project?: string | undefined;
|
|
174
|
-
config?: string | undefined;
|
|
175
|
-
} | undefined;
|
|
176
|
-
tailscale?: {
|
|
177
|
-
enabled: boolean;
|
|
178
|
-
authKey?: string | undefined;
|
|
179
|
-
hostname?: string | undefined;
|
|
180
|
-
} | undefined;
|
|
181
|
-
} | undefined;
|
|
182
|
-
vpns?: {
|
|
183
|
-
type: "tailscale" | "wireguard" | "openvpn";
|
|
184
|
-
name: string;
|
|
185
|
-
config: string;
|
|
186
|
-
connected: boolean;
|
|
187
|
-
}[] | undefined;
|
|
188
|
-
}, {
|
|
189
|
-
plugins?: Record<string, any> | undefined;
|
|
190
|
-
seedConfig?: {
|
|
191
|
-
sourceEnvironmentId?: string | undefined;
|
|
192
|
-
dependencySnapshot?: string | undefined;
|
|
193
|
-
setupScript?: string | undefined;
|
|
194
|
-
} | undefined;
|
|
195
|
-
logins?: {
|
|
196
|
-
github?: {
|
|
197
|
-
enabled: boolean;
|
|
198
|
-
username?: string | undefined;
|
|
199
|
-
tokenScopes?: string[] | undefined;
|
|
200
|
-
} | undefined;
|
|
201
|
-
doppler?: {
|
|
202
|
-
enabled: boolean;
|
|
203
|
-
project?: string | undefined;
|
|
204
|
-
config?: string | undefined;
|
|
205
|
-
} | undefined;
|
|
206
|
-
tailscale?: {
|
|
207
|
-
enabled: boolean;
|
|
208
|
-
authKey?: string | undefined;
|
|
209
|
-
hostname?: string | undefined;
|
|
210
|
-
} | undefined;
|
|
211
|
-
} | undefined;
|
|
212
|
-
vpns?: {
|
|
213
|
-
type: "tailscale" | "wireguard" | "openvpn";
|
|
214
|
-
name: string;
|
|
215
|
-
config: string;
|
|
216
|
-
connected: boolean;
|
|
217
|
-
}[] | undefined;
|
|
218
|
-
}>>;
|
|
219
|
-
updatedAt: z.ZodOptional<z.ZodString>;
|
|
220
|
-
}, "strip", z.ZodTypeAny, {
|
|
221
|
-
id: string;
|
|
222
|
-
description?: string | undefined;
|
|
223
|
-
project?: string | undefined;
|
|
224
|
-
owner?: string | undefined;
|
|
225
|
-
purpose?: string | undefined;
|
|
226
|
-
environmentType?: "development" | "staging" | "production" | "testing" | undefined;
|
|
227
|
-
hoursActive?: number | undefined;
|
|
228
|
-
lastActive?: string | undefined;
|
|
229
|
-
activePorts?: {
|
|
230
|
-
port: number;
|
|
231
|
-
protocol: "tcp" | "udp";
|
|
232
|
-
state: "open" | "closed" | "filtered";
|
|
233
|
-
service?: string | undefined;
|
|
234
|
-
}[] | undefined;
|
|
235
|
-
sshKeyPath?: string | undefined;
|
|
236
|
-
bootstrapStatus?: "bootstrapping" | "ready" | "failed" | undefined;
|
|
237
|
-
permissions?: {
|
|
238
|
-
plugins?: Record<string, any> | undefined;
|
|
239
|
-
seedConfig?: {
|
|
240
|
-
sourceEnvironmentId?: string | undefined;
|
|
241
|
-
dependencySnapshot?: string | undefined;
|
|
242
|
-
setupScript?: string | undefined;
|
|
243
|
-
} | undefined;
|
|
244
|
-
logins?: {
|
|
245
|
-
github?: {
|
|
246
|
-
enabled: boolean;
|
|
247
|
-
username?: string | undefined;
|
|
248
|
-
tokenScopes?: string[] | undefined;
|
|
249
|
-
} | undefined;
|
|
250
|
-
doppler?: {
|
|
251
|
-
enabled: boolean;
|
|
252
|
-
project?: string | undefined;
|
|
253
|
-
config?: string | undefined;
|
|
254
|
-
} | undefined;
|
|
255
|
-
tailscale?: {
|
|
256
|
-
enabled: boolean;
|
|
257
|
-
authKey?: string | undefined;
|
|
258
|
-
hostname?: string | undefined;
|
|
259
|
-
} | undefined;
|
|
260
|
-
} | undefined;
|
|
261
|
-
vpns?: {
|
|
262
|
-
type: "tailscale" | "wireguard" | "openvpn";
|
|
263
|
-
name: string;
|
|
264
|
-
config: string;
|
|
265
|
-
connected: boolean;
|
|
266
|
-
}[] | undefined;
|
|
267
|
-
} | undefined;
|
|
268
|
-
updatedAt?: string | undefined;
|
|
269
|
-
}, {
|
|
270
|
-
id: string;
|
|
271
|
-
description?: string | undefined;
|
|
272
|
-
project?: string | undefined;
|
|
273
|
-
owner?: string | undefined;
|
|
274
|
-
purpose?: string | undefined;
|
|
275
|
-
environmentType?: "development" | "staging" | "production" | "testing" | undefined;
|
|
276
|
-
hoursActive?: number | undefined;
|
|
277
|
-
lastActive?: string | undefined;
|
|
278
|
-
activePorts?: {
|
|
279
|
-
port: number;
|
|
280
|
-
protocol: "tcp" | "udp";
|
|
281
|
-
state: "open" | "closed" | "filtered";
|
|
282
|
-
service?: string | undefined;
|
|
283
|
-
}[] | undefined;
|
|
284
|
-
sshKeyPath?: string | undefined;
|
|
285
|
-
bootstrapStatus?: "bootstrapping" | "ready" | "failed" | undefined;
|
|
286
|
-
permissions?: {
|
|
287
|
-
plugins?: Record<string, any> | undefined;
|
|
288
|
-
seedConfig?: {
|
|
289
|
-
sourceEnvironmentId?: string | undefined;
|
|
290
|
-
dependencySnapshot?: string | undefined;
|
|
291
|
-
setupScript?: string | undefined;
|
|
292
|
-
} | undefined;
|
|
293
|
-
logins?: {
|
|
294
|
-
github?: {
|
|
295
|
-
enabled: boolean;
|
|
296
|
-
username?: string | undefined;
|
|
297
|
-
tokenScopes?: string[] | undefined;
|
|
298
|
-
} | undefined;
|
|
299
|
-
doppler?: {
|
|
300
|
-
enabled: boolean;
|
|
301
|
-
project?: string | undefined;
|
|
302
|
-
config?: string | undefined;
|
|
303
|
-
} | undefined;
|
|
304
|
-
tailscale?: {
|
|
305
|
-
enabled: boolean;
|
|
306
|
-
authKey?: string | undefined;
|
|
307
|
-
hostname?: string | undefined;
|
|
308
|
-
} | undefined;
|
|
309
|
-
} | undefined;
|
|
310
|
-
vpns?: {
|
|
311
|
-
type: "tailscale" | "wireguard" | "openvpn";
|
|
312
|
-
name: string;
|
|
313
|
-
config: string;
|
|
314
|
-
connected: boolean;
|
|
315
|
-
}[] | undefined;
|
|
316
|
-
} | undefined;
|
|
317
|
-
updatedAt?: string | undefined;
|
|
318
|
-
}>;
|
|
319
|
-
/**
|
|
320
|
-
* Activity update schema
|
|
321
|
-
*/
|
|
322
|
-
export declare const ActivityUpdateSchema: z.ZodObject<{
|
|
323
|
-
hoursActive: z.ZodOptional<z.ZodNumber>;
|
|
324
|
-
lastActive: z.ZodOptional<z.ZodString>;
|
|
325
|
-
activePorts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
326
|
-
port: z.ZodNumber;
|
|
327
|
-
protocol: z.ZodEnum<["tcp", "udp"]>;
|
|
328
|
-
service: z.ZodOptional<z.ZodString>;
|
|
329
|
-
state: z.ZodEnum<["open", "closed", "filtered"]>;
|
|
330
|
-
}, "strip", z.ZodTypeAny, {
|
|
331
|
-
port: number;
|
|
332
|
-
protocol: "tcp" | "udp";
|
|
333
|
-
state: "open" | "closed" | "filtered";
|
|
334
|
-
service?: string | undefined;
|
|
335
|
-
}, {
|
|
336
|
-
port: number;
|
|
337
|
-
protocol: "tcp" | "udp";
|
|
338
|
-
state: "open" | "closed" | "filtered";
|
|
339
|
-
service?: string | undefined;
|
|
340
|
-
}>, "many">>;
|
|
341
|
-
}, "strip", z.ZodTypeAny, {
|
|
342
|
-
hoursActive?: number | undefined;
|
|
343
|
-
lastActive?: string | undefined;
|
|
344
|
-
activePorts?: {
|
|
345
|
-
port: number;
|
|
346
|
-
protocol: "tcp" | "udp";
|
|
347
|
-
state: "open" | "closed" | "filtered";
|
|
348
|
-
service?: string | undefined;
|
|
349
|
-
}[] | undefined;
|
|
350
|
-
}, {
|
|
351
|
-
hoursActive?: number | undefined;
|
|
352
|
-
lastActive?: string | undefined;
|
|
353
|
-
activePorts?: {
|
|
354
|
-
port: number;
|
|
355
|
-
protocol: "tcp" | "udp";
|
|
356
|
-
state: "open" | "closed" | "filtered";
|
|
357
|
-
service?: string | undefined;
|
|
358
|
-
}[] | undefined;
|
|
359
|
-
}>;
|
|
360
|
-
/**
|
|
361
|
-
* Plugins update schema
|
|
362
|
-
*/
|
|
363
|
-
export declare const PluginsUpdateSchema: z.ZodObject<{
|
|
364
|
-
plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
365
|
-
}, "strip", z.ZodTypeAny, {
|
|
366
|
-
plugins?: Record<string, any> | undefined;
|
|
367
|
-
}, {
|
|
368
|
-
plugins?: Record<string, any> | undefined;
|
|
369
|
-
}>;
|
|
370
|
-
/**
|
|
371
|
-
* Type exports for TypeScript inference
|
|
372
|
-
*/
|
|
373
|
-
export type EnvironmentMetadataInput = z.infer<typeof EnvironmentMetadataSchema>;
|
|
374
|
-
export type ActivityUpdateInput = z.infer<typeof ActivityUpdateSchema>;
|
|
375
|
-
export type PluginsUpdateInput = z.infer<typeof PluginsUpdateSchema>;
|
|
376
|
-
//# sourceMappingURL=database.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../runtime/database.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;EAK3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8DpC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;EAE9B,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,yBAAyB,CACjC,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACvE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
package/dist/runtime/database.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schemas for database operations validation
|
|
3
|
-
*/
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
/**
|
|
6
|
-
* Active port schema
|
|
7
|
-
*/
|
|
8
|
-
export const ActivePortSchema = z.object({
|
|
9
|
-
port: z.number().int().min(1).max(65535),
|
|
10
|
-
protocol: z.enum(["tcp", "udp"]),
|
|
11
|
-
service: z.string().optional(),
|
|
12
|
-
state: z.enum(["open", "closed", "filtered"]),
|
|
13
|
-
});
|
|
14
|
-
/**
|
|
15
|
-
* Environment metadata schema for database operations
|
|
16
|
-
*/
|
|
17
|
-
export const EnvironmentMetadataSchema = z.object({
|
|
18
|
-
id: z.string(),
|
|
19
|
-
description: z.string().optional(),
|
|
20
|
-
project: z.string().optional(),
|
|
21
|
-
owner: z.string().optional(),
|
|
22
|
-
purpose: z.string().optional(),
|
|
23
|
-
environmentType: z
|
|
24
|
-
.enum(["development", "staging", "production", "testing"])
|
|
25
|
-
.optional(),
|
|
26
|
-
hoursActive: z.number().min(0).optional(),
|
|
27
|
-
lastActive: z.string().datetime().optional(),
|
|
28
|
-
activePorts: z.array(ActivePortSchema).optional(),
|
|
29
|
-
sshKeyPath: z.string().optional(), // Path to SSH private key for terminal connections
|
|
30
|
-
bootstrapStatus: z.enum(["bootstrapping", "ready", "failed"]).optional(), // Cloud-init bootstrap status
|
|
31
|
-
permissions: z
|
|
32
|
-
.object({
|
|
33
|
-
seedConfig: z
|
|
34
|
-
.object({
|
|
35
|
-
sourceEnvironmentId: z.string().optional(),
|
|
36
|
-
dependencySnapshot: z.string().optional(),
|
|
37
|
-
setupScript: z.string().optional(),
|
|
38
|
-
})
|
|
39
|
-
.optional(),
|
|
40
|
-
logins: z
|
|
41
|
-
.object({
|
|
42
|
-
github: z
|
|
43
|
-
.object({
|
|
44
|
-
enabled: z.boolean(),
|
|
45
|
-
username: z.string().optional(),
|
|
46
|
-
tokenScopes: z.array(z.string()).optional(),
|
|
47
|
-
})
|
|
48
|
-
.optional(),
|
|
49
|
-
doppler: z
|
|
50
|
-
.object({
|
|
51
|
-
enabled: z.boolean(),
|
|
52
|
-
project: z.string().optional(),
|
|
53
|
-
config: z.string().optional(),
|
|
54
|
-
})
|
|
55
|
-
.optional(),
|
|
56
|
-
tailscale: z
|
|
57
|
-
.object({
|
|
58
|
-
enabled: z.boolean(),
|
|
59
|
-
authKey: z.string().optional(),
|
|
60
|
-
hostname: z.string().optional(),
|
|
61
|
-
})
|
|
62
|
-
.optional(),
|
|
63
|
-
})
|
|
64
|
-
.optional(),
|
|
65
|
-
vpns: z
|
|
66
|
-
.array(z.object({
|
|
67
|
-
name: z.string(),
|
|
68
|
-
type: z.enum(["wireguard", "openvpn", "tailscale"]),
|
|
69
|
-
config: z.string(),
|
|
70
|
-
connected: z.boolean(),
|
|
71
|
-
}))
|
|
72
|
-
.optional(),
|
|
73
|
-
plugins: z.record(z.string(), z.any()).optional(),
|
|
74
|
-
})
|
|
75
|
-
.optional(),
|
|
76
|
-
updatedAt: z.string().datetime().optional(),
|
|
77
|
-
});
|
|
78
|
-
/**
|
|
79
|
-
* Activity update schema
|
|
80
|
-
*/
|
|
81
|
-
export const ActivityUpdateSchema = z.object({
|
|
82
|
-
hoursActive: z.number().min(0).optional(),
|
|
83
|
-
lastActive: z.string().datetime().optional(),
|
|
84
|
-
activePorts: z.array(ActivePortSchema).optional(),
|
|
85
|
-
});
|
|
86
|
-
/**
|
|
87
|
-
* Plugins update schema
|
|
88
|
-
*/
|
|
89
|
-
export const PluginsUpdateSchema = z.object({
|
|
90
|
-
plugins: z.record(z.string(), z.any()).optional(),
|
|
91
|
-
});
|
package/dist/runtime/env.d.ts
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schemas for environment variable validation
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/**
|
|
6
|
-
* Server environment variables schema
|
|
7
|
-
*/
|
|
8
|
-
export declare const ServerEnvSchema: z.ZodObject<{
|
|
9
|
-
TEMP_UPLOAD_DIR: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
10
|
-
HETZNER_API_TOKEN: z.ZodOptional<z.ZodString>;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
TEMP_UPLOAD_DIR: string;
|
|
13
|
-
HETZNER_API_TOKEN?: string | undefined;
|
|
14
|
-
}, {
|
|
15
|
-
TEMP_UPLOAD_DIR?: string | undefined;
|
|
16
|
-
HETZNER_API_TOKEN?: string | undefined;
|
|
17
|
-
}>;
|
|
18
|
-
/**
|
|
19
|
-
* AI client environment variables schema
|
|
20
|
-
* At least one API key must be provided
|
|
21
|
-
*/
|
|
22
|
-
export declare const AIEnvSchema: z.ZodEffects<z.ZodObject<{
|
|
23
|
-
Z_AI_API_KEY: z.ZodOptional<z.ZodString>;
|
|
24
|
-
ZAI_API_KEY: z.ZodOptional<z.ZodString>;
|
|
25
|
-
GLM_API_KEY: z.ZodOptional<z.ZodString>;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
Z_AI_API_KEY?: string | undefined;
|
|
28
|
-
ZAI_API_KEY?: string | undefined;
|
|
29
|
-
GLM_API_KEY?: string | undefined;
|
|
30
|
-
}, {
|
|
31
|
-
Z_AI_API_KEY?: string | undefined;
|
|
32
|
-
ZAI_API_KEY?: string | undefined;
|
|
33
|
-
GLM_API_KEY?: string | undefined;
|
|
34
|
-
}>, {
|
|
35
|
-
Z_AI_API_KEY?: string | undefined;
|
|
36
|
-
ZAI_API_KEY?: string | undefined;
|
|
37
|
-
GLM_API_KEY?: string | undefined;
|
|
38
|
-
}, {
|
|
39
|
-
Z_AI_API_KEY?: string | undefined;
|
|
40
|
-
ZAI_API_KEY?: string | undefined;
|
|
41
|
-
GLM_API_KEY?: string | undefined;
|
|
42
|
-
}>;
|
|
43
|
-
/**
|
|
44
|
-
* Full environment variables schema
|
|
45
|
-
*/
|
|
46
|
-
export declare const EnvSchema: z.ZodEffects<z.ZodObject<{
|
|
47
|
-
TEMP_UPLOAD_DIR: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
48
|
-
HETZNER_API_TOKEN: z.ZodOptional<z.ZodString>;
|
|
49
|
-
Z_AI_API_KEY: z.ZodOptional<z.ZodString>;
|
|
50
|
-
ZAI_API_KEY: z.ZodOptional<z.ZodString>;
|
|
51
|
-
GLM_API_KEY: z.ZodOptional<z.ZodString>;
|
|
52
|
-
}, "strip", z.ZodTypeAny, {
|
|
53
|
-
TEMP_UPLOAD_DIR: string;
|
|
54
|
-
HETZNER_API_TOKEN?: string | undefined;
|
|
55
|
-
Z_AI_API_KEY?: string | undefined;
|
|
56
|
-
ZAI_API_KEY?: string | undefined;
|
|
57
|
-
GLM_API_KEY?: string | undefined;
|
|
58
|
-
}, {
|
|
59
|
-
TEMP_UPLOAD_DIR?: string | undefined;
|
|
60
|
-
HETZNER_API_TOKEN?: string | undefined;
|
|
61
|
-
Z_AI_API_KEY?: string | undefined;
|
|
62
|
-
ZAI_API_KEY?: string | undefined;
|
|
63
|
-
GLM_API_KEY?: string | undefined;
|
|
64
|
-
}>, {
|
|
65
|
-
TEMP_UPLOAD_DIR: string;
|
|
66
|
-
HETZNER_API_TOKEN?: string | undefined;
|
|
67
|
-
Z_AI_API_KEY?: string | undefined;
|
|
68
|
-
ZAI_API_KEY?: string | undefined;
|
|
69
|
-
GLM_API_KEY?: string | undefined;
|
|
70
|
-
}, {
|
|
71
|
-
TEMP_UPLOAD_DIR?: string | undefined;
|
|
72
|
-
HETZNER_API_TOKEN?: string | undefined;
|
|
73
|
-
Z_AI_API_KEY?: string | undefined;
|
|
74
|
-
ZAI_API_KEY?: string | undefined;
|
|
75
|
-
GLM_API_KEY?: string | undefined;
|
|
76
|
-
}>;
|
|
77
|
-
/**
|
|
78
|
-
* Validate and parse environment variables
|
|
79
|
-
*/
|
|
80
|
-
export declare function validateEnv(env?: Record<string, string | undefined>): z.SafeParseReturnType<{
|
|
81
|
-
TEMP_UPLOAD_DIR?: string | undefined;
|
|
82
|
-
HETZNER_API_TOKEN?: string | undefined;
|
|
83
|
-
Z_AI_API_KEY?: string | undefined;
|
|
84
|
-
ZAI_API_KEY?: string | undefined;
|
|
85
|
-
GLM_API_KEY?: string | undefined;
|
|
86
|
-
}, {
|
|
87
|
-
TEMP_UPLOAD_DIR: string;
|
|
88
|
-
HETZNER_API_TOKEN?: string | undefined;
|
|
89
|
-
Z_AI_API_KEY?: string | undefined;
|
|
90
|
-
ZAI_API_KEY?: string | undefined;
|
|
91
|
-
GLM_API_KEY?: string | undefined;
|
|
92
|
-
}>;
|
|
93
|
-
/**
|
|
94
|
-
* Validate and parse server environment variables
|
|
95
|
-
*/
|
|
96
|
-
export declare function validateServerEnv(env?: Record<string, string | undefined>): z.SafeParseReturnType<{
|
|
97
|
-
TEMP_UPLOAD_DIR?: string | undefined;
|
|
98
|
-
HETZNER_API_TOKEN?: string | undefined;
|
|
99
|
-
}, {
|
|
100
|
-
TEMP_UPLOAD_DIR: string;
|
|
101
|
-
HETZNER_API_TOKEN?: string | undefined;
|
|
102
|
-
}>;
|
|
103
|
-
/**
|
|
104
|
-
* Validate and parse AI environment variables
|
|
105
|
-
*/
|
|
106
|
-
export declare function validateAIEnv(env?: Record<string, string | undefined>): z.SafeParseReturnType<{
|
|
107
|
-
Z_AI_API_KEY?: string | undefined;
|
|
108
|
-
ZAI_API_KEY?: string | undefined;
|
|
109
|
-
GLM_API_KEY?: string | undefined;
|
|
110
|
-
}, {
|
|
111
|
-
Z_AI_API_KEY?: string | undefined;
|
|
112
|
-
ZAI_API_KEY?: string | undefined;
|
|
113
|
-
GLM_API_KEY?: string | undefined;
|
|
114
|
-
}>;
|
|
115
|
-
/**
|
|
116
|
-
* Type exports for TypeScript inference
|
|
117
|
-
*/
|
|
118
|
-
export type ServerEnv = z.infer<typeof ServerEnvSchema>;
|
|
119
|
-
export type AIEnv = z.infer<typeof AIEnvSchema>;
|
|
120
|
-
export type Env = z.infer<typeof EnvSchema>;
|
|
121
|
-
//# sourceMappingURL=env.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../runtime/env.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;EAG1B,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;EAQpB,CAAA;AAEJ;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQpB,CAAA;AAEF;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe;;;;;;;;;;;;GAEhF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe;;;;;;GAEtF;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe;;;;;;;;GAElF;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AACvD,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAC/C,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA"}
|
package/dist/runtime/env.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schemas for environment variable validation
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/**
|
|
6
|
-
* Server environment variables schema
|
|
7
|
-
*/
|
|
8
|
-
export const ServerEnvSchema = z.object({
|
|
9
|
-
TEMP_UPLOAD_DIR: z.string().optional().default('/tmp/cheapspaces-uploads'),
|
|
10
|
-
HETZNER_API_TOKEN: z.string().min(1).optional(),
|
|
11
|
-
});
|
|
12
|
-
/**
|
|
13
|
-
* AI client environment variables schema
|
|
14
|
-
* At least one API key must be provided
|
|
15
|
-
*/
|
|
16
|
-
export const AIEnvSchema = z
|
|
17
|
-
.object({
|
|
18
|
-
Z_AI_API_KEY: z.string().min(1).optional(),
|
|
19
|
-
ZAI_API_KEY: z.string().min(1).optional(),
|
|
20
|
-
GLM_API_KEY: z.string().min(1).optional(),
|
|
21
|
-
})
|
|
22
|
-
.refine((data) => data.Z_AI_API_KEY || data.ZAI_API_KEY || data.GLM_API_KEY, {
|
|
23
|
-
message: 'At least one AI API key must be provided (Z_AI_API_KEY, ZAI_API_KEY, or GLM_API_KEY)',
|
|
24
|
-
});
|
|
25
|
-
/**
|
|
26
|
-
* Full environment variables schema
|
|
27
|
-
*/
|
|
28
|
-
export const EnvSchema = z.object({
|
|
29
|
-
TEMP_UPLOAD_DIR: z.string().optional().default('/tmp/cheapspaces-uploads'),
|
|
30
|
-
HETZNER_API_TOKEN: z.string().min(1).optional(),
|
|
31
|
-
Z_AI_API_KEY: z.string().min(1).optional(),
|
|
32
|
-
ZAI_API_KEY: z.string().min(1).optional(),
|
|
33
|
-
GLM_API_KEY: z.string().min(1).optional(),
|
|
34
|
-
}).refine((data) => data.Z_AI_API_KEY || data.ZAI_API_KEY || data.GLM_API_KEY, {
|
|
35
|
-
message: 'At least one AI API key must be provided (Z_AI_API_KEY, ZAI_API_KEY, or GLM_API_KEY)',
|
|
36
|
-
});
|
|
37
|
-
/**
|
|
38
|
-
* Validate and parse environment variables
|
|
39
|
-
*/
|
|
40
|
-
export function validateEnv(env = process.env) {
|
|
41
|
-
return EnvSchema.safeParse(env);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Validate and parse server environment variables
|
|
45
|
-
*/
|
|
46
|
-
export function validateServerEnv(env = process.env) {
|
|
47
|
-
return ServerEnvSchema.safeParse(env);
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Validate and parse AI environment variables
|
|
51
|
-
*/
|
|
52
|
-
export function validateAIEnv(env = process.env) {
|
|
53
|
-
return AIEnvSchema.safeParse(env);
|
|
54
|
-
}
|
package/dist/runtime/glm.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schemas for Z.AI GLM API
|
|
3
|
-
*
|
|
4
|
-
* Provider-specific schemas for Z.AI (GLM) models.
|
|
5
|
-
* Generic AI schemas (chat messages, streaming, etc.) are in ./ai.ts
|
|
6
|
-
*/
|
|
7
|
-
import { z } from "zod";
|
|
8
|
-
/**
|
|
9
|
-
* Available GLM models from Z.AI API
|
|
10
|
-
*/
|
|
11
|
-
export declare const GLMModelSchema: z.ZodEnum<["GLM-4.7", "GLM-4.6", "GLM-4.5", "GLM-4.5-air"]>;
|
|
12
|
-
export type GLMModel = z.infer<typeof GLMModelSchema>;
|
|
13
|
-
declare const _default: {
|
|
14
|
-
GLMModelSchema: z.ZodEnum<["GLM-4.7", "GLM-4.6", "GLM-4.5", "GLM-4.5-air"]>;
|
|
15
|
-
};
|
|
16
|
-
export default _default;
|
|
17
|
-
//# sourceMappingURL=glm.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"glm.d.ts","sourceRoot":"","sources":["../../runtime/glm.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AACH,eAAO,MAAM,cAAc,6DAKzB,CAAC;AAMH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;;;;AAMtD,wBAEE"}
|
package/dist/runtime/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Central export point for all Zod schemas
|
|
3
|
-
*
|
|
4
|
-
* Note: Hetzner schemas are in app/backend/shared/lib/hetzner/schemas.ts
|
|
5
|
-
* to keep them with the Hetzner client implementation.
|
|
6
|
-
*/
|
|
7
|
-
export * from "./api.js";
|
|
8
|
-
export * from "./ai.js";
|
|
9
|
-
export * from "./database.js";
|
|
10
|
-
export * from "./env.js";
|
|
11
|
-
export * from "./glm.js";
|
|
12
|
-
export * from "./ssh.js";
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|