@telorun/ide-support 0.24.0 → 0.102.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/import-upgrades/build-import-upgrades.d.ts +3 -3
- package/dist/import-upgrades/build-import-upgrades.d.ts.map +1 -1
- package/dist/import-upgrades/index.d.ts +0 -1
- package/dist/import-upgrades/index.d.ts.map +1 -1
- package/dist/import-upgrades/index.js +0 -1
- package/package.json +3 -3
- package/src/import-upgrades/build-import-upgrades.ts +3 -3
- package/src/import-upgrades/index.ts +0 -1
- package/dist/import-upgrades/parse-module-versions.d.ts +0 -19
- package/dist/import-upgrades/parse-module-versions.d.ts.map +0 -1
- package/dist/import-upgrades/parse-module-versions.js +0 -29
- package/src/import-upgrades/parse-module-versions.ts +0 -30
|
@@ -20,9 +20,9 @@ export interface ModuleVersion {
|
|
|
20
20
|
*
|
|
21
21
|
* Deliberately NOT `adapter.listVersionsForRef`, which answers `string[]`:
|
|
22
22
|
* completion offers names, an upgrade writes a pin, so the two want different
|
|
23
|
-
* things from one route. A host backed by the hub
|
|
24
|
-
* `GET /module/versions`
|
|
25
|
-
*
|
|
23
|
+
* things from one route. A host backed by the hub reads
|
|
24
|
+
* `GET /module/versions`, carrying an `integrity` only when it is a canonical
|
|
25
|
+
* pin. */
|
|
26
26
|
export type ModuleVersionLookup = (baseRef: string) => Promise<ModuleVersion[]>;
|
|
27
27
|
/** Everything an upgrade needs from its host: what versions exist, and whether
|
|
28
28
|
* this runtime can host one.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-import-upgrades.d.ts","sourceRoot":"","sources":["../../src/import-upgrades/build-import-upgrades.ts"],"names":[],"mappings":"AAAA,OAAO,EAaL,KAAK,WAAW,EAChB,KAAK,KAAK,EACX,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC/B,MAAM,4BAA4B,CAAC;AAEpC;;;;;oEAKoE;AACpE,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"build-import-upgrades.d.ts","sourceRoot":"","sources":["../../src/import-upgrades/build-import-upgrades.ts"],"names":[],"mappings":"AAAA,OAAO,EAaL,KAAK,WAAW,EAChB,KAAK,KAAK,EACX,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC/B,MAAM,4BAA4B,CAAC;AAEpC;;;;;oEAKoE;AACpE,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;WAYW;AACX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;AAEhF;;;;;;;6BAO6B;AAC7B,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,mBAAmB,CAAC;IAClC,YAAY,EAAE,yBAAyB,CAAC;IACxC;;uBAEmB;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;6CAE6C;AAC7C,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,qDAAqD;AACrD,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;6EAKyE;IACzE,SAAS,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,SAAS,EAAE,OAAO,CAAC;IACnB;;oFAEgF;IAChF,QAAQ,EAAE,OAAO,CAAC;IAClB;;;gDAG4C;I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E,wBAAwB,EAC7B,IAAI,CAAC,EAAE,WAAW,EAAE,GACnB,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAwGvC;AAED;;;;;8EAK8E;AAC9E,wBAAgB,cAAc,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CAIpE;AAED;;;yEAGyE;AACzE,wBAAgB,cAAc,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CAIpE"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { buildImportUpgrades, describeReason, describeRemedy, } from "./build-import-upgrades.js";
|
|
2
2
|
export type { ImportPin, ImportUpgrade, ImportUpgradeEdit, ImportUpgradeEnvironment, ImportUpgradeSet, ImportUpgradeSkip, ModuleVersion, ModuleVersionLookup, } from "./build-import-upgrades.js";
|
|
3
3
|
export { moduleManifestCacheUrl } from "./manifest-cache-url.js";
|
|
4
|
-
export { parseModuleVersions } from "./parse-module-versions.js";
|
|
5
4
|
export { findImportEntries } from "./find-import-entries.js";
|
|
6
5
|
export type { ImportEntry, ImportEntryIntegrity, ImportsBlock, } from "./find-import-entries.js";
|
|
7
6
|
export { createVersionCompatibility, markVersionCompatibility, noneRunnableReason, selectCompatibleVersion, uncheckedVersionCompatibility, } from "./version-compatibility.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/import-upgrades/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/import-upgrades/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,YAAY,EACV,WAAW,EACX,oBAAoB,EACpB,YAAY,GACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EACzB,gBAAgB,GACjB,MAAM,4BAA4B,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { buildImportUpgrades, describeReason, describeRemedy, } from "./build-import-upgrades.js";
|
|
2
2
|
export { moduleManifestCacheUrl } from "./manifest-cache-url.js";
|
|
3
|
-
export { parseModuleVersions } from "./parse-module-versions.js";
|
|
4
3
|
export { findImportEntries } from "./find-import-entries.js";
|
|
5
4
|
export { createVersionCompatibility, markVersionCompatibility, noneRunnableReason, selectCompatibleVersion, uncheckedVersionCompatibility, } from "./version-compatibility.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telorun/ide-support",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.102.0",
|
|
4
4
|
"description": "Editor-host-agnostic IDE support (completions, diagnostic normalization) for Telo manifests.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"telo",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"yaml": "^2.8.3",
|
|
40
|
-
"@telorun/analyzer": "0.
|
|
41
|
-
"@telorun/templating": "0.
|
|
40
|
+
"@telorun/analyzer": "0.102.0",
|
|
41
|
+
"@telorun/templating": "0.102.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/node": "^20.0.0",
|
|
@@ -42,9 +42,9 @@ export interface ModuleVersion {
|
|
|
42
42
|
*
|
|
43
43
|
* Deliberately NOT `adapter.listVersionsForRef`, which answers `string[]`:
|
|
44
44
|
* completion offers names, an upgrade writes a pin, so the two want different
|
|
45
|
-
* things from one route. A host backed by the hub
|
|
46
|
-
* `GET /module/versions`
|
|
47
|
-
*
|
|
45
|
+
* things from one route. A host backed by the hub reads
|
|
46
|
+
* `GET /module/versions`, carrying an `integrity` only when it is a canonical
|
|
47
|
+
* pin. */
|
|
48
48
|
export type ModuleVersionLookup = (baseRef: string) => Promise<ModuleVersion[]>;
|
|
49
49
|
|
|
50
50
|
/** Everything an upgrade needs from its host: what versions exist, and whether
|
|
@@ -14,7 +14,6 @@ export type {
|
|
|
14
14
|
ModuleVersionLookup,
|
|
15
15
|
} from "./build-import-upgrades.js";
|
|
16
16
|
export { moduleManifestCacheUrl } from "./manifest-cache-url.js";
|
|
17
|
-
export { parseModuleVersions } from "./parse-module-versions.js";
|
|
18
17
|
export { findImportEntries } from "./find-import-entries.js";
|
|
19
18
|
export type {
|
|
20
19
|
ImportEntry,
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ModuleVersion } from "./build-import-upgrades.js";
|
|
2
|
-
/**
|
|
3
|
-
* Read the hub's `GET /module/versions` payload into {@link ModuleVersion}s,
|
|
4
|
-
* newest first (the route's own ordering, preserved).
|
|
5
|
-
*
|
|
6
|
-
* Pure — the host owns the `fetch`, as everything else in this package does.
|
|
7
|
-
* It lives here rather than in each host because the shape is this package's:
|
|
8
|
-
* three hosts parsing the same route by hand is how one of them was left
|
|
9
|
-
* filtering for strings after the route started returning objects, which
|
|
10
|
-
* TypeScript could not catch behind the response cast and which surfaced only
|
|
11
|
-
* as a silently empty version list.
|
|
12
|
-
*
|
|
13
|
-
* Tolerant by design: an entry with no usable `version` is dropped rather than
|
|
14
|
-
* throwing, and an `integrity` that is not a canonical `sha256-<base64url>` is
|
|
15
|
-
* discarded rather than carried — a pin is spliced into the author's YAML, so a
|
|
16
|
-
* malformed one has to become "no pin", never corrupt text.
|
|
17
|
-
*/
|
|
18
|
-
export declare function parseModuleVersions(payload: unknown): ModuleVersion[];
|
|
19
|
-
//# sourceMappingURL=parse-module-versions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parse-module-versions.d.ts","sourceRoot":"","sources":["../../src/import-upgrades/parse-module-versions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,EAAE,CAUrE"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { isCanonicalIntegrity } from "@telorun/analyzer";
|
|
2
|
-
/**
|
|
3
|
-
* Read the hub's `GET /module/versions` payload into {@link ModuleVersion}s,
|
|
4
|
-
* newest first (the route's own ordering, preserved).
|
|
5
|
-
*
|
|
6
|
-
* Pure — the host owns the `fetch`, as everything else in this package does.
|
|
7
|
-
* It lives here rather than in each host because the shape is this package's:
|
|
8
|
-
* three hosts parsing the same route by hand is how one of them was left
|
|
9
|
-
* filtering for strings after the route started returning objects, which
|
|
10
|
-
* TypeScript could not catch behind the response cast and which surfaced only
|
|
11
|
-
* as a silently empty version list.
|
|
12
|
-
*
|
|
13
|
-
* Tolerant by design: an entry with no usable `version` is dropped rather than
|
|
14
|
-
* throwing, and an `integrity` that is not a canonical `sha256-<base64url>` is
|
|
15
|
-
* discarded rather than carried — a pin is spliced into the author's YAML, so a
|
|
16
|
-
* malformed one has to become "no pin", never corrupt text.
|
|
17
|
-
*/
|
|
18
|
-
export function parseModuleVersions(payload) {
|
|
19
|
-
const versions = payload?.versions;
|
|
20
|
-
if (!Array.isArray(versions))
|
|
21
|
-
return [];
|
|
22
|
-
return versions.flatMap((entry) => {
|
|
23
|
-
const version = entry?.version;
|
|
24
|
-
if (typeof version !== "string" || version === "")
|
|
25
|
-
return [];
|
|
26
|
-
const integrity = entry.integrity;
|
|
27
|
-
return [isCanonicalIntegrity(integrity) ? { version, integrity } : { version }];
|
|
28
|
-
});
|
|
29
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { isCanonicalIntegrity } from "@telorun/analyzer";
|
|
2
|
-
import type { ModuleVersion } from "./build-import-upgrades.js";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Read the hub's `GET /module/versions` payload into {@link ModuleVersion}s,
|
|
6
|
-
* newest first (the route's own ordering, preserved).
|
|
7
|
-
*
|
|
8
|
-
* Pure — the host owns the `fetch`, as everything else in this package does.
|
|
9
|
-
* It lives here rather than in each host because the shape is this package's:
|
|
10
|
-
* three hosts parsing the same route by hand is how one of them was left
|
|
11
|
-
* filtering for strings after the route started returning objects, which
|
|
12
|
-
* TypeScript could not catch behind the response cast and which surfaced only
|
|
13
|
-
* as a silently empty version list.
|
|
14
|
-
*
|
|
15
|
-
* Tolerant by design: an entry with no usable `version` is dropped rather than
|
|
16
|
-
* throwing, and an `integrity` that is not a canonical `sha256-<base64url>` is
|
|
17
|
-
* discarded rather than carried — a pin is spliced into the author's YAML, so a
|
|
18
|
-
* malformed one has to become "no pin", never corrupt text.
|
|
19
|
-
*/
|
|
20
|
-
export function parseModuleVersions(payload: unknown): ModuleVersion[] {
|
|
21
|
-
const versions = (payload as { versions?: unknown } | null | undefined)?.versions;
|
|
22
|
-
if (!Array.isArray(versions)) return [];
|
|
23
|
-
|
|
24
|
-
return versions.flatMap((entry) => {
|
|
25
|
-
const version = (entry as { version?: unknown } | null)?.version;
|
|
26
|
-
if (typeof version !== "string" || version === "") return [];
|
|
27
|
-
const integrity = (entry as { integrity?: unknown }).integrity;
|
|
28
|
-
return [isCanonicalIntegrity(integrity) ? { version, integrity } : { version }];
|
|
29
|
-
});
|
|
30
|
-
}
|