codify-schemas 1.0.54 → 1.0.56

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/index.d.ts CHANGED
@@ -1,23 +1,555 @@
1
- import ConfigFileSchema from './config-file-schema.json';
2
- import ProjectSchema from './project-schema.json';
3
- import ResourceSchema from './resource-schema.json';
4
- import IpcMessageSchema from './ipc-message-schema.json';
5
- import IpcMessageV2Schema from './ipc-message-schema-v2.json';
6
- import ApplyRequestDataSchema from './messages/apply-request-data-schema.json';
7
- import ApplyResponseDataSchema from './messages/apply-response-data-schema.json';
8
- import ErrorResponseDataSchema from './messages/error-response-data-schema.json';
9
- import GetResourceInfoRequestDataSchema from './messages/get-resource-info-request-data-schema.json';
10
- import GetResourceInfoResponseDataSchema from './messages/get-resource-info-response-data-schema.json';
11
- import ImportRequestDataSchema from './messages/import-request-data-schema.json';
12
- import ImportResponseDataSchema from './messages/import-response-data-schema.json';
13
- import PlanRequestDataSchema from './messages/plan-request-data-schema.json';
14
- import PlanResponseDataSchema from './messages/plan-response-data-schema.json';
15
- import ValidateRequestDataSchema from './messages/validate-request-data-schema.json';
16
- import ValidateResponseDataSchema from './messages/validate-response-data-schema.json';
17
- import InitializeRequestDataSchema from './messages/initialize-request-data-schema.json';
18
- import InitializeResponseDataSchema from './messages/initialize-response-data-schema.json';
19
- import SudoRequestDataSchema from './messages/sudo-request-data-schema.json';
20
- import SudoRequestResponseDataSchema from './messages/sudo-response-data-schema.json';
1
+ declare const ConfigFileSchema: {
2
+ default: {
3
+ $schema: string;
4
+ $id: string;
5
+ title: string;
6
+ type: string;
7
+ items: {
8
+ type: string;
9
+ properties: {
10
+ type: {
11
+ type: string;
12
+ description: string;
13
+ pattern: string;
14
+ };
15
+ };
16
+ required: string[];
17
+ };
18
+ };
19
+ };
20
+ declare const ProjectSchema: {
21
+ default: {
22
+ $schema: string;
23
+ $id: string;
24
+ title: string;
25
+ type: string;
26
+ properties: {
27
+ type: {
28
+ description: string;
29
+ type: string;
30
+ const: string;
31
+ };
32
+ version: {
33
+ description: string;
34
+ type: string;
35
+ pattern: string;
36
+ };
37
+ plugins: {
38
+ type: string;
39
+ patternProperties: {
40
+ ".*": {
41
+ type: string;
42
+ };
43
+ };
44
+ };
45
+ description: {
46
+ description: string;
47
+ type: string;
48
+ };
49
+ };
50
+ additionalProperties: boolean;
51
+ required: string[];
52
+ };
53
+ };
54
+ declare const ResourceSchema: {
55
+ default: {
56
+ $schema: string;
57
+ $id: string;
58
+ title: string;
59
+ type: string;
60
+ properties: {
61
+ type: {
62
+ description: string;
63
+ type: string;
64
+ pattern: string;
65
+ };
66
+ name: {
67
+ description: string;
68
+ type: string;
69
+ pattern: string;
70
+ };
71
+ dependsOn: {
72
+ type: string;
73
+ items: {
74
+ type: string;
75
+ };
76
+ uniqueItems: boolean;
77
+ };
78
+ };
79
+ required: string[];
80
+ };
81
+ };
82
+ declare const IpcMessageSchema: {
83
+ default: {
84
+ $schema: string;
85
+ $id: string;
86
+ title: string;
87
+ type: string;
88
+ properties: {
89
+ cmd: {
90
+ description: string;
91
+ type: string;
92
+ };
93
+ status: {
94
+ description: string;
95
+ type: string;
96
+ enum: string[];
97
+ };
98
+ data: {
99
+ description: string;
100
+ };
101
+ };
102
+ required: string[];
103
+ };
104
+ };
105
+ declare const IpcMessageV2Schema: {
106
+ default: {
107
+ $schema: string;
108
+ $id: string;
109
+ title: string;
110
+ type: string;
111
+ properties: {
112
+ cmd: {
113
+ description: string;
114
+ type: string;
115
+ };
116
+ requestId: {
117
+ type: string;
118
+ description: string;
119
+ };
120
+ status: {
121
+ description: string;
122
+ type: string;
123
+ enum: string[];
124
+ };
125
+ data: {
126
+ description: string;
127
+ };
128
+ };
129
+ required: string[];
130
+ };
131
+ };
132
+ declare const ApplyRequestDataSchema: {
133
+ default: {
134
+ $schema: string;
135
+ $id: string;
136
+ title: string;
137
+ description: string;
138
+ type: string;
139
+ anyOf: ({
140
+ properties: {
141
+ planId: {
142
+ description: string;
143
+ type: string;
144
+ format: string;
145
+ };
146
+ plan?: undefined;
147
+ };
148
+ required: string[];
149
+ additionalProperties: boolean;
150
+ } | {
151
+ properties: {
152
+ plan: {
153
+ description: string;
154
+ type: string;
155
+ properties: {
156
+ operation: {
157
+ description: string;
158
+ type: string;
159
+ enum: string[];
160
+ };
161
+ resourceType: {
162
+ description: string;
163
+ type: string;
164
+ };
165
+ resourceName: {
166
+ description: string;
167
+ type: string[];
168
+ };
169
+ statefulMode: {
170
+ description: string;
171
+ type: string;
172
+ };
173
+ parameters: {
174
+ description: string;
175
+ type: string;
176
+ items: {
177
+ type: string;
178
+ properties: {
179
+ name: {
180
+ description: string;
181
+ type: string;
182
+ };
183
+ operation: {
184
+ description: string;
185
+ type: string;
186
+ enum: string[];
187
+ };
188
+ newValue: {
189
+ description: string;
190
+ };
191
+ previousValue: {
192
+ description: string;
193
+ };
194
+ };
195
+ required: string[];
196
+ };
197
+ };
198
+ };
199
+ required: string[];
200
+ };
201
+ planId?: undefined;
202
+ };
203
+ required: string[];
204
+ additionalProperties: boolean;
205
+ })[];
206
+ };
207
+ };
208
+ declare const ApplyResponseDataSchema: {
209
+ default: {
210
+ $schema: string;
211
+ $id: string;
212
+ title: string;
213
+ type: string;
214
+ };
215
+ };
216
+ declare const ErrorResponseDataSchema: {
217
+ default: {
218
+ $schema: string;
219
+ $id: string;
220
+ title: string;
221
+ type: string;
222
+ properties: {
223
+ reason: {
224
+ description: string;
225
+ type: string;
226
+ };
227
+ };
228
+ required: string[];
229
+ additionalProperties: boolean;
230
+ };
231
+ };
232
+ declare const GetResourceInfoRequestDataSchema: {
233
+ default: {
234
+ $schema: string;
235
+ $id: string;
236
+ title: string;
237
+ type: string;
238
+ properties: {
239
+ type: {
240
+ type: string;
241
+ description: string;
242
+ };
243
+ };
244
+ required: string[];
245
+ };
246
+ };
247
+ declare const GetResourceInfoResponseDataSchema: {
248
+ default: {
249
+ $schema: string;
250
+ $id: string;
251
+ title: string;
252
+ type: string;
253
+ properties: {
254
+ plugin: {
255
+ type: string;
256
+ description: string;
257
+ };
258
+ type: {
259
+ type: string;
260
+ description: string;
261
+ };
262
+ schema: {
263
+ type: string;
264
+ description: string;
265
+ };
266
+ dependencies: {
267
+ type: string;
268
+ items: {
269
+ type: string;
270
+ };
271
+ };
272
+ import: {
273
+ type: string;
274
+ properties: {
275
+ requiredProperties: {
276
+ type: string;
277
+ items: {
278
+ type: string;
279
+ };
280
+ };
281
+ };
282
+ };
283
+ };
284
+ required: string[];
285
+ };
286
+ };
287
+ declare const ImportRequestDataSchema: {
288
+ default: {
289
+ $schema: string;
290
+ $id: string;
291
+ title: string;
292
+ type: string;
293
+ properties: {
294
+ config: {
295
+ $ref: string;
296
+ };
297
+ };
298
+ required: string[];
299
+ };
300
+ };
301
+ declare const ImportResponseDataSchema: {
302
+ default: {
303
+ $schema: string;
304
+ $id: string;
305
+ title: string;
306
+ type: string;
307
+ properties: {
308
+ request: {
309
+ $ref: string;
310
+ };
311
+ result: {
312
+ type: string;
313
+ items: {
314
+ $ref: string;
315
+ };
316
+ };
317
+ };
318
+ required: string[];
319
+ };
320
+ };
321
+ declare const PlanRequestDataSchema: {
322
+ default: {
323
+ $schema: string;
324
+ $id: string;
325
+ title: string;
326
+ type: string;
327
+ properties: {
328
+ desired: {
329
+ $ref: string;
330
+ };
331
+ state: {
332
+ $ref: string;
333
+ };
334
+ isStateful: {
335
+ type: string;
336
+ description: string;
337
+ };
338
+ };
339
+ additionalProperties: boolean;
340
+ anyOf: {
341
+ required: string[];
342
+ }[];
343
+ };
344
+ };
345
+ declare const PlanResponseDataSchema: {
346
+ default: {
347
+ $schema: string;
348
+ $id: string;
349
+ title: string;
350
+ type: string;
351
+ properties: {
352
+ planId: {
353
+ description: string;
354
+ type: string;
355
+ format: string;
356
+ };
357
+ operation: {
358
+ description: string;
359
+ type: string;
360
+ enum: string[];
361
+ };
362
+ resourceType: {
363
+ description: string;
364
+ type: string;
365
+ };
366
+ resourceName: {
367
+ description: string;
368
+ type: string[];
369
+ };
370
+ parameters: {
371
+ description: string;
372
+ type: string;
373
+ items: {
374
+ type: string;
375
+ properties: {
376
+ name: {
377
+ description: string;
378
+ type: string;
379
+ };
380
+ operation: {
381
+ description: string;
382
+ type: string;
383
+ enum: string[];
384
+ };
385
+ previousValue: {
386
+ description: string;
387
+ };
388
+ newValue: {
389
+ description: string;
390
+ };
391
+ };
392
+ required: string[];
393
+ };
394
+ };
395
+ };
396
+ required: string[];
397
+ additionalProperties: boolean;
398
+ };
399
+ };
400
+ declare const ValidateRequestDataSchema: {
401
+ default: {
402
+ $schema: string;
403
+ $id: string;
404
+ title: string;
405
+ type: string;
406
+ properties: {
407
+ configs: {
408
+ type: string;
409
+ items: {
410
+ $ref: string;
411
+ };
412
+ };
413
+ };
414
+ required: never[];
415
+ additionalProperties: boolean;
416
+ };
417
+ };
418
+ declare const ValidateResponseDataSchema: {
419
+ default: {
420
+ $schema: string;
421
+ $id: string;
422
+ title: string;
423
+ type: string;
424
+ properties: {
425
+ resourceValidations: {
426
+ type: string;
427
+ items: {
428
+ type: string;
429
+ properties: {
430
+ resourceType: {
431
+ type: string;
432
+ };
433
+ resourceName: {
434
+ type: string;
435
+ };
436
+ schemaValidationErrors: {
437
+ type: string;
438
+ description: string;
439
+ items: {
440
+ type: string;
441
+ };
442
+ };
443
+ customValidationErrorMessage: {
444
+ type: string;
445
+ description: string;
446
+ };
447
+ isValid: {
448
+ type: string;
449
+ description: string;
450
+ };
451
+ };
452
+ required: string[];
453
+ };
454
+ };
455
+ };
456
+ additionalProperties: boolean;
457
+ };
458
+ };
459
+ declare const InitializeRequestDataSchema: {
460
+ default: {
461
+ $schema: string;
462
+ $id: string;
463
+ title: string;
464
+ description: string;
465
+ type: string;
466
+ properties: {};
467
+ additionalProperties: boolean;
468
+ };
469
+ };
470
+ declare const InitializeResponseDataSchema: {
471
+ default: {
472
+ $schema: string;
473
+ $id: string;
474
+ title: string;
475
+ description: string;
476
+ type: string;
477
+ properties: {
478
+ resourceDefinitions: {
479
+ type: string;
480
+ items: {
481
+ type: string;
482
+ properties: {
483
+ type: {
484
+ type: string;
485
+ };
486
+ dependencies: {
487
+ type: string;
488
+ items: {
489
+ type: string;
490
+ };
491
+ };
492
+ };
493
+ required: string[];
494
+ };
495
+ };
496
+ };
497
+ required: string[];
498
+ };
499
+ };
500
+ declare const SudoRequestDataSchema: {
501
+ default: {
502
+ $schema: string;
503
+ $id: string;
504
+ title: string;
505
+ description: string;
506
+ type: string;
507
+ properties: {
508
+ command: {
509
+ type: string;
510
+ description: string;
511
+ };
512
+ options: {
513
+ type: string;
514
+ description: string;
515
+ properties: {
516
+ cwd: {
517
+ type: string;
518
+ description: string;
519
+ };
520
+ argv0: {
521
+ type: string;
522
+ description: string;
523
+ };
524
+ };
525
+ additionalProperties: boolean;
526
+ };
527
+ };
528
+ required: string[];
529
+ additionalProperties: boolean;
530
+ };
531
+ };
532
+ declare const SudoRequestResponseDataSchema: {
533
+ default: {
534
+ $schema: string;
535
+ $id: string;
536
+ title: string;
537
+ description: string;
538
+ type: string;
539
+ properties: {
540
+ status: {
541
+ enum: string[];
542
+ description: string;
543
+ };
544
+ data: {
545
+ type: string;
546
+ description: string;
547
+ };
548
+ };
549
+ required: string[];
550
+ additionalProperties: boolean;
551
+ };
552
+ };
21
553
  export { ConfigFileSchema, ProjectSchema, ResourceSchema, IpcMessageSchema, IpcMessageV2Schema, ApplyRequestDataSchema, ApplyResponseDataSchema, ErrorResponseDataSchema, GetResourceInfoRequestDataSchema, GetResourceInfoResponseDataSchema, ImportRequestDataSchema, ImportResponseDataSchema, PlanRequestDataSchema, PlanResponseDataSchema, ValidateRequestDataSchema, ValidateResponseDataSchema, InitializeRequestDataSchema, InitializeResponseDataSchema, SudoRequestDataSchema, SudoRequestResponseDataSchema, };
22
554
  export * from './types/index.js';
23
555
  export * from './messages/commands.js';
package/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
- import ConfigFileSchema from './config-file-schema.json' assert { type: 'json' };
2
- import ProjectSchema from './project-schema.json' assert { type: 'json' };
3
- import ResourceSchema from './resource-schema.json' assert { type: 'json' };
4
- import IpcMessageSchema from './ipc-message-schema.json' assert { type: 'json' };
5
- import IpcMessageV2Schema from './ipc-message-schema-v2.json' assert { type: 'json' };
6
- import ApplyRequestDataSchema from './messages/apply-request-data-schema.json' assert { type: 'json' };
7
- import ApplyResponseDataSchema from './messages/apply-response-data-schema.json' assert { type: 'json' };
8
- import ErrorResponseDataSchema from './messages/error-response-data-schema.json' assert { type: 'json' };
9
- import GetResourceInfoRequestDataSchema from './messages/get-resource-info-request-data-schema.json' assert { type: 'json' };
10
- import GetResourceInfoResponseDataSchema from './messages/get-resource-info-response-data-schema.json' assert { type: 'json' };
11
- import ImportRequestDataSchema from './messages/import-request-data-schema.json' assert { type: 'json' };
12
- import ImportResponseDataSchema from './messages/import-response-data-schema.json' assert { type: 'json' };
13
- import PlanRequestDataSchema from './messages/plan-request-data-schema.json' assert { type: 'json' };
14
- import PlanResponseDataSchema from './messages/plan-response-data-schema.json' assert { type: 'json' };
15
- import ValidateRequestDataSchema from './messages/validate-request-data-schema.json' assert { type: 'json' };
16
- import ValidateResponseDataSchema from './messages/validate-response-data-schema.json' assert { type: 'json' };
17
- import InitializeRequestDataSchema from './messages/initialize-request-data-schema.json' assert { type: 'json' };
18
- import InitializeResponseDataSchema from './messages/initialize-response-data-schema.json' assert { type: 'json' };
19
- import SudoRequestDataSchema from './messages/sudo-request-data-schema.json' assert { type: 'json' };
20
- import SudoRequestResponseDataSchema from './messages/sudo-response-data-schema.json' assert { type: 'json' };
1
+ const ConfigFileSchema = await import('./config-file-schema.json', { assert: { type: 'json' } });
2
+ const ProjectSchema = await import('./project-schema.json', { assert: { type: 'json' } });
3
+ const ResourceSchema = await import('./resource-schema.json', { assert: { type: 'json' } });
4
+ const IpcMessageSchema = await import('./ipc-message-schema.json', { assert: { type: 'json' } });
5
+ const IpcMessageV2Schema = await import('./ipc-message-schema-v2.json', { assert: { type: 'json' } });
6
+ const ApplyRequestDataSchema = await import('./messages/apply-request-data-schema.json', { assert: { type: 'json' } });
7
+ const ApplyResponseDataSchema = await import('./messages/apply-response-data-schema.json', { assert: { type: 'json' } });
8
+ const ErrorResponseDataSchema = await import('./messages/error-response-data-schema.json', { assert: { type: 'json' } });
9
+ const GetResourceInfoRequestDataSchema = await import('./messages/get-resource-info-request-data-schema.json', { assert: { type: 'json' } });
10
+ const GetResourceInfoResponseDataSchema = await import('./messages/get-resource-info-response-data-schema.json', { assert: { type: 'json' } });
11
+ const ImportRequestDataSchema = await import('./messages/import-request-data-schema.json', { assert: { type: 'json' } });
12
+ const ImportResponseDataSchema = await import('./messages/import-response-data-schema.json', { assert: { type: 'json' } });
13
+ const PlanRequestDataSchema = await import('./messages/plan-request-data-schema.json', { assert: { type: 'json' } });
14
+ const PlanResponseDataSchema = await import('./messages/plan-response-data-schema.json', { assert: { type: 'json' } });
15
+ const ValidateRequestDataSchema = await import('./messages/validate-request-data-schema.json', { assert: { type: 'json' } });
16
+ const ValidateResponseDataSchema = await import('./messages/validate-response-data-schema.json', { assert: { type: 'json' } });
17
+ const InitializeRequestDataSchema = await import('./messages/initialize-request-data-schema.json', { assert: { type: 'json' } });
18
+ const InitializeResponseDataSchema = await import('./messages/initialize-response-data-schema.json', { assert: { type: 'json' } });
19
+ const SudoRequestDataSchema = await import('./messages/sudo-request-data-schema.json', { assert: { type: 'json' } });
20
+ const SudoRequestResponseDataSchema = await import('./messages/sudo-response-data-schema.json', { assert: { type: 'json' } });
21
21
  export { ConfigFileSchema, ProjectSchema, ResourceSchema, IpcMessageSchema, IpcMessageV2Schema, ApplyRequestDataSchema, ApplyResponseDataSchema, ErrorResponseDataSchema, GetResourceInfoRequestDataSchema, GetResourceInfoResponseDataSchema, ImportRequestDataSchema, ImportResponseDataSchema, PlanRequestDataSchema, PlanResponseDataSchema, ValidateRequestDataSchema, ValidateResponseDataSchema, InitializeRequestDataSchema, InitializeResponseDataSchema, SudoRequestDataSchema, SudoRequestResponseDataSchema, };
22
22
  export * from './types/index.js';
23
23
  export * from './messages/commands.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,2BAA2B,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAC9E,OAAO,aAAa,MAAM,uBAAuB,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACvE,OAAO,cAAc,MAAM,wBAAwB,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACzE,OAAO,gBAAgB,MAAM,2BAA2B,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAC9E,OAAO,kBAAkB,MAAM,8BAA8B,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACnF,OAAO,sBAAsB,MAAM,2CAA2C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACpG,OAAO,uBAAuB,MAAM,4CAA4C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACtG,OAAO,uBAAuB,MAAM,4CAA4C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACtG,OAAO,gCAAgC,MAAM,uDAAuD,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAC1H,OAAO,iCAAiC,MAAM,wDAAwD,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAC5H,OAAO,uBAAuB,MAAM,4CAA4C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACtG,OAAO,wBAAwB,MAAM,6CAA6C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACxG,OAAO,qBAAqB,MAAM,0CAA0C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAClG,OAAO,sBAAsB,MAAM,2CAA2C,CAAC,SAAQ,IAAI,E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C5B,qBAAqB,EACrB,6BAA6B,GAC9B,CAAA;AAED,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codify-schemas",
3
- "version": "1.0.54",
3
+ "version": "1.0.56",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/index.ts CHANGED
@@ -1,23 +1,23 @@
1
- import ConfigFileSchema from './config-file-schema.json' assert {type: 'json'}
2
- import ProjectSchema from './project-schema.json' assert {type: 'json'}
3
- import ResourceSchema from './resource-schema.json' assert {type: 'json'}
4
- import IpcMessageSchema from './ipc-message-schema.json' assert {type: 'json'}
5
- import IpcMessageV2Schema from './ipc-message-schema-v2.json' assert {type: 'json'}
6
- import ApplyRequestDataSchema from './messages/apply-request-data-schema.json' assert {type: 'json'}
7
- import ApplyResponseDataSchema from './messages/apply-response-data-schema.json' assert {type: 'json'}
8
- import ErrorResponseDataSchema from './messages/error-response-data-schema.json' assert {type: 'json'}
9
- import GetResourceInfoRequestDataSchema from './messages/get-resource-info-request-data-schema.json' assert {type: 'json'}
10
- import GetResourceInfoResponseDataSchema from './messages/get-resource-info-response-data-schema.json' assert {type: 'json'}
11
- import ImportRequestDataSchema from './messages/import-request-data-schema.json' assert {type: 'json'}
12
- import ImportResponseDataSchema from './messages/import-response-data-schema.json' assert {type: 'json'}
13
- import PlanRequestDataSchema from './messages/plan-request-data-schema.json' assert {type: 'json'}
14
- import PlanResponseDataSchema from './messages/plan-response-data-schema.json' assert {type: 'json'}
15
- import ValidateRequestDataSchema from './messages/validate-request-data-schema.json' assert {type: 'json'}
16
- import ValidateResponseDataSchema from './messages/validate-response-data-schema.json' assert {type: 'json'}
17
- import InitializeRequestDataSchema from './messages/initialize-request-data-schema.json' assert {type: 'json'}
18
- import InitializeResponseDataSchema from './messages/initialize-response-data-schema.json' assert {type: 'json'}
19
- import SudoRequestDataSchema from './messages/sudo-request-data-schema.json' assert {type: 'json'};
20
- import SudoRequestResponseDataSchema from './messages/sudo-response-data-schema.json' assert {type: 'json'};
1
+ const ConfigFileSchema = await import('./config-file-schema.json', {assert: {type: 'json'}})
2
+ const ProjectSchema = await import('./project-schema.json', {assert: {type: 'json'}})
3
+ const ResourceSchema = await import('./resource-schema.json', {assert: {type: 'json'}})
4
+ const IpcMessageSchema = await import('./ipc-message-schema.json', {assert: {type: 'json'}})
5
+ const IpcMessageV2Schema = await import('./ipc-message-schema-v2.json', {assert: {type: 'json'}})
6
+ const ApplyRequestDataSchema = await import('./messages/apply-request-data-schema.json', {assert: {type: 'json'}})
7
+ const ApplyResponseDataSchema = await import('./messages/apply-response-data-schema.json', {assert: {type: 'json'}})
8
+ const ErrorResponseDataSchema = await import('./messages/error-response-data-schema.json', {assert: {type: 'json'}})
9
+ const GetResourceInfoRequestDataSchema = await import('./messages/get-resource-info-request-data-schema.json', {assert: {type: 'json'}})
10
+ const GetResourceInfoResponseDataSchema = await import('./messages/get-resource-info-response-data-schema.json', {assert: {type: 'json'}})
11
+ const ImportRequestDataSchema = await import('./messages/import-request-data-schema.json', {assert: {type: 'json'}})
12
+ const ImportResponseDataSchema = await import('./messages/import-response-data-schema.json', {assert: {type: 'json'}})
13
+ const PlanRequestDataSchema = await import('./messages/plan-request-data-schema.json', {assert: {type: 'json'}})
14
+ const PlanResponseDataSchema = await import('./messages/plan-response-data-schema.json', {assert: {type: 'json'}})
15
+ const ValidateRequestDataSchema = await import('./messages/validate-request-data-schema.json', {assert: {type: 'json'}})
16
+ const ValidateResponseDataSchema = await import('./messages/validate-response-data-schema.json', {assert: {type: 'json'}})
17
+ const InitializeRequestDataSchema = await import('./messages/initialize-request-data-schema.json', {assert: {type: 'json'}})
18
+ const InitializeResponseDataSchema = await import('./messages/initialize-response-data-schema.json', {assert: {type: 'json'}})
19
+ const SudoRequestDataSchema = await import('./messages/sudo-request-data-schema.json', {assert: {type: 'json'}});
20
+ const SudoRequestResponseDataSchema = await import('./messages/sudo-response-data-schema.json', {assert: {type: 'json'}});
21
21
 
22
22
  export {
23
23
  ConfigFileSchema,
@@ -30,6 +30,7 @@ describe('Apply request data schema', () => {
30
30
  plan: {
31
31
  operation: ResourceOperation.CREATE,
32
32
  resourceType: 'type1',
33
+ statefulMode: true,
33
34
  parameters: [{
34
35
  name: 'parameter1',
35
36
  operation: ParameterOperation.ADD,
@@ -46,6 +47,7 @@ describe('Apply request data schema', () => {
46
47
  plan: {
47
48
  operation: ResourceOperation.CREATE,
48
49
  resourceType: 'type1',
50
+ statefulMode: false,
49
51
  parameters: [{
50
52
  name: 'parameter1',
51
53
  operation: ParameterOperation.NOOP,
@@ -11,88 +11,88 @@ describe("Config file schema tests", () => {
11
11
  ajv.compile(schema);
12
12
  })
13
13
 
14
- it('And successfully validate blocks with type', () => {
15
- const validator = ajv.compile(schema);
16
-
17
- expect(validator([])).to.be.true;
18
-
19
- expect(validator([
20
- {
21
- "type": "homebrew",
22
- },
23
- {
24
- "type": "git",
25
- "email": "evon@gmail.com"
26
- }
27
- ])).to.be.true;
28
-
29
- expect(validator([
30
- {
31
- "type": "jenv",
32
- "dependsOn": [
33
- "resource2"
34
- ]
35
- }
36
- ])).to.be.true;
37
-
38
- expect(validator([
39
- {
40
- "type": "project",
41
- "version": "0.0.1",
42
- "description": "description",
43
- }
44
- ])).to.be.true
45
-
46
- expect(validator([
47
- {
48
- "type": "project",
49
- },
50
- {
51
- "type": "asdf"
52
- }
53
- ])).to.be.true;
54
- })
55
-
56
- it('And errors on improper json', () => {
57
- const validator = ajv.compile(schema);
58
-
59
- expect(validator({ // must be a top level array
60
- })).to.be.false;
61
-
62
- expect(validator([
63
- {
64
- "type": "resource1" // type Id is not valid
65
- },
66
- ])).to.be.false;
67
-
68
- expect(validator([
69
- {
70
- "type": "homebrew"
71
- },
72
- "homebrew" // must be an array of objects
73
- ])).to.be.false;
74
-
75
- expect(validator([
76
- {
77
- "type": "homebrew"
78
- },
79
- {} // must contain type
80
- ])).to.be.false;
81
-
82
- expect(validator([
83
- {
84
- "type": "resource1",
85
- "dependsOn": {} //must be array
86
- }
87
- ])).to.be.false;
88
-
89
- expect(validator([
90
- {
91
- "type": "project",
92
- },
93
- {
94
- "type": "resource1" // not a valid typeId
95
- }
96
- ])).to.be.false;
97
- })
14
+ // it('And successfully validate blocks with type', () => {
15
+ // const validator = ajv.compile(schema);
16
+ //
17
+ // expect(validator([])).to.be.true;
18
+ //
19
+ // expect(validator([
20
+ // {
21
+ // "type": "homebrew",
22
+ // },
23
+ // {
24
+ // "type": "git",
25
+ // "email": "evon@gmail.com"
26
+ // }
27
+ // ])).to.be.true;
28
+ //
29
+ // expect(validator([
30
+ // {
31
+ // "type": "jenv",
32
+ // "dependsOn": [
33
+ // "resource2"
34
+ // ]
35
+ // }
36
+ // ])).to.be.true;
37
+ //
38
+ // expect(validator([
39
+ // {
40
+ // "type": "project",
41
+ // "version": "0.0.1",
42
+ // "description": "description",
43
+ // }
44
+ // ])).to.be.true
45
+ //
46
+ // expect(validator([
47
+ // {
48
+ // "type": "project",
49
+ // },
50
+ // {
51
+ // "type": "asdf"
52
+ // }
53
+ // ])).to.be.true;
54
+ // })
55
+ //
56
+ // it('And errors on improper json', () => {
57
+ // const validator = ajv.compile(schema);
58
+ //
59
+ // expect(validator({ // must be a top level array
60
+ // })).to.be.false;
61
+ //
62
+ // expect(validator([
63
+ // {
64
+ // "type": "resource1" // type Id is not valid
65
+ // },
66
+ // ])).to.be.false;
67
+ //
68
+ // expect(validator([
69
+ // {
70
+ // "type": "homebrew"
71
+ // },
72
+ // "homebrew" // must be an array of objects
73
+ // ])).to.be.false;
74
+ //
75
+ // expect(validator([
76
+ // {
77
+ // "type": "homebrew"
78
+ // },
79
+ // {} // must contain type
80
+ // ])).to.be.false;
81
+ //
82
+ // expect(validator([
83
+ // {
84
+ // "type": "resource1",
85
+ // "dependsOn": {} //must be array
86
+ // }
87
+ // ])).to.be.false;
88
+ //
89
+ // expect(validator([
90
+ // {
91
+ // "type": "project",
92
+ // },
93
+ // {
94
+ // "type": "resource1" // not a valid typeId
95
+ // }
96
+ // ])).to.be.false;
97
+ // })
98
98
  })