@tabularium/manifest
Advanced tools
+3
-2
| import { type Static } from '@sinclair/typebox'; | ||
| export declare const SEMVER_VERSION_PATTERN = "^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$"; | ||
| export declare const ManifestSchema: import("@sinclair/typebox").TObject<{ | ||
| name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>; | ||
| name: import("@sinclair/typebox").TString; | ||
| version: import("@sinclair/typebox").TString; | ||
| description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>; | ||
@@ -32,4 +34,3 @@ category: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>; | ||
| readmeLocales: ReadmeMap | null; | ||
| source: 'tabularium.yaml' | 'tabularium.json'; | ||
| }; | ||
| //# sourceMappingURL=core.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAIrD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;EA+BzB,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAA;AAEpD,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAE9C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,QAAQ,CAAA;IAChB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,aAAa,EAAE,SAAS,GAAG,IAAI,CAAA;IAC/B,MAAM,EAAE,iBAAiB,GAAG,iBAAiB,CAAA;CAC9C,CAAA"} | ||
| {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAKrD,eAAO,MAAM,sBAAsB,yEAAyE,CAAA;AAI5G,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;EAiHzB,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAA;AAEpD,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAE9C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,QAAQ,CAAA;IAChB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,aAAa,EAAE,SAAS,GAAG,IAAI,CAAA;CAChC,CAAA"} |
+70
-18
| import { Type } from '@sinclair/typebox'; | ||
| // Strict semver pattern for the JSON Schema `pattern` keyword. | ||
| // Used in the browser/CLI where pulling the `semver` package would be heavy. | ||
| // On the server, prefer `semver.valid()` (see apps/api/src/lib/semver.ts). | ||
| export const SEMVER_VERSION_PATTERN = '^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$'; | ||
| // Locked core. Operator-editable fields live in `manifest.extensions_schema`, | ||
| // not here. | ||
| export const ManifestSchema = Type.Object({ | ||
| name: Type.Optional(Type.String({ minLength: 1, maxLength: 60 })), | ||
| description: Type.Optional(Type.String({ maxLength: 280 })), | ||
| category: Type.Optional(Type.String({ maxLength: 40 })), | ||
| kind: Type.Optional(Type.String({ minLength: 1, maxLength: 40, pattern: '^[a-z0-9][a-z0-9-]*$' })), | ||
| tags: Type.Optional(Type.Array(Type.String({ maxLength: 30 }), { maxItems: 16 })), | ||
| license: Type.Optional(Type.String({ maxLength: 40 })), | ||
| icon: Type.Optional(Type.String({ maxLength: 500 })), | ||
| name: Type.String({ | ||
| minLength: 1, | ||
| maxLength: 64, | ||
| pattern: '^[a-z][a-z0-9-]*$', | ||
| description: 'URL slug, canonical package name, and default display title. Must start with a letter; lowercase alphanumerics + hyphens only. REQUIRED — pinned at first submit; changing it later does not rename the existing slug. Use the README for prose / branding; no separate display-name field.', | ||
| }), | ||
| version: Type.String({ | ||
| minLength: 1, | ||
| maxLength: 40, | ||
| pattern: SEMVER_VERSION_PATTERN, | ||
| description: 'Semantic version of this plugin release (no leading "v"). REQUIRED — must match the release tag stripped of any "v" prefix. The registry rejects ingests whose tag and manifest version disagree, so a manifest version bump is the single source of truth for "this is a new release".', | ||
| }), | ||
| description: Type.Optional(Type.String({ | ||
| maxLength: 280, | ||
| description: 'One-line summary shown on the plugin card and search results. Keep it under 280 characters and write it like a tagline, not a paragraph.', | ||
| })), | ||
| category: Type.Optional(Type.String({ | ||
| maxLength: 40, | ||
| description: 'Free-form category label. Used for grouping plugins on the registry home page.', | ||
| })), | ||
| kind: Type.Optional(Type.String({ | ||
| minLength: 1, | ||
| maxLength: 40, | ||
| pattern: '^[a-z0-9][a-z0-9-]*$', | ||
| description: "Plugin kind slug (must match one of the registry's configured kinds — see the per-kind sections below). Drives which extension fields apply and whether your plugin appears on the catalogue page for that kind.", | ||
| })), | ||
| tags: Type.Optional(Type.Array(Type.String({ maxLength: 30 }), { | ||
| maxItems: 16, | ||
| description: "Searchable tags. Used by the registry's search index; max 16 tags, 30 chars each.", | ||
| })), | ||
| license: Type.Optional(Type.String({ | ||
| maxLength: 40, | ||
| description: 'SPDX identifier (e.g. "MIT", "Apache-2.0", "GPL-3.0-only"). Plain text accepted; SPDX is strongly recommended.', | ||
| })), | ||
| icon: Type.Optional(Type.String({ | ||
| maxLength: 500, | ||
| description: 'URL to the plugin icon. Renders next to the plugin name on cards and detail pages. PNG/SVG recommended, 256×256 or vector.', | ||
| })), | ||
| screenshots: Type.Optional(Type.Array(Type.Object({ | ||
| url: Type.String({ minLength: 1, maxLength: 500 }), | ||
| caption: Type.Optional(Type.String({ maxLength: 200 })), | ||
| alt: Type.Optional(Type.String({ maxLength: 200 })), | ||
| }), { maxItems: 12 })), | ||
| readme: Type.Optional(Type.String({ maxLength: 500 })), | ||
| readmes: Type.Optional(Type.Record(Type.String({ pattern: '^[a-z]{2}(-[A-Z]{2})?$', maxLength: 10 }), Type.String({ maxLength: 500 }))), | ||
| documentation_url: Type.Optional(Type.String({ pattern: '^https?://.+' })), | ||
| homepage: Type.Optional(Type.String({ pattern: '^https?://.+' })), | ||
| url: Type.String({ minLength: 1, maxLength: 500, description: 'Image URL.' }), | ||
| caption: Type.Optional(Type.String({ maxLength: 200, description: 'Optional caption shown under the screenshot.' })), | ||
| alt: Type.Optional(Type.String({ maxLength: 200, description: 'Accessible alt text for screen readers.' })), | ||
| }), { | ||
| maxItems: 12, | ||
| description: 'Up to 12 screenshots shown in the plugin detail gallery.', | ||
| })), | ||
| readme: Type.Optional(Type.String({ | ||
| maxLength: 500, | ||
| description: 'Repo-relative path or URL to the README markdown file. Rendered on the plugin detail page.', | ||
| })), | ||
| readmes: Type.Optional(Type.Record(Type.String({ pattern: '^[a-z]{2}(-[A-Z]{2})?$', maxLength: 10 }), Type.String({ maxLength: 500 }), { | ||
| description: 'Per-locale README overrides. Map keys are BCP-47 locale codes (e.g. "en", "de", "zh-CN"); values are the same shape as `readme`.', | ||
| })), | ||
| documentation_url: Type.Optional(Type.String({ | ||
| pattern: '^https?://.+', | ||
| description: 'Link to standalone documentation site (Vitepress, MkDocs, GitHub Pages, etc.). Surfaces as an "Open docs" CTA.', | ||
| })), | ||
| homepage: Type.Optional(Type.String({ | ||
| pattern: '^https?://.+', | ||
| description: 'Marketing homepage if separate from the documentation site or the repository.', | ||
| })), | ||
| support: Type.Optional(Type.Object({ | ||
| email: Type.Optional(Type.String({ maxLength: 254 })), | ||
| issues_url: Type.Optional(Type.String({ pattern: '^https?://.+' })), | ||
| email: Type.Optional(Type.String({ maxLength: 254, description: 'Contact email for end users.' })), | ||
| issues_url: Type.Optional(Type.String({ pattern: '^https?://.+', description: 'Issue tracker URL.' })), | ||
| }, { description: 'Where end users go when they have a problem with the plugin.' })), | ||
| min_runtime_version: Type.Optional(Type.String({ | ||
| maxLength: 40, | ||
| description: 'Minimum host runtime version (semver range or single version). The host refuses to load the plugin on older runtimes.', | ||
| })), | ||
| min_runtime_version: Type.Optional(Type.String({ maxLength: 40 })), | ||
| }); | ||
| //# sourceMappingURL=core.js.map |
+1
-1
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAA;AAErD,8EAA8E;AAC9E,YAAY;AACZ,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;IACjE,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC;IAC3D,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;IACvD,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC,CAAC;IAClG,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;IACjF,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;IACtD,IAAI,EAA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olvedManifest } from './core'; | ||
| export { ManifestSchema, SEMVER_VERSION_PATTERN, type Manifest, type ReadmeMap, type ResolvedManifest } from './core'; | ||
| export { mapAjvErrors, type ValidationError } from './errors'; | ||
| export { buildSchema, type ExtensionsDelta, type JsonSchemaProperty, type BuildSchemaInput } from './schema'; | ||
| export { validateManifest, type ValidateResult, type ValidateOptions } from './validate'; | ||
| export { parseManifest, sniffSource, ParseError, type ManifestSource } from './parse'; | ||
| export { parseManifest, ParseError } from './parse'; | ||
| export { fetchSchema, type FetchSchemaOptions } from './fetch-schema'; | ||
@@ -7,0 +7,0 @@ export { canonicalize } from './canonical'; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AAC7F,OAAO,EAAE,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAC5G,OAAO,EAAE,gBAAgB,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAA;AACxF,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAA;AACrF,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,GAClC,MAAM,aAAa,CAAA"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AACrH,OAAO,EAAE,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAC5G,OAAO,EAAE,gBAAgB,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAA;AACxF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,GAClC,MAAM,aAAa,CAAA"} |
+2
-2
@@ -1,6 +0,6 @@ | ||
| export { ManifestSchema } from './core'; | ||
| export { ManifestSchema, SEMVER_VERSION_PATTERN } from './core'; | ||
| export { mapAjvErrors } from './errors'; | ||
| export { buildSchema } from './schema'; | ||
| export { validateManifest } from './validate'; | ||
| export { parseManifest, sniffSource, ParseError } from './parse'; | ||
| export { parseManifest, ParseError } from './parse'; | ||
| export { fetchSchema } from './fetch-schema'; | ||
@@ -7,0 +7,0 @@ export { canonicalize } from './canonical'; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAwD,MAAM,QAAQ,CAAA;AAC7F,OAAO,EAAE,YAAY,EAAwB,MAAM,UAAU,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAwE,MAAM,UAAU,CAAA;AAC5G,OAAO,EAAE,gBAAgB,EAA6C,MAAM,YAAY,CAAA;AACxF,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAuB,MAAM,SAAS,CAAA;AACrF,OAAO,EAAE,WAAW,EAA2B,MAAM,gBAAgB,CAAA;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EACL,eAAe,EACf,uBAAuB,GAGxB,MAAM,aAAa,CAAA"} | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAwD,MAAM,QAAQ,CAAA;AACrH,OAAO,EAAE,YAAY,EAAwB,MAAM,UAAU,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAwE,MAAM,UAAU,CAAA;AAC5G,OAAO,EAAE,gBAAgB,EAA6C,MAAM,YAAY,CAAA;AACxF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACnD,OAAO,EAAE,WAAW,EAA2B,MAAM,gBAAgB,CAAA;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EACL,eAAe,EACf,uBAAuB,GAGxB,MAAM,aAAa,CAAA"} |
+1
-3
@@ -1,2 +0,1 @@ | ||
| export type ManifestSource = 'tabularium.yaml' | 'tabularium.json'; | ||
| export declare class ParseError extends Error { | ||
@@ -6,4 +5,3 @@ cause?: unknown | undefined; | ||
| } | ||
| export declare function sniffSource(text: string): ManifestSource; | ||
| export declare function parseManifest(text: string, source: ManifestSource): Record<string, unknown>; | ||
| export declare function parseManifest(text: string): Record<string, unknown>; | ||
| //# sourceMappingURL=parse.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../src/parse.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG,iBAAiB,CAAA;AAElE,qBAAa,UAAW,SAAQ,KAAK;IAG1B,KAAK,CAAC,EAAE,OAAO;gBADtB,OAAO,EAAE,MAAM,EACR,KAAK,CAAC,EAAE,OAAO,YAAA;CAKzB;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAGxD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAa3F"} | ||
| {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../src/parse.ts"],"names":[],"mappings":"AAAA,qBAAa,UAAW,SAAQ,KAAK;IAG1B,KAAK,CAAC,EAAE,OAAO;gBADtB,OAAO,EAAE,MAAM,EACR,KAAK,CAAC,EAAE,OAAO,YAAA;CAKzB;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAanE"} |
+3
-8
@@ -1,2 +0,1 @@ | ||
| import { parse as parseYaml } from 'yaml'; | ||
| export class ParseError extends Error { | ||
@@ -10,13 +9,9 @@ cause; | ||
| } | ||
| export function sniffSource(text) { | ||
| const head = text.replace(/^/, '').trimStart(); | ||
| return head.startsWith('{') || head.startsWith('[') ? 'tabularium.json' : 'tabularium.yaml'; | ||
| } | ||
| export function parseManifest(text, source) { | ||
| export function parseManifest(text) { | ||
| let parsed; | ||
| try { | ||
| parsed = source === 'tabularium.json' ? JSON.parse(text) : parseYaml(text); | ||
| parsed = JSON.parse(text); | ||
| } | ||
| catch (err) { | ||
| throw new ParseError(`Failed to parse ${source}: ${err instanceof Error ? err.message : String(err)}`, err); | ||
| throw new ParseError(`Failed to parse manifest: ${err instanceof Error ? err.message : String(err)}`, err); | ||
| } | ||
@@ -23,0 +18,0 @@ if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"parse.js","sourceRoot":"","sources":["../src/parse.ts"],"names":[],"mappings":"AAAA,O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SAAS,IAAI,GAAG;QAAE,OAAO,GAAG,CAAC,OAAO,CAAA;IACxC,OAAO,GAAG,CAAA;AACZ,CAAC"} | ||
| {"version":3,"file":"parse.js","sourceRoot":"","sources":["../src/parse.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,UAAW,SAAQ,KAAK;IAG1B;IAFT,YACE,OAAe,EACR,KAAe;QAEtB,KAAK,CAAC,OAAO,CAAC,CAAA;QAFP,UAAK,GAAL,KAAK,CAAU;QAGtB,IAAI,CAAC,IAAI,GAAG,YAAY,CAAA;IAC1B,CAAC;CACF;AAED,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,IAAI,MAAe,CAAA;IACnB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC3B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,UAAU,CAAC,6BAA6B,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,CAAA;IAC5G,CAAC;IACD,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACnE,MAAM,IAAI,UAAU,CAAC,iCAAiC,CAAC,CAAA;IACzD,CAAC;IACD,MAAM,GAAG,GAAG,MAAiC,CAAA;IAC7C,IAAI,SAAS,IAAI,GAAG;QAAE,OAAO,GAAG,CAAC,OAAO,CAAA;IACxC,OAAO,GAAG,CAAA;AACZ,CAAC"} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAEhD,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AACxD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;AAEhE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IAC/C,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAsCD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAoE5E"} | ||
| {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAEhD,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AACxD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;AAEhE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IAC/C,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAqDD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAoE5E"} |
+18
-3
@@ -32,2 +32,17 @@ const DEFAULT_SCHEMA_URL = 'https://tabularium.local/manifest.schema.json'; | ||
| } | ||
| function stripXTranslations(node) { | ||
| if (Array.isArray(node)) { | ||
| return node.map(stripXTranslations); | ||
| } | ||
| if (node && typeof node === 'object') { | ||
| const out = {}; | ||
| for (const [k, v] of Object.entries(node)) { | ||
| if (k === 'x-translations') | ||
| continue; | ||
| out[k] = stripXTranslations(v); | ||
| } | ||
| return out; | ||
| } | ||
| return node; | ||
| } | ||
| export function buildSchema(input) { | ||
@@ -43,3 +58,3 @@ const coreProps = input.coreSchema.properties; | ||
| const required = [...coreRequired, ...extRequired]; | ||
| return { | ||
| return stripXTranslations({ | ||
| $schema: 'https://json-schema.org/draft/2020-12/schema', | ||
@@ -52,3 +67,3 @@ $id: `${schemaUrl}?kind=${encodeURIComponent(input.kind)}`, | ||
| ...(required.length > 0 ? { required } : {}), | ||
| }; | ||
| }); | ||
| } | ||
@@ -98,4 +113,4 @@ const allExtensionKeys = new Set(Object.keys(globalExt)); | ||
| } | ||
| return schema; | ||
| return stripXTranslations(schema); | ||
| } | ||
| //# sourceMappingURL=schema.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAaA,MAAM,kBAAkB,GAAG,+CAA+C,CAAA;AAE1E;;;;;;;;;;;;GAYG;AACH,SAAS,iBAAiB,CAAC,KAA8B;IAIvD,MAAM,OAAO,GAA4B,EAAE,CAAA;IAC3C,MAAM,QAAQ,GAAa,EAAE,CAAA;IAC7B,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACnD,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACnE,MAAM,IAAI,GAAG,MAAiC,CAAA;YAC9C,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;gBAC3B,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAA;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CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;YAC3C,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,iBAAiB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAA;YACvE,MAAM,UAAU,GAA4B;gBAC1C,UAAU,EAAE,EAAE,GAAG,SAAS,EAAE,GAAG,OAAO,EAAE;gBACxC,oBAAoB,EAAE,KAAK;aAC5B,CAAA;YACD,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;gBAAE,UAAU,CAAC,QAAQ,GAAG,CAAC,GAAG,YAAY,EAAE,GAAG,QAAQ,CAAC,CAAA;YAC7E,OAAO;gBACL,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE;gBACpE,IAAI,EAAE,UAAU;aACjB,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,kBAAkB,CAAC,MAAM,CAA4B,CAAA;AAC9D,CAAC"} |
+3
-4
| { | ||
| "name": "@tabularium/manifest", | ||
| "version": "0.1.0", | ||
| "description": "Pure validator + integrity primitives for the Tabularium plugin manifest (`.tabularium` / `tabularium.yaml` / `tabularium.json`).", | ||
| "version": "0.3.1", | ||
| "description": "Pure validator + integrity primitives for the Tabularium plugin manifest (`.tabularium`, JSON).", | ||
| "license": "Apache-2.0", | ||
@@ -45,4 +45,3 @@ "repository": { | ||
| "ajv": "^8.17.1", | ||
| "ajv-formats": "^3.0.1", | ||
| "yaml": "^2.9.0" | ||
| "ajv-formats": "^3.0.1" | ||
| }, | ||
@@ -49,0 +48,0 @@ "devDependencies": { |
+2
-2
@@ -18,6 +18,6 @@ # `@tabularium/manifest` | ||
| ```ts | ||
| import { parseManifest, validateManifest, buildSchema, fetchSchema, sniffSource, type ValidationError } from '@tabularium/manifest' | ||
| import { parseManifest, validateManifest, buildSchema, fetchSchema, type ValidationError } from '@tabularium/manifest' | ||
| ``` | ||
| - **`parseManifest(text, source)`** — YAML or JSON → object. Throws `ParseError`. `source` is `'tabularium.yaml' | 'tabularium.json'`; use `sniffSource(text)` to auto-detect. | ||
| - **`parseManifest(text)`** — JSON → object. Throws `ParseError`. Tabularium is JSON-only. | ||
| - **`validateManifest(parsed, schema, { lenient? })`** — ajv-backed JSON Schema 2020-12 validator. Returns `{ ok: true, normalized, errors: [] }` or `{ ok: false, normalized: null, errors }`. `lenient: true` strips unknown fields via `removeAdditional: 'all'` instead of erroring. | ||
@@ -24,0 +24,0 @@ - **`buildSchema(opts)`** — merges the core `ManifestSchema` with operator-defined extension deltas (global + per-kind) into a single JSON Schema. |
68743
5.81%3
-25%665
10.1%- Removed
- Removed