@telorun/sdk 0.61.0 → 0.62.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/runtime-error.d.ts +30 -0
- package/dist/runtime-error.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/runtime-error.ts +22 -0
package/dist/runtime-error.d.ts
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
/** The manifest site a statically-raised diagnostic was reported at, carried
|
|
2
|
+
* through verbatim from the analyzer's `data` so a renderer resolves
|
|
3
|
+
* `file:line:col` against the `LoadedGraph` exactly as `telo check` does —
|
|
4
|
+
* never by re-parsing the rendered message. */
|
|
5
|
+
export interface DiagnosticOrigin {
|
|
6
|
+
filePath?: string;
|
|
7
|
+
/** Field path within the manifest doc, as keyed by its position index. */
|
|
8
|
+
path?: string;
|
|
9
|
+
resource?: {
|
|
10
|
+
kind?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
};
|
|
13
|
+
/** The diagnostic's own position, for one that has no field path to look up:
|
|
14
|
+
* a YAML parse failure knows where the syntax broke but has no parsed tree
|
|
15
|
+
* to index. Structurally the analyzer's LSP `Range` (0-based), so a renderer
|
|
16
|
+
* can hand it back to the shared range resolver unchanged. */
|
|
17
|
+
range?: {
|
|
18
|
+
start: {
|
|
19
|
+
line: number;
|
|
20
|
+
character: number;
|
|
21
|
+
};
|
|
22
|
+
end: {
|
|
23
|
+
line: number;
|
|
24
|
+
character: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
}
|
|
1
28
|
export interface RuntimeDiagnostic {
|
|
2
29
|
severity?: "error" | "warning";
|
|
3
30
|
message: string;
|
|
@@ -5,6 +32,9 @@ export interface RuntimeDiagnostic {
|
|
|
5
32
|
kind?: string;
|
|
6
33
|
details?: string;
|
|
7
34
|
code?: string;
|
|
35
|
+
/** Set when the failure came from static analysis rather than a running
|
|
36
|
+
* resource; lets the renderer point at the offending line. */
|
|
37
|
+
origin?: DiagnosticOrigin;
|
|
8
38
|
/** Set when this entry failed ONLY because another resource in the same
|
|
9
39
|
* failure set did — it carries no independent cause. Renderers collapse
|
|
10
40
|
* these into one line rather than repeating one failure per dependent. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-error.d.ts","sourceRoot":"","sources":["../src/runtime-error.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;+EAE2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;kEAC8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;+CAE2C;IAC3C,QAAQ,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAChC;AAED,0GAA0G;AAC1G,MAAM,MAAM,gBAAgB,GACxB,wBAAwB,GACxB,2BAA2B,GAC3B,0BAA0B,GAC1B,wBAAwB,GACxB,oCAAoC,GACpC,4BAA4B,GAC5B,uCAAuC,GACvC,wBAAwB,GACxB,sBAAsB,GACtB,mBAAmB,GACnB,uBAAuB,GACvB,gCAAgC,GAChC,yBAAyB,GACzB,8BAA8B,GAC9B,oBAAoB,GACpB,4BAA4B,GAC5B,0BAA0B,GAC1B,uBAAuB,GACvB,8BAA8B,GAC9B,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"runtime-error.d.ts","sourceRoot":"","sources":["../src/runtime-error.ts"],"names":[],"mappings":"AAAA;;;gDAGgD;AAChD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,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ts
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/** The manifest site a statically-raised diagnostic was reported at, carried
|
|
2
|
+
* through verbatim from the analyzer's `data` so a renderer resolves
|
|
3
|
+
* `file:line:col` against the `LoadedGraph` exactly as `telo check` does —
|
|
4
|
+
* never by re-parsing the rendered message. */
|
|
5
|
+
export interface DiagnosticOrigin {
|
|
6
|
+
filePath?: string;
|
|
7
|
+
/** Field path within the manifest doc, as keyed by its position index. */
|
|
8
|
+
path?: string;
|
|
9
|
+
resource?: { kind?: string; name?: string };
|
|
10
|
+
/** The diagnostic's own position, for one that has no field path to look up:
|
|
11
|
+
* a YAML parse failure knows where the syntax broke but has no parsed tree
|
|
12
|
+
* to index. Structurally the analyzer's LSP `Range` (0-based), so a renderer
|
|
13
|
+
* can hand it back to the shared range resolver unchanged. */
|
|
14
|
+
range?: {
|
|
15
|
+
start: { line: number; character: number };
|
|
16
|
+
end: { line: number; character: number };
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
1
20
|
export interface RuntimeDiagnostic {
|
|
2
21
|
severity?: "error" | "warning";
|
|
3
22
|
message: string;
|
|
@@ -5,6 +24,9 @@ export interface RuntimeDiagnostic {
|
|
|
5
24
|
kind?: string;
|
|
6
25
|
details?: string;
|
|
7
26
|
code?: string;
|
|
27
|
+
/** Set when the failure came from static analysis rather than a running
|
|
28
|
+
* resource; lets the renderer point at the offending line. */
|
|
29
|
+
origin?: DiagnosticOrigin;
|
|
8
30
|
/** Set when this entry failed ONLY because another resource in the same
|
|
9
31
|
* failure set did — it carries no independent cause. Renderers collapse
|
|
10
32
|
* these into one line rather than repeating one failure per dependent. */
|