@hozu/cli 0.13.0 → 0.15.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 (104) hide show
  1. package/dist/commands/accept.d.ts +11 -0
  2. package/dist/commands/accept.d.ts.map +1 -0
  3. package/dist/commands/accept.js +55 -0
  4. package/dist/commands/accept.js.map +1 -0
  5. package/dist/commands/add.d.ts.map +1 -1
  6. package/dist/commands/add.js +4 -1
  7. package/dist/commands/add.js.map +1 -1
  8. package/dist/commands/browse-tab.d.ts +2 -0
  9. package/dist/commands/browse-tab.d.ts.map +1 -1
  10. package/dist/commands/browse-tab.js +3 -1
  11. package/dist/commands/browse-tab.js.map +1 -1
  12. package/dist/commands/browse.d.ts +4 -0
  13. package/dist/commands/browse.d.ts.map +1 -1
  14. package/dist/commands/browse.js +80 -9
  15. package/dist/commands/browse.js.map +1 -1
  16. package/dist/commands/build.js +1 -1
  17. package/dist/commands/build.js.map +1 -1
  18. package/dist/commands/call.d.ts +2 -0
  19. package/dist/commands/call.d.ts.map +1 -1
  20. package/dist/commands/call.js +73 -10
  21. package/dist/commands/call.js.map +1 -1
  22. package/dist/commands/check.d.ts.map +1 -1
  23. package/dist/commands/check.js +3 -4
  24. package/dist/commands/check.js.map +1 -1
  25. package/dist/commands/docs.d.ts +3 -1
  26. package/dist/commands/docs.d.ts.map +1 -1
  27. package/dist/commands/docs.js +23 -3
  28. package/dist/commands/docs.js.map +1 -1
  29. package/dist/commands/explain.js +1 -1
  30. package/dist/commands/explain.js.map +1 -1
  31. package/dist/commands/impact.d.ts.map +1 -1
  32. package/dist/commands/impact.js +4 -2
  33. package/dist/commands/impact.js.map +1 -1
  34. package/dist/commands/locate.js +2 -2
  35. package/dist/commands/locate.js.map +1 -1
  36. package/dist/commands/map.d.ts.map +1 -1
  37. package/dist/commands/map.js +5 -3
  38. package/dist/commands/map.js.map +1 -1
  39. package/dist/commands/plan.d.ts.map +1 -1
  40. package/dist/commands/plan.js +8 -0
  41. package/dist/commands/plan.js.map +1 -1
  42. package/dist/commands/scaffold.d.ts.map +1 -1
  43. package/dist/commands/scaffold.js +19 -22
  44. package/dist/commands/scaffold.js.map +1 -1
  45. package/dist/commands/serve.d.ts.map +1 -1
  46. package/dist/commands/serve.js +2 -0
  47. package/dist/commands/serve.js.map +1 -1
  48. package/dist/commands/show.d.ts +11 -0
  49. package/dist/commands/show.d.ts.map +1 -0
  50. package/dist/commands/show.js +55 -0
  51. package/dist/commands/show.js.map +1 -0
  52. package/dist/commands/validate.d.ts.map +1 -1
  53. package/dist/commands/validate.js +9 -3
  54. package/dist/commands/validate.js.map +1 -1
  55. package/dist/commands/why.d.ts +6 -0
  56. package/dist/commands/why.d.ts.map +1 -0
  57. package/dist/commands/why.js +73 -0
  58. package/dist/commands/why.js.map +1 -0
  59. package/dist/contract.d.ts +47 -21
  60. package/dist/contract.d.ts.map +1 -1
  61. package/dist/index.d.ts +0 -1
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +0 -1
  64. package/dist/index.js.map +1 -1
  65. package/dist/main.d.ts +2 -0
  66. package/dist/main.d.ts.map +1 -1
  67. package/dist/main.js +127 -65
  68. package/dist/main.js.map +1 -1
  69. package/dist/migrate/step-0.11.d.ts +7 -1
  70. package/dist/migrate/step-0.11.d.ts.map +1 -1
  71. package/dist/migrate/step-0.11.js +6 -4
  72. package/dist/migrate/step-0.11.js.map +1 -1
  73. package/dist/migrate/step-0.14.d.ts +6 -0
  74. package/dist/migrate/step-0.14.d.ts.map +1 -0
  75. package/dist/migrate/step-0.14.js +40 -0
  76. package/dist/migrate/step-0.14.js.map +1 -0
  77. package/dist/migrate/step-0.15.d.ts +14 -0
  78. package/dist/migrate/step-0.15.d.ts.map +1 -0
  79. package/dist/migrate/step-0.15.js +94 -0
  80. package/dist/migrate/step-0.15.js.map +1 -0
  81. package/dist/migrate/steps.d.ts.map +1 -1
  82. package/dist/migrate/steps.js +22 -1
  83. package/dist/migrate/steps.js.map +1 -1
  84. package/dist/output.d.ts.map +1 -1
  85. package/dist/output.js +2 -76
  86. package/dist/output.js.map +1 -1
  87. package/package.json +8 -8
  88. package/schema/call.schema.json +6 -1
  89. package/schema/check.schema.json +48 -3
  90. package/schema/inspect.schema.json +103 -1
  91. package/schema/map.schema.json +14 -0
  92. package/schema/migrate.schema.json +48 -3
  93. package/schema/render.schema.json +6 -1
  94. package/schema/show.schema.json +79 -0
  95. package/schema/why.schema.json +983 -0
  96. package/dist/commands/graph.d.ts +0 -7
  97. package/dist/commands/graph.d.ts.map +0 -1
  98. package/dist/commands/graph.js +0 -137
  99. package/dist/commands/graph.js.map +0 -1
  100. package/schema/explain.schema.json +0 -171
  101. package/schema/graph.schema.json +0 -109
  102. package/schema/impact.schema.json +0 -242
  103. package/schema/locate.schema.json +0 -488
  104. package/schema/validate.schema.json +0 -383
@@ -1,7 +0,0 @@
1
- import type { FeatureIR } from '@hozu/core/ir';
2
- import type { GraphOutput } from '../contract.ts';
3
- import { type Loaded } from '../load.ts';
4
- export declare function graphOf(feature: FeatureIR): GraphOutput;
5
- export declare const runGraph: (loaded: Loaded, id: string | undefined) => GraphOutput;
6
- export declare function mermaid(graph: GraphOutput): string;
7
- //# sourceMappingURL=graph.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/commands/graph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,eAAe,CAAA;AACxD,OAAO,KAAK,EAAwB,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACvE,OAAO,EAAE,KAAK,MAAM,EAAkB,MAAM,YAAY,CAAA;AAoDxD,wBAAgB,OAAO,CAAC,OAAO,EAAE,SAAS,GAAG,WAAW,CAiEvD;AAED,eAAO,MAAM,QAAQ,WAAY,MAAM,MAAM,MAAM,GAAG,SAAS,KAAG,WAClB,CAAA;AAEhD,wBAAgB,OAAO,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAUlD"}
@@ -1,137 +0,0 @@
1
- import { requireFeature } from '../load.js';
2
- const local = (ref) => ref.slice(ref.indexOf('.') + 1);
3
- function collectViewEdges(node, from, edges, nodes) {
4
- const add = (id, kind, label) => {
5
- if (!nodes.has(id))
6
- nodes.set(id, { id, kind, label, initial: false, final: false });
7
- };
8
- switch (node.kind) {
9
- case 'if':
10
- for (const child of [...node.ifTrue, ...node.ifFalse])
11
- collectViewEdges(child, from, edges, nodes);
12
- return;
13
- case 'el':
14
- case 'component':
15
- case 'global':
16
- for (const send of Object.values(node.on)) {
17
- add(`event:${send.event}`, 'event', send.event);
18
- edges.push({
19
- from,
20
- to: `event:${send.event}`,
21
- kind: 'send',
22
- label: node.kind === 'el' ? node.tag : node.kind === 'component' ? node.use.component : node.target,
23
- });
24
- }
25
- if (node.kind !== 'global')
26
- for (const child of node.children)
27
- collectViewEdges(child, from, edges, nodes);
28
- return;
29
- case 'when':
30
- for (const child of node.children)
31
- collectViewEdges(child, from, edges, nodes);
32
- return;
33
- case 'each':
34
- collectViewEdges(node.item, from, edges, nodes);
35
- return;
36
- case 'query':
37
- add(`query:${node.query}`, 'query', node.query);
38
- edges.push({ from, to: `query:${node.query}`, kind: 'reads', label: '' });
39
- for (const child of [
40
- node.ready,
41
- ...(node.pending ? [node.pending] : []),
42
- ...Object.values(node.failed),
43
- ])
44
- collectViewEdges(child, from, edges, nodes);
45
- return;
46
- case 'embed':
47
- add(`view:${node.view}`, 'view', node.view);
48
- edges.push({ from, to: `view:${node.view}`, kind: 'embeds', label: '' });
49
- return;
50
- default:
51
- return;
52
- }
53
- }
54
- export function graphOf(feature) {
55
- const nodes = new Map();
56
- const edges = [];
57
- const m = feature.machine;
58
- for (const [state, s] of Object.entries(m?.states ?? {})) {
59
- const id = `state:${state}`;
60
- nodes.set(id, { id, kind: 'state', label: state, initial: m?.initial === state, final: s.final });
61
- const guarded = (g) => (g ? ' [guard]' : '');
62
- for (const [event, list] of Object.entries(s.on))
63
- for (const t of list)
64
- edges.push({
65
- from: id,
66
- to: `state:${t.target}`,
67
- kind: 'on',
68
- label: `${local(event)}${guarded(t.guard)}`,
69
- });
70
- if (s.invoke) {
71
- const effect = `effect:${s.invoke.effect}`;
72
- if (!nodes.has(effect))
73
- nodes.set(effect, {
74
- id: effect,
75
- kind: 'effect',
76
- label: s.invoke.effect,
77
- initial: false,
78
- final: false,
79
- });
80
- edges.push({ from: id, to: effect, kind: 'invoke', label: '' });
81
- for (const t of s.invoke.done)
82
- edges.push({ from: id, to: `state:${t.target}`, kind: 'done', label: `done${guarded(t.guard)}` });
83
- for (const [error, list] of Object.entries(s.invoke.failed))
84
- for (const t of list)
85
- edges.push({
86
- from: id,
87
- to: `state:${t.target}`,
88
- kind: 'failed',
89
- label: `failed.${error}${guarded(t.guard)}`,
90
- });
91
- }
92
- for (const a of s.after)
93
- edges.push({
94
- from: id,
95
- to: `state:${a.transition.target}`,
96
- kind: 'after',
97
- label: `after ${a.ms}ms${guarded(a.transition.guard)}`,
98
- });
99
- }
100
- for (const [vid, view] of Object.entries(feature.views)) {
101
- const id = `view:${feature.id}.${vid}`;
102
- nodes.set(id, { id, kind: 'view', label: `${feature.id}.${vid}`, initial: false, final: false });
103
- collectViewEdges(view.root, id, edges, nodes);
104
- }
105
- for (const imported of feature.imports) {
106
- const id = `feature:${imported}`;
107
- nodes.set(id, { id, kind: 'feature', label: imported, initial: false, final: false });
108
- edges.push({ from: `feature:${feature.id}`, to: id, kind: 'import', label: '' });
109
- }
110
- if (feature.imports.length)
111
- nodes.set(`feature:${feature.id}`, {
112
- id: `feature:${feature.id}`,
113
- kind: 'feature',
114
- label: feature.id,
115
- initial: false,
116
- final: false,
117
- });
118
- return { feature: feature.id, nodes: [...nodes.values()].sort((a, b) => a.id.localeCompare(b.id)), edges };
119
- }
120
- export const runGraph = (loaded, id) => graphOf(requireFeature(loaded.build().ir, id));
121
- export function mermaid(graph) {
122
- const states = graph.nodes.filter((n) => n.kind === 'state');
123
- if (!states.length)
124
- return `stateDiagram-v2\n note "${graph.feature} has no machine"\n`;
125
- const lines = ['stateDiagram-v2'];
126
- for (const s of states)
127
- if (s.initial)
128
- lines.push(` [*] --> ${s.label}`);
129
- for (const e of graph.edges)
130
- if (e.from.startsWith('state:') && e.to.startsWith('state:'))
131
- lines.push(` ${e.from.slice(6)} --> ${e.to.slice(6)}: ${e.label}`);
132
- for (const s of states)
133
- if (s.final)
134
- lines.push(` ${s.label} --> [*]`);
135
- return `${lines.join('\n')}\n`;
136
- }
137
- //# sourceMappingURL=graph.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graph.js","sourceRoot":"","sources":["../../src/commands/graph.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,cAAc,EAAE,MAAM,YAAY,CAAA;AAExD,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;AAE9D,SAAS,gBAAgB,CAAC,IAAc,EAAE,IAAY,EAAE,KAAkB,EAAE,KAA6B;IACvG,MAAM,GAAG,GAAG,CAAC,EAAU,EAAE,IAAuB,EAAE,KAAa,EAAE,EAAE;QACjE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAA;IACtF,CAAC,CAAA;IACD,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,KAAK,IAAI;YACP,KAAK,MAAM,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;gBAAE,gBAAgB,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;YAClG,OAAM;QACR,KAAK,IAAI,CAAC;QAC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AAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAA;AAEhD,MAAM,UAAU,OAAO,CAAC,KAAkB;IACxC,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAA;IAC5D,IAAI,CAAC,MAAM,CAAC,MAAM;QAAE,OAAO,4BAA4B,KAAK,CAAC,OAAO,oBAAoB,CAAA;IACxF,MAAM,KAAK,GAAG,CAAC,iBAAiB,CAAC,CAAA;IACjC,KAAK,MAAM,CAAC,IAAI,MAAM;QAAE,IAAI,CAAC,CAAC,OAAO;YAAE,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;IACzE,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,KAAK;QACzB,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;YAC1D,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;IACvE,KAAK,MAAM,CAAC,IAAI,MAAM;QAAE,IAAI,CAAC,CAAC,KAAK;YAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,UAAU,CAAC,CAAA;IACvE,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAA;AAChC,CAAC"}
@@ -1,171 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$ref": "#/definitions/ExplainOutput",
4
- "definitions": {
5
- "ExplainOutput": {
6
- "type": "object",
7
- "properties": {
8
- "feature": {
9
- "type": "string"
10
- },
11
- "state": {
12
- "type": "string"
13
- },
14
- "initial": {
15
- "type": "boolean"
16
- },
17
- "final": {
18
- "type": "boolean"
19
- },
20
- "invoke": {
21
- "anyOf": [
22
- {
23
- "type": "object",
24
- "properties": {
25
- "effect": {
26
- "type": "string"
27
- },
28
- "input": {
29
- "type": "string"
30
- },
31
- "errors": {
32
- "type": "array",
33
- "items": {
34
- "type": "string"
35
- }
36
- },
37
- "runs": {
38
- "$ref": "#/definitions/Runs"
39
- }
40
- },
41
- "required": [
42
- "effect",
43
- "input",
44
- "errors",
45
- "runs"
46
- ],
47
- "additionalProperties": false
48
- },
49
- {
50
- "type": "null"
51
- }
52
- ]
53
- },
54
- "outgoing": {
55
- "type": "array",
56
- "items": {
57
- "$ref": "#/definitions/ExplainTransition"
58
- }
59
- },
60
- "incoming": {
61
- "type": "array",
62
- "items": {
63
- "$ref": "#/definitions/ExplainTransition"
64
- }
65
- },
66
- "sends": {
67
- "type": "array",
68
- "items": {
69
- "$ref": "#/definitions/ExplainSend"
70
- }
71
- }
72
- },
73
- "required": [
74
- "feature",
75
- "state",
76
- "initial",
77
- "final",
78
- "invoke",
79
- "outgoing",
80
- "incoming",
81
- "sends"
82
- ],
83
- "additionalProperties": false
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
- },
94
- "ExplainTransition": {
95
- "type": "object",
96
- "properties": {
97
- "id": {
98
- "type": "string"
99
- },
100
- "from": {
101
- "type": "string"
102
- },
103
- "to": {
104
- "type": "string"
105
- },
106
- "trigger": {
107
- "type": "string"
108
- },
109
- "guard": {
110
- "type": [
111
- "string",
112
- "null"
113
- ]
114
- },
115
- "assign": {
116
- "type": "array",
117
- "items": {
118
- "type": "string"
119
- }
120
- },
121
- "navigate": {
122
- "type": [
123
- "string",
124
- "null"
125
- ]
126
- },
127
- "coveredBy": {
128
- "type": "array",
129
- "items": {
130
- "type": "string"
131
- }
132
- }
133
- },
134
- "required": [
135
- "id",
136
- "from",
137
- "to",
138
- "trigger",
139
- "guard",
140
- "assign",
141
- "navigate",
142
- "coveredBy"
143
- ],
144
- "additionalProperties": false
145
- },
146
- "ExplainSend": {
147
- "type": "object",
148
- "properties": {
149
- "view": {
150
- "type": "string"
151
- },
152
- "node": {
153
- "type": "string"
154
- },
155
- "event": {
156
- "type": "string"
157
- },
158
- "handled": {
159
- "type": "boolean"
160
- }
161
- },
162
- "required": [
163
- "view",
164
- "node",
165
- "event",
166
- "handled"
167
- ],
168
- "additionalProperties": false
169
- }
170
- }
171
- }
@@ -1,109 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$ref": "#/definitions/GraphOutput",
4
- "definitions": {
5
- "GraphOutput": {
6
- "type": "object",
7
- "properties": {
8
- "feature": {
9
- "type": "string"
10
- },
11
- "nodes": {
12
- "type": "array",
13
- "items": {
14
- "$ref": "#/definitions/GraphNode"
15
- }
16
- },
17
- "edges": {
18
- "type": "array",
19
- "items": {
20
- "$ref": "#/definitions/GraphEdge"
21
- }
22
- }
23
- },
24
- "required": [
25
- "feature",
26
- "nodes",
27
- "edges"
28
- ],
29
- "additionalProperties": false
30
- },
31
- "GraphNode": {
32
- "type": "object",
33
- "properties": {
34
- "id": {
35
- "type": "string"
36
- },
37
- "kind": {
38
- "$ref": "#/definitions/GraphNodeKind"
39
- },
40
- "label": {
41
- "type": "string"
42
- },
43
- "initial": {
44
- "type": "boolean"
45
- },
46
- "final": {
47
- "type": "boolean"
48
- }
49
- },
50
- "required": [
51
- "id",
52
- "kind",
53
- "label",
54
- "initial",
55
- "final"
56
- ],
57
- "additionalProperties": false
58
- },
59
- "GraphNodeKind": {
60
- "type": "string",
61
- "enum": [
62
- "state",
63
- "effect",
64
- "event",
65
- "feature",
66
- "view",
67
- "query"
68
- ]
69
- },
70
- "GraphEdge": {
71
- "type": "object",
72
- "properties": {
73
- "from": {
74
- "type": "string"
75
- },
76
- "to": {
77
- "type": "string"
78
- },
79
- "kind": {
80
- "$ref": "#/definitions/GraphEdgeKind"
81
- },
82
- "label": {
83
- "type": "string"
84
- }
85
- },
86
- "required": [
87
- "from",
88
- "to",
89
- "kind",
90
- "label"
91
- ],
92
- "additionalProperties": false
93
- },
94
- "GraphEdgeKind": {
95
- "type": "string",
96
- "enum": [
97
- "on",
98
- "done",
99
- "failed",
100
- "after",
101
- "invoke",
102
- "import",
103
- "send",
104
- "reads",
105
- "embeds"
106
- ]
107
- }
108
- }
109
- }
@@ -1,242 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$ref": "#/definitions/ImpactOutput",
4
- "definitions": {
5
- "ImpactOutput": {
6
- "anyOf": [
7
- {
8
- "$ref": "#/definitions/Impact"
9
- },
10
- {
11
- "$ref": "#/definitions/ComponentImpact"
12
- }
13
- ]
14
- },
15
- "Impact": {
16
- "type": "object",
17
- "properties": {
18
- "target": {
19
- "type": "string"
20
- },
21
- "kind": {
22
- "$ref": "#/definitions/ImpactKind"
23
- },
24
- "tags": {
25
- "type": "array",
26
- "items": {
27
- "type": "string"
28
- }
29
- },
30
- "queries": {
31
- "type": "array",
32
- "items": {
33
- "$ref": "#/definitions/ImpactQuery"
34
- }
35
- },
36
- "invalidatedBy": {
37
- "type": "array",
38
- "items": {
39
- "type": "string"
40
- }
41
- },
42
- "uses": {
43
- "type": "array",
44
- "items": {
45
- "$ref": "#/definitions/ImpactUse"
46
- }
47
- },
48
- "features": {
49
- "type": "array",
50
- "items": {
51
- "type": "string"
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."
64
- }
65
- },
66
- "required": [
67
- "target",
68
- "kind",
69
- "tags",
70
- "queries",
71
- "invalidatedBy",
72
- "uses",
73
- "features",
74
- "runs"
75
- ],
76
- "additionalProperties": false
77
- },
78
- "ImpactKind": {
79
- "type": "string",
80
- "enum": [
81
- "event",
82
- "query",
83
- "mutation",
84
- "tag",
85
- "fn",
86
- "view"
87
- ]
88
- },
89
- "ImpactQuery": {
90
- "type": "object",
91
- "properties": {
92
- "ref": {
93
- "type": "string"
94
- },
95
- "tag": {
96
- "type": "string"
97
- },
98
- "precision": {
99
- "type": "string",
100
- "enum": [
101
- "exact",
102
- "param-dependent"
103
- ]
104
- }
105
- },
106
- "required": [
107
- "ref",
108
- "tag",
109
- "precision"
110
- ],
111
- "additionalProperties": false
112
- },
113
- "ImpactUse": {
114
- "type": "object",
115
- "properties": {
116
- "feature": {
117
- "type": "string"
118
- },
119
- "at": {
120
- "type": "string"
121
- },
122
- "via": {
123
- "type": "string"
124
- }
125
- },
126
- "required": [
127
- "feature",
128
- "at",
129
- "via"
130
- ],
131
- "additionalProperties": false
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
- },
142
- "ComponentImpact": {
143
- "type": "object",
144
- "properties": {
145
- "target": {
146
- "type": "string"
147
- },
148
- "kind": {
149
- "type": "string",
150
- "const": "component"
151
- },
152
- "owner": {
153
- "$ref": "#/definitions/ComponentOwner"
154
- },
155
- "uses": {
156
- "type": "array",
157
- "items": {
158
- "$ref": "#/definitions/ComponentUseSite"
159
- }
160
- },
161
- "features": {
162
- "type": "array",
163
- "items": {
164
- "type": "string"
165
- }
166
- }
167
- },
168
- "required": [
169
- "target",
170
- "kind",
171
- "owner",
172
- "uses",
173
- "features"
174
- ],
175
- "additionalProperties": false
176
- },
177
- "ComponentOwner": {
178
- "type": "object",
179
- "properties": {
180
- "kind": {
181
- "type": "string",
182
- "enum": [
183
- "kit",
184
- "feature"
185
- ]
186
- },
187
- "id": {
188
- "type": "string"
189
- }
190
- },
191
- "required": [
192
- "kind",
193
- "id"
194
- ],
195
- "additionalProperties": false
196
- },
197
- "ComponentUseSite": {
198
- "type": "object",
199
- "properties": {
200
- "feature": {
201
- "type": "string"
202
- },
203
- "node": {
204
- "type": "string"
205
- },
206
- "at": {
207
- "type": [
208
- "string",
209
- "null"
210
- ]
211
- },
212
- "variant": {
213
- "type": "object",
214
- "additionalProperties": {
215
- "type": "string"
216
- }
217
- },
218
- "added": {
219
- "type": "array",
220
- "items": {
221
- "type": "string"
222
- }
223
- },
224
- "overrides": {
225
- "type": "array",
226
- "items": {
227
- "type": "string"
228
- }
229
- }
230
- },
231
- "required": [
232
- "feature",
233
- "node",
234
- "at",
235
- "variant",
236
- "added",
237
- "overrides"
238
- ],
239
- "additionalProperties": false
240
- }
241
- }
242
- }