@theholocron/astromech 5.0.0-alpha.543 → 5.0.0-alpha.544
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/config/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* zero-runtime-dep entry so `astromech.config.ts` and `@theholocron/cli`
|
|
4
4
|
* can import it without pulling the task runner.
|
|
5
5
|
*/
|
|
6
|
-
import { a as TaskEntry, i as TaskConfigItem, n as CiConfig, o as TasksConfig, r as CiPin, t as CiAggregatePoster } from "../schema.type-
|
|
6
|
+
import { a as TaskEntry, i as TaskConfigItem, n as CiConfig, o as TasksConfig, r as CiPin, t as CiAggregatePoster } from "../schema.type-MUEwDLrg.mjs";
|
|
7
7
|
import { Loaded } from "@theholocron/datapad";
|
|
8
8
|
/**
|
|
9
9
|
* The `tasks` config shape — the single manifest of what a repo runs.
|
package/dist/index.d.mts
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* The config surface (`defineConfig`, `TasksConfig`, `loadTasksConfig`)
|
|
21
21
|
* lives in the zero-runtime-dep `@theholocron/astromech/config` subpath.
|
|
22
22
|
*/
|
|
23
|
-
import { o as TasksConfig, t as CiAggregatePoster } from "./schema.type-
|
|
23
|
+
import { o as TasksConfig, t as CiAggregatePoster } from "./schema.type-MUEwDLrg.mjs";
|
|
24
24
|
/** A check run on the head commit, in the plain shape the aggregate needs (no GitHub types). */
|
|
25
25
|
interface AggregateCheckRun {
|
|
26
26
|
/** The check run's id, `null` when the API gave none; the tie-break when two runs started together. */
|
|
@@ -229,8 +229,8 @@ interface AggregateChecks {
|
|
|
229
229
|
*/
|
|
230
230
|
export declare function aggregateChecks(config: TasksConfig, statusContexts?: readonly StatusContext[]): AggregateChecks;
|
|
231
231
|
/**
|
|
232
|
-
* Who posts the `ci / Required checks` check for a manifest: `"sentinel"` only when `ci.aggregate` says
|
|
233
|
-
* otherwise `"actions"`. A misspelling therefore keeps the poster that exists today (the config loader rejects it with
|
|
232
|
+
* Who posts the `ci / Required checks` check for a manifest: `"sentinel"` or `"none"` only when `ci.aggregate` says
|
|
233
|
+
* exactly that, otherwise `"actions"`. A misspelling therefore keeps the poster that exists today (the config loader rejects it with
|
|
234
234
|
* an error where it can, so this is the quiet fallback, not the validation), and a manifest with no `ci` block, which
|
|
235
235
|
* is every repo today, is unchanged.
|
|
236
236
|
*/
|
|
@@ -1281,7 +1281,7 @@ interface Astromech {
|
|
|
1281
1281
|
aggregateCaller(): string | null;
|
|
1282
1282
|
/**
|
|
1283
1283
|
* Who posts the `ci / Required checks` check for this manifest, from `ci.aggregate` (`"actions"` when it is not set). With
|
|
1284
|
-
* `"sentinel"`, {@link aggregateCaller} is `null` and the repo that hosts the reusables does not write `ci.yml`.
|
|
1284
|
+
* `"sentinel"` or `"none"`, {@link aggregateCaller} is `null` and the repo that hosts the reusables does not write `ci.yml`.
|
|
1285
1285
|
*/
|
|
1286
1286
|
aggregatePoster(): CiAggregatePoster;
|
|
1287
1287
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -1899,13 +1899,14 @@ function aggregateChecks(config, statusContexts) {
|
|
|
1899
1899
|
}
|
|
1900
1900
|
// src/generators/aggregate-poster/aggregate-poster.ts
|
|
1901
1901
|
/**
|
|
1902
|
-
* Who posts the `ci / Required checks` check for a manifest: `"sentinel"` only when `ci.aggregate` says
|
|
1903
|
-
* otherwise `"actions"`. A misspelling therefore keeps the poster that exists today (the config loader rejects it with
|
|
1902
|
+
* Who posts the `ci / Required checks` check for a manifest: `"sentinel"` or `"none"` only when `ci.aggregate` says
|
|
1903
|
+
* exactly that, otherwise `"actions"`. A misspelling therefore keeps the poster that exists today (the config loader rejects it with
|
|
1904
1904
|
* an error where it can, so this is the quiet fallback, not the validation), and a manifest with no `ci` block, which
|
|
1905
1905
|
* is every repo today, is unchanged.
|
|
1906
1906
|
*/
|
|
1907
1907
|
function aggregatePoster(config) {
|
|
1908
|
-
|
|
1908
|
+
const setting = config.ci?.aggregate;
|
|
1909
|
+
return setting === "sentinel" || setting === "none" ? setting : "actions";
|
|
1909
1910
|
}
|
|
1910
1911
|
// src/generators/codecov/codecov.ts
|
|
1911
1912
|
/**
|
|
@@ -4303,10 +4304,10 @@ function createAstromech(options) {
|
|
|
4303
4304
|
},
|
|
4304
4305
|
runnableTasks: () => runnableTaskNames(),
|
|
4305
4306
|
reusableTemplates: () => reusableTemplates(),
|
|
4306
|
-
requiredChecks: (aggregate) => requiredChecks(options.config ?? {}, aggregate, options.statusContexts),
|
|
4307
|
+
requiredChecks: (aggregate) => requiredChecks(options.config ?? {}, aggregate && aggregatePoster(options.config ?? {}) !== "none", options.statusContexts),
|
|
4307
4308
|
aggregatePoster: () => aggregatePoster(options.config ?? {}),
|
|
4308
4309
|
aggregateCaller: () => {
|
|
4309
|
-
if (aggregatePoster(options.config ?? {})
|
|
4310
|
+
if (aggregatePoster(options.config ?? {}) !== "actions") return null;
|
|
4310
4311
|
const checks = aggregateChecks(options.config ?? {}, options.statusContexts);
|
|
4311
4312
|
return checks.expected.length === 0 && checks.statuses.length === 0 ? null : aggregateCaller(checks);
|
|
4312
4313
|
},
|
|
@@ -97,8 +97,11 @@ interface TasksConfig {
|
|
|
97
97
|
prePush?: boolean;
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
|
-
/**
|
|
101
|
-
|
|
100
|
+
/**
|
|
101
|
+
* Who posts the required `ci / Required checks` check: the Actions poller (`ci.yml`), Sentinel from webhooks, or nobody
|
|
102
|
+
* (`"none"`: there is no aggregate and the ruleset requires each check on its own).
|
|
103
|
+
*/
|
|
104
|
+
type CiAggregatePoster = "actions" | "sentinel" | "none";
|
|
102
105
|
/** Who may satisfy the required `ci / Required checks` context: one GitHub App, by its integration id. */
|
|
103
106
|
interface CiPin {
|
|
104
107
|
/**
|
|
@@ -114,8 +117,9 @@ interface CiConfig {
|
|
|
114
117
|
/**
|
|
115
118
|
* Who posts `ci / Required checks`. `"actions"` (the default) keeps the thin caller `ci.ci.yml` and the reusable that
|
|
116
119
|
* polls; `"sentinel"` writes neither, because Sentinel posts the check under that name for a commit whose own config
|
|
117
|
-
* says so
|
|
118
|
-
*
|
|
120
|
+
* says so; `"none"` writes neither and the ruleset requires every check on its own (`requiredChecks()` lists them), so
|
|
121
|
+
* nothing is posted under that name. Each commit has at most one poster: the setting and the generated files change
|
|
122
|
+
* together in one pull request, which `probe generated check` enforces.
|
|
119
123
|
*/
|
|
120
124
|
aggregate?: CiAggregatePoster;
|
|
121
125
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/astromech",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.544",
|
|
4
4
|
"description": "The Holocron task runner — one task manifest drives `holocron run`, `holocron run ci`, the CI workflows, package.json scripts, linters, and required checks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ci",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"@commitlint/lint": "^21.2.3",
|
|
56
56
|
"@commitlint/load": "^21.2.3",
|
|
57
57
|
"@commitlint/types": "^21.2.3",
|
|
58
|
-
"@theholocron/datapad": "5.0.0-alpha.
|
|
59
|
-
"@theholocron/json-utils": "^1.17.0-alpha.6",
|
|
58
|
+
"@theholocron/datapad": "5.0.0-alpha.544",
|
|
60
59
|
"@theholocron/fs-utils": "^1.17.0-alpha.6",
|
|
60
|
+
"@theholocron/json-utils": "^1.17.0-alpha.6",
|
|
61
61
|
"@theholocron/misc-utils": "^1.17.0-alpha.6",
|
|
62
62
|
"@theholocron/pkg-utils": "^1.17.0-alpha.6"
|
|
63
63
|
},
|