ddd-ts-kit 0.27.0 → 0.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +129 -0
- package/README.fr.md +59 -13
- package/README.md +53 -12
- package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
- package/dist/check/catalogue/architecture-rules.js +4 -0
- package/dist/check/catalogue/architecture-rules.js.map +1 -1
- package/dist/check/catalogue/default-severities.d.ts.map +1 -1
- package/dist/check/catalogue/default-severities.js +2 -0
- package/dist/check/catalogue/default-severities.js.map +1 -1
- package/dist/check/commands/check-command.d.ts.map +1 -1
- package/dist/check/commands/check-command.js +4 -1
- package/dist/check/commands/check-command.js.map +1 -1
- package/dist/check/commands/explain-command.d.ts.map +1 -1
- package/dist/check/commands/explain-command.js +2 -9
- package/dist/check/commands/explain-command.js.map +1 -1
- package/dist/check/engine/format-check.d.ts +6 -1
- package/dist/check/engine/format-check.d.ts.map +1 -1
- package/dist/check/engine/format-check.js +33 -11
- package/dist/check/engine/format-check.js.map +1 -1
- package/dist/check/explain/documented-rule.d.ts +8 -0
- package/dist/check/explain/documented-rule.d.ts.map +1 -0
- package/dist/check/explain/documented-rule.js +14 -0
- package/dist/check/explain/documented-rule.js.map +1 -0
- package/dist/check/explain/explanations-of.d.ts +5 -0
- package/dist/check/explain/explanations-of.d.ts.map +1 -0
- package/dist/check/explain/explanations-of.js +16 -0
- package/dist/check/explain/explanations-of.js.map +1 -0
- package/dist/check/explain/persistence-docs.d.ts.map +1 -1
- package/dist/check/explain/persistence-docs.js +7 -0
- package/dist/check/explain/persistence-docs.js.map +1 -1
- package/dist/check/explain/wiring-docs.d.ts.map +1 -1
- package/dist/check/explain/wiring-docs.js +13 -0
- package/dist/check/explain/wiring-docs.js.map +1 -1
- package/dist/check/fixtures/declarations-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/declarations-fixtures.js +78 -1
- package/dist/check/fixtures/declarations-fixtures.js.map +1 -1
- package/dist/check/fixtures/persistence-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/persistence-fixtures.js +25 -0
- package/dist/check/fixtures/persistence-fixtures.js.map +1 -1
- package/dist/check/model/rule-explanation.d.ts +10 -0
- package/dist/check/model/rule-explanation.d.ts.map +1 -0
- package/dist/check/model/rule-explanation.js +2 -0
- package/dist/check/model/rule-explanation.js.map +1 -0
- package/dist/check/rules/declarations-port-adapter-wired.d.ts +3 -0
- package/dist/check/rules/declarations-port-adapter-wired.d.ts.map +1 -0
- package/dist/check/rules/declarations-port-adapter-wired.js +104 -0
- package/dist/check/rules/declarations-port-adapter-wired.js.map +1 -0
- package/dist/check/rules/persistence-primary-key-order.d.ts +3 -0
- package/dist/check/rules/persistence-primary-key-order.d.ts.map +1 -0
- package/dist/check/rules/persistence-primary-key-order.js +31 -0
- package/dist/check/rules/persistence-primary-key-order.js.map +1 -0
- package/dist/commands/doctor.d.ts +4 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +20 -4
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/lint.d.ts +7 -0
- package/dist/commands/lint.d.ts.map +1 -0
- package/dist/commands/lint.js +55 -0
- package/dist/commands/lint.js.map +1 -0
- package/dist/config/config.d.ts +2 -0
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/parse-config.d.ts.map +1 -1
- package/dist/config/parse-config.js +2 -0
- package/dist/config/parse-config.js.map +1 -1
- package/dist/config/restack-config-text.d.ts +3 -2
- package/dist/config/restack-config-text.d.ts.map +1 -1
- package/dist/config/restack-config-text.js +5 -3
- package/dist/config/restack-config-text.js.map +1 -1
- package/dist/config/serialize-config.d.ts.map +1 -1
- package/dist/config/serialize-config.js +2 -1
- package/dist/config/serialize-config.js.map +1 -1
- package/dist/doctor/diagnose.d.ts +2 -0
- package/dist/doctor/diagnose.d.ts.map +1 -1
- package/dist/doctor/diagnose.js +22 -3
- package/dist/doctor/diagnose.js.map +1 -1
- package/dist/doctor/doctor-finding.d.ts +13 -5
- package/dist/doctor/doctor-finding.d.ts.map +1 -1
- package/dist/doctor/format-diagnosis.d.ts +4 -1
- package/dist/doctor/format-diagnosis.d.ts.map +1 -1
- package/dist/doctor/format-diagnosis.js +49 -3
- package/dist/doctor/format-diagnosis.js.map +1 -1
- package/dist/doctor/in-range.d.ts +7 -0
- package/dist/doctor/in-range.d.ts.map +1 -0
- package/dist/doctor/in-range.js +90 -0
- package/dist/doctor/in-range.js.map +1 -0
- package/dist/doctor/install-findings.d.ts +11 -0
- package/dist/doctor/install-findings.d.ts.map +1 -0
- package/dist/doctor/install-findings.js +119 -0
- package/dist/doctor/install-findings.js.map +1 -0
- package/dist/doctor/node-findings.d.ts +7 -0
- package/dist/doctor/node-findings.d.ts.map +1 -0
- package/dist/doctor/node-findings.js +19 -0
- package/dist/doctor/node-findings.js.map +1 -0
- package/dist/doctor/package-findings.d.ts +2 -0
- package/dist/doctor/package-findings.d.ts.map +1 -1
- package/dist/doctor/package-findings.js +1 -1
- package/dist/doctor/package-findings.js.map +1 -1
- package/dist/doctor/submodule-findings.d.ts +7 -0
- package/dist/doctor/submodule-findings.d.ts.map +1 -0
- package/dist/doctor/submodule-findings.js +22 -0
- package/dist/doctor/submodule-findings.js.map +1 -0
- package/dist/generate/schedule/cron-problem.d.ts.map +1 -1
- package/dist/generate/schedule/cron-problem.js +16 -1
- package/dist/generate/schedule/cron-problem.js.map +1 -1
- package/dist/help/notes.d.ts +1 -1
- package/dist/help/notes.d.ts.map +1 -1
- package/dist/help/notes.js +21 -8
- package/dist/help/notes.js.map +1 -1
- package/dist/help/usage.d.ts +1 -1
- package/dist/help/usage.d.ts.map +1 -1
- package/dist/help/usage.js +2 -1
- package/dist/help/usage.js.map +1 -1
- package/dist/init/manifest/versions.js +24 -24
- package/dist/init/run-init.d.ts.map +1 -1
- package/dist/init/run-init.js +4 -2
- package/dist/init/run-init.js.map +1 -1
- package/dist/lint/eslint-in-project.d.ts +8 -0
- package/dist/lint/eslint-in-project.d.ts.map +1 -0
- package/dist/lint/eslint-in-project.js +33 -0
- package/dist/lint/eslint-in-project.js.map +1 -0
- package/dist/lint/format-verdict.d.ts +4 -0
- package/dist/lint/format-verdict.d.ts.map +1 -0
- package/dist/lint/format-verdict.js +11 -0
- package/dist/lint/format-verdict.js.map +1 -0
- package/dist/lint/lint-run.d.ts +8 -0
- package/dist/lint/lint-run.d.ts.map +1 -0
- package/dist/lint/lint-run.js +2 -0
- package/dist/lint/lint-run.js.map +1 -0
- package/dist/lint/lint-verdict.d.ts +19 -0
- package/dist/lint/lint-verdict.d.ts.map +1 -0
- package/dist/lint/lint-verdict.js +25 -0
- package/dist/lint/lint-verdict.js.map +1 -0
- package/dist/lint/parse-lint-answer.d.ts +13 -0
- package/dist/lint/parse-lint-answer.d.ts.map +1 -0
- package/dist/lint/parse-lint-answer.js +18 -0
- package/dist/lint/parse-lint-answer.js.map +1 -0
- package/dist/migration/plan-replay.d.ts +4 -3
- package/dist/migration/plan-replay.d.ts.map +1 -1
- package/dist/migration/plan-replay.js +21 -6
- package/dist/migration/plan-replay.js.map +1 -1
- package/dist/migration/rename-branch-migrations.d.ts +13 -0
- package/dist/migration/rename-branch-migrations.d.ts.map +1 -0
- package/dist/migration/rename-branch-migrations.js +25 -0
- package/dist/migration/rename-branch-migrations.js.map +1 -0
- package/dist/migration/replay-drizzle-migrations.d.ts +6 -3
- package/dist/migration/replay-drizzle-migrations.d.ts.map +1 -1
- package/dist/migration/replay-drizzle-migrations.js +48 -4
- package/dist/migration/replay-drizzle-migrations.js.map +1 -1
- package/dist/migration/replay-plan.d.ts +8 -0
- package/dist/migration/replay-plan.d.ts.map +1 -1
- package/dist/migration/restore-migration-folder.d.ts +4 -0
- package/dist/migration/restore-migration-folder.d.ts.map +1 -0
- package/dist/migration/restore-migration-folder.js +15 -0
- package/dist/migration/restore-migration-folder.js.map +1 -0
- package/dist/package-manager/lockfiles.d.ts +2 -0
- package/dist/package-manager/lockfiles.d.ts.map +1 -1
- package/dist/package-manager/lockfiles.js +5 -0
- package/dist/package-manager/lockfiles.js.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +2 -0
- package/dist/run.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/templates/pipeline/package-scripts.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,135 @@ What each version changes for someone who uses the kit. The packages of `package
|
|
|
4
4
|
together, under one version; the notes of each [GitHub release](https://github.com/gbourgeat/ddd-ts-kit/releases)
|
|
5
5
|
list the pull requests behind it.
|
|
6
6
|
|
|
7
|
+
## 0.82.0
|
|
8
|
+
|
|
9
|
+
**`drizzle-generate --replay` replays only what forks, and refuses to lose a migration edited by
|
|
10
|
+
hand.** The replay first reads the history on disk: when the journal lists every migration in
|
|
11
|
+
order, each snapshot from the one before, the branch's already follow the trunk, and nothing is
|
|
12
|
+
generated again (a name that changes, `working-` dropped, is renamed in place). Otherwise it
|
|
13
|
+
deletes the branch's migrations and generates them again on top as before, then compares each
|
|
14
|
+
generated one with what the branch had: when drizzle-kit now writes other statements (its SQL was
|
|
15
|
+
edited by hand, or the trunk changed what it changes), it puts the migrations folder back as it
|
|
16
|
+
found it and refuses, naming the statement that differs; the fix is to generate that migration on
|
|
17
|
+
top by hand and write the edit again, after which a replay, or `merge-trunk --continue`, finds
|
|
18
|
+
nothing forked. Several migrations of a branch that change the schema and fork are still
|
|
19
|
+
refused rather than joined: drizzle-kit diffs the final schema and cannot split them again, and
|
|
20
|
+
one migration in their place would join steps planned apart (a table, then a constraint once it
|
|
21
|
+
is filled, fails on a database that holds rows). Its fix said to generate them as one; it now
|
|
22
|
+
says to generate them again one at a time, in their order. Measured with the real drizzle-kit
|
|
23
|
+
0.31.11: the replayed history is applied by `drizzle-kit migrate`.
|
|
24
|
+
|
|
25
|
+
**`persistence/primary-key-order` (a warning).** Under drizzle-kit, a migration that adds the new
|
|
26
|
+
primary key of a table before its old one is dropped, or drops a column before the key that holds
|
|
27
|
+
it, is reported on the line of the statement that runs too early: PostgreSQL refuses it when it
|
|
28
|
+
runs. `drizzle-generate` already warned once when it wrote one; the rule keeps reporting it. Fix:
|
|
29
|
+
drop the old key first, in that migration while it is still unapplied, or write it with
|
|
30
|
+
`--custom`. `ddd-ts-kit check --rule persistence/primary-key-order` lists the migrations to take
|
|
31
|
+
up; the rule stays a warning in this version.
|
|
32
|
+
|
|
33
|
+
**Two migrations kept apart.** The `persistence` skill and the persistence page say how: change
|
|
34
|
+
the schema in two steps, with a `db:generate` after each, since one `db:generate` writes every
|
|
35
|
+
change since the last migration as one.
|
|
36
|
+
|
|
37
|
+
**A cron accepts the shorthands `@hourly`, `@daily`, `@weekly`, `@monthly` and `@yearly`.**
|
|
38
|
+
`@Scheduled` and `ddd-ts-kit generate job --cron` read `@yearly` and `@annually` as `0 0 1 1 *`,
|
|
39
|
+
`@monthly` as `0 0 1 * *`, `@weekly` as `0 0 * * 0`, `@daily` and `@midnight` as `0 0 * * *` and
|
|
40
|
+
`@hourly` as `0 * * * *`, in any case, and fire on the occurrences of those five fields (`@hourly`
|
|
41
|
+
keeps its rhythm when clocks change, as `0 * * * *` does). A diagnostic and `ddd-ts-kit docs` show
|
|
42
|
+
the shorthand as written. `@reboot` and any other `@word` are refused by both with the same
|
|
43
|
+
message, which lists the shorthands accepted: a scheduled job has no occurrence at start.
|
|
44
|
+
|
|
45
|
+
**A lint warning fails the lint of a generated project.** `lint` and `ci:lint` ran `eslint .`,
|
|
46
|
+
which exits 0 on warnings: `verify` and the pipeline passed them, a new one as well, and they
|
|
47
|
+
piled up. `init` now writes `ddd-ts-kit lint` for both, and the example application runs the
|
|
48
|
+
same: the ESLint of the project, through its API (its paths, `--format` and `--fix` as ESLint
|
|
49
|
+
takes them), failing on an error and on a warning alike, but on a warning of a rule of the kit in
|
|
50
|
+
transition. A rule a version adds, or what a rule judges more, is a warning for one minor version
|
|
51
|
+
and an error at the next; its documentation names that version (`transition`), and `ddd-ts-kit
|
|
52
|
+
lint` shows its warnings and lists them after the report, one line per rule with the version that
|
|
53
|
+
makes it an error, without failing on them. An upgrade of the kit therefore never turns a green
|
|
54
|
+
lint red, which a plain `eslint . --max-warnings 0` would. The preset keeps its warnings as warnings (`complexity`, `max-depth`,
|
|
55
|
+
`clean/function-size`, `clean/no-flag-argument`, ...) and `init` writes no suppressions file: a
|
|
56
|
+
new project has no warning, so the first one fails `npm run lint`, `verify` and the lint job on
|
|
57
|
+
GitHub and GitLab. The hook before a commit is unchanged: it shows a warning without stopping the
|
|
58
|
+
commit. The quality-gate skill says so; the workflow is in
|
|
59
|
+
[Quality baseline](docs/tools/quality-baseline.md#warnings-fail-the-lint).
|
|
60
|
+
|
|
61
|
+
To move: nothing changes until the project acts. `npx ddd-ts-kit init` keeps an existing `lint`
|
|
62
|
+
and `ci:lint` and notes what the kit expects; `doctor` lists them as written otherwise, which
|
|
63
|
+
`doctor --strict` does not fail on. To take the limit, run `npx eslint .` and settle each
|
|
64
|
+
warning: fix it, or raise its rule to `error` (its id in the `rules` key of
|
|
65
|
+
`ddd-ts-kit.config.json` for a rule of the kit, a block after the preset in `eslint.config.mjs`
|
|
66
|
+
for `complexity` or `max-depth`) and record the existing findings with
|
|
67
|
+
`npx eslint . --suppress-rule <rule>` (or `--suppress-all`) in `eslint-suppressions.json`,
|
|
68
|
+
committed; once one is fixed, `npx eslint . --prune-suppressions` removes its entry, and the lint
|
|
69
|
+
fails until it does. Then set the two scripts to `ddd-ts-kit lint`, or run
|
|
70
|
+
`npx ddd-ts-kit init --force`, which also writes every other file and script of the kit over the
|
|
71
|
+
project's. Update the plugin.
|
|
72
|
+
|
|
73
|
+
**`check --explain` follows the violations with the reason of each rule they report.** A reviewer
|
|
74
|
+
of a pull request ran `ddd-ts-kit explain <rule-id>` for each rule `check --changed-since` named.
|
|
75
|
+
`--explain` prints, after the violations, one block per rule reported, however many times: its
|
|
76
|
+
id, its description and why it exists, as `explain` gives it without the examples; for a rule
|
|
77
|
+
another tool decides, where it is checked. `--format json` adds an `explanations` array.
|
|
78
|
+
`--format github` and `--format gitlab` keep one annotation per violation and end the message of
|
|
79
|
+
each with `Why: <reason>`, since a pull request shows an annotation alone on its line and a Code
|
|
80
|
+
Quality report has no place for text beside its issues; the fingerprints do not change. It
|
|
81
|
+
combines with paths, `--rule`, `--changed-since` and `--clean-only`. Without it, the output is
|
|
82
|
+
the same as before.
|
|
83
|
+
|
|
84
|
+
**`doctor` checks the environment of a checkout.** A new worktree starts from nothing, and what
|
|
85
|
+
goes wrong there is its environment: `verify` failed late, on a symptom. After what an upgrade
|
|
86
|
+
left to do, `npx ddd-ts-kit doctor` now says what this checkout lacks to run the project, read
|
|
87
|
+
from its files without network: the running Node against `engines.node` (`node engines.node:
|
|
88
|
+
unsupported`) and the version `.nvmrc` names; `node_modules` missing or installed before the
|
|
89
|
+
lockfile last changed (`install node_modules: missing`, `outdated`); `ddd-ts-kit` and every
|
|
90
|
+
`@ddd-ts-kit/*` package installed at the version of the running CLI (`install <package>: not
|
|
91
|
+
installed`, `other version`), where the package findings read the ranges of `package.json`, in
|
|
92
|
+
the install of its workspace for a project inside one; and,
|
|
93
|
+
with a `.gitmodules`, every submodule initialised (`submodule <path>: not initialised`). Each comes
|
|
94
|
+
with its fix (`nvm use`, `npm ci` in the dialect of the project, `git submodule update --init
|
|
95
|
+
--recursive`). `--strict` now also exits 1 while the checkout cannot run the project: a Node
|
|
96
|
+
outside `engines.node`, no `node_modules`, a package of the kit not installed or at another
|
|
97
|
+
version, a submodule not initialised. A Node `.nvmrc` does not name and a lockfile changed since
|
|
98
|
+
the install are said without failing it. A project or a pipeline that runs `doctor --strict` where
|
|
99
|
+
no dependencies are installed fails from this version: install first. `--json` gains the areas
|
|
100
|
+
`node`, `install` and `submodule`. The `parallel-work` skill runs it in a worktree made otherwise.
|
|
101
|
+
|
|
102
|
+
**`init` records the version that wrote the files of the platform.** `ddd-ts-kit.config.json`
|
|
103
|
+
now starts with `"initVersion"`, the version of the CLI whose `init` wrote the files it owns;
|
|
104
|
+
`init --force` rewrites it, and `init` run again to add a context leaves it. Nothing reads it yet:
|
|
105
|
+
it is the first step of an `init` that tells, after an upgrade, a change of its templates from an
|
|
106
|
+
adaptation of the team. A config without the key stays valid.
|
|
107
|
+
|
|
108
|
+
To move: nothing; `init --force` adds the key to a project initialised before it existed.
|
|
109
|
+
|
|
110
|
+
**An adapter that nothing wires is reported.** `declarations/port-adapter-wired`
|
|
111
|
+
(`ddd-ts-kit check`, a warning) reports a class of `infrastructure/` that implements a port of
|
|
112
|
+
`domain/repositories/` or `application/ports/` and that nothing wires: in the declared style it
|
|
113
|
+
carries no `@Repository`, `@Gateway` or `@Adapter`, and in both styles no file of the composition
|
|
114
|
+
root (`<context>.module.ts`, `main.ts`, `apps/<context>/main.ts`, the platform directory) imports
|
|
115
|
+
it. `declarations/role-declared` reads a role file by its suffix, so such a class in a file without
|
|
116
|
+
one was reported by no rule and only showed at run time as a missing binding. A file that still
|
|
117
|
+
carries a `TODO(domain)` or `TODO(platform)` is not judged yet: an adapter the generator wrote
|
|
118
|
+
before the outside system is ready is listed by `ddd-ts-kit todo` until it is wired. To move, run
|
|
119
|
+
`ddd-ts-kit check --rule declarations/port-adapter-wired`, then declare each reported class
|
|
120
|
+
(`@Gateway(Port)` in a `*.gateway.ts`, for example) or bind it in the module file; one kept
|
|
121
|
+
unwired on purpose gets its decision record in `docs/adr/` and
|
|
122
|
+
`// ddd-ts-kit-disable-next-line declarations/port-adapter-wired -- ADR-NNNN: <why>` above the class.
|
|
123
|
+
It becomes an error in the next minor version.
|
|
124
|
+
|
|
125
|
+
**The plugin and the packages share one version: 0.82.0.** The plugin numbered itself apart
|
|
126
|
+
(0.81.0 while the packages were at 0.27.0), so one agent showed a version and another the other.
|
|
127
|
+
From this release on, the release sets the version of the plugin with the version of the
|
|
128
|
+
packages; the version its skills describe already was that of the packages. The packages jump
|
|
129
|
+
from 0.27.0 to 0.82.0, above the last version of the plugin, so that an installed plugin is still
|
|
130
|
+
updated; no version between them was published. The plugin now changes with each release of the
|
|
131
|
+
kit, and an urgent fix of it is a patch release of the kit.
|
|
132
|
+
|
|
133
|
+
To move: upgrade the packages of the kit to 0.82.0 together, as at every release, and update the
|
|
134
|
+
plugin; from now on its version is the version of the kit.
|
|
135
|
+
|
|
7
136
|
## 0.27.0
|
|
8
137
|
|
|
9
138
|
**The worktrees of a project live inside it, and a new project writes its code in a worktree.**
|
package/README.fr.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[English](README.md) · **Français**
|
|
2
|
-
<!-- translation-of: README.md sha256:
|
|
2
|
+
<!-- translation-of: README.md sha256:d716322ee73d723e -->
|
|
3
3
|
|
|
4
4
|
# ddd-ts-kit
|
|
5
5
|
|
|
@@ -705,12 +705,12 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
705
705
|
`platform.jobs.register({ name, schedule, run })`.
|
|
706
706
|
- **Les *jobs*.** Le planning est validé quand le *job* est généré, par les règles du planificateur
|
|
707
707
|
(`parseJobSchedule` du kernel, fixé par un test) : une durée (`15m`, `2s`, des chiffres seuls
|
|
708
|
-
sont des millisecondes) ou une expression cron à cinq champs
|
|
709
|
-
`--time-zone` sans `--cron` est refusé, de même qu'un *job* sans
|
|
710
|
-
n'existe pas (avec la commande qui la crée) et une commande dont le
|
|
711
|
-
que l'acteur et l'instant pour lequel le travail est fait : un *job* dit
|
|
712
|
-
est venu, le gestionnaire trouve sur quoi agir. Les paramètres optionnels
|
|
713
|
-
par défaut sont laissés hors de l'appel.
|
|
708
|
+
sont des millisecondes) ou une expression cron à cinq champs ou un raccourci (`@daily`), avec un
|
|
709
|
+
fuseau horaire IANA ; `--time-zone` sans `--cron` est refusé, de même qu'un *job* sans
|
|
710
|
+
`--command`, une commande qui n'existe pas (avec la commande qui la crée) et une commande dont le
|
|
711
|
+
constructeur demande plus que l'acteur et l'instant pour lequel le travail est fait : un *job* dit
|
|
712
|
+
seulement que le moment est venu, le gestionnaire trouve sur quoi agir. Les paramètres optionnels
|
|
713
|
+
ou qui ont une valeur par défaut sont laissés hors de l'appel.
|
|
714
714
|
- **L'autorisation d'un *job*.** Un *job* dont la commande est protégée l'envoie en tant que
|
|
715
715
|
`system:<context>.<name>`, qui n'a aucun droit tant que le modèle ne lui en donne pas.
|
|
716
716
|
`generate job` écrit l'autorisation là où le modèle en fait une ligne, dans une région marquée
|
|
@@ -1251,10 +1251,32 @@ cette version) et les permissions des agents que cette version écrit et que le
|
|
|
1251
1251
|
*worktree* son propre lefthook, et fait échouer un *commit*, bruyamment, quand ses dépendances
|
|
1252
1252
|
manquent ; le correctif est cette ligne, ou `init --force` pour le fichier entier. Le *hook*
|
|
1253
1253
|
pre-commit sous `git rev-parse --git-path hooks` doit exister et venir de lefthook ; le correctif
|
|
1254
|
-
est `npm run hooks:install`, une fois par clone.
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1254
|
+
est `npm run hooks:install`, une fois par clone.
|
|
1255
|
+
|
|
1256
|
+
Puis ce qui manque à ce *checkout* pour faire tourner le projet, l'état d'un clone ou d'un
|
|
1257
|
+
nouveau *worktree* plutôt que du projet, lu dans ses fichiers sans réseau : le Node qui tourne
|
|
1258
|
+
face à `engines.node` de `package.json` (`unsupported`) et à la version que nomme `.nvmrc`
|
|
1259
|
+
(`other version` ; un alias comme `lts/*` n'est pas jugé) ; `node_modules` présent (`missing`)
|
|
1260
|
+
et installé depuis la dernière modification du *lockfile* (`outdated`, d'après la copie du
|
|
1261
|
+
*lockfile* que le gestionnaire de paquets écrit sous `node_modules`) ; `ddd-ts-kit` et chaque
|
|
1262
|
+
paquet `@ddd-ts-kit/*` que `package.json` déclare ou que `node_modules` contient, installé
|
|
1263
|
+
(`not installed`) à la version de la CLI qui tourne (`other version`). Un projet sans *lockfile*
|
|
1264
|
+
à lui dans un *workspace* (un `package.json` au-dessus qui déclare `workspaces`, ou un
|
|
1265
|
+
`pnpm-workspace.yaml`, avec le *lockfile*) est lu là où le *workspace* installe, ses paquets
|
|
1266
|
+
résolus comme le fait Node, du projet vers le haut ; et, quand le dépôt a un
|
|
1267
|
+
`.gitmodules`, chaque sous-module initialisé (`not initialised`, d'après `git submodule status`).
|
|
1268
|
+
Chacun vient avec son correctif : un Node qu'`engines.node` accepte (`nvm use`), `npm ci`, les
|
|
1269
|
+
paquets du kit montés ensemble, `git submodule update --init --recursive`.
|
|
1270
|
+
|
|
1271
|
+
`--strict` sort avec 1 tant que quelque chose manque ou est à une autre plage, ou tant que le
|
|
1272
|
+
*checkout* ne peut pas faire tourner le projet : un Node hors d'`engines.node`, pas de
|
|
1273
|
+
`node_modules`, un paquet du kit non installé ou à une autre version, un sous-module non
|
|
1274
|
+
initialisé. Un script écrit autrement, un *hook* que ce clone n'a pas installé, un Node que
|
|
1275
|
+
`.nvmrc` ne nomme pas quand `engines.node` l'accepte, et un *lockfile* modifié depuis
|
|
1276
|
+
l'installation (un *checkout* peut le réécrire avec ce que `node_modules` contient déjà) sont
|
|
1277
|
+
signalés sans le faire échouer. `--json` affiche `{ version, findings: [{ area, name, problem,
|
|
1278
|
+
expected, found }] }`, `area` valant `script`, `package`, `permission`, `hook`, `node`,
|
|
1279
|
+
`install` ou `submodule`.
|
|
1258
1280
|
|
|
1259
1281
|
## worker-scope
|
|
1260
1282
|
|
|
@@ -1595,7 +1617,7 @@ ajoute, `lint` ce qu'elle ajoute à ESLint ; les *pipelines* générés câblent
|
|
|
1595
1617
|
|
|
1596
1618
|
```
|
|
1597
1619
|
ddd-ts-kit check [paths...] [--rule <id>]... [--format text|json|github|gitlab]
|
|
1598
|
-
[--changed-since <git-ref>] [--self]
|
|
1620
|
+
[--changed-since <git-ref>] [--explain] [--self]
|
|
1599
1621
|
ddd-ts-kit check --clean-only <dir>... [--rule <id>]... [--format text|json|github]
|
|
1600
1622
|
ddd-ts-kit check --commit-size [--staged] [--strict]
|
|
1601
1623
|
```
|
|
@@ -1658,12 +1680,19 @@ règle.
|
|
|
1658
1680
|
- `paths` et `--changed-since` limitent ce qui est signalé, pas ce qui est analysé.
|
|
1659
1681
|
`--changed-since` lance `git diff --name-only --relative <ref>...` dans le projet.
|
|
1660
1682
|
- `--format github` affiche des annotations `::error file=...,line=...::`.
|
|
1683
|
+
- `--explain` fait suivre les violations de chaque règle qu'elles signalent, une fois, avec sa
|
|
1684
|
+
description et la raison de son existence (comme `explain` l'affiche, sans les exemples), et
|
|
1685
|
+
ajoute en JSON un tableau `explanations`. Avec `--format github` ou `gitlab`, la raison va à la
|
|
1686
|
+
place à la fin du message de chaque annotation : une *pull request* montre une annotation seule
|
|
1687
|
+
sur sa ligne, et un rapport Code Quality n'a pas de place pour du texte à côté de ses problèmes.
|
|
1688
|
+
Les empreintes restent les mêmes.
|
|
1661
1689
|
- `--format gitlab` affiche un rapport Code Quality de GitLab : un problème par violation,
|
|
1662
1690
|
`major` pour une erreur et `minor` pour un avertissement, avec une empreinte qui ne dépend pas
|
|
1663
1691
|
de la ligne.
|
|
1664
1692
|
- Les sévérités viennent de `rules` dans la configuration (`error`, `warn`, `off`). Par défaut
|
|
1665
1693
|
`error`, sauf `test/no-mocks`, `test/builder-required`, `clean/function-size`,
|
|
1666
|
-
`clean/no-noise-comment`, `clean/no-flag-argument`, `standard/no-parallel-interface
|
|
1694
|
+
`clean/no-noise-comment`, `clean/no-flag-argument`, `standard/no-parallel-interface`,
|
|
1695
|
+
`declarations/port-adapter-wired` et, tenue
|
|
1667
1696
|
par ESLint, `application/command-query-separation` (`warn`). `any` dans un fichier de test est
|
|
1668
1697
|
toujours un avertissement.
|
|
1669
1698
|
- `limits: { "maxParameters": 3, "maxFunctionLines": 30 }` dans la configuration règle
|
|
@@ -1763,6 +1792,7 @@ règle.
|
|
|
1763
1792
|
| `declarations/role-declared` | style déclaré seulement : un fichier de rôle (autre que `*.command.ts` et `*.query.ts`, tenus par `authz/declared` ; `*.job.ts` sous `application/scheduling/` avec `@Scheduled` et `*.publisher.ts` avec `@DomainEventHandler` sont des rôles) qui n'exporte aucune classe portant le décorateur de son suffixe et de son dossier, ou une classe qui en porte une autre ; une classe déclarée dans un fichier qui n'est pas un fichier de rôle ; une option `consumer` ou `name` manquante, vide, une variable, une concaténation ou un template literal avec une substitution ; tout décorateur de déclaration sur une classe sous `domain/` |
|
|
1764
1793
|
| `declarations/barrel-current` | style déclaré seulement : avec `stack.assembly: barrel`, un `<context>.declarations.ts` manquant ou qui diffère d'un `export *` par fichier de rôle trié par chemin, suivi d'un `injected(Class, [Tokens])` par classe dont le constructeur reçoit quelque chose (lu depuis les signatures, avec leurs imports) ; avec `discovery`, un barrel qui existe encore, et un `<context>.dependencies.ts` qui diffère de ces instructions `injected` (son absence est acceptée tant qu'il n'en contiendrait aucune). Le message nomme le fichier de rôle manquant ou la classe dont la liste est périmée. Elle a besoin de l'arbre, c'est pourquoi `check-file` ne l'exécute pas |
|
|
1765
1794
|
| `declarations/constructor-injection` | style déclaré seulement, dans un fichier de rôle : sur une classe dont le décorateur ne liste rien, un paramètre de constructeur optionnel, qui a une valeur par défaut, est un paramètre du reste ou est déstructuré, n'a pas de type, ou est typé par autre chose qu'un nom de classe (arguments de type mis à part) : une union, une intersection, un tableau, un nom qualifié, un type du langage, une interface, un alias de type, une enum ou une classe non exportée du fichier ou du fichier du projet d'où elle est importée ; une classe qui hérite son constructeur d'une classe que le projet ne sait pas lire. Sous `stack.dependencies: signature`, un décorateur qui porte une liste alors que le constructeur peut être lu : une liste qui le répète, une qui en diffère |
|
|
1795
|
+
| `declarations/port-adapter-wired` | une classe de `infrastructure/` qui implémente un port et que rien ne câble : ni `@Repository`, `@Gateway` ou `@Adapter` dans le style déclaré, ni fichier de la racine de composition (`<context>.module.ts`, `main.ts`, `apps/<context>/main.ts`, la plateforme) qui l'importe, une fois que le fichier ne porte plus de `TODO(domain)` ni de `TODO(platform)` ; celle gardée à dessein porte `// ddd-ts-kit-disable-next-line declarations/port-adapter-wired -- ADR-NNNN: <why>` |
|
|
1766
1796
|
| `ports/abstract-class` | dans un fichier de port (`domain/repositories/*.repository.ts`, `application/ports/*.port.ts`) : une classe qui n'est pas `abstract` ; un membre qui n'est pas une méthode ou une propriété abstraite (`static readonly tokenKey = '<text>'` mis à part) : un constructeur, un corps, un initialiseur, un membre `private`, `protected` ou `#` ; une `interface` exportée (un alias `type`, une forme de données, n'est pas signalé) |
|
|
1767
1797
|
| `ports/implements-never-extends` | une classe portant `@Repository(P)`, `@Gateway(P)` ou `@Adapter(P)`, ou donnée à `bind(P).toClass(C)` ou `rebind(P).toClass(C)`, sans `implements P` ou avec `extends P` ; sous `infrastructure/`, une classe qui étend une classe importée d'un fichier de port |
|
|
1768
1798
|
| `ports/no-token-constant` | un appel de `token` importé d'un *package* `@ddd-ts-kit/*` ; `Symbol(..)`, `Symbol.for(..)` ou une chaîne littérale comme premier argument de `bind`, `rebind`, `resolve`, `fake` ou `override` dans un fichier qui importe `@ddd-ts-kit/di` ; un nom en UPPER_SNAKE_CASE dans une liste de dépendances ; un fichier nommé `*.ports.ts` ou `tokens.ts` |
|
|
@@ -1934,6 +1964,22 @@ propre, *mocks*, composition, désactivations) sur un fichier sans parcourir le
|
|
|
1934
1964
|
un *hook* d'éditeur ou d'agent après chaque écriture. Un fichier qui n'est pas une source du
|
|
1935
1965
|
projet est ignoré.
|
|
1936
1966
|
|
|
1967
|
+
## lint
|
|
1968
|
+
|
|
1969
|
+
```
|
|
1970
|
+
ddd-ts-kit lint [paths...] [--format <eslint formatter>] [--fix]
|
|
1971
|
+
```
|
|
1972
|
+
|
|
1973
|
+
Ce que lancent `lint` et `ci:lint` d'un projet généré : l'ESLint du projet, par son API, sur les
|
|
1974
|
+
chemins donnés (le projet sinon), son rapport dans le format demandé (`--format gitlab` écrit le
|
|
1975
|
+
rapport Code Quality comme le fait `eslint-formatter-gitlab`), `--fix` comme ESLint le prend. Il
|
|
1976
|
+
sort en 1 sur une erreur, et sur un avertissement comme sur une erreur, sauf sur un avertissement
|
|
1977
|
+
d'une règle du kit en transition : une règle nouvelle dans cette version, dont la documentation
|
|
1978
|
+
nomme la version où elle devient une erreur. Ceux-là sont affichés dans le rapport et listés
|
|
1979
|
+
après lui, une ligne par règle, sans échouer : une mise à jour du kit ne fait jamais passer au
|
|
1980
|
+
rouge un lint vert. Sans ESLint installé, il sort en 2 et nomme l'installation. Voir
|
|
1981
|
+
[Base de qualité](../../docs/tools/quality-baseline.fr.md#un-avertissement-fait-échouer-le-lint).
|
|
1982
|
+
|
|
1937
1983
|
## rules, explain
|
|
1938
1984
|
|
|
1939
1985
|
```
|
package/README.md
CHANGED
|
@@ -683,11 +683,11 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
683
683
|
`platform.jobs.register({ name, schedule, run })`.
|
|
684
684
|
- **Jobs.** The schedule is validated when the job is generated, by the rules of the scheduler
|
|
685
685
|
(`parseJobSchedule` of the kernel, pinned by a test): a duration (`15m`, `2s`, digits alone are
|
|
686
|
-
milliseconds) or a five
|
|
687
|
-
`--cron` is refused, and so is a job without `--command`, a command
|
|
688
|
-
command that creates it) and a command whose constructor needs more
|
|
689
|
-
instant the work is for: a job only says that the time has come, the
|
|
690
|
-
on. Parameters that are optional or have a default are left out of the call.
|
|
686
|
+
milliseconds) or a cron expression of five fields or a shorthand (`@daily`), with an IANA time
|
|
687
|
+
zone; `--time-zone` without `--cron` is refused, and so is a job without `--command`, a command
|
|
688
|
+
that does not exist (with the command that creates it) and a command whose constructor needs more
|
|
689
|
+
than the actor and the instant the work is for: a job only says that the time has come, the
|
|
690
|
+
handler finds what to act on. Parameters that are optional or have a default are left out of the call.
|
|
691
691
|
- **The grant of a job.** A job whose command is protected sends it as `system:<context>.<name>`,
|
|
692
692
|
which has no right unless the model gives it one. `generate job` writes the grant where the model
|
|
693
693
|
makes it one line, in a `system-grants` marker region, and `next` points at that line:
|
|
@@ -1187,10 +1187,30 @@ otherwise, then the git hooks. `lefthook.yml` must hold `lefthook: node_modules/
|
|
|
1187
1187
|
which makes each checkout and each worktree run its own lefthook and fail a commit, loudly,
|
|
1188
1188
|
when its dependencies are missing; the fix is that line, or `init --force` for the whole file.
|
|
1189
1189
|
The pre-commit hook under `git rev-parse --git-path hooks` must exist and come from lefthook;
|
|
1190
|
-
the fix is `npm run hooks:install`, once per clone.
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1190
|
+
the fix is `npm run hooks:install`, once per clone.
|
|
1191
|
+
|
|
1192
|
+
Then what this checkout lacks to run the project, the state of a clone or a new worktree rather
|
|
1193
|
+
than of the project, read from its files without network: the running Node against
|
|
1194
|
+
`engines.node` of `package.json` (`unsupported`) and the version `.nvmrc` names (`other version`;
|
|
1195
|
+
an alias such as `lts/*` is not judged); `node_modules` present (`missing`) and installed since
|
|
1196
|
+
the lockfile last changed (`outdated`, from the copy of the lockfile the package manager writes
|
|
1197
|
+
under `node_modules`); `ddd-ts-kit` and every `@ddd-ts-kit/*` package that `package.json`
|
|
1198
|
+
declares or `node_modules` holds, installed (`not installed`) at the version of the running CLI
|
|
1199
|
+
(`other version`). A project without a lockfile of its own inside a workspace (a `package.json`
|
|
1200
|
+
above it that declares `workspaces`, or a `pnpm-workspace.yaml`, with the lockfile) is read where
|
|
1201
|
+
the workspace installs, its packages resolved as Node does, from the project up; and, when the repository has a `.gitmodules`, every submodule initialised
|
|
1202
|
+
(`not initialised`, from `git submodule status`). Each comes with its fix: a Node that
|
|
1203
|
+
`engines.node` accepts (`nvm use`), `npm ci`, the packages of the kit upgraded together,
|
|
1204
|
+
`git submodule update --init --recursive`.
|
|
1205
|
+
|
|
1206
|
+
`--strict` exits 1 while something is missing or at another range, or while the checkout cannot
|
|
1207
|
+
run the project: a Node outside `engines.node`, no `node_modules`, a package of the kit not
|
|
1208
|
+
installed or at another version, a submodule not initialised. A script written otherwise, a hook
|
|
1209
|
+
this clone has not installed, a Node `.nvmrc` does not name while `engines.node` accepts it, and a
|
|
1210
|
+
lockfile changed since the install (a checkout may rewrite it with what `node_modules` already
|
|
1211
|
+
holds) are said without failing it. `--json` prints `{ version, findings: [{ area, name, problem,
|
|
1212
|
+
expected, found }] }`, `area` being `script`, `package`, `permission`, `hook`, `node`, `install`
|
|
1213
|
+
or `submodule`.
|
|
1194
1214
|
|
|
1195
1215
|
## worker-scope
|
|
1196
1216
|
|
|
@@ -1506,7 +1526,7 @@ generated pipelines wire all three.
|
|
|
1506
1526
|
|
|
1507
1527
|
```
|
|
1508
1528
|
ddd-ts-kit check [paths...] [--rule <id>]... [--format text|json|github|gitlab]
|
|
1509
|
-
[--changed-since <git-ref>] [--self]
|
|
1529
|
+
[--changed-since <git-ref>] [--explain] [--self]
|
|
1510
1530
|
ddd-ts-kit check --clean-only <dir>... [--rule <id>]... [--format text|json|github]
|
|
1511
1531
|
ddd-ts-kit check --commit-size [--staged] [--strict]
|
|
1512
1532
|
```
|
|
@@ -1568,12 +1588,17 @@ const due = handler.isDueNow(new Reminder(new Date('2026-03-01T09:00:00Z'))); //
|
|
|
1568
1588
|
- `paths` and `--changed-since` limit what is reported, not what is analysed.
|
|
1569
1589
|
`--changed-since` runs `git diff --name-only --relative <ref>...` in the project.
|
|
1570
1590
|
- `--format github` prints `::error file=...,line=...::` annotations.
|
|
1591
|
+
- `--explain` follows the violations with each rule they report, once, with its description and
|
|
1592
|
+
the reason it exists (as `explain` prints it, without the examples), and in JSON adds an
|
|
1593
|
+
`explanations` array. With `--format github` or `gitlab`, the reason goes at the end of the
|
|
1594
|
+
message of each annotation instead: a pull request shows an annotation alone on its line, and
|
|
1595
|
+
a Code Quality report has no place for text beside its issues. The fingerprints stay the same.
|
|
1571
1596
|
- `--format gitlab` prints a GitLab Code Quality report: one issue per violation, `major` for
|
|
1572
1597
|
an error and `minor` for a warning, with a fingerprint that does not depend on the line.
|
|
1573
1598
|
- Severities come from `rules` in the config (`error`, `warn`, `off`). Default `error`, except
|
|
1574
1599
|
`test/no-mocks`, `test/builder-required`, `clean/function-size`, `clean/no-noise-comment`,
|
|
1575
|
-
`clean/no-flag-argument`, `standard/no-parallel-interface`
|
|
1576
|
-
`application/command-query-separation` (`warn`). `any` in a test file is
|
|
1600
|
+
`clean/no-flag-argument`, `standard/no-parallel-interface`, `declarations/port-adapter-wired`
|
|
1601
|
+
and, held by ESLint, `application/command-query-separation` (`warn`). `any` in a test file is
|
|
1577
1602
|
always a warning.
|
|
1578
1603
|
- `limits: { "maxParameters": 3, "maxFunctionLines": 30 }` in the config sets
|
|
1579
1604
|
`clean/function-size`. `maxFunctionLines` goes from 1 to 100: a value above is read as 100 and
|
|
@@ -1668,6 +1693,7 @@ const due = handler.isDueNow(new Reminder(new Date('2026-03-01T09:00:00Z'))); //
|
|
|
1668
1693
|
| `declarations/role-declared` | declared style only: a role file (other than `*.command.ts` and `*.query.ts`, held by `authz/declared`; `*.job.ts` under `application/scheduling/` with `@Scheduled` and `*.publisher.ts` with `@DomainEventHandler` are roles) exporting no class with the decorator of its suffix and folder, or one carrying another declaration; a declared class in a file that is not a role file; a `consumer` or `name` option that is missing, empty, a variable, a concatenation or a template with a substitution; any declaration decorator on a class under `domain/` |
|
|
1669
1694
|
| `declarations/barrel-current` | declared style only: with `stack.assembly: barrel`, a missing `<context>.declarations.ts` or one that differs from one `export *` per role file sorted by path followed by one `injected(Class, [Tokens])` per class whose constructor takes something (read from the signatures, with their imports); with `discovery`, a barrel that still exists, and a `<context>.dependencies.ts` that differs from those `injected` statements (absent is accepted while it would hold none). The message names the missing role file or the class whose list is stale. It needs the tree, so `check-file` does not run it |
|
|
1670
1695
|
| `declarations/constructor-injection` | declared style only, in a role file: on a class whose decorator lists nothing, a constructor parameter that is optional, has a default value, is a rest parameter or is destructured, has no type, or is typed by anything but one class name (type arguments aside): a union, an intersection, an array, a qualified name, a type of the language, an interface, a type alias, an enum or an unexported class of the file or of the file of the project it is imported from; a class that inherits its constructor from a class the project cannot read. Under `stack.dependencies: signature`, a decorator that carries a list although the constructor can be read: one that repeats it, one that differs |
|
|
1696
|
+
| `declarations/port-adapter-wired` | a class of `infrastructure/` implementing a port that nothing wires: no `@Repository`, `@Gateway` or `@Adapter` in the declared style, and no file of the composition root (`<context>.module.ts`, `main.ts`, `apps/<context>/main.ts`, the platform) importing it, once the file carries no `TODO(domain)` or `TODO(platform)` left; one kept on purpose carries `// ddd-ts-kit-disable-next-line declarations/port-adapter-wired -- ADR-NNNN: <why>` |
|
|
1671
1697
|
| `ports/abstract-class` | in a port file (`domain/repositories/*.repository.ts`, `application/ports/*.port.ts`): a class that is not `abstract`; a member that is not an abstract method or property (`static readonly tokenKey = '<text>'` apart): a constructor, a body, an initializer, a `private`, `protected` or `#` member; an exported `interface` (a `type` alias, a data shape, is not reported) |
|
|
1672
1698
|
| `ports/implements-never-extends` | a class carrying `@Repository(P)`, `@Gateway(P)` or `@Adapter(P)`, or given to `bind(P).toClass(C)` or `rebind(P).toClass(C)`, without `implements P` or with `extends P`; under `infrastructure/`, a class extending a class imported from a port file |
|
|
1673
1699
|
| `ports/no-token-constant` | a call of `token` imported from a `@ddd-ts-kit/*` package; `Symbol(..)`, `Symbol.for(..)` or a string literal as the first argument of `bind`, `rebind`, `resolve`, `fake` or `override` in a file importing `@ddd-ts-kit/di`; an UPPER_SNAKE_CASE name in a dependency list; a file named `*.ports.ts` or `tokens.ts` |
|
|
@@ -1818,6 +1844,21 @@ Runs the per-file rules (layers, contexts, naming, events, language, purity, cle
|
|
|
1818
1844
|
composition, suppressions) on one file without walking the project: meant for an editor or
|
|
1819
1845
|
agent hook after each write. A file that is not a source of the project is ignored.
|
|
1820
1846
|
|
|
1847
|
+
## lint
|
|
1848
|
+
|
|
1849
|
+
```
|
|
1850
|
+
ddd-ts-kit lint [paths...] [--format <eslint formatter>] [--fix]
|
|
1851
|
+
```
|
|
1852
|
+
|
|
1853
|
+
What `lint` and `ci:lint` of a generated project run: the ESLint of the project, through its API,
|
|
1854
|
+
on the paths given (the project otherwise), its report in the format asked (`--format gitlab`
|
|
1855
|
+
writes the Code Quality report as `eslint-formatter-gitlab` does), `--fix` as ESLint takes it.
|
|
1856
|
+
It exits 1 on an error, and on a warning as on an error, but on a warning of a rule of the kit in
|
|
1857
|
+
transition: a rule new in this version, whose documentation names the version in which it becomes
|
|
1858
|
+
an error. Those are shown in the report and listed after it, one line per rule, without failing:
|
|
1859
|
+
an upgrade of the kit never turns a green lint red. Without ESLint installed it exits 2 and names
|
|
1860
|
+
the install. See [Quality baseline](../../docs/tools/quality-baseline.md#warnings-fail-the-lint).
|
|
1861
|
+
|
|
1821
1862
|
## rules, explain
|
|
1822
1863
|
|
|
1823
1864
|
```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"architecture-rules.d.ts","sourceRoot":"","sources":["../../../src/check/catalogue/architecture-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"architecture-rules.d.ts","sourceRoot":"","sources":["../../../src/check/catalogue/architecture-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AA2F7C,gHAAgH;AAChH,eAAO,MAAM,kBAAkB,EAAE,SAAS,IAAI,EA0F7C,CAAC"}
|
|
@@ -25,6 +25,7 @@ import { contextPublishedLanguageIsAContract } from '../rules/context-published-
|
|
|
25
25
|
import { contextPublishedLanguageOnly } from '../rules/context-published-language-only.js';
|
|
26
26
|
import { declarationsBarrelCurrent } from '../rules/declarations-barrel-current.js';
|
|
27
27
|
import { declarationsConstructorInjection } from '../rules/declarations-constructor-injection.js';
|
|
28
|
+
import { declarationsPortAdapterWired } from '../rules/declarations-port-adapter-wired.js';
|
|
28
29
|
import { declarationsRoleDeclared } from '../rules/declarations-role-declared.js';
|
|
29
30
|
import { domainEventsDispatchedOnSave } from '../rules/domain-events-dispatched-on-save.js';
|
|
30
31
|
import { domainEventsTransactionalBeforeCommit } from '../rules/domain-events-transactional-before-commit.js';
|
|
@@ -60,6 +61,7 @@ import { namingSearchNotList } from '../rules/naming-search-not-list.js';
|
|
|
60
61
|
import { namingSuffix } from '../rules/naming-suffix.js';
|
|
61
62
|
import { persistenceMigrationHistory } from '../rules/persistence-migration-history.js';
|
|
62
63
|
import { persistenceNoFileContent } from '../rules/persistence-no-file-content.js';
|
|
64
|
+
import { persistencePrimaryKeyOrder } from '../rules/persistence-primary-key-order.js';
|
|
63
65
|
import { portsAbstractClass } from '../rules/ports-abstract-class.js';
|
|
64
66
|
import { portsImplementsNeverExtends } from '../rules/ports-implements-never-extends.js';
|
|
65
67
|
import { portsNoConcreteDependency } from '../rules/ports-no-concrete-dependency.js';
|
|
@@ -157,6 +159,7 @@ export const ARCHITECTURE_RULES = [
|
|
|
157
159
|
declarationsRoleDeclared,
|
|
158
160
|
declarationsBarrelCurrent,
|
|
159
161
|
declarationsConstructorInjection,
|
|
162
|
+
declarationsPortAdapterWired,
|
|
160
163
|
portsAbstractClass,
|
|
161
164
|
portsImplementsNeverExtends,
|
|
162
165
|
portsNoTokenConstant,
|
|
@@ -173,6 +176,7 @@ export const ARCHITECTURE_RULES = [
|
|
|
173
176
|
errorsKnownCode,
|
|
174
177
|
persistenceMigrationHistory,
|
|
175
178
|
persistenceNoFileContent,
|
|
179
|
+
persistencePrimaryKeyOrder,
|
|
176
180
|
filesPortNotConnector,
|
|
177
181
|
];
|
|
178
182
|
//# sourceMappingURL=architecture-rules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"architecture-rules.js","sourceRoot":"","sources":["../../../src/check/catalogue/architecture-rules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE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IACrB,aAAa;IACb,sBAAsB;IACtB,oBAAoB;IACpB,wBAAwB;IACxB,4BAA4B;IAC5B,qCAAqC;IACrC,yBAAyB;IACzB,sBAAsB;IACtB,kCAAkC;IAClC,mCAAmC;IACnC,6BAA6B;IAC7B,kBAAkB;IAClB,aAAa;IACb,kBAAkB;IAClB,kBAAkB;IAClB,mBAAmB;IACnB,gBAAgB;IAChB,YAAY;IACZ,gBAAgB;IAChB,mBAAmB;IACnB,sBAAsB;IACtB,2BAA2B;IAC3B,2BAA2B;IAC3B,uBAAuB;IACvB,uBAAuB;IACvB,wBAAwB;IACxB,yBAAyB;IACzB,gCAAgC;IAChC,kBAAkB;IAClB,2BAA2B;IAC3B,oBAAoB;IACpB,yBAAyB;IACzB,gBAAgB;IAChB,4BAA4B;IAC5B,6BAA6B;IAC7B,wBAAwB;IACxB,iBAAiB;IACjB,gBAAgB;IAChB,gBAAgB;IAChB,oBAAoB;IACpB,gBAAgB;IAChB,eAAe;IACf,2BAA2B;IAC3B,wBAAwB;IACxB,qBAAqB;CACtB,CAAC"}
|
|
1
|
+
{"version":3,"file":"architecture-rules.js","sourceRoot":"","sources":["../../../src/check/catalogue/architecture-rules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,E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ACxB,4BAA4B;IAC5B,qCAAqC;IACrC,yBAAyB;IACzB,sBAAsB;IACtB,kCAAkC;IAClC,mCAAmC;IACnC,6BAA6B;IAC7B,kBAAkB;IAClB,aAAa;IACb,kBAAkB;IAClB,kBAAkB;IAClB,mBAAmB;IACnB,gBAAgB;IAChB,YAAY;IACZ,gBAAgB;IAChB,mBAAmB;IACnB,sBAAsB;IACtB,2BAA2B;IAC3B,2BAA2B;IAC3B,uBAAuB;IACvB,uBAAuB;IACvB,wBAAwB;IACxB,yBAAyB;IACzB,gCAAgC;IAChC,4BAA4B;IAC5B,kBAAkB;IAClB,2BAA2B;IAC3B,oBAAoB;IACpB,yBAAyB;IACzB,gBAAgB;IAChB,4BAA4B;IAC5B,6BAA6B;IAC7B,wBAAwB;IACxB,iBAAiB;IACjB,gBAAgB;IAChB,gBAAgB;IAChB,oBAAoB;IACpB,gBAAgB;IAChB,eAAe;IACf,2BAA2B;IAC3B,wBAAwB;IACxB,0BAA0B;IAC1B,qBAAqB;CACtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-severities.d.ts","sourceRoot":"","sources":["../../../src/check/catalogue/default-severities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,0GAA0G;AAC1G,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"default-severities.d.ts","sourceRoot":"","sources":["../../../src/check/catalogue/default-severities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,0GAA0G;AAC1G,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAejE,CAAC"}
|
|
@@ -12,5 +12,7 @@ export const DEFAULT_SEVERITIES = {
|
|
|
12
12
|
'tree/documented-paths': 'warn',
|
|
13
13
|
'test/helper-placed': 'warn',
|
|
14
14
|
'test/acceptance-black-box': 'warn',
|
|
15
|
+
'persistence/primary-key-order': 'warn',
|
|
16
|
+
'declarations/port-adapter-wired': 'warn',
|
|
15
17
|
};
|
|
16
18
|
//# sourceMappingURL=default-severities.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-severities.js","sourceRoot":"","sources":["../../../src/check/catalogue/default-severities.ts"],"names":[],"mappings":"AAEA,0GAA0G;AAC1G,MAAM,CAAC,MAAM,kBAAkB,GAAuC;IACpE,eAAe,EAAE,MAAM;IACvB,eAAe,EAAE,MAAM;IACvB,uBAAuB,EAAE,MAAM;IAC/B,qBAAqB,EAAE,MAAM;IAC7B,wBAAwB,EAAE,MAAM;IAChC,wBAAwB,EAAE,MAAM;IAChC,sCAAsC,EAAE,MAAM;IAC9C,gCAAgC,EAAE,MAAM;IACxC,4BAA4B,EAAE,MAAM;IACpC,uBAAuB,EAAE,MAAM;IAC/B,oBAAoB,EAAE,MAAM;IAC5B,2BAA2B,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"default-severities.js","sourceRoot":"","sources":["../../../src/check/catalogue/default-severities.ts"],"names":[],"mappings":"AAEA,0GAA0G;AAC1G,MAAM,CAAC,MAAM,kBAAkB,GAAuC;IACpE,eAAe,EAAE,MAAM;IACvB,eAAe,EAAE,MAAM;IACvB,uBAAuB,EAAE,MAAM;IAC/B,qBAAqB,EAAE,MAAM;IAC7B,wBAAwB,EAAE,MAAM;IAChC,wBAAwB,EAAE,MAAM;IAChC,sCAAsC,EAAE,MAAM;IAC9C,gCAAgC,EAAE,MAAM;IACxC,4BAA4B,EAAE,MAAM;IACpC,uBAAuB,EAAE,MAAM;IAC/B,oBAAoB,EAAE,MAAM;IAC5B,2BAA2B,EAAE,MAAM;IACnC,+BAA+B,EAAE,MAAM;IACvC,iCAAiC,EAAE,MAAM;CAC1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-command.d.ts","sourceRoot":"","sources":["../../../src/check/commands/check-command.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"check-command.d.ts","sourceRoot":"","sources":["../../../src/check/commands/check-command.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAkBzD,eAAO,MAAM,YAAY,EAAE,OAuB1B,CAAC"}
|
|
@@ -8,6 +8,7 @@ import { CLEAN_RULE_IDS } from '../catalogue/clean-rule-ids.js';
|
|
|
8
8
|
import { formatCheck } from '../engine/format-check.js';
|
|
9
9
|
import { runCheck } from '../engine/run-check.js';
|
|
10
10
|
import { summarize } from '../engine/summarize.js';
|
|
11
|
+
import { explanationsOf } from '../explain/explanations-of.js';
|
|
11
12
|
import { loadLooseProject } from '../project/load-loose-project.js';
|
|
12
13
|
import { loadProject } from '../project/load-project.js';
|
|
13
14
|
import { toPosix } from '../project/to-posix.js';
|
|
@@ -22,6 +23,7 @@ export const checkCommand = (argv, io) => {
|
|
|
22
23
|
'changed-since': { type: 'string' },
|
|
23
24
|
self: { type: 'boolean', default: false },
|
|
24
25
|
'clean-only': { type: 'boolean', default: false },
|
|
26
|
+
explain: { type: 'boolean', default: false },
|
|
25
27
|
});
|
|
26
28
|
if (args.flag('self')) {
|
|
27
29
|
return selfCheck(args, io);
|
|
@@ -29,7 +31,8 @@ export const checkCommand = (argv, io) => {
|
|
|
29
31
|
const format = formatOf(args);
|
|
30
32
|
const rules = knownRules(args.many('rule'));
|
|
31
33
|
const result = args.flag('clean-only') ? checkCleanliness(args, rules) : checkProject(args, rules);
|
|
32
|
-
|
|
34
|
+
const explanations = args.flag('explain') ? explanationsOf(result.violations) : undefined;
|
|
35
|
+
io.out(formatCheck(result, format, explanations));
|
|
33
36
|
return result.errorCount > 0 ? 1 : 0;
|
|
34
37
|
};
|
|
35
38
|
function formatOf(args) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-command.js","sourceRoot":"","sources":["../../../src/check/commands/check-command.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAoB,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"check-command.js","sourceRoot":"","sources":["../../../src/check/commands/check-command.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAoB,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+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AAK,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CACtG,CAAC;IAEF,OAAO,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,SAAS,CAAC,SAAoB,EAAE,MAAyB;IAChE,OAAO,CACL,MAAM,CAAC,MAAM,KAAK,CAAC;QACnB,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,IAAI,SAAS,CAAC,IAAI,KAAK,KAAK,IAAI,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAC3G,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explain-command.d.ts","sourceRoot":"","sources":["../../../src/check/commands/explain-command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"explain-command.d.ts","sourceRoot":"","sources":["../../../src/check/commands/explain-command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAMzD,eAAO,MAAM,cAAc,EAAE,OAyB5B,CAAC"}
|
|
@@ -3,9 +3,7 @@ import { Arguments } from '../../commands/arguments.js';
|
|
|
3
3
|
import {} from '../../commands/command.js';
|
|
4
4
|
import { DELEGATED_RULES } from '../catalogue/delegated-rules.js';
|
|
5
5
|
import { KNOWN_RULE_IDS } from '../catalogue/known-rule-ids.js';
|
|
6
|
-
import {
|
|
7
|
-
import { SUPPRESSION_RULE } from '../catalogue/suppression-rule.js';
|
|
8
|
-
import { RULE_DOCS } from '../explain/rule-docs.js';
|
|
6
|
+
import { documentedRule } from '../explain/documented-rule.js';
|
|
9
7
|
import { knownRules } from './known-rules.js';
|
|
10
8
|
export const explainCommand = (argv, io) => {
|
|
11
9
|
const args = Arguments.parse(argv, {});
|
|
@@ -26,12 +24,7 @@ export const explainCommand = (argv, io) => {
|
|
|
26
24
|
};
|
|
27
25
|
function explanationOf(id) {
|
|
28
26
|
knownRules([id]);
|
|
29
|
-
|
|
30
|
-
const doc = RULE_DOCS[id];
|
|
31
|
-
if (rule === undefined || doc === undefined) {
|
|
32
|
-
throw new CliError(`The rule "${id}" has no explanation.`, 'Report this as a bug of ddd-ts-kit.');
|
|
33
|
-
}
|
|
34
|
-
return { id, description: rule.description, ...doc };
|
|
27
|
+
return documentedRule(id);
|
|
35
28
|
}
|
|
36
29
|
function formatExplanation(explanation) {
|
|
37
30
|
const indent = (block) => block
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explain-command.js","sourceRoot":"","sources":["../../../src/check/commands/explain-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,
|
|
1
|
+
{"version":3,"file":"explain-command.js","sourceRoot":"","sources":["../../../src/check/commands/explain-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAuB,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,MAAM,cAAc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AAC,EAAE,CAAC,CAAC,CAAC;IAEjB,OAAO,cAAc,CAAC,EAAE,CAAC,CAAC;AAC5B,CAAC;AAED,SAAS,iBAAiB,CAAC,WAA2B;IACpD,MAAM,MAAM,GAAG,CAAC,KAAa,EAAU,EAAE,CACvC,KAAK;SACF,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC;SAC5B,IAAI,CAAC,IAAI,CAAC,CAAC;IAEhB,MAAM,QAAQ,GAAG,sEAAsE,WAAW,CAAC,EAAE,cAAc,CAAC;IACpH,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,WAAW,CAAC;IAExD,OAAO;QACL,EAAE;QACF,EAAE;QACF,WAAW;QACX,EAAE;QACF,QAAQ,GAAG,EAAE;QACb,EAAE;QACF,MAAM;QACN,MAAM,CAAC,GAAG,CAAC;QACX,EAAE;QACF,OAAO;QACP,MAAM,CAAC,IAAI,CAAC;QACZ,EAAE;QACF,QAAQ;KACT,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import type { RuleExplanation } from '../model/rule-explanation.js';
|
|
1
2
|
import type { CheckResult } from './check-result.js';
|
|
2
3
|
export type CheckFormat = 'text' | 'json' | 'github' | 'gitlab';
|
|
3
|
-
|
|
4
|
+
/**
|
|
5
|
+
* With explanations, text and json add them once per rule after the violations; an annotation of
|
|
6
|
+
* github or gitlab is read alone, on its line of the diff, so it carries the reason of its rule.
|
|
7
|
+
*/
|
|
8
|
+
export declare function formatCheck(result: CheckResult, format: CheckFormat, explanations?: readonly RuleExplanation[]): string;
|
|
4
9
|
//# sourceMappingURL=format-check.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-check.d.ts","sourceRoot":"","sources":["../../../src/check/engine/format-check.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"format-check.d.ts","sourceRoot":"","sources":["../../../src/check/engine/format-check.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAOhE;;;GAGG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,YAAY,CAAC,EAAE,SAAS,eAAe,EAAE,GACxC,MAAM,CAkBR"}
|