@pokedocs/plugin-frontmatter-schema 0.0.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Wesley Huber
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @pokedocs/plugin-frontmatter-schema — frontmatter contracts (PRD F2.2).
3
+ *
4
+ * Sites declare frontmatter schemas in config (per-directory or per-doc-type:
5
+ * required fields, enums, date formats) and violations fail the build with
6
+ * file, field, and expected type. Validated metadata flows into the agent
7
+ * surface so retrieval pipelines can rely on it.
8
+ */
9
+ /** A single field constraint within a frontmatter schema. */
10
+ export interface FrontmatterFieldSchema {
11
+ type: 'string' | 'number' | 'boolean' | 'date' | 'enum';
12
+ required?: boolean;
13
+ /** Allowed values when type is "enum". */
14
+ values?: readonly string[];
15
+ }
16
+ export interface FrontmatterSchema {
17
+ /** Glob the schema applies to, relative to the docs root (e.g. "adr/**"). */
18
+ include: string;
19
+ fields: Record<string, FrontmatterFieldSchema>;
20
+ }
21
+ export interface FrontmatterSchemaOptions {
22
+ schemas?: FrontmatterSchema[];
23
+ }
24
+ /**
25
+ * Docusaurus plugin entry point. Implementation lands in M2 (S2.2.1/S2.2.2);
26
+ * the skeleton pins the public shape.
27
+ */
28
+ export default function pluginFrontmatterSchema(_context: unknown, _options?: FrontmatterSchemaOptions): never;
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,6DAA6D;AAC7D,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAC7C,QAAQ,EAAE,OAAO,EACjB,QAAQ,GAAE,wBAA6B,GACtC,KAAK,CAIP"}
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /**
3
+ * @pokedocs/plugin-frontmatter-schema — frontmatter contracts (PRD F2.2).
4
+ *
5
+ * Sites declare frontmatter schemas in config (per-directory or per-doc-type:
6
+ * required fields, enums, date formats) and violations fail the build with
7
+ * file, field, and expected type. Validated metadata flows into the agent
8
+ * surface so retrieval pipelines can rely on it.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.default = pluginFrontmatterSchema;
12
+ /**
13
+ * Docusaurus plugin entry point. Implementation lands in M2 (S2.2.1/S2.2.2);
14
+ * the skeleton pins the public shape.
15
+ */
16
+ function pluginFrontmatterSchema(_context, _options = {}) {
17
+ throw new Error('@pokedocs/plugin-frontmatter-schema is not implemented yet — tracked by S2.2.1 (github.com/wbaxterh/pokedocs/issues).');
18
+ }
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAwBH,0CAOC;AAXD;;;GAGG;AACH,SAAwB,uBAAuB,CAC7C,QAAiB,EACjB,WAAqC,EAAE;IAEvC,MAAM,IAAI,KAAK,CACb,uHAAuH,CACxH,CAAC;AACJ,CAAC"}
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@pokedocs/plugin-frontmatter-schema",
3
+ "version": "0.0.1",
4
+ "description": "Declarative frontmatter schemas for Docusaurus, validated at build/check time — metadata contracts enforced by the build, not a contributing guide",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/wbaxterh/pokedocs.git",
9
+ "directory": "packages/plugin-frontmatter-schema"
10
+ },
11
+ "main": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "default": "./dist/index.js"
17
+ }
18
+ },
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
25
+ "engines": {
26
+ "node": ">=20"
27
+ }
28
+ }