@antelopejs/tooling-configs 0.2.8 → 0.2.9
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 +11 -0
- package/dist/bin/api-diff.mjs +3 -2
- package/dist/bin/check-size.mjs +4 -3
- package/dist/bin/checks.mjs +2 -1
- package/dist/bin/comment-proof.mjs +3 -2
- package/dist/bin/garden.d.mts +1 -0
- package/dist/bin/garden.mjs +1480 -0
- package/dist/bin/ratchet.mjs +4 -3
- package/dist/bin/suppressions.mjs +3 -2
- package/dist/bin/sync.mjs +26 -31
- package/dist/ci-workflow-BDy6hQJ6.mjs +164 -0
- package/dist/cli-4Tv71vYk.mjs +19 -0
- package/dist/{files-BMxKg5IR.mjs → files-2FikHZ9F.mjs} +1 -11
- package/dist/{ratchet-zzo2tT74.mjs → ratchet-B2qYUs51.mjs} +3 -3
- package/dist/{size-Fp3aWSkN.mjs → size-BVgNbLO6.mjs} +1 -1
- package/dist/{staged-ratchet-CJHjp2kx.mjs → staged-ratchet-BNfjcbih.mjs} +1 -1
- package/dist/{suppression-budget-Cu0wOmFO.mjs → suppression-budget-Bq30tJDS.mjs} +3 -3
- package/dist/{suppressions-C3AE6_I-.mjs → suppressions-BJAngUxo.mjs} +1 -1
- package/dist/{typescript-YufoJnck.mjs → typescript-C54ONh9m.mjs} +2 -2
- package/package.json +2 -1
package/dist/bin/ratchet.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { t as CEILINGS_FILE } from "../ceilings-BSw9p4YB.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
3
|
+
import { t as runCli } from "../cli-4Tv71vYk.mjs";
|
|
4
|
+
import { a as repositoryPath, o as repositoryRoot, s as resolveRevision } from "../files-2FikHZ9F.mjs";
|
|
5
|
+
import { n as stagedRatchet } from "../staged-ratchet-BNfjcbih.mjs";
|
|
6
|
+
import { n as ratchet } from "../ratchet-B2qYUs51.mjs";
|
|
6
7
|
import { resolve } from "node:path";
|
|
7
8
|
import { parseArgs } from "node:util";
|
|
8
9
|
//#region src/bin/ratchet.ts
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { t as runCli } from "../cli-4Tv71vYk.mjs";
|
|
3
|
+
import { o as repositoryRoot, s as resolveRevision } from "../files-2FikHZ9F.mjs";
|
|
4
|
+
import { a as parseBudget, c as checkPolicy, i as checkSuppressions, n as SUPPRESSIONS_FILE, o as safetyCeiling, s as stagedSuppressions } from "../suppression-budget-Bq30tJDS.mjs";
|
|
4
5
|
import { readFileSync } from "node:fs";
|
|
5
6
|
import { join } from "node:path";
|
|
6
7
|
import { execFileSync, spawnSync } from "node:child_process";
|
package/dist/bin/sync.mjs
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { a as formatCeilings, o as isRetired, s as readCeilings, t as CEILINGS_FILE } from "../ceilings-BSw9p4YB.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { t as runCli } from "../cli-4Tv71vYk.mjs";
|
|
4
|
+
import { o as repositoryRoot } from "../files-2FikHZ9F.mjs";
|
|
4
5
|
import { a as repositoryTools, i as parseManifest, n as managedPackage, o as toolingVersions, r as packageManager, t as execCommand } from "../package-Dtjt_lSa.mjs";
|
|
5
|
-
import { t as measureBaseline } from "../ratchet-
|
|
6
|
-
import { n as SUPPRESSIONS_FILE, r as adoptedBudget } from "../suppression-budget-
|
|
6
|
+
import { t as measureBaseline } from "../ratchet-B2qYUs51.mjs";
|
|
7
|
+
import { n as SUPPRESSIONS_FILE, r as adoptedBudget } from "../suppression-budget-Bq30tJDS.mjs";
|
|
8
|
+
import { a as ciWorkflow, c as ciNodeCallers, i as MUTATION_PATH, l as hasChecksWorkflow, o as mutationCaller, r as CI_PATH, s as MISSING_CHECKS_WORKFLOW } from "../ci-workflow-BDy6hQJ6.mjs";
|
|
7
9
|
import { chmodSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, readlinkSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
8
10
|
import { dirname, join, resolve } from "node:path";
|
|
9
11
|
import { execFileSync } from "node:child_process";
|
|
10
12
|
import { parseArgs } from "node:util";
|
|
11
|
-
import { isMap,
|
|
13
|
+
import { isMap, parseDocument } from "yaml";
|
|
12
14
|
//#region src/guardrails/agents-block.ts
|
|
13
15
|
const AGENTS_BLOCK_START = "<!-- antelopejs-guardrails:start -->";
|
|
14
16
|
const AGENTS_BLOCK_END = "<!-- antelopejs-guardrails:end -->";
|
|
@@ -268,32 +270,6 @@ case "$manager" in
|
|
|
268
270
|
esac
|
|
269
271
|
`;
|
|
270
272
|
//#endregion
|
|
271
|
-
//#region src/guardrails/workflow.ts
|
|
272
|
-
const MISSING_CHECKS_WORKFLOW = "No workflow in .github/workflows runs pnpm run checks. Add a step running `pnpm run checks` (or `pnpm checks`), or a job using AntelopeJS/.github/.github/workflows/ci-node.yml@<ref>.";
|
|
273
|
-
function hasChecksWorkflow(root) {
|
|
274
|
-
const directory = join(root, ".github/workflows");
|
|
275
|
-
if (!existsSync(directory)) return false;
|
|
276
|
-
for (const file of readdirSync(directory).filter((name) => /\.ya?ml$/.test(name))) {
|
|
277
|
-
const document = parseDocument(readFileSync(join(directory, file), "utf8"));
|
|
278
|
-
if (document.errors.length) continue;
|
|
279
|
-
const jobs = document.get("jobs", true);
|
|
280
|
-
if (!isMap(jobs)) continue;
|
|
281
|
-
for (const { value: job } of jobs.items) {
|
|
282
|
-
if (!isMap(job)) continue;
|
|
283
|
-
const uses = job.get("uses", true);
|
|
284
|
-
if (isScalar(uses) && /^AntelopeJS\/\.github\/\.github\/workflows\/ci-node\.yml@\S+$/.test(String(uses.value))) return true;
|
|
285
|
-
const steps = job.get("steps", true);
|
|
286
|
-
if (!isSeq(steps)) continue;
|
|
287
|
-
for (const step of steps.items) {
|
|
288
|
-
if (!isMap(step)) continue;
|
|
289
|
-
const run = step.get("run", true);
|
|
290
|
-
if (isScalar(run) && /(?:^|\n|&&|;)\s*pnpm\s+(?:run\s+)?checks(?=\s*(?:$|\n|&&|;|#))/.test(String(run.value))) return true;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
return false;
|
|
295
|
-
}
|
|
296
|
-
//#endregion
|
|
297
273
|
//#region src/guardrails/entry-only.ts
|
|
298
274
|
const LOAD_RULES = `
|
|
299
275
|
const advisories = [];
|
|
@@ -403,6 +379,22 @@ const MANAGED_ARTIFACTS = [
|
|
|
403
379
|
notes: []
|
|
404
380
|
})
|
|
405
381
|
},
|
|
382
|
+
{
|
|
383
|
+
path: CI_PATH,
|
|
384
|
+
profiles: ["full", "template"],
|
|
385
|
+
desired: (current) => ({
|
|
386
|
+
content: ciWorkflow(current, current === void 0 ? [] : ciNodeCallers(current)),
|
|
387
|
+
notes: []
|
|
388
|
+
})
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
path: MUTATION_PATH,
|
|
392
|
+
profiles: ["full"],
|
|
393
|
+
desired: (_current, context) => ({
|
|
394
|
+
content: mutationCaller(context.packageName),
|
|
395
|
+
notes: []
|
|
396
|
+
})
|
|
397
|
+
},
|
|
406
398
|
{
|
|
407
399
|
path: "package.json",
|
|
408
400
|
profiles: ["full"],
|
|
@@ -468,6 +460,7 @@ function planSync(current, modes, context) {
|
|
|
468
460
|
for (const artifact of MANAGED_ARTIFACTS) {
|
|
469
461
|
if (!artifact.profiles.includes(context.profile)) continue;
|
|
470
462
|
if (artifact.path === "guardrails.ratchet.json" && !context.ratchet) continue;
|
|
463
|
+
if (artifact.path === ".github/workflows/ci.yml" && !context.managesCi) continue;
|
|
471
464
|
try {
|
|
472
465
|
const { content, notes } = artifact.desired(current.get(artifact.path), context);
|
|
473
466
|
const changed = current.get(artifact.path) !== content || artifact.mode !== void 0 && (artifact.mode & 73) !== 0 && ((modes.get(artifact.path) ?? 0) & 73) === 0;
|
|
@@ -551,6 +544,8 @@ function repositoryContext(root, current, profile) {
|
|
|
551
544
|
claude: profile === "full" ? claudeProse(root, current) : "",
|
|
552
545
|
baseline: "",
|
|
553
546
|
suppressionBudget: profile === "full" && !current.has("guardrails.suppressions.json") ? adoptedBudget(root) : "",
|
|
547
|
+
packageName: manifest.name ?? "",
|
|
548
|
+
managesCi: current.has(".github/workflows/ci.yml") || !hasChecksWorkflow(root),
|
|
554
549
|
verificationSkill: verificationSkill(root),
|
|
555
550
|
glossary: ["GLOSSARY.md", "docs/GLOSSARY.md"].find((file) => existsSync(join(root, file)))
|
|
556
551
|
};
|
|
@@ -566,7 +561,7 @@ function writeArtifacts(root, artifacts) {
|
|
|
566
561
|
}
|
|
567
562
|
function repositoryNotices(root, context) {
|
|
568
563
|
const notices = [];
|
|
569
|
-
if (context.profile === "full" && !hasChecksWorkflow(root)) notices.push(MISSING_CHECKS_WORKFLOW);
|
|
564
|
+
if (context.profile === "full" && !hasChecksWorkflow(root) && existsSync(join(root, ".github/workflows/ci.yml"))) notices.push(MISSING_CHECKS_WORKFLOW);
|
|
570
565
|
if (context.ratchet && isRetired(readCeilings(root))) notices.push(RETIRED_RATCHET);
|
|
571
566
|
return notices;
|
|
572
567
|
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { isMap, isScalar, isSeq, parseDocument } from "yaml";
|
|
4
|
+
//#region src/guardrails/workflow.ts
|
|
5
|
+
const CI_NODE_PATTERN = /^AntelopeJS\/\.github\/\.github\/workflows\/ci-node\.yml@\S+$/;
|
|
6
|
+
const MISSING_CHECKS_WORKFLOW = "No workflow in .github/workflows runs pnpm run checks. Add a step running `pnpm run checks` (or `pnpm checks`), or a job using AntelopeJS/.github/.github/workflows/ci-node.yml@<ref>.";
|
|
7
|
+
function hasChecksWorkflow(root) {
|
|
8
|
+
const directory = join(root, ".github/workflows");
|
|
9
|
+
if (!existsSync(directory)) return false;
|
|
10
|
+
for (const file of readdirSync(directory).filter((name) => /\.ya?ml$/.test(name))) {
|
|
11
|
+
const document = parseDocument(readFileSync(join(directory, file), "utf8"));
|
|
12
|
+
if (document.errors.length) continue;
|
|
13
|
+
const jobs = document.get("jobs", true);
|
|
14
|
+
if (!isMap(jobs)) continue;
|
|
15
|
+
for (const { value: job } of jobs.items) {
|
|
16
|
+
if (!isMap(job)) continue;
|
|
17
|
+
const uses = job.get("uses", true);
|
|
18
|
+
if (isScalar(uses) && CI_NODE_PATTERN.test(String(uses.value))) return true;
|
|
19
|
+
const steps = job.get("steps", true);
|
|
20
|
+
if (!isSeq(steps)) continue;
|
|
21
|
+
for (const step of steps.items) {
|
|
22
|
+
if (!isMap(step)) continue;
|
|
23
|
+
const run = step.get("run", true);
|
|
24
|
+
if (isScalar(run) && /(?:^|\n|&&|;)\s*pnpm\s+(?:run\s+)?checks(?=\s*(?:$|\n|&&|;|#))/.test(String(run.value))) return true;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
/** Jobs of a workflow file that call the shared Node CI; empty when the YAML does not parse. */
|
|
31
|
+
function ciNodeCallers(text) {
|
|
32
|
+
const document = parseDocument(text);
|
|
33
|
+
const jobs = document.errors.length ? void 0 : document.get("jobs", true);
|
|
34
|
+
if (!isMap(jobs)) return [];
|
|
35
|
+
const callers = [];
|
|
36
|
+
for (const { key, value: job } of jobs.items) {
|
|
37
|
+
if (!isMap(job)) continue;
|
|
38
|
+
const uses = job.get("uses", true);
|
|
39
|
+
if (isScalar(uses) && CI_NODE_PATTERN.test(String(uses.value))) callers.push({
|
|
40
|
+
id: String(isScalar(key) ? key.value : key),
|
|
41
|
+
uses: String(uses.value),
|
|
42
|
+
named: job.has("name")
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return callers;
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/guardrails/ci-workflow.ts
|
|
49
|
+
const CI_PATH = ".github/workflows/ci.yml";
|
|
50
|
+
const MUTATION_PATH = ".github/workflows/mutation.yml";
|
|
51
|
+
/** The status context GitHub derives from the caller job id and the shared workflow's `checks` job. */
|
|
52
|
+
const CI_CONTEXT = `ci / checks`;
|
|
53
|
+
const CI_NODE_REF = "AntelopeJS/.github/.github/workflows/ci-node.yml@v1";
|
|
54
|
+
const MUTATION_REF = "AntelopeJS/.github/.github/workflows/mutation.yml@v1";
|
|
55
|
+
const CI_CALLER = `name: ci
|
|
56
|
+
|
|
57
|
+
on:
|
|
58
|
+
push:
|
|
59
|
+
branches:
|
|
60
|
+
- main
|
|
61
|
+
- next
|
|
62
|
+
pull_request:
|
|
63
|
+
workflow_dispatch:
|
|
64
|
+
|
|
65
|
+
permissions:
|
|
66
|
+
contents: read
|
|
67
|
+
|
|
68
|
+
jobs:
|
|
69
|
+
ci:
|
|
70
|
+
permissions:
|
|
71
|
+
contents: write
|
|
72
|
+
actions: write
|
|
73
|
+
uses: ${CI_NODE_REF}
|
|
74
|
+
`;
|
|
75
|
+
const WEEK_MINUTES = 10080;
|
|
76
|
+
/** Spreads the weekly runs of different repositories over the week so they do not queue together. */
|
|
77
|
+
function mutationCaller(packageName) {
|
|
78
|
+
let slot = 0;
|
|
79
|
+
for (const character of packageName) slot = (slot * 31 + character.charCodeAt(0)) % WEEK_MINUTES;
|
|
80
|
+
const day = Math.floor(slot / 1440) % 7;
|
|
81
|
+
return `name: mutation
|
|
82
|
+
|
|
83
|
+
on:
|
|
84
|
+
schedule:
|
|
85
|
+
- cron: "${slot % 60} ${Math.floor(slot % 1440 / 60)} * * ${day}"
|
|
86
|
+
workflow_dispatch:
|
|
87
|
+
|
|
88
|
+
permissions:
|
|
89
|
+
contents: read
|
|
90
|
+
|
|
91
|
+
jobs:
|
|
92
|
+
mutation:
|
|
93
|
+
uses: ${MUTATION_REF}
|
|
94
|
+
`;
|
|
95
|
+
}
|
|
96
|
+
function renameNeeds(document, from, to) {
|
|
97
|
+
const jobs = document.get("jobs", true);
|
|
98
|
+
if (!isMap(jobs)) return;
|
|
99
|
+
for (const { value: job } of jobs.items) {
|
|
100
|
+
if (!isMap(job)) continue;
|
|
101
|
+
const needs = job.get("needs", true);
|
|
102
|
+
if (isScalar(needs) && needs.value === from) needs.value = to;
|
|
103
|
+
if (isSeq(needs)) {
|
|
104
|
+
for (const entry of needs.items) if (isScalar(entry) && entry.value === from) entry.value = to;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function hasDispatch(document) {
|
|
109
|
+
const trigger = document.get("on", true);
|
|
110
|
+
if (isMap(trigger)) return trigger.has("workflow_dispatch");
|
|
111
|
+
if (isSeq(trigger)) return trigger.items.some((entry) => isScalar(entry) && entry.value === "workflow_dispatch");
|
|
112
|
+
return isScalar(trigger) && trigger.value === "workflow_dispatch";
|
|
113
|
+
}
|
|
114
|
+
function addDispatch(document) {
|
|
115
|
+
const trigger = document.get("on", true);
|
|
116
|
+
if (isMap(trigger)) trigger.set("workflow_dispatch", null);
|
|
117
|
+
else if (isSeq(trigger)) trigger.add("workflow_dispatch");
|
|
118
|
+
else document.set("on", document.createNode(isScalar(trigger) && trigger.value ? [String(trigger.value), "workflow_dispatch"] : ["workflow_dispatch"]));
|
|
119
|
+
}
|
|
120
|
+
function grantsDispatch(job) {
|
|
121
|
+
const granted = job.get("permissions", true);
|
|
122
|
+
return isMap(granted) && granted.items.length === 2 && granted.get("contents") === "write" && granted.get("actions") === "write";
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Keeps the shared CI caller on the job id `ci` with no `name`, so the shared workflow reports `ci / checks`,
|
|
126
|
+
* dispatchable and granted the write permissions the renovate-sync job needs to dispatch it.
|
|
127
|
+
* A workflow with no caller job is repository-specific CI and is left as it is.
|
|
128
|
+
*/
|
|
129
|
+
function ciWorkflow(current, callers) {
|
|
130
|
+
if (current === void 0) return CI_CALLER;
|
|
131
|
+
if (!callers.length) return current;
|
|
132
|
+
const document = parseDocument(current);
|
|
133
|
+
if (document.errors.length) throw new Error(`${CI_PATH}: ${document.errors.map(({ message }) => message).join("; ")}`);
|
|
134
|
+
const jobs = document.get("jobs", true);
|
|
135
|
+
if (!isMap(jobs)) return current;
|
|
136
|
+
const caller = callers.find(({ id }) => id === "ci") ?? callers[0];
|
|
137
|
+
if (caller.id !== "ci" && jobs.has("ci")) throw new Error(`${CI_PATH}: a job named ci already exists besides the ${caller.id} job that calls ci-node.yml. Rename or merge them, then rerun antelopejs-sync.`);
|
|
138
|
+
const pair = jobs.items.find(({ key }) => isScalar(key) && key.value === caller.id);
|
|
139
|
+
if (!pair || !isMap(pair.value)) return current;
|
|
140
|
+
let changed = false;
|
|
141
|
+
if (caller.named) {
|
|
142
|
+
pair.value.delete("name");
|
|
143
|
+
changed = true;
|
|
144
|
+
}
|
|
145
|
+
if (caller.id !== "ci") {
|
|
146
|
+
if (isScalar(pair.key)) pair.key.value = "ci";
|
|
147
|
+
renameNeeds(document, caller.id, "ci");
|
|
148
|
+
changed = true;
|
|
149
|
+
}
|
|
150
|
+
if (!grantsDispatch(pair.value)) {
|
|
151
|
+
pair.value.set("permissions", document.createNode({
|
|
152
|
+
contents: "write",
|
|
153
|
+
actions: "write"
|
|
154
|
+
}));
|
|
155
|
+
changed = true;
|
|
156
|
+
}
|
|
157
|
+
if (!hasDispatch(document)) {
|
|
158
|
+
addDispatch(document);
|
|
159
|
+
changed = true;
|
|
160
|
+
}
|
|
161
|
+
return changed ? document.toString({ lineWidth: 0 }) : current;
|
|
162
|
+
}
|
|
163
|
+
//#endregion
|
|
164
|
+
export { ciWorkflow as a, ciNodeCallers as c, MUTATION_PATH as i, hasChecksWorkflow as l, CI_NODE_REF as n, mutationCaller as o, CI_PATH as r, MISSING_CHECKS_WORKFLOW as s, CI_CONTEXT as t };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/guardrails/cli.ts
|
|
2
|
+
function runCli(main) {
|
|
3
|
+
try {
|
|
4
|
+
process.exitCode = main();
|
|
5
|
+
} catch (error) {
|
|
6
|
+
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
7
|
+
process.exitCode = 1;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
async function runCliAsync(main) {
|
|
11
|
+
try {
|
|
12
|
+
process.exitCode = await main();
|
|
13
|
+
} catch (error) {
|
|
14
|
+
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
15
|
+
process.exitCode = 1;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { runCliAsync as n, runCli as t };
|
|
@@ -3,16 +3,6 @@ import { n as IGNORE_PATTERNS, t as AGENT_IGNORE_PATTERNS } from "./shared-CsXIM
|
|
|
3
3
|
import { closeSync, existsSync, lstatSync, openSync, readSync } from "node:fs";
|
|
4
4
|
import { dirname, join, matchesGlob, relative, resolve } from "node:path";
|
|
5
5
|
import { execFileSync, spawnSync } from "node:child_process";
|
|
6
|
-
//#region src/guardrails/cli.ts
|
|
7
|
-
function runCli(main) {
|
|
8
|
-
try {
|
|
9
|
-
process.exitCode = main();
|
|
10
|
-
} catch (error) {
|
|
11
|
-
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
12
|
-
process.exitCode = 1;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
6
|
//#region src/guardrails/files.ts
|
|
17
7
|
const SIZE_EXCLUSIONS = [
|
|
18
8
|
{
|
|
@@ -189,4 +179,4 @@ function authoredSizes(root, files = gitFiles(root), staged = false) {
|
|
|
189
179
|
return sizes;
|
|
190
180
|
}
|
|
191
181
|
//#endregion
|
|
192
|
-
export { repositoryPath as a, trackedManifests as c, gitFiles as i,
|
|
182
|
+
export { repositoryPath as a, trackedManifests as c, gitFiles as i, changedFiles as n, repositoryRoot as o, generatedOutput as r, resolveRevision as s, authoredSizes as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as formatCeilings, n as MAX_FILE_BYTES, o as isRetired, t as CEILINGS_FILE } from "./ceilings-BSw9p4YB.mjs";
|
|
2
2
|
import { t as readCarriedCeilings } from "./renames-BGO4dWJ8.mjs";
|
|
3
|
-
import { n as changedFiles, t as authoredSizes } from "./files-
|
|
4
|
-
import { r as lintDiagnostics } from "./staged-ratchet-
|
|
5
|
-
import { n as sizeFailure } from "./size-
|
|
3
|
+
import { n as changedFiles, t as authoredSizes } from "./files-2FikHZ9F.mjs";
|
|
4
|
+
import { r as lintDiagnostics } from "./staged-ratchet-BNfjcbih.mjs";
|
|
5
|
+
import { n as sizeFailure } from "./size-BVgNbLO6.mjs";
|
|
6
6
|
import { existsSync, unlinkSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
//#region src/guardrails/ratchet.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./ceilings-BSw9p4YB.mjs";
|
|
2
2
|
import { t as readCarriedCeilings } from "./renames-BGO4dWJ8.mjs";
|
|
3
|
-
import { t as authoredSizes } from "./files-
|
|
3
|
+
import { t as authoredSizes } from "./files-2FikHZ9F.mjs";
|
|
4
4
|
//#region src/guardrails/size.ts
|
|
5
5
|
function sizeFailure(file, size, limit) {
|
|
6
6
|
return `${file}: ${size} bytes, ${size - limit} bytes over the ${limit}-byte ceiling. Split by responsibility into sibling modules, one cohesive group of exports each; keep the original path re-exporting only if it is a public entry point. Split a test file by behaviour under test, one file per describe. Do not minify, strip whitespace, or move code under an excluded path to pass.`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as MEASURE_ENV, s as readCeilings } from "./ceilings-BSw9p4YB.mjs";
|
|
2
2
|
import { n as renamedPaths } from "./renames-BGO4dWJ8.mjs";
|
|
3
|
-
import { a as repositoryPath } from "./files-
|
|
3
|
+
import { a as repositoryPath } from "./files-2FikHZ9F.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { basename, dirname, join } from "node:path";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as renamedPaths } from "./renames-BGO4dWJ8.mjs";
|
|
2
|
-
import { n as changedFiles } from "./files-
|
|
3
|
-
import { t as stagedAdditions } from "./staged-ratchet-
|
|
4
|
-
import { a as revisionSuppressions, i as openDisablesIn, n as countSuppressions, o as worktreeSuppressions, r as inWorktree, t as atRevision } from "./suppressions-
|
|
2
|
+
import { n as changedFiles } from "./files-2FikHZ9F.mjs";
|
|
3
|
+
import { t as stagedAdditions } from "./staged-ratchet-BNfjcbih.mjs";
|
|
4
|
+
import { a as revisionSuppressions, i as openDisablesIn, n as countSuppressions, o as worktreeSuppressions, r as inWorktree, t as atRevision } from "./suppressions-BJAngUxo.mjs";
|
|
5
5
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { execFileSync, spawnSync } from "node:child_process";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as markerPattern, t as DEFAULT_SAFETY_MARKERS } from "./require-safety-comment-for-type-assertion-BBQ669kj.mjs";
|
|
2
|
-
import { i as gitFiles, r as generatedOutput } from "./files-
|
|
2
|
+
import { i as gitFiles, r as generatedOutput } from "./files-2FikHZ9F.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { existsSync, lstatSync, readFileSync } from "node:fs";
|
|
5
5
|
import { join } from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as trackedManifests, s as resolveRevision } from "./files-
|
|
1
|
+
import { c as trackedManifests, s as resolveRevision } from "./files-2FikHZ9F.mjs";
|
|
2
2
|
import { i as parseManifest } from "./package-Dtjt_lSa.mjs";
|
|
3
|
-
import { a as revisionSuppressions, n as countSuppressions } from "./suppressions-
|
|
3
|
+
import { a as revisionSuppressions, n as countSuppressions } from "./suppressions-BJAngUxo.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { dirname, join, matchesGlob, relative, resolve, sep } from "node:path";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/tooling-configs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
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",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"antelopejs-check-size": "./dist/bin/check-size.mjs",
|
|
27
27
|
"antelopejs-checks": "./dist/bin/checks.mjs",
|
|
28
28
|
"antelopejs-comment-proof": "./dist/bin/comment-proof.mjs",
|
|
29
|
+
"antelopejs-garden": "./dist/bin/garden.mjs",
|
|
29
30
|
"antelopejs-ratchet": "./dist/bin/ratchet.mjs",
|
|
30
31
|
"antelopejs-suppressions": "./dist/bin/suppressions.mjs",
|
|
31
32
|
"antelopejs-sync": "./dist/bin/sync.mjs"
|