@antelopejs/tooling-configs 0.2.18 → 0.3.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/README.md +12 -7
- package/dist/bin/capture.mjs +1 -1
- package/dist/bin/checks.mjs +22 -4
- package/dist/bin/garden.mjs +231 -31
- package/dist/bin/lease.d.mts +1 -0
- package/dist/bin/lease.mjs +1053 -0
- package/dist/bin/sync.mjs +50 -45
- package/dist/bin/verify.mjs +2404 -2756
- package/dist/{ci-workflow-ChW4He0r.mjs → ci-workflow-DVkpwauQ.mjs} +12 -0
- package/dist/verify/index.d.mts +2 -4
- package/package.json +2 -1
|
@@ -127,6 +127,7 @@ jobs:
|
|
|
127
127
|
uses: ${CI_NODE_REF}
|
|
128
128
|
with:
|
|
129
129
|
renovate-sync: false
|
|
130
|
+
test-job: true
|
|
130
131
|
${RENOVATE_SYNC_JOB_ID}:
|
|
131
132
|
if: >-
|
|
132
133
|
github.event_name == 'pull_request'
|
|
@@ -251,6 +252,14 @@ function skipRenovateSync(document, job) {
|
|
|
251
252
|
else job.set("with", document.createNode({ "renovate-sync": false }));
|
|
252
253
|
return true;
|
|
253
254
|
}
|
|
255
|
+
function addTestJob(document, job) {
|
|
256
|
+
const inputs = job.get("with", true);
|
|
257
|
+
if (isMap(inputs)) {
|
|
258
|
+
if (inputs.has("test-job")) return false;
|
|
259
|
+
inputs.set("test-job", true);
|
|
260
|
+
} else job.set("with", document.createNode({ "test-job": true }));
|
|
261
|
+
return true;
|
|
262
|
+
}
|
|
254
263
|
function lines(text) {
|
|
255
264
|
return text.split("\n").map((line) => line.trim()).filter(Boolean);
|
|
256
265
|
}
|
|
@@ -312,6 +321,8 @@ function assertNoClash(jobs, callerId, hasSyncCaller) {
|
|
|
312
321
|
* Keeps the shared CI caller on the job id `ci` with no `name`, so the shared workflow reports `ci / checks`,
|
|
313
322
|
* dispatchable and read-only, with the Renovate sync it would otherwise run turned off. The write permissions the sync
|
|
314
323
|
* needs to push and dispatch the caller live on a separate job calling ci-renovate-sync.yml, which is added when missing.
|
|
324
|
+
* A caller without a `test-job` input gets `test-job: true`, which runs the tests in their own job; an explicit value
|
|
325
|
+
* is left as the repository set it.
|
|
315
326
|
* No `uses:` ref is ever rewritten. A workflow with no caller job is repository-specific CI and is left as it is.
|
|
316
327
|
* When `docsFiles` computes paths, every caller's `docs-files` input lists them first, then keeps its hand-listed paths
|
|
317
328
|
* that still exist, so sync never drops coverage.
|
|
@@ -340,6 +351,7 @@ function ciWorkflow(current, callers, syncCallers, docsFiles) {
|
|
|
340
351
|
}
|
|
341
352
|
changed = grant(document, pair.value, { contents: "read" }) || changed;
|
|
342
353
|
changed = skipRenovateSync(document, pair.value) || changed;
|
|
354
|
+
changed = addTestJob(document, pair.value) || changed;
|
|
343
355
|
changed = ensureSyncJob(document, jobs, syncCallers) || changed;
|
|
344
356
|
if (!hasDispatch(document)) {
|
|
345
357
|
addDispatch(document);
|
package/dist/verify/index.d.mts
CHANGED
|
@@ -7,14 +7,12 @@ interface JsonObject {
|
|
|
7
7
|
//#region src/verify/types.d.ts
|
|
8
8
|
/** A kind of one-way door, the closed list of Upd4ting/outer-loop#42. */
|
|
9
9
|
type DoorKind = "data" | "format" | "contract" | "outbound" | "exposure" | "publish";
|
|
10
|
-
/** Path rules for one door kind: the globs
|
|
10
|
+
/** Path rules for one door kind: the globs and the declared funnel modules. */
|
|
11
11
|
interface DoorRule {
|
|
12
12
|
/** Repository paths whose change opens a door of this kind, on top of the pack's defaults for the repo kind. */
|
|
13
13
|
globs: string[];
|
|
14
14
|
/** The only modules allowed to make this kind's calls (outbound clients, raw deletes); also path rules. */
|
|
15
15
|
funnels: string[];
|
|
16
|
-
/** Journeys, as `feature/journey`, whose pass contains a Data or Format door of this kind. */
|
|
17
|
-
containments: string[];
|
|
18
16
|
/** Why these paths are doors in this repository. */
|
|
19
17
|
why: string;
|
|
20
18
|
}
|
|
@@ -170,7 +168,7 @@ interface JourneyContext {
|
|
|
170
168
|
* Ends the journey as not verified, for example when provider sandbox keys
|
|
171
169
|
* are missing or something the journey depends on outside the harness's
|
|
172
170
|
* services and apps stopped answering. An environment failure is never a
|
|
173
|
-
* failing check
|
|
171
|
+
* failing check.
|
|
174
172
|
*/
|
|
175
173
|
notVerified(reason: string): never;
|
|
176
174
|
service(name: string): ServiceEndpoint;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/tooling-configs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
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",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"antelopejs-checks": "./dist/bin/checks.mjs",
|
|
30
30
|
"antelopejs-comment-proof": "./dist/bin/comment-proof.mjs",
|
|
31
31
|
"antelopejs-garden": "./dist/bin/garden.mjs",
|
|
32
|
+
"antelopejs-lease": "./dist/bin/lease.mjs",
|
|
32
33
|
"antelopejs-ratchet": "./dist/bin/ratchet.mjs",
|
|
33
34
|
"antelopejs-suppressions": "./dist/bin/suppressions.mjs",
|
|
34
35
|
"antelopejs-sync": "./dist/bin/sync.mjs",
|