@vizejs/marquette 0.814.0 → 0.816.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,12 +1,39 @@
1
+ import { a as CapabilityId, t as ApplicationMarquette } from "./model-BcXukmxj.mjs";
1
2
  import { a as NativeBuildPlatform, c as NativeBuildProfileDiagnosticCode, d as NativeBuildUpdateSelection, i as NativeBuildDestination, l as NativeBuildSigning, n as NATIVE_BUILD_PROFILE_FORMAT_VERSION, o as NativeBuildProfile, r as NativeBuildConfiguration, s as NativeBuildProfileDiagnostic, t as NATIVE_BUILD_PROFILE_FORMAT, u as NativeBuildTarget } from "./native-build-model-D8hXpun_.mjs";
2
3
 
3
4
  //#region src/native-build.d.ts
5
+ /** Native client environment identifiers inferred from one application contract. */
6
+ type NativeApplicationEnvironmentId<Marquette extends ApplicationMarquette> = Marquette extends {
7
+ readonly environments: readonly (infer Environment)[];
8
+ } ? Environment extends {
9
+ readonly id: infer Id extends string;
10
+ readonly target: "native";
11
+ readonly consumer: "client";
12
+ } ? Id : never : never;
13
+ /** A native build profile whose environment and capabilities belong to the application. */
14
+ type NativeApplicationBuildProfile<Marquette extends ApplicationMarquette> = Omit<NativeBuildProfile, "environment" | "capabilities"> & {
15
+ /** Native client environment declared by the application marquette. */readonly environment: NativeApplicationEnvironmentId<Marquette>;
16
+ /**
17
+ * Application-declared capabilities required by this build profile.
18
+ *
19
+ * @default []
20
+ */
21
+ readonly capabilities?: readonly CapabilityId<Marquette>[];
22
+ };
4
23
  /**
5
24
  * Preserves literal profile, environment, platform, and capability types.
6
25
  *
7
26
  * The function returns its input unchanged so authoring has no runtime cost.
8
27
  */
9
28
  declare function defineNativeBuildProfile<const Profile extends NativeBuildProfile>(profile: Profile): Profile;
29
+ /**
30
+ * Preserves build-profile literals while inferring native environments and capabilities.
31
+ *
32
+ * The application argument supplies types only; this helper returns the profile
33
+ * unchanged. Use `admitNativeBuildProfile` from the separate admission entry when
34
+ * profiles cross an untrusted boundary or before scheduling an actual build.
35
+ */
36
+ declare function defineNativeApplicationBuildProfile<const Marquette extends ApplicationMarquette, const Profile extends NativeApplicationBuildProfile<Marquette>>(marquette: Marquette, profile: Profile): Profile;
10
37
  //#endregion
11
- export { NATIVE_BUILD_PROFILE_FORMAT, NATIVE_BUILD_PROFILE_FORMAT_VERSION, type NativeBuildConfiguration, type NativeBuildDestination, type NativeBuildPlatform, type NativeBuildProfile, type NativeBuildProfileDiagnostic, type NativeBuildProfileDiagnosticCode, type NativeBuildSigning, type NativeBuildTarget, type NativeBuildUpdateSelection, defineNativeBuildProfile };
38
+ export { NATIVE_BUILD_PROFILE_FORMAT, NATIVE_BUILD_PROFILE_FORMAT_VERSION, NativeApplicationBuildProfile, NativeApplicationEnvironmentId, type NativeBuildConfiguration, type NativeBuildDestination, type NativeBuildPlatform, type NativeBuildProfile, type NativeBuildProfileDiagnostic, type NativeBuildProfileDiagnosticCode, type NativeBuildSigning, type NativeBuildTarget, type NativeBuildUpdateSelection, defineNativeApplicationBuildProfile, defineNativeBuildProfile };
12
39
  //# sourceMappingURL=native-build.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"native-build.d.mts","names":[],"sources":["../src/native-build.ts"],"mappings":";;;;AAqBA;;;;iBAAgB,wBAAA,uBAA+C,kBAAA,EAC7D,OAAA,EAAS,OAAA,GACR,OAAA"}
1
+ {"version":3,"file":"native-build.d.mts","names":[],"sources":["../src/native-build.ts"],"mappings":";;;;;KAkBY,8BAAA,mBAAiD,oBAAA,IAC3D,SAAS;EAAA,SAAoB,YAAA;AAAA,IACzB,WAAA;EAAA,SACW,EAAA;EAAA,SACA,MAAA;EAAA,SACA,QAAA;AAAA,IAET,EAAA;;KAKI,6BAAA,mBAAgD,oBAAA,IAAwB,IAAA,CAClF,kBAAA;EAXI,gFAeK,WAAA,EAAa,8BAAA,CAA+B,SAAA;EAd5B;;;;;EAAA,SAoBhB,YAAA,YAAwB,YAAA,CAAa,SAAA;AAAA;;;;;;iBAQhC,wBAAA,uBAA+C,kBAAA,EAC7D,OAAA,EAAS,OAAA,GACR,OAAA;;;;;;;;iBAWa,mCAAA,yBACU,oBAAA,wBACF,6BAAA,CAA8B,SAAA,GACpD,SAAA,EAAW,SAAA,EAAW,OAAA,EAAS,OAAA,GAAU,OAAA"}
@@ -8,7 +8,17 @@ import { n as NATIVE_BUILD_PROFILE_FORMAT_VERSION, t as NATIVE_BUILD_PROFILE_FOR
8
8
  function defineNativeBuildProfile(profile) {
9
9
  return profile;
10
10
  }
11
+ /**
12
+ * Preserves build-profile literals while inferring native environments and capabilities.
13
+ *
14
+ * The application argument supplies types only; this helper returns the profile
15
+ * unchanged. Use `admitNativeBuildProfile` from the separate admission entry when
16
+ * profiles cross an untrusted boundary or before scheduling an actual build.
17
+ */
18
+ function defineNativeApplicationBuildProfile(marquette, profile) {
19
+ return profile;
20
+ }
11
21
  //#endregion
12
- export { NATIVE_BUILD_PROFILE_FORMAT, NATIVE_BUILD_PROFILE_FORMAT_VERSION, defineNativeBuildProfile };
22
+ export { NATIVE_BUILD_PROFILE_FORMAT, NATIVE_BUILD_PROFILE_FORMAT_VERSION, defineNativeApplicationBuildProfile, defineNativeBuildProfile };
13
23
 
14
24
  //# sourceMappingURL=native-build.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"native-build.mjs","names":[],"sources":["../src/native-build.ts"],"sourcesContent":["export {\n NATIVE_BUILD_PROFILE_FORMAT,\n NATIVE_BUILD_PROFILE_FORMAT_VERSION,\n type NativeBuildConfiguration,\n type NativeBuildDestination,\n type NativeBuildPlatform,\n type NativeBuildProfile,\n type NativeBuildProfileDiagnostic,\n type NativeBuildProfileDiagnosticCode,\n type NativeBuildSigning,\n type NativeBuildTarget,\n type NativeBuildUpdateSelection,\n} from \"./native-build-model.js\";\n\nimport type { NativeBuildProfile } from \"./native-build-model.js\";\n\n/**\n * Preserves literal profile, environment, platform, and capability types.\n *\n * The function returns its input unchanged so authoring has no runtime cost.\n */\nexport function defineNativeBuildProfile<const Profile extends NativeBuildProfile>(\n profile: Profile,\n): Profile {\n return profile;\n}\n"],"mappings":";;;;;;;AAqBA,SAAgB,yBACd,SACS;CACT,OAAO;AACT"}
1
+ {"version":3,"file":"native-build.mjs","names":[],"sources":["../src/native-build.ts"],"sourcesContent":["export {\n NATIVE_BUILD_PROFILE_FORMAT,\n NATIVE_BUILD_PROFILE_FORMAT_VERSION,\n type NativeBuildConfiguration,\n type NativeBuildDestination,\n type NativeBuildPlatform,\n type NativeBuildProfile,\n type NativeBuildProfileDiagnostic,\n type NativeBuildProfileDiagnosticCode,\n type NativeBuildSigning,\n type NativeBuildTarget,\n type NativeBuildUpdateSelection,\n} from \"./native-build-model.js\";\n\nimport type { NativeBuildProfile } from \"./native-build-model.js\";\nimport type { ApplicationMarquette, CapabilityId } from \"./model.js\";\n\n/** Native client environment identifiers inferred from one application contract. */\nexport type NativeApplicationEnvironmentId<Marquette extends ApplicationMarquette> =\n Marquette extends { readonly environments: readonly (infer Environment)[] }\n ? Environment extends {\n readonly id: infer Id extends string;\n readonly target: \"native\";\n readonly consumer: \"client\";\n }\n ? Id\n : never\n : never;\n\n/** A native build profile whose environment and capabilities belong to the application. */\nexport type NativeApplicationBuildProfile<Marquette extends ApplicationMarquette> = Omit<\n NativeBuildProfile,\n \"environment\" | \"capabilities\"\n> & {\n /** Native client environment declared by the application marquette. */\n readonly environment: NativeApplicationEnvironmentId<Marquette>;\n /**\n * Application-declared capabilities required by this build profile.\n *\n * @default []\n */\n readonly capabilities?: readonly CapabilityId<Marquette>[];\n};\n\n/**\n * Preserves literal profile, environment, platform, and capability types.\n *\n * The function returns its input unchanged so authoring has no runtime cost.\n */\nexport function defineNativeBuildProfile<const Profile extends NativeBuildProfile>(\n profile: Profile,\n): Profile {\n return profile;\n}\n\n/**\n * Preserves build-profile literals while inferring native environments and capabilities.\n *\n * The application argument supplies types only; this helper returns the profile\n * unchanged. Use `admitNativeBuildProfile` from the separate admission entry when\n * profiles cross an untrusted boundary or before scheduling an actual build.\n */\nexport function defineNativeApplicationBuildProfile<\n const Marquette extends ApplicationMarquette,\n const Profile extends NativeApplicationBuildProfile<Marquette>,\n>(marquette: Marquette, profile: Profile): Profile {\n void marquette;\n return profile;\n}\n"],"mappings":";;;;;;;AAiDA,SAAgB,yBACd,SACS;CACT,OAAO;AACT;;;;;;;;AASA,SAAgB,oCAGd,WAAsB,SAA2B;CAEjD,OAAO;AACT"}
@@ -1,4 +1,4 @@
1
- import { _ as RouteId, s as EnvironmentId, t as ApplicationMarquette } from "./model-B_mM8AeH.mjs";
1
+ import { _ as RouteId, s as EnvironmentId, t as ApplicationMarquette } from "./model-BcXukmxj.mjs";
2
2
  import { NavigationParameters, ResolvedNavigationTarget } from "./navigation.mjs";
3
3
 
4
4
  //#region src/navigation-links.d.ts
@@ -1,4 +1,4 @@
1
- import { _ as RouteId, f as MarquetteRoute, t as ApplicationMarquette } from "./model-B_mM8AeH.mjs";
1
+ import { _ as RouteId, f as MarquetteRoute, t as ApplicationMarquette } from "./model-BcXukmxj.mjs";
2
2
 
3
3
  //#region src/navigation.d.ts
4
4
  /** Scalar accepted by one authored route-path parameter. */
@@ -1,4 +1,4 @@
1
- import { t as ApplicationMarquette } from "./model-B_mM8AeH.mjs";
1
+ import { t as ApplicationMarquette } from "./model-BcXukmxj.mjs";
2
2
 
3
3
  //#region src/validate.d.ts
4
4
  /** Severity of an application-marquette diagnostic. */
package/dist/validate.mjs CHANGED
@@ -24,8 +24,8 @@ function validateApplicationMarquette(marquette) {
24
24
  const path = contractPath("capabilities", key);
25
25
  validateIdentifier(key, path, "VIZE_MARQUETTE_003", diagnostics);
26
26
  if (key !== capability.id) diagnostics.push(error("VIZE_MARQUETTE_004", path, "capability map key must equal capability.id"));
27
- const version = capability.version ?? 1;
28
- if (!Number.isInteger(version) || version < 1) diagnostics.push(error("VIZE_MARQUETTE_005", path, "capability version must be greater than zero"));
27
+ const version = capability.version === void 0 ? 1 : capability.version;
28
+ if (!Number.isInteger(version) || version < 1 || version > 4294967295) diagnostics.push(error("VIZE_MARQUETTE_005", path, version === 0 ? "capability version must be greater than zero" : "capability version must be a positive unsigned 32-bit integer"));
29
29
  if (capability.description.trim().length === 0) diagnostics.push(error("VIZE_MARQUETTE_024", path, "capability description must not be empty"));
30
30
  }
31
31
  const environmentIds = collectUniqueIds("environments", environments, diagnostics);
@@ -1 +1 @@
1
- {"version":3,"file":"validate.mjs","names":[],"sources":["../src/validate.ts"],"sourcesContent":["import type {\n ApplicationMarquette,\n MARQUETTE_FORMAT_VERSION,\n MarquetteEnvironment,\n MarquetteRoute,\n MarquetteTarget,\n RenderingMode,\n} from \"./model.js\";\n\n/** Severity of an application-marquette diagnostic. */\nexport type MarquetteDiagnosticSeverity = \"error\" | \"warning\";\n\n/** Stable, source-addressable application-marquette diagnostic. */\nexport interface MarquetteDiagnostic {\n /** Stable machine-readable diagnostic code. */\n readonly code: `VIZE_MARQUETTE_${string}`;\n /** Severity used by CLI, editor, test, and CI consumers. */\n readonly severity: MarquetteDiagnosticSeverity;\n /** JSON-style path into the authored marquette. */\n readonly path: string;\n /** Human-readable explanation and next action. */\n readonly message: string;\n}\n\nconst IDENTIFIER = /^[a-z0-9][a-z0-9._-]*$/;\nconst SUPPORTED_FORMAT_VERSION: typeof MARQUETTE_FORMAT_VERSION = 1;\n\n/**\n * Validates a complete application marquette.\n *\n * Diagnostics cover structural, reference, capability, target, and dependency\n * invariants. Results are sorted by path, code, and message so identical input\n * produces stable editor, CLI, test, and CI output.\n *\n * This function does not mutate the authored object and does not throw.\n */\nexport function validateApplicationMarquette(\n marquette: ApplicationMarquette,\n): MarquetteDiagnostic[] {\n const diagnostics: MarquetteDiagnostic[] = [];\n const environments = marquette.environments ?? [];\n const backends = marquette.backends ?? [];\n const protocols = marquette.protocols ?? [];\n const routes = marquette.routes ?? [];\n const targets = new Set(marquette.targets ?? []);\n const capabilityIds = new Set(Object.keys(marquette.capabilities ?? {}));\n\n if ((marquette.formatVersion ?? SUPPORTED_FORMAT_VERSION) !== SUPPORTED_FORMAT_VERSION) {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_001\", \"formatVersion\", \"unsupported marquette format version\"),\n );\n }\n\n validateIdentifier(marquette.application, \"application\", \"VIZE_MARQUETTE_002\", diagnostics);\n\n for (const [key, capability] of Object.entries(marquette.capabilities ?? {})) {\n const path = contractPath(\"capabilities\", key);\n validateIdentifier(key, path, \"VIZE_MARQUETTE_003\", diagnostics);\n if (key !== capability.id) {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_004\", path, \"capability map key must equal capability.id\"),\n );\n }\n const version = capability.version ?? 1;\n if (!Number.isInteger(version) || version < 1) {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_005\", path, \"capability version must be greater than zero\"),\n );\n }\n if (capability.description.trim().length === 0) {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_024\", path, \"capability description must not be empty\"),\n );\n }\n }\n\n const environmentIds = collectUniqueIds(\"environments\", environments, diagnostics);\n const backendIds = collectUniqueIds(\"backends\", backends, diagnostics);\n const protocolIds = collectUniqueIds(\"protocols\", protocols, diagnostics);\n collectUniqueIds(\"routes\", routes, diagnostics);\n\n for (const environment of environments) {\n const path = contractPath(\"environments\", environment.id);\n if (!targets.has(environment.target)) {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_007\", path, \"environment target must be declared in targets\"),\n );\n }\n for (const dependency of [...new Set(environment.dependsOn ?? [])].sort()) {\n if (dependency === environment.id) {\n diagnostics.push(error(\"VIZE_MARQUETTE_008\", path, \"environment cannot depend on itself\"));\n } else if (!environmentIds.has(dependency)) {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_009\", path, \"environment dependency does not exist\"),\n );\n }\n }\n validateCapabilities(path, environment.capabilities, capabilityIds, diagnostics);\n\n if (\n environment.consumer === \"client\" &&\n (environment.runtime === \"rust\" ||\n environment.runtime === \"go\" ||\n environment.runtime === \"jvm\")\n ) {\n diagnostics.push(\n warning(\n \"VIZE_MARQUETTE_010\",\n path,\n \"client environment uses a server-oriented runtime; declare an adapter capability if this is intentional\",\n ),\n );\n }\n }\n\n validateEnvironmentCycles(environments, diagnostics);\n\n for (const backend of backends) {\n const path = contractPath(\"backends\", backend.id);\n if (backend.environment != null) {\n const environment = environments.find((candidate) => candidate.id === backend.environment);\n if (environment == null) {\n diagnostics.push(error(\"VIZE_MARQUETTE_011\", path, \"backend environment does not exist\"));\n } else if (environment.consumer !== \"server\") {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_012\", path, \"backend environment must be a server consumer\"),\n );\n }\n }\n validateCapabilities(path, backend.capabilities, capabilityIds, diagnostics);\n }\n\n for (const protocol of protocols) {\n const path = contractPath(\"protocols\", protocol.id);\n if (!backendIds.has(protocol.backend)) {\n diagnostics.push(error(\"VIZE_MARQUETTE_013\", path, \"protocol backend does not exist\"));\n }\n validateCapabilities(path, protocol.capabilities, capabilityIds, diagnostics);\n }\n\n const routePaths = new Map<string, string>();\n for (const route of routes) {\n const path = contractPath(\"routes\", route.id);\n if (!route.path.startsWith(\"/\")) {\n diagnostics.push(error(\"VIZE_MARQUETTE_014\", path, \"route path must start with /\"));\n }\n const environment = environments.find((candidate) => candidate.id === route.environment);\n if (environment == null) {\n diagnostics.push(error(\"VIZE_MARQUETTE_015\", path, \"route environment does not exist\"));\n }\n if (route.backend != null && !backendIds.has(route.backend)) {\n diagnostics.push(error(\"VIZE_MARQUETTE_016\", path, \"route backend does not exist\"));\n }\n if (route.protocol != null) {\n const protocol = protocols.find((candidate) => candidate.id === route.protocol);\n if (!protocolIds.has(route.protocol) || protocol == null) {\n diagnostics.push(error(\"VIZE_MARQUETTE_017\", path, \"route protocol does not exist\"));\n } else if (route.backend != null && protocol.backend !== route.backend) {\n diagnostics.push(\n error(\n \"VIZE_MARQUETTE_018\",\n path,\n \"route protocol and backend must refer to the same service\",\n ),\n );\n }\n }\n if (environment != null && !renderingMatchesTarget(route, environment.target)) {\n diagnostics.push(\n error(\n \"VIZE_MARQUETTE_023\",\n path,\n \"rendering mode is not compatible with the route environment target\",\n ),\n );\n }\n validateCapabilities(path, route.capabilities, capabilityIds, diagnostics);\n\n const routeKey = `${route.environment}\\u0000${route.path}`;\n const previous = routePaths.get(routeKey);\n if (previous != null) {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_019\", path, `route path is already used by route \"${previous}\"`),\n );\n }\n routePaths.set(routeKey, route.id);\n }\n\n for (const target of targets) {\n if (!environments.some((environment) => environment.target === target)) {\n diagnostics.push(\n warning(\"VIZE_MARQUETTE_020\", \"targets\", \"declared target has no environment\"),\n );\n }\n }\n\n return diagnostics.sort(compareDiagnostics);\n}\n\nfunction collectUniqueIds(\n collection: string,\n values: readonly { readonly id: string }[],\n diagnostics: MarquetteDiagnostic[],\n): Set<string> {\n const ids = new Set<string>();\n for (const value of values) {\n const path = contractPath(collection, value.id);\n validateIdentifier(value.id, path, \"VIZE_MARQUETTE_006\", diagnostics);\n if (ids.has(value.id)) {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_006\", path, \"identifier must be unique within its collection\"),\n );\n }\n ids.add(value.id);\n }\n return ids;\n}\n\nfunction validateIdentifier(\n id: string,\n path: string,\n code: `VIZE_MARQUETTE_${string}`,\n diagnostics: MarquetteDiagnostic[],\n): void {\n if (!IDENTIFIER.test(id)) {\n diagnostics.push(\n error(\n code,\n path,\n \"identifier must use lowercase ASCII letters, digits, dash, underscore, or dot\",\n ),\n );\n }\n}\n\nfunction validateCapabilities(\n path: string,\n capabilities: readonly string[] | undefined,\n declared: ReadonlySet<string>,\n diagnostics: MarquetteDiagnostic[],\n): void {\n for (const capability of [...new Set(capabilities ?? [])].sort()) {\n if (!declared.has(capability)) {\n diagnostics.push(error(\"VIZE_MARQUETTE_021\", path, \"referenced capability is not declared\"));\n }\n }\n}\n\nfunction validateEnvironmentCycles(\n environments: readonly MarquetteEnvironment[],\n diagnostics: MarquetteDiagnostic[],\n): void {\n const graph = new Map(environments.map((value) => [value.id, value.dependsOn ?? []]));\n const visiting = new Set<string>();\n const visited = new Set<string>();\n\n for (const id of [...graph.keys()].sort()) {\n if (hasCycle(id, graph, visiting, visited)) {\n diagnostics.push(\n error(\n \"VIZE_MARQUETTE_022\",\n contractPath(\"environments\", id),\n \"environment dependency graph must be acyclic\",\n ),\n );\n }\n }\n}\n\nfunction hasCycle(\n id: string,\n graph: ReadonlyMap<string, readonly string[]>,\n visiting: Set<string>,\n visited: Set<string>,\n): boolean {\n if (visited.has(id)) return false;\n if (visiting.has(id)) return true;\n visiting.add(id);\n const cyclic = [...(graph.get(id) ?? [])]\n .sort()\n .some((dependency) => graph.has(dependency) && hasCycle(dependency, graph, visiting, visited));\n visiting.delete(id);\n visited.add(id);\n return cyclic;\n}\n\nfunction renderingMatchesTarget(route: MarquetteRoute, target: MarquetteTarget): boolean {\n const targetRendering: Partial<Record<RenderingMode, MarquetteTarget>> = {\n native: \"native\",\n desktop: \"desktop\",\n terminal: \"terminal\",\n };\n return (targetRendering[route.rendering] ?? \"web\") === target;\n}\n\nfunction compareDiagnostics(left: MarquetteDiagnostic, right: MarquetteDiagnostic): number {\n return (\n compareText(left.path, right.path) ||\n compareText(left.code, right.code) ||\n compareText(left.message, right.message)\n );\n}\n\nfunction compareText(left: string, right: string): number {\n return left < right ? -1 : left > right ? 1 : 0;\n}\n\nfunction contractPath(collection: string, id: string): string {\n return `${collection}.${id}`;\n}\n\nfunction error(\n code: `VIZE_MARQUETTE_${string}`,\n path: string,\n message: string,\n): MarquetteDiagnostic {\n return { code, severity: \"error\", path, message };\n}\n\nfunction warning(\n code: `VIZE_MARQUETTE_${string}`,\n path: string,\n message: string,\n): MarquetteDiagnostic {\n return { code, severity: \"warning\", path, message };\n}\n"],"mappings":";AAwBA,MAAM,aAAa;AACnB,MAAM,2BAA4D;;;;;;;;;;AAWlE,SAAgB,6BACd,WACuB;CACvB,MAAM,cAAqC,CAAC;CAC5C,MAAM,eAAe,UAAU,gBAAgB,CAAC;CAChD,MAAM,WAAW,UAAU,YAAY,CAAC;CACx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,uBAAuB,OAAuB,QAAkC;CAMvF,QAAQ;EAJN,QAAQ;EACR,SAAS;EACT,UAAU;CAEU,EAAE,MAAM,cAAc,WAAW;AACzD;AAEA,SAAS,mBAAmB,MAA2B,OAAoC;CACzF,OACE,YAAY,KAAK,MAAM,MAAM,IAAI,KACjC,YAAY,KAAK,MAAM,MAAM,IAAI,KACjC,YAAY,KAAK,SAAS,MAAM,OAAO;AAE3C;AAEA,SAAS,YAAY,MAAc,OAAuB;CACxD,OAAO,OAAO,QAAQ,KAAK,OAAO,QAAQ,IAAI;AAChD;AAEA,SAAS,aAAa,YAAoB,IAAoB;CAC5D,OAAO,GAAG,WAAW,GAAG;AAC1B;AAEA,SAAS,MACP,MACA,MACA,SACqB;CACrB,OAAO;EAAE;EAAM,UAAU;EAAS;EAAM;CAAQ;AAClD;AAEA,SAAS,QACP,MACA,MACA,SACqB;CACrB,OAAO;EAAE;EAAM,UAAU;EAAW;EAAM;CAAQ;AACpD"}
1
+ {"version":3,"file":"validate.mjs","names":[],"sources":["../src/validate.ts"],"sourcesContent":["import type {\n ApplicationMarquette,\n MARQUETTE_FORMAT_VERSION,\n MarquetteEnvironment,\n MarquetteRoute,\n MarquetteTarget,\n RenderingMode,\n} from \"./model.js\";\n\n/** Severity of an application-marquette diagnostic. */\nexport type MarquetteDiagnosticSeverity = \"error\" | \"warning\";\n\n/** Stable, source-addressable application-marquette diagnostic. */\nexport interface MarquetteDiagnostic {\n /** Stable machine-readable diagnostic code. */\n readonly code: `VIZE_MARQUETTE_${string}`;\n /** Severity used by CLI, editor, test, and CI consumers. */\n readonly severity: MarquetteDiagnosticSeverity;\n /** JSON-style path into the authored marquette. */\n readonly path: string;\n /** Human-readable explanation and next action. */\n readonly message: string;\n}\n\nconst IDENTIFIER = /^[a-z0-9][a-z0-9._-]*$/;\nconst SUPPORTED_FORMAT_VERSION: typeof MARQUETTE_FORMAT_VERSION = 1;\n\n/**\n * Validates a complete application marquette.\n *\n * Diagnostics cover structural, reference, capability, target, and dependency\n * invariants. Results are sorted by path, code, and message so identical input\n * produces stable editor, CLI, test, and CI output.\n *\n * This function does not mutate the authored object and does not throw.\n */\nexport function validateApplicationMarquette(\n marquette: ApplicationMarquette,\n): MarquetteDiagnostic[] {\n const diagnostics: MarquetteDiagnostic[] = [];\n const environments = marquette.environments ?? [];\n const backends = marquette.backends ?? [];\n const protocols = marquette.protocols ?? [];\n const routes = marquette.routes ?? [];\n const targets = new Set(marquette.targets ?? []);\n const capabilityIds = new Set(Object.keys(marquette.capabilities ?? {}));\n\n if ((marquette.formatVersion ?? SUPPORTED_FORMAT_VERSION) !== SUPPORTED_FORMAT_VERSION) {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_001\", \"formatVersion\", \"unsupported marquette format version\"),\n );\n }\n\n validateIdentifier(marquette.application, \"application\", \"VIZE_MARQUETTE_002\", diagnostics);\n\n for (const [key, capability] of Object.entries(marquette.capabilities ?? {})) {\n const path = contractPath(\"capabilities\", key);\n validateIdentifier(key, path, \"VIZE_MARQUETTE_003\", diagnostics);\n if (key !== capability.id) {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_004\", path, \"capability map key must equal capability.id\"),\n );\n }\n const version = capability.version === undefined ? 1 : capability.version;\n if (!Number.isInteger(version) || version < 1 || version > 0xffff_ffff) {\n diagnostics.push(\n error(\n \"VIZE_MARQUETTE_005\",\n path,\n version === 0\n ? \"capability version must be greater than zero\"\n : \"capability version must be a positive unsigned 32-bit integer\",\n ),\n );\n }\n if (capability.description.trim().length === 0) {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_024\", path, \"capability description must not be empty\"),\n );\n }\n }\n\n const environmentIds = collectUniqueIds(\"environments\", environments, diagnostics);\n const backendIds = collectUniqueIds(\"backends\", backends, diagnostics);\n const protocolIds = collectUniqueIds(\"protocols\", protocols, diagnostics);\n collectUniqueIds(\"routes\", routes, diagnostics);\n\n for (const environment of environments) {\n const path = contractPath(\"environments\", environment.id);\n if (!targets.has(environment.target)) {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_007\", path, \"environment target must be declared in targets\"),\n );\n }\n for (const dependency of [...new Set(environment.dependsOn ?? [])].sort()) {\n if (dependency === environment.id) {\n diagnostics.push(error(\"VIZE_MARQUETTE_008\", path, \"environment cannot depend on itself\"));\n } else if (!environmentIds.has(dependency)) {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_009\", path, \"environment dependency does not exist\"),\n );\n }\n }\n validateCapabilities(path, environment.capabilities, capabilityIds, diagnostics);\n\n if (\n environment.consumer === \"client\" &&\n (environment.runtime === \"rust\" ||\n environment.runtime === \"go\" ||\n environment.runtime === \"jvm\")\n ) {\n diagnostics.push(\n warning(\n \"VIZE_MARQUETTE_010\",\n path,\n \"client environment uses a server-oriented runtime; declare an adapter capability if this is intentional\",\n ),\n );\n }\n }\n\n validateEnvironmentCycles(environments, diagnostics);\n\n for (const backend of backends) {\n const path = contractPath(\"backends\", backend.id);\n if (backend.environment != null) {\n const environment = environments.find((candidate) => candidate.id === backend.environment);\n if (environment == null) {\n diagnostics.push(error(\"VIZE_MARQUETTE_011\", path, \"backend environment does not exist\"));\n } else if (environment.consumer !== \"server\") {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_012\", path, \"backend environment must be a server consumer\"),\n );\n }\n }\n validateCapabilities(path, backend.capabilities, capabilityIds, diagnostics);\n }\n\n for (const protocol of protocols) {\n const path = contractPath(\"protocols\", protocol.id);\n if (!backendIds.has(protocol.backend)) {\n diagnostics.push(error(\"VIZE_MARQUETTE_013\", path, \"protocol backend does not exist\"));\n }\n validateCapabilities(path, protocol.capabilities, capabilityIds, diagnostics);\n }\n\n const routePaths = new Map<string, string>();\n for (const route of routes) {\n const path = contractPath(\"routes\", route.id);\n if (!route.path.startsWith(\"/\")) {\n diagnostics.push(error(\"VIZE_MARQUETTE_014\", path, \"route path must start with /\"));\n }\n const environment = environments.find((candidate) => candidate.id === route.environment);\n if (environment == null) {\n diagnostics.push(error(\"VIZE_MARQUETTE_015\", path, \"route environment does not exist\"));\n }\n if (route.backend != null && !backendIds.has(route.backend)) {\n diagnostics.push(error(\"VIZE_MARQUETTE_016\", path, \"route backend does not exist\"));\n }\n if (route.protocol != null) {\n const protocol = protocols.find((candidate) => candidate.id === route.protocol);\n if (!protocolIds.has(route.protocol) || protocol == null) {\n diagnostics.push(error(\"VIZE_MARQUETTE_017\", path, \"route protocol does not exist\"));\n } else if (route.backend != null && protocol.backend !== route.backend) {\n diagnostics.push(\n error(\n \"VIZE_MARQUETTE_018\",\n path,\n \"route protocol and backend must refer to the same service\",\n ),\n );\n }\n }\n if (environment != null && !renderingMatchesTarget(route, environment.target)) {\n diagnostics.push(\n error(\n \"VIZE_MARQUETTE_023\",\n path,\n \"rendering mode is not compatible with the route environment target\",\n ),\n );\n }\n validateCapabilities(path, route.capabilities, capabilityIds, diagnostics);\n\n const routeKey = `${route.environment}\\u0000${route.path}`;\n const previous = routePaths.get(routeKey);\n if (previous != null) {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_019\", path, `route path is already used by route \"${previous}\"`),\n );\n }\n routePaths.set(routeKey, route.id);\n }\n\n for (const target of targets) {\n if (!environments.some((environment) => environment.target === target)) {\n diagnostics.push(\n warning(\"VIZE_MARQUETTE_020\", \"targets\", \"declared target has no environment\"),\n );\n }\n }\n\n return diagnostics.sort(compareDiagnostics);\n}\n\nfunction collectUniqueIds(\n collection: string,\n values: readonly { readonly id: string }[],\n diagnostics: MarquetteDiagnostic[],\n): Set<string> {\n const ids = new Set<string>();\n for (const value of values) {\n const path = contractPath(collection, value.id);\n validateIdentifier(value.id, path, \"VIZE_MARQUETTE_006\", diagnostics);\n if (ids.has(value.id)) {\n diagnostics.push(\n error(\"VIZE_MARQUETTE_006\", path, \"identifier must be unique within its collection\"),\n );\n }\n ids.add(value.id);\n }\n return ids;\n}\n\nfunction validateIdentifier(\n id: string,\n path: string,\n code: `VIZE_MARQUETTE_${string}`,\n diagnostics: MarquetteDiagnostic[],\n): void {\n if (!IDENTIFIER.test(id)) {\n diagnostics.push(\n error(\n code,\n path,\n \"identifier must use lowercase ASCII letters, digits, dash, underscore, or dot\",\n ),\n );\n }\n}\n\nfunction validateCapabilities(\n path: string,\n capabilities: readonly string[] | undefined,\n declared: ReadonlySet<string>,\n diagnostics: MarquetteDiagnostic[],\n): void {\n for (const capability of [...new Set(capabilities ?? [])].sort()) {\n if (!declared.has(capability)) {\n diagnostics.push(error(\"VIZE_MARQUETTE_021\", path, \"referenced capability is not declared\"));\n }\n }\n}\n\nfunction validateEnvironmentCycles(\n environments: readonly MarquetteEnvironment[],\n diagnostics: MarquetteDiagnostic[],\n): void {\n const graph = new Map(environments.map((value) => [value.id, value.dependsOn ?? []]));\n const visiting = new Set<string>();\n const visited = new Set<string>();\n\n for (const id of [...graph.keys()].sort()) {\n if (hasCycle(id, graph, visiting, visited)) {\n diagnostics.push(\n error(\n \"VIZE_MARQUETTE_022\",\n contractPath(\"environments\", id),\n \"environment dependency graph must be acyclic\",\n ),\n );\n }\n }\n}\n\nfunction hasCycle(\n id: string,\n graph: ReadonlyMap<string, readonly string[]>,\n visiting: Set<string>,\n visited: Set<string>,\n): boolean {\n if (visited.has(id)) return false;\n if (visiting.has(id)) return true;\n visiting.add(id);\n const cyclic = [...(graph.get(id) ?? [])]\n .sort()\n .some((dependency) => graph.has(dependency) && hasCycle(dependency, graph, visiting, visited));\n visiting.delete(id);\n visited.add(id);\n return cyclic;\n}\n\nfunction renderingMatchesTarget(route: MarquetteRoute, target: MarquetteTarget): boolean {\n const targetRendering: Partial<Record<RenderingMode, MarquetteTarget>> = {\n native: \"native\",\n desktop: \"desktop\",\n terminal: \"terminal\",\n };\n return (targetRendering[route.rendering] ?? \"web\") === target;\n}\n\nfunction compareDiagnostics(left: MarquetteDiagnostic, right: MarquetteDiagnostic): number {\n return (\n compareText(left.path, right.path) ||\n compareText(left.code, right.code) ||\n compareText(left.message, right.message)\n );\n}\n\nfunction compareText(left: string, right: string): number {\n return left < right ? -1 : left > right ? 1 : 0;\n}\n\nfunction contractPath(collection: string, id: string): string {\n return `${collection}.${id}`;\n}\n\nfunction error(\n code: `VIZE_MARQUETTE_${string}`,\n path: string,\n message: string,\n): MarquetteDiagnostic {\n return { code, severity: \"error\", path, message };\n}\n\nfunction warning(\n code: `VIZE_MARQUETTE_${string}`,\n path: string,\n message: string,\n): MarquetteDiagnostic {\n return { code, severity: \"warning\", path, message };\n}\n"],"mappings":";AAwBA,MAAM,aAAa;AACnB,MAAM,2BAA4D;;;;;;;;;;AAWlE,SAAgB,6BACd,WACuB;CACvB,MAAM,cAAqC,CAAC;CAC5C,MAAM,eAAe,UAAU,gBAAgB,CAAC;CAChD,MAAM,WAAW,UAAU,YAAY,CAAC;CACxC,MAAM,YAAY,UAAU,aAAa,CAAC;CAC1C,MAAM,SAAS,UAAU,UAAU,CAAC;CACpC,MAAM,UAAU,IAAI,IAAI,UAAU,WAAW,CAAC,CAAC;CAC/C,MAAM,gBAAgB,IAAI,IAAI,OAAO,KAAK,UAAU,gBAAgB,CAAC,CAAC,CAAC;CAEvE,KAAK,UAAU,iBAAiB,8BAA8B,0BAC5D,YAAY,KACV,MAAM,sBAAsB,iBAAiB,sCAAsC,CACrF;CAGF,mBAAmB,UAAU,aAAa,eAAe,sBAAsB,WAAW;CAE1F,KAAK,MAAM,CAAC,KAAK,eAAe,OAAO,QAAQ,UAAU,gBAAgB,CAAC,CAAC,GAAG;EAC5E,MAAM,OAAO,aAAa,gBAAgB,GAAG;EAC7C,mBAAmB,KAAK,MAAM,sBAAsB,WAAW;EAC/D,IAAI,QAAQ,WAAW,IACrB,YAAY,KACV,MAAM,sBAAsB,MAAM,6CAA6C,CACjF;EAEF,MAAM,UAAU,WAAW,YAAY,KAAA,IAAY,IAAI,WAAW;EAClE,IAAI,CAAC,OAAO,UAAU,OAAO,KAAK,UAAU,KAAK,UAAU,YACzD,YAAY,KACV,MACE,sBACA,MACA,YAAY,IACR,iDACA,+DACN,CACF;EAEF,IAAI,WAAW,YAAY,KAAK,EAAE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,SAAS,IAAI,OAAO,UAAU,OAAO,GACvC,YAAY,KACV,MACE,sBACA,aAAa,gBAAgB,EAAE,GAC/B,8CACF,CACF;AAGN;AAEA,SAAS,SACP,IACA,OACA,UACA,SACS;CACT,IAAI,QAAQ,IAAI,EAAE,GAAG,OAAO;CAC5B,IAAI,SAAS,IAAI,EAAE,GAAG,OAAO;CAC7B,SAAS,IAAI,EAAE;CACf,MAAM,SAAS,CAAC,GAAI,MAAM,IAAI,EAAE,KAAK,CAAC,CAAE,EACrC,KAAK,EACL,MAAM,eAAe,MAAM,IAAI,UAAU,KAAK,SAAS,YAAY,OAAO,UAAU,OAAO,CAAC;CAC/F,SAAS,OAAO,EAAE;CAClB,QAAQ,IAAI,EAAE;CACd,OAAO;AACT;AAEA,SAAS,uBAAuB,OAAuB,QAAkC;CAMvF,QAAQ;EAJN,QAAQ;EACR,SAAS;EACT,UAAU;CAEU,EAAE,MAAM,cAAc,WAAW;AACzD;AAEA,SAAS,mBAAmB,MAA2B,OAAoC;CACzF,OACE,YAAY,KAAK,MAAM,MAAM,IAAI,KACjC,YAAY,KAAK,MAAM,MAAM,IAAI,KACjC,YAAY,KAAK,SAAS,MAAM,OAAO;AAE3C;AAEA,SAAS,YAAY,MAAc,OAAuB;CACxD,OAAO,OAAO,QAAQ,KAAK,OAAO,QAAQ,IAAI;AAChD;AAEA,SAAS,aAAa,YAAoB,IAAoB;CAC5D,OAAO,GAAG,WAAW,GAAG;AAC1B;AAEA,SAAS,MACP,MACA,MACA,SACqB;CACrB,OAAO;EAAE;EAAM,UAAU;EAAS;EAAM;CAAQ;AAClD;AAEA,SAAS,QACP,MACA,MACA,SACqB;CACrB,OAAO;EAAE;EAAM,UAAU;EAAW;EAAM;CAAQ;AACpD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizejs/marquette",
3
- "version": "0.814.0",
3
+ "version": "0.816.0",
4
4
  "description": "Typed application marquettes for every Vize target",
5
5
  "keywords": [
6
6
  "application-contract",
@@ -52,6 +52,11 @@
52
52
  "import": "./dist/native-build-validate.mjs",
53
53
  "default": "./dist/native-build-validate.mjs"
54
54
  },
55
+ "./native-build/admission": {
56
+ "types": "./dist/native-build-admission.d.mts",
57
+ "import": "./dist/native-build-admission.mjs",
58
+ "default": "./dist/native-build-admission.mjs"
59
+ },
55
60
  "./navigation": {
56
61
  "types": "./dist/navigation.d.mts",
57
62
  "import": "./dist/navigation.mjs",
@@ -143,6 +143,12 @@ const tasks = {
143
143
  "arguments": [
144
144
  "scripts/check-size.ts"
145
145
  ]
146
+ },
147
+ {
148
+ "program": "node",
149
+ "arguments": [
150
+ "scripts/check-documentation.ts"
151
+ ]
146
152
  }
147
153
  ],
148
154
  "check": [