@hozu/cli 0.10.0 → 0.12.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 (126) hide show
  1. package/dist/commands/add-widget.d.ts.map +1 -1
  2. package/dist/commands/add-widget.js +5 -4
  3. package/dist/commands/add-widget.js.map +1 -1
  4. package/dist/commands/app.d.ts.map +1 -1
  5. package/dist/commands/app.js +10 -0
  6. package/dist/commands/app.js.map +1 -1
  7. package/dist/commands/build.d.ts.map +1 -1
  8. package/dist/commands/build.js +5 -1
  9. package/dist/commands/build.js.map +1 -1
  10. package/dist/commands/call.d.ts +16 -0
  11. package/dist/commands/call.d.ts.map +1 -0
  12. package/dist/commands/call.js +100 -0
  13. package/dist/commands/call.js.map +1 -0
  14. package/dist/commands/check.d.ts +10 -1
  15. package/dist/commands/check.d.ts.map +1 -1
  16. package/dist/commands/check.js +43 -28
  17. package/dist/commands/check.js.map +1 -1
  18. package/dist/commands/explain.d.ts.map +1 -1
  19. package/dist/commands/explain.js +2 -1
  20. package/dist/commands/explain.js.map +1 -1
  21. package/dist/commands/impact.js +1 -1
  22. package/dist/commands/impact.js.map +1 -1
  23. package/dist/commands/inspect.d.ts.map +1 -1
  24. package/dist/commands/inspect.js +9 -0
  25. package/dist/commands/inspect.js.map +1 -1
  26. package/dist/commands/map.d.ts.map +1 -1
  27. package/dist/commands/map.js +7 -2
  28. package/dist/commands/map.js.map +1 -1
  29. package/dist/commands/migrate.d.ts +17 -16
  30. package/dist/commands/migrate.d.ts.map +1 -1
  31. package/dist/commands/migrate.js +205 -297
  32. package/dist/commands/migrate.js.map +1 -1
  33. package/dist/commands/scaffold.d.ts.map +1 -1
  34. package/dist/commands/scaffold.js +8 -4
  35. package/dist/commands/scaffold.js.map +1 -1
  36. package/dist/contract.d.ts +84 -1
  37. package/dist/contract.d.ts.map +1 -1
  38. package/dist/load.d.ts +2 -1
  39. package/dist/load.d.ts.map +1 -1
  40. package/dist/load.js +5 -4
  41. package/dist/load.js.map +1 -1
  42. package/dist/main.d.ts.map +1 -1
  43. package/dist/main.js +33 -5
  44. package/dist/main.js.map +1 -1
  45. package/dist/migrate/ast.d.ts +31 -0
  46. package/dist/migrate/ast.d.ts.map +1 -0
  47. package/dist/migrate/ast.js +61 -0
  48. package/dist/migrate/ast.js.map +1 -0
  49. package/dist/migrate/record-ir.d.ts +2 -0
  50. package/dist/migrate/record-ir.d.ts.map +1 -0
  51. package/dist/migrate/record-ir.js +16 -0
  52. package/dist/migrate/record-ir.js.map +1 -0
  53. package/dist/migrate/step-0.11.d.ts +15 -0
  54. package/dist/migrate/step-0.11.d.ts.map +1 -0
  55. package/dist/migrate/step-0.11.js +88 -0
  56. package/dist/migrate/step-0.11.js.map +1 -0
  57. package/dist/migrate/step-0.12.d.ts +6 -0
  58. package/dist/migrate/step-0.12.d.ts.map +1 -0
  59. package/dist/migrate/step-0.12.js +14 -0
  60. package/dist/migrate/step-0.12.js.map +1 -0
  61. package/dist/migrate/steps.d.ts +28 -0
  62. package/dist/migrate/steps.d.ts.map +1 -0
  63. package/dist/migrate/steps.js +42 -0
  64. package/dist/migrate/steps.js.map +1 -0
  65. package/dist/output.d.ts.map +1 -1
  66. package/dist/output.js +2 -0
  67. package/dist/output.js.map +1 -1
  68. package/package.json +8 -8
  69. package/schema/call.schema.json +136 -0
  70. package/schema/check.schema.json +26 -2
  71. package/schema/explain.schema.json +14 -1
  72. package/schema/impact.schema.json +22 -1
  73. package/schema/inspect.schema.json +75 -4
  74. package/schema/map.schema.json +17 -0
  75. package/schema/migrate.schema.json +740 -0
  76. package/schema/plan.schema.json +4 -2
  77. package/schema/render.schema.json +3 -1
  78. package/schema/validate.schema.json +3 -1
  79. package/dist/commands/migrate-agent.d.ts +0 -12
  80. package/dist/commands/migrate-agent.d.ts.map +0 -1
  81. package/dist/commands/migrate-agent.js +0 -6
  82. package/dist/commands/migrate-agent.js.map +0 -1
  83. package/dist/commands/migrate-app.d.ts +0 -15
  84. package/dist/commands/migrate-app.d.ts.map +0 -1
  85. package/dist/commands/migrate-app.js +0 -334
  86. package/dist/commands/migrate-app.js.map +0 -1
  87. package/dist/commands/migrate-ast.d.ts +0 -63
  88. package/dist/commands/migrate-ast.d.ts.map +0 -1
  89. package/dist/commands/migrate-ast.js +0 -257
  90. package/dist/commands/migrate-ast.js.map +0 -1
  91. package/dist/commands/migrate-forms.d.ts +0 -4
  92. package/dist/commands/migrate-forms.d.ts.map +0 -1
  93. package/dist/commands/migrate-forms.js +0 -120
  94. package/dist/commands/migrate-forms.js.map +0 -1
  95. package/dist/commands/migrate-freshness.d.ts +0 -4
  96. package/dist/commands/migrate-freshness.d.ts.map +0 -1
  97. package/dist/commands/migrate-freshness.js +0 -47
  98. package/dist/commands/migrate-freshness.js.map +0 -1
  99. package/dist/commands/migrate-head.d.ts +0 -8
  100. package/dist/commands/migrate-head.d.ts.map +0 -1
  101. package/dist/commands/migrate-head.js +0 -132
  102. package/dist/commands/migrate-head.js.map +0 -1
  103. package/dist/commands/migrate-links.d.ts +0 -5
  104. package/dist/commands/migrate-links.d.ts.map +0 -1
  105. package/dist/commands/migrate-links.js +0 -55
  106. package/dist/commands/migrate-links.js.map +0 -1
  107. package/dist/commands/migrate-lists.d.ts +0 -9
  108. package/dist/commands/migrate-lists.d.ts.map +0 -1
  109. package/dist/commands/migrate-lists.js +0 -225
  110. package/dist/commands/migrate-lists.js.map +0 -1
  111. package/dist/commands/migrate-normalize.d.ts +0 -27
  112. package/dist/commands/migrate-normalize.d.ts.map +0 -1
  113. package/dist/commands/migrate-normalize.js +0 -252
  114. package/dist/commands/migrate-normalize.js.map +0 -1
  115. package/dist/commands/migrate-ops.d.ts +0 -4
  116. package/dist/commands/migrate-ops.d.ts.map +0 -1
  117. package/dist/commands/migrate-ops.js +0 -192
  118. package/dist/commands/migrate-ops.js.map +0 -1
  119. package/dist/commands/migrate-parts.d.ts +0 -7
  120. package/dist/commands/migrate-parts.d.ts.map +0 -1
  121. package/dist/commands/migrate-parts.js +0 -166
  122. package/dist/commands/migrate-parts.js.map +0 -1
  123. package/dist/commands/migrate-stale.d.ts +0 -24
  124. package/dist/commands/migrate-stale.d.ts.map +0 -1
  125. package/dist/commands/migrate-stale.js +0 -114
  126. package/dist/commands/migrate-stale.js.map +0 -1
@@ -0,0 +1,136 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/CallOutput",
4
+ "definitions": {
5
+ "CallOutput": {
6
+ "type": "object",
7
+ "properties": {
8
+ "effect": {
9
+ "type": "string"
10
+ },
11
+ "kind": {
12
+ "type": "string",
13
+ "enum": [
14
+ "query",
15
+ "mutation"
16
+ ]
17
+ },
18
+ "runs": {
19
+ "$ref": "#/definitions/Runs"
20
+ },
21
+ "input": {
22
+ "$ref": "#/definitions/Json"
23
+ },
24
+ "result": {
25
+ "anyOf": [
26
+ {
27
+ "type": "object",
28
+ "properties": {
29
+ "ok": {
30
+ "type": "boolean",
31
+ "const": true
32
+ },
33
+ "value": {
34
+ "$ref": "#/definitions/Json"
35
+ }
36
+ },
37
+ "required": [
38
+ "ok",
39
+ "value"
40
+ ],
41
+ "additionalProperties": false
42
+ },
43
+ {
44
+ "type": "object",
45
+ "properties": {
46
+ "ok": {
47
+ "type": "boolean",
48
+ "const": false
49
+ },
50
+ "error": {
51
+ "type": "string"
52
+ },
53
+ "data": {
54
+ "$ref": "#/definitions/Json"
55
+ }
56
+ },
57
+ "required": [
58
+ "ok",
59
+ "error",
60
+ "data"
61
+ ],
62
+ "additionalProperties": false
63
+ }
64
+ ]
65
+ },
66
+ "ms": {
67
+ "type": "number",
68
+ "description": "Milliseconds for the request."
69
+ },
70
+ "invalidated": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "string"
74
+ },
75
+ "description": "Tags a mutation invalidated."
76
+ },
77
+ "refreshes": {
78
+ "type": "array",
79
+ "items": {
80
+ "type": "string"
81
+ },
82
+ "description": "The queries those tags refresh."
83
+ }
84
+ },
85
+ "required": [
86
+ "effect",
87
+ "kind",
88
+ "runs",
89
+ "input",
90
+ "result",
91
+ "ms",
92
+ "invalidated",
93
+ "refreshes"
94
+ ],
95
+ "additionalProperties": false,
96
+ "description": "`hozu call` (ADR 0050 F): one query or mutation through the app's handler."
97
+ },
98
+ "Runs": {
99
+ "type": "string",
100
+ "enum": [
101
+ "server",
102
+ "browser",
103
+ "either"
104
+ ],
105
+ "description": "What an effect's implementation needs (ADR 0049): server secrets, browser credentials, or neither."
106
+ },
107
+ "Json": {
108
+ "anyOf": [
109
+ {
110
+ "type": "null"
111
+ },
112
+ {
113
+ "type": "boolean"
114
+ },
115
+ {
116
+ "type": "number"
117
+ },
118
+ {
119
+ "type": "string"
120
+ },
121
+ {
122
+ "type": "array",
123
+ "items": {
124
+ "$ref": "#/definitions/Json"
125
+ }
126
+ },
127
+ {
128
+ "type": "object",
129
+ "additionalProperties": {
130
+ "$ref": "#/definitions/Json"
131
+ }
132
+ }
133
+ ]
134
+ }
135
+ }
136
+ }
@@ -39,13 +39,35 @@
39
39
  "items": {
40
40
  "$ref": "#/definitions/CheckOverrides"
41
41
  }
42
+ },
43
+ "timings": {
44
+ "type": "object",
45
+ "properties": {
46
+ "types": {
47
+ "type": "number"
48
+ },
49
+ "load": {
50
+ "type": "number"
51
+ },
52
+ "validate": {
53
+ "type": "number"
54
+ }
55
+ },
56
+ "required": [
57
+ "types",
58
+ "load",
59
+ "validate"
60
+ ],
61
+ "additionalProperties": false,
62
+ "description": "Milliseconds; the type check runs in parallel with loading and validating (ADR 0050 D)."
42
63
  }
43
64
  },
44
65
  "required": [
45
66
  "ok",
46
67
  "types",
47
68
  "validate",
48
- "overrides"
69
+ "overrides",
70
+ "timings"
49
71
  ],
50
72
  "additionalProperties": false
51
73
  },
@@ -282,7 +304,9 @@
282
304
  "HZ077",
283
305
  "HZ078",
284
306
  "HZ079",
285
- "HZ080"
307
+ "HZ080",
308
+ "HZ081",
309
+ "HZ082"
286
310
  ]
287
311
  },
288
312
  "Severity": {
@@ -33,12 +33,16 @@
33
33
  "items": {
34
34
  "type": "string"
35
35
  }
36
+ },
37
+ "runs": {
38
+ "$ref": "#/definitions/Runs"
36
39
  }
37
40
  },
38
41
  "required": [
39
42
  "effect",
40
43
  "input",
41
- "errors"
44
+ "errors",
45
+ "runs"
42
46
  ],
43
47
  "additionalProperties": false
44
48
  },
@@ -78,6 +82,15 @@
78
82
  ],
79
83
  "additionalProperties": false
80
84
  },
85
+ "Runs": {
86
+ "type": "string",
87
+ "enum": [
88
+ "server",
89
+ "browser",
90
+ "either"
91
+ ],
92
+ "description": "What an effect's implementation needs (ADR 0049): server secrets, browser credentials, or neither."
93
+ },
81
94
  "ExplainTransition": {
82
95
  "type": "object",
83
96
  "properties": {
@@ -50,6 +50,17 @@
50
50
  "items": {
51
51
  "type": "string"
52
52
  }
53
+ },
54
+ "runs": {
55
+ "anyOf": [
56
+ {
57
+ "$ref": "#/definitions/Runs"
58
+ },
59
+ {
60
+ "type": "null"
61
+ }
62
+ ],
63
+ "description": "Where a query or mutation runs (ADR 0049); null for other symbols."
53
64
  }
54
65
  },
55
66
  "required": [
@@ -59,7 +70,8 @@
59
70
  "queries",
60
71
  "invalidatedBy",
61
72
  "uses",
62
- "features"
73
+ "features",
74
+ "runs"
63
75
  ],
64
76
  "additionalProperties": false
65
77
  },
@@ -118,6 +130,15 @@
118
130
  ],
119
131
  "additionalProperties": false
120
132
  },
133
+ "Runs": {
134
+ "type": "string",
135
+ "enum": [
136
+ "server",
137
+ "browser",
138
+ "either"
139
+ ],
140
+ "description": "What an effect's implementation needs (ADR 0049): server secrets, browser credentials, or neither."
141
+ },
121
142
  "ComponentImpact": {
122
143
  "type": "object",
123
144
  "properties": {
@@ -71,6 +71,38 @@
71
71
  },
72
72
  "exports": {
73
73
  "$ref": "#/definitions/ExportsIR"
74
+ },
75
+ "effects": {
76
+ "type": "object",
77
+ "additionalProperties": {
78
+ "type": "object",
79
+ "properties": {
80
+ "kind": {
81
+ "type": "string",
82
+ "enum": [
83
+ "query",
84
+ "mutation"
85
+ ]
86
+ },
87
+ "runs": {
88
+ "$ref": "#/definitions/Runs"
89
+ },
90
+ "implemented": {
91
+ "type": "string",
92
+ "enum": [
93
+ "resolver",
94
+ "fetch.ts"
95
+ ]
96
+ }
97
+ },
98
+ "required": [
99
+ "kind",
100
+ "runs",
101
+ "implemented"
102
+ ],
103
+ "additionalProperties": false
104
+ },
105
+ "description": "Each query and mutation: where it runs and where it is implemented (ADR 0049)."
74
106
  }
75
107
  },
76
108
  "required": [
@@ -83,7 +115,8 @@
83
115
  "contracts",
84
116
  "hydrates",
85
117
  "imports",
86
- "exports"
118
+ "exports",
119
+ "effects"
87
120
  ],
88
121
  "additionalProperties": false
89
122
  },
@@ -144,6 +177,15 @@
144
177
  ],
145
178
  "additionalProperties": false
146
179
  },
180
+ "Runs": {
181
+ "type": "string",
182
+ "enum": [
183
+ "server",
184
+ "browser",
185
+ "either"
186
+ ],
187
+ "description": "What an effect's implementation needs (ADR 0049): server secrets, browser credentials, or neither."
188
+ },
147
189
  "FeatureIR": {
148
190
  "type": "object",
149
191
  "properties": {
@@ -241,6 +283,26 @@
241
283
  "type": "null"
242
284
  }
243
285
  ]
286
+ },
287
+ "fetch": {
288
+ "anyOf": [
289
+ {
290
+ "type": "object",
291
+ "properties": {
292
+ "sourceHash": {
293
+ "type": "string"
294
+ }
295
+ },
296
+ "required": [
297
+ "sourceHash"
298
+ ],
299
+ "additionalProperties": false
300
+ },
301
+ {
302
+ "type": "null"
303
+ }
304
+ ],
305
+ "description": "The feature's `fetch.ts` (ADR 0049): implementations of its `'either'` / `'browser'` effects."
244
306
  }
245
307
  },
246
308
  "required": [
@@ -259,7 +321,8 @@
259
321
  "components",
260
322
  "endpoints",
261
323
  "contracts",
262
- "messages"
324
+ "messages",
325
+ "fetch"
263
326
  ],
264
327
  "additionalProperties": false
265
328
  },
@@ -369,6 +432,9 @@
369
432
  "items": {
370
433
  "$ref": "#/definitions/TagExprIR"
371
434
  }
435
+ },
436
+ "runs": {
437
+ "$ref": "#/definitions/Runs"
372
438
  }
373
439
  },
374
440
  "required": [
@@ -377,7 +443,8 @@
377
443
  "errors",
378
444
  "scope",
379
445
  "freshness",
380
- "tags"
446
+ "tags",
447
+ "runs"
381
448
  ],
382
449
  "additionalProperties": false
383
450
  },
@@ -780,13 +847,17 @@
780
847
  "items": {
781
848
  "$ref": "#/definitions/TagExprIR"
782
849
  }
850
+ },
851
+ "runs": {
852
+ "$ref": "#/definitions/Runs"
783
853
  }
784
854
  },
785
855
  "required": [
786
856
  "input",
787
857
  "output",
788
858
  "errors",
789
- "invalidates"
859
+ "invalidates",
860
+ "runs"
790
861
  ],
791
862
  "additionalProperties": false
792
863
  },
@@ -165,6 +165,10 @@
165
165
  "type": "string"
166
166
  }
167
167
  },
168
+ "runs": {
169
+ "type": "string",
170
+ "description": "Where it runs (ADR 0049): 'server', 'browser' or 'either'."
171
+ },
168
172
  "at": {
169
173
  "type": [
170
174
  "string",
@@ -178,6 +182,7 @@
178
182
  "freshness",
179
183
  "errors",
180
184
  "tags",
185
+ "runs",
181
186
  "at"
182
187
  ],
183
188
  "additionalProperties": false
@@ -203,6 +208,9 @@
203
208
  "type": "string"
204
209
  }
205
210
  },
211
+ "runs": {
212
+ "type": "string"
213
+ },
206
214
  "at": {
207
215
  "type": [
208
216
  "string",
@@ -214,11 +222,19 @@
214
222
  "name",
215
223
  "errors",
216
224
  "invalidates",
225
+ "runs",
217
226
  "at"
218
227
  ],
219
228
  "additionalProperties": false
220
229
  }
221
230
  },
231
+ "fetch": {
232
+ "type": [
233
+ "string",
234
+ "null"
235
+ ],
236
+ "description": "The feature's fetch.ts (ADR 0049), when it has one."
237
+ },
222
238
  "endpoints": {
223
239
  "type": "array",
224
240
  "items": {
@@ -374,6 +390,7 @@
374
390
  "id",
375
391
  "queries",
376
392
  "mutations",
393
+ "fetch",
377
394
  "endpoints",
378
395
  "events",
379
396
  "fns",