@mark1russell7/conventions 0.40.3 → 0.40.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 +12 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -2
- package/build/{run-8P3m1onp.js → run-CFCxbx_x.js} +43 -8
- package/build/run-CFCxbx_x.js.map +1 -0
- package/package.json +1 -1
- package/build/run-8P3m1onp.js.map +0 -1
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ The rules come from the invariants audit of 2026-10-26 (strategy item s38). The
|
|
|
68
68
|
| `pipe-fails` | A failure on the left of a pipe fails its step. With no `shell` key, GitHub has no `pipefail`, so `tests \| tee out.txt` passes when the tests fail. The fix adds `shell: bash` as the default of the workflow. A step that then turns red had a failure that the pipe hid. |
|
|
69
69
|
| `gate-after-cancel` | A summary job of a gate has the condition `if: ${{ !cancelled() }}`, not `always()`. After a cancel, a job with `always()` asks for a runner, and the new run waits behind it. A job with `!cancelled()` concludes `cancelled` with no runner, and the pull request stays blocked. |
|
|
70
70
|
| `security-one-job` | The security scans run in one job, the check `Security OK`, with the action `security-scan` of the template. The shared workflow `reusable-security.yml` gives three scan jobs, and its caller adds a summary job. Each job asks for its own runner, so in a full queue a run waits for four runners. On 2026-11-06 each scan job of one repository waited 23 to 40 minutes. |
|
|
71
|
-
| `service-run-main` | In a server package, only the entry `src/main.ts` starts the service with `run()`. A server package has a dependency on `@mark1russell7/service` and a file `src/main.ts`, as the preset `service` writes it. A source file that imports the service package and starts `run()` is a break. `run()` owns the process, so a module that starts it cannot be imported by a test. |
|
|
71
|
+
| `service-run-main` | In a server package, only the entry `src/main.ts` starts the service with `run()`. A server package has a dependency on `@mark1russell7/service` and a file `src/main.ts`, as the preset `service` writes it. A source file that imports the service package and starts `run()` is a break. A file that imports only the tool entries (`/channel`, `/clock`, `/heartbeat`, `/backoff`, `/limiter`, `/rules`) is not read: their values have their own `run`, as the pool of `/channel`. `run()` owns the process, so a module that starts it cannot be imported by a test. |
|
|
72
72
|
| `shared-ci` | The workflow `ci.yml` calls the shared workflow `reusable-ci.yml` of the template, and no workflow or action of the repository has the name of a shared one of the template. A `ci.yml` with its own steps, or a local copy, does not get the fixes and the new checks of the template. The template itself is not examined (option `home`). On 2026-11-07, 3 of 19 repositories of the account ran CI steps of their own. |
|
|
73
73
|
| `setup-cue` | No workflow or action installs the cue CLI with its own command (a download of a release asset of `cue-lang/cue`, or `go install`). A caller of `reusable-ci.yml` gives the input `cue-version`. Another job uses the action `setup-cue` of the template. The action installs the CLI from a cache, or with retries and a sha256 check. On 2026-11-08, a 504 of GitHub failed each bare `curl` of the CLI. |
|
|
74
74
|
| `gate-trigger` | No workflow has `paths` or `paths-ignore` on `on.pull_request` or `on.pull_request_target`. The ruleset needs the summary check `<Name> OK` of each gate, and a workflow with a path filter does not start on each pull request. Then its check is not there, the ruleset cannot ask for it, and a pull request can merge before the gate ends. A gate uses the actions `changes` and `gate-summary` of the template (`CI.md`, "A gate with paths"). | private `gate-trigger` (STRATEGY.md, 2026-11-02). |
|
package/build/cli.js
CHANGED
package/build/index.d.ts
CHANGED
|
@@ -233,7 +233,11 @@ export declare function callsSharedCi(file: string, text: string): boolean;
|
|
|
233
233
|
export declare const sharedCi: Rule;
|
|
234
234
|
/** The package of the service. */
|
|
235
235
|
export declare const SERVICE_PACKAGE = "@mark1russell7/service";
|
|
236
|
-
/**
|
|
236
|
+
/**
|
|
237
|
+
* This function gives the lines (from 1) of the calls of `run(` in a source text that imports the service package. A
|
|
238
|
+
* text that imports only the tool entries (`/channel`, `/clock`, `/heartbeat`, `/backoff`, `/limiter`, `/rules`) has
|
|
239
|
+
* no calls: those entries give no service.
|
|
240
|
+
*/
|
|
237
241
|
export declare function runCalls(text: string): number[];
|
|
238
242
|
export declare const serviceRunMain: Rule;
|
|
239
243
|
/** The state of a home: on npm, in a repository but not on npm, only on a roadmap, or with no package. */
|
|
@@ -250,6 +254,11 @@ interface Home {
|
|
|
250
254
|
readonly packages: readonly string[];
|
|
251
255
|
/** The repository of the home, as owner/name. */
|
|
252
256
|
readonly repo: string;
|
|
257
|
+
/**
|
|
258
|
+
* The other repositories that hold code of the home while it moves, as owner/name: the source or the target of the move.
|
|
259
|
+
* The rule home-package does not break in them. Remove an entry when the move ends.
|
|
260
|
+
*/
|
|
261
|
+
readonly alsoIn?: readonly string[];
|
|
253
262
|
/** The state of the home. */
|
|
254
263
|
readonly state: HomeState;
|
|
255
264
|
/** More words that find the area in a search. */
|
|
@@ -282,6 +291,8 @@ interface Signature {
|
|
|
282
291
|
readonly home: Home;
|
|
283
292
|
readonly pattern: RegExp;
|
|
284
293
|
}
|
|
294
|
+
/** This function gives the repositories, in lower case, that hold code of a home: its repository and each of `alsoIn`. */
|
|
295
|
+
export declare function reposOf(home: Home): readonly string[];
|
|
285
296
|
/** This function gives the signatures of the homes that a repository can use: on npm, or in a repository with a pin. */
|
|
286
297
|
export declare function signaturesOf(homes: readonly Home[]): Signature[];
|
|
287
298
|
/** This function gives the name of the function that a line declares, or undefined. */
|
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-package.ts","../src/rules/license-file.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/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.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;;UAQI;WACN;WACA;;;wBAkBK,gBAAgB,eAAe;;;;;;wBA8B/B,WAAW,cAAc;EAA0C;;EAAmB;;qBA4DzF,gBAAgB;qBChGhB,UAAU;;qBC5BV;;qBAaA;;qBAGA;;wBASG,cAAc,cAAc;qBAI/B,UAAU;;qBC9BV
|
|
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-package.ts","../src/rules/license-file.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/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.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.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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, $t as
|
|
1
|
+
import { $ as unreleasedChangeRule, $t as mapMarkdown, A as typedFiles, An as cuePreset, At as lineNameHits, B as roadmapParses, Bn as parseJsonc, Bt as licenseFile, C as versionTitle, Cn as gateTrigger, Ct as privateTextBreaks, D as typedScripts, Dn as readAction, Dt as isAllowedHit, E as trustPolicy, En as gateAfterCancel, Et as firstNameMatch, F as HOME_TIMEOUT_MS, Fn as hasFile, Ft as REAL_COMPARE, G as publishedMinor, Gn as defaultOptions, Gt as homePackage, H as releaseFiles, Hn as replaceLine, Ht as mitText, I as blockHash, In as inFolder, It as hasImportMetaMain, J as NPM_REGISTRY, Jt as reposOf, K as publishedMinorRule, Kn as parseConfig, Kt as messageOf, L as githubFetch, Ln as keyLine, Lt as mainCheck, M as isSourcePath, Mn as RULE_WARN_DAYS, Mt as parsePrivateNames, N as pathsOf, Nn as cleanPath, Nt as pathNameHit, O as configsOfScript, On as readWorkflow, Ot as isCommonUse, P as sourceMain, Pn as codePackages, Pt as noBuildOutput, Q as unreleasedChange, Qt as findHomes, R as sharedDocsRule, Rn as lineOf, Rt as LICENSE_TEXTS, S as setVersions, Sn as convertGate, St as privatePatterns, T as TRAIN_SCOPES, Tn as summaryName, Tt as PrivateNameListError, U as lockedVersions, Un as runGit, Ut as repositoryIsPublic, V as requiredScripts, Vn as readJsonc, Vt as licenseFileOf, W as minorOf, Wn as specifiersOf, Wt as declaredName, X as UNSHIPPED_FILES, Xt as HOMES, Y as SHIPPED_FIELDS, Yt as signaturesOf, Z as npmLookup, Zt as MAP_RULE, _ as workspaceProtocol, _n as SECURITY_TIMEOUT_MINUTES, _t as PRIVATE_NAMES_FILE_VARIABLE, a as listRules, an as runCalls, at as repositoryOfRemote, b as yamlFaults, bn as withOneJob, bt as noLocalPaths, c as runCli, cn as tsconfigTest, ct as pushMainOnly, d as HOOK_MARKER, dn as SHARED_WORKFLOWS, dt as pagesSite, en as mapText, et as pipeFails, f as NO_READ_LINE, fn as callsSharedCi, ft as apiReportScript, g as RULES, gn as SECURITY_SCAN_INPUTS, gt as PRIVATE_NAMES_FILE_CONFIG, h as prePush, hn as SECURITY_SCAN_COMMIT, ht as HOME_PATTERNS, i as formatResult, in as SERVICE_PACKAGE, it as pagesAfterRelease, j as testsRequired, jn as DEPENDENCY_FIELDS, jt as nameMatches, k as scriptsOf, kn as STRICT_OPTIONS, kt as lineNameHit, l as runFix, ln as SHARED_ACTIONS, lt as PAGES_WORKFLOWS, m as installHook, mn as setupCue, mt as DEFAULT_ALLOWED, n as annotations, nn as readOverlay, nt as isPinned, o as readConfig, on as serviceRunMain, ot as runnerBudget, p as PRE_PUSH_HOOK, pn as sharedCi, pt as packNoBuildinfo, q as reachOf, qt as repoOf, r as createContext, rn as HOME_EXPORTS, rt as pinnedGitDeps, s as runChecks, sn as hasTests, st as scheduleMinute, t as USAGE, tn as mergeHomes, tt as isGitSpecifier, u as summaryMarkdown, un as SHARED_CI, ut as pagesCalls, v as GITHUB_YAML, vn as securityCallers, vt as PRIVATE_PATTERNS_VARIABLE, w as IGNORE_AFTER, wn as prPathFilters, wt as PRIVATE_NAME_LIST, x as namedVersions, xn as ACTIONS_COMMIT, xt as privateNamesFile, y as workflowParses, yn as securityOneJob, yt as invalidPatternBreaks, z as roadmapOfLine, zn as matchesAny, zt as authorOf } from "./run-CFCxbx_x.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
|
/**
|
|
@@ -65,6 +65,6 @@ function releaseNotes(name, version, changelog) {
|
|
|
65
65
|
if (section.length <= 1e5) return section;
|
|
66
66
|
return `${section.slice(0, MAX_NOTES)}\n\n(The CHANGELOG.md of \`${name}\` has the full text.)`;
|
|
67
67
|
}
|
|
68
|
-
export { ACTIONS_COMMIT, DEFAULT_ALLOWED, DEPENDENCY_FIELDS, GITHUB_YAML, HOMES, HOME_EXPORTS, HOME_PATTERNS, HOME_TIMEOUT_MS, HOOK_MARKER, IGNORE_AFTER, LICENSE_TEXTS, MAP_RULE, MAX_NOTES, NO_READ_LINE, NPM_REGISTRY, PAGES_WORKFLOWS, PRE_PUSH_HOOK, PRIVATE_NAMES_FILE_CONFIG, PRIVATE_NAMES_FILE_VARIABLE, PRIVATE_NAME_LIST, PRIVATE_PATTERNS_VARIABLE, PrivateNameListError, REAL_COMPARE, RULES, RULE_WARN_DAYS, SECURITY_SCAN_COMMIT, SECURITY_SCAN_INPUTS, SECURITY_TIMEOUT_MINUTES, SERVICE_PACKAGE, SHARED_ACTIONS, SHARED_CI, SHARED_WORKFLOWS, SHIPPED_FIELDS, STRICT_OPTIONS, TRAIN_SCOPES, UNSHIPPED_FILES, USAGE, annotations, apiReportScript, authorOf, blockHash, callsSharedCi, changelogSection, cleanPath, codePackages, configsOfScript, convertGate, createContext, cuePreset, declaredName, defaultOptions, findHomes, firstNameMatch, formatResult, gateAfterCancel, gateTrigger, githubFetch, globFolders, globToRegExp, hasFile, hasImportMetaMain, hasTests, homePackage, inFolder, installHook, invalidPatternBreaks, isAllowedHit, isCommonUse, isGitSpecifier, isPinned, isSourcePath, keyLine, licenseFile, licenseFileOf, lineNameHit, lineNameHits, lineOf, listRules, lockedVersions, mainCheck, mapMarkdown, mapText, matchesAny, mergeHomes, messageOf, minorOf, mitText, nameMatches, namedVersions, noBuildOutput, noLocalPaths, npmLookup, npmUrl, packNoBuildinfo, packageFolders, pagesAfterRelease, pagesCalls, pagesSite, parseConfig, parseJsonc, parsePrivateNames, pathNameHit, pathsOf, pinnedGitDeps, pipeFails, prPathFilters, prePush, privateNamesFile, privatePatterns, privateTextBreaks, publishedMinor, publishedMinorRule, pushMainOnly, reachOf, readAction, readConfig, readJsonc, readOverlay, readWorkflow, releaseFiles, releaseNotes, replaceLine, repoOf, repositoryIsPublic, repositoryOfRemote, requiredScripts, roadmapOfLine, roadmapParses, runCalls, runChecks, runCli, runFix, runGit, runnerBudget, scheduleMinute, scriptsOf, securityCallers, securityOneJob, serviceRunMain, setVersions, setupCue, sharedCi, sharedDocsRule, signaturesOf, sourceMain, specifiersOf, summaryMarkdown, summaryName, tagName, testsRequired, trustPolicy, tsconfigTest, typedFiles, typedScripts, unreleasedChange, unreleasedChangeRule, versionTitle, withOneJob, workflowParses, workspaceGlobs, workspaceProtocol, yamlFaults };
|
|
68
|
+
export { ACTIONS_COMMIT, DEFAULT_ALLOWED, DEPENDENCY_FIELDS, GITHUB_YAML, HOMES, HOME_EXPORTS, HOME_PATTERNS, HOME_TIMEOUT_MS, HOOK_MARKER, IGNORE_AFTER, LICENSE_TEXTS, MAP_RULE, MAX_NOTES, NO_READ_LINE, NPM_REGISTRY, PAGES_WORKFLOWS, PRE_PUSH_HOOK, PRIVATE_NAMES_FILE_CONFIG, PRIVATE_NAMES_FILE_VARIABLE, PRIVATE_NAME_LIST, PRIVATE_PATTERNS_VARIABLE, PrivateNameListError, REAL_COMPARE, RULES, RULE_WARN_DAYS, SECURITY_SCAN_COMMIT, SECURITY_SCAN_INPUTS, SECURITY_TIMEOUT_MINUTES, SERVICE_PACKAGE, SHARED_ACTIONS, SHARED_CI, SHARED_WORKFLOWS, SHIPPED_FIELDS, STRICT_OPTIONS, TRAIN_SCOPES, UNSHIPPED_FILES, USAGE, annotations, apiReportScript, authorOf, blockHash, callsSharedCi, changelogSection, cleanPath, codePackages, configsOfScript, convertGate, createContext, cuePreset, declaredName, defaultOptions, findHomes, firstNameMatch, formatResult, gateAfterCancel, gateTrigger, githubFetch, globFolders, globToRegExp, hasFile, hasImportMetaMain, hasTests, homePackage, inFolder, installHook, invalidPatternBreaks, isAllowedHit, isCommonUse, isGitSpecifier, isPinned, isSourcePath, keyLine, licenseFile, licenseFileOf, lineNameHit, lineNameHits, lineOf, listRules, lockedVersions, mainCheck, mapMarkdown, mapText, matchesAny, mergeHomes, messageOf, minorOf, mitText, nameMatches, namedVersions, noBuildOutput, noLocalPaths, npmLookup, npmUrl, packNoBuildinfo, packageFolders, pagesAfterRelease, pagesCalls, pagesSite, parseConfig, parseJsonc, parsePrivateNames, pathNameHit, pathsOf, pinnedGitDeps, pipeFails, prPathFilters, prePush, privateNamesFile, privatePatterns, privateTextBreaks, publishedMinor, publishedMinorRule, pushMainOnly, reachOf, readAction, readConfig, readJsonc, readOverlay, readWorkflow, releaseFiles, releaseNotes, replaceLine, repoOf, reposOf, repositoryIsPublic, repositoryOfRemote, requiredScripts, roadmapOfLine, roadmapParses, runCalls, runChecks, runCli, runFix, runGit, runnerBudget, scheduleMinute, scriptsOf, securityCallers, securityOneJob, serviceRunMain, setVersions, setupCue, sharedCi, sharedDocsRule, signaturesOf, sourceMain, specifiersOf, summaryMarkdown, summaryName, tagName, testsRequired, trustPolicy, tsconfigTest, typedFiles, typedScripts, unreleasedChange, unreleasedChangeRule, versionTitle, withOneJob, workflowParses, workspaceGlobs, workspaceProtocol, yamlFaults };
|
|
69
69
|
|
|
70
70
|
//# sourceMappingURL=index.js.map
|
|
@@ -2445,15 +2445,40 @@ const tsconfigTest = {
|
|
|
2445
2445
|
*/
|
|
2446
2446
|
/** The package of the service. */
|
|
2447
2447
|
const SERVICE_PACKAGE = "@mark1russell7/service";
|
|
2448
|
-
/** An import of the service package or of one of its entries. */
|
|
2449
|
-
const SERVICE_IMPORT = /\bfrom\s+["']@mark1russell7\/service(
|
|
2448
|
+
/** An import of the service package or of one of its entries. The groups are the name of the entry, if it has one. */
|
|
2449
|
+
const SERVICE_IMPORT = /\bfrom\s+["']@mark1russell7\/service(?:\/([^"']*))?["']|\bimport\s*\(\s*["']@mark1russell7\/service(?:\/([^"']*))?["']\s*\)/g;
|
|
2450
|
+
/**
|
|
2451
|
+
* The entries of the service package that give only tools: no service and no part of one. A value of these entries can
|
|
2452
|
+
* have its own `run`, for example the pool of `/channel`. Each other entry, a new entry too, counts as an entry of a
|
|
2453
|
+
* service, so the rule stays strict.
|
|
2454
|
+
*/
|
|
2455
|
+
const TOOL_ENTRIES = /* @__PURE__ */ new Set([
|
|
2456
|
+
"channel",
|
|
2457
|
+
"clock",
|
|
2458
|
+
"heartbeat",
|
|
2459
|
+
"backoff",
|
|
2460
|
+
"limiter",
|
|
2461
|
+
"rules"
|
|
2462
|
+
]);
|
|
2463
|
+
/** This function tells if a source text imports the root of the service package, or an entry that is not a tool entry. */
|
|
2464
|
+
function importsService(text) {
|
|
2465
|
+
for (const match of text.matchAll(SERVICE_IMPORT)) {
|
|
2466
|
+
const entry = match[1] ?? match[2];
|
|
2467
|
+
if (entry === void 0 || !TOOL_ENTRIES.has(entry)) return true;
|
|
2468
|
+
}
|
|
2469
|
+
return false;
|
|
2470
|
+
}
|
|
2450
2471
|
/** A call of `run(` on a value, but not on `this`. */
|
|
2451
2472
|
const RUN_CALL = /(?<!\bthis)\.run\s*\(/;
|
|
2452
2473
|
/** The source files that the rule reads. */
|
|
2453
2474
|
const SOURCE = /\.(c|m)?tsx?$/;
|
|
2454
|
-
/**
|
|
2475
|
+
/**
|
|
2476
|
+
* This function gives the lines (from 1) of the calls of `run(` in a source text that imports the service package. A
|
|
2477
|
+
* text that imports only the tool entries (`/channel`, `/clock`, `/heartbeat`, `/backoff`, `/limiter`, `/rules`) has
|
|
2478
|
+
* no calls: those entries give no service.
|
|
2479
|
+
*/
|
|
2455
2480
|
function runCalls(text) {
|
|
2456
|
-
if (!
|
|
2481
|
+
if (!importsService(text)) return [];
|
|
2457
2482
|
const found = [];
|
|
2458
2483
|
text.split(/\r?\n/).forEach((line, index) => {
|
|
2459
2484
|
const comment = line.indexOf("//");
|
|
@@ -8213,6 +8238,7 @@ const HOMES = [
|
|
|
8213
8238
|
covers: "quantiles, medians, means, SD, bootstrap intervals, sign and permutation tests, Holm, Wilson, Brier, calibration, correlation, noise floors, fits of laws to values, likelihoods, mixtures",
|
|
8214
8239
|
packages: ["@mark1russell7/rigor-statistics"],
|
|
8215
8240
|
repo: "mark1russell7/rigor",
|
|
8241
|
+
alsoIn: ["mark1russell7/algebra", "mark1russell7/math"],
|
|
8216
8242
|
state: "published",
|
|
8217
8243
|
words: [
|
|
8218
8244
|
"stats",
|
|
@@ -8272,6 +8298,7 @@ const HOMES = [
|
|
|
8272
8298
|
covers: "seeded random numbers, seeds from names, hashes for seeds, draws, input families with dimensions and ranges",
|
|
8273
8299
|
packages: ["@mark1russell7/rigor-generators"],
|
|
8274
8300
|
repo: "mark1russell7/rigor",
|
|
8301
|
+
alsoIn: ["mark1russell7/algebra", "mark1russell7/math"],
|
|
8275
8302
|
state: "published",
|
|
8276
8303
|
words: [
|
|
8277
8304
|
"seed",
|
|
@@ -9001,7 +9028,10 @@ const HOMES = [
|
|
|
9001
9028
|
function readOverlay(file) {
|
|
9002
9029
|
const data = JSON.parse(readFileSync(file, "utf8"));
|
|
9003
9030
|
if (!Array.isArray(data.homes)) throw new Error(`${file}: the field "homes" must be an array`);
|
|
9004
|
-
for (const home of data.homes)
|
|
9031
|
+
for (const home of data.homes) {
|
|
9032
|
+
if (typeof home.area !== "string" || typeof home.title !== "string" || typeof home.repo !== "string") throw new Error(`${file}: each home needs area, title and repo`);
|
|
9033
|
+
if (home.alsoIn !== void 0 && !(Array.isArray(home.alsoIn) && home.alsoIn.every((repo) => typeof repo === "string"))) throw new Error(`${file}: alsoIn of ${home.area} must be an array of owner/name strings`);
|
|
9034
|
+
}
|
|
9005
9035
|
return data.homes;
|
|
9006
9036
|
}
|
|
9007
9037
|
/** This function merges the homes. A home of `extra` with the area of a home of `base` takes its place. */
|
|
@@ -9062,6 +9092,7 @@ function mapText(homes) {
|
|
|
9062
9092
|
` covers: ${home.covers}`,
|
|
9063
9093
|
` repo: ${home.repo}`
|
|
9064
9094
|
];
|
|
9095
|
+
if (home.alsoIn !== void 0 && home.alsoIn.length > 0) lines.push(` also in, while it moves: ${home.alsoIn.join(", ")}`);
|
|
9065
9096
|
if (home.note !== void 0) lines.push(` note: ${home.note}`);
|
|
9066
9097
|
return lines.join("\n");
|
|
9067
9098
|
}).join("\n\n").concat("\n");
|
|
@@ -9075,6 +9106,10 @@ const CODE_FILE = /\.(?:[cm]?[jt]s|[jt]sx)$/;
|
|
|
9075
9106
|
const SKIPPED = /(?:^|\/)(?:node_modules|build|dist|vendor)\/|\.d\.[cm]?ts$/;
|
|
9076
9107
|
/** A declaration of a function: `function name`, or `const name = (` / `= function` / `= <T>(`, with `export` and `async`. */
|
|
9077
9108
|
const DECLARATION$1 = /^\s*(?:export\s+)?(?:default\s+)?(?:async\s+)?function\s*(?:\*\s*)?([A-Za-z_$][\w$]*)|^\s*(?:export\s+)?(?:const|let)\s+([A-Za-z_$][\w$]*)\s*(?::[^=]+)?=\s*(?:async\s*)?(?:\(|function\b|<[A-Za-z])/;
|
|
9109
|
+
/** This function gives the repositories, in lower case, that hold code of a home: its repository and each of `alsoIn`. */
|
|
9110
|
+
function reposOf(home) {
|
|
9111
|
+
return [home.repo, ...home.alsoIn ?? []].map((repo) => repo.toLowerCase());
|
|
9112
|
+
}
|
|
9078
9113
|
/** This function gives the signatures of the homes that a repository can use: on npm, or in a repository with a pin. */
|
|
9079
9114
|
function signaturesOf(homes) {
|
|
9080
9115
|
return homes.filter((home) => home.state === "published" || home.state === "unpublished").flatMap((home) => (home.signatures ?? []).map((source) => ({
|
|
@@ -9125,7 +9160,7 @@ const homePackage = {
|
|
|
9125
9160
|
const scope = options["scope"];
|
|
9126
9161
|
if (scope !== "change" && scope !== "all") throw new Error(`The option scope is "change" or "all", not ${JSON.stringify(scope)}.`);
|
|
9127
9162
|
const repo = repoOf(context);
|
|
9128
|
-
const signatures = signaturesOf(HOMES).filter((signature) => signature.home.repo
|
|
9163
|
+
const signatures = signaturesOf(HOMES).filter((signature) => !reposOf(signature.home).includes(repo ?? ""));
|
|
9129
9164
|
if (signatures.length === 0) return [];
|
|
9130
9165
|
let files;
|
|
9131
9166
|
let added;
|
|
@@ -14773,6 +14808,6 @@ function runHook(args, io) {
|
|
|
14773
14808
|
git: (gitArgs) => runGit(io.cwd, gitArgs)
|
|
14774
14809
|
}, io);
|
|
14775
14810
|
}
|
|
14776
|
-
export { unreleasedChangeRule as $,
|
|
14811
|
+
export { unreleasedChangeRule as $, mapMarkdown as $t, typedFiles as A, cuePreset as An, lineNameHits as At, roadmapParses as B, parseJsonc as Bn, licenseFile as Bt, versionTitle as C, gateTrigger as Cn, privateTextBreaks as Ct, typedScripts as D, readAction as Dn, isAllowedHit as Dt, trustPolicy as E, gateAfterCancel as En, firstNameMatch as Et, HOME_TIMEOUT_MS as F, hasFile as Fn, REAL_COMPARE as Ft, publishedMinor as G, defaultOptions as Gn, homePackage as Gt, releaseFiles as H, replaceLine as Hn, mitText as Ht, blockHash as I, inFolder as In, hasImportMetaMain as It, NPM_REGISTRY as J, reposOf as Jt, publishedMinorRule as K, parseConfig as Kn, messageOf as Kt, githubFetch as L, keyLine as Ln, mainCheck as Lt, isSourcePath as M, RULE_WARN_DAYS as Mn, parsePrivateNames as Mt, pathsOf as N, cleanPath as Nn, pathNameHit as Nt, configsOfScript as O, readWorkflow as On, isCommonUse as Ot, sourceMain as P, codePackages as Pn, noBuildOutput as Pt, unreleasedChange as Q, findHomes as Qt, sharedDocsRule as R, lineOf as Rn, LICENSE_TEXTS as Rt, setVersions as S, convertGate as Sn, privatePatterns as St, TRAIN_SCOPES as T, summaryName as Tn, PrivateNameListError as Tt, lockedVersions as U, runGit as Un, repositoryIsPublic as Ut, requiredScripts as V, readJsonc as Vn, licenseFileOf as Vt, minorOf as W, specifiersOf as Wn, declaredName as Wt, UNSHIPPED_FILES as X, HOMES as Xt, SHIPPED_FIELDS as Y, signaturesOf as Yt, npmLookup as Z, MAP_RULE as Zt, workspaceProtocol as _, SECURITY_TIMEOUT_MINUTES as _n, PRIVATE_NAMES_FILE_VARIABLE as _t, listRules as a, runCalls as an, repositoryOfRemote as at, yamlFaults as b, withOneJob as bn, noLocalPaths as bt, runCli as c, tsconfigTest as cn, pushMainOnly as ct, HOOK_MARKER as d, SHARED_WORKFLOWS as dn, pagesSite as dt, mapText as en, pipeFails as et, NO_READ_LINE as f, callsSharedCi as fn, apiReportScript as ft, RULES as g, SECURITY_SCAN_INPUTS as gn, PRIVATE_NAMES_FILE_CONFIG as gt, prePush as h, SECURITY_SCAN_COMMIT as hn, HOME_PATTERNS as ht, formatResult as i, SERVICE_PACKAGE as in, pagesAfterRelease as it, testsRequired as j, DEPENDENCY_FIELDS as jn, nameMatches as jt, scriptsOf as k, STRICT_OPTIONS as kn, lineNameHit as kt, runFix as l, SHARED_ACTIONS as ln, PAGES_WORKFLOWS as lt, installHook as m, setupCue as mn, DEFAULT_ALLOWED as mt, annotations as n, readOverlay as nn, isPinned as nt, readConfig as o, serviceRunMain as on, runnerBudget as ot, PRE_PUSH_HOOK as p, sharedCi as pn, packNoBuildinfo as pt, reachOf as q, repoOf as qt, createContext as r, HOME_EXPORTS as rn, pinnedGitDeps as rt, runChecks as s, hasTests as sn, scheduleMinute as st, USAGE as t, mergeHomes as tn, isGitSpecifier as tt, summaryMarkdown as u, SHARED_CI as un, pagesCalls as ut, GITHUB_YAML as v, securityCallers as vn, PRIVATE_PATTERNS_VARIABLE as vt, IGNORE_AFTER as w, prPathFilters as wn, PRIVATE_NAME_LIST as wt, namedVersions as x, ACTIONS_COMMIT as xn, privateNamesFile as xt, workflowParses as y, securityOneJob as yn, invalidPatternBreaks as yt, roadmapOfLine as z, matchesAny as zn, authorOf as zt };
|
|
14777
14812
|
|
|
14778
|
-
//# sourceMappingURL=run-
|
|
14813
|
+
//# sourceMappingURL=run-CFCxbx_x.js.map
|