@shivaedev/quality 0.63.0 → 0.66.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 +25 -0
- package/README.md +13 -5
- package/biome/plugins/ambient-runtime.grit +3 -3
- package/dist/adapters/callerContextData.d.ts +3 -0
- package/dist/adapters/callerContextData.d.ts.map +1 -0
- package/dist/adapters/callerContextData.js +42 -0
- package/dist/adapters/callerContextData.js.map +1 -0
- package/dist/adapters/contextCaptureFindings.d.ts +4 -0
- package/dist/adapters/contextCaptureFindings.d.ts.map +1 -0
- package/dist/adapters/contextCaptureFindings.js +49 -0
- package/dist/adapters/contextCaptureFindings.js.map +1 -0
- package/dist/adapters/import-compiler/browserChecker.d.ts +4 -0
- package/dist/adapters/import-compiler/browserChecker.d.ts.map +1 -0
- package/dist/adapters/import-compiler/browserChecker.js +4 -0
- package/dist/adapters/import-compiler/browserChecker.js.map +1 -0
- package/dist/adapters/import-compiler/departures.d.ts +5 -0
- package/dist/adapters/import-compiler/departures.d.ts.map +1 -0
- package/dist/adapters/import-compiler/departures.js +5 -0
- package/dist/adapters/import-compiler/departures.js.map +1 -0
- package/dist/adapters/import-compiler/graph.d.ts +4 -0
- package/dist/adapters/import-compiler/graph.d.ts.map +1 -0
- package/dist/adapters/import-compiler/graph.js +6 -0
- package/dist/adapters/import-compiler/graph.js.map +1 -0
- package/dist/adapters/import-compiler/service.d.ts +10 -0
- package/dist/adapters/import-compiler/service.d.ts.map +1 -0
- package/dist/adapters/import-compiler/service.js +16 -0
- package/dist/adapters/import-compiler/service.js.map +1 -0
- package/dist/adapters/initializerDependency.d.ts +3 -0
- package/dist/adapters/initializerDependency.d.ts.map +1 -0
- package/dist/adapters/initializerDependency.js +53 -0
- package/dist/adapters/initializerDependency.js.map +1 -0
- package/dist/adapters/outsideImportFindings.d.ts.map +1 -1
- package/dist/adapters/outsideImportFindings.js +13 -1
- package/dist/adapters/outsideImportFindings.js.map +1 -1
- package/dist/adapters/serviceDefinitionProblems.js +1 -1
- package/dist/adapters/serviceDefinitionProblems.js.map +1 -1
- package/dist/adapters/serviceFolderFindings.d.ts.map +1 -1
- package/dist/adapters/serviceFolderFindings.js +12 -0
- package/dist/adapters/serviceFolderFindings.js.map +1 -1
- package/dist/adapters/serviceModelFindings.d.ts +4 -0
- package/dist/adapters/serviceModelFindings.d.ts.map +1 -0
- package/dist/adapters/serviceModelFindings.js +48 -0
- package/dist/adapters/serviceModelFindings.js.map +1 -0
- package/dist/adapters/serviceModelSyntax.d.ts +5 -0
- package/dist/adapters/serviceModelSyntax.d.ts.map +1 -0
- package/dist/adapters/serviceModelSyntax.js +53 -0
- package/dist/adapters/serviceModelSyntax.js.map +1 -0
- package/dist/adapters/serviceOperationProblems.d.ts +8 -0
- package/dist/adapters/serviceOperationProblems.d.ts.map +1 -0
- package/dist/adapters/serviceOperationProblems.js +108 -0
- package/dist/adapters/serviceOperationProblems.js.map +1 -0
- package/dist/adapters/serviceStateProblems.d.ts +7 -0
- package/dist/adapters/serviceStateProblems.d.ts.map +1 -0
- package/dist/adapters/serviceStateProblems.js +66 -0
- package/dist/adapters/serviceStateProblems.js.map +1 -0
- package/dist/cli/lint.js +1 -1
- package/dist/cli/lint.js.map +1 -1
- package/dist/imports/browserGlobals.js +1 -1
- package/dist/imports/browserGlobals.js.map +1 -1
- package/dist/imports/departures.js +1 -1
- package/dist/imports/departures.js.map +1 -1
- package/dist/imports/graph.js +1 -1
- package/dist/imports/graph.js.map +1 -1
- package/dist/rules/builtIn.d.ts +2 -2
- package/dist/rules/builtIn.d.ts.map +1 -1
- package/dist/rules/builtIn.js +2 -20
- package/dist/rules/builtIn.js.map +1 -1
- package/dist/rules/effect/adapterImports.js +1 -1
- package/dist/rules/effect/adapterImports.js.map +1 -1
- package/dist/rules/effect/contextCapture.d.ts +2 -0
- package/dist/rules/effect/contextCapture.d.ts.map +1 -0
- package/dist/rules/effect/contextCapture.js +9 -0
- package/dist/rules/effect/contextCapture.js.map +1 -0
- package/dist/rules/effect/policy.d.ts +2 -0
- package/dist/rules/effect/policy.d.ts.map +1 -0
- package/dist/rules/effect/policy.js +27 -0
- package/dist/rules/effect/policy.js.map +1 -0
- package/dist/rules/effect/serviceCatalog.d.ts +2 -2
- package/dist/rules/effect/serviceCatalog.d.ts.map +1 -1
- package/dist/rules/effect/serviceCatalog.js +14 -10
- package/dist/rules/effect/serviceCatalog.js.map +1 -1
- package/dist/rules/effect/serviceDefinitionAssembly.js +1 -1
- package/dist/rules/effect/serviceDefinitionAssembly.js.map +1 -1
- package/dist/rules/effect/serviceFolders.js +1 -1
- package/dist/rules/effect/serviceFolders.js.map +1 -1
- package/dist/rules/effect/serviceModel.d.ts +2 -0
- package/dist/rules/effect/serviceModel.d.ts.map +1 -0
- package/dist/rules/effect/serviceModel.js +9 -0
- package/dist/rules/effect/serviceModel.js.map +1 -0
- package/dist/rules/effect/serviceTypes.d.ts +2 -2
- package/dist/rules/effect/serviceTypes.d.ts.map +1 -1
- package/dist/rules/effect/serviceTypes.js +15 -3
- package/dist/rules/effect/serviceTypes.js.map +1 -1
- package/dist/rules/files/folderNames.d.ts.map +1 -1
- package/dist/rules/files/folderNames.js +4 -1
- package/dist/rules/files/folderNames.js.map +1 -1
- package/dist/rules/files/namedAfterExport.d.ts.map +1 -1
- package/dist/rules/files/namedAfterExport.js +16 -3
- package/dist/rules/files/namedAfterExport.js.map +1 -1
- package/dist/rules/stories/adapters/failureDeadline.d.ts +5 -0
- package/dist/rules/stories/adapters/failureDeadline.d.ts.map +1 -0
- package/dist/rules/stories/adapters/failureDeadline.js +66 -0
- package/dist/rules/stories/adapters/failureDeadline.js.map +1 -0
- package/dist/rules/stories/adapters/realTime.d.ts +4 -0
- package/dist/rules/stories/adapters/realTime.d.ts.map +1 -0
- package/dist/rules/stories/adapters/realTime.js +65 -0
- package/dist/rules/stories/adapters/realTime.js.map +1 -0
- package/dist/rules/stories/waitOnEvents.d.ts.map +1 -1
- package/dist/rules/stories/waitOnEvents.js +13 -70
- package/dist/rules/stories/waitOnEvents.js.map +1 -1
- package/package.json +15 -15
- package/src/adapters/callerContextData.ts +46 -0
- package/src/adapters/contextCaptureFindings.ts +58 -0
- package/src/adapters/import-compiler/browserChecker.ts +5 -0
- package/src/adapters/import-compiler/departures.ts +9 -0
- package/src/adapters/import-compiler/graph.ts +9 -0
- package/src/adapters/import-compiler/service.ts +17 -0
- package/src/adapters/initializerDependency.ts +57 -0
- package/src/adapters/outsideImportFindings.ts +14 -1
- package/src/adapters/serviceDefinitionProblems.ts +1 -1
- package/src/adapters/serviceFolderFindings.ts +14 -0
- package/src/adapters/serviceModelFindings.ts +52 -0
- package/src/adapters/serviceModelSyntax.ts +58 -0
- package/src/adapters/serviceOperationProblems.ts +131 -0
- package/src/adapters/serviceStateProblems.ts +86 -0
- package/src/cli/lint.ts +1 -1
- package/src/imports/browserGlobals.ts +1 -1
- package/src/imports/departures.ts +1 -1
- package/src/imports/graph.ts +1 -1
- package/src/rules/builtIn.ts +2 -20
- package/src/rules/effect/adapterImports.ts +1 -1
- package/src/rules/effect/contextCapture.ts +10 -0
- package/src/rules/effect/policy.ts +27 -0
- package/src/rules/effect/serviceCatalog.ts +15 -10
- package/src/rules/effect/serviceDefinitionAssembly.ts +1 -1
- package/src/rules/effect/serviceFolders.ts +1 -1
- package/src/rules/effect/serviceModel.ts +10 -0
- package/src/rules/effect/serviceTypes.ts +15 -3
- package/src/rules/files/folderNames.ts +4 -1
- package/src/rules/files/namedAfterExport.ts +16 -3
- package/src/rules/stories/adapters/failureDeadline.ts +78 -0
- package/src/rules/stories/adapters/realTime.ts +76 -0
- package/src/rules/stories/waitOnEvents.ts +12 -82
- package/dist/adapters/ImportCompiler.d.ts +0 -10
- package/dist/adapters/ImportCompiler.d.ts.map +0 -1
- package/dist/adapters/ImportCompiler.js +0 -16
- package/dist/adapters/ImportCompiler.js.map +0 -1
- package/dist/adapters/imports/analyzeDepartures.d.ts +0 -5
- package/dist/adapters/imports/analyzeDepartures.d.ts.map +0 -1
- package/dist/adapters/imports/analyzeDepartures.js +0 -5
- package/dist/adapters/imports/analyzeDepartures.js.map +0 -1
- package/dist/adapters/imports/analyzeGraph.d.ts +0 -4
- package/dist/adapters/imports/analyzeGraph.d.ts.map +0 -1
- package/dist/adapters/imports/analyzeGraph.js +0 -6
- package/dist/adapters/imports/analyzeGraph.js.map +0 -1
- package/dist/adapters/imports/checkBrowser.d.ts +0 -4
- package/dist/adapters/imports/checkBrowser.d.ts.map +0 -1
- package/dist/adapters/imports/checkBrowser.js +0 -4
- package/dist/adapters/imports/checkBrowser.js.map +0 -1
- package/src/adapters/ImportCompiler.ts +0 -17
- package/src/adapters/imports/analyzeDepartures.ts +0 -9
- package/src/adapters/imports/analyzeGraph.ts +0 -9
- package/src/adapters/imports/checkBrowser.ts +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.66.0 - 2026-11-05
|
|
4
|
+
|
|
5
|
+
### Breaking
|
|
6
|
+
|
|
7
|
+
- Import `ImportCompiler` from `@shivaedev/quality/adapters/import-compiler/service.ts` instead of `@shivaedev/quality/adapters/ImportCompiler.ts`. Its methods and single Layer remain the same.
|
|
8
|
+
- Replace direct imports of `analyzeGraph`, `analyzeDepartures` and `checkBrowser` from the corresponding `@shivaedev/quality/adapters/imports/` modules with `graph`, `departures` and `browserChecker` from the corresponding `@shivaedev/quality/adapters/import-compiler/` modules. Their spans now match the service operations: `ImportCompiler.graph`, `ImportCompiler.departures` and `ImportCompiler.browserChecker`.
|
|
9
|
+
- Enforce the service model in every `defineService` folder. Move declarations to `service.ts`, keep each operation in its own sibling file, and export it with `Effect.fn("Service.operation")`, including operations returned by owned-state factories. Yield dependencies inside operations instead of keeping them in initializer state; keep context runners in `adapters/` or `test-support/`. Existing consumers can review and record retained debt with Quality's first-adoption baseline command for `effect/service-model`, `effect/service-folders` and `effect/context-capture`.
|
|
10
|
+
|
|
11
|
+
## 0.65.0 - 2026-11-05
|
|
12
|
+
|
|
13
|
+
### Breaking
|
|
14
|
+
|
|
15
|
+
- Require Effect 4.1.0 and its matching companion packages. Move `effect`, `@effect/platform-node`, `@effect/platform-node-shared`, `@effect/sql-pg`, `@effect/sql-sqlite-node`, `@effect/atom-react` and `@effect/vitest` to exactly 4.1.0 together. The `ambient-runtime` lint rule now points at `SecureRandom` from `effect/crypto`.
|
|
16
|
+
|
|
17
|
+
## 0.64.0 - 2026-11-05
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- Accept supported UI, routing and styling libraries directly in client code while keeping I/O and external-state integrations in adapters.
|
|
22
|
+
|
|
23
|
+
### Breaking
|
|
24
|
+
|
|
25
|
+
- `tests/wait-on-events` also reports wall-clock reads and real timer APIs in stories and reachable kits, and accepts no config exceptions. Replace real waits with controlled clock verbs and engine signals; deadlines that only fail an unfinished wait remain allowed.
|
|
26
|
+
- The `files/folder-names` rule rejects folders named `internal`, including module, package, content, tool-owned and route folders. Move their files into the parent folder or a folder named after their job.
|
|
27
|
+
|
|
3
28
|
## 0.63.0 - 2026-11-05
|
|
4
29
|
|
|
5
30
|
### Added
|
package/README.md
CHANGED
|
@@ -68,6 +68,10 @@ Seed a `quality.config.ts` that registers the custom rule to test the whole gate
|
|
|
68
68
|
|
|
69
69
|
For an existing kit, compose the lower-level helpers through its local test-support facade: `seedTree` and `removeSeededTrees` from `@shivaedev/quality/testing/adapters/tree.ts` manage fixture files; `scanned` and `findingsIn` from `@shivaedev/quality/testing/adapters/imports.ts` collect inventory and run a configured rule; `runQuality` from `@shivaedev/quality/testing/adapters/cli.ts` runs commands in process. Yield `runQuality(root, "lint")` as an Effect in the kit so it uses the story's controlled clock. These helpers use the same engine as the rule story kit.
|
|
70
70
|
|
|
71
|
+
### Import compiler service
|
|
72
|
+
|
|
73
|
+
Import `ImportCompiler` from `@shivaedev/quality/adapters/import-compiler/service.ts`. Its Layer supplies the compiler operations through one `ImportCompiler.layer`; callers yield the service and call `graph`, `departures` or `browserChecker`. Each operation lives beside the service declaration and traces as `ImportCompiler.graph`, `ImportCompiler.departures` or `ImportCompiler.browserChecker`. The service owns no initializer state and requires no additional services.
|
|
74
|
+
|
|
71
75
|
### Dependency pins and repository hygiene
|
|
72
76
|
|
|
73
77
|
`manifests/no-test-kits` rejects runtime packages that expose a `testing` module or declare `@shivaedev/test`, `@shivaedev/test-story`, `@shivaedev/test-sql`, `@shivaedev/test-kits` or `vitest` in dependencies, optional dependencies or peers. It checks explicit export names and targets, including conditions and fallback arrays, and inventoried testing modules exposed through wildcards. Blocked exports and development dependencies pass. Private applications and the test-tooling packages quality, vitest-rerun, test, test-story, test-sql and test-kits are exempt. Move reusable runtime-package helpers into test-kits and keep test dependencies in development dependencies.
|
|
@@ -88,7 +92,7 @@ export default defineConfig({
|
|
|
88
92
|
|
|
89
93
|
`docs/agent-links` requires each inventoried `CLAUDE.md`, including dangling links, to be a symlink to an existing `AGENTS.md` file beside it. Keep the instructions in that sibling file.
|
|
90
94
|
|
|
91
|
-
`effect/service-folders` checks folders directly beneath a `services/` grouping. Each has a `service.ts` with exactly one named exported const initialized by a direct `defineService` call. Type exports may stay; other runtime exports belong in focused files. The existing `effect/service-definition-assembly` check enforces the operation inventory.
|
|
95
|
+
`effect/service-folders` checks every folder with a `defineService` declaration and folders directly beneath a `services/` grouping. Each has a `service.ts` with exactly one named exported const initialized by a direct `defineService` call. Type exports may stay; other runtime exports belong in focused files. The existing `effect/service-definition-assembly` check enforces the operation inventory.
|
|
92
96
|
|
|
93
97
|
### Folders that are not Effect code
|
|
94
98
|
|
|
@@ -132,7 +136,11 @@ Import and local aliases, string literals and templates without substitutions ar
|
|
|
132
136
|
|
|
133
137
|
### Service assemblies
|
|
134
138
|
|
|
135
|
-
`effect/service-definition-assembly` keeps top-level `defineService` declarations as operation inventories. List `id`, `requires`, `initialize` and `methods` directly. Import a named initializer Effect or use `Effect.void`; the methods arrow returns a literal record of imported named operations
|
|
139
|
+
`effect/service-definition-assembly` keeps top-level `defineService` declarations as operation inventories. List `id`, `requires`, `initialize` and `methods` directly. Import a named initializer Effect or use `Effect.void`; the methods arrow returns a literal record of imported named operations. A state factory may capture only owned lifetime state. `genericMethod` can wrap either form. Keep implementation bodies in focused files outside the assembly. `effect/service-model` follows each inventory entry, including state factory returns and piped bodies, to require `Effect.fn("Service.operation")`, with the service name taken from the last segment of its id. Keep each exported operation in its own sibling file, following the repository's filename conventions, including folder prefixes. It checks initializer success types and returned closures for dependencies: repositories, SQL clients, HTTP clients and configuration belong in `requires` and are yielded inside operations. Initializers hold owned caches, refs and locks, and context data captured at setup, such as a caller id or the data-only value of a native `SessionUser`, `Subject` or `Identity` tag. Caller tags are identified by their original declaration names, so import aliases preserve that role; a callable capability inside a caller value remains a dependency. The Layer registration chooses their lifetime.
|
|
140
|
+
|
|
141
|
+
`effect/service-folders` applies wherever a file declares `defineService`, as well as to conventional `services/<name>` folders. Each service has its own folder. Its declaration belongs in `service.ts` with one named service export, beside its operation files. A second declaration beside an existing `service.ts` belongs in a separate service folder.
|
|
142
|
+
|
|
143
|
+
`effect/context-capture` rejects `Effect.provideContext`, `runPromiseWith` and `runForkWith` calls in core code, including imported aliases and destructured runners. It also checks the native Context overload of `Effect.provide`; Layer provision stays available. Yield the environment instead of capturing and re-providing it; runtime bridges belong in `adapters/` or `test-support/`. These service rules permit no config exceptions or inline suppressions. To adopt the policy in an existing repository, review retained findings and record them with `quality baseline write --first-adoption --rule effect/service-model --rule effect/service-folders --rule effect/context-capture`.
|
|
136
144
|
|
|
137
145
|
The rule reports hidden configurations and method records, configuration and operation spreads, computed members, local implementations and inline bodies, including in adapters and tests. It takes no config exceptions or inline suppressions. See the [service guide](https://github.com/ShivaeDev/platform/tree/main/packages/service#1-assemble-the-service-from-focused-files) for the shape.
|
|
138
146
|
|
|
@@ -140,7 +148,7 @@ The rule reports hidden configurations and method records, configuration and ope
|
|
|
140
148
|
|
|
141
149
|
`effect/adapter-imports` reports value imports of non-Effect dependencies, peers and optional dependencies, and Node builtins, at the import site. It includes side-effect imports, value re-exports, literal dynamic imports and `require` calls. Each package is checked against its own manifest; dev-only tools and workspace modules are accepted. Type-only imports and re-exports are accepted, including inline `type` specifiers when every binding is a type.
|
|
142
150
|
|
|
143
|
-
Move the integration into an `adapters/` folder and expose Effect values to the rest of the application. Use `import type` when only a type is needed. Folders named `adapters/` and `test-support/`, Effect packages (`effect` and `@effect/*`, including `@effect/platform-node`), native `@shivaedev/*` framework packages,
|
|
151
|
+
Move the integration into an `adapters/` folder and expose Effect values to the rest of the application. Use `import type` when only a type is needed. Folders named `adapters/` and `test-support/`, Effect packages (`effect` and `@effect/*`, including `@effect/platform-node`), native `@shivaedev/*` framework packages, plain Vitest imports in `.unit` tests, and rendering libraries in `client/` folders are accepted. The client rendering libraries are `react`, `react-dom`, `lucide-react`, `@base-ui/react`, `@tanstack/react-router`, `@tanstack/react-table`, `class-variance-authority`, `cn`, `clsx` and `tailwind-merge`, including their subpath imports. Import UI components, routing and styling helpers directly in client code. Libraries that perform I/O or manage external state, such as `axios`, `better-auth/react`, `@tanstack/react-query` and `zustand`, still need adapters there. Other outside libraries and non-client rendering imports still need adapters; entry points do not exempt imports.
|
|
144
152
|
|
|
145
153
|
The rule refuses config exceptions and inline suppressions. For existing debt, run `quality baseline write --first-adoption --rule effect/adapter-imports`; baseline shards keep one entry per file with its finding count. Run `quality baseline tighten` after moving integrations.
|
|
146
154
|
|
|
@@ -207,7 +215,7 @@ For an application setup script, use `quality setup`. It installs the same hook
|
|
|
207
215
|
|
|
208
216
|
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. `quality baseline write --first-adoption` also records every rule repo-wide when there is no baseline, including rules that permit config exceptions. With an existing baseline, first-adoption writes require explicit `--rule <id>` selections for a policy upgrade; omitting them refuses the write. Ordinary later writes still require changed file selections.
|
|
209
217
|
|
|
210
|
-
|
|
218
|
+
Apps generated by create-app provide `pnpm baseline write --rule <id> --file <path>` for adopting Quality upgrades in existing application code. Review the recorded findings and burn them down with `pnpm baseline tighten`; checks remain strict above the recorded counts. The starter stays free of Quality debt, so newly generated apps start with an empty baseline.
|
|
211
219
|
|
|
212
220
|
Use `pnpm format --rule react/jsx-conditionals` (or `quality fix --rule react/jsx-conditionals`) for mechanical repairs. It extracts a conditional child into a variable before its return when the enclosing intrinsic elements or fragments have no attributes or other children. It preserves the conditional expression, including falsy values such as `0`, and leaves mapped children, component elements and evaluation-sensitive cases for manual repair. Remaining findings are printed and exit 1 even when the baseline covers them. The rule-specific command does not run Biome’s unsafe fixes.
|
|
213
221
|
|
|
@@ -323,7 +331,7 @@ Specs keep expectations visible. `tests/spec-helpers` moves all module-level hel
|
|
|
323
331
|
|
|
324
332
|
Three more rules keep a spec readable as a story, as the [story-testing skill](https://github.com/ShivaeDev/platform/blob/main/packages/skills/skills/story-testing/SKILL.md) describes. Together with `tests/spec-helpers`, `tests/named-values` and `tests/no-limit-imports`, they read files whose test declarations trace to a story kit, whatever their suffix: a `.test` or `.spec` file outside `test-support` that is not a type or unit test, such as `orders.spec.ts`, `pane.dom.test.ts` or `orders.slow.test.ts`. The suffix says where a test sits under `tests/follow`, not whether it is a story, and `tests/story-specs` already holds every such file to the story kit. They exempt the same test-story prerequisites as `tests/story-specs`. `tests/domain-outcomes` reports each use of Effect's `Exit`, `Cause` or `Result` module, each `_tag` read or destructuring, and each object literal tagged `"Success"` or `"Failure"`: the kit's verb or readout returns the outcome in the domain's words, such as `"unauthorized"`, and a trait builds any failing input. A domain's own tagged value, such as `{ _tag: "Resync" }`, passes. `tests/grouped-outcomes` reports each run of two or more consecutive `expect(yield* …)` statements once, at its first statement: write the outcomes as rows of one `outcomes` call.
|
|
325
333
|
|
|
326
|
-
`tests/wait-on-events` checks those story specs and the `test-support/` modules reachable through their runtime imports, including aliases, re-exports and literal dynamic imports. It reports `Effect.sleep`, `
|
|
334
|
+
`tests/wait-on-events` checks those story specs and the `test-support/` modules reachable through their runtime imports, including aliases, re-exports and literal dynamic imports. It reports `Effect.sleep`, real timers (including browser and Node timer imports), wall-clock reads such as `Date.now()` and `performance.now()`, calls to an imported `eventually`, Vitest's fake timers and `vi.waitFor`, including polling loops and quiet windows built from these calls. It accepts no config exceptions. Product modules keep their timers. `TestClock.adjust` and `TestClock.setTime` are reported in specs and accepted in support: when time passing is the behaviour, advance the controlled clock in a kit verb named for it.
|
|
327
335
|
|
|
328
336
|
Settle on the engine's own signal through a kit verb. A deadline bounds a failure but does not prove completion; reaching it must fail the story. The rule accepts failing Effect timeouts, a sleep piped directly into `Effect.andThen(Effect.fail(...))` or `Effect.andThen(Effect.die(...))`, and timeout callbacks that end by calling their enclosing Promise executor's rejection parameter. A resolving timeout or a sleep that ends successfully still guesses when the work is done.
|
|
329
337
|
|
|
@@ -7,7 +7,7 @@ or {
|
|
|
7
7
|
`new Date()` as $match
|
|
8
8
|
} where { register_diagnostic(span=$match, message="Ambient time is banned. Read time through Effect's Clock service.") },
|
|
9
9
|
`Math.random()` as $match where {
|
|
10
|
-
register_diagnostic(span=$match, message="Ambient randomness is banned. Use Effect's
|
|
10
|
+
register_diagnostic(span=$match, message="Ambient randomness is banned. Use Effect's SecureRandom service from effect/crypto for secure values and Random for non-secure values.")
|
|
11
11
|
},
|
|
12
12
|
or {
|
|
13
13
|
`console.$method($...)` as $match,
|
|
@@ -44,7 +44,7 @@ or {
|
|
|
44
44
|
`globalThis.crypto.randomBytes($...)` as $match,
|
|
45
45
|
`randomUUID($...)` as $match,
|
|
46
46
|
`randomBytes($...)` as $match
|
|
47
|
-
} where { $message = "Ambient cryptographic randomness is banned. Read secure values through Effect's
|
|
47
|
+
} where { $message = "Ambient cryptographic randomness is banned. Read secure values through Effect's SecureRandom service from effect/crypto." },
|
|
48
48
|
`crypto.randomBytes($...)` as $match where {
|
|
49
49
|
$program <: contains or {
|
|
50
50
|
`import * as crypto from "node:crypto"`,
|
|
@@ -52,7 +52,7 @@ or {
|
|
|
52
52
|
`import crypto from "node:crypto"`,
|
|
53
53
|
`import crypto from "crypto"`
|
|
54
54
|
},
|
|
55
|
-
$message = "Ambient cryptographic randomness is banned. Read secure values through Effect's
|
|
55
|
+
$message = "Ambient cryptographic randomness is banned. Read secure values through Effect's SecureRandom service from effect/crypto."
|
|
56
56
|
},
|
|
57
57
|
`performance.now()` as $match where { $message = "Ambient performance time is banned. Read time through Effect's Clock service." },
|
|
58
58
|
or {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callerContextData.d.ts","sourceRoot":"","sources":["../../src/adapters/callerContextData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AA2C5B,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,EAAE,CAAC,WAAW,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/F"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
const CALLERS = new Set(["SessionUser", "Subject", "Identity", "SessionUserWithProviderAccounts"]);
|
|
3
|
+
function data(checker, value, seen) {
|
|
4
|
+
if (seen.has(value)) {
|
|
5
|
+
return true;
|
|
6
|
+
}
|
|
7
|
+
seen.add(value);
|
|
8
|
+
if (value.flags & (ts.TypeFlags.Any | ts.TypeFlags.Unknown)) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
if (value.flags
|
|
12
|
+
& (ts.TypeFlags.StringLike
|
|
13
|
+
| ts.TypeFlags.NumberLike
|
|
14
|
+
| ts.TypeFlags.BooleanLike
|
|
15
|
+
| ts.TypeFlags.ESSymbolLike
|
|
16
|
+
| ts.TypeFlags.BigIntLike
|
|
17
|
+
| ts.TypeFlags.Null
|
|
18
|
+
| ts.TypeFlags.Undefined
|
|
19
|
+
| ts.TypeFlags.Never)) {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
if (value.isUnionOrIntersection()) {
|
|
23
|
+
return value.types.every((part) => data(checker, part, seen));
|
|
24
|
+
}
|
|
25
|
+
if (value.getProperty("~effect/Context/Service") !== undefined || value.getProperty("~effect/Context") !== undefined) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
if (value.getProperty("~effect/Effect") !== undefined) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
if (value.getCallSignatures().length > 0 || value.getConstructSignatures().length > 0) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
const element = checker.getIndexTypeOfType(value, ts.IndexKind.Number);
|
|
35
|
+
return element === undefined
|
|
36
|
+
? value.getProperties().every((property) => data(checker, checker.getTypeOfSymbol(property), seen))
|
|
37
|
+
: data(checker, element, seen);
|
|
38
|
+
}
|
|
39
|
+
export function callerContextData(checker, type, name) {
|
|
40
|
+
return CALLERS.has(name) && data(checker, type, new Set());
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=callerContextData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callerContextData.js","sourceRoot":"","sources":["../../src/adapters/callerContextData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,iCAAiC,CAAC,CAAC,CAAC;AAEnG,SAAS,IAAI,CAAC,OAAuB,EAAE,KAAc,EAAE,IAAkB;IACxE,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC;IACb,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAChB,IAAI,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,SAAS,CAAC,GAA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SAAS;QAC3B,CAAC,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC;QACnG,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAuB,EAAE,IAAa,EAAE,IAAY;IACrF,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contextCaptureFindings.d.ts","sourceRoot":"","sources":["../../src/adapters/contextCaptureFindings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAqBpD,eAAO,MAAM,sBAAsB,gEAgClC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { Effect } from "effect";
|
|
3
|
+
import ts from "typescript";
|
|
4
|
+
import { effectApi } from "#adapters/serviceModelSyntax.ts";
|
|
5
|
+
import { effectProgram } from "#rules/effect/program.ts";
|
|
6
|
+
const RUNNERS = ["provideContext", "runPromiseWith", "runForkWith"];
|
|
7
|
+
const PROVIDERS = [...RUNNERS, "provide"];
|
|
8
|
+
function context(type) {
|
|
9
|
+
return type.isUnionOrIntersection() ? type.types.some(context) : type.getProperty("~effect/Context") !== undefined;
|
|
10
|
+
}
|
|
11
|
+
function reprovides(checker, call) {
|
|
12
|
+
if (RUNNERS.some((name) => effectApi(checker, call.expression, name))) {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
if (!effectApi(checker, call.expression, "provide")) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
const environment = call.arguments.at(-1);
|
|
19
|
+
return environment !== undefined && context(checker.getTypeAtLocation(environment));
|
|
20
|
+
}
|
|
21
|
+
export const contextCaptureFindings = Effect.fn("ContextCapture.contextCaptureFindings")((inputs) => Effect.sync(() => {
|
|
22
|
+
const sources = inputs.sources.filter((file) => !/(?:^|\/)(?:adapters|test-support)\//u.test(file.path) && PROVIDERS.some((name) => file.text.includes(name)));
|
|
23
|
+
if (sources.length === 0) {
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
const program = effectProgram({ ...inputs, sources });
|
|
27
|
+
const checker = program.getTypeChecker();
|
|
28
|
+
return sources.flatMap((file) => {
|
|
29
|
+
const source = program.getSourceFile(join(inputs.root, file.path));
|
|
30
|
+
if (source === undefined) {
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
const syntax = source;
|
|
34
|
+
const findings = [];
|
|
35
|
+
function visit(node) {
|
|
36
|
+
if (ts.isCallExpression(node) && reprovides(checker, node)) {
|
|
37
|
+
findings.push({
|
|
38
|
+
file: file.path,
|
|
39
|
+
line: syntax.getLineAndCharacterOfPosition(node.getStart(syntax)).line + 1,
|
|
40
|
+
message: "Do not re-provide a captured Effect context in core code. Declare service requirements once and yield dependencies and the caller from the environment. Register the Layer at the host; put runtime bridges in adapters/ or test-support/.",
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
ts.forEachChild(node, visit);
|
|
44
|
+
}
|
|
45
|
+
visit(source);
|
|
46
|
+
return findings;
|
|
47
|
+
});
|
|
48
|
+
}));
|
|
49
|
+
//# sourceMappingURL=contextCaptureFindings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contextCaptureFindings.js","sourceRoot":"","sources":["../../src/adapters/contextCaptureFindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI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AC,CAAC;YACJ,CAAC;YACD,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC9B,CAAC;QACD,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,OAAO,QAAQ,CAAC;IACjB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browserChecker.d.ts","sourceRoot":"","sources":["../../../src/adapters/import-compiler/browserChecker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAGjC,eAAO,MAAM,cAAc,wEAAyH,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { browserChecker as createBrowserChecker } from "#adapters/imports/browserChecker.ts";
|
|
3
|
+
export const browserChecker = Effect.fn("ImportCompiler.browserChecker")((source) => Effect.sync(() => createBrowserChecker(source)));
|
|
4
|
+
//# sourceMappingURL=browserChecker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browserChecker.js","sourceRoot":"","sources":["../../../src/adapters/import-compiler/browserChecker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE7F,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,EAAE,CAAC,+BAA+B,CAAC,CAAC,CAAC,MAAqB,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import type { WorkspacePackage } from "#imports/workspace.ts";
|
|
3
|
+
import type { RuleInputs } from "#rule.ts";
|
|
4
|
+
export declare const departures: (inputs: RuleInputs, packages: readonly WorkspacePackage[]) => Effect.Effect<readonly import("../../imports/departures.ts").Departure[], import("../ImportAnalysisFailure.ts").ImportAnalysisFailure, never>;
|
|
5
|
+
//# sourceMappingURL=departures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"departures.d.ts","sourceRoot":"","sources":["../../../src/adapters/import-compiler/departures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,eAAO,MAAM,UAAU,8MAEtB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { analysisFailure } from "#adapters/imports/analysisFailure.ts";
|
|
3
|
+
import { departures as findDepartures } from "#adapters/imports/departures.ts";
|
|
4
|
+
export const departures = Effect.fn("ImportCompiler.departures")((inputs, packages) => Effect.try({ catch: (cause) => analysisFailure(inputs.root, cause), try: () => findDepartures(inputs, packages) }));
|
|
5
|
+
//# sourceMappingURL=departures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"departures.js","sourceRoot":"","sources":["../../../src/adapters/import-compiler/departures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAI/E,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,EAAE,CAAC,2BAA2B,CAAC,CAAC,CAAC,MAAkB,EAAE,QAAqC,EAAE,EAAE,CAC9H,MAAM,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,CAClH,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import type { RuleInputs } from "#rule.ts";
|
|
3
|
+
export declare const graph: (inputs: RuleInputs) => Effect.Effect<Pick<import("../../imports/graph.ts").ImportGraph, "configFindings" | "edges" | "modules" | "unresolved">, import("../ImportAnalysisFailure.ts").ImportAnalysisFailure, never>;
|
|
4
|
+
//# sourceMappingURL=graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../src/adapters/import-compiler/graph.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,eAAO,MAAM,KAAK,sNAEjB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { realpathSync } from "node:fs";
|
|
2
|
+
import { Effect } from "effect";
|
|
3
|
+
import { analysisFailure } from "#adapters/imports/analysisFailure.ts";
|
|
4
|
+
import { graph as buildGraph } from "#adapters/imports/graph.ts";
|
|
5
|
+
export const graph = Effect.fn("ImportCompiler.graph")((inputs) => Effect.try({ catch: (cause) => analysisFailure(inputs.root, cause), try: () => buildGraph(inputs, realpathSync(inputs.root)) }));
|
|
6
|
+
//# sourceMappingURL=graph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.js","sourceRoot":"","sources":["../../../src/adapters/import-compiler/graph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAGjE,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,EAAE,CAAC,sBAAsB,CAAC,CAAC,CAAC,MAAkB,EAAE,EAAE,CAC7E,MAAM,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAC/H,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import type ts from "typescript";
|
|
3
|
+
export declare const ImportCompiler: import("effect/Context").Service<"@shivaedev/quality/ImportCompiler", Readonly<{
|
|
4
|
+
readonly browserChecker: (source: ts.SourceFile) => Effect.Effect<ts.TypeChecker, never, never>;
|
|
5
|
+
readonly departures: (inputs: import("../../rule.ts").RuleInputs, packages: readonly import("../../imports/workspace.ts").WorkspacePackage[]) => Effect.Effect<readonly import("../../imports/departures.ts").Departure[], import("../ImportAnalysisFailure.ts").ImportAnalysisFailure, never>;
|
|
6
|
+
readonly graph: (inputs: import("../../rule.ts").RuleInputs) => Effect.Effect<Pick<import("../../imports/graph.ts").ImportGraph, "configFindings" | "edges" | "modules" | "unresolved">, import("../ImportAnalysisFailure.ts").ImportAnalysisFailure, never>;
|
|
7
|
+
}>> & {
|
|
8
|
+
readonly layer: import("effect/Layer").Layer<"@shivaedev/quality/ImportCompiler", never, never>;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/adapters/import-compiler/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAMjC,eAAO,MAAM,cAAc;;;;;;CASzB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { defineService } from "@shivaedev/service/defineService.ts";
|
|
3
|
+
import { browserChecker } from "./browserChecker.js";
|
|
4
|
+
import { departures } from "./departures.js";
|
|
5
|
+
import { graph } from "./graph.js";
|
|
6
|
+
export const ImportCompiler = defineService({
|
|
7
|
+
id: "@shivaedev/quality/ImportCompiler",
|
|
8
|
+
initialize: Effect.void,
|
|
9
|
+
methods: () => ({
|
|
10
|
+
browserChecker: browserChecker,
|
|
11
|
+
departures,
|
|
12
|
+
graph,
|
|
13
|
+
}),
|
|
14
|
+
requires: [],
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/adapters/import-compiler/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC;IAC3C,EAAE,EAAE,mCAAmC;IACvC,UAAU,EAAE,MAAM,CAAC,IAAI;IACvB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;QACf,cAAc,EAAE,cAAiF;QACjG,UAAU;QACV,KAAK;KACL,CAAC;IACF,QAAQ,EAAE,EAAE;CACZ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initializerDependency.d.ts","sourceRoot":"","sources":["../../src/adapters/initializerDependency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AA8B5B,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,WAAW,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,IAAI,eAAqB,GAAG,OAAO,CA0BhH"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
import { effectSuccess } from "#adapters/serviceModelSyntax.ts";
|
|
3
|
+
const DATA = ts.TypeFlags.StringLike
|
|
4
|
+
| ts.TypeFlags.NumberLike
|
|
5
|
+
| ts.TypeFlags.BooleanLike
|
|
6
|
+
| ts.TypeFlags.ESSymbolLike
|
|
7
|
+
| ts.TypeFlags.BigIntLike
|
|
8
|
+
| ts.TypeFlags.Null
|
|
9
|
+
| ts.TypeFlags.Undefined
|
|
10
|
+
| ts.TypeFlags.Void
|
|
11
|
+
| ts.TypeFlags.Never
|
|
12
|
+
| ts.TypeFlags.Unknown
|
|
13
|
+
| ts.TypeFlags.Any;
|
|
14
|
+
const OWNED = /\/effect\/(?:src|dist(?:\/dts)?)\/(?:Ref|SynchronizedRef|ScopedRef|Cache|ScopedCache|Semaphore|Deferred)\.(?:d\.)?ts$/u;
|
|
15
|
+
const COLLECTIONS = new Set(["Map", "ReadonlyMap", "Set", "ReadonlySet", "Array", "ReadonlyArray"]);
|
|
16
|
+
function owned(type) {
|
|
17
|
+
const symbol = type.getSymbol();
|
|
18
|
+
return (symbol?.declarations ?? []).some((declaration) => {
|
|
19
|
+
const path = declaration.getSourceFile().fileName.replaceAll("\\", "/");
|
|
20
|
+
return OWNED.test(path) || (COLLECTIONS.has(symbol?.name ?? "") && /\/lib\.[^/]+\.d\.ts$/u.test(path));
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function reference(type) {
|
|
24
|
+
return "objectFlags" in type && typeof type.objectFlags === "number" && (type.objectFlags & ts.ObjectFlags.Reference) !== 0;
|
|
25
|
+
}
|
|
26
|
+
export function initializerDependency(checker, type, seen = new Set()) {
|
|
27
|
+
if (seen.has(type) || type.flags & DATA) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
seen.add(type);
|
|
31
|
+
if (type.isUnionOrIntersection()) {
|
|
32
|
+
return type.types.some((part) => initializerDependency(checker, part, seen));
|
|
33
|
+
}
|
|
34
|
+
const success = effectSuccess(checker, type);
|
|
35
|
+
if (success !== undefined) {
|
|
36
|
+
return initializerDependency(checker, success, seen);
|
|
37
|
+
}
|
|
38
|
+
if (owned(type)) {
|
|
39
|
+
const arguments_ = reference(type) ? checker.getTypeArguments(type) : [];
|
|
40
|
+
return arguments_.some((argument) => initializerDependency(checker, argument, seen));
|
|
41
|
+
}
|
|
42
|
+
for (const signature of type.getCallSignatures()) {
|
|
43
|
+
const result = signature.getReturnType();
|
|
44
|
+
if (effectSuccess(checker, result) !== undefined || (result.getProperty("then") !== undefined && result.getSymbol()?.name === "Promise")) {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
if (initializerDependency(checker, result, seen)) {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return type.getProperties().some((property) => initializerDependency(checker, checker.getTypeOfSymbol(property), seen));
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=initializerDependency.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initializerDependency.js","sourceRoot":"","sources":["../../src/adapters/initializerDependency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,MAAM,IAAI,GACT,EAAE,CAAC,SAAS,CAAC,UAAU;MACrB,EAAE,CAAC,SAAS,CAAC,UAAU;MACv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,EAAE,IAAI,KAAK,SAAS,CAAC,EAAE,CAAC;YAC1I,OAAO,IAAI,CAAC;QACb,CAAC;QACD,IAAI,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;YAClD,OAAO,IAAI,CAAC;QACb,CAAC;IACF,CAAC;IACD,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,qBAAqB,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AACzH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outsideImportFindings.d.ts","sourceRoot":"","sources":["../../src/adapters/outsideImportFindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAMhF,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"outsideImportFindings.d.ts","sourceRoot":"","sources":["../../src/adapters/outsideImportFindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAMhF,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AA0BpD,eAAO,MAAM,qBAAqB,yFA6ChC,CAAC"}
|
|
@@ -4,13 +4,25 @@ import { importGraph } from "#imports/graph.ts";
|
|
|
4
4
|
import { packageNameOf } from "#imports/packageName.ts";
|
|
5
5
|
import { packageOf } from "#imports/workspace.ts";
|
|
6
6
|
import { testName } from "#naming/testName.ts";
|
|
7
|
+
const CLIENT_RENDERING_LIBRARIES = new Set([
|
|
8
|
+
"react",
|
|
9
|
+
"react-dom",
|
|
10
|
+
"lucide-react",
|
|
11
|
+
"@base-ui/react",
|
|
12
|
+
"@tanstack/react-router",
|
|
13
|
+
"@tanstack/react-table",
|
|
14
|
+
"class-variance-authority",
|
|
15
|
+
"cn",
|
|
16
|
+
"clsx",
|
|
17
|
+
"tailwind-merge",
|
|
18
|
+
]);
|
|
7
19
|
function exempt(path, name) {
|
|
8
20
|
return (/(?:^|\/)(?:adapters|test-support)\//u.test(path)
|
|
9
21
|
|| (name === "vitest" && testName(path)?.modifiers.includes("unit") === true)
|
|
10
22
|
|| name === "effect"
|
|
11
23
|
|| name.startsWith("@effect/")
|
|
12
24
|
|| name.startsWith("@shivaedev/")
|
|
13
|
-
|| ((name
|
|
25
|
+
|| (CLIENT_RENDERING_LIBRARIES.has(name) && /(?:^|\/)client\//u.test(path)));
|
|
14
26
|
}
|
|
15
27
|
export const outsideImportFindings = Effect.fn("Imports.outsideImportFindings")(function* (inputs) {
|
|
16
28
|
const graph = yield* importGraph(inputs);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outsideImportFindings.js","sourceRoot":"","sources":["../../src/adapters/outsideImportFindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/C,SAAS,MAAM,CAAC,IAAY,EAAE,IAAY;IACzC,OAAO,CACN,sCAAsC,CAAC,IAAI,CAAC,IAAI,CAAC;WAC9C,CAAC,IAAI,KAAK,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,QAAQ,CA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+33,7 @@ export function serviceDefinitionProblems(definition, effects, imports, allowedB
|
|
|
33
33
|
for (const operation of methods?.properties ?? []) {
|
|
34
34
|
if (!isOperationReference(operation, imports, generics)) {
|
|
35
35
|
found.push({
|
|
36
|
-
message: "Reference a named operation export
|
|
36
|
+
message: "Reference a named Effect.fn operation export that yields its dependencies. Use a state factory only for owned lifetime state.",
|
|
37
37
|
node: operation,
|
|
38
38
|
});
|
|
39
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serviceDefinitionProblems.js","sourceRoot":"","sources":["../../src/adapters/serviceDefinitionProblems.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EACN,qBAAqB,EACrB,YAAY,EACZ,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,gBAAgB,GAChB,MAAM,oCAAoC,CAAC;AAO5C,MAAM,UAAU,yBAAyB,CACxC,UAA6B,EAC7B,OAA4B,EAC5B,OAA4B,EAC5B,aAA2B,EAC3B,QAA6B;IAE7B,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACvC,IAAI,MAAM,KAAK,SAAS,IAAI,CAAC,EAAE,CAAC,yBAAyB,CAAC,MAAM,CAAC,EAAE,CAAC;QACnE,OAAO,CAAC,EAAE,OAAO,EAAE,+BAA+B,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;IACzE,CAAC;IACD,MAAM,KAAK,GAA6B,qBAAqB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACpF,OAAO,EAAE,sHAAsH;QAC/H,IAAI;KACJ,CAAC,CAAC,CAAC;IACJ,MAAM,UAAU,GAAG,eAAe,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACzD,IACC,UAAU,KAAK,SAAS;WACrB,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;WACvG,CAAC,YAAY,CAAC,gBAAgB,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,EACtD,CAAC;QACF,KAAK,CAAC,IAAI,CAAC;YACV,OAAO,EAAE,0DAA0D;YACnE,IAAI,EAAE,UAAU;SAChB,CAAC,CAAC;IACJ,CAAC;IACD,MAAM,YAAY,GAAG,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACxD,MAAM,OAAO,GAAG,YAAY,IAAI,sBAAsB,CAAC,YAAY,CAAC,CAAC;IACrE,IAAI,YAAY,KAAK,SAAS,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QACzD,KAAK,CAAC,IAAI,CAAC;YACV,OAAO,EAAE,+CAA+C;YACxD,IAAI,EAAE,YAAY;SAClB,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACd,CAAC;IACD,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAChC,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACjC,CAAC;IACD,KAAK,MAAM,SAAS,IAAI,OAAO,EAAE,UAAU,IAAI,EAAE,EAAE,CAAC;QACnD,IAAI,CAAC,oBAAoB,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC;YACzD,KAAK,CAAC,IAAI,CAAC;gBACV,OAAO,EAAE
|
|
1
|
+
{"version":3,"file":"serviceDefinitionProblems.js","sourceRoot":"","sources":["../../src/adapters/serviceDefinitionProblems.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EACN,qBAAqB,EACrB,YAAY,EACZ,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,gBAAgB,GAChB,MAAM,oCAAoC,CAAC;AAO5C,MAAM,UAAU,yBAAyB,CACxC,UAA6B,EAC7B,OAA4B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AAC;IACd,CAAC;IACD,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAChC,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACjC,CAAC;IACD,KAAK,MAAM,SAAS,IAAI,OAAO,EAAE,UAAU,IAAI,EAAE,EAAE,CAAC;QACnD,IAAI,CAAC,oBAAoB,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC;YACzD,KAAK,CAAC,IAAI,CAAC;gBACV,OAAO,EAAE,+HAA+H;gBACxI,IAAI,EAAE,SAAS;aACf,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serviceFolderFindings.d.ts","sourceRoot":"","sources":["../../src/adapters/serviceFolderFindings.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAc,MAAM,UAAU,CAAC;AAiDhE,wBAAgB,qBAAqB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,UAAU,GAAG,SAAS,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"serviceFolderFindings.d.ts","sourceRoot":"","sources":["../../src/adapters/serviceFolderFindings.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAc,MAAM,UAAU,CAAC;AAiDhE,wBAAgB,qBAAqB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,UAAU,GAAG,SAAS,OAAO,EAAE,CAmCxF"}
|
|
@@ -48,6 +48,18 @@ export function serviceFolderFindings({ files, sources }) {
|
|
|
48
48
|
return match === undefined ? [] : [match];
|
|
49
49
|
}));
|
|
50
50
|
const findings = [];
|
|
51
|
+
for (const file of sources) {
|
|
52
|
+
const source = parse(file);
|
|
53
|
+
if (source !== undefined && directServiceDefinitions(source, serviceAssemblyImports(source).definitions).length > 0) {
|
|
54
|
+
folders.add(posix.dirname(file.path));
|
|
55
|
+
if (posix.basename(file.path) !== "service.ts" && files.includes(`${posix.dirname(file.path)}/service.ts`)) {
|
|
56
|
+
findings.push({
|
|
57
|
+
file: file.path,
|
|
58
|
+
message: "Give each service its own folder and move this declaration to its service.ts. Keep that service's operations in focused sibling files.",
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
51
63
|
for (const folder of folders) {
|
|
52
64
|
const service = `${folder}/service.ts`;
|
|
53
65
|
if (!files.includes(service)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serviceFolderFindings.js","sourceRoot":"","sources":["../../src/adapters/serviceFolderFindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEhG,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,SAAS,QAAQ,CAAC,SAAuB;IACxC,OAAO,EAAE,CAAC,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,CAAC;AACnJ,CAAC;AAED,SAAS,eAAe,CAAC,IAAa;IACrC,IAAI,CAAC,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;QACtD,OAAO,KAAK,CAAC;IACd,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC;IACjC,OAAO,MAAM,KAAK,SAAS,IAAI,CAAC,EA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