@shivaedev/quality 0.49.0 → 0.50.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 +23 -0
- package/README.md +8 -2
- package/dist/cli/args.d.ts +1 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +8 -34
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/baseline.d.ts +1 -1
- package/dist/cli/baseline.d.ts.map +1 -1
- package/dist/cli/baseline.js +9 -3
- package/dist/cli/baseline.js.map +1 -1
- package/dist/cli/messages.d.ts +1 -1
- package/dist/cli/messages.d.ts.map +1 -1
- package/dist/cli/messages.js +2 -1
- package/dist/cli/messages.js.map +1 -1
- package/dist/cli/options.d.ts +45 -0
- package/dist/cli/options.d.ts.map +1 -0
- package/dist/cli/options.js +35 -0
- package/dist/cli/options.js.map +1 -0
- package/dist/cli/program.js +1 -1
- package/dist/cli/program.js.map +1 -1
- package/dist/imports/classifyRuntime.d.ts.map +1 -1
- package/dist/imports/classifyRuntime.js +4 -1
- package/dist/imports/classifyRuntime.js.map +1 -1
- package/dist/imports/runtime.d.ts +6 -3
- package/dist/imports/runtime.d.ts.map +1 -1
- package/dist/imports/runtime.js +15 -21
- package/dist/imports/runtime.js.map +1 -1
- package/dist/naming/migrationFile.d.ts.map +1 -1
- package/dist/naming/migrationFile.js +3 -1
- package/dist/naming/migrationFile.js.map +1 -1
- package/dist/naming/moduleRoot.d.ts +2 -0
- package/dist/naming/moduleRoot.d.ts.map +1 -0
- package/dist/naming/moduleRoot.js +13 -0
- package/dist/naming/moduleRoot.js.map +1 -0
- package/dist/rules/builtIn.d.ts +1 -1
- package/dist/rules/effect/boundary.d.ts.map +1 -1
- package/dist/rules/effect/boundary.js +30 -6
- package/dist/rules/effect/boundary.js.map +1 -1
- package/dist/rules/effect/boundaryCalls.d.ts +3 -0
- package/dist/rules/effect/boundaryCalls.d.ts.map +1 -0
- package/dist/rules/effect/boundaryCalls.js +121 -0
- package/dist/rules/effect/boundaryCalls.js.map +1 -0
- package/dist/rules/effect/boundaryReference.d.ts +4 -0
- package/dist/rules/effect/boundaryReference.d.ts.map +1 -0
- package/dist/rules/effect/boundaryReference.js +80 -0
- package/dist/rules/effect/boundaryReference.js.map +1 -0
- package/dist/rules/effect/program.d.ts +1 -1
- package/dist/rules/effect/program.d.ts.map +1 -1
- package/dist/rules/effect/program.js +4 -1
- package/dist/rules/effect/program.js.map +1 -1
- package/dist/rules/effect/promiseParameter.d.ts +3 -0
- package/dist/rules/effect/promiseParameter.d.ts.map +1 -0
- package/dist/rules/effect/promiseParameter.js +24 -0
- package/dist/rules/effect/promiseParameter.js.map +1 -0
- package/dist/rules/imports/runtime.d.ts +1 -1
- package/dist/rules/imports/runtime.d.ts.map +1 -1
- package/dist/rules/stories/groupedOutcomes.js +1 -1
- package/dist/rules/stories/groupedOutcomes.js.map +1 -1
- package/docs/debt-and-hooks.md +3 -1
- package/package.json +2 -2
- package/src/cli/args.ts +15 -43
- package/src/cli/baseline.ts +9 -2
- package/src/cli/messages.ts +2 -1
- package/src/cli/options.ts +43 -0
- package/src/cli/program.ts +1 -1
- package/src/imports/classifyRuntime.ts +4 -1
- package/src/imports/runtime.ts +19 -21
- package/src/naming/migrationFile.ts +3 -1
- package/src/naming/moduleRoot.ts +13 -0
- package/src/rules/effect/boundary.ts +48 -24
- package/src/rules/effect/boundaryCalls.ts +130 -0
- package/src/rules/effect/boundaryReference.ts +85 -0
- package/src/rules/effect/program.ts +4 -1
- package/src/rules/effect/promiseParameter.ts +26 -0
- package/src/rules/stories/groupedOutcomes.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.50.0 - 2026-10-31
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- `quality baseline write --first-adoption --rule <id>` records existing debt when a shared rule that refuses config exceptions gains new checks. It may include unchanged files; ordinary baseline writes still require changed `--file` selections. Review the resulting counts and state why retained debt needs a separate migration.
|
|
8
|
+
- `test-story` exports `lessThan`, `atMost`, `greaterThan` and `atLeast` from `server/adapters/outcomeMatchers.ts` for numeric bounds, including in nested expected values. Failure diffs show the bound and received value.
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- The shared story-testing skill teaches ordered lazy outcomes, nested partial expectations and numeric bounds. Quality’s grouped-outcomes diagnostic recommends the ordered callback form.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Minimal generated apps carry the same existing foundation-registration boundary debt as the full template, so their first commit passes the stricter Quality gate after baseline pruning.
|
|
17
|
+
- Recognize client, server and test-support folders in modules grouped one level below `src/modules`, and accept their numbered server migrations like ungrouped modules.
|
|
18
|
+
|
|
19
|
+
### Breaking
|
|
20
|
+
|
|
21
|
+
- `effect/boundary` reports synchronous Node filesystem and child-process calls, core `Effect.run*` runners, Promise parameters and callbacks, throwing APIs inside `Effect.sync`, and each call to a helper that throws. Move IO to Effect services, yield computations in the current runtime, and use `Effect.try` with tagged failures for throwing work. Outside-library bridges belong in `adapters/`. Record retained first-adoption debt with `quality baseline write --rule effect/boundary --first-adoption`, then lower it with `quality baseline tighten` as repairs land. Runners remain accepted at entry points, in tool configs and in tests.
|
|
22
|
+
- Consumers calling `runtimeOf` or `runtimeDeclarationProblems` from `@shivaedev/quality/imports/runtime.ts` must provide Effect's `FileSystem.FileSystem` service, for example with `NodeFileSystem.layer`. Directory probes now use that service and report filesystem failures as `FilesystemFailure`; only missing directories are treated as absent.
|
|
23
|
+
- Consumers constructing `Command` records from `@shivaedev/quality/cli/args.ts` with `_tag: "BaselineWrite"` must set `firstAdoption: false` for ordinary scoped writes, or `true` for an explicit shared-policy upgrade.
|
|
24
|
+
- `test-story` outcomes now takes an ordered list of `[label, () => readout(), expected]` rows. Migrate each `label: [readout(), expected]` object entry to a tuple and wrap its readout in a callback. Keep labels natural and put rows in their intended run order. Readouts are built only when their row starts. Expected objects match partially at every depth with native `toMatchObject` semantics; arrays retain length and order. Use a plain `expect(...).toEqual(...)` when exact object equality is required.
|
|
25
|
+
|
|
3
26
|
## 0.49.0 - 2026-10-31
|
|
4
27
|
|
|
5
28
|
### Changed
|
package/README.md
CHANGED
|
@@ -38,6 +38,10 @@ Interrupting a run stops its Biome and knip processes and removes their scoped t
|
|
|
38
38
|
|
|
39
39
|
`effect/boundary` checks every TypeScript or JavaScript source in Quality's inventory, including shipped code, tooling and specs. It reports async functions, methods and arrows, await (including `for await`), `new Promise(...)`, `.then(...)`, try statements and throw statements. Model the work with Effect, fail with a tagged error, and use `Effect.die` for defects. Effect's resource and finalizer primitives model cleanup.
|
|
40
40
|
|
|
41
|
+
It also reports synchronous calls imported from `node:fs` and `node:child_process` (including aliases, namespace imports and string member keys), parameters typed as Promise or callbacks returning Promise, and each call to a helper whose body throws. A guard called 31 times contributes 31 call findings, in addition to its throw statement. `Effect.sync` reports a throwing body: explicit throws, throwing helpers, synchronous Node IO, `JSON.parse`, URI encoding/decoding, `BigInt` and synchronous Schema decoders/encoders. Use `FileSystem` and `ChildProcessSpawner` for IO, and `Effect.try` with a tagged error for fallible synchronous work.
|
|
42
|
+
|
|
43
|
+
`Effect.run*` references in core are reported even without Clock, Config or Random. Yield the computation so it uses the caller's runtime. Runners are accepted in `cli.ts`, `main.ts`, `*-cli.ts`, tool configs and tests, modules that call `runMain`, and modules with the `fileURLToPath(import.meta.url) === process.argv[1]` entry guard. These entry-point conventions accept runners only; the other boundary checks still apply.
|
|
44
|
+
|
|
41
45
|
Only folders named `adapters/` or `test-support/`, at any depth, are exempt from this boundary rule. An `adapters/` folder bridges an outside library and hands the rest of the application Effect values. The name is fixed by convention, with no config or copied Biome plugin globs. Code that cannot be Effect belongs in that bridge or calls for a better Effect primitive. Adapter code still follows `effect/service-parameters` and the ambient time, randomness, console and environment bans.
|
|
42
46
|
|
|
43
47
|
The `ambient-runtime` Biome plugin also reports `Effect.run*` calls whose computation contains `Clock`, `Config` or `Random`, `currentTimeMillisUnsafe`, crypto UUIDs and bytes, `performance.now`, process arguments, working directory and exit state, `globalThis.process.env`, timeouts and microtasks. Yield service computations in the caller's Effect so its environment controls them. These additional checks apply to core TypeScript code. They accept `cli.ts`, `main.ts`, `*-cli.ts`, modules that call `runMain`, use `NodeRuntime.runMain` or guard execution with `fileURLToPath(import.meta.url) === process.argv[1]`, tool configs, tests, `adapters/` and `test-support/`. The existing `Date.now()`, `new Date()`, `Math.random()`, console and direct `process.env` bans still apply there.
|
|
@@ -46,6 +50,8 @@ The `ambient-runtime` Biome plugin also reports `Effect.run*` calls whose comput
|
|
|
46
50
|
|
|
47
51
|
Both rules refuse config exceptions and inline suppressions. Record existing debt with `quality baseline write --rule effect/boundary --file src/legacy.ts` and `quality baseline write --rule effect/service-parameters --file src/legacy.ts`; the normal report and baseline burn-down apply.
|
|
48
52
|
|
|
53
|
+
When an upgrade expands these checks, inspect the new findings, repair the small ones and record retained debt with `quality baseline write --first-adoption --rule effect/boundary` (or `--rule effect/service-parameters`). This explicit first-adoption mode requires named rules that refuse config exceptions and may record unchanged files. Review each raised count and explain its reason in the pull request. Ordinary writes still require changed `--file` selections. Run `quality baseline tighten` after repairs to lower the touched files' counts.
|
|
54
|
+
|
|
49
55
|
### 1. Once per repository: connect the shared policy
|
|
50
56
|
|
|
51
57
|
A new repository needs no `quality.config.ts`. Quality checks sources from the current directory with every built-in rule at its default error level. Baseline entries for `packages/<package>/...` live in `packages/<package>/quality-baseline.jsonl`; entries outside packages live in the root `quality-baseline.jsonl`. A package with no entries has no shard file. Permanent exceptions belong in `quality.config.ts`.
|
|
@@ -87,7 +93,7 @@ quality hooks install
|
|
|
87
93
|
|
|
88
94
|
For an application setup script, use `quality setup`. It installs the same hook when the current folder has its own `.git` entry, including a linked worktree. An unversioned app or an app inside another repository leaves hooks alone.
|
|
89
95
|
|
|
90
|
-
Installing the package does not install a hook. `hooks install` writes the repository's pre-commit hook. A hook Quality did not write is kept unless `--force` replaces it. For an existing repository, `quality baseline write` records error-level findings when there is no baseline; later writes require `--rule <id>` and `--file <path>`. Each selected path must be changed since `HEAD`; stage new files first. Initial adoption without a baseline may record the repository once.
|
|
96
|
+
Installing the package does not install a hook. `hooks install` writes the repository's pre-commit hook. A hook Quality did not write is kept unless `--force` replaces it. For an existing repository, `quality baseline write` records error-level findings when there is no baseline; ordinary later writes require `--rule <id>` and `--file <path>`. Each selected path must be changed since `HEAD`; stage new files first. Initial adoption without a baseline may record the repository once.
|
|
91
97
|
|
|
92
98
|
When upgrading Quality, the starter and apps generated by create-app provide `pnpm baseline write --rule <id> --file <path>`. Record each new rule’s findings in the changed files, review the baseline diff, and land the upgrade before burning down that debt. Checks remain strict for findings above the recorded counts. After repairs, run `pnpm baseline tighten` to lower the touched files’ debt.
|
|
93
99
|
|
|
@@ -406,7 +412,7 @@ quality fix [--config <file>]
|
|
|
406
412
|
quality exceptions migrate [--config <file>] [--from <registry>]
|
|
407
413
|
quality baseline merge <ancestor> <current> <other>
|
|
408
414
|
quality baseline install-driver
|
|
409
|
-
quality baseline write [--config <file>] [--rule <id>]... [--file <path>]...
|
|
415
|
+
quality baseline write [--config <file>] [--rule <id>]... [--file <path>]... [--first-adoption]
|
|
410
416
|
quality baseline prune [--config <file>] [--against <ref>]
|
|
411
417
|
quality baseline tighten [--config <file>] [--staged]
|
|
412
418
|
quality baseline migrate [--config <file>] [--from <file>]
|
package/dist/cli/args.d.ts
CHANGED
package/dist/cli/args.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAChB;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,QAAQ,E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MANDS } from "./messages.js";
|
|
4
|
-
|
|
5
|
-
against: { type: "string" },
|
|
6
|
-
config: { type: "string" },
|
|
7
|
-
coverage: { type: "boolean" },
|
|
8
|
-
file: { multiple: true, type: "string" },
|
|
9
|
-
force: { type: "boolean" },
|
|
10
|
-
from: { type: "string" },
|
|
11
|
-
help: { short: "h", type: "boolean" },
|
|
12
|
-
rule: { multiple: true, type: "string" },
|
|
13
|
-
staged: { type: "boolean" },
|
|
14
|
-
};
|
|
4
|
+
import { ACCEPTS, misplaced, OPTIONS } from "./options.js";
|
|
15
5
|
function usage(problem) {
|
|
16
6
|
return { _tag: "Usage", problem };
|
|
17
7
|
}
|
|
18
8
|
function parsed(command) {
|
|
19
9
|
return { _tag: "Parsed", command };
|
|
20
10
|
}
|
|
21
|
-
const COMMAND_OPTIONS = ["against", "coverage", "file", "force", "from", "rule", "staged"];
|
|
22
|
-
const ACCEPTS = {
|
|
23
|
-
"baseline install-driver": [],
|
|
24
|
-
"baseline migrate": ["from"],
|
|
25
|
-
"baseline prune": ["against"],
|
|
26
|
-
"baseline tighten": ["staged"],
|
|
27
|
-
"baseline write": ["rule", "file"],
|
|
28
|
-
ci: ["coverage"],
|
|
29
|
-
"exceptions migrate": ["from"],
|
|
30
|
-
fix: ["rule"],
|
|
31
|
-
"hooks install": ["force"],
|
|
32
|
-
"hooks pre-commit": [],
|
|
33
|
-
"hooks status": [],
|
|
34
|
-
"hooks uninstall": [],
|
|
35
|
-
lint: [],
|
|
36
|
-
setup: [],
|
|
37
|
-
};
|
|
38
|
-
function misplaced(name, values) {
|
|
39
|
-
const option = COMMAND_OPTIONS.find((key) => values[key] !== undefined && !(ACCEPTS[name] ?? []).includes(key));
|
|
40
|
-
const owners = Object.keys(ACCEPTS).filter((owner) => option !== undefined && (ACCEPTS[owner] ?? []).includes(option));
|
|
41
|
-
return option === undefined ? undefined : `--${option} applies only to ${owners.join(" and ")}.`;
|
|
42
|
-
}
|
|
43
11
|
function ref(against, command) {
|
|
44
12
|
return against?.startsWith("-") === true ? usage(`--against takes a git ref, not "${against}".`) : parsed(command);
|
|
45
13
|
}
|
|
@@ -59,7 +27,13 @@ function commandFor(name, values) {
|
|
|
59
27
|
case "baseline install-driver":
|
|
60
28
|
return parsed({ _tag: "BaselineInstallDriver" });
|
|
61
29
|
case "baseline write":
|
|
62
|
-
return parsed({
|
|
30
|
+
return parsed({
|
|
31
|
+
_tag: "BaselineWrite",
|
|
32
|
+
config,
|
|
33
|
+
files: values.file ?? [],
|
|
34
|
+
firstAdoption: values["first-adoption"] === true,
|
|
35
|
+
rules: values.rule ?? [],
|
|
36
|
+
});
|
|
63
37
|
case "baseline prune":
|
|
64
38
|
return ref(values.against, { _tag: "BaselinePrune", against: values.against, config });
|
|
65
39
|
case "baseline tighten":
|
package/dist/cli/args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAe,MAAM,cAAc,CAAC;AA4BxE,SAAS,KAAK,CAAC,OAAe;IAC7B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AACnC,CAAC;AAED,SAAS,MAAM,CAAC,OAAgB;IAC/B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,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AAC,CAAC;QACzC,OAAO,KAAK,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;IACvG,CAAC;IACD,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACxC,OAAO,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC1E,CAAC"}
|
package/dist/cli/baseline.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ import { type Scope } from "#baseline/update.ts";
|
|
|
3
3
|
import { type Session } from "#engine/session.ts";
|
|
4
4
|
import { SetupFailure } from "#failure.ts";
|
|
5
5
|
import type { RuleServices } from "#rule.ts";
|
|
6
|
-
export declare const writeBaseline: (cwd: string, config: string | undefined, rules: readonly string[], files: readonly string[]) => Effect.Effect<void, SetupFailure, RuleServices>;
|
|
6
|
+
export declare const writeBaseline: (cwd: string, config: string | undefined, rules: readonly string[], files: readonly string[], firstAdoption?: any) => Effect.Effect<void, SetupFailure, RuleServices>;
|
|
7
7
|
export declare const shrinkBaseline: <TRequirements>(cwd: string, config: string | undefined, scopeOf: (session: Session) => Effect.Effect<Scope, SetupFailure, TRequirements>) => Effect.Effect<void, SetupFailure, TRequirements | RuleServices>;
|
|
8
8
|
//# sourceMappingURL=baseline.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseline.d.ts","sourceRoot":"","sources":["../../src/cli/baseline.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,MAAM,EAAmB,MAAM,QAAQ,CAAC;AAG1D,OAAO,EAA6B,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAe,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"baseline.d.ts","sourceRoot":"","sources":["../../src/cli/baseline.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,MAAM,EAAmB,MAAM,QAAQ,CAAC;AAG1D,OAAO,EAA6B,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAe,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAG/D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAU7C,eAAO,MAAM,aAAa,uKAuCxB,CAAC;AAWH,eAAO,MAAM,cAAc,GAA8C,aAAa,8DAGlE,OAAO,KAAK,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,aAAa,CAAC,oEAa/E,CAAC"}
|
package/dist/cli/baseline.js
CHANGED
|
@@ -3,6 +3,7 @@ import { Console, Effect } from "effect";
|
|
|
3
3
|
import { saveShards } from "#baseline/shards.ts";
|
|
4
4
|
import { adopt, prune } from "#baseline/update.ts";
|
|
5
5
|
import { openSession } from "#engine/session.ts";
|
|
6
|
+
import { registrable } from "#engine/violation.ts";
|
|
6
7
|
import { applyRegistry } from "#exceptions/registry.ts";
|
|
7
8
|
import { SetupFailure } from "#failure.ts";
|
|
8
9
|
import { changesSince } from "#git/history.ts";
|
|
@@ -13,16 +14,21 @@ function save(session, entries) {
|
|
|
13
14
|
function unregistered(session) {
|
|
14
15
|
return applyRegistry(session.violations, session.registry, session.config).kept;
|
|
15
16
|
}
|
|
16
|
-
export const writeBaseline = Effect.fn("Cli.writeBaseline")(function* (cwd, config, rules, files) {
|
|
17
|
+
export const writeBaseline = Effect.fn("Cli.writeBaseline")(function* (cwd, config, rules, files, firstAdoption = false) {
|
|
17
18
|
const session = yield* openSession(cwd, config);
|
|
18
19
|
const existing = session.baseline.files.size === 0 ? undefined : session.baseline.entries;
|
|
19
|
-
if (
|
|
20
|
+
if (firstAdoption && (rules.length === 0 || rules.some((rule) => registrable(session.config, rule)))) {
|
|
21
|
+
return yield* new SetupFailure({
|
|
22
|
+
message: "baseline write refused: --first-adoption requires explicit --rule ids that refuse config exceptions.",
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
if (existing !== undefined && files.length === 0 && !firstAdoption) {
|
|
20
26
|
return yield* new SetupFailure({
|
|
21
27
|
message: "baseline write refused: a baseline exists. Record a rule with --rule <id> and --file <path>; use prune for moved or fixed debt.",
|
|
22
28
|
});
|
|
23
29
|
}
|
|
24
30
|
const selected = files.length === 0 ? undefined : new Set(files.map((file) => relative(session.config.root, resolve(session.config.root, file))));
|
|
25
|
-
if (selected !== undefined) {
|
|
31
|
+
if (selected !== undefined && !firstAdoption) {
|
|
26
32
|
const changed = yield* changesSince(session.config.root, ["HEAD"]);
|
|
27
33
|
const outside = [...selected].filter((file) => !changed.files.has(file));
|
|
28
34
|
if (outside.length > 0) {
|
package/dist/cli/baseline.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseline.js","sourceRoot":"","sources":["../../src/cli/baseline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAmB,MAAM,QAAQ,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAe,KAAK,EAAc,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAgB,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,SAAS,IAAI,CAAC,OAAgB,EA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cli/messages.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const USAGE = "Usage:\n quality lint [--config <file>]\n quality ci [--coverage]\n quality setup [--config <file>]\n quality fix [--config <file>] [--rule <id>]...\n quality exceptions migrate [--config <file>] [--from <registry>]\n quality baseline merge <ancestor> <current> <other>\n quality baseline install-driver\n quality baseline write [--config <file>] [--rule <id>]... [--file <path>]
|
|
1
|
+
export declare const USAGE = "Usage:\n quality lint [--config <file>]\n quality ci [--coverage]\n quality setup [--config <file>]\n quality fix [--config <file>] [--rule <id>]...\n quality exceptions migrate [--config <file>] [--from <registry>]\n quality baseline merge <ancestor> <current> <other>\n quality baseline install-driver\n quality baseline write [--config <file>] [--rule <id>]... [--file <path>]... [--first-adoption]\n quality baseline prune [--config <file>] [--against <ref>]\n quality baseline tighten [--config <file>] [--staged]\n quality baseline migrate [--config <file>] [--from <file>]\n quality hooks install [--config <file>] [--force]\n quality hooks uninstall\n quality hooks status\n quality hooks pre-commit [--config <file>]\n\nci Check pnpm peers, then run the application scripts lint, typecheck, build and test, stopping on failure.\nsetup Install the Quality hook when the current folder owns a .git entry; skip unversioned and enclosed apps.\nlint Run every rule. Exits 1 on an error-level violation, a file over its baseline, a stale registry entry\n or a baseline entry for an unknown rule.\nfix Sort every package.json, apply Biome's lint fixes, unsafe ones included, its assist actions and formatting, then format again.\n With --rule, apply only that rule's safe mechanical fixes and report remaining findings (exit 1), including baseline debt. Unsupported rules exit 2.\nexceptions migrate Move legacy registry entries and Biome declarations into quality.config.ts exceptions and remove matching root overrides.\nbaseline merge Merge Git baseline versions into <current>: deletions win and counts take the minimum.\nbaseline install-driver Configure only the repository-local merge.quality-baseline.driver setting.\nbaseline write Adopt initial debt once, or record named rules only for --file paths changed since HEAD. Stage new files first.\n --first-adoption records a shared policy upgrade for explicit rules that refuse config exceptions, including unchanged files.\nbaseline prune Drop fixed debt, lower entries to what is left and carry entries to files git saw move. Never adds or raises an entry.\nbaseline tighten Prune only the entries of files changed since HEAD, or with --staged, in the index.\nbaseline migrate Move a JSON or JSON Lines baseline (--from, quality/baseline.json by default) into root and package shards.\nhooks install Install the git pre-commit hook, shared by every worktree, that runs hooks pre-commit. Keeps a hook that is not quality's\n unless --force replaces it.\nhooks uninstall Remove quality's pre-commit hook. Keeps a hook that is not quality's.\nhooks status Check that git's effective hooks path runs Quality's pre-commit hook and report global chaining.\nhooks pre-commit Check lint and staged baseline counts, then package.json scripts typecheck and quality:commit when present.\n\n--config <file> Config file; its directory is the repository root. Without this option, uses ./quality.config.ts when present, otherwise defaults.\n--against <ref> The branch the work merges into, whose merge base prune follows moves from. Defaults to origin/HEAD, then origin/main, then origin/master.\n--coverage Collect V8 coverage and JUnit from ci's single test run into coverage/, including failed tests.\nExit codes: 0 passed, 1 failed the gate, 2 could not run.";
|
|
2
2
|
export declare const SUBCOMMANDS: Readonly<Record<string, string>>;
|
|
3
3
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/cli/messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/cli/messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,y5GAwCwC,CAAC;AAE3D,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAIxD,CAAC"}
|
package/dist/cli/messages.js
CHANGED
|
@@ -6,7 +6,7 @@ export const USAGE = `Usage:
|
|
|
6
6
|
quality exceptions migrate [--config <file>] [--from <registry>]
|
|
7
7
|
quality baseline merge <ancestor> <current> <other>
|
|
8
8
|
quality baseline install-driver
|
|
9
|
-
quality baseline write [--config <file>] [--rule <id>]... [--file <path>]...
|
|
9
|
+
quality baseline write [--config <file>] [--rule <id>]... [--file <path>]... [--first-adoption]
|
|
10
10
|
quality baseline prune [--config <file>] [--against <ref>]
|
|
11
11
|
quality baseline tighten [--config <file>] [--staged]
|
|
12
12
|
quality baseline migrate [--config <file>] [--from <file>]
|
|
@@ -25,6 +25,7 @@ exceptions migrate Move legacy registry entries and Biome declarations into qual
|
|
|
25
25
|
baseline merge Merge Git baseline versions into <current>: deletions win and counts take the minimum.
|
|
26
26
|
baseline install-driver Configure only the repository-local merge.quality-baseline.driver setting.
|
|
27
27
|
baseline write Adopt initial debt once, or record named rules only for --file paths changed since HEAD. Stage new files first.
|
|
28
|
+
--first-adoption records a shared policy upgrade for explicit rules that refuse config exceptions, including unchanged files.
|
|
28
29
|
baseline prune Drop fixed debt, lower entries to what is left and carry entries to files git saw move. Never adds or raises an entry.
|
|
29
30
|
baseline tighten Prune only the entries of files changed since HEAD, or with --staged, in the index.
|
|
30
31
|
baseline migrate Move a JSON or JSON Lines baseline (--from, quality/baseline.json by default) into root and package shards.
|
package/dist/cli/messages.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/cli/messages.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/cli/messages.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0DAwCqC,CAAC;AAE3D,MAAM,CAAC,MAAM,WAAW,GAAqC;IAC5D,QAAQ,EAAE,yEAAyE;IACnF,UAAU,EAAE,2BAA2B;IACvC,KAAK,EAAE,uDAAuD;CAC9D,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { parseArgs } from "node:util";
|
|
2
|
+
export declare const OPTIONS: {
|
|
3
|
+
readonly against: {
|
|
4
|
+
readonly type: "string";
|
|
5
|
+
};
|
|
6
|
+
readonly config: {
|
|
7
|
+
readonly type: "string";
|
|
8
|
+
};
|
|
9
|
+
readonly coverage: {
|
|
10
|
+
readonly type: "boolean";
|
|
11
|
+
};
|
|
12
|
+
readonly file: {
|
|
13
|
+
readonly multiple: true;
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
};
|
|
16
|
+
readonly "first-adoption": {
|
|
17
|
+
readonly type: "boolean";
|
|
18
|
+
};
|
|
19
|
+
readonly force: {
|
|
20
|
+
readonly type: "boolean";
|
|
21
|
+
};
|
|
22
|
+
readonly from: {
|
|
23
|
+
readonly type: "string";
|
|
24
|
+
};
|
|
25
|
+
readonly help: {
|
|
26
|
+
readonly short: "h";
|
|
27
|
+
readonly type: "boolean";
|
|
28
|
+
};
|
|
29
|
+
readonly rule: {
|
|
30
|
+
readonly multiple: true;
|
|
31
|
+
readonly type: "string";
|
|
32
|
+
};
|
|
33
|
+
readonly staged: {
|
|
34
|
+
readonly type: "boolean";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export type Values = ReturnType<typeof parseArgs<{
|
|
38
|
+
options: typeof OPTIONS;
|
|
39
|
+
allowPositionals: true;
|
|
40
|
+
}>>["values"];
|
|
41
|
+
type Option = Exclude<keyof Values, "config" | "help">;
|
|
42
|
+
export declare const ACCEPTS: Readonly<Record<string, readonly Option[]>>;
|
|
43
|
+
export declare function misplaced(name: string, values: Values): string | undefined;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/cli/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,eAAO,MAAM,OAAO;aACnB,OAAO;iBAAI,IAAI,EAAE,QAAQ;;aACzB,MAAM;iBAAI,IAAI,EAAE,QAAQ;;aACxB,QAAQ;iBAAI,IAAI,EAAE,SAAS;;aAC3B,IAAI;iBAAI,QAAQ;iBAAQ,IAAI,EAAE,QAAQ;;aACtC,gBAAgB;iBAAI,IAAI,EAAE,SAAS;;aACnC,KAAK;iBAAI,IAAI,EAAE,SAAS;;aACxB,IAAI;iBAAI,IAAI,EAAE,QAAQ;;aACtB,IAAI;iBAAI,KAAK,EAAE,GAAG;iBAAE,IAAI,EAAE,SAAS;;aACnC,IAAI;iBAAI,QAAQ;iBAAQ,IAAI,EAAE,QAAQ;;aACtC,MAAM;iBAAI,IAAI,EAAE,SAAS;;CAChB,CAAC;AAEX,MAAM,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC;IAAE,OAAO,EAAE,OAAO,OAAO,CAAC;IAAC,gBAAgB,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AAEjH,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAC,CAAC;AAIvD,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAe/D,CAAC;AAEF,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAI1E"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export const OPTIONS = {
|
|
2
|
+
against: { type: "string" },
|
|
3
|
+
config: { type: "string" },
|
|
4
|
+
coverage: { type: "boolean" },
|
|
5
|
+
file: { multiple: true, type: "string" },
|
|
6
|
+
"first-adoption": { type: "boolean" },
|
|
7
|
+
force: { type: "boolean" },
|
|
8
|
+
from: { type: "string" },
|
|
9
|
+
help: { short: "h", type: "boolean" },
|
|
10
|
+
rule: { multiple: true, type: "string" },
|
|
11
|
+
staged: { type: "boolean" },
|
|
12
|
+
};
|
|
13
|
+
const COMMAND_OPTIONS = ["against", "coverage", "file", "first-adoption", "force", "from", "rule", "staged"];
|
|
14
|
+
export const ACCEPTS = {
|
|
15
|
+
"baseline install-driver": [],
|
|
16
|
+
"baseline migrate": ["from"],
|
|
17
|
+
"baseline prune": ["against"],
|
|
18
|
+
"baseline tighten": ["staged"],
|
|
19
|
+
"baseline write": ["rule", "file", "first-adoption"],
|
|
20
|
+
ci: ["coverage"],
|
|
21
|
+
"exceptions migrate": ["from"],
|
|
22
|
+
fix: ["rule"],
|
|
23
|
+
"hooks install": ["force"],
|
|
24
|
+
"hooks pre-commit": [],
|
|
25
|
+
"hooks status": [],
|
|
26
|
+
"hooks uninstall": [],
|
|
27
|
+
lint: [],
|
|
28
|
+
setup: [],
|
|
29
|
+
};
|
|
30
|
+
export function misplaced(name, values) {
|
|
31
|
+
const option = COMMAND_OPTIONS.find((key) => values[key] !== undefined && !(ACCEPTS[name] ?? []).includes(key));
|
|
32
|
+
const owners = Object.keys(ACCEPTS).filter((owner) => option !== undefined && (ACCEPTS[owner] ?? []).includes(option));
|
|
33
|
+
return option === undefined ? undefined : `--${option} applies only to ${owners.join(" and ")}.`;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/cli/options.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,OAAO,GAAG;IACtB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC3B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1B,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC7B,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxC,gBAAgB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IACrC,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxB,IAAI,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE;IACrC,IAAI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AE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IACvH,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,MAAM,oBAAoB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;AAClG,CAAC"}
|
package/dist/cli/program.js
CHANGED
|
@@ -39,7 +39,7 @@ export const program = Effect.fn("Cli.program")(function* (args, { cwd, launch }
|
|
|
39
39
|
case "BaselineInstallDriver":
|
|
40
40
|
return yield* installDriver(cwd, launch);
|
|
41
41
|
case "BaselineWrite":
|
|
42
|
-
return yield* writeBaseline(cwd, command.config, command.rules, command.files);
|
|
42
|
+
return yield* writeBaseline(cwd, command.config, command.rules, command.files, command.firstAdoption);
|
|
43
43
|
case "BaselinePrune":
|
|
44
44
|
return yield* pruneBaseline(cwd, command.config, command.against);
|
|
45
45
|
case "BaselineTighten":
|
package/dist/cli/program.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.js","sourceRoot":"","sources":["../../src/cli/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,iBAA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iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QACpE,KAAK,iBAAiB;YACrB,OAAO,KAAK,CAAC,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QAClE,KAAK,cAAc;YAClB,OAAO,KAAK,CAAC,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QAC1F,KAAK,gBAAgB;YACpB,OAAO,KAAK,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAClC,KAAK,aAAa;YACjB,OAAO,KAAK,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAC/B,KAAK,gBAAgB;YACpB,OAAO,KAAK,CAAC,CAAC,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;AACF,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classifyRuntime.d.ts","sourceRoot":"","sources":["../../src/imports/classifyRuntime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"classifyRuntime.d.ts","sourceRoot":"","sources":["../../src/imports/classifyRuntime.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElE,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACxD,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,CAAC;CAC/C;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAmBxF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { posix } from "node:path";
|
|
2
|
+
import { moduleRoot } from "#naming/moduleRoot.ts";
|
|
2
3
|
import { isTooling } from "./isTooling.js";
|
|
3
4
|
import { packageOf } from "./workspace.js";
|
|
4
5
|
export function classifyRuntime(policy, path) {
|
|
@@ -13,7 +14,9 @@ export function classifyRuntime(policy, path) {
|
|
|
13
14
|
if (!policy.adopted.has(owner)) {
|
|
14
15
|
return policy.executable.has(owner) ? "server" : undefined;
|
|
15
16
|
}
|
|
16
|
-
const
|
|
17
|
+
const source = posix.relative(owner, path);
|
|
18
|
+
const module = moduleRoot(source);
|
|
19
|
+
const local = module === undefined ? source : `src/${posix.relative(module, source)}`;
|
|
17
20
|
if (local.startsWith("src/client/")) {
|
|
18
21
|
return "client";
|
|
19
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classifyRuntime.js","sourceRoot":"","sources":["../../src/imports/classifyRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAyB,MAAM,gBAAgB,CAAC;AASlE,MAAM,UAAU,eAAe,CAAC,MAAqB,EAAE,IAAY;IAClE,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,SAAS,IAAI,GAAG,CAAC;IACjE,IAAI,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC;QAC5B,OAAO,QAAQ,CAAC;IACjB,CAAC;IACD,MAAM,KAAK,GAAG,MAA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AC;IAC5D,CAAC;IACD,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAClC,MAAM,KAAK,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACtF,IAAI,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;QACrC,OAAO,QAAQ,CAAC;IACjB,CAAC;IACD,OAAO,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC9D,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Effect } from "effect";
|
|
1
|
+
import { Effect, FileSystem } from "effect";
|
|
2
2
|
import type { RuleInputs } from "#rule.ts";
|
|
3
3
|
import type { WorkspacePackage } from "./workspace.ts";
|
|
4
4
|
export type Runtime = "client" | "server" | "shared";
|
|
@@ -7,6 +7,9 @@ export interface RuntimeDeclarationProblem {
|
|
|
7
7
|
readonly directory: string;
|
|
8
8
|
readonly message: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const runtimeDeclarationProblems: (inputs: RuleInputs, packages: readonly WorkspacePackage[]) => Effect.Effect<
|
|
11
|
-
|
|
10
|
+
export declare const runtimeDeclarationProblems: (inputs: RuleInputs, packages: readonly WorkspacePackage[]) => Effect.Effect<{
|
|
11
|
+
directory: string;
|
|
12
|
+
message: string;
|
|
13
|
+
}[], import("#inventory/filesystem.ts").FilesystemFailure, FileSystem.FileSystem>;
|
|
14
|
+
export declare const runtimeOf: (inputs: RuleInputs, packages: readonly WorkspacePackage[]) => Effect.Effect<(path: string) => Runtime | undefined, import("#inventory/filesystem.ts").FilesystemFailure, FileSystem.FileSystem>;
|
|
12
15
|
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/imports/runtime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/imports/runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAG5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAErD,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAmClD,MAAM,WAAW,yBAAyB;IACzC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AA0BD,eAAO,MAAM,0BAA0B;;;iFAWrC,CAAC;AAEH,eAAO,MAAM,SAAS,sFAoBP,MAAM,sGACnB,CAAC"}
|
package/dist/imports/runtime.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { statSync } from "node:fs";
|
|
2
1
|
import { join, posix } from "node:path";
|
|
3
|
-
import { Effect } from "effect";
|
|
2
|
+
import { Effect, FileSystem } from "effect";
|
|
4
3
|
import { readPackageManifest } from "#adapters/manifestInventory.ts";
|
|
4
|
+
import { orWhenAbsent } from "#inventory/filesystem.ts";
|
|
5
5
|
import { classifyRuntime } from "./classifyRuntime.js";
|
|
6
6
|
function executablePath(value) {
|
|
7
7
|
return typeof value === "string" && value.trim().length > 0;
|
|
@@ -18,21 +18,14 @@ function declaredRuntime(manifest) {
|
|
|
18
18
|
const value = declaredValue(manifest);
|
|
19
19
|
return value === "client" || value === "server" ? value : undefined;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
throw cause;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function runtimeFoldersOf(root, owner) {
|
|
33
|
-
return ["client", "server"].filter((folder) => directoryExists(join(root, owner.directory, "src", folder)));
|
|
34
|
-
}
|
|
35
|
-
function problemsFor(root, owner, manifest) {
|
|
21
|
+
const runtimeFoldersOf = Effect.fn("Imports.runtimeFoldersOf")(function* (root, owner) {
|
|
22
|
+
const fs = yield* FileSystem.FileSystem;
|
|
23
|
+
return yield* Effect.filter(["client", "server"], (folder) => {
|
|
24
|
+
const path = join(root, owner.directory, "src", folder);
|
|
25
|
+
return orWhenAbsent(path, Effect.map(fs.stat(path), (info) => info.type === "Directory"), false);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
const problemsFor = Effect.fn("Imports.problemsFor")(function* (root, owner, manifest) {
|
|
36
29
|
const value = declaredValue(manifest);
|
|
37
30
|
if (value === undefined) {
|
|
38
31
|
return [];
|
|
@@ -45,7 +38,7 @@ function problemsFor(root, owner, manifest) {
|
|
|
45
38
|
},
|
|
46
39
|
];
|
|
47
40
|
}
|
|
48
|
-
const folders = runtimeFoldersOf(root, owner);
|
|
41
|
+
const folders = yield* runtimeFoldersOf(root, owner);
|
|
49
42
|
return folders.length === 0
|
|
50
43
|
? []
|
|
51
44
|
: [
|
|
@@ -54,15 +47,16 @@ function problemsFor(root, owner, manifest) {
|
|
|
54
47
|
message: `"quality.runtime" declares the whole package ${value} code, but it also has ${folders.map((folder) => `src/${folder}/`).join(" and ")}. Keep one convention: remove the declaration and classify code by runtime folders, or move the code out of the runtime folders.`,
|
|
55
48
|
},
|
|
56
49
|
];
|
|
57
|
-
}
|
|
50
|
+
});
|
|
58
51
|
export const runtimeDeclarationProblems = Effect.fn("Imports.runtimeDeclarationProblems")(function* (inputs, packages) {
|
|
59
|
-
const problems = yield* Effect.forEach([...packages, { directory: ".", name: "." }], (owner) => Effect.
|
|
52
|
+
const problems = yield* Effect.forEach([...packages, { directory: ".", name: "." }], (owner) => Effect.flatMap(Effect.promise(() => readPackageManifest(inputs.readText, posix.join(owner.directory, "package.json"))), (manifest) => problemsFor(inputs.root, owner, manifest)));
|
|
60
53
|
return problems.flat();
|
|
61
54
|
});
|
|
62
55
|
export const runtimeOf = Effect.fn("Imports.runtimeOf")(function* (inputs, packages) {
|
|
63
56
|
const owners = [...packages, { directory: ".", name: "." }];
|
|
64
57
|
const manifests = new Map(yield* Effect.forEach(owners, (owner) => Effect.map(Effect.promise(() => readPackageManifest(inputs.readText, posix.join(owner.directory, "package.json"))), (manifest) => [owner.directory, manifest])));
|
|
65
|
-
const
|
|
58
|
+
const folders = yield* Effect.filter(owners, (owner) => Effect.map(runtimeFoldersOf(inputs.root, owner), (found) => found.length > 0));
|
|
59
|
+
const adopted = new Set(folders.map((owner) => owner.directory));
|
|
66
60
|
const declared = new Map(owners.flatMap((owner) => {
|
|
67
61
|
const runtime = declaredRuntime(manifests.get(owner.directory));
|
|
68
62
|
return runtime === undefined || adopted.has(owner.directory) ? [] : [[owner.directory, runtime]];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/imports/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/imports/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAOvD,S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AK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IACpI,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;IAC3D,OAAO,CAAC,IAAY,EAAE,EAAE,CAAC,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACxD,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrationFile.d.ts","sourceRoot":"","sources":["../../src/naming/migrationFile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migrationFile.d.ts","sourceRoot":"","sources":["../../src/naming/migrationFile.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAC5D,eAAO,MAAM,sBAAsB,QAAkD,CAAC;AAEtF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMrD"}
|