codify-schemas 1.0.60 → 1.0.62
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 +20 -516
- package/dist/index.js +20 -20
- package/dist/index.js.map +1 -1
- package/dist/messages/import-request-data-schema.json +5 -2
- package/dist/messages/import-response-data-schema.json +18 -2
- package/dist/messages/plan-request-data-schema.json +9 -4
- package/dist/messages/validate-request-data-schema.json +9 -1
- package/dist/types/index.d.ts +17 -10
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +20 -20
- package/src/messages/import-request-data-schema.json +5 -2
- package/src/messages/import-request-data-schema.test.ts +8 -4
- package/src/messages/import-response-data-schema.json +18 -2
- package/src/messages/plan-request-data-schema.json +9 -4
- package/src/messages/plan-request-data-schema.test.ts +22 -11
- package/src/messages/validate-request-data-schema.json +9 -1
- package/src/types/index.ts +18 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,519 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
title: string;
|
|
22
|
-
type: string;
|
|
23
|
-
properties: {
|
|
24
|
-
type: {
|
|
25
|
-
description: string;
|
|
26
|
-
type: string;
|
|
27
|
-
const: string;
|
|
28
|
-
};
|
|
29
|
-
version: {
|
|
30
|
-
description: string;
|
|
31
|
-
type: string;
|
|
32
|
-
pattern: string;
|
|
33
|
-
};
|
|
34
|
-
plugins: {
|
|
35
|
-
type: string;
|
|
36
|
-
patternProperties: {
|
|
37
|
-
".*": {
|
|
38
|
-
type: string;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
description: {
|
|
43
|
-
description: string;
|
|
44
|
-
type: string;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
additionalProperties: boolean;
|
|
48
|
-
required: string[];
|
|
49
|
-
};
|
|
50
|
-
declare const ResourceSchema: {
|
|
51
|
-
$schema: string;
|
|
52
|
-
$id: string;
|
|
53
|
-
title: string;
|
|
54
|
-
type: string;
|
|
55
|
-
properties: {
|
|
56
|
-
type: {
|
|
57
|
-
description: string;
|
|
58
|
-
type: string;
|
|
59
|
-
pattern: string;
|
|
60
|
-
};
|
|
61
|
-
name: {
|
|
62
|
-
description: string;
|
|
63
|
-
type: string;
|
|
64
|
-
pattern: string;
|
|
65
|
-
};
|
|
66
|
-
dependsOn: {
|
|
67
|
-
type: string;
|
|
68
|
-
items: {
|
|
69
|
-
type: string;
|
|
70
|
-
};
|
|
71
|
-
uniqueItems: boolean;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
required: string[];
|
|
75
|
-
};
|
|
76
|
-
declare const IpcMessageSchema: {
|
|
77
|
-
$schema: string;
|
|
78
|
-
$id: string;
|
|
79
|
-
title: string;
|
|
80
|
-
type: string;
|
|
81
|
-
properties: {
|
|
82
|
-
cmd: {
|
|
83
|
-
description: string;
|
|
84
|
-
type: string;
|
|
85
|
-
};
|
|
86
|
-
status: {
|
|
87
|
-
description: string;
|
|
88
|
-
type: string;
|
|
89
|
-
enum: string[];
|
|
90
|
-
};
|
|
91
|
-
data: {
|
|
92
|
-
description: string;
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
required: string[];
|
|
96
|
-
};
|
|
97
|
-
declare const IpcMessageV2Schema: {
|
|
98
|
-
$schema: string;
|
|
99
|
-
$id: string;
|
|
100
|
-
title: string;
|
|
101
|
-
type: string;
|
|
102
|
-
properties: {
|
|
103
|
-
cmd: {
|
|
104
|
-
description: string;
|
|
105
|
-
type: string;
|
|
106
|
-
};
|
|
107
|
-
requestId: {
|
|
108
|
-
type: string;
|
|
109
|
-
description: string;
|
|
110
|
-
};
|
|
111
|
-
status: {
|
|
112
|
-
description: string;
|
|
113
|
-
type: string;
|
|
114
|
-
enum: string[];
|
|
115
|
-
};
|
|
116
|
-
data: {
|
|
117
|
-
description: string;
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
required: string[];
|
|
121
|
-
};
|
|
122
|
-
declare const ApplyRequestDataSchema: {
|
|
123
|
-
$schema: string;
|
|
124
|
-
$id: string;
|
|
125
|
-
title: string;
|
|
126
|
-
description: string;
|
|
127
|
-
type: string;
|
|
128
|
-
oneOf: ({
|
|
129
|
-
properties: {
|
|
130
|
-
planId: {
|
|
131
|
-
description: string;
|
|
132
|
-
type: string;
|
|
133
|
-
format: string;
|
|
134
|
-
};
|
|
135
|
-
plan?: undefined;
|
|
136
|
-
};
|
|
137
|
-
required: string[];
|
|
138
|
-
additionalProperties: boolean;
|
|
139
|
-
} | {
|
|
140
|
-
properties: {
|
|
141
|
-
plan: {
|
|
142
|
-
description: string;
|
|
143
|
-
type: string;
|
|
144
|
-
properties: {
|
|
145
|
-
operation: {
|
|
146
|
-
description: string;
|
|
147
|
-
type: string;
|
|
148
|
-
enum: string[];
|
|
149
|
-
};
|
|
150
|
-
resourceType: {
|
|
151
|
-
description: string;
|
|
152
|
-
type: string;
|
|
153
|
-
};
|
|
154
|
-
resourceName: {
|
|
155
|
-
description: string;
|
|
156
|
-
type: string[];
|
|
157
|
-
};
|
|
158
|
-
isStateful: {
|
|
159
|
-
description: string;
|
|
160
|
-
type: string;
|
|
161
|
-
};
|
|
162
|
-
parameters: {
|
|
163
|
-
description: string;
|
|
164
|
-
type: string;
|
|
165
|
-
items: {
|
|
166
|
-
type: string;
|
|
167
|
-
properties: {
|
|
168
|
-
name: {
|
|
169
|
-
description: string;
|
|
170
|
-
type: string;
|
|
171
|
-
};
|
|
172
|
-
operation: {
|
|
173
|
-
description: string;
|
|
174
|
-
type: string;
|
|
175
|
-
enum: string[];
|
|
176
|
-
};
|
|
177
|
-
newValue: {
|
|
178
|
-
description: string;
|
|
179
|
-
};
|
|
180
|
-
previousValue: {
|
|
181
|
-
description: string;
|
|
182
|
-
};
|
|
183
|
-
};
|
|
184
|
-
required: string[];
|
|
185
|
-
};
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
required: string[];
|
|
189
|
-
};
|
|
190
|
-
planId?: undefined;
|
|
191
|
-
};
|
|
192
|
-
required: string[];
|
|
193
|
-
additionalProperties: boolean;
|
|
194
|
-
})[];
|
|
195
|
-
};
|
|
196
|
-
declare const ApplyResponseDataSchema: {
|
|
197
|
-
$schema: string;
|
|
198
|
-
$id: string;
|
|
199
|
-
title: string;
|
|
200
|
-
type: string;
|
|
201
|
-
};
|
|
202
|
-
declare const ErrorResponseDataSchema: {
|
|
203
|
-
$schema: string;
|
|
204
|
-
$id: string;
|
|
205
|
-
title: string;
|
|
206
|
-
type: string;
|
|
207
|
-
properties: {
|
|
208
|
-
reason: {
|
|
209
|
-
description: string;
|
|
210
|
-
type: string;
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
required: string[];
|
|
214
|
-
additionalProperties: boolean;
|
|
215
|
-
};
|
|
216
|
-
declare const GetResourceInfoRequestDataSchema: {
|
|
217
|
-
$schema: string;
|
|
218
|
-
$id: string;
|
|
219
|
-
title: string;
|
|
220
|
-
type: string;
|
|
221
|
-
properties: {
|
|
222
|
-
type: {
|
|
223
|
-
type: string;
|
|
224
|
-
description: string;
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
required: string[];
|
|
228
|
-
};
|
|
229
|
-
declare const GetResourceInfoResponseDataSchema: {
|
|
230
|
-
$schema: string;
|
|
231
|
-
$id: string;
|
|
232
|
-
title: string;
|
|
233
|
-
type: string;
|
|
234
|
-
properties: {
|
|
235
|
-
plugin: {
|
|
236
|
-
type: string;
|
|
237
|
-
description: string;
|
|
238
|
-
};
|
|
239
|
-
type: {
|
|
240
|
-
type: string;
|
|
241
|
-
description: string;
|
|
242
|
-
};
|
|
243
|
-
schema: {
|
|
244
|
-
type: string;
|
|
245
|
-
description: string;
|
|
246
|
-
};
|
|
247
|
-
dependencies: {
|
|
248
|
-
type: string;
|
|
249
|
-
items: {
|
|
250
|
-
type: string;
|
|
251
|
-
};
|
|
252
|
-
};
|
|
253
|
-
import: {
|
|
254
|
-
type: string;
|
|
255
|
-
properties: {
|
|
256
|
-
requiredProperties: {
|
|
257
|
-
type: string;
|
|
258
|
-
items: {
|
|
259
|
-
type: string;
|
|
260
|
-
};
|
|
261
|
-
};
|
|
262
|
-
};
|
|
263
|
-
};
|
|
264
|
-
};
|
|
265
|
-
required: string[];
|
|
266
|
-
};
|
|
267
|
-
declare const ImportRequestDataSchema: {
|
|
268
|
-
$schema: string;
|
|
269
|
-
$id: string;
|
|
270
|
-
title: string;
|
|
271
|
-
type: string;
|
|
272
|
-
properties: {
|
|
273
|
-
config: {
|
|
274
|
-
$ref: string;
|
|
275
|
-
};
|
|
276
|
-
};
|
|
277
|
-
required: string[];
|
|
278
|
-
};
|
|
279
|
-
declare const ImportResponseDataSchema: {
|
|
280
|
-
$schema: string;
|
|
281
|
-
$id: string;
|
|
282
|
-
title: string;
|
|
283
|
-
type: string;
|
|
284
|
-
properties: {
|
|
285
|
-
request: {
|
|
286
|
-
$ref: string;
|
|
287
|
-
};
|
|
288
|
-
result: {
|
|
289
|
-
type: string;
|
|
290
|
-
items: {
|
|
291
|
-
$ref: string;
|
|
292
|
-
};
|
|
293
|
-
};
|
|
294
|
-
};
|
|
295
|
-
required: string[];
|
|
296
|
-
};
|
|
297
|
-
declare const PlanRequestDataSchema: {
|
|
298
|
-
$schema: string;
|
|
299
|
-
$id: string;
|
|
300
|
-
title: string;
|
|
301
|
-
type: string;
|
|
302
|
-
properties: {
|
|
303
|
-
desired: {
|
|
304
|
-
$ref: string;
|
|
305
|
-
};
|
|
306
|
-
state: {
|
|
307
|
-
$ref: string;
|
|
308
|
-
};
|
|
309
|
-
isStateful: {
|
|
310
|
-
type: string;
|
|
311
|
-
description: string;
|
|
312
|
-
};
|
|
313
|
-
};
|
|
314
|
-
additionalProperties: boolean;
|
|
315
|
-
anyOf: {
|
|
316
|
-
required: string[];
|
|
317
|
-
}[];
|
|
318
|
-
};
|
|
319
|
-
declare const PlanResponseDataSchema: {
|
|
320
|
-
$schema: string;
|
|
321
|
-
$id: string;
|
|
322
|
-
title: string;
|
|
323
|
-
type: string;
|
|
324
|
-
properties: {
|
|
325
|
-
planId: {
|
|
326
|
-
description: string;
|
|
327
|
-
type: string;
|
|
328
|
-
format: string;
|
|
329
|
-
};
|
|
330
|
-
operation: {
|
|
331
|
-
description: string;
|
|
332
|
-
type: string;
|
|
333
|
-
enum: string[];
|
|
334
|
-
};
|
|
335
|
-
isStateful: {
|
|
336
|
-
description: string;
|
|
337
|
-
type: string;
|
|
338
|
-
};
|
|
339
|
-
resourceType: {
|
|
340
|
-
description: string;
|
|
341
|
-
type: string;
|
|
342
|
-
};
|
|
343
|
-
resourceName: {
|
|
344
|
-
description: string;
|
|
345
|
-
type: string[];
|
|
346
|
-
};
|
|
347
|
-
parameters: {
|
|
348
|
-
description: string;
|
|
349
|
-
type: string;
|
|
350
|
-
items: {
|
|
351
|
-
type: string;
|
|
352
|
-
properties: {
|
|
353
|
-
name: {
|
|
354
|
-
description: string;
|
|
355
|
-
type: string;
|
|
356
|
-
};
|
|
357
|
-
operation: {
|
|
358
|
-
description: string;
|
|
359
|
-
type: string;
|
|
360
|
-
enum: string[];
|
|
361
|
-
};
|
|
362
|
-
previousValue: {
|
|
363
|
-
description: string;
|
|
364
|
-
};
|
|
365
|
-
newValue: {
|
|
366
|
-
description: string;
|
|
367
|
-
};
|
|
368
|
-
};
|
|
369
|
-
required: string[];
|
|
370
|
-
};
|
|
371
|
-
};
|
|
372
|
-
};
|
|
373
|
-
required: string[];
|
|
374
|
-
additionalProperties: boolean;
|
|
375
|
-
};
|
|
376
|
-
declare const ValidateRequestDataSchema: {
|
|
377
|
-
$schema: string;
|
|
378
|
-
$id: string;
|
|
379
|
-
title: string;
|
|
380
|
-
type: string;
|
|
381
|
-
properties: {
|
|
382
|
-
configs: {
|
|
383
|
-
type: string;
|
|
384
|
-
items: {
|
|
385
|
-
$ref: string;
|
|
386
|
-
};
|
|
387
|
-
};
|
|
388
|
-
};
|
|
389
|
-
required: never[];
|
|
390
|
-
additionalProperties: boolean;
|
|
391
|
-
};
|
|
392
|
-
declare const ValidateResponseDataSchema: {
|
|
393
|
-
$schema: string;
|
|
394
|
-
$id: string;
|
|
395
|
-
title: string;
|
|
396
|
-
type: string;
|
|
397
|
-
properties: {
|
|
398
|
-
resourceValidations: {
|
|
399
|
-
type: string;
|
|
400
|
-
items: {
|
|
401
|
-
type: string;
|
|
402
|
-
properties: {
|
|
403
|
-
resourceType: {
|
|
404
|
-
type: string;
|
|
405
|
-
};
|
|
406
|
-
resourceName: {
|
|
407
|
-
type: string;
|
|
408
|
-
};
|
|
409
|
-
schemaValidationErrors: {
|
|
410
|
-
type: string;
|
|
411
|
-
description: string;
|
|
412
|
-
items: {
|
|
413
|
-
type: string;
|
|
414
|
-
};
|
|
415
|
-
};
|
|
416
|
-
customValidationErrorMessage: {
|
|
417
|
-
type: string;
|
|
418
|
-
description: string;
|
|
419
|
-
};
|
|
420
|
-
isValid: {
|
|
421
|
-
type: string;
|
|
422
|
-
description: string;
|
|
423
|
-
};
|
|
424
|
-
};
|
|
425
|
-
required: string[];
|
|
426
|
-
};
|
|
427
|
-
};
|
|
428
|
-
};
|
|
429
|
-
additionalProperties: boolean;
|
|
430
|
-
};
|
|
431
|
-
declare const InitializeRequestDataSchema: {
|
|
432
|
-
$schema: string;
|
|
433
|
-
$id: string;
|
|
434
|
-
title: string;
|
|
435
|
-
description: string;
|
|
436
|
-
type: string;
|
|
437
|
-
properties: {};
|
|
438
|
-
additionalProperties: boolean;
|
|
439
|
-
};
|
|
440
|
-
declare const InitializeResponseDataSchema: {
|
|
441
|
-
$schema: string;
|
|
442
|
-
$id: string;
|
|
443
|
-
title: string;
|
|
444
|
-
description: string;
|
|
445
|
-
type: string;
|
|
446
|
-
properties: {
|
|
447
|
-
resourceDefinitions: {
|
|
448
|
-
type: string;
|
|
449
|
-
items: {
|
|
450
|
-
type: string;
|
|
451
|
-
properties: {
|
|
452
|
-
type: {
|
|
453
|
-
type: string;
|
|
454
|
-
};
|
|
455
|
-
dependencies: {
|
|
456
|
-
type: string;
|
|
457
|
-
items: {
|
|
458
|
-
type: string;
|
|
459
|
-
};
|
|
460
|
-
};
|
|
461
|
-
};
|
|
462
|
-
required: string[];
|
|
463
|
-
};
|
|
464
|
-
};
|
|
465
|
-
};
|
|
466
|
-
required: string[];
|
|
467
|
-
};
|
|
468
|
-
declare const SudoRequestDataSchema: {
|
|
469
|
-
$schema: string;
|
|
470
|
-
$id: string;
|
|
471
|
-
title: string;
|
|
472
|
-
description: string;
|
|
473
|
-
type: string;
|
|
474
|
-
properties: {
|
|
475
|
-
command: {
|
|
476
|
-
type: string;
|
|
477
|
-
description: string;
|
|
478
|
-
};
|
|
479
|
-
options: {
|
|
480
|
-
type: string;
|
|
481
|
-
description: string;
|
|
482
|
-
properties: {
|
|
483
|
-
cwd: {
|
|
484
|
-
type: string;
|
|
485
|
-
description: string;
|
|
486
|
-
};
|
|
487
|
-
argv0: {
|
|
488
|
-
type: string;
|
|
489
|
-
description: string;
|
|
490
|
-
};
|
|
491
|
-
};
|
|
492
|
-
additionalProperties: boolean;
|
|
493
|
-
};
|
|
494
|
-
};
|
|
495
|
-
required: string[];
|
|
496
|
-
additionalProperties: boolean;
|
|
497
|
-
};
|
|
498
|
-
declare const SudoRequestResponseDataSchema: {
|
|
499
|
-
$schema: string;
|
|
500
|
-
$id: string;
|
|
501
|
-
title: string;
|
|
502
|
-
description: string;
|
|
503
|
-
type: string;
|
|
504
|
-
properties: {
|
|
505
|
-
status: {
|
|
506
|
-
enum: string[];
|
|
507
|
-
description: string;
|
|
508
|
-
};
|
|
509
|
-
data: {
|
|
510
|
-
type: string;
|
|
511
|
-
description: string;
|
|
512
|
-
};
|
|
513
|
-
};
|
|
514
|
-
required: string[];
|
|
515
|
-
additionalProperties: boolean;
|
|
516
|
-
};
|
|
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';
|
|
517
21
|
export { ConfigFileSchema, ProjectSchema, ResourceSchema, IpcMessageSchema, IpcMessageV2Schema, ApplyRequestDataSchema, ApplyResponseDataSchema, ErrorResponseDataSchema, GetResourceInfoRequestDataSchema, GetResourceInfoResponseDataSchema, ImportRequestDataSchema, ImportResponseDataSchema, PlanRequestDataSchema, PlanResponseDataSchema, ValidateRequestDataSchema, ValidateResponseDataSchema, InitializeRequestDataSchema, InitializeResponseDataSchema, SudoRequestDataSchema, SudoRequestResponseDataSchema, };
|
|
518
22
|
export * from './types/index.js';
|
|
519
23
|
export * from './messages/commands.js';
|
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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' };
|
|
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,
|
|
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,EAAE,MAAM,EAAC,CAAA;AACpG,OAAO,yBAAyB,MAAM,8CAA8C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAC1G,OAAO,0BAA0B,MAAM,+CAA+C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAC5G,OAAO,2BAA2B,MAAM,gDAAgD,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAC9G,OAAO,4BAA4B,MAAM,iDAAiD,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAChH,OAAO,qBAAqB,MAAM,0CAA0C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAC;AACnG,OAAO,6BAA6B,MAAM,2CAA2C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAC;AAE5G,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,gCAAgC,EAChC,iCAAiC,EACjC,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,EAC5B,qBAAqB,EACrB,6BAA6B,GAC9B,CAAA;AAED,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC"}
|
|
@@ -4,9 +4,12 @@
|
|
|
4
4
|
"title": "Import Request Schema Data",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
|
-
"
|
|
7
|
+
"core": {
|
|
8
8
|
"$ref": "resource-schema.json"
|
|
9
|
+
},
|
|
10
|
+
"parameters": {
|
|
11
|
+
"type": "object"
|
|
9
12
|
}
|
|
10
13
|
},
|
|
11
|
-
"required": ["
|
|
14
|
+
"required": ["core", "parameters"]
|
|
12
15
|
}
|
|
@@ -5,12 +5,28 @@
|
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"request": {
|
|
8
|
-
"
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"core": {
|
|
11
|
+
"$ref": "resource-schema.json"
|
|
12
|
+
},
|
|
13
|
+
"parameters": {
|
|
14
|
+
"type": "object"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
9
17
|
},
|
|
10
18
|
"result": {
|
|
11
19
|
"type": "array",
|
|
12
20
|
"items": {
|
|
13
|
-
"
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"core": {
|
|
24
|
+
"$ref": "resource-schema.json"
|
|
25
|
+
},
|
|
26
|
+
"parameters": {
|
|
27
|
+
"type": "object"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
14
30
|
}
|
|
15
31
|
}
|
|
16
32
|
},
|
|
@@ -4,11 +4,16 @@
|
|
|
4
4
|
"title": "Plan Request Schema Data",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
|
-
"
|
|
7
|
+
"core": {
|
|
8
8
|
"$ref": "resource-schema.json"
|
|
9
9
|
},
|
|
10
|
+
"desired": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"description": "The desired parameters specified by the user. A null desired means this config was not specified (for deletes). Pass an empty object {} for no parameters."
|
|
13
|
+
},
|
|
10
14
|
"state": {
|
|
11
|
-
"
|
|
15
|
+
"type": "object",
|
|
16
|
+
"description": "The desired parameters specified by the user. A null state means this config was not specified (non-stateful). Pass an empty object {} for no parameters."
|
|
12
17
|
},
|
|
13
18
|
"isStateful": {
|
|
14
19
|
"type": "boolean",
|
|
@@ -17,7 +22,7 @@
|
|
|
17
22
|
},
|
|
18
23
|
"additionalProperties": false,
|
|
19
24
|
"anyOf": [
|
|
20
|
-
{ "required": ["desired", "isStateful"] },
|
|
21
|
-
{ "required": ["state", "isStateful"] }
|
|
25
|
+
{ "required": ["core", "desired", "isStateful"] },
|
|
26
|
+
{ "required": ["core", "state", "isStateful"] }
|
|
22
27
|
]
|
|
23
28
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -31,8 +31,16 @@ export interface IpcMessageV2 {
|
|
|
31
31
|
status?: MessageStatus;
|
|
32
32
|
data: unknown | null;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Processed resource that is in a format suitable for sending. The core parameters (such as type and name) and other parameters
|
|
36
|
+
* are separate for easier processing.
|
|
37
|
+
*/
|
|
38
|
+
export interface ResourceJson {
|
|
39
|
+
core: ResourceConfig;
|
|
40
|
+
parameters: Record<string, unknown>;
|
|
41
|
+
}
|
|
34
42
|
export interface ValidateRequestData {
|
|
35
|
-
configs:
|
|
43
|
+
configs: Array<ResourceJson>;
|
|
36
44
|
}
|
|
37
45
|
export interface ValidateResponseData {
|
|
38
46
|
resourceValidations: Array<{
|
|
@@ -44,8 +52,9 @@ export interface ValidateResponseData {
|
|
|
44
52
|
}>;
|
|
45
53
|
}
|
|
46
54
|
export interface PlanRequestData {
|
|
47
|
-
|
|
48
|
-
|
|
55
|
+
core: ResourceConfig;
|
|
56
|
+
desired?: Record<string, unknown>;
|
|
57
|
+
state?: Record<string, unknown>;
|
|
49
58
|
isStateful: boolean;
|
|
50
59
|
}
|
|
51
60
|
export declare enum ResourceOperation {
|
|
@@ -87,11 +96,12 @@ export interface GetResourceInfoResponseData {
|
|
|
87
96
|
};
|
|
88
97
|
}
|
|
89
98
|
export interface ImportRequestData {
|
|
90
|
-
|
|
99
|
+
core: ResourceConfig;
|
|
100
|
+
parameters: Record<string, unknown>;
|
|
91
101
|
}
|
|
92
102
|
export interface ImportResponseData {
|
|
93
|
-
request:
|
|
94
|
-
result:
|
|
103
|
+
request: ResourceJson;
|
|
104
|
+
result: Array<ResourceJson>;
|
|
95
105
|
}
|
|
96
106
|
export interface ApplyRequestData {
|
|
97
107
|
planId?: string;
|
|
@@ -115,10 +125,7 @@ export interface ResourceDefinition {
|
|
|
115
125
|
export interface InitializeRequestData {
|
|
116
126
|
}
|
|
117
127
|
export interface InitializeResponseData {
|
|
118
|
-
resourceDefinitions: Array<
|
|
119
|
-
type: string;
|
|
120
|
-
dependencies: string[];
|
|
121
|
-
}>;
|
|
128
|
+
resourceDefinitions: Array<ResourceDefinition>;
|
|
122
129
|
}
|
|
123
130
|
export interface SudoRequestData {
|
|
124
131
|
command: string;
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAsBA,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,gCAAe,CAAA;AACjB,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAsBA,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,gCAAe,CAAA;AACjB,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AA6CD,MAAM,CAAN,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IACnB,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,kCAAa,CAAA;AACf,CAAC,EANW,iBAAiB,KAAjB,iBAAiB,QAM5B;AAED,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,iCAAW,CAAA;IACX,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;IACjB,mCAAa,CAAA;AACf,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B;AA0ED,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,8BAAe,CAAA;AACjB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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'};
|
|
21
21
|
|
|
22
22
|
export {
|
|
23
23
|
ConfigFileSchema,
|
|
@@ -4,9 +4,12 @@
|
|
|
4
4
|
"title": "Import Request Schema Data",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
|
-
"
|
|
7
|
+
"core": {
|
|
8
8
|
"$ref": "resource-schema.json"
|
|
9
|
+
},
|
|
10
|
+
"parameters": {
|
|
11
|
+
"type": "object"
|
|
9
12
|
}
|
|
10
13
|
},
|
|
11
|
-
"required": ["
|
|
14
|
+
"required": ["core", "parameters"]
|
|
12
15
|
}
|
|
@@ -17,30 +17,34 @@ describe('Import request data schema', () => {
|
|
|
17
17
|
it("Validates correct data", () => {
|
|
18
18
|
const validate = ajv.compile(schema);
|
|
19
19
|
expect(validate({
|
|
20
|
-
|
|
20
|
+
core: {
|
|
21
21
|
type: "type"
|
|
22
22
|
},
|
|
23
|
+
parameters: {},
|
|
23
24
|
})).to.be.true;
|
|
24
25
|
expect(validate({
|
|
25
|
-
|
|
26
|
+
core: {
|
|
26
27
|
type: "type",
|
|
27
28
|
name: "name",
|
|
29
|
+
},
|
|
30
|
+
parameters: {
|
|
28
31
|
propA: "a",
|
|
29
32
|
propB: { a: 'b' }
|
|
30
33
|
},
|
|
31
34
|
})).to.be.true;
|
|
32
35
|
expect(validate({
|
|
33
|
-
|
|
36
|
+
core: {
|
|
34
37
|
type: "type",
|
|
35
38
|
dependsOn: ["a", "b"]
|
|
36
39
|
},
|
|
40
|
+
parameters: {},
|
|
37
41
|
})).to.be.true;
|
|
38
42
|
})
|
|
39
43
|
|
|
40
44
|
it("Errors on incorrect data", () => {
|
|
41
45
|
const validate = ajv.compile(schema);
|
|
42
46
|
expect(validate({
|
|
43
|
-
|
|
47
|
+
core: {},
|
|
44
48
|
})).to.be.false;
|
|
45
49
|
expect(validate({})).to.be.false;
|
|
46
50
|
})
|
|
@@ -5,12 +5,28 @@
|
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"request": {
|
|
8
|
-
"
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"core": {
|
|
11
|
+
"$ref": "resource-schema.json"
|
|
12
|
+
},
|
|
13
|
+
"parameters": {
|
|
14
|
+
"type": "object"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
9
17
|
},
|
|
10
18
|
"result": {
|
|
11
19
|
"type": "array",
|
|
12
20
|
"items": {
|
|
13
|
-
"
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"core": {
|
|
24
|
+
"$ref": "resource-schema.json"
|
|
25
|
+
},
|
|
26
|
+
"parameters": {
|
|
27
|
+
"type": "object"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
14
30
|
}
|
|
15
31
|
}
|
|
16
32
|
},
|
|
@@ -4,11 +4,16 @@
|
|
|
4
4
|
"title": "Plan Request Schema Data",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
|
-
"
|
|
7
|
+
"core": {
|
|
8
8
|
"$ref": "resource-schema.json"
|
|
9
9
|
},
|
|
10
|
+
"desired": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"description": "The desired parameters specified by the user. A null desired means this config was not specified (for deletes). Pass an empty object {} for no parameters."
|
|
13
|
+
},
|
|
10
14
|
"state": {
|
|
11
|
-
"
|
|
15
|
+
"type": "object",
|
|
16
|
+
"description": "The desired parameters specified by the user. A null state means this config was not specified (non-stateful). Pass an empty object {} for no parameters."
|
|
12
17
|
},
|
|
13
18
|
"isStateful": {
|
|
14
19
|
"type": "boolean",
|
|
@@ -17,7 +22,7 @@
|
|
|
17
22
|
},
|
|
18
23
|
"additionalProperties": false,
|
|
19
24
|
"anyOf": [
|
|
20
|
-
{ "required": ["desired", "isStateful"] },
|
|
21
|
-
{ "required": ["state", "isStateful"] }
|
|
25
|
+
{ "required": ["core", "desired", "isStateful"] },
|
|
26
|
+
{ "required": ["core", "state", "isStateful"] }
|
|
22
27
|
]
|
|
23
28
|
}
|
|
@@ -17,23 +17,22 @@ describe('Plan request data schema', () => {
|
|
|
17
17
|
it("It accepts either state, desired or both", () => {
|
|
18
18
|
const validate = ajv.compile(schema);
|
|
19
19
|
expect(validate({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
20
|
+
core: { type: "type" },
|
|
21
|
+
desired: {},
|
|
23
22
|
isStateful: false
|
|
24
23
|
})).to.be.true;
|
|
25
24
|
expect(validate({
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
25
|
+
core: { type: "type" },
|
|
26
|
+
state: {},
|
|
29
27
|
isStateful: false
|
|
30
28
|
})).to.be.true;
|
|
31
29
|
expect(validate({
|
|
30
|
+
core: { type: "type" },
|
|
32
31
|
desired: {
|
|
33
|
-
|
|
32
|
+
parameter1: 'a'
|
|
34
33
|
},
|
|
35
34
|
state: {
|
|
36
|
-
|
|
35
|
+
parameter2: 'b'
|
|
37
36
|
},
|
|
38
37
|
isStateful: false
|
|
39
38
|
})).to.be.true;
|
|
@@ -43,22 +42,34 @@ describe('Plan request data schema', () => {
|
|
|
43
42
|
it ("name and type are alpha-numeric and follow variable naming conventions", () => {
|
|
44
43
|
const validate = ajv.compile(schema);
|
|
45
44
|
expect(validate({
|
|
46
|
-
|
|
45
|
+
core: { type: "a234abcDEF_-" },
|
|
46
|
+
desired: { },
|
|
47
47
|
isStateful: false
|
|
48
48
|
})).to.be.true;
|
|
49
|
+
|
|
49
50
|
expect(validate({
|
|
51
|
+
core: { type: "234" },
|
|
50
52
|
desired: { type: "234" },
|
|
51
53
|
isStateful: false
|
|
52
54
|
})).to.be.false;
|
|
55
|
+
|
|
53
56
|
expect(validate({
|
|
54
|
-
|
|
57
|
+
core: { type: "ABCDEF$" },
|
|
58
|
+
desired: { },
|
|
55
59
|
isStateful: false
|
|
56
60
|
})).to.be.false;
|
|
57
61
|
|
|
58
62
|
expect(validate({
|
|
59
|
-
|
|
63
|
+
core: { type: "type", name: "a234abcDEF_-" },
|
|
64
|
+
desired: { },
|
|
60
65
|
isStateful: false
|
|
61
66
|
})).to.be.true;
|
|
67
|
+
expect(validate({
|
|
68
|
+
core: { type: "type", name: "ABCDEF$" },
|
|
69
|
+
desired: {},
|
|
70
|
+
isStateful: false
|
|
71
|
+
})).to.be.false;
|
|
72
|
+
|
|
62
73
|
expect(validate({
|
|
63
74
|
desired: { type: "type", name: "ABCDEF$" },
|
|
64
75
|
isStateful: false
|
package/src/types/index.ts
CHANGED
|
@@ -38,8 +38,17 @@ export interface IpcMessageV2 {
|
|
|
38
38
|
data: unknown | null;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Processed resource that is in a format suitable for sending. The core parameters (such as type and name) and other parameters
|
|
43
|
+
* are separate for easier processing.
|
|
44
|
+
*/
|
|
45
|
+
export interface ResourceJson {
|
|
46
|
+
core: ResourceConfig;
|
|
47
|
+
parameters: Record<string, unknown>;
|
|
48
|
+
}
|
|
49
|
+
|
|
41
50
|
export interface ValidateRequestData {
|
|
42
|
-
configs:
|
|
51
|
+
configs: Array<ResourceJson>;
|
|
43
52
|
}
|
|
44
53
|
|
|
45
54
|
export interface ValidateResponseData {
|
|
@@ -53,8 +62,9 @@ export interface ValidateResponseData {
|
|
|
53
62
|
}
|
|
54
63
|
|
|
55
64
|
export interface PlanRequestData {
|
|
56
|
-
|
|
57
|
-
|
|
65
|
+
core: ResourceConfig;
|
|
66
|
+
desired?: Record<string, unknown>;
|
|
67
|
+
state?: Record<string, unknown>;
|
|
58
68
|
isStateful: boolean
|
|
59
69
|
}
|
|
60
70
|
|
|
@@ -102,12 +112,13 @@ export interface GetResourceInfoResponseData {
|
|
|
102
112
|
}
|
|
103
113
|
|
|
104
114
|
export interface ImportRequestData {
|
|
105
|
-
|
|
115
|
+
core: ResourceConfig;
|
|
116
|
+
parameters: Record<string, unknown>;
|
|
106
117
|
}
|
|
107
118
|
|
|
108
119
|
export interface ImportResponseData {
|
|
109
|
-
request:
|
|
110
|
-
result:
|
|
120
|
+
request: ResourceJson
|
|
121
|
+
result: Array<ResourceJson>,
|
|
111
122
|
}
|
|
112
123
|
|
|
113
124
|
export interface ApplyRequestData {
|
|
@@ -134,10 +145,7 @@ export interface ResourceDefinition {
|
|
|
134
145
|
export interface InitializeRequestData {}
|
|
135
146
|
|
|
136
147
|
export interface InitializeResponseData {
|
|
137
|
-
resourceDefinitions: Array<
|
|
138
|
-
type: string;
|
|
139
|
-
dependencies: string[];
|
|
140
|
-
}>;
|
|
148
|
+
resourceDefinitions: Array<ResourceDefinition>;
|
|
141
149
|
}
|
|
142
150
|
|
|
143
151
|
export interface SudoRequestData {
|