@mark1russell7/conventions 0.42.3 → 0.42.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 +1 -1
- package/build/cli.js +1 -1
- package/build/index.d.ts +4 -3
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/{run-BT2kEymD.js → run-C0vL-9On.js} +33 -21
- package/build/run-C0vL-9On.js.map +1 -0
- package/package.json +1 -1
- package/build/run-BT2kEymD.js.map +0 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ Each break shows the file, the line, the rule and the fix. In GitHub Actions, th
|
|
|
27
27
|
- `push-main-only`: a workflow that starts on `push` and on `pull_request`, with no limit of `push` to the default branch or with no `workflow_dispatch`. The fix adds `branches` and `workflow_dispatch`, and keeps the comments and each other trigger. It keeps a tag run when the workflow reads the tag. It does not edit `release.yml`, and a person chooses the change for `branches-ignore` or for another named branch.
|
|
28
28
|
- `pipe-fails`: a step with a pipe and no `pipefail`. The fix adds `defaults: { run: { shell: bash } }` to the workflow. It does not write over another shell.
|
|
29
29
|
- `gate-after-cancel`: a summary job of a gate with `always()` in its condition. The fix writes `if: ${{ !cancelled() }}`. A condition with other parts needs a person.
|
|
30
|
-
- `security-one-job`: a job that uses the shared workflow `reusable-security.yml`, with its summary job `Security OK`. The fix writes one job `Security OK` that runs the action `security-scan`, with the same inputs and time limit. The pin is the first commit of the template with the action, and Renovate moves it. Another summary job,
|
|
30
|
+
- `security-one-job`: a job that uses the shared workflow `reusable-security.yml`, with or without its summary job `Security OK`. The fix writes one job `Security OK` that runs the action `security-scan`, with the same inputs and time limit. With no summary job, the new job gets the id `security-ok`. The pin is the first commit of the template with the action, and Renovate moves it. Another summary job, a second job that needs the scans, another job `security-ok` or an input of more than one line needs a person.
|
|
31
31
|
- `tests-required`: the option `passWithNoTests` in a config or a script, in a package with test files. A package with no tests needs a person, who removes its test script.
|
|
32
32
|
- `typed-files`: a config file at the root of a package (`vitest.config.ts`). The fix adds `*.config.ts` and `rootDir: "."` to the `tsconfig.test.json` of the package, when that file has no comments.
|
|
33
33
|
- `trust-policy`: the settings `trustPolicy`, `trustPolicyIgnoreAfter` and `trustPolicyExclude` of `pnpm-workspace.yaml`. The fix makes the file when the repository has none.
|
package/build/cli.js
CHANGED
package/build/index.d.ts
CHANGED
|
@@ -225,9 +225,10 @@ interface SecurityCaller {
|
|
|
225
225
|
/** This function gives the jobs of a workflow that use the shared workflow `reusable-security.yml`. */
|
|
226
226
|
export declare function securityCallers(text: string): SecurityCaller[];
|
|
227
227
|
/**
|
|
228
|
-
* This function puts one job in place of the job of the shared workflow and its summary job
|
|
229
|
-
* reason that a person must change the file. The new job
|
|
230
|
-
* needs. It
|
|
228
|
+
* This function puts one job in place of the job of the shared workflow and its summary job, if the file has a summary job.
|
|
229
|
+
* If it cannot, it gives the reason that a person must change the file. The new job has the name `Security OK`, which the
|
|
230
|
+
* ruleset needs. It keeps the id of the summary job, or with no summary job, it gets the id `security-ok`. It gives the
|
|
231
|
+
* inputs of the caller to the action, and `timeout-minutes` to the job.
|
|
231
232
|
*/
|
|
232
233
|
export declare function withOneJob(text: string, commit?: string): {
|
|
233
234
|
text: string;
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/rule.ts","../src/config.ts","../src/rules/cue-preset.ts","../src/rules/gate-after-cancel.ts","../src/rules/gate-trigger.ts","../src/rules/security-one-job.ts","../src/rules/setup-cue.ts","../src/rules/shared-ci.ts","../src/rules/service-run-main.ts","../src/map.ts","../src/rules/home-module.ts","../src/rules/home-package.ts","../src/rules/license-file.ts","../src/rules/coverage-provider.ts","../src/rules/main-check.ts","../src/rules/no-build-output.ts","../src/private-names.ts","../src/rules/no-local-paths.ts","../src/rules/pack-no-buildinfo.ts","../src/rules/exports-require.ts","../src/rules/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.ts","../src/rules/site-check-in-ci.ts","../src/rules/pinned-git-deps.ts","../src/rules/pipe-fails.ts","../src/rules/push-main-only.ts","../src/rules/unreleased-change.ts","../src/rules/published-minor.ts","../src/rules/release-files.ts","../src/rules/required-scripts.ts","../src/rules/roadmap-parses.ts","../src/rules/runner-budget.ts","../src/rules/shared-docs.ts","../src/rules/source-main.ts","../src/rules/tests-required.ts","../src/rules/tsconfig-test.ts","../src/rules/typed-files.ts","../src/rules/typed-scripts.ts","../src/rules/trust-policy.ts","../src/rules/version-title.ts","../src/rules/workflow-parses.ts","../src/rules/workspace-protocol.ts","../src/rules/index.ts","../src/run.ts","../src/pre-push.ts","../src/home-exports.ts","../src/workflow.ts","../src/release-text.ts"],"mappings":";;;;;;;;;;;;;;;;UASiB;WACN;WACA;WACA;;;UAIM;;WAEN;;WAEA;WACA;;WAEA;;WAEA,iBAAiB;;;;;;UAOX;;WAEN;;WAEA;;WAEA;;;wBAIK,YAAY,cAAc,cAAc;;KAQ5C;;KAGA,UAAU,SAAS,eAAe;;UAG7B;WACN;WACA,SAAS;WACT;;;KAIC,WAAW,SAAS;;UAGf;;WAEN;;WAEA;;WAEA;;WAEA;WACA,UAAU;;;UAIJ;;WAEN;;WAEA,aAAa;;WAEb,mBAAmB;;WAEnB,KAAK,SAAS;;WAEd;;EAET;;EAEA,IAAI;;;KAIM,uBAAuB;WAAqB;;;qBAG3C;;UAGI;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA,kBAAkB;;WAElB,SAAS,SAAS,eAAe;;;;;WAKjC;;;;;;;WAOA;EACT,MAAM,SAAS,aAAa,SAAS,UAAU;;;qBAIpC;;wBAGG,aAAa,UAAU,UAAU;;wBAOjC,OAAO,cAAc,gBAAgB;;wBAOrC,QAAQ,cAAc,eAAe;;qBAMxC,WAAY,gBAAgB;;qBAG5B,YAAa;;wBAGV,WAAW,cAAc;;;;;;wBASzB,WAAW;;wBA2BX,UAAU;;wBAUV,OAAO,cAAc;;qBAOxB,UAAW,aAAa;;;;;wBAMrB,aAAa,SAAS,KAAK,oDAAoD;;UCpN9E;;WAEN;;WAEA;;;;;WAKA;;WAEA;;WAEA,SAAS;;;UAIH;;WAEN;;WAEA,OAAO,SAAS,eAAe;;;wBAW1B,eAAe,MAAM,OAAO;;;;;;;wBAU5B,YAAY,gBAAgB,gBAAgB,SAAS;;qBCxCxD;qBA4FA,WAAW;qBC5CX,iBAAiB;;UCzCb;WACN;WACA;WACA;;;wBAIK,cAAc,eAAe;;qBAoBhC;;wBAyBG,YAAY;;;;;;;wBAkBZ,YAAY,cAAc,cAAc;EAAoC;;EAAmB;;qBAwIlG,aAAa;;qBClNb;;qBAGA;;qBAGA;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/rule.ts","../src/config.ts","../src/rules/cue-preset.ts","../src/rules/gate-after-cancel.ts","../src/rules/gate-trigger.ts","../src/rules/security-one-job.ts","../src/rules/setup-cue.ts","../src/rules/shared-ci.ts","../src/rules/service-run-main.ts","../src/map.ts","../src/rules/home-module.ts","../src/rules/home-package.ts","../src/rules/license-file.ts","../src/rules/coverage-provider.ts","../src/rules/main-check.ts","../src/rules/no-build-output.ts","../src/private-names.ts","../src/rules/no-local-paths.ts","../src/rules/pack-no-buildinfo.ts","../src/rules/exports-require.ts","../src/rules/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.ts","../src/rules/site-check-in-ci.ts","../src/rules/pinned-git-deps.ts","../src/rules/pipe-fails.ts","../src/rules/push-main-only.ts","../src/rules/unreleased-change.ts","../src/rules/published-minor.ts","../src/rules/release-files.ts","../src/rules/required-scripts.ts","../src/rules/roadmap-parses.ts","../src/rules/runner-budget.ts","../src/rules/shared-docs.ts","../src/rules/source-main.ts","../src/rules/tests-required.ts","../src/rules/tsconfig-test.ts","../src/rules/typed-files.ts","../src/rules/typed-scripts.ts","../src/rules/trust-policy.ts","../src/rules/version-title.ts","../src/rules/workflow-parses.ts","../src/rules/workspace-protocol.ts","../src/rules/index.ts","../src/run.ts","../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;wBAO1D,cAAc,cAAc,QAAQ,mBAAmB,UAAS,KAAK,gCAAqC;;wBAwB1G,UAAU,SAAS,eAAe;;UA4DjC;;WAEN;;WAEA;;WAEA,QAAQ;;;;;;;wBAWH,OAAO,SAAS,eAAe;;wBAyC/B,aAAa,QAAQ;;wBA0BrB,gBAAgB,QAAQ;;;;;wBAyBxB,YAAY,QAAQ;;wBAYpB,UAAU,QAAQ,+BAA+B,iBAAgB;;UAkBhE;WACN;WACA,KAAK,SAAS;WACd,SAAS;WACT,SAAS;;WAET;;;qBAIE;;wBAoEG,OAAO,yBAAyB,IAAI;;qBC5VvC;;UAGI;;WAEN;;;;;WAKA;;WAEA;WACA,KAAK,SAAS;;WAEd;;WAEA,MAAM;;WAEN,YAAY;;;;;;;wBAqMP,QAAQ,SAAS,gBAAgB,IAAI,KAAK;;qBA2E7C;;;;;;;;qBAgCA;;UAgBI;;WAEN;WACA,KAAK,SAAS;;WAEd,MAAM;;;;;;;wBAWD,YAAY,SAAS,aAAa,IAAI,KAAK;;qBCzX9C,cAAc,SAAS;WAA0B;WAA0B;;UC6EvE;WACN;WACA;WACA;;WAEA;WACA;;;UAIM;;WAEN;;WAEA;;WAEA;;;UAIM;WACN;WACA;WACA;WACA,gBAAgB;;;UAIV;;WAEN;;WAEA;;WAEA;;WAEA;WACA,iBAAiB;WACjB,eAAe;;;wBAgGV,aAAa,cAAc,eAAe;;;;;;;wBAmD1C,WAAW,cAAc,eAAe;;;;;;;;qBChQ3C;;wBAGG,QAAQ,cAAc,iBAAiB;;;;;;;;wBAavC,iBAAiB,kBAAkB,iBAAiB;;wBA+BpD,OAAO,cAAc;;;;;wBAQrB,aAAa,cAAc,iBAAiB"}
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as unreleasedChangeRule, $n as specifiersOf, $t as messageOf, A as typedFiles, An as ACTIONS_COMMIT, At as lineNameHit, B as roadmapParses, Bn as DEPENDENCY_FIELDS, Bt as apiReportScript, C as versionTitle, Cn as setupCue, Ct as privatePatterns, D as typedScripts, Dn as securityCallers, Dt as firstNameMatch, E as trustPolicy, En as SECURITY_TIMEOUT_MINUTES, Et as PrivateNameListError, F as HOME_TIMEOUT_MS, Fn as gateAfterCancel, Ft as noBuildOutput, G as publishedMinor, Gn as inFolder, Gt as mitText, H as releaseFiles, Hn as cleanPath, Ht as authorOf, I as blockHash, In as readAction, It as REAL_COMPARE, J as NPM_REGISTRY, Jn as matchesAny, Jt as moduleMessage, K as publishedMinorRule, Kn as keyLine, Kt as repositoryIsPublic, L as githubFetch, Ln as readWorkflow, Lt as hasImportMetaMain, M as isSourcePath, Mn as gateTrigger, Mt as nameMatches, N as pathsOf, Nn as prPathFilters, Nt as parsePrivateNames, O as configsOfScript, On as securityOneJob, Ot as isAllowedHit, P as sourceMain, Pn as summaryName, Pt as pathNameHit, Q as unreleasedChange, Qn as runGit, Qt as homePackage, R as sharedDocsRule, Rn as STRICT_OPTIONS, Rt as mainCheck, S as setVersions, Sn as sharedCi, St as privateNamesFile, T as TRAIN_SCOPES, Tn as SECURITY_SCAN_INPUTS, Tt as PRIVATE_NAME_LIST, U as lockedVersions, Un as codePackages, Ut as licenseFile, V as requiredScripts, Vn as RULE_WARN_DAYS, Vt as LICENSE_TEXTS, W as minorOf, Wn as hasFile, Wt as licenseFileOf, X as UNSHIPPED_FILES, Xn as readJsonc, Xt as modulesOf, Y as SHIPPED_FIELDS, Yn as parseJsonc, Yt as moduleUses, Z as npmLookup, Zn as replaceLine, Zt as declaredName, _ as workspaceProtocol, _n as tsconfigTest, _t as PRIVATE_NAMES_FILE_CONFIG, a as listRules, an as MAP_RULE, at as pagesAfterRelease, b as yamlFaults, bn as SHARED_WORKFLOWS, bt as invalidPatternBreaks, c as runCli, cn as mapText, ct as scheduleMinute, d as HOOK_MARKER, dn as npmNames, dt as pagesCalls, en as repoOf, er as defaultOptions, et as pipeFails, f as NO_READ_LINE, fn as readOverlay, ft as pagesSite, g as RULES, gn as hasTests, gt as HOME_PATTERNS, h as prePush, hn as serviceRunMain, ht as DEFAULT_ALLOWED, i as formatResult, in as HOMES, it as siteCheckInCi, j as testsRequired, jn as convertGate, jt as lineNameHits, k as scriptsOf, kn as withOneJob, kt as isCommonUse, l as runFix, ln as mergeHomes, lt as pushMainOnly, m as installHook, mn as runCalls, mt as packNoBuildinfo, n as annotations, nn as signaturesOf, nt as isPinned, o as readConfig, on as findHomes, ot as repositoryOfRemote, p as PRE_PUSH_HOOK, pn as SERVICE_PACKAGE, pt as exportsRequire, q as reachOf, qn as lineOf, qt as homeModule, r as createContext, rn as HOME_EXPORTS, rt as pinnedGitDeps, s as runChecks, sn as mapMarkdown, st as runnerBudget, t as USAGE, tn as reposOf, tr as parseConfig, tt as isGitSpecifier, u as summaryMarkdown, un as npmDrift, ut as PAGES_WORKFLOWS, v as GITHUB_YAML, vn as SHARED_ACTIONS, vt as PRIVATE_NAMES_FILE_VARIABLE, w as IGNORE_AFTER, wn as SECURITY_SCAN_COMMIT, wt as privateTextBreaks, x as namedVersions, xn as callsSharedCi, xt as noLocalPaths, y as workflowParses, yn as SHARED_CI, yt as PRIVATE_PATTERNS_VARIABLE, z as roadmapOfLine, zn as cuePreset, zt as coverageProvider } from "./run-
|
|
1
|
+
import { $ as unreleasedChangeRule, $n as specifiersOf, $t as messageOf, A as typedFiles, An as ACTIONS_COMMIT, At as lineNameHit, B as roadmapParses, Bn as DEPENDENCY_FIELDS, Bt as apiReportScript, C as versionTitle, Cn as setupCue, Ct as privatePatterns, D as typedScripts, Dn as securityCallers, Dt as firstNameMatch, E as trustPolicy, En as SECURITY_TIMEOUT_MINUTES, Et as PrivateNameListError, F as HOME_TIMEOUT_MS, Fn as gateAfterCancel, Ft as noBuildOutput, G as publishedMinor, Gn as inFolder, Gt as mitText, H as releaseFiles, Hn as cleanPath, Ht as authorOf, I as blockHash, In as readAction, It as REAL_COMPARE, J as NPM_REGISTRY, Jn as matchesAny, Jt as moduleMessage, K as publishedMinorRule, Kn as keyLine, Kt as repositoryIsPublic, L as githubFetch, Ln as readWorkflow, Lt as hasImportMetaMain, M as isSourcePath, Mn as gateTrigger, Mt as nameMatches, N as pathsOf, Nn as prPathFilters, Nt as parsePrivateNames, O as configsOfScript, On as securityOneJob, Ot as isAllowedHit, P as sourceMain, Pn as summaryName, Pt as pathNameHit, Q as unreleasedChange, Qn as runGit, Qt as homePackage, R as sharedDocsRule, Rn as STRICT_OPTIONS, Rt as mainCheck, S as setVersions, Sn as sharedCi, St as privateNamesFile, T as TRAIN_SCOPES, Tn as SECURITY_SCAN_INPUTS, Tt as PRIVATE_NAME_LIST, U as lockedVersions, Un as codePackages, Ut as licenseFile, V as requiredScripts, Vn as RULE_WARN_DAYS, Vt as LICENSE_TEXTS, W as minorOf, Wn as hasFile, Wt as licenseFileOf, X as UNSHIPPED_FILES, Xn as readJsonc, Xt as modulesOf, Y as SHIPPED_FIELDS, Yn as parseJsonc, Yt as moduleUses, Z as npmLookup, Zn as replaceLine, Zt as declaredName, _ as workspaceProtocol, _n as tsconfigTest, _t as PRIVATE_NAMES_FILE_CONFIG, a as listRules, an as MAP_RULE, at as pagesAfterRelease, b as yamlFaults, bn as SHARED_WORKFLOWS, bt as invalidPatternBreaks, c as runCli, cn as mapText, ct as scheduleMinute, d as HOOK_MARKER, dn as npmNames, dt as pagesCalls, en as repoOf, er as defaultOptions, et as pipeFails, f as NO_READ_LINE, fn as readOverlay, ft as pagesSite, g as RULES, gn as hasTests, gt as HOME_PATTERNS, h as prePush, hn as serviceRunMain, ht as DEFAULT_ALLOWED, i as formatResult, in as HOMES, it as siteCheckInCi, j as testsRequired, jn as convertGate, jt as lineNameHits, k as scriptsOf, kn as withOneJob, kt as isCommonUse, l as runFix, ln as mergeHomes, lt as pushMainOnly, m as installHook, mn as runCalls, mt as packNoBuildinfo, n as annotations, nn as signaturesOf, nt as isPinned, o as readConfig, on as findHomes, ot as repositoryOfRemote, p as PRE_PUSH_HOOK, pn as SERVICE_PACKAGE, pt as exportsRequire, q as reachOf, qn as lineOf, qt as homeModule, r as createContext, rn as HOME_EXPORTS, rt as pinnedGitDeps, s as runChecks, sn as mapMarkdown, st as runnerBudget, t as USAGE, tn as reposOf, tr as parseConfig, tt as isGitSpecifier, u as summaryMarkdown, un as npmDrift, ut as PAGES_WORKFLOWS, v as GITHUB_YAML, vn as SHARED_ACTIONS, vt as PRIVATE_NAMES_FILE_VARIABLE, w as IGNORE_AFTER, wn as SECURITY_SCAN_COMMIT, wt as privateTextBreaks, x as namedVersions, xn as callsSharedCi, xt as noLocalPaths, y as workflowParses, yn as SHARED_CI, yt as PRIVATE_PATTERNS_VARIABLE, z as roadmapOfLine, zn as cuePreset, zt as coverageProvider } from "./run-C0vL-9On.js";
|
|
2
2
|
import { i as packageFolders, n as globFolders, r as globToRegExp, s as workspaceGlobs } from "./workspace-Cx7p7bWn.js";
|
|
3
3
|
// src/release-text.ts
|
|
4
4
|
/**
|
|
@@ -1966,6 +1966,8 @@ const SECURITY_SCAN_INPUTS = [
|
|
|
1966
1966
|
/** The time limit of the job when the caller gives none: the default of `timeout-minutes` of the shared workflow. */
|
|
1967
1967
|
const SECURITY_TIMEOUT_MINUTES = 30;
|
|
1968
1968
|
const REUSABLE = /(^|\/)\.github\/workflows\/reusable-security\.ya?ml(@|$)/;
|
|
1969
|
+
/** The id of the one job when the file has no summary job of the scans. */
|
|
1970
|
+
const ONE_JOB_ID = "security-ok";
|
|
1969
1971
|
/** The keys that a job of the shared workflow can have, and that the fix can replace. */
|
|
1970
1972
|
const CALLER_KEYS = /* @__PURE__ */ new Set([
|
|
1971
1973
|
"uses",
|
|
@@ -2011,9 +2013,10 @@ function needsOf(lines, job) {
|
|
|
2011
2013
|
return [];
|
|
2012
2014
|
}
|
|
2013
2015
|
/**
|
|
2014
|
-
* This function puts one job in place of the job of the shared workflow and its summary job
|
|
2015
|
-
* reason that a person must change the file. The new job
|
|
2016
|
-
* needs. It
|
|
2016
|
+
* This function puts one job in place of the job of the shared workflow and its summary job, if the file has a summary job.
|
|
2017
|
+
* If it cannot, it gives the reason that a person must change the file. The new job has the name `Security OK`, which the
|
|
2018
|
+
* ruleset needs. It keeps the id of the summary job, or with no summary job, it gets the id `security-ok`. It gives the
|
|
2019
|
+
* inputs of the caller to the action, and `timeout-minutes` to the job.
|
|
2017
2020
|
*/
|
|
2018
2021
|
function withOneJob(text, commit = SECURITY_SCAN_COMMIT) {
|
|
2019
2022
|
const lines = workflowLines(text);
|
|
@@ -2021,14 +2024,20 @@ function withOneJob(text, commit = SECURITY_SCAN_COMMIT) {
|
|
|
2021
2024
|
if (callers.length !== 1) return { reason: `the file has ${String(callers.length)} jobs that use reusable-security.yml, and the fix changes only one` };
|
|
2022
2025
|
const caller = callers[0];
|
|
2023
2026
|
if (caller === void 0) return { reason: "no job uses reusable-security.yml" };
|
|
2024
|
-
const
|
|
2025
|
-
|
|
2027
|
+
const jobs = lines.findIndex((line) => indentOf$1(line) === 0 && keyValue(line, "jobs") !== void 0);
|
|
2028
|
+
const dependents = childKeys(lines, jobs).filter((job) => needsOf(lines, job).includes(caller.id));
|
|
2029
|
+
if (dependents.length > 1) return { reason: `${String(dependents.length)} jobs need the job ${caller.id}, and the fix replaces one summary job or none` };
|
|
2026
2030
|
const summary = dependents[0];
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2031
|
+
let id = ONE_JOB_ID;
|
|
2032
|
+
if (summary === void 0) {
|
|
2033
|
+
if (childKeys(lines, jobs).some((job) => job !== caller.line && idOf(lines[job] ?? "") === ONE_JOB_ID)) return { reason: `the file has a job ${ONE_JOB_ID} that does not need the job ${caller.id}, and the fix does not merge two jobs` };
|
|
2034
|
+
} else {
|
|
2035
|
+
const summaryNeeds = needsOf(lines, summary);
|
|
2036
|
+
if (summaryNeeds.length !== 1) return { reason: `the summary job needs ${summaryNeeds.join(", ")}, and the fix replaces only a summary job of the scans` };
|
|
2037
|
+
const summaryName = childKeys(lines, summary).map((at) => keyValue(lines[at] ?? "", "name")).find((value) => value !== void 0);
|
|
2038
|
+
if (summaryName !== "Security OK") return { reason: `the summary job has the name ${summaryName ?? "(none)"}, not Security OK, which the ruleset needs` };
|
|
2039
|
+
id = idOf(lines[summary] ?? "");
|
|
2040
|
+
}
|
|
2032
2041
|
const inputs = [];
|
|
2033
2042
|
let timeout = String(30);
|
|
2034
2043
|
for (const at of childKeys(lines, caller.line)) {
|
|
@@ -2049,7 +2058,7 @@ function withOneJob(text, commit = SECURITY_SCAN_COMMIT) {
|
|
|
2049
2058
|
const withLines = childKeys(lines, caller.line).find((at) => idOf(lines[at] ?? "") === "with");
|
|
2050
2059
|
const inputLines = withLines === void 0 ? [] : childKeys(lines, withLines).filter((at) => inputs.includes(idOf(lines[at] ?? ""))).map((at) => `${pad} ${(raw[at] ?? "").trim()}`);
|
|
2051
2060
|
const job = [
|
|
2052
|
-
`${pad}${
|
|
2061
|
+
`${pad}${id}:`,
|
|
2053
2062
|
`${pad} name: Security OK`,
|
|
2054
2063
|
`${pad} runs-on: ubuntu-latest`,
|
|
2055
2064
|
`${pad} timeout-minutes: ${timeout}`,
|
|
@@ -2066,21 +2075,23 @@ function withOneJob(text, commit = SECURITY_SCAN_COMMIT) {
|
|
|
2066
2075
|
remove: trimmedEnd(lines, caller.line) - caller.line,
|
|
2067
2076
|
insert: job
|
|
2068
2077
|
}];
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2078
|
+
if (summary !== void 0) {
|
|
2079
|
+
const blank = (at) => at >= 0 && at < raw.length - 1 && (raw[at] ?? "").trim() === "";
|
|
2080
|
+
const start = blank(summary - 1) ? summary - 1 : summary;
|
|
2081
|
+
const end = trimmedEnd(lines, summary) + (start === summary && blank(trimmedEnd(lines, summary)) ? 1 : 0);
|
|
2082
|
+
splices.push({
|
|
2083
|
+
at: start,
|
|
2084
|
+
remove: end - start,
|
|
2085
|
+
insert: []
|
|
2086
|
+
});
|
|
2087
|
+
}
|
|
2077
2088
|
return { text: applySplices(text, splices) };
|
|
2078
2089
|
}
|
|
2079
2090
|
const securityOneJob = {
|
|
2080
2091
|
id: "security-one-job",
|
|
2081
2092
|
title: "The security scans run in one job: the action `security-scan`, not the shared workflow `reusable-security.yml`.",
|
|
2082
2093
|
reason: "Each job of a run asks for its own runner. reusable-security.yml gives three scan jobs, and the caller adds the summary job Security OK, so each run waits in the queue for four runners, and the summary job waits again after the scans. On 2026-11-06, in a full queue, the scan jobs of systems waited 23 to 40 minutes each. The action security-scan runs the same scans with the same inputs in one job, which is the check Security OK.",
|
|
2083
|
-
fix: "Replace the job that uses reusable-security.yml and its summary job with one job Security OK that runs the action security-scan (CI.md, Security). Give the inputs to the action, and timeout-minutes to the job.",
|
|
2094
|
+
fix: "Replace the job that uses reusable-security.yml and its summary job, if it has one, with one job Security OK that runs the action security-scan (CI.md, Security). Give the inputs to the action, and timeout-minutes to the job.",
|
|
2084
2095
|
sources: [
|
|
2085
2096
|
{
|
|
2086
2097
|
repo: "template",
|
|
@@ -2224,6 +2235,7 @@ const SHARED_WORKFLOWS = [
|
|
|
2224
2235
|
"reusable-queue.yml",
|
|
2225
2236
|
"reusable-release-build.yml",
|
|
2226
2237
|
"reusable-release-tag.yml",
|
|
2238
|
+
"reusable-release-tree.yml",
|
|
2227
2239
|
"reusable-security.yml"
|
|
2228
2240
|
];
|
|
2229
2241
|
/** The shared actions of the template, by folder name under `.github/actions`. */
|
|
@@ -18565,4 +18577,4 @@ function runHook(args, io) {
|
|
|
18565
18577
|
}
|
|
18566
18578
|
export { unreleasedChangeRule as $, specifiersOf as $n, messageOf as $t, typedFiles as A, ACTIONS_COMMIT as An, lineNameHit as At, roadmapParses as B, DEPENDENCY_FIELDS as Bn, apiReportScript as Bt, versionTitle as C, setupCue as Cn, privatePatterns as Ct, typedScripts as D, securityCallers as Dn, firstNameMatch as Dt, trustPolicy as E, SECURITY_TIMEOUT_MINUTES as En, PrivateNameListError as Et, HOME_TIMEOUT_MS as F, gateAfterCancel as Fn, noBuildOutput as Ft, publishedMinor as G, inFolder as Gn, mitText as Gt, releaseFiles as H, cleanPath as Hn, authorOf as Ht, blockHash as I, readAction as In, REAL_COMPARE as It, NPM_REGISTRY as J, matchesAny as Jn, moduleMessage as Jt, publishedMinorRule as K, keyLine as Kn, repositoryIsPublic as Kt, githubFetch as L, readWorkflow as Ln, hasImportMetaMain as Lt, isSourcePath as M, gateTrigger as Mn, nameMatches as Mt, pathsOf as N, prPathFilters as Nn, parsePrivateNames as Nt, configsOfScript as O, securityOneJob as On, isAllowedHit as Ot, sourceMain as P, summaryName as Pn, pathNameHit as Pt, unreleasedChange as Q, runGit as Qn, homePackage as Qt, sharedDocsRule as R, STRICT_OPTIONS as Rn, mainCheck as Rt, setVersions as S, sharedCi as Sn, privateNamesFile as St, TRAIN_SCOPES as T, SECURITY_SCAN_INPUTS as Tn, PRIVATE_NAME_LIST as Tt, lockedVersions as U, codePackages as Un, licenseFile as Ut, requiredScripts as V, RULE_WARN_DAYS as Vn, LICENSE_TEXTS as Vt, minorOf as W, hasFile as Wn, licenseFileOf as Wt, UNSHIPPED_FILES as X, readJsonc as Xn, modulesOf as Xt, SHIPPED_FIELDS as Y, parseJsonc as Yn, moduleUses as Yt, npmLookup as Z, replaceLine as Zn, declaredName as Zt, workspaceProtocol as _, tsconfigTest as _n, PRIVATE_NAMES_FILE_CONFIG as _t, listRules as a, MAP_RULE as an, pagesAfterRelease as at, yamlFaults as b, SHARED_WORKFLOWS as bn, invalidPatternBreaks as bt, runCli as c, mapText as cn, scheduleMinute as ct, HOOK_MARKER as d, npmNames as dn, pagesCalls as dt, repoOf as en, defaultOptions as er, pipeFails as et, NO_READ_LINE as f, readOverlay as fn, pagesSite as ft, RULES as g, hasTests as gn, HOME_PATTERNS as gt, prePush as h, serviceRunMain as hn, DEFAULT_ALLOWED as ht, formatResult as i, HOMES as in, siteCheckInCi as it, testsRequired as j, convertGate as jn, lineNameHits as jt, scriptsOf as k, withOneJob as kn, isCommonUse as kt, runFix as l, mergeHomes as ln, pushMainOnly as lt, installHook as m, runCalls as mn, packNoBuildinfo as mt, annotations as n, signaturesOf as nn, isPinned as nt, readConfig as o, findHomes as on, repositoryOfRemote as ot, PRE_PUSH_HOOK as p, SERVICE_PACKAGE as pn, exportsRequire as pt, reachOf as q, lineOf as qn, homeModule as qt, createContext as r, HOME_EXPORTS as rn, pinnedGitDeps as rt, runChecks as s, mapMarkdown as sn, runnerBudget as st, USAGE as t, reposOf as tn, parseConfig as tr, isGitSpecifier as tt, summaryMarkdown as u, npmDrift as un, PAGES_WORKFLOWS as ut, GITHUB_YAML as v, SHARED_ACTIONS as vn, PRIVATE_NAMES_FILE_VARIABLE as vt, IGNORE_AFTER as w, SECURITY_SCAN_COMMIT as wn, privateTextBreaks as wt, namedVersions as x, callsSharedCi as xn, noLocalPaths as xt, workflowParses as y, SHARED_CI as yn, PRIVATE_PATTERNS_VARIABLE as yt, roadmapOfLine as z, cuePreset as zn, coverageProvider as zt };
|
|
18567
18579
|
|
|
18568
|
-
//# sourceMappingURL=run-
|
|
18580
|
+
//# sourceMappingURL=run-C0vL-9On.js.map
|