@hozu/cli 0.13.0 → 0.14.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.
- package/dist/commands/accept.d.ts +11 -0
- package/dist/commands/accept.d.ts.map +1 -0
- package/dist/commands/accept.js +55 -0
- package/dist/commands/accept.js.map +1 -0
- package/dist/commands/build.js +1 -1
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +3 -4
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/docs.d.ts +3 -1
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +23 -3
- package/dist/commands/docs.js.map +1 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +2 -1
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/why.d.ts +7 -0
- package/dist/commands/why.d.ts.map +1 -0
- package/dist/commands/why.js +60 -0
- package/dist/commands/why.js.map +1 -0
- package/dist/contract.d.ts +25 -20
- package/dist/contract.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +44 -33
- package/dist/main.js.map +1 -1
- package/dist/migrate/step-0.11.d.ts +7 -1
- package/dist/migrate/step-0.11.d.ts.map +1 -1
- package/dist/migrate/step-0.11.js +6 -4
- package/dist/migrate/step-0.11.js.map +1 -1
- package/dist/migrate/step-0.14.d.ts +6 -0
- package/dist/migrate/step-0.14.d.ts.map +1 -0
- package/dist/migrate/step-0.14.js +40 -0
- package/dist/migrate/step-0.14.js.map +1 -0
- package/dist/migrate/steps.d.ts.map +1 -1
- package/dist/migrate/steps.js +14 -1
- package/dist/migrate/steps.js.map +1 -1
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +2 -76
- package/dist/output.js.map +1 -1
- package/package.json +8 -8
- package/schema/check.schema.json +37 -3
- package/schema/migrate.schema.json +37 -3
- package/schema/render.schema.json +2 -1
- package/schema/why.schema.json +975 -0
- package/dist/commands/graph.d.ts +0 -7
- package/dist/commands/graph.d.ts.map +0 -1
- package/dist/commands/graph.js +0 -137
- package/dist/commands/graph.js.map +0 -1
- package/schema/graph.schema.json +0 -109
- package/schema/validate.schema.json +0 -383
package/dist/commands/graph.d.ts
DELETED
|
@@ -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"}
|
package/dist/commands/graph.js
DELETED
|
@@ -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;QACV,KAAK,WAAW,CAAC;QACjB,KAAK,QAAQ;YACX,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;gBAC1C,GAAG,CAAC,SAAS,IAAI,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAA;gBAC/C,KAAK,C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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"}
|
package/schema/graph.schema.json
DELETED
|
@@ -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,383 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$ref": "#/definitions/ValidateOutput",
|
|
4
|
-
"definitions": {
|
|
5
|
-
"ValidateOutput": {
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"ok": {
|
|
9
|
-
"type": "boolean"
|
|
10
|
-
},
|
|
11
|
-
"hash": {
|
|
12
|
-
"type": "string"
|
|
13
|
-
},
|
|
14
|
-
"summary": {
|
|
15
|
-
"type": "object",
|
|
16
|
-
"properties": {
|
|
17
|
-
"errors": {
|
|
18
|
-
"type": "number"
|
|
19
|
-
},
|
|
20
|
-
"warnings": {
|
|
21
|
-
"type": "number"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"required": [
|
|
25
|
-
"errors",
|
|
26
|
-
"warnings"
|
|
27
|
-
],
|
|
28
|
-
"additionalProperties": false
|
|
29
|
-
},
|
|
30
|
-
"coverage": {
|
|
31
|
-
"type": "object",
|
|
32
|
-
"additionalProperties": {
|
|
33
|
-
"$ref": "#/definitions/Coverage"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"lock": {
|
|
37
|
-
"$ref": "#/definitions/LockState"
|
|
38
|
-
},
|
|
39
|
-
"styles": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"enum": [
|
|
42
|
-
"checked",
|
|
43
|
-
"unavailable"
|
|
44
|
-
]
|
|
45
|
-
},
|
|
46
|
-
"diagnostics": {
|
|
47
|
-
"type": "array",
|
|
48
|
-
"items": {
|
|
49
|
-
"$ref": "#/definitions/Diagnostic"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"required": [
|
|
54
|
-
"ok",
|
|
55
|
-
"hash",
|
|
56
|
-
"summary",
|
|
57
|
-
"coverage",
|
|
58
|
-
"lock",
|
|
59
|
-
"styles",
|
|
60
|
-
"diagnostics"
|
|
61
|
-
],
|
|
62
|
-
"additionalProperties": false
|
|
63
|
-
},
|
|
64
|
-
"Coverage": {
|
|
65
|
-
"type": "object",
|
|
66
|
-
"properties": {
|
|
67
|
-
"covered": {
|
|
68
|
-
"type": "number"
|
|
69
|
-
},
|
|
70
|
-
"total": {
|
|
71
|
-
"type": "number"
|
|
72
|
-
},
|
|
73
|
-
"transitions": {
|
|
74
|
-
"type": "number"
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
"required": [
|
|
78
|
-
"covered",
|
|
79
|
-
"total",
|
|
80
|
-
"transitions"
|
|
81
|
-
],
|
|
82
|
-
"additionalProperties": false
|
|
83
|
-
},
|
|
84
|
-
"LockState": {
|
|
85
|
-
"type": "string",
|
|
86
|
-
"enum": [
|
|
87
|
-
"missing",
|
|
88
|
-
"current",
|
|
89
|
-
"stale",
|
|
90
|
-
"updated",
|
|
91
|
-
"skipped"
|
|
92
|
-
]
|
|
93
|
-
},
|
|
94
|
-
"Diagnostic": {
|
|
95
|
-
"type": "object",
|
|
96
|
-
"properties": {
|
|
97
|
-
"code": {
|
|
98
|
-
"$ref": "#/definitions/DiagnosticCode"
|
|
99
|
-
},
|
|
100
|
-
"severity": {
|
|
101
|
-
"$ref": "#/definitions/Severity"
|
|
102
|
-
},
|
|
103
|
-
"message": {
|
|
104
|
-
"type": "string"
|
|
105
|
-
},
|
|
106
|
-
"location": {
|
|
107
|
-
"$ref": "#/definitions/Location"
|
|
108
|
-
},
|
|
109
|
-
"cause": {
|
|
110
|
-
"type": "string"
|
|
111
|
-
},
|
|
112
|
-
"fix": {
|
|
113
|
-
"anyOf": [
|
|
114
|
-
{
|
|
115
|
-
"$ref": "#/definitions/Fix"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"type": "null"
|
|
119
|
-
}
|
|
120
|
-
]
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
"required": [
|
|
124
|
-
"code",
|
|
125
|
-
"severity",
|
|
126
|
-
"message",
|
|
127
|
-
"location",
|
|
128
|
-
"cause",
|
|
129
|
-
"fix"
|
|
130
|
-
],
|
|
131
|
-
"additionalProperties": false
|
|
132
|
-
},
|
|
133
|
-
"DiagnosticCode": {
|
|
134
|
-
"type": "string",
|
|
135
|
-
"enum": [
|
|
136
|
-
"HZ001",
|
|
137
|
-
"HZ002",
|
|
138
|
-
"HZ003",
|
|
139
|
-
"HZ004",
|
|
140
|
-
"HZ005",
|
|
141
|
-
"HZ006",
|
|
142
|
-
"HZ007",
|
|
143
|
-
"HZ008",
|
|
144
|
-
"HZ009",
|
|
145
|
-
"HZ010",
|
|
146
|
-
"HZ011",
|
|
147
|
-
"HZ012",
|
|
148
|
-
"HZ013",
|
|
149
|
-
"HZ014",
|
|
150
|
-
"HZ015",
|
|
151
|
-
"HZ016",
|
|
152
|
-
"HZ017",
|
|
153
|
-
"HZ018",
|
|
154
|
-
"HZ019",
|
|
155
|
-
"HZ020",
|
|
156
|
-
"HZ021",
|
|
157
|
-
"HZ022",
|
|
158
|
-
"HZ023",
|
|
159
|
-
"HZ024",
|
|
160
|
-
"HZ025",
|
|
161
|
-
"HZ026",
|
|
162
|
-
"HZ027",
|
|
163
|
-
"HZ028",
|
|
164
|
-
"HZ029",
|
|
165
|
-
"HZ030",
|
|
166
|
-
"HZ031",
|
|
167
|
-
"HZ032",
|
|
168
|
-
"HZ033",
|
|
169
|
-
"HZ034",
|
|
170
|
-
"HZ035",
|
|
171
|
-
"HZ036",
|
|
172
|
-
"HZ037",
|
|
173
|
-
"HZ038",
|
|
174
|
-
"HZ039",
|
|
175
|
-
"HZ040",
|
|
176
|
-
"HZ041",
|
|
177
|
-
"HZ042",
|
|
178
|
-
"HZ043",
|
|
179
|
-
"HZ044",
|
|
180
|
-
"HZ045",
|
|
181
|
-
"HZ046",
|
|
182
|
-
"HZ047",
|
|
183
|
-
"HZ048",
|
|
184
|
-
"HZ049",
|
|
185
|
-
"HZ050",
|
|
186
|
-
"HZ051",
|
|
187
|
-
"HZ052",
|
|
188
|
-
"HZ053",
|
|
189
|
-
"HZ054",
|
|
190
|
-
"HZ055",
|
|
191
|
-
"HZ056",
|
|
192
|
-
"HZ057",
|
|
193
|
-
"HZ058",
|
|
194
|
-
"HZ059",
|
|
195
|
-
"HZ060",
|
|
196
|
-
"HZ061",
|
|
197
|
-
"HZ062",
|
|
198
|
-
"HZ063",
|
|
199
|
-
"HZ064",
|
|
200
|
-
"HZ070",
|
|
201
|
-
"HZ071",
|
|
202
|
-
"HZ072",
|
|
203
|
-
"HZ073",
|
|
204
|
-
"HZ074",
|
|
205
|
-
"HZ075",
|
|
206
|
-
"HZ076",
|
|
207
|
-
"HZ077",
|
|
208
|
-
"HZ078",
|
|
209
|
-
"HZ079",
|
|
210
|
-
"HZ080",
|
|
211
|
-
"HZ081",
|
|
212
|
-
"HZ082",
|
|
213
|
-
"HZ083",
|
|
214
|
-
"HZ084",
|
|
215
|
-
"HZ085",
|
|
216
|
-
"HZ086"
|
|
217
|
-
]
|
|
218
|
-
},
|
|
219
|
-
"Severity": {
|
|
220
|
-
"type": "string",
|
|
221
|
-
"enum": [
|
|
222
|
-
"error",
|
|
223
|
-
"warning"
|
|
224
|
-
]
|
|
225
|
-
},
|
|
226
|
-
"Location": {
|
|
227
|
-
"type": "object",
|
|
228
|
-
"properties": {
|
|
229
|
-
"feature": {
|
|
230
|
-
"type": [
|
|
231
|
-
"string",
|
|
232
|
-
"null"
|
|
233
|
-
]
|
|
234
|
-
},
|
|
235
|
-
"pointer": {
|
|
236
|
-
"type": "string"
|
|
237
|
-
},
|
|
238
|
-
"source": {
|
|
239
|
-
"anyOf": [
|
|
240
|
-
{
|
|
241
|
-
"$ref": "#/definitions/SourceLoc"
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
"type": "null"
|
|
245
|
-
}
|
|
246
|
-
]
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
"required": [
|
|
250
|
-
"feature",
|
|
251
|
-
"pointer",
|
|
252
|
-
"source"
|
|
253
|
-
],
|
|
254
|
-
"additionalProperties": false
|
|
255
|
-
},
|
|
256
|
-
"SourceLoc": {
|
|
257
|
-
"type": "object",
|
|
258
|
-
"properties": {
|
|
259
|
-
"file": {
|
|
260
|
-
"type": "string"
|
|
261
|
-
},
|
|
262
|
-
"line": {
|
|
263
|
-
"type": "number"
|
|
264
|
-
},
|
|
265
|
-
"column": {
|
|
266
|
-
"type": "number"
|
|
267
|
-
}
|
|
268
|
-
},
|
|
269
|
-
"required": [
|
|
270
|
-
"file",
|
|
271
|
-
"line",
|
|
272
|
-
"column"
|
|
273
|
-
],
|
|
274
|
-
"additionalProperties": false
|
|
275
|
-
},
|
|
276
|
-
"Fix": {
|
|
277
|
-
"type": "object",
|
|
278
|
-
"properties": {
|
|
279
|
-
"summary": {
|
|
280
|
-
"type": "string"
|
|
281
|
-
},
|
|
282
|
-
"snippet": {
|
|
283
|
-
"type": [
|
|
284
|
-
"string",
|
|
285
|
-
"null"
|
|
286
|
-
]
|
|
287
|
-
},
|
|
288
|
-
"patch": {
|
|
289
|
-
"anyOf": [
|
|
290
|
-
{
|
|
291
|
-
"type": "array",
|
|
292
|
-
"items": {
|
|
293
|
-
"$ref": "#/definitions/JsonPatchOp"
|
|
294
|
-
}
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
"type": "null"
|
|
298
|
-
}
|
|
299
|
-
]
|
|
300
|
-
}
|
|
301
|
-
},
|
|
302
|
-
"required": [
|
|
303
|
-
"summary",
|
|
304
|
-
"snippet",
|
|
305
|
-
"patch"
|
|
306
|
-
],
|
|
307
|
-
"additionalProperties": false
|
|
308
|
-
},
|
|
309
|
-
"JsonPatchOp": {
|
|
310
|
-
"anyOf": [
|
|
311
|
-
{
|
|
312
|
-
"type": "object",
|
|
313
|
-
"properties": {
|
|
314
|
-
"op": {
|
|
315
|
-
"type": "string",
|
|
316
|
-
"enum": [
|
|
317
|
-
"add",
|
|
318
|
-
"replace"
|
|
319
|
-
]
|
|
320
|
-
},
|
|
321
|
-
"path": {
|
|
322
|
-
"type": "string"
|
|
323
|
-
},
|
|
324
|
-
"value": {
|
|
325
|
-
"$ref": "#/definitions/Json"
|
|
326
|
-
}
|
|
327
|
-
},
|
|
328
|
-
"required": [
|
|
329
|
-
"op",
|
|
330
|
-
"path",
|
|
331
|
-
"value"
|
|
332
|
-
],
|
|
333
|
-
"additionalProperties": false
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
"type": "object",
|
|
337
|
-
"properties": {
|
|
338
|
-
"op": {
|
|
339
|
-
"type": "string",
|
|
340
|
-
"const": "remove"
|
|
341
|
-
},
|
|
342
|
-
"path": {
|
|
343
|
-
"type": "string"
|
|
344
|
-
}
|
|
345
|
-
},
|
|
346
|
-
"required": [
|
|
347
|
-
"op",
|
|
348
|
-
"path"
|
|
349
|
-
],
|
|
350
|
-
"additionalProperties": false
|
|
351
|
-
}
|
|
352
|
-
]
|
|
353
|
-
},
|
|
354
|
-
"Json": {
|
|
355
|
-
"anyOf": [
|
|
356
|
-
{
|
|
357
|
-
"type": "null"
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
"type": "boolean"
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
"type": "number"
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
"type": "string"
|
|
367
|
-
},
|
|
368
|
-
{
|
|
369
|
-
"type": "array",
|
|
370
|
-
"items": {
|
|
371
|
-
"$ref": "#/definitions/Json"
|
|
372
|
-
}
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
"type": "object",
|
|
376
|
-
"additionalProperties": {
|
|
377
|
-
"$ref": "#/definitions/Json"
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
]
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
}
|