everything-dev 0.2.0 → 0.3.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/src/contract.ts CHANGED
@@ -1,552 +1,569 @@
1
1
  import { oc } from "every-plugin/orpc";
2
2
  import { z } from "every-plugin/zod";
3
- import {
4
- BosConfigSchema,
5
- SourceModeSchema,
6
- } from "./types";
3
+ import { BosConfigSchema, SourceModeSchema } from "./types";
7
4
 
8
5
  const DevOptionsSchema = z.object({
9
- host: SourceModeSchema.default("local"),
10
- ui: SourceModeSchema.default("local"),
11
- api: SourceModeSchema.default("local"),
12
- proxy: z.boolean().default(false),
13
- port: z.number().optional(),
14
- interactive: z.boolean().optional(),
6
+ host: SourceModeSchema.default("local"),
7
+ ui: SourceModeSchema.default("local"),
8
+ api: SourceModeSchema.default("local"),
9
+ proxy: z.boolean().default(false),
10
+ port: z.number().optional(),
11
+ interactive: z.boolean().optional(),
15
12
  });
16
13
 
17
14
  const DevResultSchema = z.object({
18
- status: z.enum(["started", "error"]),
19
- description: z.string(),
20
- processes: z.array(z.string()),
15
+ status: z.enum(["started", "error"]),
16
+ description: z.string(),
17
+ processes: z.array(z.string()),
21
18
  });
22
19
 
23
20
  const StartOptionsSchema = z.object({
24
- port: z.number().optional(),
25
- interactive: z.boolean().optional(),
26
- account: z.string().optional(),
27
- domain: z.string().optional(),
28
- network: z.enum(["mainnet", "testnet"]).default("mainnet"),
21
+ port: z.number().optional(),
22
+ interactive: z.boolean().optional(),
23
+ account: z.string().optional(),
24
+ domain: z.string().optional(),
25
+ network: z.enum(["mainnet", "testnet"]).default("mainnet"),
29
26
  });
30
27
 
31
28
  const StartResultSchema = z.object({
32
- status: z.enum(["running", "error"]),
33
- url: z.string(),
29
+ status: z.enum(["running", "error"]),
30
+ url: z.string(),
34
31
  });
35
32
 
36
33
  const ServeOptionsSchema = z.object({
37
- port: z.number().default(4000),
34
+ port: z.number().default(4000),
38
35
  });
39
36
 
40
37
  const ServeResultSchema = z.object({
41
- status: z.enum(["serving", "error"]),
42
- url: z.string(),
43
- endpoints: z.object({
44
- rpc: z.string(),
45
- docs: z.string(),
46
- }),
38
+ status: z.enum(["serving", "error"]),
39
+ url: z.string(),
40
+ endpoints: z.object({
41
+ rpc: z.string(),
42
+ docs: z.string(),
43
+ }),
47
44
  });
48
45
 
49
46
  const BuildOptionsSchema = z.object({
50
- packages: z.string().default("all"),
51
- force: z.boolean().default(false),
52
- deploy: z.boolean().default(false),
47
+ packages: z.string().default("all"),
48
+ force: z.boolean().default(false),
49
+ deploy: z.boolean().default(false),
53
50
  });
54
51
 
55
52
  const BuildResultSchema = z.object({
56
- status: z.enum(["success", "error"]),
57
- built: z.array(z.string()),
58
- deployed: z.boolean().optional(),
53
+ status: z.enum(["success", "error"]),
54
+ built: z.array(z.string()),
55
+ deployed: z.boolean().optional(),
59
56
  });
60
57
 
61
58
  const SigningMethodSchema = z.enum([
62
- "keychain",
63
- "ledger",
64
- "seed-phrase",
65
- "access-key-file",
66
- "private-key",
59
+ "keychain",
60
+ "ledger",
61
+ "seed-phrase",
62
+ "access-key-file",
63
+ "private-key",
67
64
  ]);
68
65
 
69
66
  const PublishOptionsSchema = z.object({
70
- signWith: SigningMethodSchema.optional(),
71
- network: z.enum(["mainnet", "testnet"]).default("mainnet"),
72
- path: z.string().default("bos.config.json"),
73
- dryRun: z.boolean().default(false),
67
+ signWith: SigningMethodSchema.optional(),
68
+ network: z.enum(["mainnet", "testnet"]).default("mainnet"),
69
+ path: z.string().default("bos.config.json"),
70
+ dryRun: z.boolean().default(false),
74
71
  });
75
72
 
76
73
  const PublishResultSchema = z.object({
77
- status: z.enum(["published", "error", "dry-run"]),
78
- txHash: z.string(),
79
- registryUrl: z.string(),
80
- error: z.string().optional(),
74
+ status: z.enum(["published", "error", "dry-run"]),
75
+ txHash: z.string(),
76
+ registryUrl: z.string(),
77
+ error: z.string().optional(),
81
78
  });
82
79
 
83
80
  const CreateOptionsSchema = z.object({
84
- type: z.enum(["project", "ui", "api", "host", "cli", "gateway"]),
85
- name: z.string().optional(),
86
- template: z.string().optional(),
81
+ type: z.enum(["project", "ui", "api", "host", "cli", "gateway"]),
82
+ name: z.string().optional(),
83
+ // New fields - all optional, if provided skip prompts:
84
+ account: z
85
+ .string()
86
+ .optional()
87
+ .describe("NEAR mainnet account (e.g., myname.near)"),
88
+ testnet: z.string().optional().describe("NEAR testnet account (optional)"),
89
+ template: z
90
+ .string()
91
+ .optional()
92
+ .describe("Template BOS URL (default: bos://every.near/everything.dev)"),
93
+ includeHost: z
94
+ .boolean()
95
+ .optional()
96
+ .describe("Include host package locally (default: false)"),
97
+ includeGateway: z
98
+ .boolean()
99
+ .optional()
100
+ .describe("Include gateway package locally (default: false)"),
87
101
  });
88
102
 
89
103
  const CreateResultSchema = z.object({
90
- status: z.enum(["created", "error"]),
91
- path: z.string(),
104
+ status: z.enum(["created", "error"]),
105
+ path: z.string(),
106
+ error: z.string().optional(),
92
107
  });
93
108
 
94
109
  const InfoResultSchema = z.object({
95
- config: BosConfigSchema,
96
- packages: z.array(z.string()),
97
- remotes: z.array(z.string()),
110
+ config: BosConfigSchema,
111
+ packages: z.array(z.string()),
112
+ remotes: z.array(z.string()),
98
113
  });
99
114
 
100
115
  const EndpointStatusSchema = z.object({
101
- name: z.string(),
102
- url: z.string(),
103
- type: z.enum(["host", "remote", "ssr"]),
104
- healthy: z.boolean(),
105
- latency: z.number().optional(),
116
+ name: z.string(),
117
+ url: z.string(),
118
+ type: z.enum(["host", "remote", "ssr"]),
119
+ healthy: z.boolean(),
120
+ latency: z.number().optional(),
106
121
  });
107
122
 
108
123
  const StatusOptionsSchema = z.object({
109
- env: z.enum(["development", "production"]).default("development"),
124
+ env: z.enum(["development", "production"]).default("development"),
110
125
  });
111
126
 
112
127
  const StatusResultSchema = z.object({
113
- endpoints: z.array(EndpointStatusSchema),
128
+ endpoints: z.array(EndpointStatusSchema),
114
129
  });
115
130
 
116
131
  const CleanResultSchema = z.object({
117
- status: z.enum(["cleaned", "error"]),
118
- removed: z.array(z.string()),
132
+ status: z.enum(["cleaned", "error"]),
133
+ removed: z.array(z.string()),
119
134
  });
120
135
 
121
136
  const RegisterOptionsSchema = z.object({
122
- name: z.string(),
123
- network: z.enum(["mainnet", "testnet"]).default("mainnet"),
137
+ name: z.string(),
138
+ network: z.enum(["mainnet", "testnet"]).default("mainnet"),
124
139
  });
125
140
 
126
141
  const RegisterResultSchema = z.object({
127
- status: z.enum(["registered", "error"]),
128
- account: z.string(),
129
- novaGroup: z.string().optional(),
130
- error: z.string().optional(),
142
+ status: z.enum(["registered", "error"]),
143
+ account: z.string(),
144
+ novaGroup: z.string().optional(),
145
+ error: z.string().optional(),
131
146
  });
132
147
 
133
148
  const SecretsSyncOptionsSchema = z.object({
134
- envPath: z.string(),
149
+ envPath: z.string(),
135
150
  });
136
151
 
137
152
  const SecretsSyncResultSchema = z.object({
138
- status: z.enum(["synced", "error"]),
139
- count: z.number(),
140
- cid: z.string().optional(),
141
- error: z.string().optional(),
153
+ status: z.enum(["synced", "error"]),
154
+ count: z.number(),
155
+ cid: z.string().optional(),
156
+ error: z.string().optional(),
142
157
  });
143
158
 
144
159
  const SecretsSetOptionsSchema = z.object({
145
- key: z.string(),
146
- value: z.string(),
160
+ key: z.string(),
161
+ value: z.string(),
147
162
  });
148
163
 
149
164
  const SecretsSetResultSchema = z.object({
150
- status: z.enum(["set", "error"]),
151
- cid: z.string().optional(),
152
- error: z.string().optional(),
165
+ status: z.enum(["set", "error"]),
166
+ cid: z.string().optional(),
167
+ error: z.string().optional(),
153
168
  });
154
169
 
155
170
  const SecretsListResultSchema = z.object({
156
- status: z.enum(["listed", "error"]),
157
- keys: z.array(z.string()),
158
- error: z.string().optional(),
171
+ status: z.enum(["listed", "error"]),
172
+ keys: z.array(z.string()),
173
+ error: z.string().optional(),
159
174
  });
160
175
 
161
176
  const SecretsDeleteOptionsSchema = z.object({
162
- key: z.string(),
177
+ key: z.string(),
163
178
  });
164
179
 
165
180
  const SecretsDeleteResultSchema = z.object({
166
- status: z.enum(["deleted", "error"]),
167
- cid: z.string().optional(),
168
- error: z.string().optional(),
181
+ status: z.enum(["deleted", "error"]),
182
+ cid: z.string().optional(),
183
+ error: z.string().optional(),
169
184
  });
170
185
 
171
186
  const LoginOptionsSchema = z.object({
172
- token: z.string().optional(),
173
- accountId: z.string().optional(),
187
+ token: z.string().optional(),
188
+ accountId: z.string().optional(),
174
189
  });
175
190
 
176
191
  const LoginResultSchema = z.object({
177
- status: z.enum(["logged-in", "error"]),
178
- accountId: z.string().optional(),
179
- error: z.string().optional(),
192
+ status: z.enum(["logged-in", "error"]),
193
+ accountId: z.string().optional(),
194
+ error: z.string().optional(),
180
195
  });
181
196
 
182
197
  const LogoutResultSchema = z.object({
183
- status: z.enum(["logged-out", "error"]),
184
- error: z.string().optional(),
198
+ status: z.enum(["logged-out", "error"]),
199
+ error: z.string().optional(),
185
200
  });
186
201
 
187
202
  const GatewayDevOptionsSchema = z.object({});
188
203
 
189
204
  const GatewayDevResultSchema = z.object({
190
- status: z.enum(["started", "error"]),
191
- url: z.string(),
192
- error: z.string().optional(),
205
+ status: z.enum(["started", "error"]),
206
+ url: z.string(),
207
+ error: z.string().optional(),
193
208
  });
194
209
 
195
210
  const GatewayDeployOptionsSchema = z.object({
196
- env: z.enum(["production", "staging"]).optional(),
211
+ env: z.enum(["production", "staging"]).optional(),
197
212
  });
198
213
 
199
214
  const GatewayDeployResultSchema = z.object({
200
- status: z.enum(["deployed", "error"]),
201
- url: z.string(),
202
- error: z.string().optional(),
215
+ status: z.enum(["deployed", "error"]),
216
+ url: z.string(),
217
+ error: z.string().optional(),
203
218
  });
204
219
 
205
220
  const GatewaySyncOptionsSchema = z.object({});
206
221
 
207
222
  const GatewaySyncResultSchema = z.object({
208
- status: z.enum(["synced", "error"]),
209
- gatewayDomain: z.string().optional(),
210
- gatewayAccount: z.string().optional(),
211
- error: z.string().optional(),
223
+ status: z.enum(["synced", "error"]),
224
+ gatewayDomain: z.string().optional(),
225
+ gatewayAccount: z.string().optional(),
226
+ error: z.string().optional(),
212
227
  });
213
228
 
214
229
  const UpdateOptionsSchema = z.object({
215
- account: z.string().optional(),
216
- gateway: z.string().optional(),
217
- network: z.enum(["mainnet", "testnet"]).default("mainnet"),
218
- force: z.boolean().optional(),
230
+ account: z.string().optional(),
231
+ gateway: z.string().optional(),
232
+ network: z.enum(["mainnet", "testnet"]).default("mainnet"),
233
+ force: z.boolean().optional(),
219
234
  });
220
235
 
221
236
  const UpdateResultSchema = z.object({
222
- status: z.enum(["updated", "error"]),
223
- account: z.string(),
224
- gateway: z.string(),
225
- socialUrl: z.string().optional(),
226
- hostUrl: z.string(),
227
- catalogUpdated: z.boolean(),
228
- packagesUpdated: z.array(z.string()),
229
- filesSynced: z.array(z.object({
230
- package: z.string(),
231
- files: z.array(z.string()),
232
- })).optional(),
233
- error: z.string().optional(),
237
+ status: z.enum(["updated", "error"]),
238
+ account: z.string(),
239
+ gateway: z.string(),
240
+ socialUrl: z.string().optional(),
241
+ hostUrl: z.string(),
242
+ catalogUpdated: z.boolean(),
243
+ packagesUpdated: z.array(z.string()),
244
+ filesSynced: z
245
+ .array(
246
+ z.object({
247
+ package: z.string(),
248
+ files: z.array(z.string()),
249
+ }),
250
+ )
251
+ .optional(),
252
+ error: z.string().optional(),
234
253
  });
235
254
 
236
255
  const FilesSyncOptionsSchema = z.object({
237
- packages: z.array(z.string()).optional(),
238
- force: z.boolean().optional(),
256
+ packages: z.array(z.string()).optional(),
257
+ force: z.boolean().optional(),
239
258
  });
240
259
 
241
260
  const FilesSyncResultSchema = z.object({
242
- status: z.enum(["synced", "error"]),
243
- synced: z.array(z.object({
244
- package: z.string(),
245
- files: z.array(z.string()),
246
- depsAdded: z.array(z.string()).optional(),
247
- depsUpdated: z.array(z.string()).optional(),
248
- })),
249
- error: z.string().optional(),
261
+ status: z.enum(["synced", "error"]),
262
+ synced: z.array(
263
+ z.object({
264
+ package: z.string(),
265
+ files: z.array(z.string()),
266
+ depsAdded: z.array(z.string()).optional(),
267
+ depsUpdated: z.array(z.string()).optional(),
268
+ }),
269
+ ),
270
+ error: z.string().optional(),
250
271
  });
251
272
 
252
273
  const KillOptionsSchema = z.object({
253
- force: z.boolean().default(false),
274
+ force: z.boolean().default(false),
254
275
  });
255
276
 
256
277
  const KillResultSchema = z.object({
257
- status: z.enum(["killed", "error"]),
258
- killed: z.array(z.number()),
259
- failed: z.array(z.number()),
260
- error: z.string().optional(),
278
+ status: z.enum(["killed", "error"]),
279
+ killed: z.array(z.number()),
280
+ failed: z.array(z.number()),
281
+ error: z.string().optional(),
261
282
  });
262
283
 
263
284
  const ProcessStatusSchema = z.object({
264
- pid: z.number(),
265
- name: z.string(),
266
- port: z.number(),
267
- startedAt: z.number(),
268
- command: z.string(),
285
+ pid: z.number(),
286
+ name: z.string(),
287
+ port: z.number(),
288
+ startedAt: z.number(),
289
+ command: z.string(),
269
290
  });
270
291
 
271
292
  const PsResultSchema = z.object({
272
- status: z.enum(["listed", "error"]),
273
- processes: z.array(ProcessStatusSchema),
274
- error: z.string().optional(),
293
+ status: z.enum(["listed", "error"]),
294
+ processes: z.array(ProcessStatusSchema),
295
+ error: z.string().optional(),
275
296
  });
276
297
 
277
298
  const DockerBuildOptionsSchema = z.object({
278
- target: z.enum(["production", "development"]).default("production"),
279
- tag: z.string().optional(),
280
- noCache: z.boolean().default(false),
299
+ target: z.enum(["production", "development"]).default("production"),
300
+ tag: z.string().optional(),
301
+ noCache: z.boolean().default(false),
281
302
  });
282
303
 
283
304
  const DockerBuildResultSchema = z.object({
284
- status: z.enum(["built", "error"]),
285
- image: z.string(),
286
- tag: z.string(),
287
- error: z.string().optional(),
305
+ status: z.enum(["built", "error"]),
306
+ image: z.string(),
307
+ tag: z.string(),
308
+ error: z.string().optional(),
288
309
  });
289
310
 
290
311
  const DockerRunOptionsSchema = z.object({
291
- target: z.enum(["production", "development"]).default("production"),
292
- mode: z.enum(["start", "serve", "dev"]).default("start"),
293
- port: z.number().optional(),
294
- detach: z.boolean().default(false),
295
- env: z.record(z.string(), z.string()).optional(),
312
+ target: z.enum(["production", "development"]).default("production"),
313
+ mode: z.enum(["start", "serve", "dev"]).default("start"),
314
+ port: z.number().optional(),
315
+ detach: z.boolean().default(false),
316
+ env: z.record(z.string(), z.string()).optional(),
296
317
  });
297
318
 
298
319
  const DockerRunResultSchema = z.object({
299
- status: z.enum(["running", "error"]),
300
- containerId: z.string(),
301
- url: z.string(),
302
- error: z.string().optional(),
320
+ status: z.enum(["running", "error"]),
321
+ containerId: z.string(),
322
+ url: z.string(),
323
+ error: z.string().optional(),
303
324
  });
304
325
 
305
326
  const DockerStopOptionsSchema = z.object({
306
- containerId: z.string().optional(),
307
- all: z.boolean().default(false),
327
+ containerId: z.string().optional(),
328
+ all: z.boolean().default(false),
308
329
  });
309
330
 
310
331
  const DockerStopResultSchema = z.object({
311
- status: z.enum(["stopped", "error"]),
312
- stopped: z.array(z.string()),
313
- error: z.string().optional(),
332
+ status: z.enum(["stopped", "error"]),
333
+ stopped: z.array(z.string()),
334
+ error: z.string().optional(),
314
335
  });
315
336
 
316
337
  const MonitorOptionsSchema = z.object({
317
- ports: z.array(z.number()).optional(),
318
- json: z.boolean().default(false),
319
- watch: z.boolean().default(false),
338
+ ports: z.array(z.number()).optional(),
339
+ json: z.boolean().default(false),
340
+ watch: z.boolean().default(false),
320
341
  });
321
342
 
322
343
  const PortInfoSchema = z.object({
323
- port: z.number(),
324
- pid: z.number().nullable(),
325
- command: z.string().nullable(),
326
- state: z.enum(["LISTEN", "ESTABLISHED", "TIME_WAIT", "FREE"]),
327
- name: z.string().optional(),
344
+ port: z.number(),
345
+ pid: z.number().nullable(),
346
+ command: z.string().nullable(),
347
+ state: z.enum(["LISTEN", "ESTABLISHED", "TIME_WAIT", "FREE"]),
348
+ name: z.string().optional(),
328
349
  });
329
350
 
330
351
  const ProcessInfoSchema = z.object({
331
- pid: z.number(),
332
- ppid: z.number(),
333
- command: z.string(),
334
- args: z.array(z.string()),
335
- rss: z.number(),
336
- children: z.array(z.number()),
337
- startTime: z.number().optional(),
352
+ pid: z.number(),
353
+ ppid: z.number(),
354
+ command: z.string(),
355
+ args: z.array(z.string()),
356
+ rss: z.number(),
357
+ children: z.array(z.number()),
358
+ startTime: z.number().optional(),
338
359
  });
339
360
 
340
361
  const MemoryInfoSchema = z.object({
341
- total: z.number(),
342
- used: z.number(),
343
- free: z.number(),
344
- processRss: z.number(),
362
+ total: z.number(),
363
+ used: z.number(),
364
+ free: z.number(),
365
+ processRss: z.number(),
345
366
  });
346
367
 
347
368
  const SnapshotSchema = z.object({
348
- timestamp: z.number(),
349
- configPath: z.string().nullable(),
350
- ports: z.record(z.string(), PortInfoSchema),
351
- processes: z.array(ProcessInfoSchema),
352
- memory: MemoryInfoSchema,
353
- platform: z.string(),
369
+ timestamp: z.number(),
370
+ configPath: z.string().nullable(),
371
+ ports: z.record(z.string(), PortInfoSchema),
372
+ processes: z.array(ProcessInfoSchema),
373
+ memory: MemoryInfoSchema,
374
+ platform: z.string(),
354
375
  });
355
376
 
356
377
  const MonitorResultSchema = z.object({
357
- status: z.enum(["snapshot", "watching", "error"]),
358
- snapshot: SnapshotSchema.optional(),
359
- error: z.string().optional(),
378
+ status: z.enum(["snapshot", "watching", "error"]),
379
+ snapshot: SnapshotSchema.optional(),
380
+ error: z.string().optional(),
360
381
  });
361
382
 
362
383
  const SessionOptionsSchema = z.object({
363
- headless: z.boolean().default(true),
364
- timeout: z.number().default(120000),
365
- output: z.string().default("./session-report.json"),
366
- format: z.enum(["json", "html"]).default("json"),
367
- flow: z.enum(["login", "navigation", "custom"]).default("login"),
368
- routes: z.array(z.string()).optional(),
369
- snapshotInterval: z.number().default(2000),
384
+ headless: z.boolean().default(true),
385
+ timeout: z.number().default(120000),
386
+ output: z.string().default("./session-report.json"),
387
+ format: z.enum(["json", "html"]).default("json"),
388
+ flow: z.enum(["login", "navigation", "custom"]).default("login"),
389
+ routes: z.array(z.string()).optional(),
390
+ snapshotInterval: z.number().default(2000),
370
391
  });
371
392
 
372
393
  const SessionSummarySchema = z.object({
373
- totalMemoryDeltaMb: z.number(),
374
- peakMemoryMb: z.number(),
375
- averageMemoryMb: z.number(),
376
- processesSpawned: z.number(),
377
- processesKilled: z.number(),
378
- orphanedProcesses: z.number(),
379
- portsUsed: z.array(z.number()),
380
- portsLeaked: z.number(),
381
- hasLeaks: z.boolean(),
382
- eventCount: z.number(),
383
- duration: z.number(),
394
+ totalMemoryDeltaMb: z.number(),
395
+ peakMemoryMb: z.number(),
396
+ averageMemoryMb: z.number(),
397
+ processesSpawned: z.number(),
398
+ processesKilled: z.number(),
399
+ orphanedProcesses: z.number(),
400
+ portsUsed: z.array(z.number()),
401
+ portsLeaked: z.number(),
402
+ hasLeaks: z.boolean(),
403
+ eventCount: z.number(),
404
+ duration: z.number(),
384
405
  });
385
406
 
386
407
  const SessionResultSchema = z.object({
387
- status: z.enum(["completed", "leaks_detected", "error", "timeout"]),
388
- sessionId: z.string().optional(),
389
- reportPath: z.string().optional(),
390
- summary: SessionSummarySchema.optional(),
391
- error: z.string().optional(),
408
+ status: z.enum(["completed", "leaks_detected", "error", "timeout"]),
409
+ sessionId: z.string().optional(),
410
+ reportPath: z.string().optional(),
411
+ summary: SessionSummarySchema.optional(),
412
+ error: z.string().optional(),
392
413
  });
393
414
 
394
415
  const DepsUpdateOptionsSchema = z.object({
395
- category: z.enum(["ui", "api"]).default("ui"),
396
- packages: z.array(z.string()).optional(),
416
+ category: z.enum(["ui", "api"]).default("ui"),
417
+ packages: z.array(z.string()).optional(),
397
418
  });
398
419
 
399
420
  const DepsUpdateResultSchema = z.object({
400
- status: z.enum(["updated", "cancelled", "error"]),
401
- updated: z.array(z.object({
402
- name: z.string(),
403
- from: z.string(),
404
- to: z.string(),
405
- })),
406
- syncStatus: z.enum(["synced", "skipped", "error"]).optional(),
407
- error: z.string().optional(),
421
+ status: z.enum(["updated", "cancelled", "error"]),
422
+ updated: z.array(
423
+ z.object({
424
+ name: z.string(),
425
+ from: z.string(),
426
+ to: z.string(),
427
+ }),
428
+ ),
429
+ syncStatus: z.enum(["synced", "skipped", "error"]).optional(),
430
+ error: z.string().optional(),
408
431
  });
409
432
 
410
433
  export const bosContract = oc.router({
411
- dev: oc
412
- .route({ method: "POST", path: "/dev" })
413
- .input(DevOptionsSchema)
414
- .output(DevResultSchema),
415
-
416
- start: oc
417
- .route({ method: "POST", path: "/start" })
418
- .input(StartOptionsSchema)
419
- .output(StartResultSchema),
420
-
421
- serve: oc
422
- .route({ method: "POST", path: "/serve" })
423
- .input(ServeOptionsSchema)
424
- .output(ServeResultSchema),
425
-
426
- build: oc
427
- .route({ method: "POST", path: "/build" })
428
- .input(BuildOptionsSchema)
429
- .output(BuildResultSchema),
430
-
431
- publish: oc
432
- .route({ method: "POST", path: "/publish" })
433
- .input(PublishOptionsSchema)
434
- .output(PublishResultSchema),
435
-
436
- create: oc
437
- .route({ method: "POST", path: "/create" })
438
- .input(CreateOptionsSchema)
439
- .output(CreateResultSchema),
440
-
441
- info: oc
442
- .route({ method: "GET", path: "/info" })
443
- .output(InfoResultSchema),
444
-
445
- status: oc
446
- .route({ method: "GET", path: "/status" })
447
- .input(StatusOptionsSchema)
448
- .output(StatusResultSchema),
449
-
450
- clean: oc
451
- .route({ method: "POST", path: "/clean" })
452
- .output(CleanResultSchema),
453
-
454
- register: oc
455
- .route({ method: "POST", path: "/register" })
456
- .input(RegisterOptionsSchema)
457
- .output(RegisterResultSchema),
458
-
459
- secretsSync: oc
460
- .route({ method: "POST", path: "/secrets/sync" })
461
- .input(SecretsSyncOptionsSchema)
462
- .output(SecretsSyncResultSchema),
463
-
464
- secretsSet: oc
465
- .route({ method: "POST", path: "/secrets/set" })
466
- .input(SecretsSetOptionsSchema)
467
- .output(SecretsSetResultSchema),
468
-
469
- secretsList: oc
470
- .route({ method: "GET", path: "/secrets/list" })
471
- .output(SecretsListResultSchema),
472
-
473
- secretsDelete: oc
474
- .route({ method: "POST", path: "/secrets/delete" })
475
- .input(SecretsDeleteOptionsSchema)
476
- .output(SecretsDeleteResultSchema),
477
-
478
- login: oc
479
- .route({ method: "POST", path: "/login" })
480
- .input(LoginOptionsSchema)
481
- .output(LoginResultSchema),
482
-
483
- logout: oc
484
- .route({ method: "POST", path: "/logout" })
485
- .output(LogoutResultSchema),
486
-
487
- gatewayDev: oc
488
- .route({ method: "POST", path: "/gateway/dev" })
489
- .input(GatewayDevOptionsSchema)
490
- .output(GatewayDevResultSchema),
491
-
492
- gatewayDeploy: oc
493
- .route({ method: "POST", path: "/gateway/deploy" })
494
- .input(GatewayDeployOptionsSchema)
495
- .output(GatewayDeployResultSchema),
496
-
497
- gatewaySync: oc
498
- .route({ method: "POST", path: "/gateway/sync" })
499
- .input(GatewaySyncOptionsSchema)
500
- .output(GatewaySyncResultSchema),
501
-
502
- update: oc
503
- .route({ method: "POST", path: "/update" })
504
- .input(UpdateOptionsSchema)
505
- .output(UpdateResultSchema),
506
-
507
- depsUpdate: oc
508
- .route({ method: "POST", path: "/deps/update" })
509
- .input(DepsUpdateOptionsSchema)
510
- .output(DepsUpdateResultSchema),
511
-
512
- filesSync: oc
513
- .route({ method: "POST", path: "/files/sync" })
514
- .input(FilesSyncOptionsSchema)
515
- .output(FilesSyncResultSchema),
516
-
517
- kill: oc
518
- .route({ method: "POST", path: "/kill" })
519
- .input(KillOptionsSchema)
520
- .output(KillResultSchema),
521
-
522
- ps: oc
523
- .route({ method: "GET", path: "/ps" })
524
- .output(PsResultSchema),
525
-
526
- dockerBuild: oc
527
- .route({ method: "POST", path: "/docker/build" })
528
- .input(DockerBuildOptionsSchema)
529
- .output(DockerBuildResultSchema),
530
-
531
- dockerRun: oc
532
- .route({ method: "POST", path: "/docker/run" })
533
- .input(DockerRunOptionsSchema)
534
- .output(DockerRunResultSchema),
535
-
536
- dockerStop: oc
537
- .route({ method: "POST", path: "/docker/stop" })
538
- .input(DockerStopOptionsSchema)
539
- .output(DockerStopResultSchema),
540
-
541
- monitor: oc
542
- .route({ method: "GET", path: "/monitor" })
543
- .input(MonitorOptionsSchema)
544
- .output(MonitorResultSchema),
545
-
546
- session: oc
547
- .route({ method: "POST", path: "/session" })
548
- .input(SessionOptionsSchema)
549
- .output(SessionResultSchema),
434
+ dev: oc
435
+ .route({ method: "POST", path: "/dev" })
436
+ .input(DevOptionsSchema)
437
+ .output(DevResultSchema),
438
+
439
+ start: oc
440
+ .route({ method: "POST", path: "/start" })
441
+ .input(StartOptionsSchema)
442
+ .output(StartResultSchema),
443
+
444
+ serve: oc
445
+ .route({ method: "POST", path: "/serve" })
446
+ .input(ServeOptionsSchema)
447
+ .output(ServeResultSchema),
448
+
449
+ build: oc
450
+ .route({ method: "POST", path: "/build" })
451
+ .input(BuildOptionsSchema)
452
+ .output(BuildResultSchema),
453
+
454
+ publish: oc
455
+ .route({ method: "POST", path: "/publish" })
456
+ .input(PublishOptionsSchema)
457
+ .output(PublishResultSchema),
458
+
459
+ create: oc
460
+ .route({ method: "POST", path: "/create" })
461
+ .input(CreateOptionsSchema)
462
+ .output(CreateResultSchema),
463
+
464
+ info: oc.route({ method: "GET", path: "/info" }).output(InfoResultSchema),
465
+
466
+ status: oc
467
+ .route({ method: "GET", path: "/status" })
468
+ .input(StatusOptionsSchema)
469
+ .output(StatusResultSchema),
470
+
471
+ clean: oc.route({ method: "POST", path: "/clean" }).output(CleanResultSchema),
472
+
473
+ register: oc
474
+ .route({ method: "POST", path: "/register" })
475
+ .input(RegisterOptionsSchema)
476
+ .output(RegisterResultSchema),
477
+
478
+ secretsSync: oc
479
+ .route({ method: "POST", path: "/secrets/sync" })
480
+ .input(SecretsSyncOptionsSchema)
481
+ .output(SecretsSyncResultSchema),
482
+
483
+ secretsSet: oc
484
+ .route({ method: "POST", path: "/secrets/set" })
485
+ .input(SecretsSetOptionsSchema)
486
+ .output(SecretsSetResultSchema),
487
+
488
+ secretsList: oc
489
+ .route({ method: "GET", path: "/secrets/list" })
490
+ .output(SecretsListResultSchema),
491
+
492
+ secretsDelete: oc
493
+ .route({ method: "POST", path: "/secrets/delete" })
494
+ .input(SecretsDeleteOptionsSchema)
495
+ .output(SecretsDeleteResultSchema),
496
+
497
+ login: oc
498
+ .route({ method: "POST", path: "/login" })
499
+ .input(LoginOptionsSchema)
500
+ .output(LoginResultSchema),
501
+
502
+ logout: oc
503
+ .route({ method: "POST", path: "/logout" })
504
+ .output(LogoutResultSchema),
505
+
506
+ gatewayDev: oc
507
+ .route({ method: "POST", path: "/gateway/dev" })
508
+ .input(GatewayDevOptionsSchema)
509
+ .output(GatewayDevResultSchema),
510
+
511
+ gatewayDeploy: oc
512
+ .route({ method: "POST", path: "/gateway/deploy" })
513
+ .input(GatewayDeployOptionsSchema)
514
+ .output(GatewayDeployResultSchema),
515
+
516
+ gatewaySync: oc
517
+ .route({ method: "POST", path: "/gateway/sync" })
518
+ .input(GatewaySyncOptionsSchema)
519
+ .output(GatewaySyncResultSchema),
520
+
521
+ update: oc
522
+ .route({ method: "POST", path: "/update" })
523
+ .input(UpdateOptionsSchema)
524
+ .output(UpdateResultSchema),
525
+
526
+ depsUpdate: oc
527
+ .route({ method: "POST", path: "/deps/update" })
528
+ .input(DepsUpdateOptionsSchema)
529
+ .output(DepsUpdateResultSchema),
530
+
531
+ filesSync: oc
532
+ .route({ method: "POST", path: "/files/sync" })
533
+ .input(FilesSyncOptionsSchema)
534
+ .output(FilesSyncResultSchema),
535
+
536
+ kill: oc
537
+ .route({ method: "POST", path: "/kill" })
538
+ .input(KillOptionsSchema)
539
+ .output(KillResultSchema),
540
+
541
+ ps: oc.route({ method: "GET", path: "/ps" }).output(PsResultSchema),
542
+
543
+ dockerBuild: oc
544
+ .route({ method: "POST", path: "/docker/build" })
545
+ .input(DockerBuildOptionsSchema)
546
+ .output(DockerBuildResultSchema),
547
+
548
+ dockerRun: oc
549
+ .route({ method: "POST", path: "/docker/run" })
550
+ .input(DockerRunOptionsSchema)
551
+ .output(DockerRunResultSchema),
552
+
553
+ dockerStop: oc
554
+ .route({ method: "POST", path: "/docker/stop" })
555
+ .input(DockerStopOptionsSchema)
556
+ .output(DockerStopResultSchema),
557
+
558
+ monitor: oc
559
+ .route({ method: "GET", path: "/monitor" })
560
+ .input(MonitorOptionsSchema)
561
+ .output(MonitorResultSchema),
562
+
563
+ session: oc
564
+ .route({ method: "POST", path: "/session" })
565
+ .input(SessionOptionsSchema)
566
+ .output(SessionResultSchema),
550
567
  });
551
568
 
552
569
  export type BosContract = typeof bosContract;