UNPKG

everything-dev

Version:

A consolidated product package for building Module Federation apps with oRPC APIs.

1 lines • 3.61 kB
{"version":3,"file":"manifest-schema.mjs","names":[],"sources":["../../../src/services/platform/manifest-schema.ts"],"sourcesContent":["/**\n * The platform release manifest's wire schema (ADR 0034) — a leaf module so\n * the registry's resolution machine and the manifest's composer can both\n * import it without a cycle. The composer, inventory, compat gate, and\n * resolution machine live in `platform/manifest.ts` and\n * `registry/resolution.ts` respectively; this file holds only the schema.\n */\nimport { z } from \"zod\";\n\nexport const PlatformReleaseManifestSchema = z.object({\n schemaVersion: z.literal(1),\n kind: z.literal(\"everything-dev/platform-manifest\"),\n frameworkVersion: z.string().min(1),\n everyPluginVersion: z.string().min(1),\n /** The serving build's repo HEAD (full sha) — omitted when the compose\n * context has no git (regression image builds, build-arg-less builds). */\n gitSha: z.string().min(7).optional(),\n image: z.object({\n ref: z.string().min(1),\n tags: z.array(z.string().min(1)),\n }),\n catalog: z.record(z.string(), z.string()),\n sharedDeps: z.record(\n z.string(),\n z.object({\n version: z.string(),\n requiredVersion: z.union([z.string(), z.boolean()]),\n singleton: z.boolean(),\n eager: z.boolean(),\n strictVersion: z.boolean(),\n shareScope: z.string(),\n }),\n ),\n templateInventory: z.array(\n z.object({\n path: z.string(),\n sha256: z.string().regex(/^[0-9a-f]{64}$/),\n }),\n ),\n compat: z.object({ minChild: z.string().min(1) }),\n /**\n * The release's own slot-pin map (ADR 0034 amendment — release-scoped\n * extends inheritance): each entry records the immutable version-manifest\n * pointer the release published for a config slot (dotted config path, e.g.\n * `app.auth`, `app.auth.ui`, `plugins.votes.ui`) — the son of the store, so\n * children pinned to this release can re-point inherited slots at THESE\n * bytes instead of the parent's live config whenever the parent publishes.\n * Optional: releases composed before the field carry no slots, and old\n * readers strip unknown keys.\n */\n slots: z\n .record(\n z.string(),\n z.object({\n base: z.string().min(1),\n pin: z.object({\n manifest: z.string().min(1),\n integrity: z.string().min(1),\n }),\n }),\n )\n .optional(),\n});\nexport type PlatformRelease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