@telorun/ide-support 0.17.0 → 0.18.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-keys.d.ts","sourceRoot":"","sources":["../../src/completions/prop-keys.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"prop-keys.d.ts","sourceRoot":"","sources":["../../src/completions/prop-keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAiBpD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAAE,EAClB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,EACzB,QAAQ,EAAE,gBAAgB,GAAG,SAAS;AACtC;;oCAEoC;AACpC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC/B,gBAAgB,EAAE,CAoDpB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { manifestFragmentOf, TELO_SCHEMA_ANNOTATIONS, } from "@telorun/analyzer";
|
|
1
|
+
import { manifestFragmentOf, TELO_SCHEMA_ANNOTATIONS, TELO_DATA_SCHEMA_ANNOTATIONS, } from "@telorun/analyzer";
|
|
2
2
|
import { navigateSchema } from "./detect-context.js";
|
|
3
3
|
/** Kernel-implicit fields. Every Telo resource declares its `kind` and a
|
|
4
4
|
* `metadata` object; the analyzer's schema validator injects them when
|
|
@@ -103,7 +103,13 @@ function propertyNameSuggestions(schema, existingKeys) {
|
|
|
103
103
|
* walkers as an annotated node.
|
|
104
104
|
*/
|
|
105
105
|
function annotationKeys(node) {
|
|
106
|
-
|
|
106
|
+
const fragment = manifestFragmentOf(node);
|
|
107
|
+
// A kind's own `schema:` takes the whole annotation vocabulary. A DATA schema
|
|
108
|
+
// — an `inputType` / `outputType` contract — takes only the annotations read
|
|
109
|
+
// from one, which is where the kernel looks for them.
|
|
110
|
+
if (fragment === "KindSchema")
|
|
111
|
+
return TELO_SCHEMA_ANNOTATIONS;
|
|
112
|
+
return fragment === "JsonSchema7" ? TELO_DATA_SCHEMA_ANNOTATIONS : {};
|
|
107
113
|
}
|
|
108
114
|
function buildItems(properties, existingKeys, required) {
|
|
109
115
|
const items = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telorun/ide-support",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Editor-host-agnostic IDE support (completions, diagnostic normalization) for Telo manifests.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"telo",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"src/**"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@telorun/analyzer": "0.
|
|
39
|
+
"@telorun/analyzer": "0.68.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "^20.0.0",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
manifestFragmentOf,
|
|
3
3
|
TELO_SCHEMA_ANNOTATIONS,
|
|
4
|
+
TELO_DATA_SCHEMA_ANNOTATIONS,
|
|
4
5
|
type AnalysisRegistry,
|
|
5
6
|
} from "@telorun/analyzer";
|
|
6
7
|
import type { CompletionResult } from "../types.js";
|
|
@@ -132,7 +133,12 @@ function propertyNameSuggestions(
|
|
|
132
133
|
* walkers as an annotated node.
|
|
133
134
|
*/
|
|
134
135
|
function annotationKeys(node: Record<string, any>): Record<string, any> {
|
|
135
|
-
|
|
136
|
+
const fragment = manifestFragmentOf(node);
|
|
137
|
+
// A kind's own `schema:` takes the whole annotation vocabulary. A DATA schema
|
|
138
|
+
// — an `inputType` / `outputType` contract — takes only the annotations read
|
|
139
|
+
// from one, which is where the kernel looks for them.
|
|
140
|
+
if (fragment === "KindSchema") return TELO_SCHEMA_ANNOTATIONS;
|
|
141
|
+
return fragment === "JsonSchema7" ? TELO_DATA_SCHEMA_ANNOTATIONS : {};
|
|
136
142
|
}
|
|
137
143
|
|
|
138
144
|
function buildItems(
|