@intentius/chant-lexicon-docker 0.37.0 → 0.38.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.
- package/dist/codegen/docs.d.ts +5 -0
- package/dist/codegen/docs.d.ts.map +1 -1
- package/dist/integrity.json +2 -2
- package/dist/manifest.json +1 -1
- package/package.json +2 -2
- package/src/codegen/docs.ts +32 -2
package/dist/codegen/docs.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Docker lexicon docs generation.
|
|
3
|
+
*
|
|
4
|
+
* The docker site is hand-authored under docs/src/content/docs/, unlike every
|
|
5
|
+
* other lexicon's generated Starlight site. The rules table is the exception:
|
|
6
|
+
* a hand-maintained one can fall behind the rules in src/lint/ without anything
|
|
7
|
+
* catching it, so it is generated from source here (#1312).
|
|
3
8
|
*/
|
|
4
9
|
export declare function generateDocs(opts?: {
|
|
5
10
|
verbose?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/codegen/docs.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/codegen/docs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,wBAAsB,YAAY,CAAC,IAAI,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B9E"}
|
package/dist/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "9ac606d292f87c00d17538aba347ac4d22e1e091435cd229f21195543ee46500",
|
|
5
5
|
"meta.json": "ae27dc809e705d37a645ee83b9789c50051282f7891d21d6b9e6ce8d111624ff",
|
|
6
6
|
"types/index.d.ts": "758f989ff86af54284d7f841a2db2259038d51ce1f3ed839a5d8e83fa20d95b8",
|
|
7
7
|
"rules/no-latest-tag.ts": "efd060453d8ca3d5b85c3972906c6650b6f63eb5f67cb6cdb0f16a41cad91228",
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
"skills/chant-docker.md": "3ff0708e3c76e245f202948949c768464563af2b60cc9aa2ca52f494ef8357f1",
|
|
16
16
|
"skills/chant-docker-patterns.md": "ad1b0196d8150b2df579a699ff107f604340c799c04f3460ebf65003e287b12a"
|
|
17
17
|
},
|
|
18
|
-
"composite": "
|
|
18
|
+
"composite": "fe7a6cda6d999b04f449ad59f43faf6b1dcb717778d14784257c5c6fa57a6b75"
|
|
19
19
|
}
|
package/dist/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-docker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "Docker lexicon for chant — declarative IaC in TypeScript",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://intentius.io/chant",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"typescript": "^5.9.3"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@intentius/chant": "^0.
|
|
70
|
+
"@intentius/chant": "^0.38.0",
|
|
71
71
|
"typescript": "^5.9.3"
|
|
72
72
|
}
|
|
73
73
|
}
|
package/src/codegen/docs.ts
CHANGED
|
@@ -1,12 +1,42 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Docker lexicon docs generation.
|
|
3
|
+
*
|
|
4
|
+
* The docker site is hand-authored under docs/src/content/docs/, unlike every
|
|
5
|
+
* other lexicon's generated Starlight site. The rules table is the exception:
|
|
6
|
+
* a hand-maintained one can fall behind the rules in src/lint/ without anything
|
|
7
|
+
* catching it, so it is generated from source here (#1312).
|
|
3
8
|
*/
|
|
4
9
|
|
|
10
|
+
import { dirname, join } from "path";
|
|
11
|
+
import { fileURLToPath } from "url";
|
|
12
|
+
import { writeFileSync } from "fs";
|
|
13
|
+
import { generateRulesPage, type DocsConfig } from "@intentius/chant/codegen/docs";
|
|
14
|
+
|
|
5
15
|
export async function generateDocs(opts?: { verbose?: boolean }): Promise<void> {
|
|
16
|
+
const pkgDir = dirname(dirname(dirname(fileURLToPath(import.meta.url))));
|
|
17
|
+
|
|
6
18
|
if (opts?.verbose) {
|
|
7
19
|
console.error("Generating Docker lexicon docs...");
|
|
8
20
|
}
|
|
9
|
-
|
|
21
|
+
|
|
22
|
+
const config = {
|
|
23
|
+
name: "docker",
|
|
24
|
+
displayName: "Docker",
|
|
25
|
+
description: "Typed constructors for Docker Compose files and Dockerfiles",
|
|
26
|
+
distDir: join(pkgDir, "dist"),
|
|
27
|
+
outDir: join(pkgDir, "docs"),
|
|
28
|
+
} as DocsConfig;
|
|
29
|
+
|
|
30
|
+
const rules = generateRulesPage(config, join(pkgDir, "src"));
|
|
31
|
+
if (rules) {
|
|
32
|
+
const out = join(pkgDir, "docs", "src", "content", "docs", "rules.mdx");
|
|
33
|
+
writeFileSync(out, rules);
|
|
34
|
+
if (opts?.verbose) {
|
|
35
|
+
console.error(`Wrote ${out}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Every other page is hand-authored in docs/src/content/docs/.
|
|
10
40
|
// Future: auto-generate entity reference pages from lexicon-docker.json
|
|
11
|
-
console.error("Docker docs:
|
|
41
|
+
console.error("Docker docs: rules.mdx generated; prose pages are hand-authored");
|
|
12
42
|
}
|