@wendoo/bridge-app 0.2.2

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 (77) hide show
  1. package/README.md +44 -0
  2. package/dist/app-bridge.d.ts +77 -0
  3. package/dist/app-bridge.d.ts.map +1 -0
  4. package/dist/app-bridge.js +205 -0
  5. package/dist/app-environment-host.d.ts +524 -0
  6. package/dist/app-environment-host.d.ts.map +1 -0
  7. package/dist/app-environment-host.js +1560 -0
  8. package/dist/brain-diagnostics.d.ts +47 -0
  9. package/dist/brain-diagnostics.d.ts.map +1 -0
  10. package/dist/brain-diagnostics.js +100 -0
  11. package/dist/bridge-project.d.ts +32 -0
  12. package/dist/bridge-project.d.ts.map +1 -0
  13. package/dist/bridge-project.js +69 -0
  14. package/dist/compilation.d.ts +145 -0
  15. package/dist/compilation.d.ts.map +1 -0
  16. package/dist/compilation.js +404 -0
  17. package/dist/core-extension.d.ts +10 -0
  18. package/dist/core-extension.d.ts.map +1 -0
  19. package/dist/core-extension.js +9 -0
  20. package/dist/embedded-extension-id-gate.d.ts +38 -0
  21. package/dist/embedded-extension-id-gate.d.ts.map +1 -0
  22. package/dist/embedded-extension-id-gate.js +55 -0
  23. package/dist/embedded-extension-loader.d.ts +33 -0
  24. package/dist/embedded-extension-loader.d.ts.map +1 -0
  25. package/dist/embedded-extension-loader.js +90 -0
  26. package/dist/embedded-extension-vite-plugin.d.ts +34 -0
  27. package/dist/embedded-extension-vite-plugin.d.ts.map +1 -0
  28. package/dist/embedded-extension-vite-plugin.js +39 -0
  29. package/dist/embedded-extensions.d.ts +293 -0
  30. package/dist/embedded-extensions.d.ts.map +1 -0
  31. package/dist/embedded-extensions.js +526 -0
  32. package/dist/extension-catalog.d.ts +243 -0
  33. package/dist/extension-catalog.d.ts.map +1 -0
  34. package/dist/extension-catalog.js +408 -0
  35. package/dist/extension-install-log.d.ts +54 -0
  36. package/dist/extension-install-log.d.ts.map +1 -0
  37. package/dist/extension-install-log.js +22 -0
  38. package/dist/extension-install.d.ts +162 -0
  39. package/dist/extension-install.d.ts.map +1 -0
  40. package/dist/extension-install.js +412 -0
  41. package/dist/extension-report-presenter.d.ts +40 -0
  42. package/dist/extension-report-presenter.d.ts.map +1 -0
  43. package/dist/extension-report-presenter.js +36 -0
  44. package/dist/fetched-extension-snapshots.d.ts +66 -0
  45. package/dist/fetched-extension-snapshots.d.ts.map +1 -0
  46. package/dist/fetched-extension-snapshots.js +137 -0
  47. package/dist/folder-host-session.d.ts +85 -0
  48. package/dist/folder-host-session.d.ts.map +1 -0
  49. package/dist/folder-host-session.js +210 -0
  50. package/dist/index.d.ts +38 -0
  51. package/dist/index.d.ts.map +1 -0
  52. package/dist/index.js +19 -0
  53. package/dist/library-offer.d.ts +60 -0
  54. package/dist/library-offer.d.ts.map +1 -0
  55. package/dist/library-offer.js +47 -0
  56. package/dist/library-uninstall-guard.d.ts +66 -0
  57. package/dist/library-uninstall-guard.d.ts.map +1 -0
  58. package/dist/library-uninstall-guard.js +103 -0
  59. package/dist/manifest-files.d.ts +53 -0
  60. package/dist/manifest-files.d.ts.map +1 -0
  61. package/dist/manifest-files.js +242 -0
  62. package/dist/node.d.ts +4 -0
  63. package/dist/node.d.ts.map +1 -0
  64. package/dist/node.js +2 -0
  65. package/dist/project-file-bridge.d.ts +10 -0
  66. package/dist/project-file-bridge.d.ts.map +1 -0
  67. package/dist/project-file-bridge.js +87 -0
  68. package/dist/user-tile-registration.d.ts +89 -0
  69. package/dist/user-tile-registration.d.ts.map +1 -0
  70. package/dist/user-tile-registration.js +100 -0
  71. package/dist/vfs-asset-url-provider.d.ts +22 -0
  72. package/dist/vfs-asset-url-provider.d.ts.map +1 -0
  73. package/dist/vfs-asset-url-provider.js +52 -0
  74. package/dist/workspace-folder-project-store.d.ts +125 -0
  75. package/dist/workspace-folder-project-store.d.ts.map +1 -0
  76. package/dist/workspace-folder-project-store.js +400 -0
  77. package/package.json +103 -0
@@ -0,0 +1,34 @@
1
+ /** One embedded extension a host application registers: its coordinate and the directory holding its `wendoo.json`. */
2
+ export interface EmbeddedExtensionRegistration {
3
+ /** Canonical `<owner>/<repo>` coordinate the assembled bundle is keyed under. */
4
+ coordinate: string;
5
+ /** Absolute path to the directory holding the extension's `wendoo.json`. */
6
+ dir: string;
7
+ }
8
+ /**
9
+ * The subset of the Vite plugin surface this factory implements, typed
10
+ * structurally so the package needs no dependency on Vite. A Vite build consumes
11
+ * the returned object as an ordinary plugin.
12
+ */
13
+ export interface EmbeddedExtensionsVitePlugin {
14
+ name: string;
15
+ resolveId(id: string): string | undefined;
16
+ load(id: string): string | undefined;
17
+ }
18
+ /** Default specifier a host application imports the assembled bundles from. */
19
+ export declare const EMBEDDED_EXTENSIONS_MODULE_ID = "virtual:wendoo-embedded-extensions";
20
+ /**
21
+ * Build a Vite plugin that assembles each registered extension from its own
22
+ * `wendoo.json` `files` list and exposes the bundles as the default export of
23
+ * a virtual module (`virtual:wendoo-embedded-extensions` unless overridden).
24
+ * A host application registers coordinates and directories only; the file list
25
+ * comes from each extension's manifest, so adding a file to an extension needs
26
+ * no change here. Assembly runs through {@link buildEmbeddedExtensionFromDir},
27
+ * the single content-loading path shared with the tests and build gates, and
28
+ * fails the build when a listed file is missing from disk.
29
+ *
30
+ * @param registrations - The extensions the host application offers.
31
+ * @param moduleId - Virtual specifier to expose the bundles under.
32
+ */
33
+ export declare function embeddedExtensionsVitePlugin(registrations: readonly EmbeddedExtensionRegistration[], moduleId?: string): EmbeddedExtensionsVitePlugin;
34
+ //# sourceMappingURL=embedded-extension-vite-plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embedded-extension-vite-plugin.d.ts","sourceRoot":"","sources":["../src/embedded-extension-vite-plugin.ts"],"names":[],"mappings":"AAGA,uHAAuH;AACvH,MAAM,WAAW,6BAA6B;IAC5C,iFAAiF;IACjF,UAAU,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC1C,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACtC;AAED,+EAA+E;AAC/E,eAAO,MAAM,6BAA6B,uCAAuC,CAAC;AAElF;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAC1C,aAAa,EAAE,SAAS,6BAA6B,EAAE,EACvD,QAAQ,GAAE,MAAsC,GAC/C,4BAA4B,CAsB9B"}
@@ -0,0 +1,39 @@
1
+ import { buildEmbeddedExtensionFromDir, extensionSourceFiles } from "./embedded-extension-loader.js";
2
+ /** Default specifier a host application imports the assembled bundles from. */
3
+ export const EMBEDDED_EXTENSIONS_MODULE_ID = "virtual:wendoo-embedded-extensions";
4
+ /**
5
+ * Build a Vite plugin that assembles each registered extension from its own
6
+ * `wendoo.json` `files` list and exposes the bundles as the default export of
7
+ * a virtual module (`virtual:wendoo-embedded-extensions` unless overridden).
8
+ * A host application registers coordinates and directories only; the file list
9
+ * comes from each extension's manifest, so adding a file to an extension needs
10
+ * no change here. Assembly runs through {@link buildEmbeddedExtensionFromDir},
11
+ * the single content-loading path shared with the tests and build gates, and
12
+ * fails the build when a listed file is missing from disk.
13
+ *
14
+ * @param registrations - The extensions the host application offers.
15
+ * @param moduleId - Virtual specifier to expose the bundles under.
16
+ */
17
+ export function embeddedExtensionsVitePlugin(registrations, moduleId = EMBEDDED_EXTENSIONS_MODULE_ID) {
18
+ const resolvedId = `\0${moduleId}`;
19
+ return {
20
+ name: "wendoo-embedded-extensions",
21
+ resolveId(id) {
22
+ return id === moduleId ? resolvedId : undefined;
23
+ },
24
+ load(id) {
25
+ if (id !== resolvedId) {
26
+ return undefined;
27
+ }
28
+ const bundles = registrations.map(({ coordinate, dir }) => {
29
+ if (this.addWatchFile) {
30
+ for (const file of extensionSourceFiles(dir)) {
31
+ this.addWatchFile(file);
32
+ }
33
+ }
34
+ return buildEmbeddedExtensionFromDir(dir, coordinate);
35
+ });
36
+ return `export default ${JSON.stringify(bundles)};`;
37
+ },
38
+ };
39
+ }
@@ -0,0 +1,293 @@
1
+ import type { CatalogMoveVersionLookup, ExtensionCatalogMoves, ExtensionTarget, FileContent } from "@wendoo/app-host";
2
+ import type { DependencyMount, ProjectDependency } from "@wendoo/ts-compiler";
3
+ /** An extensions list keyed by `<owner>/<repo>` coordinate; each value is an extension reference string. */
4
+ type ExtensionsMap = Readonly<Record<string, string>>;
5
+ /** One source file of an embedded extension, at its extension-relative path. */
6
+ export interface EmbeddedExtensionFile {
7
+ /** Extension-relative path (e.g. `index.ts`). */
8
+ path: string;
9
+ /** Full file content. */
10
+ content: string;
11
+ }
12
+ /**
13
+ * One entry of a host application's embed record: an extension whose content is
14
+ * bundled with the application, identified by its canonical `<owner>/<repo>`
15
+ * coordinate.
16
+ */
17
+ export interface EmbeddedExtension {
18
+ /**
19
+ * Canonical `<owner>/<repo>` coordinate identifying this extension: its
20
+ * identity, its compiler namespace, and the name it is imported and stored
21
+ * under. An `embedded:<owner>/<repo>` manifest reference resolves to the embed
22
+ * entry whose coordinate matches.
23
+ */
24
+ canonicalOrigin: string;
25
+ /** The extension's source files, delivered as a read-only dependency mount. */
26
+ files: readonly EmbeddedExtensionFile[];
27
+ }
28
+ /**
29
+ * A conflict between two requesters of the same origin, resolved by selecting
30
+ * one of them.
31
+ */
32
+ export interface ExtensionResolutionConflictWarning {
33
+ /**
34
+ * `version-conflict` when the same origin was required at two different
35
+ * versions and the higher was selected; `reference-tiebreak` when the
36
+ * versions were equal and the reference nearest the host project was
37
+ * selected.
38
+ */
39
+ readonly kind: "version-conflict" | "reference-tiebreak";
40
+ /** The origin the conflict was resolved for. */
41
+ readonly origin: string;
42
+ /** The reference string selected for this origin. */
43
+ readonly selectedReference: string;
44
+ /** The reference string that lost the conflict. */
45
+ readonly rejectedReference: string;
46
+ /** For a version conflict, the selected version; absent for a reference tie-break. */
47
+ readonly selectedVersion?: string;
48
+ /** For a version conflict, the rejected version; absent for a reference tie-break. */
49
+ readonly rejectedVersion?: string;
50
+ /** Human-readable summary naming both requesters. */
51
+ readonly message: string;
52
+ }
53
+ /** Stable identifiers for non-fatal catalog-move findings surfaced during resolution and closure walks. */
54
+ export declare const CatalogMoveWarningCode: {
55
+ /** More than one move entry captures the reference; the move is not applied. */
56
+ readonly AMBIGUOUS_CAPTURE: "CATALOG_MOVE_AMBIGUOUS_CAPTURE";
57
+ /** The move application revisited a reference shape; the move is not applied. */
58
+ readonly CYCLE: "CATALOG_MOVE_CYCLE";
59
+ /** A floating destination could not be resolved to a pinned version. */
60
+ readonly FLOATING_UNRESOLVED: "CATALOG_MOVE_FLOATING_UNRESOLVED";
61
+ /** A version-range selector could not be evaluated: the reference's version is undeterminable. */
62
+ readonly VERSION_UNKNOWN: "CATALOG_MOVE_VERSION_UNKNOWN";
63
+ /** The moved destination's content is not available; the move is not applied. */
64
+ readonly FETCH_FAILED: "CATALOG_MOVE_FETCH_FAILED";
65
+ /** The project's stored brains could not be read, so a rename cannot rewrite their namespaces; the move is not applied. */
66
+ readonly BRAINS_UNREADABLE: "CATALOG_MOVE_BRAINS_UNREADABLE";
67
+ };
68
+ /** Union of all {@link CatalogMoveWarningCode} values. */
69
+ export type CatalogMoveWarningCode = (typeof CatalogMoveWarningCode)[keyof typeof CatalogMoveWarningCode];
70
+ /**
71
+ * A non-fatal finding encountered while resolving a project's extension
72
+ * dependency graph. Every resolved origin remains resolvable; warnings are
73
+ * returned on the resolution result.
74
+ */
75
+ export type ExtensionResolutionWarning = ExtensionResolutionConflictWarning | {
76
+ /** The origin resolved through a pin that is plausibly an abbreviated commit SHA, which the content CDN serves with mutable branch semantics. */
77
+ readonly kind: "abbreviated-pin";
78
+ /** The origin the warning is about. */
79
+ readonly origin: string;
80
+ /** The origin's winning reference string. */
81
+ readonly reference: string;
82
+ /** Human-readable summary. */
83
+ readonly message: string;
84
+ } | {
85
+ /** The origin's installed content declares a manifest identity that differs from the coordinate its reference names. */
86
+ readonly kind: "identity-mismatch";
87
+ /** The coordinate the origin resolves under. */
88
+ readonly origin: string;
89
+ /** The origin's winning reference string. */
90
+ readonly reference: string;
91
+ /** The `<owner>/<repo>` identity the installed content's manifest declares. */
92
+ readonly declaredIdentity: string;
93
+ /** Human-readable summary. */
94
+ readonly message: string;
95
+ } | {
96
+ /**
97
+ * A declared compatibility target could not be resolved to any content: no
98
+ * embed record carries its coordinate, no target registry pins it, or the
99
+ * pinned content is not available. The target's platform stack does not
100
+ * materialize.
101
+ */
102
+ readonly kind: "unresolved-target";
103
+ /** The unresolved target's `<owner>/<repo>` coordinate. */
104
+ readonly origin: string;
105
+ /** Human-readable summary. */
106
+ readonly message: string;
107
+ } | {
108
+ /**
109
+ * A catalog move could not be applied to this reference on this load.
110
+ * Nothing is written for the failed move; application is retried on the
111
+ * next load.
112
+ */
113
+ readonly kind: "catalog-move-failed";
114
+ /** The `<owner>/<repo>` coordinate of the reference the move was for. */
115
+ readonly origin: string;
116
+ /** The reference the move application was for, as written. */
117
+ readonly reference: string;
118
+ /** Stable failure code. */
119
+ readonly code: CatalogMoveWarningCode;
120
+ /** Human-readable summary. */
121
+ readonly message: string;
122
+ };
123
+ /** The kind of finding a resolution warning reports. */
124
+ export type ExtensionResolutionWarningKind = ExtensionResolutionWarning["kind"];
125
+ /**
126
+ * A dependency cycle in a project's extension graph. Resolution fails with this
127
+ * error; the graph names the origins on the cycle in traversal order.
128
+ */
129
+ export declare class ExtensionResolutionCycleError extends Error {
130
+ /** The origins on the cycle, in the order traversed, with the first origin repeated at the end. */
131
+ readonly cycle: readonly string[];
132
+ constructor(cycle: readonly string[]);
133
+ }
134
+ /**
135
+ * Fetched extension content available to resolution: each entry maps a `gh:`
136
+ * reference string, as written in an extensions map, to the snapshot's
137
+ * origin-relative text files (leading-slash paths).
138
+ */
139
+ export type FetchedExtensionContentMap = ReadonlyMap<string, ReadonlyMap<string, FileContent>>;
140
+ /** The content sources a project's extension references resolve against. */
141
+ export interface ExtensionResolutionSources {
142
+ /** Extensions bundled with the host application, resolving `embedded:` references. */
143
+ readonly embedded: readonly EmbeddedExtension[];
144
+ /** Fetched snapshot content keyed by reference, resolving `gh:` references. */
145
+ readonly fetched?: FetchedExtensionContentMap;
146
+ /**
147
+ * Curated catalog moves, keyed by source coordinate. A transitive dependency
148
+ * reference an entry captures resolves through the entry's destination
149
+ * reference; absent when the host applies no moves.
150
+ */
151
+ readonly moves?: ExtensionCatalogMoves;
152
+ /**
153
+ * Pinned `gh:` references for coordinates whose catalog move resolves to a
154
+ * floating destination, keyed by lowercased coordinate. A floating move
155
+ * result resolves through this map; a coordinate with no pin stays
156
+ * unresolved for this load. Absent when the host holds none.
157
+ */
158
+ readonly floatingPins?: ReadonlyMap<string, string>;
159
+ /**
160
+ * Registry pins resolving a target coordinate that no embed record carries to
161
+ * a `gh:` reference, keyed by the target's `<owner>/<repo>` coordinate. A
162
+ * declared target that matches no embed entry resolves through this map and
163
+ * then through {@link fetched}; absent when the host pins no remote targets.
164
+ */
165
+ readonly targetRegistry?: ReadonlyMap<string, string>;
166
+ }
167
+ /** Provenance of one origin selected into the resolved closure. */
168
+ export interface ResolvedOriginProvenance {
169
+ /** The `<owner>/<repo>` coordinate resolved. */
170
+ readonly origin: string;
171
+ /** The winning candidate's reference string. */
172
+ readonly reference: string;
173
+ /** The winning candidate's declared semantic version. */
174
+ readonly version: string;
175
+ /** The winning candidate's declared display name; the coordinate when it declares none. */
176
+ readonly name: string;
177
+ }
178
+ /** Compiler inputs resolved from a project's extensions list and its content sources. */
179
+ export interface ResolvedExtensions {
180
+ /**
181
+ * The `<owner>/<repo>` coordinates the project's own files may import through
182
+ * `@lib/<owner>/<repo>`: each direct dependency, plus every platform-stack
183
+ * origin reached through a `targets` edge at any depth.
184
+ */
185
+ dependencies: readonly ProjectDependency[];
186
+ /**
187
+ * Read-only content of every origin in the transitive dependency closure,
188
+ * one mount per origin, each carrying its own extensions list so nested
189
+ * `@lib/<owner>/<repo>` imports resolve against the correct origin.
190
+ */
191
+ dependencyMounts: readonly DependencyMount[];
192
+ /** The winning reference and version of every origin in the closure. */
193
+ origins: readonly ResolvedOriginProvenance[];
194
+ /** Non-fatal conflicts encountered during resolution, in encounter order. */
195
+ warnings: readonly ExtensionResolutionWarning[];
196
+ }
197
+ /**
198
+ * A candidate for one origin in the transitive closure: its content, its own
199
+ * extensions list, its declared version, the reference that reached it, and the
200
+ * distance from the host project at which it was first reached.
201
+ */
202
+ export interface OriginCandidate {
203
+ /** The `<owner>/<repo>` coordinate this candidate resolves. */
204
+ origin: string;
205
+ /** The candidate's declared semantic version, or `0.0.0` when it has no manifest. */
206
+ version: string;
207
+ /** The candidate's declared display name, or its coordinate when it has no manifest. */
208
+ name: string;
209
+ /** The reference string that reached this candidate. */
210
+ reference: string;
211
+ /** The distance from the host project (0 for a direct dependency) at which this candidate was reached. */
212
+ depth: number;
213
+ /** The candidate's origin-relative file map, with leading-slash paths. */
214
+ files: ReadonlyMap<string, FileContent>;
215
+ /** The candidate's own extensions list, resolving its `@lib/<owner>/<repo>` imports. */
216
+ extensions: ExtensionsMap;
217
+ /** The `<owner>/<repo>` coordinates of the candidate's declared compatibility targets, each recursed as a platform edge; empty when it declares none. */
218
+ targets: readonly string[];
219
+ /** The candidate's declared ambient `.d.ts` files, as namespace-relative paths; empty when it declares none. */
220
+ ambient: readonly string[];
221
+ /** The `<owner>/<repo>` identity the candidate's manifest declares; absent when it declares none. */
222
+ identity?: string;
223
+ }
224
+ /**
225
+ * Build a {@link CatalogMoveVersionLookup} over an embed record and a
226
+ * reference-keyed content getter. An `embedded:` reference answers with its
227
+ * embed entry's manifest version; a `gh:` reference answers with the version
228
+ * of the manifest in the content the getter returns for it. A reference whose
229
+ * content is unavailable, or whose manifest is missing or unparseable, answers
230
+ * `undefined`.
231
+ *
232
+ * @param options.embedded - The host application's bundled embedded extensions.
233
+ * @param options.contentForReference - Origin-relative text files (leading-slash paths) for a `gh:` reference.
234
+ */
235
+ export declare function createCatalogMoveVersionLookup(options: {
236
+ embedded: readonly EmbeddedExtension[];
237
+ contentForReference: (reference: string) => ReadonlyMap<string, FileContent> | undefined;
238
+ }): CatalogMoveVersionLookup;
239
+ /** The outcome of unifying an incoming candidate against the incumbent already resolved for its origin. */
240
+ export interface OriginUnification {
241
+ /** The candidate that wins the origin: higher version, or nearest-root at an equal version. */
242
+ readonly winner: OriginCandidate;
243
+ /** The conflict recorded when the two candidates disagree on version or reference; absent when they unify cleanly. */
244
+ readonly warning: ExtensionResolutionConflictWarning | undefined;
245
+ }
246
+ /**
247
+ * Unify an incoming candidate for an origin against the incumbent already
248
+ * resolved for it, selecting the winner and reporting any conflict. The higher
249
+ * semantic version wins and records a `version-conflict` warning; at an equal
250
+ * version, a differing reference nearest the host project (smaller depth) wins
251
+ * and records a `reference-tiebreak` warning; an identical version and
252
+ * reference unify onto the incumbent with no warning.
253
+ */
254
+ export declare function unifyOriginCandidate(incoming: OriginCandidate, incumbent: OriginCandidate): OriginUnification;
255
+ /**
256
+ * Resolve a project's extensions list against its content sources into
257
+ * compiler dependency inputs. Resolution is transitive: an extension's own
258
+ * `wendoo.json` extensions resolve recursively. Each origin appears once in
259
+ * the closure regardless of how many dependents reference it, so references to
260
+ * an origin's published types across a diamond unify on one registration.
261
+ *
262
+ * When the same origin is required at two different versions, the higher
263
+ * semantic version is selected and a `version-conflict` warning names both
264
+ * requesters; when the versions are equal but the references differ, the
265
+ * reference nearest the host project wins and a `reference-tiebreak` warning is
266
+ * emitted. A fetched origin whose winning pin is plausibly an abbreviated
267
+ * commit SHA raises an `abbreviated-pin` warning, and one whose content
268
+ * declares a manifest identity differing from its coordinate raises an
269
+ * `identity-mismatch` warning. A reference whose source carries no content for
270
+ * it is skipped; an unresolved import surfaces later as an ordinary compiler
271
+ * diagnostic.
272
+ *
273
+ * A project's declared compatibility targets are additional closure roots, and
274
+ * at every node the union of its `extensions` and `targets` edges is recursed.
275
+ * A target coordinate resolves to `embedded:<coordinate>` when the
276
+ * embed record carries it, otherwise to the target registry's pinned `gh:`
277
+ * reference; a target that resolves to no content raises an `unresolved-target`
278
+ * warning. A coordinate reached through both an extension edge and a target
279
+ * edge unifies onto one resolved origin. Every origin reached through a target
280
+ * edge, at any depth, is listed in `dependencies`, so the project's own files
281
+ * may `@lib`-import any layer of the materialized platform stack. A
282
+ * catalog-moved edge whose moved content is not available raises a
283
+ * stable-coded `catalog-move-failed` warning and stays unresolved this load.
284
+ *
285
+ * @param extensions - The project's extensions map, keyed by coordinate; each value is a reference string.
286
+ * @param sources - The content sources references resolve against.
287
+ * @param projectTargets - The project's declared compatibility targets, keyed by target coordinate; each is recursed as a closure root.
288
+ * @throws {ExtensionResolutionCycleError} when the extension graph contains a
289
+ * dependency cycle.
290
+ */
291
+ export declare function resolveProjectExtensions(extensions: Readonly<Record<string, string>> | undefined, sources: ExtensionResolutionSources, projectTargets?: Readonly<Record<string, ExtensionTarget>>): ResolvedExtensions;
292
+ export {};
293
+ //# sourceMappingURL=embedded-extensions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embedded-extensions.d.ts","sourceRoot":"","sources":["../src/embedded-extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAYtH,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE9E,4GAA4G;AAC5G,KAAK,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEtD,gFAAgF;AAChF,MAAM,WAAW,qBAAqB;IACpC,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,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