@antelopejs/tooling-configs 0.5.4 → 0.5.5

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/README.md CHANGED
@@ -17,28 +17,29 @@ The AntelopeJS guardrail pack: shared lint, format and dead-code presets, the co
17
17
 
18
18
  ## What's in the box
19
19
 
20
- | Export | Import | What it gives |
21
- | ------------------ | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
22
- | `./oxc/lint` | `import { antelopePreset } from "@antelopejs/tooling-configs/oxc/lint"` | The oxlint preset |
23
- | `./oxc/fmt` | `import { antelopeFmtPreset } from "@antelopejs/tooling-configs/oxc/fmt"` | The oxfmt preset (house style) |
24
- | `./eslint` | `import { antelopeNuxtConfig } from "@antelopejs/tooling-configs/eslint"` | ESLint for Nuxt layers |
25
- | `./knip` | `import { antelopeKnipConfig } from "@antelopejs/tooling-configs/knip"` | Knip for AntelopeJS modules |
26
- | `./oxc/anti-slop` | Loaded by the oxlint preset as a JS plugin | The vendored [anti-slop](https://github.com/dmmulroy/anti-slop) rules |
27
- | `./oxc/guardrails` | Loaded by the oxlint preset as a JS plugin | The `antelopejs` comment and test-quality rules |
28
- | `./verify` | `import type { VerifyConfig } from "@antelopejs/tooling-configs/verify"` | Types and check helpers for a shared verification skill's `verify.config.ts` |
29
- | bin | `antelopejs-sync [--init]` | Writes the guardrail pack into a repository; `--check` reports drift; `--init` onboards a bare repository |
30
- | bin | `antelopejs-checks [--no-services]` | Runs every check and prints only the failures; starts `.github/compose.yml` services around them |
31
- | bin | `antelopejs-ratchet` | Fails when recorded debt grows; `--update` lowers the record and adopts rules a pack release newly enabled |
32
- | bin | `antelopejs-suppressions` | Fails when suppressions exceed their budget or an added one breaks policy; `--update` lowers the budget |
33
- | bin | `antelopejs-check-size` | Fails on authored files over 20,000 bytes and on blanket disable directives |
34
- | bin | `antelopejs-api-diff <base-ref>` | Compares published declaration bundles against committed HEAD |
35
- | bin | `antelopejs-comment-proof <base-ref>` | Compares comment-free JavaScript emit against committed HEAD |
36
- | bin | `antelopejs-body-check <body.md \| -> [--head <sha>] [--base <sha>]` | Checks a PR body's proof and findings blocks against HEAD; `--findings` prints the findings block |
37
- | bin | `antelopejs-check-interface-ranges` | Fails on interface ranges that break module startup |
38
- | bin | `antelopejs-garden [--json] [--apply] [--apply-prunes]` | The Gardener's scans of the organization through the GitHub API and npm |
39
- | bin | `antelopejs-triage [--json]` | Community Triage's ranked shortlist of untriaged issues |
40
- | bin | `antelopejs-verify <command>` | The harness of the shared `verify-interface`, `verify-module` and `verify-template` skills |
41
- | bin | `antelopejs-lease run \| status \| down \| gc` | Ports, a mongod, logs and tmp per worktree; see [Run a DMS from a git worktree](./docs/agent-worktrees.md) |
20
+ | Export | Import | What it gives |
21
+ | ------------------ | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
22
+ | `./oxc/lint` | `import { antelopePreset } from "@antelopejs/tooling-configs/oxc/lint"` | The oxlint preset |
23
+ | `./oxc/fmt` | `import { antelopeFmtPreset } from "@antelopejs/tooling-configs/oxc/fmt"` | The oxfmt preset (house style) |
24
+ | `./eslint` | `import { antelopeNuxtConfig } from "@antelopejs/tooling-configs/eslint"` | ESLint for Nuxt layers |
25
+ | `./knip` | `import { antelopeKnipConfig } from "@antelopejs/tooling-configs/knip"` | Knip for AntelopeJS modules |
26
+ | `./oxc/anti-slop` | Loaded by the oxlint preset as a JS plugin | The vendored [anti-slop](https://github.com/dmmulroy/anti-slop) rules |
27
+ | `./oxc/guardrails` | Loaded by the oxlint preset as a JS plugin | The `antelopejs` comment and test-quality rules |
28
+ | `./verify` | `import type { VerifyConfig } from "@antelopejs/tooling-configs/verify"` | Types and check helpers for a shared verification skill's `verify.config.ts` |
29
+ | bin | `antelopejs-sync [--init]` | Writes the guardrail pack into a repository; `--check` reports drift; `--init` onboards a bare repository |
30
+ | bin | `antelopejs-checks [--no-services]` | Runs every check and prints only the failures; starts `.github/compose.yml` services around them |
31
+ | bin | `antelopejs-ratchet` | Fails when recorded debt grows; `--update` lowers the record and adopts rules a pack release newly enabled |
32
+ | bin | `antelopejs-suppressions` | Fails when suppressions exceed their budget or an added one breaks policy; `--update` lowers the budget |
33
+ | bin | `antelopejs-check-size` | Fails on authored files over 20,000 bytes and on blanket disable directives |
34
+ | bin | `antelopejs-api-diff <base-ref>` | Compares published declaration bundles against committed HEAD |
35
+ | bin | `antelopejs-comment-proof <base-ref>` | Compares comment-free JavaScript emit against committed HEAD |
36
+ | bin | `antelopejs-body-check <body.md \| -> [--head <sha>] [--base <sha>]` | Checks a PR body's proof and findings blocks against HEAD; `--findings` prints the findings block |
37
+ | bin | `antelopejs-check-interface-ranges` | Fails on interface ranges that break module startup |
38
+ | bin | `antelopejs-readme-strip --kind <kind> --name <label-name>` | Writes a framework repository's README strip banner to `.github/readme/strip.svg` ([docs](docs/documentation-checks.md#framework-strip-banner)) |
39
+ | bin | `antelopejs-garden [--json] [--apply] [--apply-prunes]` | The Gardener's scans of the organization through the GitHub API and npm |
40
+ | bin | `antelopejs-triage [--json]` | Community Triage's ranked shortlist of untriaged issues |
41
+ | bin | `antelopejs-verify <command>` | The harness of the shared `verify-interface`, `verify-module` and `verify-template` skills |
42
+ | bin | `antelopejs-lease run \| status \| down \| gc` | Ports, a mongod, logs and tmp per worktree; see [Run a DMS from a git worktree](./docs/agent-worktrees.md) |
42
43
 
43
44
  ## antelopejs-garden
44
45
 
@@ -0,0 +1,93 @@
1
+ Copyright 2026 The Geist Project Authors (https://github.com/vercel/geist-font)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://openfontlicense.org
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import { o as packageManager, s as parseManifest } from "../package-CORwvwTw.mjs";
2
+ import { o as packageManager, s as parseManifest } from "../package-DnxZ2CXZ.mjs";
3
3
  import { t as runCli } from "../cli-4Tv71vYk.mjs";
4
4
  import { c as repositoryRoot, l as resolveRevision } from "../files-DJ0TeaTU.mjs";
5
- import { a as DIRECTORY_LINK, c as revisionCounts, d as createAddedPolicy, f as describeAllowance, i as stampProof, l as workspaceManifests, m as recordVerdict, o as compareRevisions, p as fillStars, u as allowedByGlob } from "../proof-stamp-C56iYgHa.mjs";
6
- import { c as packagesAt, i as isTestSource, l as unpublishedAt, o as loadTypeScript, r as isExportPath, s as outputRoot, t as emitPackage } from "../typescript-Cw1JH8mk.mjs";
5
+ import { a as DIRECTORY_LINK, c as revisionCounts, d as createAddedPolicy, f as describeAllowance, i as stampProof, l as workspaceManifests, m as recordVerdict, o as compareRevisions, p as fillStars, u as allowedByGlob } from "../proof-stamp-Kg-tkM6G.mjs";
6
+ import { c as packagesAt, i as isTestSource, l as unpublishedAt, o as loadTypeScript, r as isExportPath, s as outputRoot, t as emitPackage } from "../typescript-DhavwHb7.mjs";
7
7
  import { createRequire } from "node:module";
8
8
  import { copyFileSync, cpSync, existsSync, globSync, mkdirSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, symlinkSync, writeFileSync } from "node:fs";
9
9
  import { basename, dirname, isAbsolute, join, parse, posix, relative, resolve, sep } from "node:path";
@@ -2,7 +2,7 @@
2
2
  import { t as runCli } from "../cli-4Tv71vYk.mjs";
3
3
  import { c as repositoryRoot, l as resolveRevision } from "../files-DJ0TeaTU.mjs";
4
4
  import { t as lintDiagnostics } from "../oxlint-BbpTFFmf.mjs";
5
- import { n as proofDigest, r as proofLines, s as revisionCountRows, t as parseProofStamp } from "../proof-stamp-C56iYgHa.mjs";
5
+ import { n as proofDigest, r as proofLines, s as revisionCountRows, t as parseProofStamp } from "../proof-stamp-Kg-tkM6G.mjs";
6
6
  import { readFileSync } from "node:fs";
7
7
  import { spawnSync } from "node:child_process";
8
8
  import { parseArgs } from "node:util";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as runCliAsync } from "../cli-4Tv71vYk.mjs";
3
3
  import { c as repositoryRoot } from "../files-DJ0TeaTU.mjs";
4
- import { r as runChecks, t as CHECKS_SKIP_ENV } from "../checks-CyMCnYb4.mjs";
4
+ import { r as runChecks, t as CHECKS_SKIP_ENV } from "../checks-DqTjyKCC.mjs";
5
5
  import { parseArgs } from "node:util";
6
6
  //#region src/bin/checks.ts
7
7
  const SIGNAL_EXIT = /* @__PURE__ */ new Map([
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as runCli } from "../cli-4Tv71vYk.mjs";
3
3
  import { c as repositoryRoot } from "../files-DJ0TeaTU.mjs";
4
- import { c as revisionCounts, i as stampProof, o as compareRevisions } from "../proof-stamp-C56iYgHa.mjs";
5
- import { a as listsNoFiles, c as packagesAt, n as extendedConfigs, t as emitPackage } from "../typescript-Cw1JH8mk.mjs";
4
+ import { c as revisionCounts, i as stampProof, o as compareRevisions } from "../proof-stamp-Kg-tkM6G.mjs";
5
+ import { a as listsNoFiles, c as packagesAt, n as extendedConfigs, t as emitPackage } from "../typescript-DhavwHb7.mjs";
6
6
  import { copyFileSync, existsSync, mkdirSync } from "node:fs";
7
7
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
8
8
  //#region src/guardrails/comment-proof.ts
@@ -3,7 +3,7 @@ import { c as parseCeilings, l as readCeilings, t as CEILINGS_FILE } from "../ce
3
3
  import { n as renamedPaths } from "../renames-L2owF5GD.mjs";
4
4
  import { t as runCli } from "../cli-4Tv71vYk.mjs";
5
5
  import { c as repositoryRoot, l as resolveRevision, t as LINT_CONFIG } from "../files-DJ0TeaTU.mjs";
6
- import { n as ratchet, r as withPreviousTree } from "../ratchet-Al0XZtOz.mjs";
6
+ import { n as ratchet, r as withPreviousTree } from "../ratchet-1O8k4Dxu.mjs";
7
7
  import { t as lintDiagnostics } from "../oxlint-BbpTFFmf.mjs";
8
8
  import { d as stagedAdditions, f as stagedChanges, u as previousLine } from "../suppression-budget-DgYdu6JK.mjs";
9
9
  import { n as suppressionBase } from "../suppression-base-DZgUDXiI.mjs";
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1,134 @@
1
+ #!/usr/bin/env node
2
+ import { d as toolingRoot } from "../package-DnxZ2CXZ.mjs";
3
+ import { t as runCli } from "../cli-4Tv71vYk.mjs";
4
+ import { c as repositoryRoot } from "../files-DJ0TeaTU.mjs";
5
+ import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
6
+ import { join } from "node:path";
7
+ import { parseArgs } from "node:util";
8
+ //#region src/guardrails/readme-strip.ts
9
+ /** Where a framework repository keeps its strip banner, relative to its root. */
10
+ const STRIP_PATH = ".github/readme/strip.svg";
11
+ /** The kinds of framework repository, in the order the strip label names them. */
12
+ const STRIP_KINDS = [
13
+ "interface",
14
+ "provider",
15
+ "template",
16
+ "tooling"
17
+ ];
18
+ const ACCENT = "#4f8cff";
19
+ const BORDER = "rgba(140,160,220,0.18)";
20
+ const NAME = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
21
+ /** Kinds whose repository names start with the kind, such as `interface-email`; the label names the kind once. */
22
+ const REPEATED_KINDS = /* @__PURE__ */ new Set(["interface", "template"]);
23
+ const TAGLINE = "Hexagonal architecture, beyond your own code.";
24
+ const FONTS = [["GeistX", "geist-extrabold.woff2"], ["GeistM", "geist-mono.woff2"]];
25
+ const HEXAGON = {
26
+ x: 750,
27
+ y: 75,
28
+ radius: 40
29
+ };
30
+ const SPOKES = [
31
+ [
32
+ 0,
33
+ -44,
34
+ 0,
35
+ -60
36
+ ],
37
+ [
38
+ 0,
39
+ 44,
40
+ 0,
41
+ 60
42
+ ],
43
+ [
44
+ 38,
45
+ -22,
46
+ 78,
47
+ -40
48
+ ],
49
+ [
50
+ 38,
51
+ 22,
52
+ 78,
53
+ 40
54
+ ],
55
+ [
56
+ -38,
57
+ -22,
58
+ -78,
59
+ -40
60
+ ],
61
+ [
62
+ -38,
63
+ 22,
64
+ -78,
65
+ 40
66
+ ]
67
+ ];
68
+ function isKind(kind) {
69
+ return STRIP_KINDS.some((known) => known === kind);
70
+ }
71
+ /** The label the strip shows for a repository, such as `PROVIDER · FILE STORAGE S3`. */
72
+ function stripLabel(kind, name) {
73
+ if (!isKind(kind)) throw new Error(`unknown strip kind "${kind}": use one of ${STRIP_KINDS.join(", ")}.`);
74
+ if (!NAME.test(name)) throw new Error(`invalid strip name "${name}": use lowercase words joined by hyphens, such as file-storage-s3.`);
75
+ if (REPEATED_KINDS.has(kind) && name.startsWith(`${kind}-`)) throw new Error(`strip name "${name}" repeats the kind: pass --name ${name.slice(kind.length + 1)}, the label reads ${kind.toUpperCase()} · ${name.slice(kind.length + 1).replaceAll("-", " ").toUpperCase()}.`);
76
+ return `${kind} · ${name.replaceAll("-", " ")}`.toUpperCase();
77
+ }
78
+ function fontFaces() {
79
+ const directory = join(toolingRoot(), "assets/readme");
80
+ return FONTS.map(([family, file]) => `@font-face{font-family:'${family}';src:url(data:font/woff2;base64,${readFileSync(join(directory, file)).toString("base64")}) format('woff2')}`).join("");
81
+ }
82
+ function hexagon() {
83
+ const { x, y, radius } = HEXAGON;
84
+ const points = [
85
+ -90,
86
+ -30,
87
+ 30,
88
+ 90,
89
+ 150,
90
+ 210
91
+ ].map((degrees) => {
92
+ const angle = degrees * Math.PI / 180;
93
+ return `${(x + radius * Math.cos(angle)).toFixed(1)},${(y + radius * Math.sin(angle)).toFixed(1)}`;
94
+ }).join(" ");
95
+ return `${SPOKES.map(([x1, y1, x2, y2]) => `<line x1="${x + x1}" y1="${y + y1}" x2="${x + x2}" y2="${y + y2}" stroke="${BORDER}" stroke-width="2"/><circle cx="${x + x2}" cy="${y + y2}" r="5" fill="#15151b" stroke="${BORDER}"/>`).join("")}<polygon points="${points}" fill="${ACCENT}" fill-opacity=".14" stroke="${ACCENT}" stroke-width="2"/>`;
96
+ }
97
+ /** The 1200x150 strip banner of a framework repository, in the layout and fonts of the DMS strips and the framework blue. */
98
+ function stripSvg(kind, name) {
99
+ const label = stripLabel(kind, name);
100
+ const description = `${label}: part of AntelopeJS, hexagonal architecture beyond your own code. A glowing button reads Star AntelopeJS.`;
101
+ return [
102
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 150" width="1200" height="150" role="img" aria-label="${description}"><title>${description}</title>`,
103
+ `<style>${fontFaces()}.x{font-family:'GeistX',sans-serif;font-weight:800}.m{font-family:'GeistM',monospace}@keyframes a1{0%,8.89%{opacity:0;transform:scale(.7)}11.89%,88.00%{opacity:1;transform:none}92.00%,100%{opacity:0;transform:scale(.7)}}.a1{opacity:0;transform:scale(.7);transform-box:fill-box;transform-origin:center;animation:a1 9.0s cubic-bezier(.2,.8,.2,1) infinite}@keyframes pulse{0%,100%{opacity:.35}50%{opacity:.9}}.pulse{animation:pulse 2s ease-in-out infinite}@media (prefers-reduced-motion:reduce){*{animation:none!important;opacity:1!important}.cover{display:none}}</style>`,
104
+ `<defs><radialGradient id="g" cx="75%" cy="50%" r="60%"><stop offset="0" stop-color="${ACCENT}" stop-opacity=".10"/><stop offset="1" stop-color="#06070d" stop-opacity="0"/></radialGradient></defs>`,
105
+ `<rect width="1200" height="150" rx="16" fill="#06070d"/><rect width="1200" height="150" rx="16" fill="url(#g)"/><rect x=".5" y=".5" width="1199" height="149" rx="16" fill="none" stroke="${BORDER}"/>`,
106
+ `<text x="48" y="50" class="m" fill="${ACCENT}" font-size="15" letter-spacing="3">${label}</text>`,
107
+ `<text x="46" y="98" class="x" fill="#f8f8f9" font-size="32">Part of <tspan fill="${ACCENT}">AntelopeJS</tspan></text>`,
108
+ `<text x="48" y="128" class="m" fill="#9b9ba4" font-size="16">${TAGLINE}</text>`,
109
+ hexagon(),
110
+ `<g class="a1"><rect class="pulse" x="870" y="44" width="290" height="62" rx="31" fill="none" stroke="${ACCENT}" stroke-width="2"/><rect x="876" y="50" width="278" height="50" rx="25" fill="${ACCENT}" fill-opacity=".14"/><text x="1015" y="82" text-anchor="middle" class="x" fill="${ACCENT}" font-size="20">★ Star AntelopeJS</text></g>`,
111
+ "</svg>",
112
+ ""
113
+ ].join("");
114
+ }
115
+ /** Writes the strip banner of the repository at `root` to `.github/readme/strip.svg`. */
116
+ function writeStrip(root, kind, name) {
117
+ const svg = stripSvg(kind, name);
118
+ mkdirSync(join(root, ".github/readme"), { recursive: true });
119
+ writeFileSync(join(root, STRIP_PATH), svg);
120
+ }
121
+ //#endregion
122
+ //#region src/bin/readme-strip.ts
123
+ const USAGE = `usage: antelopejs-readme-strip --kind <${STRIP_KINDS.join("|")}> --name <label-name>`;
124
+ runCli(() => {
125
+ const { values } = parseArgs({ options: {
126
+ kind: { type: "string" },
127
+ name: { type: "string" }
128
+ } });
129
+ if (values.kind === void 0 || values.name === void 0) throw new Error(USAGE);
130
+ writeStrip(repositoryRoot(), values.kind, values.name);
131
+ return 0;
132
+ });
133
+ //#endregion
134
+ export {};
package/dist/bin/sync.mjs CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import { a as formatCeilings, l as readCeilings, s as isRetired, t as CEILINGS_FILE } from "../ceilings-B7KayYIG.mjs";
3
- import { a as managedPackage, c as repositoryTools, d as toolingVersions, f as usesCaptures, l as serializeManifest, n as bootstrapDependencies, o as packageManager, p as usesNuxt, r as bootstrappedManifest, s as parseManifest, t as addedDevDependencies, u as templatePackage } from "../package-CORwvwTw.mjs";
3
+ import { a as managedPackage, c as repositoryTools, f as toolingVersions, l as serializeManifest, m as usesNuxt, n as bootstrapDependencies, o as packageManager, p as usesCaptures, r as bootstrappedManifest, s as parseManifest, t as addedDevDependencies, u as templatePackage } from "../package-DnxZ2CXZ.mjs";
4
4
  import { t as admits } from "../semver-BDxeEcP_.mjs";
5
- import { i as presetConfig, n as SETUP_SCRIPT, r as lefthook, t as PRESET_CONFIGS } from "../templates-DaatyItc.mjs";
5
+ import { i as presetConfig, n as SETUP_SCRIPT, r as lefthook, t as PRESET_CONFIGS } from "../templates-Dg188oRC.mjs";
6
6
  import { a as VERIFY_KINDS, c as isVerifyKind, i as SYNCED_SKILL_FILES, l as skillFolder, o as claudeLink, s as claudeLinkTarget, u as planDocsSkills } from "../shared-igPpEDpS.mjs";
7
7
  import { t as runCli } from "../cli-4Tv71vYk.mjs";
8
8
  import { c as CI_CONTEXT, f as ciWorkflow, i as hasChecksWorkflow, n as ciNodeCallers, p as placeholderTestScript, r as ciRenovateSyncCallers, s as renovateArtifacts, t as MISSING_CHECKS_WORKFLOW, u as CI_PATH } from "../workflow-CPcNc8KL.mjs";
9
9
  import { a as gitFiles, c as repositoryRoot } from "../files-DJ0TeaTU.mjs";
10
- import { a as stepsOf, c as workspacePatterns, i as matchingScripts, n as droppedChecksSteps, o as planDocs, s as workspaceDirectories } from "../checks-CyMCnYb4.mjs";
11
- import { i as recordedRelease, t as measureBaseline } from "../ratchet-Al0XZtOz.mjs";
10
+ import { a as stepsOf, c as workspacePatterns, i as matchingScripts, n as droppedChecksSteps, o as planDocs, s as workspaceDirectories } from "../checks-DqTjyKCC.mjs";
11
+ import { i as recordedRelease, t as measureBaseline } from "../ratchet-1O8k4Dxu.mjs";
12
12
  import { n as SUPPRESSIONS_FILE, r as adoptedBudget } from "../suppression-budget-DgYdu6JK.mjs";
13
13
  import { u as typescript } from "../suppressions-CQTcKCi1.mjs";
14
14
  import { t as DEFAULT_SHARED } from "../map-DRyYz_Fw.mjs";
@@ -1,5 +1,5 @@
1
1
  import { t as CEILINGS_FILE } from "./ceilings-B7KayYIG.mjs";
2
- import { o as packageManager, s as parseManifest } from "./package-CORwvwTw.mjs";
2
+ import { o as packageManager, s as parseManifest } from "./package-DnxZ2CXZ.mjs";
3
3
  import { a as gitFiles } from "./files-DJ0TeaTU.mjs";
4
4
  import { t as accepting } from "./ports-DGP6bPJy.mjs";
5
5
  import { createRequire } from "node:module";
@@ -11,6 +11,26 @@ import ts from "typescript";
11
11
  import { createHash } from "node:crypto";
12
12
  import { tmpdir } from "node:os";
13
13
  import { minimatch } from "minimatch";
14
+ //#region src/guardrails/marker-block.ts
15
+ /** The comment pair sync writes a generated block between. */
16
+ function markers(name) {
17
+ return {
18
+ name,
19
+ start: `<!-- ${name}:start -->`,
20
+ end: `<!-- ${name}:end -->`
21
+ };
22
+ }
23
+ /** The README with `block` between its markers. A README without markers comes back as it is. */
24
+ function placeMarkedBlock(current, { name, start, end }, block) {
25
+ const starts = current.split(start).length - 1;
26
+ const ends = current.split(end).length - 1;
27
+ if (starts === 0 && ends === 0) return current;
28
+ const from = current.indexOf(start);
29
+ const to = current.indexOf(end);
30
+ if (starts !== 1 || ends !== 1 || to < from) throw new Error(`invalid ${name} markers: a README holds exactly one start marker followed by one end marker. Repair or delete them, then rerun antelopejs-sync.`);
31
+ return `${current.slice(0, from)}${block}${current.slice(to + end.length).replace(/^\r?\n/, "")}`;
32
+ }
33
+ //#endregion
14
34
  //#region src/guardrails/markdown-table.ts
15
35
  /** The lines of a Markdown table whose first row is the header, columns padded as oxfmt leaves them. */
16
36
  function tableLines(table) {
@@ -23,12 +43,111 @@ function tableLines(table) {
23
43
  ];
24
44
  }
25
45
  //#endregion
46
+ //#region src/guardrails/docs-framework-modules.ts
47
+ const FRAMEWORK_MODULES = markers("antelopejs-framework-modules");
48
+ const FRAMEWORK_MODULES_START = FRAMEWORK_MODULES.start;
49
+ const FRAMEWORK_MODULES_END = FRAMEWORK_MODULES.end;
50
+ const ORGANIZATION$1 = "https://github.com/AntelopeJS";
51
+ const SCOPE$1 = "@antelopejs/";
52
+ /** The framework areas in display order. Every README holding the markers lists exactly these. */
53
+ const AREAS = [
54
+ {
55
+ area: "API",
56
+ contracts: [
57
+ "interface-api",
58
+ "interface-api-util",
59
+ "interface-data-api"
60
+ ],
61
+ providers: ["api"]
62
+ },
63
+ {
64
+ area: "Auth",
65
+ contracts: ["interface-auth"],
66
+ providers: ["auth-jwt"]
67
+ },
68
+ {
69
+ area: "Database",
70
+ contracts: [
71
+ "interface-database",
72
+ "interface-database-decorators",
73
+ "interface-database-catalog",
74
+ "interface-mongodb",
75
+ "interface-rethinkdb"
76
+ ],
77
+ providers: [
78
+ "postgres",
79
+ "mongodb",
80
+ "rethinkdb"
81
+ ]
82
+ },
83
+ {
84
+ area: "Redis",
85
+ contracts: ["interface-redis", "interface-redis-scheduler"],
86
+ providers: ["redis"]
87
+ },
88
+ {
89
+ area: "Email",
90
+ contracts: ["interface-email"],
91
+ providers: ["nodemailer", "brevo"]
92
+ },
93
+ {
94
+ area: "File storage",
95
+ contracts: ["interface-file-storage"],
96
+ providers: ["file-storage-local", "file-storage-s3"]
97
+ },
98
+ {
99
+ area: "Payments",
100
+ contracts: [
101
+ "interface-payment",
102
+ "interface-subscriptions",
103
+ "interface-stripe"
104
+ ],
105
+ providers: [
106
+ "stripe",
107
+ "mollie",
108
+ "checkout-com",
109
+ "payment-subscriptions"
110
+ ]
111
+ }
112
+ ];
113
+ function cell(repos, current) {
114
+ return repos.map((repo) => repo === current ? `**\`${repo}\`**` : `[\`${repo}\`](${ORGANIZATION$1}/${repo})`).join(" · ");
115
+ }
116
+ /** The generated block, the README's own repository in bold, formatted as oxfmt leaves it. */
117
+ function frameworkModulesBlock(current) {
118
+ return [
119
+ FRAMEWORK_MODULES_START,
120
+ "",
121
+ ...tableLines([[
122
+ "Area",
123
+ "Contracts",
124
+ "Providers"
125
+ ], ...AREAS.map(({ area, contracts, providers }) => [
126
+ area,
127
+ cell(contracts, current),
128
+ cell(providers, current)
129
+ ])]),
130
+ "",
131
+ FRAMEWORK_MODULES_END,
132
+ ""
133
+ ].join("\n");
134
+ }
135
+ /** The repository a package lives in: its name without the `@antelopejs/` scope, as every framework package is named. */
136
+ function frameworkRepo(packageName) {
137
+ return packageName?.startsWith(SCOPE$1) ? packageName.slice(12) : void 0;
138
+ }
139
+ /** The README with the block between its markers rewritten for the package named `packageName`. A README without markers comes back as it is. */
140
+ function placeFrameworkModulesBlock(current, packageName) {
141
+ return placeMarkedBlock(current, FRAMEWORK_MODULES, frameworkModulesBlock(frameworkRepo(packageName)));
142
+ }
143
+ //#endregion
26
144
  //#region src/guardrails/docs-modules.ts
27
- const DMS_MODULES_START = "<!-- antelopejs-dms-modules:start -->";
28
- const DMS_MODULES_END = "<!-- antelopejs-dms-modules:end -->";
145
+ const DMS_MODULES = markers("antelopejs-dms-modules");
146
+ const DMS_MODULES_START = DMS_MODULES.start;
147
+ const DMS_MODULES_END = DMS_MODULES.end;
29
148
  const ORGANIZATION = "https://github.com/AntelopeJS";
30
149
  /** The AntelopeJS DMS modules in display order. Every README holding the markers lists exactly these. */
31
- const DMS_MODULES = [
150
+ const MODULES = [
32
151
  {
33
152
  repo: "dms-builder",
34
153
  row: "Edit pages, tables and data sources by clicking, as TypeScript that compiles"
@@ -79,7 +198,7 @@ function modulesBlock() {
79
198
  return [
80
199
  DMS_MODULES_START,
81
200
  "",
82
- ...tableLines([["Module", "What it adds"], ...DMS_MODULES.map(({ repo, row }) => [`[\`${repo}\`](${ORGANIZATION}/${repo})`, row])]),
201
+ ...tableLines([["Module", "What it adds"], ...MODULES.map(({ repo, row }) => [`[\`${repo}\`](${ORGANIZATION}/${repo})`, row])]),
83
202
  "",
84
203
  DMS_MODULES_END,
85
204
  ""
@@ -87,13 +206,7 @@ function modulesBlock() {
87
206
  }
88
207
  /** The README with the block between its markers rewritten. A README without markers comes back as it is. */
89
208
  function placeModulesBlock(current) {
90
- const start = current.indexOf(DMS_MODULES_START);
91
- const end = current.indexOf(DMS_MODULES_END);
92
- const starts = current.split(DMS_MODULES_START).length - 1;
93
- const ends = current.split(DMS_MODULES_END).length - 1;
94
- if (starts === 0 && ends === 0) return current;
95
- if (starts !== 1 || ends !== 1 || end < start) throw new Error("invalid antelopejs-dms-modules markers: a README holds exactly one start marker followed by one end marker. Repair or delete them, then rerun antelopejs-sync.");
96
- return `${current.slice(0, start)}${modulesBlock()}${current.slice(end + 35).replace(/^\r?\n/, "")}`;
209
+ return placeMarkedBlock(current, DMS_MODULES, modulesBlock());
97
210
  }
98
211
  //#endregion
99
212
  //#region src/guardrails/docs-compat.ts
@@ -305,7 +418,7 @@ function readLock(root, shared, directory, documents) {
305
418
  };
306
419
  }
307
420
  /** Adds one package's `docs-files` lines and, when it needs one, its README with the generated blocks. */
308
- function planPackage(root, plan, lock, standard, { directory, ranges, published, node }) {
421
+ function planPackage(root, plan, lock, standard, { directory, name, ranges, published, node }) {
309
422
  const readme = relative$1(directory, "README.md");
310
423
  const docs = relative$1(directory, "docs");
311
424
  if (!published) return;
@@ -324,7 +437,7 @@ function planPackage(root, plan, lock, standard, { directory, ranges, published,
324
437
  plan.readmes.push({
325
438
  path: readme,
326
439
  current,
327
- content: placeModulesBlock(rows.length > 0 ? placeCompatBlock(withRequirements, compatBlock(rows)) : withRequirements ?? "")
440
+ content: placeFrameworkModulesBlock(placeModulesBlock(rows.length > 0 ? placeCompatBlock(withRequirements, compatBlock(rows)) : withRequirements ?? ""), name)
328
441
  });
329
442
  } catch (error) {
330
443
  plan.errors.push(`${readme}: ${error instanceof Error ? error.message : String(error)}`);
@@ -342,6 +455,7 @@ function planDocs(root, manager) {
342
455
  const manifest = directory ? readManifest(root, directory) : rootManifest;
343
456
  return {
344
457
  directory,
458
+ name: manifest.name,
345
459
  published: !directory || !manifest.private,
346
460
  node: manifest.engines?.node,
347
461
  ranges: manifest.private ? /* @__PURE__ */ new Map() : declaredRanges(manifest)
package/dist/oxc/lint.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { i as findGitRoot } from "../ceilings-B7KayYIG.mjs";
2
2
  import { t as readCarriedCeilings } from "../renames-L2owF5GD.mjs";
3
- import { t as PRESET_CONFIGS } from "../templates-DaatyItc.mjs";
3
+ import { t as PRESET_CONFIGS } from "../templates-Dg188oRC.mjs";
4
4
  import { t as TYPE_AWARE_RULES } from "../type-aware-rules-DMuN6sHb.mjs";
5
5
  import { n as TEST_FILE_GLOBS, t as ASSERTION_FUNCTION_NAMES } from "../shared-WC0z3y9F.mjs";
6
6
  import { n as IGNORE_PATTERNS, r as SYNCED_AGENT_PATTERNS } from "../shared-igPpEDpS.mjs";
@@ -41,39 +41,39 @@ function execCommand(manager) {
41
41
  if (manager === "bun") return "bun x --no-install";
42
42
  return `${manager} exec`;
43
43
  }
44
- function toolingVersions() {
44
+ /** The directory of the installed `@antelopejs/tooling-configs` package, from source or from `dist`. */
45
+ function toolingRoot() {
45
46
  let directory = dirname(fileURLToPath(import.meta.url));
46
47
  while (true) {
47
48
  const path = join(directory, "package.json");
48
- if (existsSync(path)) {
49
- const manifest = parseManifest(readFileSync(path, "utf8"));
50
- if (manifest.name === "@antelopejs/tooling-configs") {
51
- const declared = (field, name) => {
52
- const range = manifest[field]?.[name];
53
- if (!range) throw new Error(`tooling-configs must declare ${name} in ${field}.`);
54
- return range;
55
- };
56
- const dev = (name) => declared("devDependencies", name);
57
- if (!manifest.version) throw new Error("tooling-configs must declare its version.");
58
- return {
59
- lefthook: dev("lefthook"),
60
- knip: dev("knip"),
61
- tsgolint: dev("oxlint-tsgolint"),
62
- oxlint: dev("oxlint"),
63
- oxfmt: dev("oxfmt"),
64
- typescript: declared("dependencies", "typescript"),
65
- nodeTypes: dev("@types/node"),
66
- capture: CAPTURE_PEERS.map((name) => [name, dev(name)]),
67
- packageManager: packageManager$1,
68
- pack: manifest.version
69
- };
70
- }
71
- }
49
+ if (existsSync(path) && parseManifest(readFileSync(path, "utf8")).name === "@antelopejs/tooling-configs") return directory;
72
50
  const parent = dirname(directory);
73
51
  if (parent === directory) throw new Error("Cannot find tooling-configs package.json.");
74
52
  directory = parent;
75
53
  }
76
54
  }
55
+ function toolingVersions() {
56
+ const manifest = parseManifest(readFileSync(join(toolingRoot(), "package.json"), "utf8"));
57
+ const declared = (field, name) => {
58
+ const range = manifest[field]?.[name];
59
+ if (!range) throw new Error(`tooling-configs must declare ${name} in ${field}.`);
60
+ return range;
61
+ };
62
+ const dev = (name) => declared("devDependencies", name);
63
+ if (!manifest.version) throw new Error("tooling-configs must declare its version.");
64
+ return {
65
+ lefthook: dev("lefthook"),
66
+ knip: dev("knip"),
67
+ tsgolint: dev("oxlint-tsgolint"),
68
+ oxlint: dev("oxlint"),
69
+ oxfmt: dev("oxfmt"),
70
+ typescript: declared("dependencies", "typescript"),
71
+ nodeTypes: dev("@types/node"),
72
+ capture: CAPTURE_PEERS.map((name) => [name, dev(name)]),
73
+ packageManager: packageManager$1,
74
+ pack: manifest.version
75
+ };
76
+ }
77
77
  function repositoryTools(manifest) {
78
78
  return {
79
79
  installed: {
@@ -281,4 +281,4 @@ function serializeManifest(manifest, current) {
281
281
  return `${JSON.stringify(manifest, null, indent).replaceAll("\n", newline)}${newline}`;
282
282
  }
283
283
  //#endregion
284
- export { managedPackage as a, repositoryTools as c, toolingVersions as d, usesCaptures as f, execCommand as i, serializeManifest as l, bootstrapDependencies as n, packageManager as o, usesNuxt as p, bootstrappedManifest as r, parseManifest as s, addedDevDependencies as t, templatePackage as u };
284
+ export { managedPackage as a, repositoryTools as c, toolingRoot as d, toolingVersions as f, execCommand as i, serializeManifest as l, usesNuxt as m, bootstrapDependencies as n, packageManager as o, usesCaptures as p, bootstrappedManifest as r, parseManifest as s, addedDevDependencies as t, templatePackage as u };
@@ -1,4 +1,4 @@
1
- import { s as parseManifest } from "./package-CORwvwTw.mjs";
1
+ import { s as parseManifest } from "./package-DnxZ2CXZ.mjs";
2
2
  import { l as resolveRevision, u as trackedManifests } from "./files-DJ0TeaTU.mjs";
3
3
  import { o as revisionSuppressions, r as countSuppressions } from "./suppressions-CQTcKCi1.mjs";
4
4
  import { copyFileSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, symlinkSync } from "node:fs";
@@ -1,6 +1,6 @@
1
1
  import { a as formatCeilings, c as parseCeilings, n as MAX_FILE_BYTES, o as isPackRelease, s as isRetired, t as CEILINGS_FILE } from "./ceilings-B7KayYIG.mjs";
2
2
  import { n as renamedPaths, t as readCarriedCeilings } from "./renames-L2owF5GD.mjs";
3
- import { d as toolingVersions } from "./package-CORwvwTw.mjs";
3
+ import { f as toolingVersions } from "./package-DnxZ2CXZ.mjs";
4
4
  import { n as authoredSizes, o as isAgentFile, r as changedFiles, t as LINT_CONFIG } from "./files-DJ0TeaTU.mjs";
5
5
  import { t as lintDiagnostics } from "./oxlint-BbpTFFmf.mjs";
6
6
  import "./suppression-budget-DgYdu6JK.mjs";
@@ -1,4 +1,4 @@
1
- import { i as execCommand } from "./package-CORwvwTw.mjs";
1
+ import { i as execCommand } from "./package-DnxZ2CXZ.mjs";
2
2
  import { isMap, parseDocument } from "yaml";
3
3
  //#region src/guardrails/templates.ts
4
4
  const PRESET_CONFIGS = [
@@ -1,4 +1,4 @@
1
- import { s as parseManifest } from "./package-CORwvwTw.mjs";
1
+ import { s as parseManifest } from "./package-DnxZ2CXZ.mjs";
2
2
  import { u as trackedManifests } from "./files-DJ0TeaTU.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/tooling-configs",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "Shared tooling presets for AntelopeJS repositories: oxlint (with the vendored anti-slop rules), oxfmt, ESLint for Nuxt layers, Knip, and an interface range check",
5
5
  "keywords": [
6
6
  "antelopejs",
@@ -31,12 +31,14 @@
31
31
  "antelopejs-garden": "./dist/bin/garden.mjs",
32
32
  "antelopejs-lease": "./dist/bin/lease.mjs",
33
33
  "antelopejs-ratchet": "./dist/bin/ratchet.mjs",
34
+ "antelopejs-readme-strip": "./dist/bin/readme-strip.mjs",
34
35
  "antelopejs-suppressions": "./dist/bin/suppressions.mjs",
35
36
  "antelopejs-sync": "./dist/bin/sync.mjs",
36
37
  "antelopejs-triage": "./dist/bin/triage.mjs",
37
38
  "antelopejs-verify": "./dist/bin/verify.mjs"
38
39
  },
39
40
  "files": [
41
+ "assets",
40
42
  "dist"
41
43
  ],
42
44
  "type": "module",