@hozu/cli 0.8.0 → 0.9.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 (98) hide show
  1. package/dist/commands/add-component.d.ts +5 -0
  2. package/dist/commands/add-component.d.ts.map +1 -0
  3. package/dist/commands/add-component.js +125 -0
  4. package/dist/commands/add-component.js.map +1 -0
  5. package/dist/commands/add-kit.d.ts +2 -0
  6. package/dist/commands/add-kit.d.ts.map +1 -0
  7. package/dist/commands/add-kit.js +20 -0
  8. package/dist/commands/add-kit.js.map +1 -0
  9. package/dist/commands/add.d.ts +1 -0
  10. package/dist/commands/add.d.ts.map +1 -1
  11. package/dist/commands/add.js +1 -1
  12. package/dist/commands/add.js.map +1 -1
  13. package/dist/commands/app.d.ts +1 -1
  14. package/dist/commands/app.d.ts.map +1 -1
  15. package/dist/commands/app.js +8 -8
  16. package/dist/commands/app.js.map +1 -1
  17. package/dist/commands/browse-page.js +9 -9
  18. package/dist/commands/browse-tab.d.ts +1 -1
  19. package/dist/commands/browse-tab.d.ts.map +1 -1
  20. package/dist/commands/browse-tab.js +1 -1
  21. package/dist/commands/browse-tab.js.map +1 -1
  22. package/dist/commands/browse-world.js +2 -2
  23. package/dist/commands/browse-world.js.map +1 -1
  24. package/dist/commands/browse.d.ts.map +1 -1
  25. package/dist/commands/browse.js +7 -7
  26. package/dist/commands/browse.js.map +1 -1
  27. package/dist/commands/build.js +8 -8
  28. package/dist/commands/build.js.map +1 -1
  29. package/dist/commands/check.d.ts.map +1 -1
  30. package/dist/commands/check.js +11 -2
  31. package/dist/commands/check.js.map +1 -1
  32. package/dist/commands/components.d.ts +21 -0
  33. package/dist/commands/components.d.ts.map +1 -0
  34. package/dist/commands/components.js +143 -0
  35. package/dist/commands/components.js.map +1 -0
  36. package/dist/commands/docs.d.ts +2 -2
  37. package/dist/commands/docs.d.ts.map +1 -1
  38. package/dist/commands/docs.js +15 -3
  39. package/dist/commands/docs.js.map +1 -1
  40. package/dist/commands/explain.js +1 -1
  41. package/dist/commands/explain.js.map +1 -1
  42. package/dist/commands/graph.js +2 -2
  43. package/dist/commands/graph.js.map +1 -1
  44. package/dist/commands/impact.d.ts +3 -2
  45. package/dist/commands/impact.d.ts.map +1 -1
  46. package/dist/commands/impact.js +8 -3
  47. package/dist/commands/impact.js.map +1 -1
  48. package/dist/commands/inspect.d.ts +1 -1
  49. package/dist/commands/inspect.d.ts.map +1 -1
  50. package/dist/commands/inspect.js +7 -1
  51. package/dist/commands/inspect.js.map +1 -1
  52. package/dist/commands/kits.d.ts +16 -0
  53. package/dist/commands/kits.d.ts.map +1 -0
  54. package/dist/commands/kits.js +172 -0
  55. package/dist/commands/kits.js.map +1 -0
  56. package/dist/commands/map.d.ts.map +1 -1
  57. package/dist/commands/map.js +18 -2
  58. package/dist/commands/map.js.map +1 -1
  59. package/dist/commands/render.d.ts +10 -0
  60. package/dist/commands/render.d.ts.map +1 -0
  61. package/dist/commands/render.js +79 -0
  62. package/dist/commands/render.js.map +1 -0
  63. package/dist/commands/serve.js +3 -3
  64. package/dist/commands/serve.js.map +1 -1
  65. package/dist/commands/validate.d.ts.map +1 -1
  66. package/dist/commands/validate.js +5 -4
  67. package/dist/commands/validate.js.map +1 -1
  68. package/dist/contract.d.ts +80 -45
  69. package/dist/contract.d.ts.map +1 -1
  70. package/dist/index.d.ts +1 -0
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/index.js +1 -0
  73. package/dist/index.js.map +1 -1
  74. package/dist/main.d.ts.map +1 -1
  75. package/dist/main.js +69 -25
  76. package/dist/main.js.map +1 -1
  77. package/dist/output.d.ts.map +1 -1
  78. package/dist/output.js +12 -1
  79. package/dist/output.js.map +1 -1
  80. package/dist/styles.d.ts +12 -1
  81. package/dist/styles.d.ts.map +1 -1
  82. package/dist/styles.js +19 -9
  83. package/dist/styles.js.map +1 -1
  84. package/dist/uses.d.ts +6 -0
  85. package/dist/uses.d.ts.map +1 -0
  86. package/dist/uses.js +72 -0
  87. package/dist/uses.js.map +1 -0
  88. package/package.json +7 -7
  89. package/schema/browse.schema.json +4 -4
  90. package/schema/check.schema.json +87 -2
  91. package/schema/docs-components.schema.json +197 -0
  92. package/schema/impact.schema.json +107 -1
  93. package/schema/inspect.schema.json +227 -21
  94. package/schema/map.schema.json +28 -0
  95. package/schema/render.schema.json +333 -0
  96. package/schema/skill.schema.json +1 -1
  97. package/schema/validate.schema.json +12 -1
  98. package/schema/migrate.schema.json +0 -649
@@ -3,7 +3,14 @@
3
3
  "$ref": "#/definitions/ImpactOutput",
4
4
  "definitions": {
5
5
  "ImpactOutput": {
6
- "$ref": "#/definitions/Impact"
6
+ "anyOf": [
7
+ {
8
+ "$ref": "#/definitions/Impact"
9
+ },
10
+ {
11
+ "$ref": "#/definitions/ComponentImpact"
12
+ }
13
+ ]
7
14
  },
8
15
  "Impact": {
9
16
  "type": "object",
@@ -110,6 +117,105 @@
110
117
  "via"
111
118
  ],
112
119
  "additionalProperties": false
120
+ },
121
+ "ComponentImpact": {
122
+ "type": "object",
123
+ "properties": {
124
+ "target": {
125
+ "type": "string"
126
+ },
127
+ "kind": {
128
+ "type": "string",
129
+ "const": "component"
130
+ },
131
+ "owner": {
132
+ "$ref": "#/definitions/ComponentOwner"
133
+ },
134
+ "uses": {
135
+ "type": "array",
136
+ "items": {
137
+ "$ref": "#/definitions/ComponentUseSite"
138
+ }
139
+ },
140
+ "features": {
141
+ "type": "array",
142
+ "items": {
143
+ "type": "string"
144
+ }
145
+ }
146
+ },
147
+ "required": [
148
+ "target",
149
+ "kind",
150
+ "owner",
151
+ "uses",
152
+ "features"
153
+ ],
154
+ "additionalProperties": false
155
+ },
156
+ "ComponentOwner": {
157
+ "type": "object",
158
+ "properties": {
159
+ "kind": {
160
+ "type": "string",
161
+ "enum": [
162
+ "kit",
163
+ "feature"
164
+ ]
165
+ },
166
+ "id": {
167
+ "type": "string"
168
+ }
169
+ },
170
+ "required": [
171
+ "kind",
172
+ "id"
173
+ ],
174
+ "additionalProperties": false
175
+ },
176
+ "ComponentUseSite": {
177
+ "type": "object",
178
+ "properties": {
179
+ "feature": {
180
+ "type": "string"
181
+ },
182
+ "node": {
183
+ "type": "string"
184
+ },
185
+ "at": {
186
+ "type": [
187
+ "string",
188
+ "null"
189
+ ]
190
+ },
191
+ "variant": {
192
+ "type": "object",
193
+ "additionalProperties": {
194
+ "type": "string"
195
+ }
196
+ },
197
+ "added": {
198
+ "type": "array",
199
+ "items": {
200
+ "type": "string"
201
+ }
202
+ },
203
+ "overrides": {
204
+ "type": "array",
205
+ "items": {
206
+ "type": "string"
207
+ }
208
+ }
209
+ },
210
+ "required": [
211
+ "feature",
212
+ "node",
213
+ "at",
214
+ "variant",
215
+ "added",
216
+ "overrides"
217
+ ],
218
+ "additionalProperties": false
113
219
  }
114
220
  }
115
221
  }
@@ -3,6 +3,16 @@
3
3
  "$ref": "#/definitions/InspectOutput",
4
4
  "definitions": {
5
5
  "InspectOutput": {
6
+ "anyOf": [
7
+ {
8
+ "$ref": "#/definitions/InspectFeatureOutput"
9
+ },
10
+ {
11
+ "$ref": "#/definitions/InspectComponentOutput"
12
+ }
13
+ ]
14
+ },
15
+ "InspectFeatureOutput": {
6
16
  "type": "object",
7
17
  "properties": {
8
18
  "feature": {
@@ -204,10 +214,10 @@
204
214
  "$ref": "#/definitions/ViewIR"
205
215
  }
206
216
  },
207
- "widgets": {
217
+ "components": {
208
218
  "type": "object",
209
219
  "additionalProperties": {
210
- "$ref": "#/definitions/WidgetIR"
220
+ "$ref": "#/definitions/ComponentIR"
211
221
  }
212
222
  },
213
223
  "endpoints": {
@@ -246,7 +256,7 @@
246
256
  "fns",
247
257
  "machine",
248
258
  "views",
249
- "widgets",
259
+ "components",
250
260
  "endpoints",
251
261
  "contracts",
252
262
  "messages"
@@ -1091,7 +1101,7 @@
1091
1101
  "$ref": "#/definitions/EmbedNode"
1092
1102
  },
1093
1103
  {
1094
- "$ref": "#/definitions/WidgetNode"
1104
+ "$ref": "#/definitions/ComponentNode"
1095
1105
  },
1096
1106
  {
1097
1107
  "$ref": "#/definitions/GlobalNode"
@@ -1152,6 +1162,9 @@
1152
1162
  },
1153
1163
  "ref": {
1154
1164
  "$ref": "#/definitions/FormRefIR"
1165
+ },
1166
+ "use": {
1167
+ "$ref": "#/definitions/UseIR"
1155
1168
  }
1156
1169
  },
1157
1170
  "required": [
@@ -1183,6 +1196,39 @@
1183
1196
  ],
1184
1197
  "additionalProperties": false
1185
1198
  },
1199
+ "UseIR": {
1200
+ "type": "object",
1201
+ "properties": {
1202
+ "component": {
1203
+ "type": "string"
1204
+ },
1205
+ "variant": {
1206
+ "type": "object",
1207
+ "additionalProperties": {
1208
+ "type": "string"
1209
+ }
1210
+ },
1211
+ "added": {
1212
+ "type": "array",
1213
+ "items": {
1214
+ "type": "string"
1215
+ }
1216
+ },
1217
+ "overrides": {
1218
+ "type": "array",
1219
+ "items": {
1220
+ "type": "string"
1221
+ }
1222
+ }
1223
+ },
1224
+ "required": [
1225
+ "component",
1226
+ "variant",
1227
+ "added",
1228
+ "overrides"
1229
+ ],
1230
+ "additionalProperties": false
1231
+ },
1186
1232
  "TextNode": {
1187
1233
  "type": "object",
1188
1234
  "properties": {
@@ -1391,7 +1437,7 @@
1391
1437
  ],
1392
1438
  "additionalProperties": false
1393
1439
  },
1394
- "WidgetNode": {
1440
+ "ComponentNode": {
1395
1441
  "type": "object",
1396
1442
  "properties": {
1397
1443
  "id": {
@@ -1399,10 +1445,10 @@
1399
1445
  },
1400
1446
  "kind": {
1401
1447
  "type": "string",
1402
- "const": "widget"
1448
+ "const": "component"
1403
1449
  },
1404
- "widget": {
1405
- "type": "string"
1450
+ "use": {
1451
+ "$ref": "#/definitions/UseIR"
1406
1452
  },
1407
1453
  "class": {
1408
1454
  "type": [
@@ -1441,7 +1487,7 @@
1441
1487
  "required": [
1442
1488
  "id",
1443
1489
  "kind",
1444
- "widget",
1490
+ "use",
1445
1491
  "class",
1446
1492
  "toggle",
1447
1493
  "vars",
@@ -1504,7 +1550,7 @@
1504
1550
  ],
1505
1551
  "additionalProperties": false
1506
1552
  },
1507
- "WidgetIR": {
1553
+ "ComponentIR": {
1508
1554
  "type": "object",
1509
1555
  "properties": {
1510
1556
  "tag": {
@@ -1513,23 +1559,74 @@
1513
1559
  "props": {
1514
1560
  "type": "string"
1515
1561
  },
1516
- "events": {
1562
+ "variants": {
1563
+ "type": "object",
1564
+ "additionalProperties": {
1565
+ "type": "array",
1566
+ "items": {
1567
+ "type": "string"
1568
+ }
1569
+ }
1570
+ },
1571
+ "defaults": {
1517
1572
  "type": "object",
1518
1573
  "additionalProperties": {
1519
1574
  "type": "string"
1520
1575
  }
1521
1576
  },
1522
- "load": {
1523
- "type": "string",
1524
- "enum": [
1525
- "eager",
1526
- "visible",
1527
- "idle"
1528
- ]
1577
+ "slots": {
1578
+ "type": "array",
1579
+ "items": {
1580
+ "type": "string"
1581
+ }
1582
+ },
1583
+ "children": {
1584
+ "type": "boolean"
1585
+ },
1586
+ "events": {
1587
+ "type": "array",
1588
+ "items": {
1589
+ "type": "string"
1590
+ }
1591
+ },
1592
+ "emits": {
1593
+ "type": "object",
1594
+ "additionalProperties": {
1595
+ "type": "string"
1596
+ }
1529
1597
  },
1530
- "wraps": {
1598
+ "extend": {
1531
1599
  "type": "boolean"
1532
1600
  },
1601
+ "owned": {
1602
+ "type": "array",
1603
+ "items": {
1604
+ "type": "string"
1605
+ }
1606
+ },
1607
+ "client": {
1608
+ "anyOf": [
1609
+ {
1610
+ "type": "object",
1611
+ "properties": {
1612
+ "load": {
1613
+ "$ref": "#/definitions/ComponentLoad"
1614
+ },
1615
+ "sourceHash": {
1616
+ "type": "string"
1617
+ }
1618
+ },
1619
+ "required": [
1620
+ "load",
1621
+ "sourceHash"
1622
+ ],
1623
+ "additionalProperties": false
1624
+ },
1625
+ {
1626
+ "type": "null"
1627
+ }
1628
+ ]
1629
+ },
1533
1630
  "sourceHash": {
1534
1631
  "type": "string"
1535
1632
  }
@@ -1537,13 +1634,27 @@
1537
1634
  "required": [
1538
1635
  "tag",
1539
1636
  "props",
1637
+ "variants",
1638
+ "defaults",
1639
+ "slots",
1640
+ "children",
1540
1641
  "events",
1541
- "load",
1542
- "wraps",
1642
+ "emits",
1643
+ "extend",
1644
+ "owned",
1645
+ "client",
1543
1646
  "sourceHash"
1544
1647
  ],
1545
1648
  "additionalProperties": false
1546
1649
  },
1650
+ "ComponentLoad": {
1651
+ "type": "string",
1652
+ "enum": [
1653
+ "eager",
1654
+ "visible",
1655
+ "idle"
1656
+ ]
1657
+ },
1547
1658
  "EndpointIR": {
1548
1659
  "type": "object",
1549
1660
  "properties": {
@@ -1816,6 +1927,101 @@
1816
1927
  "text"
1817
1928
  ],
1818
1929
  "additionalProperties": false
1930
+ },
1931
+ "InspectComponentOutput": {
1932
+ "type": "object",
1933
+ "properties": {
1934
+ "component": {
1935
+ "type": "string"
1936
+ },
1937
+ "owner": {
1938
+ "$ref": "#/definitions/ComponentOwner"
1939
+ },
1940
+ "hash": {
1941
+ "type": "string"
1942
+ },
1943
+ "ir": {
1944
+ "$ref": "#/definitions/ComponentIR"
1945
+ },
1946
+ "uses": {
1947
+ "type": "array",
1948
+ "items": {
1949
+ "$ref": "#/definitions/ComponentUseSite"
1950
+ }
1951
+ }
1952
+ },
1953
+ "required": [
1954
+ "component",
1955
+ "owner",
1956
+ "hash",
1957
+ "ir",
1958
+ "uses"
1959
+ ],
1960
+ "additionalProperties": false
1961
+ },
1962
+ "ComponentOwner": {
1963
+ "type": "object",
1964
+ "properties": {
1965
+ "kind": {
1966
+ "type": "string",
1967
+ "enum": [
1968
+ "kit",
1969
+ "feature"
1970
+ ]
1971
+ },
1972
+ "id": {
1973
+ "type": "string"
1974
+ }
1975
+ },
1976
+ "required": [
1977
+ "kind",
1978
+ "id"
1979
+ ],
1980
+ "additionalProperties": false
1981
+ },
1982
+ "ComponentUseSite": {
1983
+ "type": "object",
1984
+ "properties": {
1985
+ "feature": {
1986
+ "type": "string"
1987
+ },
1988
+ "node": {
1989
+ "type": "string"
1990
+ },
1991
+ "at": {
1992
+ "type": [
1993
+ "string",
1994
+ "null"
1995
+ ]
1996
+ },
1997
+ "variant": {
1998
+ "type": "object",
1999
+ "additionalProperties": {
2000
+ "type": "string"
2001
+ }
2002
+ },
2003
+ "added": {
2004
+ "type": "array",
2005
+ "items": {
2006
+ "type": "string"
2007
+ }
2008
+ },
2009
+ "overrides": {
2010
+ "type": "array",
2011
+ "items": {
2012
+ "type": "string"
2013
+ }
2014
+ }
2015
+ },
2016
+ "required": [
2017
+ "feature",
2018
+ "node",
2019
+ "at",
2020
+ "variant",
2021
+ "added",
2022
+ "overrides"
2023
+ ],
2024
+ "additionalProperties": false
1819
2025
  }
1820
2026
  }
1821
2027
  }
@@ -14,6 +14,12 @@
14
14
  "verify": {
15
15
  "type": "string"
16
16
  },
17
+ "kits": {
18
+ "type": "array",
19
+ "items": {
20
+ "$ref": "#/definitions/MapKit"
21
+ }
22
+ },
17
23
  "files": {
18
24
  "type": "array",
19
25
  "items": {
@@ -42,6 +48,22 @@
42
48
  ],
43
49
  "additionalProperties": false
44
50
  },
51
+ "MapKit": {
52
+ "type": "object",
53
+ "properties": {
54
+ "id": {
55
+ "type": "string"
56
+ },
57
+ "components": {
58
+ "type": "number"
59
+ }
60
+ },
61
+ "required": [
62
+ "id",
63
+ "components"
64
+ ],
65
+ "additionalProperties": false
66
+ },
45
67
  "MapFile": {
46
68
  "type": "object",
47
69
  "properties": {
@@ -93,6 +115,12 @@
93
115
  "string",
94
116
  "null"
95
117
  ]
118
+ },
119
+ "components": {
120
+ "type": "array",
121
+ "items": {
122
+ "type": "string"
123
+ }
96
124
  }
97
125
  },
98
126
  "required": [