@mark1russell7/conventions 0.37.0 → 0.37.1

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 CHANGED
@@ -50,7 +50,7 @@ The rules come from the invariants audit of 2026-10-26 (strategy item s38). The
50
50
  | `cue-preset` | The `tsconfig.json` of each package extends a preset of `@mark1russell7/cue`. No config of a package turns off a strict option that its preset turns on. `erasableSyntaxOnly` is one of these options, because `node` cannot strip the other syntax. | client `cue-config`, `no-manual-tsconfig`. private `cue-preset-strict`, `strict-preset`, `new-package-via-cli`. coeval, crawler, headroom, Vex `package-scaffold`. |
51
51
  | `required-scripts` | The root `package.json` has the script `typecheck`. It also has `lint:ste` when the repository uses `ste-lint`: a dependency on `@mark1russell7/ste-lint`, or a `ste.config.json` at the root. The shared CI skips a missing script, so a removed script turns its check off with no sign. | client, coeval, crawler, private, headroom, Vex `ste-prose`. systems `lint-ste-in-ci`. coeval, crawler, headroom, Vex `tsconfig-test`. |
52
52
  | `no-build-output` | Git keeps no file in a folder named `dist` or `build`. | client `no-build-output`, `no-dist`, `no-dist-commit`. Only one repository of the audit tells this rule. The `.gitignore` of the template has it for each repository. |
53
- | `no-local-paths` | No tracked file has the home folder of a user: `C:\Users\<name>`, `/Users/<name>` or `/home/<name>`. A CI user (`runner`), a name of one character and a placeholder (`<you>`) are not a break. The commit messages of the change (a pull request, or `--base`) and the title and the body of the pull request do not have one either. The same is true for each pattern of the option `patterns` and of the environment variable `CONVENTIONS_PRIVATE_PATTERNS`. A break of a private pattern shows only the line of the pattern in the variable, not the text. | client `I12`. systems `no-identifying-names`, `no-private-identifiers`, `no-private-names`. coeval `no-private-names`. |
53
+ | `no-local-paths` | No tracked file has the home folder of a user: `C:\Users\<name>`, `/Users/<name>` or `/home/<name>`. A CI user (`runner`), a name of one character and a placeholder (`<you>`) are not a break. The commit messages of the change (a pull request, or `--base`) and the title and the body of the pull request do not have one either. The same is true for each pattern of the option `patterns` and of the environment variable `CONVENTIONS_PRIVATE_PATTERNS`. A break of a private pattern shows only the line of the pattern in the variable, not the text. A line of the variable that is not a valid regular expression is a break of its own. | client `I12`. systems `no-identifying-names`, `no-private-identifiers`, `no-private-names`. coeval `no-private-names`. |
54
54
  | `release-files` | A pull request changes `.github/workflows/release.yml` or `scripts/release/` only with a line `Release-Edit: <reason>` in a commit message or in the body of the pull request. The commits of the release bot (the sync of the template) need no reason. | coeval `no-release-edit`, `no-release-edits`. crawler `no-release-edit`, `no-release-edits`. headroom `no-release-edits`, `release-files-frozen`. |
55
55
  | `unreleased-change` | A change does not set a version that npm has: the release skips such a version. The rule compares the version of the head of the change with the version of its merge base, so a version that only the base branch changed does not count. A repository where each pull request sets its version sets the option `versionEachChange`. Then a change of the shipped files also raises the version, when npm has that version already. The files that ship are the files of the folder of the package, without the tests, the fixtures, the Markdown files and the configs (the option `unshipped`). When git tracks each entry of the field `files`, only those entries ship. A change of `package.json` ships when a field of the option `fields` changes, for example `exports`, but not the dependencies. On a push to the default branch, a version that the push sets breaks only when npm had it before the push. The release of the same push can publish it. An error of the registry makes the rule show `skip`. A repository with `.changeset/config.json`, a private package and a version `0.0.0` or `0.0.0-<stage>` are not examined. | rigor #18 and #20 (2026-11-02): two pull requests set the same version, and the second change did not get to npm. crawler, coeval, template `release.yml`. |
56
56
  | `version-title` | A merge whose title names a version sets a version in a `package.json`. A title names a version in parentheses at its end, for example `(0.3.3)` before the `(#212)` of a squash, or after `Release` at its start. On a push to the default branch, the rule examines each commit of the first-parent line against its first parent. On a pull request, it reads the title of the event file and examines the merge commit against the base. A title with no version passes. A title that names an other version than the version that the merge sets also passes, because the change gets a release. | template #212 (`5933b34`) and #215 (`e077054`), 2026-11-06: both set `site-pages` 0.3.3, so the squash of #215 changed no `package.json`, and no release started. Template #162 and #164 (2026-11-04) did the same with 0.2.5. crawler, coeval `release.yml`. |
@@ -163,6 +163,62 @@ An unknown rule, an unknown option, or an exception or a changed option without
163
163
  | `--base <ref>` | The base commit of the change, for the rules `release-files`, `home-package` and `unreleased-change`. Outside CI, the default is the default branch of origin, so a local check examines the same added lines as the check of the pull request. |
164
164
  | `--no-base` | Do not use that default. |
165
165
  | `--json` | Write the result as JSON. |
166
+ | `pre-push <remote> [<url>]` | Examine the new commits of a push with the private name list. The git hook `pre-push` starts it. |
167
+ | `hook install` | Write the git hook `pre-push`. In CI, or outside a git repository, the command does nothing. |
168
+
169
+ ## The private name list and the hook `pre-push`
170
+
171
+ A private name must not get into a public repository. The private names are in a private name list, outside of the public repositories. The git hook `pre-push` examines each push with that list, on the computer of the push.
172
+
173
+ Set the path of the list one time on each computer:
174
+
175
+ ```sh
176
+ git config --global conventions.privateNamesFile ~/private/private-names.json
177
+ ```
178
+
179
+ The environment variable `CONVENTIONS_PRIVATE_NAMES_FILE` has priority over the git configuration.
180
+
181
+ The list is a JSON file. The schema [`schema/private-names.schema.json`](schema/private-names.schema.json) tells its fields, and the package has the schema. This example has made-up names:
182
+
183
+ ```json
184
+ {
185
+ "$comment": "The names of private projects.",
186
+ "names": [
187
+ { "id": "acme-app", "project": "The Acme app", "seeds": ["acme-app", "Acme"], "patterns": ["\\bacme-app\\b"], "word": "Acme", "commonAfter": ["corp"] }
188
+ ],
189
+ "allow": [{ "repo": "site", "path": "docs/history.md", "name": "acme-app", "why": "The page tells the history of the name." }]
190
+ }
191
+ ```
192
+
193
+ - `seeds`: the fixed texts of a name, with case. A line with no seed of the list is no hit. Thus each text that a pattern or the word finds must contain a seed.
194
+ - `patterns`: JavaScript regular expressions with no flags. A match in a line or in a path is a hit.
195
+ - `word`: a word that is also a common word. A match of the whole word is a hit only in a sentence that names the project. The word in code, in a title, after an article or before a noun is no hit.
196
+ - `commonAfter`: the words that make `word` a common word when they come next. In the example, `Acme corp` is no hit, but `the Acme team` is a hit.
197
+ - `allow`: the hits that a person examined. An entry permits the name `name` (each name, with no `name`) in the file `path` of the repository `repo`. The command gets the repository from the URL of the remote.
198
+
199
+ A line has one break or no break of the list: the first name of the line counts. A path of a file has a break only for a pattern.
200
+
201
+ Install the hook:
202
+
203
+ ```sh
204
+ pnpm exec conventions hook install
205
+ ```
206
+
207
+ A repository adds `"prepare": "conventions hook install"` to its root `package.json` in the change that raises `@mark1russell7/conventions` to `^0.37.1`. Then `pnpm install` installs the hook. The command writes `pre-push` in the hooks folder of git. It uses the folder of `core.hooksPath`, and it also works in a worktree. It keeps a hook `pre-push` that it did not write, and it shows a warning. In CI, the command does nothing.
208
+
209
+ Before each push, the hook starts `conventions pre-push`. The command examines each new commit of the push. A commit is new when no branch of the remote has it. The command examines these texts of each new commit:
210
+
211
+ - the commit message.
212
+ - each path that the commit adds or changes.
213
+ - each line that the commit adds.
214
+
215
+ The command also examines the home folders of users, with the settings of the rule `no-local-paths` in `package.json`. The environment variable `CONVENTIONS_PRIVATE_PATTERNS` adds one regular expression on each line, as in the rule. A break stops the push with the exit code 1.
216
+
217
+ A break shows the commit, the place and the index of the name in the list. An example is `commit 0123456789ab notes.md:2 A text names name 1 of the private name list.` A break does not show the text, the id, the project or the pattern, because the id is the private name. A break of a path does not show the path.
218
+
219
+ When no list and no pattern is set, the command writes one line that starts with `conventions pre-push: No read`, and the push continues. A push with no read is not a pass. The push stops when the command cannot read the list that a setting names. It also stops when the list is not JSON, does not agree with the schema, or has a bad regular expression. The line of the stop gives the reason and the index of the entry, not its values.
220
+
221
+ The check of CI continues to read the environment variable `CONVENTIONS_PRIVATE_PATTERNS` in the rule `no-local-paths`.
166
222
 
167
223
  ## The map of homes
168
224
 
@@ -196,3 +252,9 @@ The package also exports the functions of the tool:
196
252
  - `HOMES` is the map of homes. `findHomes(query)` finds the homes of words, and `mapMarkdown(homes)` and `mapText(homes)` write them. `readOverlay(file)` and `mergeHomes(base, extra)` add more homes.
197
253
  - `tagName(name, version, packageCount)` gives the git tag of a version. `releaseNotes(name, version, changelog)` gives the text of its GitHub release, with `changelogSection`, `npmUrl` and `MAX_NOTES`. The script `scripts/release/tags.ts` keeps the same rule, and a test compares the two.
198
254
  - `RULES` and each rule, with the helpers `isGitSpecifier`, `isPinned`, `isSourcePath` and `parseJsonc`.
255
+ - `privateTextBreaks(name, text, privates, options)` gives the breaks of one text. The rule `no-local-paths` and the command `pre-push` use it. `privates` has the list (`names`) and the patterns (`patterns`).
256
+ - `parsePrivateNames(text)` parses and checks a private name list. It throws a `PrivateNameListError` with a reason that shows no value of the list.
257
+ - `lineNameHit(list, line, place)`, `pathNameHit(list, path)`, `firstNameMatch(line, names)`, `isCommonUse(line, index, rule)` and `isAllowedHit(allow, repo, path, id)` find the names of the list. They have no input or output.
258
+ - `lineNameHits(list, line, place)` and `nameMatches(line, names)` give each name of a line, one hit for each name. A scan that counts the names uses them. The gate takes the first hit.
259
+ - `privateNamesFile(env, git)`, `privatePatterns(env)` and `invalidPatternBreaks(patterns)` read the settings and the patterns.
260
+ - `prePush(options, io)` is the command `pre-push`, and `installHook(options, io)` is the command `hook install`. `PRE_PUSH_HOOK` is the text of the hook.
package/build/cli.js CHANGED
@@ -1,12 +1,16 @@
1
1
  #!/usr/bin/env node
2
- import { c as runCli } from "./run-DWyPhbeH.js";
2
+ import { c as runCli } from "./run-DjrYJDna.js";
3
+ import { readFileSync } from "node:fs";
3
4
  // src/cli.ts
4
5
  try {
5
- process.exitCode = runCli(process.argv.slice(2), {
6
+ const args = process.argv.slice(2);
7
+ const stdin = args[0] === "pre-push" && process.stdin.isTTY !== true ? readFileSync(0, "utf8") : void 0;
8
+ process.exitCode = runCli(args, {
6
9
  cwd: process.cwd(),
7
10
  env: process.env,
8
11
  stdout: (text) => process.stdout.write(text),
9
- stderr: (text) => process.stderr.write(text)
12
+ stderr: (text) => process.stderr.write(text),
13
+ ...stdin === void 0 ? {} : { stdin }
10
14
  });
11
15
  } catch (error) {
12
16
  process.stderr.write(`conventions: ${error instanceof Error ? error.stack ?? error.message : String(error)}\n`);
package/build/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\n// The bin `conventions`. The work is in run.ts, so a test can start the same CLI in a fixture folder.\nimport { runCli } from \"./run.ts\";\n\ntry {\n process.exitCode = runCli(process.argv.slice(2), {\n cwd: process.cwd(),\n env: process.env,\n stdout: (text) => process.stdout.write(text),\n stderr: (text) => process.stderr.write(text),\n });\n} catch (error) {\n process.stderr.write(`conventions: ${error instanceof Error ? (error.stack ?? error.message) : String(error)}\\n`);\n process.exitCode = 1;\n}\n"],"mappings":";;;AAIA,IAAI;CACF,QAAQ,WAAW,OAAO,QAAQ,KAAK,MAAM,CAAC,GAAG;EAC/C,KAAK,QAAQ,IAAI;EACjB,KAAK,QAAQ;EACb,SAAS,SAAS,QAAQ,OAAO,MAAM,IAAI;EAC3C,SAAS,SAAS,QAAQ,OAAO,MAAM,IAAI;CAC7C,CAAC;AACH,SAAS,OAAO;CACd,QAAQ,OAAO,MAAM,gBAAgB,iBAAiB,QAAS,MAAM,SAAS,MAAM,UAAW,OAAO,KAAK,EAAE,GAAG;CAChH,QAAQ,WAAW;AACrB"}
1
+ {"version":3,"file":"cli.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\n// The bin `conventions`. The work is in run.ts, so a test can start the same CLI in a fixture folder.\nimport { readFileSync } from \"node:fs\";\nimport { runCli } from \"./run.ts\";\n\ntry {\n const args = process.argv.slice(2);\n // Only the git hook pre-push gives a standard input: the refs of the push. A terminal gives none\n const stdin = args[0] === \"pre-push\" && process.stdin.isTTY !== true ? readFileSync(0, \"utf8\") : undefined;\n process.exitCode = runCli(args, {\n cwd: process.cwd(),\n env: process.env,\n stdout: (text) => process.stdout.write(text),\n stderr: (text) => process.stderr.write(text),\n ...(stdin === undefined ? {} : { stdin }),\n });\n} catch (error) {\n process.stderr.write(`conventions: ${error instanceof Error ? (error.stack ?? error.message) : String(error)}\\n`);\n process.exitCode = 1;\n}\n"],"mappings":";;;;AAKA,IAAI;CACF,MAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;CAEjC,MAAM,QAAQ,KAAK,OAAO,cAAc,QAAQ,MAAM,UAAU,OAAO,aAAa,GAAG,MAAM,IAAI,KAAA;CACjG,QAAQ,WAAW,OAAO,MAAM;EAC9B,KAAK,QAAQ,IAAI;EACjB,KAAK,QAAQ;EACb,SAAS,SAAS,QAAQ,OAAO,MAAM,IAAI;EAC3C,SAAS,SAAS,QAAQ,OAAO,MAAM,IAAI;EAC3C,GAAI,UAAU,KAAA,IAAY,CAAC,IAAI,EAAE,MAAM;CACzC,CAAC;AACH,SAAS,OAAO;CACd,QAAQ,OAAO,MAAM,gBAAgB,iBAAiB,QAAS,MAAM,SAAS,MAAM,UAAW,OAAO,KAAK,EAAE,GAAG;CAChH,QAAQ,WAAW;AACrB"}
package/build/index.d.ts CHANGED
@@ -300,10 +300,182 @@ export declare const REAL_COMPARE = "process.argv[1] !== undefined && realpathSy
300
300
  export declare function hasImportMetaMain(range: unknown): boolean;
301
301
  export declare const mainCheck: Rule;
302
302
  export declare const noBuildOutput: Rule;
303
+ /**
304
+ * The private name list: a JSON file outside of the public repositories, with the names of private projects. The file
305
+ * `schema/private-names.schema.json` tells its form. This module parses the list and finds its names in a line or in a
306
+ * path. It has no input or output.
307
+ *
308
+ * A result tells the place of a name by its index in the list, for example `name 3 of the private name list`. A result
309
+ * does not show the text, the id, the project or a pattern, because the id of a name is the private name.
310
+ */
311
+ /** The name of the private name list in a break and in an error. A break does not show the path of the file. */
312
+ export declare const PRIVATE_NAME_LIST = "the private name list";
313
+ /** One name of the private name list. */
314
+ interface NameRule {
315
+ /** The short name of the entry. An entry of `allow` refers to it. The check does not show it. */
316
+ readonly id: string;
317
+ /** The private project of the name, as a note for persons. The check does not read it. */
318
+ readonly project: string;
319
+ /**
320
+ * The fixed texts of the name, with case. A line that has no seed of the list is no hit. A seed is a fast filter, so
321
+ * each text that a pattern or the word finds must contain a seed.
322
+ */
323
+ readonly seeds: readonly string[];
324
+ /** The regular expressions of the name, with no flags. A match in a line or in a path is a hit. */
325
+ readonly patterns: readonly string[];
326
+ /**
327
+ * A word that is also a common word. A match of the whole word is a hit only in a sentence about the project.
328
+ * The word in code, in a title or before a noun is no hit.
329
+ */
330
+ readonly word?: string;
331
+ /** The lower-case words that make the word a common word when they come next, for example `corp` after `Acme`. */
332
+ readonly commonAfter?: readonly string[];
333
+ }
334
+ /** A hit that a person examined and permitted: the name `name` in the file `path` of the repository `repo`. */
335
+ interface AllowedHit {
336
+ /** The name of the repository, with no owner. A value `owner/name` is also correct. Case is not significant. */
337
+ readonly repo: string;
338
+ /** The path of the file from the root of the repository, with `/`. */
339
+ readonly path: string;
340
+ /** The id of the permitted name. With no id, each name of the list is permitted in the file. */
341
+ readonly name?: string;
342
+ /** The reason of the person. */
343
+ readonly why: string;
344
+ }
345
+ /** The private name list after a parse. */
346
+ interface PrivateNameList {
347
+ readonly names: readonly NameRule[];
348
+ readonly allow: readonly AllowedHit[];
349
+ }
350
+ /** A name of the list that a line or a path has. */
351
+ interface NameHit {
352
+ /** The index of the name in the list, from 1. */
353
+ readonly name: number;
354
+ /** The entry of the name. A break does not show it. */
355
+ readonly rule: NameRule;
356
+ /** The position of the match in the text, from 0. */
357
+ readonly index: number;
358
+ }
359
+ /** The place of a line: the repository and the path of its file. The list `allow` applies only to a line with a place. */
360
+ interface LinePlace {
361
+ /** The repository: `owner/name` or `name`. */
362
+ readonly repo?: string;
363
+ /** The path of the file from the root of the repository. */
364
+ readonly path?: string;
365
+ }
366
+ /**
367
+ * This error tells that a private name list is not valid. Its reason names a field by the index of its entry, and
368
+ * does not show a value of the list.
369
+ */
370
+ export declare class PrivateNameListError extends Error {
371
+ /** The reason, for example `name 3 of the private name list: the field seeds has no text`. */
372
+ readonly reason: string;
373
+ constructor(reason: string);
374
+ }
375
+ /**
376
+ * This function parses the text of a private name list, and checks it against the schema. It also checks each regular
377
+ * expression and the ids. It throws a `PrivateNameListError` when the text is not valid. The error shows no value of the text.
378
+ */
379
+ export declare function parsePrivateNames(text: string): PrivateNameList;
380
+ /**
381
+ * This function tells if the word of `rule` at `index` of `line` is a common word or code, and not the name of the
382
+ * project. Code is a type, a key or a part of a path. A common word comes after an article, in a title or before a noun.
383
+ */
384
+ export declare function isCommonUse(line: string, index: number, rule: NameRule): boolean;
385
+ /**
386
+ * This function gives the first name of `names` in `line`, or undefined. For each name in sequence, a pattern match is
387
+ * a hit. A match of the word is a hit when `isCommonUse` is false. It does not use the seeds or the list `allow`.
388
+ */
389
+ export declare function firstNameMatch(line: string, names: readonly NameRule[]): NameHit | undefined;
390
+ /**
391
+ * This function gives each name of `names` in `line`, in the sequence of the list. Each name gives one hit at most: its
392
+ * first pattern match, or else its first word match that is not a common use.
393
+ */
394
+ export declare function nameMatches(line: string, names: readonly NameRule[]): NameHit[];
395
+ /**
396
+ * This function tells if the list `allow` permits the name `id` in the file `path` of the repository `repo`. An entry
397
+ * with the repository `name` or `owner/name` matches the repository `owner/name`. Case of a repository is not significant.
398
+ */
399
+ export declare function isAllowedHit(allow: readonly AllowedHit[], repo: string, path: string, id: string): boolean;
400
+ /**
401
+ * This function gives each name of the list in one line of a file or of a message, in the sequence of the list. The line
402
+ * must have a seed of the list. Each name gives one hit at most. A permitted hit at the place does not count.
403
+ */
404
+ export declare function lineNameHits(list: PrivateNameList, line: string, place?: LinePlace): NameHit[];
405
+ /**
406
+ * This function gives the first name of the list in one line of a file or of a message, or undefined. It is the first
407
+ * hit of `lineNameHits`, so a permitted hit does not hide a hit of another name.
408
+ */
409
+ export declare function lineNameHit(list: PrivateNameList, line: string, place?: LinePlace): NameHit | undefined;
410
+ /**
411
+ * This function gives the first name of the list whose pattern matches a path of a file, or undefined. Only the patterns
412
+ * apply, because a path has no sentence. The seeds and the list `allow` do not apply.
413
+ */
414
+ export declare function pathNameHit(list: PrivateNameList, path: string): NameHit | undefined;
303
415
  /** The names in a home path that do not identify a person: CI users, container users and placeholders. */
304
416
  export declare const DEFAULT_ALLOWED: readonly string[];
305
417
  /** The forms of a home folder: Windows, macOS and Linux. The group `user` is the name of the user. */
306
418
  export declare const HOME_PATTERNS: readonly RegExp[];
419
+ /** The name of the environment variable of the private patterns. */
420
+ export declare const PRIVATE_PATTERNS_VARIABLE = "CONVENTIONS_PRIVATE_PATTERNS";
421
+ /** The name of the environment variable of the path of the private name list. */
422
+ export declare const PRIVATE_NAMES_FILE_VARIABLE = "CONVENTIONS_PRIVATE_NAMES_FILE";
423
+ /** The key of the git configuration of the path of the private name list. */
424
+ export declare const PRIVATE_NAMES_FILE_CONFIG = "conventions.privateNamesFile";
425
+ /** A private pattern: one line of the environment variable `CONVENTIONS_PRIVATE_PATTERNS`. */
426
+ interface PrivatePattern {
427
+ /** The regular expression, as text. The check uses it with the flag `g`, and case is significant. */
428
+ readonly source: string;
429
+ /** The line of the pattern in its source, from 1. */
430
+ readonly line: number;
431
+ /** The name of the source in a break: `CONVENTIONS_PRIVATE_PATTERNS`. */
432
+ readonly label: string;
433
+ }
434
+ /** The private sources of a check. A break of a private source does not show the text or the source. */
435
+ interface PrivateSources {
436
+ /** The private name list, from `parsePrivateNames`. */
437
+ readonly names?: PrivateNameList;
438
+ /** The private patterns, from `privatePatterns`. */
439
+ readonly patterns?: readonly PrivatePattern[];
440
+ }
441
+ /** The options of `privateTextBreaks`. */
442
+ interface TextBreakOptions {
443
+ /** More user names that do not identify a person, after `DEFAULT_ALLOWED`. */
444
+ readonly allow?: readonly string[];
445
+ /** Public regular expressions, from the option `patterns`. A break of a public pattern shows the text. */
446
+ readonly patterns?: readonly string[];
447
+ /**
448
+ * The value `true` tells that the text is the root `package.json`. Then the reason of an exception can quote a home
449
+ * folder, and the line that names a public pattern is no break. A private pattern still counts there.
450
+ */
451
+ readonly rootPackage?: boolean;
452
+ /** The value `false` turns off the breaks of home folders. The default is `true`. */
453
+ readonly homes?: boolean;
454
+ /** The line of the first line of the text, from 1. The default is 1. */
455
+ readonly firstLine?: number;
456
+ /** The repository of the text, `owner/name`. The list `allow` of the private name list uses it. */
457
+ readonly repo?: string;
458
+ /** The path of the file of the text, from the root of the repository. The list `allow` of the private name list uses it. */
459
+ readonly path?: string;
460
+ /** The value `true` tells that the text is a path of a file. Then only the patterns of the private name list apply. */
461
+ readonly isPath?: boolean;
462
+ }
463
+ /** This function gives the private patterns of the environment variable, with the line of each (from 1). */
464
+ export declare function privatePatterns(env: Readonly<Record<string, string | undefined>>): PrivatePattern[];
465
+ /**
466
+ * This function gives the path of the private name list: the environment variable `CONVENTIONS_PRIVATE_NAMES_FILE`,
467
+ * else the git configuration `conventions.privateNamesFile`. It gives undefined when neither has a value.
468
+ */
469
+ export declare function privateNamesFile(env: Readonly<Record<string, string | undefined>>, git: (args: readonly string[]) => string | undefined): string | undefined;
470
+ /** This function gives a break for each private pattern that is not a valid regular expression. A break does not show the pattern. */
471
+ export declare function invalidPatternBreaks(patterns: readonly PrivatePattern[]): Break[];
472
+ /**
473
+ * This function gives the breaks of one text: a file, a commit message or the body of a pull request. Each break has the
474
+ * file `name`. A break of a private source does not show the text, the name or the pattern. A line has one break or no
475
+ * break of the private name list. The breaks of home folders use `HOME_PATTERNS` and the permitted names. A private pattern
476
+ * that is not valid gives no break here: refer to `invalidPatternBreaks`.
477
+ */
478
+ export declare function privateTextBreaks(name: string, text: string, privates: PrivateSources, options?: TextBreakOptions): Break[];
307
479
  export declare const noLocalPaths: Rule;
308
480
  export declare const apiReportScript: Rule;
309
481
  export declare const pagesAfterRelease: Rule;
@@ -444,48 +616,6 @@ export declare const workflowParses: Rule;
444
616
  export declare const workspaceProtocol: Rule;
445
617
  /** Each rule of the check. */
446
618
  export declare const RULES: readonly Rule[];
447
- /** The names of the values that each home package exports, with the version that the names come from. */
448
- export declare const HOME_EXPORTS: Readonly<Record<string, {
449
- readonly version: string;
450
- readonly names: readonly string[];
451
- }>>;
452
- interface WorkflowInput {
453
- readonly name: string;
454
- readonly type: string;
455
- readonly description: string;
456
- /** The default value, as YAML text. An empty text is no default. */
457
- readonly default: string;
458
- readonly required: boolean;
459
- }
460
- /** A step of a job. */
461
- interface WorkflowStep {
462
- /** The name of the step, or else its action, its id or its first command. */
463
- readonly label: string;
464
- /** The condition of the step (`if`), or an empty text. */
465
- readonly if: string;
466
- /** The action of the step (`uses`), with no pin, or an empty text. */
467
- readonly uses: string;
468
- }
469
- /** A job of a workflow. */
470
- interface WorkflowJob {
471
- readonly id: string;
472
- readonly if: string;
473
- readonly needs: readonly string[];
474
- readonly steps: readonly WorkflowStep[];
475
- }
476
- /** A shared workflow of the repository. */
477
- interface Workflow {
478
- /** The file name, for example `reusable-pages.yml`. */
479
- readonly file: string;
480
- /** The value of `name`. */
481
- readonly name: string;
482
- /** The first lines of the comment at the top of the file. */
483
- readonly summary: string;
484
- readonly inputs: readonly WorkflowInput[];
485
- readonly jobs: readonly WorkflowJob[];
486
- }
487
- /** This function reads a shared workflow file. The file name goes into the result. */
488
- export declare function readWorkflow(file: string, text: string): Workflow;
489
619
  /** The result of one rule. */
490
620
  interface RuleResult {
491
621
  readonly id: string;
@@ -552,11 +682,100 @@ interface CliIo {
552
682
  readonly env: Readonly<Record<string, string | undefined>>;
553
683
  readonly stdout: (text: string) => void;
554
684
  readonly stderr: (text: string) => void;
685
+ /** The standard input. The bin reads it only for the command `pre-push`, which reads the refs of the push from git. */
686
+ readonly stdin?: string;
555
687
  }
556
688
  /** The help text of the bin. */
557
689
  export declare const USAGE: string;
558
690
  /** This function starts the bin with the arguments `args`, and gives its exit code. */
559
691
  export declare function runCli(args: readonly string[], io: CliIo): number;
692
+ /** The line of `conventions pre-push` when no setting names a private name list and no environment variable has a pattern. */
693
+ export declare const NO_READ_LINE: string;
694
+ /** The options of `prePush`. */
695
+ interface PrePushOptions {
696
+ /** The name of the remote: the first argument of the hook. */
697
+ readonly remote: string;
698
+ /**
699
+ * The URL of the remote: the second argument of the hook. The list `allow` of the private name list uses its repository.
700
+ * With no URL, the command asks `git remote get-url`.
701
+ */
702
+ readonly url?: string;
703
+ /** The standard input of the hook: a line `<local ref> <local sha> <remote ref> <remote sha>` for each ref of the push. */
704
+ readonly input: string;
705
+ readonly env: Readonly<Record<string, string | undefined>>;
706
+ /** The root of the working tree. A relative path of the private name list starts at the root. */
707
+ readonly root: string;
708
+ /** This function starts git in the root, and gives its output, or undefined when git fails. */
709
+ readonly git: (args: readonly string[]) => string | undefined;
710
+ /** This function reads a file as text. The default reads it with `node:fs`. */
711
+ readonly readFile?: (path: string) => string;
712
+ }
713
+ /**
714
+ * This function is the command `conventions pre-push`. It examines each new commit of the push: its message, the paths
715
+ * that it adds or changes, and each line that it adds. It writes the breaks to `stderr`, and gives the exit code: 1 on a
716
+ * break, 0 on a pass. With no private name list and no private pattern, it writes the line `NO_READ_LINE` and gives 0.
717
+ */
718
+ export declare function prePush(options: PrePushOptions, io: Pick<CliIo, "stderr">): number;
719
+ /** The marker line of the hook that `conventions hook install` writes. The command rewrites only a hook with this line. */
720
+ export declare const HOOK_MARKER = "# conventions hook: pre-push";
721
+ /** The text of the hook `pre-push` that `conventions hook install` writes: a POSIX shell script. */
722
+ export declare const PRE_PUSH_HOOK: string;
723
+ /** The options of `installHook`. */
724
+ interface HookOptions {
725
+ /** The folder of the command. A relative hooks folder of git starts here. */
726
+ readonly cwd: string;
727
+ readonly env: Readonly<Record<string, string | undefined>>;
728
+ /** This function starts git in `cwd`, and gives its output, or undefined when git fails. */
729
+ readonly git: (args: readonly string[]) => string | undefined;
730
+ }
731
+ /**
732
+ * This function is the command `conventions hook install`. It writes the hook `pre-push` into the hooks folder of git,
733
+ * so it uses the folder of `core.hooksPath` and works in a worktree. It keeps a hook that does not have `HOOK_MARKER`, and writes a warning.
734
+ * In CI or outside a git repository, it writes one line and does nothing.
735
+ */
736
+ export declare function installHook(options: HookOptions, io: Pick<CliIo, "stdout" | "stderr">): number;
737
+ /** The names of the values that each home package exports, with the version that the names come from. */
738
+ export declare const HOME_EXPORTS: Readonly<Record<string, {
739
+ readonly version: string;
740
+ readonly names: readonly string[];
741
+ }>>;
742
+ interface WorkflowInput {
743
+ readonly name: string;
744
+ readonly type: string;
745
+ readonly description: string;
746
+ /** The default value, as YAML text. An empty text is no default. */
747
+ readonly default: string;
748
+ readonly required: boolean;
749
+ }
750
+ /** A step of a job. */
751
+ interface WorkflowStep {
752
+ /** The name of the step, or else its action, its id or its first command. */
753
+ readonly label: string;
754
+ /** The condition of the step (`if`), or an empty text. */
755
+ readonly if: string;
756
+ /** The action of the step (`uses`), with no pin, or an empty text. */
757
+ readonly uses: string;
758
+ }
759
+ /** A job of a workflow. */
760
+ interface WorkflowJob {
761
+ readonly id: string;
762
+ readonly if: string;
763
+ readonly needs: readonly string[];
764
+ readonly steps: readonly WorkflowStep[];
765
+ }
766
+ /** A shared workflow of the repository. */
767
+ interface Workflow {
768
+ /** The file name, for example `reusable-pages.yml`. */
769
+ readonly file: string;
770
+ /** The value of `name`. */
771
+ readonly name: string;
772
+ /** The first lines of the comment at the top of the file. */
773
+ readonly summary: string;
774
+ readonly inputs: readonly WorkflowInput[];
775
+ readonly jobs: readonly WorkflowJob[];
776
+ }
777
+ /** This function reads a shared workflow file. The file name goes into the result. */
778
+ export declare function readWorkflow(file: string, text: string): Workflow;
560
779
  /**
561
780
  * The rule for the git tag and the text of a GitHub release of a package version.
562
781
  *
@@ -606,5 +825,5 @@ export declare function workspaceGlobs(root: string): string[] | undefined;
606
825
  * The result has absolute paths, in the order of the code units.
607
826
  */
608
827
  export declare function packageFolders(root: string, globs?: readonly string[] | undefined): string[];
609
- export type { AuditSource, Break, CheckOptions, CheckResult, CliIo, ConventionsConfig, Edit, FixResult, Home, HomeAnswer, HomeFetch, HomeState, Manifest, Minor, OptionSpec, OptionValue, Options, PackageInfo, PagesCall, PathFilter, RegistryAnswer, RegistryLookup, Rule, RuleConfig, RuleContext, RuleOutcome, RuleResult, SecurityCaller, Workflow, WorkflowInput, WorkflowJob, WorkflowStep, YamlFault };
828
+ export type { AllowedHit, AuditSource, Break, CheckOptions, CheckResult, CliIo, ConventionsConfig, Edit, FixResult, Home, HomeAnswer, HomeFetch, HomeState, HookOptions, LinePlace, Manifest, Minor, NameHit, NameRule, OptionSpec, OptionValue, Options, PackageInfo, PagesCall, PathFilter, PrePushOptions, PrivateNameList, PrivatePattern, PrivateSources, RegistryAnswer, RegistryLookup, Rule, RuleConfig, RuleContext, RuleOutcome, RuleResult, SecurityCaller, TextBreakOptions, Workflow, WorkflowInput, WorkflowJob, WorkflowStep, YamlFault };
610
829
  //# sourceMappingURL=index.d.ts.map
@@ -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/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/rules/no-local-paths.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/home-exports.ts","../src/workflow.ts","../src/run.ts","../src/release-text.ts","../src/workspace.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,SAA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,iBAAgB;;UAkBhE;WACN;WACA,KAAK,SAAS;WACd,SAAS;WACT,SAAS;;;qBAIP;;wBA6CG,OAAO,yBAAyB,IAAI;;;;;;;;qBCrUvC;;wBAGG,QAAQ,cAAc,iBAAiB;;;;;;;;wBAavC,iBAAiB,kBAAkB,iBAAiB;;wBA+BpD,OAAO,cAAc;;;;;wBAQrB,aAAa,cAAc,iBAAiB;;;;;;wBCzC5C,aAAa,eAAe;;;;;wBAsD5B,YAAY,cAAc;;;;;;wBA8B1B,eAAe;;;;;;;wBAwCf,eAAe,cAAc"}
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/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/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","../src/workspace.ts"],"mappings":";UASiB;WACN;WACA;WACA;;;UAIM;;WAEN;;WAEA;WACA;;WAEA;;WAEA,iBAAiB;;;;;;UAOX;;WAEN;;WAEA;;WAEA;;;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;WACA;WACA;;WAEA;WACA;;;UAIM;;WAEN;;WAEA;;WAEA;;;UAIM;WACN;WACA;WACA;WACA,gBAAgB;;;UAIV;;WAEN;;WAEA;;WAEA;WACA,iBAAiB;WACjB,eAAe;;;wBAgGV,aAAa,cAAc,eAAe;;;;;;;;qBC3M7C;;wBAGG,QAAQ,cAAc,iBAAiB;;;;;;;;wBAavC,iBAAiB,kBAAkB,iBAAiB;;wBA+BpD,OAAO,cAAc;;;;;wBAQrB,aAAa,cAAc,iBAAiB;;;;;;wBCzC5C,aAAa,eAAe;;;;;wBAsD5B,YAAY,cAAc;;;;;;wBA8B1B,eAAe;;;;;;;wBAwCf,eAAe,cAAc"}
package/build/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as pagesAfterRelease, $t as prPathFilters, A as HOME_TIMEOUT_MS, At as mapText, B as publishedMinor, Bt as SHARED_CI, C as configsOfScript, Cn as parseConfig, Ct as messageOf, D as isSourcePath, Dt as MAP_RULE, E as testsRequired, Et as HOMES, F as roadmapParses, Ft as runCalls, G as UNSHIPPED_FILES, Gt as SECURITY_SCAN_INPUTS, H as reachOf, Ht as callsSharedCi, I as requiredScripts, It as serviceRunMain, J as unreleasedChangeRule, Jt as securityOneJob, K as npmLookup, Kt as SECURITY_TIMEOUT_MINUTES, L as releaseFiles, Lt as hasTests, M as githubFetch, Mt as readOverlay, N as sharedDocsRule, Nt as HOME_EXPORTS, O as pathsOf, Ot as findHomes, P as roadmapOfLine, Pt as SERVICE_PACKAGE, Q as pinnedGitDeps, Qt as gateTrigger, R as lockedVersions, Rt as tsconfigTest, S as typedScripts, Sn as defaultOptions, St as homePackage, T as typedFiles, Tt as signaturesOf, U as NPM_REGISTRY, Ut as sharedCi, V as publishedMinorRule, Vt as SHARED_WORKFLOWS, W as SHIPPED_FIELDS, Wt as SECURITY_SCAN_COMMIT, X as isGitSpecifier, Xt as ACTIONS_COMMIT, Y as pipeFails, Yt as withOneJob, Z as isPinned, Zt as convertGate, _ as setVersions, _n as specifiersOf, _t as licenseFile, a as listRules, an as DEPENDENCY_FIELDS, at as pagesCalls, b as TRAIN_SCOPES, bn as packageFolders, bt as repositoryIsPublic, c as runCli, cn as hasFile, ct as DEFAULT_ALLOWED, d as RULES, dn as lineOf, dt as noBuildOutput, en as summaryName, et as repositoryOfRemote, f as workspaceProtocol, fn as matchesAny, ft as REAL_COMPARE, g as namedVersions, gn as runGit, gt as authorOf, h as yamlFaults, hn as replaceLine, ht as LICENSE_TEXTS, i as formatResult, in as cuePreset, it as PAGES_WORKFLOWS, j as blockHash, jt as mergeHomes, k as sourceMain, kt as mapMarkdown, l as runFix, ln as inFolder, lt as HOME_PATTERNS, m as workflowParses, mn as readJsonc, mt as mainCheck, n as annotations, nn as readWorkflow, nt as scheduleMinute, o as readConfig, on as cleanPath, ot as pagesSite, p as GITHUB_YAML, pn as parseJsonc, pt as hasImportMetaMain, q as unreleasedChange, qt as securityCallers, r as createContext, rn as STRICT_OPTIONS, rt as pushMainOnly, s as runChecks, sn as codePackages, st as apiReportScript, t as USAGE, tn as gateAfterCancel, tt as runnerBudget, u as summaryMarkdown, un as keyLine, ut as noLocalPaths, v as versionTitle, vn as globFolders, vt as licenseFileOf, w as scriptsOf, wt as repoOf, x as trustPolicy, xn as workspaceGlobs, xt as declaredName, y as IGNORE_AFTER, yn as globToRegExp, yt as mitText, z as minorOf, zt as SHARED_ACTIONS } from "./run-DWyPhbeH.js";
1
+ import { $ as unreleasedChangeRule, $t as mergeHomes, A as typedFiles, An as hasFile, At as nameMatches, B as roadmapParses, Bn as globFolders, Bt as licenseFileOf, C as versionTitle, Cn as gateAfterCancel, Ct as PRIVATE_NAME_LIST, D as typedScripts, Dn as DEPENDENCY_FIELDS, Dt as isCommonUse, E as trustPolicy, En as cuePreset, Et as isAllowedHit, F as HOME_TIMEOUT_MS, Fn as parseJsonc, Ft as hasImportMetaMain, G as publishedMinor, Gn as parseConfig, Gt as messageOf, H as releaseFiles, Hn as packageFolders, Ht as repositoryIsPublic, I as blockHash, In as readJsonc, It as mainCheck, J as NPM_REGISTRY, Jt as HOMES, K as publishedMinorRule, Kt as repoOf, L as githubFetch, Ln as replaceLine, Lt as LICENSE_TEXTS, M as isSourcePath, Mn as keyLine, Mt as pathNameHit, N as pathsOf, Nn as lineOf, Nt as noBuildOutput, O as configsOfScript, On as cleanPath, Ot as lineNameHit, P as sourceMain, Pn as matchesAny, Pt as REAL_COMPARE, Q as unreleasedChange, Qt as mapText, R as sharedDocsRule, Rn as runGit, Rt as authorOf, S as setVersions, Sn as summaryName, St as privateTextBreaks, T as TRAIN_SCOPES, Tn as STRICT_OPTIONS, Tt as firstNameMatch, U as lockedVersions, Un as workspaceGlobs, Ut as declaredName, V as requiredScripts, Vn as globToRegExp, Vt as mitText, W as minorOf, Wn as defaultOptions, Wt as homePackage, X as UNSHIPPED_FILES, Xt as findHomes, Y as SHIPPED_FIELDS, Yt as MAP_RULE, Z as npmLookup, Zt as mapMarkdown, _ as workspaceProtocol, _n as withOneJob, _t as PRIVATE_PATTERNS_VARIABLE, a as listRules, an as hasTests, at as repositoryOfRemote, b as yamlFaults, bn as gateTrigger, bt as privateNamesFile, c as runCli, cn as SHARED_CI, ct as pushMainOnly, d as HOOK_MARKER, dn as sharedCi, dt as pagesSite, en as readOverlay, et as pipeFails, f as NO_READ_LINE, fn as SECURITY_SCAN_COMMIT, ft as apiReportScript, g as RULES, gn as securityOneJob, gt as PRIVATE_NAMES_FILE_VARIABLE, h as prePush, hn as securityCallers, ht as PRIVATE_NAMES_FILE_CONFIG, i as formatResult, in as serviceRunMain, it as pagesAfterRelease, j as testsRequired, jn as inFolder, jt as parsePrivateNames, k as scriptsOf, kn as codePackages, kt as lineNameHits, l as runFix, ln as SHARED_WORKFLOWS, lt as PAGES_WORKFLOWS, m as installHook, mn as SECURITY_TIMEOUT_MINUTES, mt as HOME_PATTERNS, n as annotations, nn as SERVICE_PACKAGE, nt as isPinned, o as readConfig, on as tsconfigTest, ot as runnerBudget, p as PRE_PUSH_HOOK, pn as SECURITY_SCAN_INPUTS, pt as DEFAULT_ALLOWED, q as reachOf, qt as signaturesOf, r as createContext, rn as runCalls, rt as pinnedGitDeps, s as runChecks, sn as SHARED_ACTIONS, st as scheduleMinute, t as USAGE, tn as HOME_EXPORTS, tt as isGitSpecifier, u as summaryMarkdown, un as callsSharedCi, ut as pagesCalls, v as GITHUB_YAML, vn as ACTIONS_COMMIT, vt as invalidPatternBreaks, w as IGNORE_AFTER, wn as readWorkflow, wt as PrivateNameListError, x as namedVersions, xn as prPathFilters, xt as privatePatterns, y as workflowParses, yn as convertGate, yt as noLocalPaths, z as roadmapOfLine, zn as specifiersOf, zt as licenseFile } from "./run-DjrYJDna.js";
2
2
  // src/release-text.ts
3
3
  /**
4
4
  * The rule for the git tag and the text of a GitHub release of a package version.
@@ -64,6 +64,6 @@ function releaseNotes(name, version, changelog) {
64
64
  if (section.length <= 1e5) return section;
65
65
  return `${section.slice(0, MAX_NOTES)}\n\n(The CHANGELOG.md of \`${name}\` has the full text.)`;
66
66
  }
67
- export { ACTIONS_COMMIT, DEFAULT_ALLOWED, DEPENDENCY_FIELDS, GITHUB_YAML, HOMES, HOME_EXPORTS, HOME_PATTERNS, HOME_TIMEOUT_MS, IGNORE_AFTER, LICENSE_TEXTS, MAP_RULE, MAX_NOTES, NPM_REGISTRY, PAGES_WORKFLOWS, REAL_COMPARE, RULES, 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, formatResult, gateAfterCancel, gateTrigger, githubFetch, globFolders, globToRegExp, hasFile, hasImportMetaMain, hasTests, homePackage, inFolder, isGitSpecifier, isPinned, isSourcePath, keyLine, licenseFile, licenseFileOf, lineOf, listRules, lockedVersions, mainCheck, mapMarkdown, mapText, matchesAny, mergeHomes, messageOf, minorOf, mitText, namedVersions, noBuildOutput, noLocalPaths, npmLookup, npmUrl, packageFolders, pagesAfterRelease, pagesCalls, pagesSite, parseConfig, parseJsonc, pathsOf, pinnedGitDeps, pipeFails, prPathFilters, publishedMinor, publishedMinorRule, pushMainOnly, reachOf, 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, sharedCi, sharedDocsRule, signaturesOf, sourceMain, specifiersOf, summaryMarkdown, summaryName, tagName, testsRequired, trustPolicy, tsconfigTest, typedFiles, typedScripts, unreleasedChange, unreleasedChangeRule, versionTitle, withOneJob, workflowParses, workspaceGlobs, workspaceProtocol, yamlFaults };
67
+ 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, 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, packageFolders, pagesAfterRelease, pagesCalls, pagesSite, parseConfig, parseJsonc, parsePrivateNames, pathNameHit, pathsOf, pinnedGitDeps, pipeFails, prPathFilters, prePush, privateNamesFile, privatePatterns, privateTextBreaks, publishedMinor, publishedMinorRule, pushMainOnly, reachOf, 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, sharedCi, sharedDocsRule, signaturesOf, sourceMain, specifiersOf, summaryMarkdown, summaryName, tagName, testsRequired, trustPolicy, tsconfigTest, typedFiles, typedScripts, unreleasedChange, unreleasedChangeRule, versionTitle, withOneJob, workflowParses, workspaceGlobs, workspaceProtocol, yamlFaults };
68
68
 
69
69
  //# sourceMappingURL=index.js.map