@manifest-configuration-language/browser 0.3.26 → 0.3.27
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/index.d.ts +1 -1
- package/dist/mcl.wasm +1 -1
- package/dist/project.d.ts +4 -2
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +4 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { createMclRuntime, MclRuntimeError, } from "./runtime.js";
|
|
2
2
|
export type { MclOperation, MclResult, MclRuntime, MclProject, RuntimeStatus, RuntimeStatusEvent, RuntimeOperationOutcome, RuntimeOperationEvent, RuntimeOptions, } from "./runtime.js";
|
|
3
3
|
export { isValidProjectPath, isValidProjectFileSet, } from "./project.js";
|
|
4
|
-
export type { ProjectFile, ProjectFiles, RequestOptions, ProjectOperationOptions, ProjectCompletionOptions, ProjectNavigationOptions, ProjectRenameOptions, ProjectFileRenameOptions, } from "./project.js";
|
|
4
|
+
export type { ProjectFile, ProjectFiles, RequestOptions, ProjectOperationOptions, ProjectParametersOptions, ProjectCompletionOptions, ProjectNavigationOptions, ProjectRenameOptions, ProjectFileRenameOptions, } from "./project.js";
|
|
5
5
|
export { maxSourceBytes, maxSourceMapBytes, maxRenameNameLength, maxProjectFiles, maxProjectFileBytes, maxProjectBytes, maxProjectPathLength, maxProjectPathDepth, } from "./limits.js";
|
|
6
6
|
export type { CheckResult, CompletionItem, CompletionPosition, CompletionResult, DefinitionLocation, DefinitionResult, EvaluateResult, FormatResult, HoverInfo, HoverResult, LintCodeAction, LintDiagnostic, ParseResult, ReferenceLocation, ReferencesResult, RelatedLocation, RenderResult, RenameEdit, RenameFileImportsResult, RenameResult, SourceMap, SourceMapEntry, SourceMapOrigin, SourceRange, } from "./protocol.js";
|
package/dist/mcl.wasm
CHANGED
package/dist/project.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { maxProjectBytes, maxProjectFileBytes, maxProjectFiles, maxProjectPathDepth, maxProjectPathLength, maxSourceBytes } from "./limits.js";
|
|
2
|
-
import type { Request as WasmRequest } from "./protocol.js";
|
|
2
|
+
import type { Request as WasmRequest, RequestParameters } from "./protocol.js";
|
|
3
3
|
export type MclOperation = WasmRequest["operation"];
|
|
4
4
|
export { maxProjectBytes, maxProjectFileBytes, maxProjectFiles, maxProjectPathDepth, maxProjectPathLength, maxSourceBytes, };
|
|
5
5
|
/** Root-relative project files passed to MCL's in-memory session filesystem.
|
|
@@ -45,7 +45,9 @@ export interface RequestOptions {
|
|
|
45
45
|
}
|
|
46
46
|
export interface ProjectOperationOptions extends RequestOptions {
|
|
47
47
|
entrypoint?: string;
|
|
48
|
-
|
|
48
|
+
}
|
|
49
|
+
export interface ProjectParametersOptions extends ProjectOperationOptions {
|
|
50
|
+
parameters?: RequestParameters;
|
|
49
51
|
}
|
|
50
52
|
export interface PositionOptions {
|
|
51
53
|
line: number;
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ProjectFiles, RequestOptions, ProjectOperationOptions, ProjectCompletionOptions, ProjectNavigationOptions, ProjectRenameOptions, ProjectFileRenameOptions } from "./project.js";
|
|
1
|
+
import type { ProjectFiles, RequestOptions, ProjectOperationOptions, ProjectParametersOptions, ProjectCompletionOptions, ProjectNavigationOptions, ProjectRenameOptions, ProjectFileRenameOptions } from "./project.js";
|
|
2
2
|
import type { CheckResult, CompletionResult as ProtocolCompletionResult, DefinitionResult as ProtocolDefinitionResult, EvaluateResult, FormatResult, HoverResult as ProtocolHoverResult, LintDiagnostic as ProtocolLintDiagnostic, ParseResult, ReferencesResult as ProtocolReferencesResult, RenderResult, RenameResult as ProtocolRenameResult, RenameFileImportsResult as ProtocolRenameFileImportsResult, Request as WasmRequest, Error as ProtocolError } from "./protocol.js";
|
|
3
3
|
export type MclOperation = WasmRequest["operation"];
|
|
4
4
|
export type MclResult = ({
|
|
@@ -56,7 +56,7 @@ export interface MclProject {
|
|
|
56
56
|
set?: ProjectFiles;
|
|
57
57
|
delete?: string[];
|
|
58
58
|
}): MclProject;
|
|
59
|
-
run<O extends MclOperation>(operation: O, ...options: O extends "completion" ? [options: ProjectCompletionOptions] : O extends "definition" | "hover" | "references" ? [options: ProjectNavigationOptions] : O extends "rename" ? [options: ProjectRenameOptions] : O extends "renameFileImports" ? [options: ProjectFileRenameOptions] : [options?: ProjectOperationOptions]): Promise<Extract<MclResult, {
|
|
59
|
+
run<O extends MclOperation>(operation: O, ...options: O extends "completion" ? [options: ProjectCompletionOptions] : O extends "definition" | "hover" | "references" ? [options: ProjectNavigationOptions] : O extends "rename" ? [options: ProjectRenameOptions] : O extends "check" | "evaluate" | "render" ? [options?: ProjectParametersOptions] : O extends "renameFileImports" ? [options: ProjectFileRenameOptions] : [options?: ProjectOperationOptions]): Promise<Extract<MclResult, {
|
|
60
60
|
operation: O;
|
|
61
61
|
}>>;
|
|
62
62
|
}
|
package/dist/runtime.js
CHANGED
|
@@ -427,14 +427,12 @@ export function createMclRuntime(options = {}) {
|
|
|
427
427
|
throw new TypeError("parameters are only valid for check, evaluate, and render operations");
|
|
428
428
|
}
|
|
429
429
|
const parameters = requestOptions.parameters;
|
|
430
|
-
if (parameters === null ||
|
|
430
|
+
if (parameters === null ||
|
|
431
|
+
typeof parameters !== "object" ||
|
|
432
|
+
Array.isArray(parameters) ||
|
|
433
|
+
!isJSONValue(parameters)) {
|
|
431
434
|
throw new TypeError("parameters must be an object with JSON values");
|
|
432
435
|
}
|
|
433
|
-
for (const value of Object.values(parameters)) {
|
|
434
|
-
if (!isJSONValue(value)) {
|
|
435
|
-
throw new TypeError("parameters must be an object with JSON values");
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
436
|
}
|
|
439
437
|
// Validate renameFileImports paths eagerly so we never spin up a Worker.
|
|
440
438
|
if (operation === "renameFileImports") {
|
package/package.json
CHANGED