fix(browser): retain module resolution through finalization
This commit is contained in:
1 parent
52b73ee857
commit
94bc7ed322
9 files changed
+923
-222
No files matched your search
@@ -3,7 +3,8 @@ import type { JsonValue } from "../domain/jsonValue.js";
|
||||
import type { Result } from "../domain/result.js";
|
||||
import type {
|
||||
WebModuleFile,
|
||||
WebModuleResolution,
|
||||
WebModuleResolutionBatch,
|
||||
WebModuleResolutionRequest,
|
||||
WebModuleTraceInput,
|
||||
} from "../domain/webModuleTrace.js";
|
||||
import type { SelectedWebScriptArtifacts } from "../domain/webScriptArtifacts.js";
|
||||
@@ -29,26 +30,11 @@ export interface WebModuleArtifactPort {
|
||||
): Promise<Result<WebModuleArtifacts, AnalysisError>>;
|
||||
}
|
||||
|
||||
/** Resolve literal specifiers in a selected URL/map context without executing the selected application. */
|
||||
export interface WebModuleResolutionBatch {
|
||||
readonly engine: { readonly id: string; readonly version: string };
|
||||
readonly resolutions: readonly WebModuleResolution[];
|
||||
readonly diagnostics: readonly string[];
|
||||
readonly rawResult: JsonObject;
|
||||
}
|
||||
|
||||
/** Replaceable native resolution engine, with no provider protocol in callers. */
|
||||
export interface WebModuleResolutionPort {
|
||||
close?(): Promise<void>;
|
||||
resolve(
|
||||
input: {
|
||||
readonly importerUrl: string;
|
||||
readonly importMap: {
|
||||
readonly baseUrl: string;
|
||||
readonly value: JsonObject;
|
||||
} | null;
|
||||
readonly specifiers: readonly string[];
|
||||
},
|
||||
input: WebModuleResolutionRequest,
|
||||
options?: ExecutionOptions,
|
||||
): Promise<Result<WebModuleResolutionBatch, AnalysisError>>;
|
||||
}
|
||||
Reference in new issue
Block a user