@jterrazz/test 16.1.1 → 17.0.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.
Files changed (304) hide show
  1. package/README.md +45 -171
  2. package/dist/browser/index.js +2 -2980
  3. package/dist/browser/services.js +2 -0
  4. package/dist/browser/stubs.js +2 -0
  5. package/dist/checker.d.ts +6 -1
  6. package/dist/checker.js +4534 -2628
  7. package/dist/config.d.ts +40 -0
  8. package/dist/config.js +309 -0
  9. package/dist/in-place.global-setup.d.ts +11 -0
  10. package/dist/in-place.global-setup.js +21 -0
  11. package/dist/index.d.ts +1653 -3004
  12. package/dist/index.js +5226 -3845
  13. package/dist/mobile-session.global-setup.d.ts +14 -0
  14. package/dist/mobile-session.global-setup.js +31 -0
  15. package/dist/oxlint.cjs +6069 -5634
  16. package/dist/oxlint.d.cts +43 -7212
  17. package/dist/oxlint.d.ts +43 -7212
  18. package/dist/oxlint.js +6127 -5693
  19. package/dist/route-coverage.global-setup.d.ts +42 -0
  20. package/dist/route-coverage.global-setup.js +2 -0
  21. package/dist/services.d.ts +3 -0
  22. package/dist/services.global-setup.d.ts +43 -0
  23. package/dist/services.global-setup.js +2 -0
  24. package/dist/services.js +597 -0
  25. package/dist/shared-appium.adapter.js +428 -0
  26. package/dist/shared-artifacts.js +32 -0
  27. package/dist/shared-chapter.js +7 -0
  28. package/dist/shared-container.port.d.ts +31 -0
  29. package/dist/shared-derived-projects.js +58 -0
  30. package/dist/shared-device.port.d.ts +189 -0
  31. package/dist/shared-exchange.js +447 -0
  32. package/dist/shared-in-place.js +172 -0
  33. package/dist/shared-index.browser.js +3191 -0
  34. package/dist/shared-index.services.d.ts +346 -0
  35. package/dist/shared-index.stubs.d.ts +287 -0
  36. package/dist/shared-json-shape.js +17 -0
  37. package/dist/shared-landmarks.js +71 -0
  38. package/dist/shared-ledger.js +68 -0
  39. package/dist/shared-literate-plugin.js +183 -0
  40. package/dist/shared-manifest.js +1321 -0
  41. package/dist/shared-pause.js +11 -0
  42. package/dist/shared-peer.js +88 -0
  43. package/dist/shared-playwright.adapter.js +330 -0
  44. package/dist/shared-process.adapter.js +74 -0
  45. package/dist/shared-refusal.js +35 -0
  46. package/dist/shared-resolve.js +24 -0
  47. package/dist/shared-route-coverage.global-setup.js +187 -0
  48. package/dist/shared-scenario-failure.js +198 -0
  49. package/dist/shared-serve.js +365 -0
  50. package/dist/shared-service-images.js +10 -0
  51. package/dist/shared-services.global-setup.js +179 -0
  52. package/dist/shared-session-ledger.js +301 -0
  53. package/dist/shared-setup-entry.js +12 -0
  54. package/dist/shared-source-scan.js +133 -0
  55. package/dist/shared-spec-document.js +365 -0
  56. package/dist/shared-specifications.js +26 -0
  57. package/dist/shared-stream-body.js +130 -0
  58. package/dist/shared-stub-server.js +190 -0
  59. package/dist/shared-temp-root.global-setup.js +80 -0
  60. package/dist/shared-test-baseline.js +26 -0
  61. package/dist/shared-test-section.js +58 -0
  62. package/dist/shared-testcontainers.adapter.js +203 -0
  63. package/dist/shared-tokens.js +55 -0
  64. package/dist/shared-yaml-document.js +119 -0
  65. package/dist/stubs.d.ts +2 -0
  66. package/dist/stubs.js +657 -0
  67. package/dist/temp-root.global-setup.d.ts +7 -0
  68. package/dist/temp-root.global-setup.js +2 -0
  69. package/dist/vitest.d.ts +97 -163
  70. package/dist/vitest.js +373 -525
  71. package/docs/README.md +82 -36
  72. package/docs/concepts/architecture.md +118 -0
  73. package/docs/concepts/conventions.md +333 -0
  74. package/docs/guides/api-specs.md +374 -0
  75. package/docs/guides/cli-specs.md +564 -0
  76. package/docs/guides/component-specs.md +252 -0
  77. package/docs/guides/develop.md +94 -0
  78. package/docs/guides/integration-specs.md +181 -0
  79. package/docs/guides/job-specs.md +180 -0
  80. package/docs/guides/lint-specs.md +174 -0
  81. package/docs/guides/mobile-specs.md +319 -0
  82. package/docs/guides/module-tests.md +149 -0
  83. package/docs/guides/release.md +43 -0
  84. package/docs/guides/spec-documents.md +189 -0
  85. package/docs/guides/website-specs.md +413 -0
  86. package/docs/reference/assertions.md +345 -0
  87. package/docs/reference/glossary.md +20 -0
  88. package/docs/reference/linting.md +483 -0
  89. package/docs/reference/services.md +236 -0
  90. package/docs/reference/stubs.md +498 -0
  91. package/docs/reference/time-and-doubles.md +137 -0
  92. package/docs/reference/tokens.md +258 -0
  93. package/docs/reference/visitor.md +221 -0
  94. package/docs/start/getting-started.md +187 -0
  95. package/docs/start/set-up-a-project.md +214 -0
  96. package/package.json +50 -30
  97. package/schema/spec.schema.json +43 -17
  98. package/dist/appium.adapter.js +0 -489
  99. package/dist/artifacts.js +0 -32
  100. package/dist/fixtures.js +0 -110
  101. package/dist/literate.js +0 -1747
  102. package/dist/match.js +0 -804
  103. package/dist/playwright.adapter.js +0 -438
  104. package/dist/server.js +0 -160
  105. package/dist/stream.js +0 -321
  106. package/dist/substring-warning.js +0 -282
  107. package/docs/01-architecture.md +0 -95
  108. package/docs/02-developing.md +0 -351
  109. package/docs/03-testing.md +0 -495
  110. package/docs/04-operating.md +0 -101
  111. package/docs/05-module-tests.md +0 -152
  112. package/docs/06-integration.md +0 -180
  113. package/docs/07-component.md +0 -246
  114. package/docs/08-website.md +0 -404
  115. package/docs/09-mobile.md +0 -270
  116. package/docs/10-api.md +0 -264
  117. package/docs/11-jobs.md +0 -157
  118. package/docs/12-cli.md +0 -677
  119. package/docs/13-elements.md +0 -248
  120. package/docs/14-assertions.md +0 -314
  121. package/docs/15-tokens.md +0 -253
  122. package/docs/16-contracts.md +0 -438
  123. package/docs/17-services.md +0 -188
  124. package/docs/18-conventions.md +0 -332
  125. package/docs/19-linting.md +0 -512
  126. package/docs/decisions/001-v9-conventions-on-three-channels.md +0 -50
  127. package/docs/decisions/002-the-statique-channel-holds-only-what-upstream-does-not.md +0 -49
  128. package/docs/decisions/003-a-rendered-component-is-a-facet-on-vitest-browser-mode.md +0 -84
  129. package/docs/decisions/004-a-module-against-real-services-or-a-golden-is-the-integration-facet.md +0 -81
  130. package/docs/decisions/005-the-doubles-ladder-is-closed.md +0 -86
  131. package/docs/decisions/006-the-catalogue-reaches-a-file-by-its-role.md +0 -245
  132. package/docs/decisions/007-compose-mode-leaves-the-package.md +0 -53
  133. package/docs/decisions/008-vitest-5-node-24-and-the-native-seams-as-optional-peers.md +0 -75
  134. package/docs/decisions/_template.md +0 -22
  135. package/docs/reference/classes/Matcher.md +0 -120
  136. package/docs/reference/classes/ProcessHandle.md +0 -368
  137. package/docs/reference/functions/defineContract.md +0 -39
  138. package/docs/reference/functions/defineContracts.md +0 -36
  139. package/docs/reference/functions/disabled.md +0 -28
  140. package/docs/reference/functions/enabled.md +0 -20
  141. package/docs/reference/functions/focused.md +0 -26
  142. package/docs/reference/functions/mockOf.md +0 -79
  143. package/docs/reference/functions/postgres.md +0 -31
  144. package/docs/reference/functions/process.md +0 -33
  145. package/docs/reference/functions/redis.md +0 -28
  146. package/docs/reference/functions/required.md +0 -41
  147. package/docs/reference/functions/selected.md +0 -26
  148. package/docs/reference/functions/sqlite.md +0 -33
  149. package/docs/reference/functions/testId.md +0 -20
  150. package/docs/reference/functions/text.md +0 -40
  151. package/docs/reference/functions/valued.md +0 -28
  152. package/docs/reference/functions/waitUntil.md +0 -46
  153. package/docs/reference/functions/within.md +0 -29
  154. package/docs/reference/index.md +0 -196
  155. package/docs/reference/interfaces/BaseResult.md +0 -87
  156. package/docs/reference/interfaces/CallResult.md +0 -160
  157. package/docs/reference/interfaces/CaptureScope.md +0 -82
  158. package/docs/reference/interfaces/CliResult.md +0 -253
  159. package/docs/reference/interfaces/ContainerAccessor.md +0 -166
  160. package/docs/reference/interfaces/DirectoryAccessor.md +0 -33
  161. package/docs/reference/interfaces/FetchResult.md +0 -180
  162. package/docs/reference/interfaces/FilesystemAccessor.md +0 -46
  163. package/docs/reference/interfaces/HttpResult.md +0 -126
  164. package/docs/reference/interfaces/JsonAccessor.md +0 -46
  165. package/docs/reference/interfaces/PageResult.md +0 -356
  166. package/docs/reference/interfaces/RenderResult.md +0 -72
  167. package/docs/reference/interfaces/RenderedText.md +0 -110
  168. package/docs/reference/interfaces/ResponseAccessor.md +0 -47
  169. package/docs/reference/interfaces/ScreenResult.md +0 -128
  170. package/docs/reference/interfaces/TableAccessor.md +0 -26
  171. package/docs/reference/interfaces/TextAccessor.md +0 -96
  172. package/docs/reference/type-aliases/ApiHandle.md +0 -68
  173. package/docs/reference/type-aliases/ApiSpecification.md +0 -213
  174. package/docs/reference/type-aliases/ApiSpecificationOptions.md +0 -68
  175. package/docs/reference/type-aliases/BrowserConsoleMessage.md +0 -30
  176. package/docs/reference/type-aliases/BrowserLinkElement.md +0 -50
  177. package/docs/reference/type-aliases/BrowserMetaElement.md +0 -40
  178. package/docs/reference/type-aliases/BrowserOpenOptions.md +0 -87
  179. package/docs/reference/type-aliases/BrowserPage.md +0 -132
  180. package/docs/reference/type-aliases/BrowserPort.md +0 -51
  181. package/docs/reference/type-aliases/CliEnv.md +0 -11
  182. package/docs/reference/type-aliases/CliHandle.md +0 -80
  183. package/docs/reference/type-aliases/CliInput.md +0 -36
  184. package/docs/reference/type-aliases/CliOutput.md +0 -46
  185. package/docs/reference/type-aliases/CliPort.md +0 -58
  186. package/docs/reference/type-aliases/CliSpecification.md +0 -144
  187. package/docs/reference/type-aliases/CliSpecificationOptions.md +0 -134
  188. package/docs/reference/type-aliases/ComponentChain.md +0 -156
  189. package/docs/reference/type-aliases/ComponentScenario.md +0 -20
  190. package/docs/reference/type-aliases/ComponentUi.md +0 -47
  191. package/docs/reference/type-aliases/ComponentVisitor.md +0 -10
  192. package/docs/reference/type-aliases/ContainerPort.md +0 -113
  193. package/docs/reference/type-aliases/Contract.md +0 -68
  194. package/docs/reference/type-aliases/ContractInput.md +0 -13
  195. package/docs/reference/type-aliases/ContractRequest.md +0 -95
  196. package/docs/reference/type-aliases/ContractResponder.md +0 -23
  197. package/docs/reference/type-aliases/ContractResponse.md +0 -78
  198. package/docs/reference/type-aliases/ContractResponseValue.md +0 -13
  199. package/docs/reference/type-aliases/Contracts.md +0 -48
  200. package/docs/reference/type-aliases/DatabaseKeys.md +0 -16
  201. package/docs/reference/type-aliases/DatabasePort.md +0 -72
  202. package/docs/reference/type-aliases/DeviceOpenOptions.md +0 -46
  203. package/docs/reference/type-aliases/DevicePort.md +0 -51
  204. package/docs/reference/type-aliases/DeviceScreen.md +0 -32
  205. package/docs/reference/type-aliases/DeviceTimeouts.md +0 -39
  206. package/docs/reference/type-aliases/DockerSpecConfig.md +0 -43
  207. package/docs/reference/type-aliases/DomMount.md +0 -21
  208. package/docs/reference/type-aliases/ElementKind.md +0 -27
  209. package/docs/reference/type-aliases/ElementMatch.md +0 -74
  210. package/docs/reference/type-aliases/ElementOptions.md +0 -29
  211. package/docs/reference/type-aliases/ElementRef.md +0 -128
  212. package/docs/reference/type-aliases/ExecOptions.md +0 -37
  213. package/docs/reference/type-aliases/FileAccessor.md +0 -54
  214. package/docs/reference/type-aliases/HonoApp.md +0 -31
  215. package/docs/reference/type-aliases/HttpContractFilter.md +0 -49
  216. package/docs/reference/type-aliases/HttpResponseInit.md +0 -46
  217. package/docs/reference/type-aliases/HttpStreamInit.md +0 -58
  218. package/docs/reference/type-aliases/IntegrationHandle.md +0 -46
  219. package/docs/reference/type-aliases/IntegrationSpecification.md +0 -111
  220. package/docs/reference/type-aliases/IntegrationSpecificationOptions.md +0 -42
  221. package/docs/reference/type-aliases/Intercept.md +0 -19
  222. package/docs/reference/type-aliases/InterceptOptions.md +0 -28
  223. package/docs/reference/type-aliases/InterceptScope.md +0 -11
  224. package/docs/reference/type-aliases/IsolationStrategy.md +0 -75
  225. package/docs/reference/type-aliases/JobHandle.md +0 -34
  226. package/docs/reference/type-aliases/JobsHandle.md +0 -57
  227. package/docs/reference/type-aliases/JobsResult.md +0 -16
  228. package/docs/reference/type-aliases/JobsSpecification.md +0 -94
  229. package/docs/reference/type-aliases/JobsSpecificationOptions.md +0 -56
  230. package/docs/reference/type-aliases/LandmarkKind.md +0 -20
  231. package/docs/reference/type-aliases/LiterateRunFlags.md +0 -27
  232. package/docs/reference/type-aliases/LiterateServeRegistration.md +0 -70
  233. package/docs/reference/type-aliases/MatchFixtureOptions.md +0 -27
  234. package/docs/reference/type-aliases/MatchableRequest.md +0 -61
  235. package/docs/reference/type-aliases/MatcherKind.md +0 -34
  236. package/docs/reference/type-aliases/MobileBackendOptions.md +0 -28
  237. package/docs/reference/type-aliases/MobileElementKind.md +0 -14
  238. package/docs/reference/type-aliases/MobileElementMatch.md +0 -60
  239. package/docs/reference/type-aliases/MobileElementRef.md +0 -20
  240. package/docs/reference/type-aliases/MobileHandle.md +0 -65
  241. package/docs/reference/type-aliases/MobileScenario.md +0 -20
  242. package/docs/reference/type-aliases/MobileSpecification.md +0 -51
  243. package/docs/reference/type-aliases/MobileSpecificationOptions.md +0 -126
  244. package/docs/reference/type-aliases/MobileVisitor.md +0 -81
  245. package/docs/reference/type-aliases/MockOfOptions.md +0 -26
  246. package/docs/reference/type-aliases/MockPort.md +0 -10
  247. package/docs/reference/type-aliases/PinnedClock.md +0 -10
  248. package/docs/reference/type-aliases/PostgresOptions.md +0 -32
  249. package/docs/reference/type-aliases/ProcessOptions.md +0 -112
  250. package/docs/reference/type-aliases/RedisOptions.md +0 -20
  251. package/docs/reference/type-aliases/RenderSubject.md +0 -12
  252. package/docs/reference/type-aliases/ScreenNode.md +0 -67
  253. package/docs/reference/type-aliases/ServerPort.md +0 -36
  254. package/docs/reference/type-aliases/ServerResponse.md +0 -46
  255. package/docs/reference/type-aliases/ServerSpec.md +0 -21
  256. package/docs/reference/type-aliases/ServiceHandle.md +0 -216
  257. package/docs/reference/type-aliases/ServiceRecord.md +0 -12
  258. package/docs/reference/type-aliases/SpecDocument.md +0 -84
  259. package/docs/reference/type-aliases/SpecEnvToken.md +0 -21
  260. package/docs/reference/type-aliases/SpecFileAssertion.md +0 -27
  261. package/docs/reference/type-aliases/SpecFixture.md +0 -30
  262. package/docs/reference/type-aliases/SpecKind.md +0 -8
  263. package/docs/reference/type-aliases/SpecRun.md +0 -108
  264. package/docs/reference/type-aliases/SpecServeEntry.md +0 -40
  265. package/docs/reference/type-aliases/SpecStream.md +0 -32
  266. package/docs/reference/type-aliases/SpecificationConfig.md +0 -290
  267. package/docs/reference/type-aliases/SqliteOptions.md +0 -36
  268. package/docs/reference/type-aliases/SseEvent.md +0 -58
  269. package/docs/reference/type-aliases/StreamBody.md +0 -61
  270. package/docs/reference/type-aliases/TextFilter.md +0 -22
  271. package/docs/reference/type-aliases/VisitScenario.md +0 -20
  272. package/docs/reference/type-aliases/Visitor.md +0 -215
  273. package/docs/reference/type-aliases/WaitUntilOptions.md +0 -46
  274. package/docs/reference/type-aliases/WebsiteBackendOptions.md +0 -37
  275. package/docs/reference/type-aliases/WebsiteHandle.md +0 -51
  276. package/docs/reference/type-aliases/WebsiteSpecification.md +0 -118
  277. package/docs/reference/type-aliases/WebsiteSpecificationOptions.md +0 -40
  278. package/docs/reference/variables/anthropic.md +0 -19
  279. package/docs/reference/variables/banner.md +0 -10
  280. package/docs/reference/variables/button.md +0 -10
  281. package/docs/reference/variables/clock.md +0 -16
  282. package/docs/reference/variables/complementary.md +0 -10
  283. package/docs/reference/variables/component.md +0 -10
  284. package/docs/reference/variables/content.md +0 -10
  285. package/docs/reference/variables/contentinfo.md +0 -10
  286. package/docs/reference/variables/dialog.md +0 -10
  287. package/docs/reference/variables/field.md +0 -10
  288. package/docs/reference/variables/form.md +0 -10
  289. package/docs/reference/variables/heading.md +0 -10
  290. package/docs/reference/variables/http.md +0 -40
  291. package/docs/reference/variables/intercept.md +0 -11
  292. package/docs/reference/variables/link.md +0 -10
  293. package/docs/reference/variables/listitem.md +0 -10
  294. package/docs/reference/variables/main.md +0 -10
  295. package/docs/reference/variables/match.md +0 -8
  296. package/docs/reference/variables/navigation.md +0 -10
  297. package/docs/reference/variables/openai.md +0 -21
  298. package/docs/reference/variables/option.md +0 -17
  299. package/docs/reference/variables/region.md +0 -10
  300. package/docs/reference/variables/row.md +0 -10
  301. package/docs/reference/variables/search.md +0 -10
  302. package/docs/reference/variables/specification.md +0 -8
  303. package/docs/reference/variables/status.md +0 -10
  304. package/docs/reference/variables/table.md +0 -10
@@ -1,53 +0,0 @@
1
- # ADR-007: Compose mode leaves the package
2
-
3
- **Status:** Accepted
4
- **Date:** 2026-09-20
5
-
6
- ## Context
7
-
8
- `specification.api({ mode: 'compose' })` let a spec meet the application as a
9
- container stack described by a `docker/compose.test.yaml` rather than as a Hono
10
- app handed to `server`. It carried a binding resolver, a compose-file reader, a
11
- `composeService` name on every service handle, a `TEST_MODE` environment
12
- variable, a fetch adapter for the api facet, five lint rules (A5, A6, A6w, A10,
13
- I3) with their fixtures and specs, an `api-stack` project, and an orchestrator
14
- that had to start two shapes of world.
15
-
16
- A no-ignore grep of every clone on the workbench found **zero** consumer files
17
- using it. The one trace outside this package is a prose mention in one
18
- repository's testing chapter.
19
-
20
- The mode was also the source of a whole class of confusion the surveys kept
21
- finding: two ways to say what the subject is (`server` and a compose service),
22
- two names for one service (its record key and its `composeName`), and a set of
23
- rules whose only job was to keep the two from contradicting each other.
24
-
25
- ## Decision
26
-
27
- Compose mode leaves, with no deprecation window: none opens for a consumer that
28
- does not exist.
29
-
30
- What goes: `mode`, `TEST_MODE`, the `docker/compose.test.yaml` binding,
31
- `composeService`, `src/integrations/compose/`, the api facet's fetch adapter,
32
- rules A5, A6, A6w, A10 and I3 with every fixture and spec of theirs, and the
33
- `api-stack` project.
34
-
35
- The record KEY becomes the only name a service has: `serviceName`, assigned
36
- from the key at start, and the init script a database runs is read from
37
- `<root>/docker/<serviceName>/init.sql`. `ROOT_MARKERS` collapses to
38
- `package.json`.
39
-
40
- ## Consequences
41
-
42
- - One shape of world: a specification starts the services its record declares
43
- and hands the subject to `server`. An agent that knows one facet knows them
44
- all, and the orchestrator has one path through startup instead of two.
45
- - A consumer config naming a removed rule id fails oxlint's unknown-rule check
46
- — the same failure mode ADR-002 had for J1/J3/J4/J5, and the survey found no
47
- consumer config naming any of the five.
48
- - A future need to drive a deployed stack is not closed: `process()` is the one
49
- shape an external process takes in either slot, and `url` already targets a
50
- world this run did not start. What is closed is a SECOND vocabulary for it.
51
- - The package's own specs lost the one place where a spec reached past the
52
- public entry to build an `Orchestrator` by hand; both were rewritten through
53
- the entry, which is what rule F3 asks of every consumer.
@@ -1,75 +0,0 @@
1
- # ADR-008: Vitest 5, Node 24, the native seams as optional peers, and every artefact under `.artifacts/`
2
-
3
- **Status:** Accepted
4
- **Date:** 2026-09-20
5
-
6
- ## Context
7
-
8
- Three questions came due together at the major.
9
-
10
- **Which runner?** 15.2 and 15.3 shipped against `vitest ^4.1.10 || ^5`, which
11
- meant the package proved itself on two runners and a consumer could be on
12
- either. Vitest 5 is not a drop-in: `Assertion` gained a type parameter (an
13
- augmentation whose parameter list differs is refused outright), and Browser Mode
14
- pins its provider to the runner's EXACT patch — `@vitest/browser-playwright@X`
15
- peers `vitest: X`.
16
-
17
- **Which dependencies?** `better-sqlite3`, `pg`, `redis` and `testcontainers`
18
- were plain dependencies: every consumer installed four native packages, and
19
- three of them built native code on install, to run a suite most of them never
20
- pointed at a database. Under pnpm a native seam only builds when it is named in
21
- `only-built-dependencies`, so the cost was not even paid consistently.
22
-
23
- **Where do artefacts go?** Vitest 5 writes to `.vitest/` at the repository root,
24
- Browser Mode leaks `.vitest-attachments/` there and `__screenshots__/` beside
25
- the tests. The estate's doctrine says an artefact is never on the row, and the
26
- toolchain's gate enforces it — which would have failed every consumer's first
27
- run on 5.
28
-
29
- ## Decision
30
-
31
- **`vitest ^5`, and only 5.** The peer is `^5`; the package's own devDependency
32
- pins `vitest` and `@vitest/browser-playwright` to the same exact patch, and
33
- `component()` asserts that equality at startup, naming both versions. The adopt
34
- flow bumps the pair in one unit.
35
-
36
- **`engines.node: ">=24"`** — the toolchain's floor, not a third one.
37
-
38
- **The four native seams become OPTIONAL peers**, each loaded on first use
39
- through `loadPeer()`, whose refusal names the facet, the peer, the install
40
- command of the package manager the project's own lockfile names, and — under
41
- pnpm — the `onlyBuiltDependencies` line. What stays a dependency is what every
42
- consumer uses and none should declare: `msw`, `vitest-mock-extended`, `yaml`.
43
- That list is what rule F8 reads.
44
-
45
- The saving is npm's and Bun's. pnpm resolves a peer it can satisfy whatever
46
- the consumer declares — with `auto-install-peers` (its default since 8) all
47
- four arrive anyway, and the native one builds — so under pnpm the change buys
48
- the DECLARATION, not the install: a member that uses `sqlite()` says so, and a
49
- member that does not is no longer described by its dependency tree as a
50
- database consumer.
51
-
52
- **Every artefact under `.artifacts/vitest/`**: `attachmentsDir`, the
53
- json/junit/html/blob `outputFile` map, and both screenshot directories, set by
54
- the preset. A path the tool pins and cannot relocate is the toolchain map's to
55
- list, not this package's to hide.
56
-
57
- The preset also takes the hygiene defaults a suite should not have to restate:
58
- `retry: 0`, `restoreMocks`, `unstubGlobals`, `unstubEnvs`.
59
-
60
- ## Consequences
61
-
62
- - A consumer on vitest 4 stays on `@jterrazz/test` 15.x until it adopts 5. The
63
- package no longer pays for two runners, and the type augmentation can state
64
- vitest 5's signature character for character.
65
- - A consumer using `sqlite()`, `postgres()`, `redis()` or a container declares
66
- that peer — three repositories on the workbench use `sqlite()` today. Every
67
- other consumer stops installing four native packages it never loads.
68
- - The failure mode for a missing peer is a startup message naming the install
69
- command, not a module-resolution error from inside an adapter.
70
- - The artefact paths are the package's to set and the toolchain's to allow: one
71
- entry in its allowlist, one row in the estate's toolchain map, and the gate
72
- holds for every consumer from their first run.
73
- - The version pin is exact on purpose. It is the one dependency where "compatible"
74
- is not enough: the provider and the runner exchange a protocol, and a patch
75
- apart they refuse each other at startup rather than at type-check.
@@ -1,22 +0,0 @@
1
- # ADR-NNN: Title
2
-
3
- **Status:** Proposed
4
- **Date:** YYYY-MM-DD
5
-
6
- An agent leaves the status `Proposed`; only the owner writes `Accepted`.
7
-
8
- A retroactive record carries one honest line here: written YYYY-MM-DD from
9
- the evidence it was reconstructed from. A record written at decision time
10
- carries nothing.
11
-
12
- ## Context
13
-
14
- The situation that forced a decision — the forces, not the answer.
15
-
16
- ## Decision
17
-
18
- What was decided, and the shape of the choice.
19
-
20
- ## Consequences
21
-
22
- - What follows: costs accepted, freedoms gained, doors closed and opened.
@@ -1,120 +0,0 @@
1
- <!-- GENERATED by `typescript docs` — DO NOT EDIT -->
2
- # Class: Matcher
3
-
4
- Defined in: [src/model/matching/match.ts:70](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L70)
5
-
6
- A dynamic-value matcher. Created via the [match](../variables/match.md) factories — never
7
- constructed directly by user code.
8
-
9
- ## Constructors
10
-
11
- ### Constructor
12
-
13
- ```ts
14
- new Matcher(kind, options?): Matcher;
15
- ```
16
-
17
- Defined in: [src/model/matching/match.ts:81](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L81)
18
-
19
- #### Parameters
20
-
21
- | Parameter | Type |
22
- | ------ | ------ |
23
- | `kind` | [`MatcherKind`](../type-aliases/MatcherKind.md) |
24
- | `options` | \{ `includes?`: `string`; `notRef?`: `string`; `refName?`: `string`; `regex?`: `RegExp`; \} |
25
- | `options.includes?` | `string` |
26
- | `options.notRef?` | `string` |
27
- | `options.refName?` | `string` |
28
- | `options.regex?` | `RegExp` |
29
-
30
- #### Returns
31
-
32
- `Matcher`
33
-
34
- ## Properties
35
-
36
- ### includes?
37
-
38
- ```ts
39
- readonly optional includes?: string;
40
- ```
41
-
42
- Defined in: [src/model/matching/match.ts:72](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L72)
43
-
44
- For kind 'includes': the substring the actual value must contain.
45
-
46
- ***
47
-
48
- ### kind
49
-
50
- ```ts
51
- readonly kind: MatcherKind;
52
- ```
53
-
54
- Defined in: [src/model/matching/match.ts:73](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L73)
55
-
56
- ***
57
-
58
- ### notRef?
59
-
60
- ```ts
61
- readonly optional notRef?: string;
62
- ```
63
-
64
- Defined in: [src/model/matching/match.ts:75](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L75)
65
-
66
- For kind 'ref': the capture to assert inequality against.
67
-
68
- ***
69
-
70
- ### refName?
71
-
72
- ```ts
73
- readonly optional refName?: string;
74
- ```
75
-
76
- Defined in: [src/model/matching/match.ts:77](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L77)
77
-
78
- For kind 'ref': the capture name.
79
-
80
- ***
81
-
82
- ### regex?
83
-
84
- ```ts
85
- readonly optional regex?: RegExp;
86
- ```
87
-
88
- Defined in: [src/model/matching/match.ts:79](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L79)
89
-
90
- For kind 'regex': the pattern the actual value must match.
91
-
92
- ## Methods
93
-
94
- ### toJSON()
95
-
96
- ```ts
97
- toJSON(): string;
98
- ```
99
-
100
- Defined in: [src/model/matching/match.ts:117](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L117)
101
-
102
- #### Returns
103
-
104
- `string`
105
-
106
- ***
107
-
108
- ### toString()
109
-
110
- ```ts
111
- toString(): string;
112
- ```
113
-
114
- Defined in: [src/model/matching/match.ts:98](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L98)
115
-
116
- Placeholder-style rendering used in failure diffs and serialization.
117
-
118
- #### Returns
119
-
120
- `string`
@@ -1,368 +0,0 @@
1
- <!-- GENERATED by `typescript docs` — DO NOT EDIT -->
2
- # Class: ProcessHandle
3
-
4
- Defined in: [src/model/chain/process.ts:21](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L21)
5
-
6
- An external process, declared like any other service.
7
-
8
- One shape for every one of them: a site's dev server, an API behind the
9
- site, the bundler a simulator loads from. Without it each is declared
10
- somewhere else — a facet option, a document's `serve:` entry, a `beforeAll`
11
- spawning a child and an `afterAll` that sometimes forgets to kill it — and
12
- the lifetime belongs to whoever remembered. Here it is the framework's.
13
-
14
- It sits in a `services` record beside `postgres()`, `redis()` and
15
- `sqlite()`, so it starts after them and can be handed their connection
16
- strings through `env`, and it is stopped with the specification.
17
-
18
- ## Implements
19
-
20
- - [`ServiceHandle`](../type-aliases/ServiceHandle.md)
21
-
22
- ## Constructors
23
-
24
- ### Constructor
25
-
26
- ```ts
27
- new ProcessHandle(options): ProcessHandle;
28
- ```
29
-
30
- Defined in: [src/model/chain/process.ts:35](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L35)
31
-
32
- #### Parameters
33
-
34
- | Parameter | Type |
35
- | ------ | ------ |
36
- | `options` | [`ProcessOptions`](../type-aliases/ProcessOptions.md) |
37
-
38
- #### Returns
39
-
40
- `ProcessHandle`
41
-
42
- ## Properties
43
-
44
- ### connectionString
45
-
46
- ```ts
47
- connectionString: string = '';
48
- ```
49
-
50
- Defined in: [src/model/chain/process.ts:29](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L29)
51
-
52
- Connection string — populated after start.
53
-
54
- #### Implementation of
55
-
56
- ```ts
57
- ServiceHandle.connectionString
58
- ```
59
-
60
- ***
61
-
62
- ### defaultImage
63
-
64
- ```ts
65
- readonly defaultImage: "" = '';
66
- ```
67
-
68
- Defined in: [src/model/chain/process.ts:23](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L23)
69
-
70
- Embedded: nothing to pull, nothing to run in a container.
71
-
72
- #### Implementation of
73
-
74
- ```ts
75
- ServiceHandle.defaultImage
76
- ```
77
-
78
- ***
79
-
80
- ### defaultPort
81
-
82
- ```ts
83
- readonly defaultPort: 0 = 0;
84
- ```
85
-
86
- Defined in: [src/model/chain/process.ts:24](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L24)
87
-
88
- Default container port for this service type.
89
-
90
- #### Implementation of
91
-
92
- ```ts
93
- ServiceHandle.defaultPort
94
- ```
95
-
96
- ***
97
-
98
- ### environment
99
-
100
- ```ts
101
- readonly environment: Record<string, string> = {};
102
- ```
103
-
104
- Defined in: [src/model/chain/process.ts:25](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L25)
105
-
106
- Environment variables to pass to the container.
107
-
108
- #### Implementation of
109
-
110
- ```ts
111
- ServiceHandle.environment
112
- ```
113
-
114
- ***
115
-
116
- ### serviceName
117
-
118
- ```ts
119
- serviceName: string | null = null;
120
- ```
121
-
122
- Defined in: [src/model/chain/process.ts:28](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L28)
123
-
124
- The name this handle is known by. Left `null` until the orchestrator
125
- assigns it at start time: it is the kebab-case form of the RECORD KEY,
126
- so `{ analyticsDb: postgres() }` reports as `analytics-db` and reads its
127
- init script from `docker/analytics-db/`. The key is the only name a
128
- specification writes; a handle carries no second one of its own.
129
-
130
- #### Implementation of
131
-
132
- ```ts
133
- ServiceHandle.serviceName
134
- ```
135
-
136
- ***
137
-
138
- ### started
139
-
140
- ```ts
141
- started: boolean = false;
142
- ```
143
-
144
- Defined in: [src/model/chain/process.ts:30](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L30)
145
-
146
- Whether this service has been started.
147
-
148
- #### Implementation of
149
-
150
- ```ts
151
- ServiceHandle.started
152
- ```
153
-
154
- ***
155
-
156
- ### type
157
-
158
- ```ts
159
- readonly type: "process" = 'process';
160
- ```
161
-
162
- Defined in: [src/model/chain/process.ts:26](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L26)
163
-
164
- Service type identifier.
165
-
166
- #### Implementation of
167
-
168
- ```ts
169
- ServiceHandle.type
170
- ```
171
-
172
- ## Accessors
173
-
174
- ### spec
175
-
176
- #### Get Signature
177
-
178
- ```ts
179
- get spec(): ProcessOptions;
180
- ```
181
-
182
- Defined in: [src/model/chain/process.ts:122](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L122)
183
-
184
- What it was declared as — what a facet reads to start it in a slot of its own.
185
-
186
- ##### Returns
187
-
188
- [`ProcessOptions`](../type-aliases/ProcessOptions.md)
189
-
190
- ***
191
-
192
- ### url
193
-
194
- #### Get Signature
195
-
196
- ```ts
197
- get url(): string;
198
- ```
199
-
200
- Defined in: [src/model/chain/process.ts:127](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L127)
201
-
202
- The base URL it came up on — known only once it is started.
203
-
204
- ##### Returns
205
-
206
- `string`
207
-
208
- ## Methods
209
-
210
- ### buildConnectionString()
211
-
212
- ```ts
213
- buildConnectionString(host, port): string;
214
- ```
215
-
216
- Defined in: [src/model/chain/process.ts:39](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L39)
217
-
218
- Build the connection string from host and port.
219
-
220
- #### Parameters
221
-
222
- | Parameter | Type |
223
- | ------ | ------ |
224
- | `host` | `string` |
225
- | `port` | `number` |
226
-
227
- #### Returns
228
-
229
- `string`
230
-
231
- #### Implementation of
232
-
233
- ```ts
234
- ServiceHandle.buildConnectionString
235
- ```
236
-
237
- ***
238
-
239
- ### createDatabaseAdapter()
240
-
241
- ```ts
242
- createDatabaseAdapter(): DatabasePort | null;
243
- ```
244
-
245
- Defined in: [src/model/chain/process.ts:43](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L43)
246
-
247
- Create a DatabasePort adapter (if this is a database). Returns null otherwise.
248
-
249
- #### Returns
250
-
251
- [`DatabasePort`](../type-aliases/DatabasePort.md) \| `null`
252
-
253
- #### Implementation of
254
-
255
- ```ts
256
- ServiceHandle.createDatabaseAdapter
257
- ```
258
-
259
- ***
260
-
261
- ### healthcheck()
262
-
263
- ```ts
264
- healthcheck(): Promise<void>;
265
- ```
266
-
267
- Defined in: [src/model/chain/process.ts:47](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L47)
268
-
269
- Verify the service is ready and accepting connections. Throws with context if not.
270
-
271
- #### Returns
272
-
273
- `Promise`\<`void`\>
274
-
275
- #### Implementation of
276
-
277
- ```ts
278
- ServiceHandle.healthcheck
279
- ```
280
-
281
- ***
282
-
283
- ### initialize()
284
-
285
- ```ts
286
- initialize(): Promise<void>;
287
- ```
288
-
289
- Defined in: [src/model/chain/process.ts:58](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L58)
290
-
291
- A process is not a container, so the orchestrator never starts it: the
292
- facet does, once its siblings are up and their connection strings are
293
- readable (startProcessServices).
294
-
295
- #### Returns
296
-
297
- `Promise`\<`void`\>
298
-
299
- #### Implementation of
300
-
301
- ```ts
302
- ServiceHandle.initialize
303
- ```
304
-
305
- ***
306
-
307
- ### isolation()
308
-
309
- ```ts
310
- isolation(): IsolationStrategy;
311
- ```
312
-
313
- Defined in: [src/model/chain/process.ts:70](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L70)
314
-
315
- Isolation is the RUN's, not the worker's — and a run here is one
316
- EVALUATION of the specification module. Under vitest's default
317
- isolation that is once per test file, so two files that import the same
318
- specification get a child each, with the id the facet minted for it.
319
- Nothing is acquired or reset between tests: the id is what tells two
320
- runs apart, never a label a spec samples.
321
-
322
- #### Returns
323
-
324
- [`IsolationStrategy`](../type-aliases/IsolationStrategy.md)
325
-
326
- #### Implementation of
327
-
328
- ```ts
329
- ServiceHandle.isolation
330
- ```
331
-
332
- ***
333
-
334
- ### reset()
335
-
336
- ```ts
337
- reset(): Promise<void>;
338
- ```
339
-
340
- Defined in: [src/model/chain/process.ts:84](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L84)
341
-
342
- Reset state between tests (truncate tables, flush cache, etc.)
343
-
344
- #### Returns
345
-
346
- `Promise`\<`void`\>
347
-
348
- #### Implementation of
349
-
350
- ```ts
351
- ServiceHandle.reset
352
- ```
353
-
354
- ***
355
-
356
- ### shutdown()
357
-
358
- ```ts
359
- shutdown(): Promise<void>;
360
- ```
361
-
362
- Defined in: [src/model/chain/process.ts:115](https://github.com/jterrazz/package-test/blob/main/src/model/chain/process.ts#L115)
363
-
364
- Terminate the process group. Idempotent.
365
-
366
- #### Returns
367
-
368
- `Promise`\<`void`\>
@@ -1,39 +0,0 @@
1
- <!-- GENERATED by `typescript docs` — DO NOT EDIT -->
2
- # Function: defineContract()
3
-
4
- ```ts
5
- function defineContract(contract): Contract;
6
- ```
7
-
8
- Defined in: [src/model/contracts/contract.ts:71](https://github.com/jterrazz/package-test/blob/main/src/model/contracts/contract.ts#L71)
9
-
10
- Declare one contract. Identity function — its value is the enforced shape
11
- and the naming convention:
12
-
13
- ## Parameters
14
-
15
- | Parameter | Type |
16
- | ------ | ------ |
17
- | `contract` | [`Contract`](../type-aliases/Contract.md) |
18
-
19
- ## Returns
20
-
21
- [`Contract`](../type-aliases/Contract.md)
22
-
23
- ## Example
24
-
25
- ```ts
26
- // specs/api/reports/contracts/openai/classify-article.ts
27
- import { defineContract, openai } from '@jterrazz/test';
28
-
29
- export default defineContract({
30
- request: openai.responses({ user: PROMPT, tools: ['classify'] }),
31
- response: openai.reply({ categories: ['TECH'] }),
32
- });
33
-
34
- // Dynamic — the response is computed from the observed request:
35
- export default defineContract({
36
- request: http.post('https://api.example.com/echo'),
37
- response: (request) => http.json({ received: request.body }),
38
- });
39
- ```