@hozu/cli 0.1.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.
Files changed (76) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +15 -0
  3. package/bin/hozu.js +4 -0
  4. package/dist/commands/build.d.ts +4 -0
  5. package/dist/commands/build.d.ts.map +1 -0
  6. package/dist/commands/build.js +81 -0
  7. package/dist/commands/build.js.map +1 -0
  8. package/dist/commands/explain.d.ts +5 -0
  9. package/dist/commands/explain.d.ts.map +1 -0
  10. package/dist/commands/explain.js +135 -0
  11. package/dist/commands/explain.js.map +1 -0
  12. package/dist/commands/graph.d.ts +7 -0
  13. package/dist/commands/graph.d.ts.map +1 -0
  14. package/dist/commands/graph.js +137 -0
  15. package/dist/commands/graph.js.map +1 -0
  16. package/dist/commands/impact.d.ts +5 -0
  17. package/dist/commands/impact.d.ts.map +1 -0
  18. package/dist/commands/impact.js +27 -0
  19. package/dist/commands/impact.js.map +1 -0
  20. package/dist/commands/inspect.d.ts +4 -0
  21. package/dist/commands/inspect.d.ts.map +1 -0
  22. package/dist/commands/inspect.js +31 -0
  23. package/dist/commands/inspect.js.map +1 -0
  24. package/dist/commands/plan.d.ts +5 -0
  25. package/dist/commands/plan.d.ts.map +1 -0
  26. package/dist/commands/plan.js +30 -0
  27. package/dist/commands/plan.js.map +1 -0
  28. package/dist/commands/skill.d.ts +3 -0
  29. package/dist/commands/skill.d.ts.map +1 -0
  30. package/dist/commands/skill.js +27 -0
  31. package/dist/commands/skill.js.map +1 -0
  32. package/dist/commands/validate.d.ts +4 -0
  33. package/dist/commands/validate.d.ts.map +1 -0
  34. package/dist/commands/validate.js +96 -0
  35. package/dist/commands/validate.js.map +1 -0
  36. package/dist/contract.d.ts +107 -0
  37. package/dist/contract.d.ts.map +1 -0
  38. package/dist/contract.js +2 -0
  39. package/dist/contract.js.map +1 -0
  40. package/dist/errors.d.ts +8 -0
  41. package/dist/errors.d.ts.map +1 -0
  42. package/dist/errors.js +13 -0
  43. package/dist/errors.js.map +1 -0
  44. package/dist/index.d.ts +4 -0
  45. package/dist/index.d.ts.map +1 -0
  46. package/dist/index.js +3 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/load.d.ts +9 -0
  49. package/dist/load.d.ts.map +1 -0
  50. package/dist/load.js +52 -0
  51. package/dist/load.js.map +1 -0
  52. package/dist/main.d.ts +2 -0
  53. package/dist/main.d.ts.map +1 -0
  54. package/dist/main.js +120 -0
  55. package/dist/main.js.map +1 -0
  56. package/dist/output.d.ts +5 -0
  57. package/dist/output.d.ts.map +1 -0
  58. package/dist/output.js +28 -0
  59. package/dist/output.js.map +1 -0
  60. package/dist/render.d.ts +5 -0
  61. package/dist/render.d.ts.map +1 -0
  62. package/dist/render.js +47 -0
  63. package/dist/render.js.map +1 -0
  64. package/dist/styles.d.ts +3 -0
  65. package/dist/styles.d.ts.map +1 -0
  66. package/dist/styles.js +41 -0
  67. package/dist/styles.js.map +1 -0
  68. package/package.json +54 -0
  69. package/schema/build.schema.json +29 -0
  70. package/schema/explain.schema.json +158 -0
  71. package/schema/graph.schema.json +109 -0
  72. package/schema/impact.schema.json +115 -0
  73. package/schema/inspect.schema.json +1658 -0
  74. package/schema/plan.schema.json +177 -0
  75. package/schema/skill.schema.json +21 -0
  76. package/schema/validate.schema.json +337 -0
@@ -0,0 +1,1658 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/InspectOutput",
4
+ "definitions": {
5
+ "InspectOutput": {
6
+ "type": "object",
7
+ "properties": {
8
+ "feature": {
9
+ "type": "string"
10
+ },
11
+ "hash": {
12
+ "type": "string"
13
+ },
14
+ "summary": {
15
+ "$ref": "#/definitions/InspectSummary"
16
+ },
17
+ "ir": {
18
+ "$ref": "#/definitions/FeatureIR"
19
+ }
20
+ },
21
+ "required": [
22
+ "feature",
23
+ "hash",
24
+ "summary",
25
+ "ir"
26
+ ],
27
+ "additionalProperties": false
28
+ },
29
+ "InspectSummary": {
30
+ "type": "object",
31
+ "properties": {
32
+ "states": {
33
+ "type": "number"
34
+ },
35
+ "transitions": {
36
+ "type": "number"
37
+ },
38
+ "events": {
39
+ "type": "number"
40
+ },
41
+ "queries": {
42
+ "type": "number"
43
+ },
44
+ "mutations": {
45
+ "type": "number"
46
+ },
47
+ "views": {
48
+ "type": "number"
49
+ },
50
+ "contracts": {
51
+ "type": "number"
52
+ },
53
+ "hydrates": {
54
+ "type": "boolean"
55
+ },
56
+ "imports": {
57
+ "type": "array",
58
+ "items": {
59
+ "type": "string"
60
+ }
61
+ },
62
+ "exports": {
63
+ "$ref": "#/definitions/ExportsIR"
64
+ }
65
+ },
66
+ "required": [
67
+ "states",
68
+ "transitions",
69
+ "events",
70
+ "queries",
71
+ "mutations",
72
+ "views",
73
+ "contracts",
74
+ "hydrates",
75
+ "imports",
76
+ "exports"
77
+ ],
78
+ "additionalProperties": false
79
+ },
80
+ "ExportsIR": {
81
+ "type": "object",
82
+ "properties": {
83
+ "events": {
84
+ "type": "array",
85
+ "items": {
86
+ "type": "string"
87
+ }
88
+ },
89
+ "queries": {
90
+ "type": "array",
91
+ "items": {
92
+ "type": "string"
93
+ }
94
+ },
95
+ "mutations": {
96
+ "type": "array",
97
+ "items": {
98
+ "type": "string"
99
+ }
100
+ },
101
+ "tags": {
102
+ "type": "array",
103
+ "items": {
104
+ "type": "string"
105
+ }
106
+ },
107
+ "fns": {
108
+ "type": "array",
109
+ "items": {
110
+ "type": "string"
111
+ }
112
+ },
113
+ "views": {
114
+ "type": "array",
115
+ "items": {
116
+ "type": "string"
117
+ }
118
+ }
119
+ },
120
+ "required": [
121
+ "events",
122
+ "queries",
123
+ "mutations",
124
+ "tags",
125
+ "fns",
126
+ "views"
127
+ ],
128
+ "additionalProperties": false
129
+ },
130
+ "FeatureIR": {
131
+ "type": "object",
132
+ "properties": {
133
+ "id": {
134
+ "type": "string"
135
+ },
136
+ "intent": {
137
+ "$ref": "#/definitions/IntentIR"
138
+ },
139
+ "imports": {
140
+ "type": "array",
141
+ "items": {
142
+ "type": "string"
143
+ }
144
+ },
145
+ "exports": {
146
+ "$ref": "#/definitions/ExportsIR"
147
+ },
148
+ "schemas": {
149
+ "type": "object",
150
+ "additionalProperties": {
151
+ "$ref": "#/definitions/JsonSchema"
152
+ }
153
+ },
154
+ "tags": {
155
+ "type": "object",
156
+ "additionalProperties": {
157
+ "$ref": "#/definitions/TagIR"
158
+ }
159
+ },
160
+ "events": {
161
+ "type": "object",
162
+ "additionalProperties": {
163
+ "$ref": "#/definitions/EventIR"
164
+ }
165
+ },
166
+ "queries": {
167
+ "type": "object",
168
+ "additionalProperties": {
169
+ "$ref": "#/definitions/QueryIR"
170
+ }
171
+ },
172
+ "mutations": {
173
+ "type": "object",
174
+ "additionalProperties": {
175
+ "$ref": "#/definitions/MutationIR"
176
+ }
177
+ },
178
+ "fns": {
179
+ "type": "object",
180
+ "additionalProperties": {
181
+ "$ref": "#/definitions/FnIR"
182
+ }
183
+ },
184
+ "machine": {
185
+ "anyOf": [
186
+ {
187
+ "$ref": "#/definitions/MachineIR"
188
+ },
189
+ {
190
+ "type": "null"
191
+ }
192
+ ]
193
+ },
194
+ "views": {
195
+ "type": "object",
196
+ "additionalProperties": {
197
+ "$ref": "#/definitions/ViewIR"
198
+ }
199
+ },
200
+ "widgets": {
201
+ "type": "object",
202
+ "additionalProperties": {
203
+ "$ref": "#/definitions/WidgetIR"
204
+ }
205
+ },
206
+ "contracts": {
207
+ "type": "object",
208
+ "additionalProperties": {
209
+ "$ref": "#/definitions/ContractIR"
210
+ }
211
+ },
212
+ "messages": {
213
+ "anyOf": [
214
+ {
215
+ "$ref": "#/definitions/MessagesIR"
216
+ },
217
+ {
218
+ "type": "null"
219
+ }
220
+ ]
221
+ }
222
+ },
223
+ "required": [
224
+ "id",
225
+ "intent",
226
+ "imports",
227
+ "exports",
228
+ "schemas",
229
+ "tags",
230
+ "events",
231
+ "queries",
232
+ "mutations",
233
+ "fns",
234
+ "machine",
235
+ "views",
236
+ "widgets",
237
+ "contracts",
238
+ "messages"
239
+ ],
240
+ "additionalProperties": false
241
+ },
242
+ "IntentIR": {
243
+ "type": "object",
244
+ "properties": {
245
+ "summary": {
246
+ "type": "string"
247
+ },
248
+ "invariants": {
249
+ "type": "array",
250
+ "items": {
251
+ "type": "string"
252
+ }
253
+ }
254
+ },
255
+ "required": [
256
+ "summary",
257
+ "invariants"
258
+ ],
259
+ "additionalProperties": false
260
+ },
261
+ "JsonSchema": {
262
+ "type": "object",
263
+ "additionalProperties": {
264
+ "$ref": "#/definitions/Json"
265
+ }
266
+ },
267
+ "Json": {
268
+ "anyOf": [
269
+ {
270
+ "type": "null"
271
+ },
272
+ {
273
+ "type": "boolean"
274
+ },
275
+ {
276
+ "type": "number"
277
+ },
278
+ {
279
+ "type": "string"
280
+ },
281
+ {
282
+ "type": "array",
283
+ "items": {
284
+ "$ref": "#/definitions/Json"
285
+ }
286
+ },
287
+ {
288
+ "type": "object",
289
+ "additionalProperties": {
290
+ "$ref": "#/definitions/Json"
291
+ }
292
+ }
293
+ ]
294
+ },
295
+ "TagIR": {
296
+ "type": "object",
297
+ "properties": {
298
+ "param": {
299
+ "type": [
300
+ "string",
301
+ "null"
302
+ ]
303
+ }
304
+ },
305
+ "required": [
306
+ "param"
307
+ ],
308
+ "additionalProperties": false
309
+ },
310
+ "EventIR": {
311
+ "type": "object",
312
+ "properties": {
313
+ "payload": {
314
+ "type": "string"
315
+ }
316
+ },
317
+ "required": [
318
+ "payload"
319
+ ],
320
+ "additionalProperties": false
321
+ },
322
+ "QueryIR": {
323
+ "type": "object",
324
+ "properties": {
325
+ "input": {
326
+ "type": "string"
327
+ },
328
+ "output": {
329
+ "type": "string"
330
+ },
331
+ "errors": {
332
+ "type": "object",
333
+ "additionalProperties": {
334
+ "type": "string"
335
+ }
336
+ },
337
+ "scope": {
338
+ "$ref": "#/definitions/Scope"
339
+ },
340
+ "freshness": {
341
+ "$ref": "#/definitions/Freshness"
342
+ },
343
+ "tags": {
344
+ "type": "array",
345
+ "items": {
346
+ "$ref": "#/definitions/TagExprIR"
347
+ }
348
+ }
349
+ },
350
+ "required": [
351
+ "input",
352
+ "output",
353
+ "errors",
354
+ "scope",
355
+ "freshness",
356
+ "tags"
357
+ ],
358
+ "additionalProperties": false
359
+ },
360
+ "Scope": {
361
+ "type": "string",
362
+ "enum": [
363
+ "public",
364
+ "user"
365
+ ]
366
+ },
367
+ "Freshness": {
368
+ "anyOf": [
369
+ {
370
+ "type": "object",
371
+ "properties": {
372
+ "kind": {
373
+ "type": "string",
374
+ "const": "static"
375
+ }
376
+ },
377
+ "required": [
378
+ "kind"
379
+ ],
380
+ "additionalProperties": false
381
+ },
382
+ {
383
+ "type": "object",
384
+ "properties": {
385
+ "kind": {
386
+ "type": "string",
387
+ "const": "revalidate"
388
+ },
389
+ "seconds": {
390
+ "type": "number"
391
+ }
392
+ },
393
+ "required": [
394
+ "kind",
395
+ "seconds"
396
+ ],
397
+ "additionalProperties": false
398
+ },
399
+ {
400
+ "type": "object",
401
+ "properties": {
402
+ "kind": {
403
+ "type": "string",
404
+ "const": "swr"
405
+ },
406
+ "seconds": {
407
+ "type": "number"
408
+ }
409
+ },
410
+ "required": [
411
+ "kind",
412
+ "seconds"
413
+ ],
414
+ "additionalProperties": false
415
+ },
416
+ {
417
+ "type": "object",
418
+ "properties": {
419
+ "kind": {
420
+ "type": "string",
421
+ "const": "live"
422
+ }
423
+ },
424
+ "required": [
425
+ "kind"
426
+ ],
427
+ "additionalProperties": false
428
+ }
429
+ ]
430
+ },
431
+ "TagExprIR": {
432
+ "type": "object",
433
+ "properties": {
434
+ "tag": {
435
+ "type": "string"
436
+ },
437
+ "param": {
438
+ "anyOf": [
439
+ {
440
+ "$ref": "#/definitions/ValueExpr"
441
+ },
442
+ {
443
+ "type": "null"
444
+ }
445
+ ]
446
+ }
447
+ },
448
+ "required": [
449
+ "tag",
450
+ "param"
451
+ ],
452
+ "additionalProperties": false
453
+ },
454
+ "ValueExpr": {
455
+ "anyOf": [
456
+ {
457
+ "type": "object",
458
+ "properties": {
459
+ "ref": {
460
+ "$ref": "#/definitions/RefSource"
461
+ },
462
+ "path": {
463
+ "type": "array",
464
+ "items": {
465
+ "type": "string"
466
+ }
467
+ }
468
+ },
469
+ "required": [
470
+ "ref",
471
+ "path"
472
+ ],
473
+ "additionalProperties": false
474
+ },
475
+ {
476
+ "type": "object",
477
+ "properties": {
478
+ "ref": {
479
+ "type": "string",
480
+ "const": "binding"
481
+ },
482
+ "depth": {
483
+ "type": "number"
484
+ },
485
+ "path": {
486
+ "type": "array",
487
+ "items": {
488
+ "type": "string"
489
+ }
490
+ }
491
+ },
492
+ "required": [
493
+ "ref",
494
+ "depth",
495
+ "path"
496
+ ],
497
+ "additionalProperties": false
498
+ },
499
+ {
500
+ "type": "object",
501
+ "properties": {
502
+ "literal": {
503
+ "$ref": "#/definitions/Json"
504
+ }
505
+ },
506
+ "required": [
507
+ "literal"
508
+ ],
509
+ "additionalProperties": false
510
+ },
511
+ {
512
+ "type": "object",
513
+ "properties": {
514
+ "object": {
515
+ "type": "object",
516
+ "additionalProperties": {
517
+ "$ref": "#/definitions/ValueExpr"
518
+ }
519
+ }
520
+ },
521
+ "required": [
522
+ "object"
523
+ ],
524
+ "additionalProperties": false
525
+ },
526
+ {
527
+ "type": "object",
528
+ "properties": {
529
+ "fn": {
530
+ "type": "string"
531
+ },
532
+ "arg": {
533
+ "$ref": "#/definitions/ValueExpr"
534
+ }
535
+ },
536
+ "required": [
537
+ "fn",
538
+ "arg"
539
+ ],
540
+ "additionalProperties": false
541
+ },
542
+ {
543
+ "type": "object",
544
+ "properties": {
545
+ "test": {
546
+ "$ref": "#/definitions/GuardExpr"
547
+ }
548
+ },
549
+ "required": [
550
+ "test"
551
+ ],
552
+ "additionalProperties": false
553
+ },
554
+ {
555
+ "type": "object",
556
+ "properties": {
557
+ "link": {
558
+ "type": "string"
559
+ },
560
+ "params": {
561
+ "$ref": "#/definitions/ValueExpr"
562
+ },
563
+ "search": {
564
+ "$ref": "#/definitions/ValueExpr"
565
+ }
566
+ },
567
+ "required": [
568
+ "link",
569
+ "params",
570
+ "search"
571
+ ],
572
+ "additionalProperties": false
573
+ }
574
+ ]
575
+ },
576
+ "RefSource": {
577
+ "type": "string",
578
+ "enum": [
579
+ "context",
580
+ "event",
581
+ "result",
582
+ "error",
583
+ "input",
584
+ "params",
585
+ "search",
586
+ "dom",
587
+ "locale",
588
+ "alternate",
589
+ "env"
590
+ ]
591
+ },
592
+ "GuardExpr": {
593
+ "anyOf": [
594
+ {
595
+ "type": "object",
596
+ "properties": {
597
+ "op": {
598
+ "$ref": "#/definitions/CompareOp"
599
+ },
600
+ "left": {
601
+ "$ref": "#/definitions/ValueExpr"
602
+ },
603
+ "right": {
604
+ "$ref": "#/definitions/ValueExpr"
605
+ }
606
+ },
607
+ "required": [
608
+ "op",
609
+ "left",
610
+ "right"
611
+ ],
612
+ "additionalProperties": false
613
+ },
614
+ {
615
+ "type": "object",
616
+ "properties": {
617
+ "op": {
618
+ "type": "string",
619
+ "enum": [
620
+ "and",
621
+ "or"
622
+ ]
623
+ },
624
+ "args": {
625
+ "type": "array",
626
+ "items": {
627
+ "$ref": "#/definitions/GuardExpr"
628
+ }
629
+ }
630
+ },
631
+ "required": [
632
+ "op",
633
+ "args"
634
+ ],
635
+ "additionalProperties": false
636
+ },
637
+ {
638
+ "type": "object",
639
+ "properties": {
640
+ "op": {
641
+ "type": "string",
642
+ "const": "not"
643
+ },
644
+ "arg": {
645
+ "$ref": "#/definitions/GuardExpr"
646
+ }
647
+ },
648
+ "required": [
649
+ "op",
650
+ "arg"
651
+ ],
652
+ "additionalProperties": false
653
+ },
654
+ {
655
+ "type": "object",
656
+ "properties": {
657
+ "op": {
658
+ "type": "string",
659
+ "const": "fn"
660
+ },
661
+ "fn": {
662
+ "type": "string"
663
+ },
664
+ "arg": {
665
+ "$ref": "#/definitions/ValueExpr"
666
+ }
667
+ },
668
+ "required": [
669
+ "op",
670
+ "fn",
671
+ "arg"
672
+ ],
673
+ "additionalProperties": false
674
+ }
675
+ ]
676
+ },
677
+ "CompareOp": {
678
+ "type": "string",
679
+ "enum": [
680
+ "eq",
681
+ "neq",
682
+ "lt",
683
+ "lte",
684
+ "gt",
685
+ "gte"
686
+ ]
687
+ },
688
+ "MutationIR": {
689
+ "type": "object",
690
+ "properties": {
691
+ "input": {
692
+ "type": "string"
693
+ },
694
+ "output": {
695
+ "type": "string"
696
+ },
697
+ "errors": {
698
+ "type": "object",
699
+ "additionalProperties": {
700
+ "type": "string"
701
+ }
702
+ },
703
+ "invalidates": {
704
+ "type": "array",
705
+ "items": {
706
+ "$ref": "#/definitions/TagExprIR"
707
+ }
708
+ }
709
+ },
710
+ "required": [
711
+ "input",
712
+ "output",
713
+ "errors",
714
+ "invalidates"
715
+ ],
716
+ "additionalProperties": false
717
+ },
718
+ "FnIR": {
719
+ "type": "object",
720
+ "properties": {
721
+ "input": {
722
+ "type": "string"
723
+ },
724
+ "output": {
725
+ "type": "string"
726
+ },
727
+ "sourceHash": {
728
+ "type": "string"
729
+ }
730
+ },
731
+ "required": [
732
+ "input",
733
+ "output",
734
+ "sourceHash"
735
+ ],
736
+ "additionalProperties": false
737
+ },
738
+ "MachineIR": {
739
+ "type": "object",
740
+ "properties": {
741
+ "context": {
742
+ "type": "string"
743
+ },
744
+ "initialContext": {
745
+ "$ref": "#/definitions/Json"
746
+ },
747
+ "initial": {
748
+ "type": "string"
749
+ },
750
+ "states": {
751
+ "type": "object",
752
+ "additionalProperties": {
753
+ "$ref": "#/definitions/StateIR"
754
+ }
755
+ }
756
+ },
757
+ "required": [
758
+ "context",
759
+ "initialContext",
760
+ "initial",
761
+ "states"
762
+ ],
763
+ "additionalProperties": false
764
+ },
765
+ "StateIR": {
766
+ "type": "object",
767
+ "properties": {
768
+ "final": {
769
+ "type": "boolean"
770
+ },
771
+ "on": {
772
+ "type": "object",
773
+ "additionalProperties": {
774
+ "type": "array",
775
+ "items": {
776
+ "$ref": "#/definitions/TransitionIR"
777
+ }
778
+ }
779
+ },
780
+ "ignore": {
781
+ "type": "array",
782
+ "items": {
783
+ "type": "string"
784
+ }
785
+ },
786
+ "invoke": {
787
+ "anyOf": [
788
+ {
789
+ "$ref": "#/definitions/InvokeIR"
790
+ },
791
+ {
792
+ "type": "null"
793
+ }
794
+ ]
795
+ },
796
+ "after": {
797
+ "type": "array",
798
+ "items": {
799
+ "$ref": "#/definitions/AfterIR"
800
+ }
801
+ }
802
+ },
803
+ "required": [
804
+ "final",
805
+ "on",
806
+ "ignore",
807
+ "invoke",
808
+ "after"
809
+ ],
810
+ "additionalProperties": false
811
+ },
812
+ "TransitionIR": {
813
+ "type": "object",
814
+ "properties": {
815
+ "guard": {
816
+ "anyOf": [
817
+ {
818
+ "$ref": "#/definitions/GuardExpr"
819
+ },
820
+ {
821
+ "type": "null"
822
+ }
823
+ ]
824
+ },
825
+ "target": {
826
+ "type": "string"
827
+ },
828
+ "assign": {
829
+ "type": "array",
830
+ "items": {
831
+ "$ref": "#/definitions/AssignOp"
832
+ }
833
+ },
834
+ "navigate": {
835
+ "anyOf": [
836
+ {
837
+ "$ref": "#/definitions/ValueExpr"
838
+ },
839
+ {
840
+ "type": "null"
841
+ }
842
+ ]
843
+ }
844
+ },
845
+ "required": [
846
+ "guard",
847
+ "target",
848
+ "assign",
849
+ "navigate"
850
+ ],
851
+ "additionalProperties": false
852
+ },
853
+ "AssignOp": {
854
+ "anyOf": [
855
+ {
856
+ "type": "object",
857
+ "properties": {
858
+ "op": {
859
+ "type": "string",
860
+ "enum": [
861
+ "set",
862
+ "append",
863
+ "inc"
864
+ ]
865
+ },
866
+ "path": {
867
+ "type": "array",
868
+ "items": {
869
+ "type": "string"
870
+ }
871
+ },
872
+ "value": {
873
+ "$ref": "#/definitions/ValueExpr"
874
+ }
875
+ },
876
+ "required": [
877
+ "op",
878
+ "path",
879
+ "value"
880
+ ],
881
+ "additionalProperties": false
882
+ },
883
+ {
884
+ "type": "object",
885
+ "properties": {
886
+ "op": {
887
+ "type": "string",
888
+ "const": "removeWhere"
889
+ },
890
+ "path": {
891
+ "type": "array",
892
+ "items": {
893
+ "type": "string"
894
+ }
895
+ },
896
+ "key": {
897
+ "type": "string"
898
+ },
899
+ "value": {
900
+ "$ref": "#/definitions/ValueExpr"
901
+ }
902
+ },
903
+ "required": [
904
+ "op",
905
+ "path",
906
+ "key",
907
+ "value"
908
+ ],
909
+ "additionalProperties": false
910
+ }
911
+ ]
912
+ },
913
+ "InvokeIR": {
914
+ "type": "object",
915
+ "properties": {
916
+ "effect": {
917
+ "type": "string"
918
+ },
919
+ "input": {
920
+ "$ref": "#/definitions/ValueExpr"
921
+ },
922
+ "done": {
923
+ "type": "array",
924
+ "items": {
925
+ "$ref": "#/definitions/TransitionIR"
926
+ }
927
+ },
928
+ "failed": {
929
+ "type": "object",
930
+ "additionalProperties": {
931
+ "type": "array",
932
+ "items": {
933
+ "$ref": "#/definitions/TransitionIR"
934
+ }
935
+ }
936
+ }
937
+ },
938
+ "required": [
939
+ "effect",
940
+ "input",
941
+ "done",
942
+ "failed"
943
+ ],
944
+ "additionalProperties": false
945
+ },
946
+ "AfterIR": {
947
+ "type": "object",
948
+ "properties": {
949
+ "ms": {
950
+ "type": "number"
951
+ },
952
+ "transition": {
953
+ "$ref": "#/definitions/TransitionIR"
954
+ }
955
+ },
956
+ "required": [
957
+ "ms",
958
+ "transition"
959
+ ],
960
+ "additionalProperties": false
961
+ },
962
+ "ViewIR": {
963
+ "type": "object",
964
+ "properties": {
965
+ "machine": {
966
+ "type": [
967
+ "string",
968
+ "null"
969
+ ]
970
+ },
971
+ "route": {
972
+ "type": [
973
+ "string",
974
+ "null"
975
+ ]
976
+ },
977
+ "root": {
978
+ "$ref": "#/definitions/ViewNode"
979
+ }
980
+ },
981
+ "required": [
982
+ "machine",
983
+ "route",
984
+ "root"
985
+ ],
986
+ "additionalProperties": false
987
+ },
988
+ "ViewNode": {
989
+ "anyOf": [
990
+ {
991
+ "$ref": "#/definitions/ElementNode"
992
+ },
993
+ {
994
+ "$ref": "#/definitions/TextNode"
995
+ },
996
+ {
997
+ "$ref": "#/definitions/WhenNode"
998
+ },
999
+ {
1000
+ "$ref": "#/definitions/IfNode"
1001
+ },
1002
+ {
1003
+ "$ref": "#/definitions/EachNode"
1004
+ },
1005
+ {
1006
+ "$ref": "#/definitions/QueryNode"
1007
+ },
1008
+ {
1009
+ "$ref": "#/definitions/EmbedNode"
1010
+ },
1011
+ {
1012
+ "$ref": "#/definitions/WidgetNode"
1013
+ },
1014
+ {
1015
+ "$ref": "#/definitions/GlobalNode"
1016
+ },
1017
+ {
1018
+ "$ref": "#/definitions/HtmlNode"
1019
+ }
1020
+ ]
1021
+ },
1022
+ "ElementNode": {
1023
+ "type": "object",
1024
+ "properties": {
1025
+ "id": {
1026
+ "type": "string"
1027
+ },
1028
+ "kind": {
1029
+ "type": "string",
1030
+ "const": "el"
1031
+ },
1032
+ "tag": {
1033
+ "type": "string"
1034
+ },
1035
+ "class": {
1036
+ "type": [
1037
+ "string",
1038
+ "null"
1039
+ ]
1040
+ },
1041
+ "toggle": {
1042
+ "type": "object",
1043
+ "additionalProperties": {
1044
+ "$ref": "#/definitions/ValueExpr"
1045
+ }
1046
+ },
1047
+ "vars": {
1048
+ "type": "object",
1049
+ "additionalProperties": {
1050
+ "$ref": "#/definitions/ValueExpr"
1051
+ }
1052
+ },
1053
+ "attrs": {
1054
+ "type": "object",
1055
+ "additionalProperties": {
1056
+ "$ref": "#/definitions/ValueExpr"
1057
+ }
1058
+ },
1059
+ "on": {
1060
+ "type": "object",
1061
+ "additionalProperties": {
1062
+ "$ref": "#/definitions/SendIR"
1063
+ }
1064
+ },
1065
+ "children": {
1066
+ "type": "array",
1067
+ "items": {
1068
+ "$ref": "#/definitions/ViewNode"
1069
+ }
1070
+ }
1071
+ },
1072
+ "required": [
1073
+ "id",
1074
+ "kind",
1075
+ "tag",
1076
+ "class",
1077
+ "toggle",
1078
+ "vars",
1079
+ "attrs",
1080
+ "on",
1081
+ "children"
1082
+ ],
1083
+ "additionalProperties": false
1084
+ },
1085
+ "SendIR": {
1086
+ "type": "object",
1087
+ "properties": {
1088
+ "event": {
1089
+ "type": "string"
1090
+ },
1091
+ "payload": {
1092
+ "$ref": "#/definitions/ValueExpr"
1093
+ }
1094
+ },
1095
+ "required": [
1096
+ "event",
1097
+ "payload"
1098
+ ],
1099
+ "additionalProperties": false
1100
+ },
1101
+ "TextNode": {
1102
+ "type": "object",
1103
+ "properties": {
1104
+ "id": {
1105
+ "type": "string"
1106
+ },
1107
+ "kind": {
1108
+ "type": "string",
1109
+ "const": "text"
1110
+ },
1111
+ "value": {
1112
+ "$ref": "#/definitions/ValueExpr"
1113
+ }
1114
+ },
1115
+ "required": [
1116
+ "id",
1117
+ "kind",
1118
+ "value"
1119
+ ],
1120
+ "additionalProperties": false
1121
+ },
1122
+ "WhenNode": {
1123
+ "type": "object",
1124
+ "properties": {
1125
+ "id": {
1126
+ "type": "string"
1127
+ },
1128
+ "kind": {
1129
+ "type": "string",
1130
+ "const": "when"
1131
+ },
1132
+ "states": {
1133
+ "type": "array",
1134
+ "items": {
1135
+ "type": "string"
1136
+ }
1137
+ },
1138
+ "motion": {
1139
+ "type": [
1140
+ "string",
1141
+ "null"
1142
+ ]
1143
+ },
1144
+ "children": {
1145
+ "type": "array",
1146
+ "items": {
1147
+ "$ref": "#/definitions/ViewNode"
1148
+ }
1149
+ }
1150
+ },
1151
+ "required": [
1152
+ "id",
1153
+ "kind",
1154
+ "states",
1155
+ "motion",
1156
+ "children"
1157
+ ],
1158
+ "additionalProperties": false
1159
+ },
1160
+ "IfNode": {
1161
+ "type": "object",
1162
+ "properties": {
1163
+ "id": {
1164
+ "type": "string"
1165
+ },
1166
+ "kind": {
1167
+ "type": "string",
1168
+ "const": "if"
1169
+ },
1170
+ "test": {
1171
+ "$ref": "#/definitions/GuardExpr"
1172
+ },
1173
+ "motion": {
1174
+ "type": [
1175
+ "string",
1176
+ "null"
1177
+ ]
1178
+ },
1179
+ "ifTrue": {
1180
+ "type": "array",
1181
+ "items": {
1182
+ "$ref": "#/definitions/ViewNode"
1183
+ }
1184
+ },
1185
+ "ifFalse": {
1186
+ "type": "array",
1187
+ "items": {
1188
+ "$ref": "#/definitions/ViewNode"
1189
+ }
1190
+ }
1191
+ },
1192
+ "required": [
1193
+ "id",
1194
+ "kind",
1195
+ "test",
1196
+ "motion",
1197
+ "ifTrue",
1198
+ "ifFalse"
1199
+ ],
1200
+ "additionalProperties": false
1201
+ },
1202
+ "EachNode": {
1203
+ "type": "object",
1204
+ "properties": {
1205
+ "id": {
1206
+ "type": "string"
1207
+ },
1208
+ "kind": {
1209
+ "type": "string",
1210
+ "const": "each"
1211
+ },
1212
+ "source": {
1213
+ "$ref": "#/definitions/ValueExpr"
1214
+ },
1215
+ "key": {
1216
+ "type": [
1217
+ "string",
1218
+ "null"
1219
+ ]
1220
+ },
1221
+ "motion": {
1222
+ "type": [
1223
+ "string",
1224
+ "null"
1225
+ ]
1226
+ },
1227
+ "item": {
1228
+ "$ref": "#/definitions/ViewNode"
1229
+ }
1230
+ },
1231
+ "required": [
1232
+ "id",
1233
+ "kind",
1234
+ "source",
1235
+ "key",
1236
+ "motion",
1237
+ "item"
1238
+ ],
1239
+ "additionalProperties": false
1240
+ },
1241
+ "QueryNode": {
1242
+ "type": "object",
1243
+ "properties": {
1244
+ "id": {
1245
+ "type": "string"
1246
+ },
1247
+ "kind": {
1248
+ "type": "string",
1249
+ "const": "query"
1250
+ },
1251
+ "query": {
1252
+ "type": "string"
1253
+ },
1254
+ "input": {
1255
+ "$ref": "#/definitions/ValueExpr"
1256
+ },
1257
+ "ready": {
1258
+ "$ref": "#/definitions/ViewNode"
1259
+ },
1260
+ "pending": {
1261
+ "anyOf": [
1262
+ {
1263
+ "$ref": "#/definitions/ViewNode"
1264
+ },
1265
+ {
1266
+ "type": "null"
1267
+ }
1268
+ ]
1269
+ },
1270
+ "failed": {
1271
+ "type": "object",
1272
+ "additionalProperties": {
1273
+ "$ref": "#/definitions/ViewNode"
1274
+ }
1275
+ }
1276
+ },
1277
+ "required": [
1278
+ "id",
1279
+ "kind",
1280
+ "query",
1281
+ "input",
1282
+ "ready",
1283
+ "pending",
1284
+ "failed"
1285
+ ],
1286
+ "additionalProperties": false
1287
+ },
1288
+ "EmbedNode": {
1289
+ "type": "object",
1290
+ "properties": {
1291
+ "id": {
1292
+ "type": "string"
1293
+ },
1294
+ "kind": {
1295
+ "type": "string",
1296
+ "const": "embed"
1297
+ },
1298
+ "view": {
1299
+ "type": "string"
1300
+ }
1301
+ },
1302
+ "required": [
1303
+ "id",
1304
+ "kind",
1305
+ "view"
1306
+ ],
1307
+ "additionalProperties": false
1308
+ },
1309
+ "WidgetNode": {
1310
+ "type": "object",
1311
+ "properties": {
1312
+ "id": {
1313
+ "type": "string"
1314
+ },
1315
+ "kind": {
1316
+ "type": "string",
1317
+ "const": "widget"
1318
+ },
1319
+ "widget": {
1320
+ "type": "string"
1321
+ },
1322
+ "class": {
1323
+ "type": [
1324
+ "string",
1325
+ "null"
1326
+ ]
1327
+ },
1328
+ "toggle": {
1329
+ "type": "object",
1330
+ "additionalProperties": {
1331
+ "$ref": "#/definitions/ValueExpr"
1332
+ }
1333
+ },
1334
+ "vars": {
1335
+ "type": "object",
1336
+ "additionalProperties": {
1337
+ "$ref": "#/definitions/ValueExpr"
1338
+ }
1339
+ },
1340
+ "props": {
1341
+ "$ref": "#/definitions/ValueExpr"
1342
+ },
1343
+ "on": {
1344
+ "type": "object",
1345
+ "additionalProperties": {
1346
+ "$ref": "#/definitions/SendIR"
1347
+ }
1348
+ },
1349
+ "children": {
1350
+ "type": "array",
1351
+ "items": {
1352
+ "$ref": "#/definitions/ViewNode"
1353
+ }
1354
+ }
1355
+ },
1356
+ "required": [
1357
+ "id",
1358
+ "kind",
1359
+ "widget",
1360
+ "class",
1361
+ "toggle",
1362
+ "vars",
1363
+ "props",
1364
+ "on",
1365
+ "children"
1366
+ ],
1367
+ "additionalProperties": false
1368
+ },
1369
+ "GlobalNode": {
1370
+ "type": "object",
1371
+ "properties": {
1372
+ "id": {
1373
+ "type": "string"
1374
+ },
1375
+ "kind": {
1376
+ "type": "string",
1377
+ "const": "global"
1378
+ },
1379
+ "target": {
1380
+ "type": "string",
1381
+ "enum": [
1382
+ "window",
1383
+ "document"
1384
+ ]
1385
+ },
1386
+ "on": {
1387
+ "type": "object",
1388
+ "additionalProperties": {
1389
+ "$ref": "#/definitions/SendIR"
1390
+ }
1391
+ }
1392
+ },
1393
+ "required": [
1394
+ "id",
1395
+ "kind",
1396
+ "target",
1397
+ "on"
1398
+ ],
1399
+ "additionalProperties": false
1400
+ },
1401
+ "HtmlNode": {
1402
+ "type": "object",
1403
+ "properties": {
1404
+ "id": {
1405
+ "type": "string"
1406
+ },
1407
+ "kind": {
1408
+ "type": "string",
1409
+ "const": "html"
1410
+ },
1411
+ "value": {
1412
+ "$ref": "#/definitions/ValueExpr"
1413
+ }
1414
+ },
1415
+ "required": [
1416
+ "id",
1417
+ "kind",
1418
+ "value"
1419
+ ],
1420
+ "additionalProperties": false
1421
+ },
1422
+ "WidgetIR": {
1423
+ "type": "object",
1424
+ "properties": {
1425
+ "tag": {
1426
+ "type": "string"
1427
+ },
1428
+ "props": {
1429
+ "type": "string"
1430
+ },
1431
+ "events": {
1432
+ "type": "object",
1433
+ "additionalProperties": {
1434
+ "type": "string"
1435
+ }
1436
+ },
1437
+ "load": {
1438
+ "type": "string",
1439
+ "enum": [
1440
+ "eager",
1441
+ "visible",
1442
+ "idle"
1443
+ ]
1444
+ },
1445
+ "wraps": {
1446
+ "type": "boolean"
1447
+ },
1448
+ "sourceHash": {
1449
+ "type": "string"
1450
+ }
1451
+ },
1452
+ "required": [
1453
+ "tag",
1454
+ "props",
1455
+ "events",
1456
+ "load",
1457
+ "wraps",
1458
+ "sourceHash"
1459
+ ],
1460
+ "additionalProperties": false
1461
+ },
1462
+ "ContractIR": {
1463
+ "type": "object",
1464
+ "properties": {
1465
+ "given": {
1466
+ "type": "object",
1467
+ "properties": {
1468
+ "state": {
1469
+ "type": "string"
1470
+ },
1471
+ "context": {
1472
+ "$ref": "#/definitions/Json"
1473
+ }
1474
+ },
1475
+ "required": [
1476
+ "state",
1477
+ "context"
1478
+ ],
1479
+ "additionalProperties": false
1480
+ },
1481
+ "when": {
1482
+ "type": "array",
1483
+ "items": {
1484
+ "$ref": "#/definitions/StepIR"
1485
+ }
1486
+ },
1487
+ "expect": {
1488
+ "$ref": "#/definitions/ExpectIR"
1489
+ }
1490
+ },
1491
+ "required": [
1492
+ "given",
1493
+ "when",
1494
+ "expect"
1495
+ ],
1496
+ "additionalProperties": false
1497
+ },
1498
+ "StepIR": {
1499
+ "anyOf": [
1500
+ {
1501
+ "type": "object",
1502
+ "properties": {
1503
+ "send": {
1504
+ "type": "string"
1505
+ },
1506
+ "payload": {
1507
+ "$ref": "#/definitions/Json"
1508
+ }
1509
+ },
1510
+ "required": [
1511
+ "send",
1512
+ "payload"
1513
+ ],
1514
+ "additionalProperties": false
1515
+ },
1516
+ {
1517
+ "type": "object",
1518
+ "properties": {
1519
+ "done": {
1520
+ "type": "string"
1521
+ },
1522
+ "result": {
1523
+ "$ref": "#/definitions/Json"
1524
+ }
1525
+ },
1526
+ "required": [
1527
+ "done",
1528
+ "result"
1529
+ ],
1530
+ "additionalProperties": false
1531
+ },
1532
+ {
1533
+ "type": "object",
1534
+ "properties": {
1535
+ "failed": {
1536
+ "type": "string"
1537
+ },
1538
+ "error": {
1539
+ "type": "string"
1540
+ },
1541
+ "data": {
1542
+ "$ref": "#/definitions/Json"
1543
+ }
1544
+ },
1545
+ "required": [
1546
+ "failed",
1547
+ "error",
1548
+ "data"
1549
+ ],
1550
+ "additionalProperties": false
1551
+ },
1552
+ {
1553
+ "type": "object",
1554
+ "properties": {
1555
+ "elapse": {
1556
+ "type": "number"
1557
+ }
1558
+ },
1559
+ "required": [
1560
+ "elapse"
1561
+ ],
1562
+ "additionalProperties": false
1563
+ }
1564
+ ]
1565
+ },
1566
+ "ExpectIR": {
1567
+ "type": "object",
1568
+ "properties": {
1569
+ "state": {
1570
+ "type": "string"
1571
+ },
1572
+ "context": {
1573
+ "anyOf": [
1574
+ {
1575
+ "$ref": "#/definitions/Json"
1576
+ },
1577
+ {
1578
+ "type": "null"
1579
+ }
1580
+ ]
1581
+ },
1582
+ "effects": {
1583
+ "anyOf": [
1584
+ {
1585
+ "type": "array",
1586
+ "items": {
1587
+ "$ref": "#/definitions/EffectCallIR"
1588
+ }
1589
+ },
1590
+ {
1591
+ "type": "null"
1592
+ }
1593
+ ]
1594
+ }
1595
+ },
1596
+ "required": [
1597
+ "state",
1598
+ "context",
1599
+ "effects"
1600
+ ],
1601
+ "additionalProperties": false
1602
+ },
1603
+ "EffectCallIR": {
1604
+ "anyOf": [
1605
+ {
1606
+ "type": "object",
1607
+ "properties": {
1608
+ "effect": {
1609
+ "type": "string"
1610
+ },
1611
+ "input": {
1612
+ "$ref": "#/definitions/Json"
1613
+ }
1614
+ },
1615
+ "required": [
1616
+ "effect",
1617
+ "input"
1618
+ ],
1619
+ "additionalProperties": false
1620
+ },
1621
+ {
1622
+ "type": "object",
1623
+ "properties": {
1624
+ "navigate": {
1625
+ "type": "string"
1626
+ }
1627
+ },
1628
+ "required": [
1629
+ "navigate"
1630
+ ],
1631
+ "additionalProperties": false
1632
+ }
1633
+ ]
1634
+ },
1635
+ "MessagesIR": {
1636
+ "type": "object",
1637
+ "properties": {
1638
+ "base": {
1639
+ "type": "string"
1640
+ },
1641
+ "text": {
1642
+ "type": "object",
1643
+ "additionalProperties": {
1644
+ "type": "object",
1645
+ "additionalProperties": {
1646
+ "type": "string"
1647
+ }
1648
+ }
1649
+ }
1650
+ },
1651
+ "required": [
1652
+ "base",
1653
+ "text"
1654
+ ],
1655
+ "additionalProperties": false
1656
+ }
1657
+ }
1658
+ }