From 90838a727c60211d7971ba99f55669eaea3c86c1 Mon Sep 17 00:00:00 2001 From: Benoit Travers Date: Thu, 13 Aug 2026 22:04:42 +0200 Subject: [PATCH 1/3] chore!: rename @btravstack/start to @btravstack/start-core MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The kernel package sharing the repo's bare name was ambiguous next to its start-http/start-amqp/start-temporal siblings. Nothing is published yet, so the rename is free — after first publish it would be a deprecation dance. Co-Authored-By: Claude Fable 5 --- .changeset/drain-and-shutdown-fixes.md | 2 +- .changeset/drop-version-const.md | 2 +- .changeset/initial-kernel.md | 4 +- .changeset/start-amqp.md | 2 +- .changeset/start-http.md | 2 +- .changeset/start-temporal.md | 2 +- .github/workflows/ci.yml | 2 +- CLAUDE.md | 32 ++++---- README.md | 14 ++-- examples/README.md | 4 +- examples/order-amqp-contract/README.md | 2 +- examples/order-amqp/README.md | 2 +- examples/order-amqp/package.json | 2 +- examples/order-amqp/src/amqp-runtime.ts | 2 +- examples/order-amqp/src/main.ts | 2 +- examples/order-amqp/src/needs-gate.test-d.ts | 2 +- examples/order-amqp/src/test-fixtures.ts | 2 +- examples/order-api-contract/README.md | 2 +- examples/order-api/README.md | 2 +- examples/order-api/package.json | 2 +- examples/order-api/src/main.ts | 2 +- examples/order-api/src/needs-gate.test-d.ts | 2 +- examples/order-api/src/test-fixtures.ts | 2 +- examples/order-application/README.md | 6 +- examples/order-application/package.json | 2 +- examples/order-application/src/logger.ts | 2 +- examples/order-config/README.md | 2 +- examples/order-domain/README.md | 4 +- examples/order-infrastructure/README.md | 2 +- examples/order-temporal-contract/README.md | 2 +- examples/order-temporal/README.md | 2 +- examples/order-temporal/package.json | 2 +- examples/order-temporal/src/main.ts | 2 +- .../order-temporal/src/needs-gate.test-d.ts | 2 +- .../order-temporal/src/temporal-runtime.ts | 2 +- examples/order-temporal/src/test-fixtures.ts | 2 +- examples/order-worker/README.md | 2 +- examples/order-worker/package.json | 2 +- examples/order-worker/src/main.ts | 2 +- .../order-worker/src/needs-gate.test-d.ts | 2 +- examples/order-worker/src/queue-runtime.ts | 2 +- examples/order-worker/src/test-fixtures.ts | 2 +- packages/start-amqp/CLAUDE.md | 2 +- packages/start-amqp/README.md | 4 +- packages/start-amqp/package.json | 6 +- packages/start-amqp/src/amqp-runtime.ts | 2 +- packages/start-amqp/src/message-units.ts | 2 +- packages/start-amqp/src/test-fixtures.ts | 2 +- packages/{start => start-core}/CLAUDE.md | 6 +- packages/{start => start-core}/LICENSE | 0 packages/{start => start-core}/README.md | 10 +-- packages/{start => start-core}/package.json | 4 +- .../{start => start-core}/src/clock.spec.ts | 0 packages/{start => start-core}/src/clock.ts | 0 .../{start => start-core}/src/deferred.ts | 0 .../src/docs-examples.test-d.ts | 6 +- .../{start => start-core}/src/drain.spec.ts | 0 packages/{start => start-core}/src/drain.ts | 0 .../{start => start-core}/src/events.spec.ts | 0 packages/{start => start-core}/src/events.ts | 0 .../src/fake-clock.spec.ts | 0 .../{start => start-core}/src/fake-clock.ts | 0 packages/{start => start-core}/src/index.ts | 0 .../src/invariants.spec.ts | 0 .../{start => start-core}/src/phase.spec.ts | 0 packages/{start => start-core}/src/phase.ts | 0 .../{start => start-core}/src/probes.spec.ts | 0 packages/{start => start-core}/src/probes.ts | 0 .../src/process-handlers.spec.ts | 0 .../src/process-handlers.ts | 0 .../src/run-main.spec.ts | 0 .../{start => start-core}/src/run-main.ts | 0 packages/{start => start-core}/src/runtime.ts | 0 .../{start => start-core}/src/start.spec.ts | 0 .../{start => start-core}/src/start.test-d.ts | 0 packages/{start => start-core}/src/start.ts | 0 .../src/test-runtime.spec.ts | 0 .../{start => start-core}/src/test-runtime.ts | 0 packages/{start => start-core}/src/testing.ts | 0 .../{start => start-core}/src/units.spec.ts | 0 packages/{start => start-core}/src/units.ts | 0 .../{start => start-core}/src/vitest.d.ts | 0 .../src/with-app.spec.ts | 0 .../{start => start-core}/src/with-app.ts | 0 packages/{start => start-core}/tsconfig.json | 0 .../tsconfig.test-d.json | 0 .../{start => start-core}/vitest.config.ts | 0 packages/start-http/CLAUDE.md | 2 +- packages/start-http/README.md | 8 +- packages/start-http/package.json | 6 +- packages/start-http/src/http-runtime.ts | 2 +- packages/start-http/src/test-fixtures.ts | 2 +- packages/start-temporal/CLAUDE.md | 2 +- packages/start-temporal/README.md | 4 +- packages/start-temporal/package.json | 6 +- packages/start-temporal/src/activity-units.ts | 2 +- .../start-temporal/src/temporal-runtime.ts | 2 +- packages/start-temporal/src/test-fixtures.ts | 2 +- pnpm-lock.yaml | 74 +++++++++---------- 99 files changed, 146 insertions(+), 146 deletions(-) rename packages/{start => start-core}/CLAUDE.md (99%) rename packages/{start => start-core}/LICENSE (100%) rename packages/{start => start-core}/README.md (98%) rename packages/{start => start-core}/package.json (96%) rename packages/{start => start-core}/src/clock.spec.ts (100%) rename packages/{start => start-core}/src/clock.ts (100%) rename packages/{start => start-core}/src/deferred.ts (100%) rename packages/{start => start-core}/src/docs-examples.test-d.ts (97%) rename packages/{start => start-core}/src/drain.spec.ts (100%) rename packages/{start => start-core}/src/drain.ts (100%) rename packages/{start => start-core}/src/events.spec.ts (100%) rename packages/{start => start-core}/src/events.ts (100%) rename packages/{start => start-core}/src/fake-clock.spec.ts (100%) rename packages/{start => start-core}/src/fake-clock.ts (100%) rename packages/{start => start-core}/src/index.ts (100%) rename packages/{start => start-core}/src/invariants.spec.ts (100%) rename packages/{start => start-core}/src/phase.spec.ts (100%) rename packages/{start => start-core}/src/phase.ts (100%) rename packages/{start => start-core}/src/probes.spec.ts (100%) rename packages/{start => start-core}/src/probes.ts (100%) rename packages/{start => start-core}/src/process-handlers.spec.ts (100%) rename packages/{start => start-core}/src/process-handlers.ts (100%) rename packages/{start => start-core}/src/run-main.spec.ts (100%) rename packages/{start => start-core}/src/run-main.ts (100%) rename packages/{start => start-core}/src/runtime.ts (100%) rename packages/{start => start-core}/src/start.spec.ts (100%) rename packages/{start => start-core}/src/start.test-d.ts (100%) rename packages/{start => start-core}/src/start.ts (100%) rename packages/{start => start-core}/src/test-runtime.spec.ts (100%) rename packages/{start => start-core}/src/test-runtime.ts (100%) rename packages/{start => start-core}/src/testing.ts (100%) rename packages/{start => start-core}/src/units.spec.ts (100%) rename packages/{start => start-core}/src/units.ts (100%) rename packages/{start => start-core}/src/vitest.d.ts (100%) rename packages/{start => start-core}/src/with-app.spec.ts (100%) rename packages/{start => start-core}/src/with-app.ts (100%) rename packages/{start => start-core}/tsconfig.json (100%) rename packages/{start => start-core}/tsconfig.test-d.json (100%) rename packages/{start => start-core}/vitest.config.ts (100%) diff --git a/.changeset/drain-and-shutdown-fixes.md b/.changeset/drain-and-shutdown-fixes.md index 2e9f52a..d4224fb 100644 --- a/.changeset/drain-and-shutdown-fixes.md +++ b/.changeset/drain-and-shutdown-fixes.md @@ -1,5 +1,5 @@ --- -"@btravstack/start": minor +"@btravstack/start-core": minor --- Seven shutdown-path fixes found by a full review of the kernel. Five change diff --git a/.changeset/drop-version-const.md b/.changeset/drop-version-const.md index 1643152..915baf2 100644 --- a/.changeset/drop-version-const.md +++ b/.changeset/drop-version-const.md @@ -1,5 +1,5 @@ --- -"@btravstack/start": minor +"@btravstack/start-core": minor --- Remove the `VERSION` export. diff --git a/.changeset/initial-kernel.md b/.changeset/initial-kernel.md index da2b87c..04a2586 100644 --- a/.changeset/initial-kernel.md +++ b/.changeset/initial-kernel.md @@ -1,5 +1,5 @@ --- -"@btravstack/start": minor +"@btravstack/start-core": minor --- The application kernel: `start` boots a `@btravstack/di` module into a running @@ -31,7 +31,7 @@ application scope on every path. `70`) by setting `process.exitCode`. - `currentUnit()` over an `AsyncLocalStorage` record carrying `{ unitId, traceId, tenantId, deadline }` — data, never capabilities. -- A `@btravstack/start/testing` entry point with `testRuntime`, +- A `@btravstack/start-core/testing` entry point with `testRuntime`, `createFakeClock` and `withApp`. - **Every async API returns an `AsyncResult`, never a bare `Promise`** — the infallible ones included, where `AsyncResult` spells "async, and diff --git a/.changeset/start-amqp.md b/.changeset/start-amqp.md index 7e5c39b..a44cfa1 100644 --- a/.changeset/start-amqp.md +++ b/.changeset/start-amqp.md @@ -2,7 +2,7 @@ "@btravstack/start-amqp": minor --- -The AMQP consumer runtime for `@btravstack/start`. +The AMQP consumer runtime for `@btravstack/start-core`. `amqpRuntime({ urls, contract, handlers, needs })` runs an `amqp-contract` worker under the kernel's lifecycle: one unit per delivery, and a drain where diff --git a/.changeset/start-http.md b/.changeset/start-http.md index 2f91ab4..7876d44 100644 --- a/.changeset/start-http.md +++ b/.changeset/start-http.md @@ -2,7 +2,7 @@ "@btravstack/start-http": minor --- -The HTTP runtime for `@btravstack/start`. +The HTTP runtime for `@btravstack/start-core`. `httpRuntime({ port, needs, handler })` owns an HTTP server's lifecycle and nothing else: it binds (publishing the real port on `Serving.info`, so diff --git a/.changeset/start-temporal.md b/.changeset/start-temporal.md index bdd0984..ae65b2f 100644 --- a/.changeset/start-temporal.md +++ b/.changeset/start-temporal.md @@ -2,7 +2,7 @@ "@btravstack/start-temporal": minor --- -The Temporal worker runtime for `@btravstack/start`. +The Temporal worker runtime for `@btravstack/start-core`. `temporalRuntime({ connection, taskQueue, workflows, activities, needs })` runs a Temporal worker under the kernel's lifecycle: one unit per activity attempt, and diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ff082f..bbe84c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: # pnpm 11 needs `node:sqlite`, which Node 20 does not have. That floor is # declared, not proven. node-versions: '["", "22.19", "24", "26"]' - # The reusable default appends `--coverage`; packages/start already runs + # The reusable default appends `--coverage`; packages/start-core already runs # `vitest run --coverage` (with 100% thresholds), and the root script is # `turbo run test`, which would take the extra flags as its own. test-command: "pnpm test" diff --git a/CLAUDE.md b/CLAUDE.md index 5aa6b94..5ff3831 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,7 +7,7 @@ reasoning behind them. Keep it in sync with the code as the package evolves ## What this is -`@btravstack/start` — the application kernel. It boots a +`@btravstack/start-core` — the application kernel. It boots a [`@btravstack/di`](https://github.com/btravstack/di) module into a running process with one runtime, drains in-flight work on SIGTERM, and closes the application scope on every path. It owns three things — the lifecycle state @@ -174,11 +174,11 @@ hook). User-facing changes need a changeset. ## Kernel internals -Two sections live in `packages/start/CLAUDE.md`, which loads only when you work +Two sections live in `packages/start-core/CLAUDE.md`, which loads only when you work under that directory: **Load-bearing runtime invariants (tests must guard these)** — each invariant with the test that guards it — and **Internal design (don't break these)**. Read them before changing anything in -`packages/start/src/`, and update them in the same commit as the code. +`packages/start-core/src/`, and update them in the same commit as the code. ## A known footgun: `start` without `runMain` exits 0 after a crash @@ -233,11 +233,11 @@ started elsewhere. ## Public surface -`packages/start/src/index.ts` is the one place the API is decided. `testing.ts` -is a second entry point (`@btravstack/start/testing`), kept out of the main one +`packages/start-core/src/index.ts` is the one place the API is decided. `testing.ts` +is a second entry point (`@btravstack/start-core/testing`), kept out of the main one so a production bundle never pulls the fakes in. -### `@btravstack/start` +### `@btravstack/start-core` - **`start(module, options)` → `RunningApp`** — the entry point. Takes a `Module` (not `Module`: `Needs` is covariant on @@ -330,7 +330,7 @@ runtimes, and no `recoverFailure`-style channel-moving helper. Swapping an adapter is composing a different module, which di already documents and the type checker already verifies. -### `@btravstack/start/testing` +### `@btravstack/start-core/testing` - **`testRuntime(name?)`** — an in-memory `Runtime` plus `started()`, `untilStarted()` (an `AsyncResult`), `accepting()`, @@ -363,7 +363,7 @@ checker already verifies. Their public surfaces live in `packages/start-http/CLAUDE.md`, `packages/start-temporal/CLAUDE.md` and `packages/start-amqp/CLAUDE.md`, which load only when you work under those directories — the same split -`packages/start/CLAUDE.md` already uses for the kernel's internals. Read the +`packages/start-core/CLAUDE.md` already uses for the kernel's internals. Read the one you are changing before you change it, and update it in the same commit as the code. @@ -373,7 +373,7 @@ the code. eleven workspaces run under the same six commands as the kernel — 93 specs plus five `needs-gate.test-d.ts` files and four `layering.test-d.ts` ones — so an example that stops compiling, stops linting or stops passing fails CI - exactly as `packages/start` would. Four of the five needs-gate files pin + exactly as `packages/start-core` would. Four of the five needs-gate files pin **`start`'s** runtime-needs gate (`order-api`, `order-worker`, `order-temporal`, `order-amqp`); the fifth, `order-application`'s, pins **di's** `UNSATISFIED DEPENDENCIES` gate on `Module.scoped`. They are @@ -467,7 +467,7 @@ namespace }` back off `Serving.info`. The Worker's lifecycle, the unit per - **Runtime dependencies: none.** `unthrown` and `@btravstack/di` are **peer** dependencies of `start` — the dual-copy hazard is real for both (di's port identity and unthrown's `isResult` each compare across copies). `start-http` - peers on both of those plus `@btravstack/start` itself, for the same reason. + peers on both of those plus `@btravstack/start-core` itself, for the same reason. `node:` builtins only otherwise. Do not add a dependency. - `declarationMap: false` on all four published packages — the published tarball has no `src/`, so maps would be dead ends. @@ -513,7 +513,7 @@ namespace }` back off `Serving.info`. The Worker's lifecycle, the unit per a plausible "simplification" (the `teardownErrors` aliasing, the `ready()` latch, the monotonic `completed`), which is what the surviving comments are. - Conventional commits (`feat:`, `fix:`, `docs:`, `test:`, `chore:`). -- Coverage thresholds are 100% lines/functions on `packages/start`, with +- Coverage thresholds are 100% lines/functions on `packages/start-core`, with `testing.ts` excluded (it is a re-export barrel). - Test mechanics: `@unthrown/vitest`'s matchers are registered via `setupFiles` (`toBeOk`, `toBeOkWith`, `toBeErrTagged`, …). Timing is asserted through @@ -524,8 +524,8 @@ namespace }` back off `Serving.info`. The Worker's lifecycle, the unit per - Documentation drifts silently, and a sibling repo has already shipped a falsehood this way. When the public surface changes, update **this** file, both READMEs **and** `docs-examples.test-d.ts` in the same commit — and when - the change is to `packages/start/src/` internals or the invariants guarding - them, `packages/start/CLAUDE.md` too — and for a runtime package, its own: + the change is to `packages/start-core/src/` internals or the invariants guarding + them, `packages/start-core/CLAUDE.md` too — and for a runtime package, its own: `packages/start-http/CLAUDE.md`, `packages/start-temporal/CLAUDE.md` or `packages/start-amqp/CLAUDE.md`, whichever is where that package's public surface lives. There are **five** `CLAUDE.md` files; naming the wrong one is @@ -536,7 +536,7 @@ namespace }` back off `Serving.info`. The Worker's lifecycle, the unit per Five rules, each with the reason it exists — binding at two different scopes, which is a decision rather than an accident. -**Rules 4 and 5 are substantive and bind everywhere**, `packages/start` +**Rules 4 and 5 are substantive and bind everywhere**, `packages/start-core` included. They are what stops an assertion silently declining to run: a conditional or optional-chained `expect` skips without failing the test, and a scatter of shallow assertions hides which one is load-bearing. That shape was @@ -666,14 +666,14 @@ A sixth rule is about production code that tests keep honest: for it; the `Module.forkScope` call lands when the first runtime needs a per-request transaction. - **A `docs-examples.test-d.ts` for `start-http`, `start-temporal` and - `start-amqp`.** `packages/start`'s exists precisely so its two READMEs + `start-amqp`.** `packages/start-core`'s exists precisely so its two READMEs cannot drift from `runtime.ts` / `drain-report.ts` without failing `pnpm typecheck`; the three runtime packages' README samples have no such gate and are compiled by nothing. Deliberately not built — three packages' worth of samples still did not justify the harness. Add it the next time one of those samples is found to have drifted, the same way this gap itself was found. -- ~~Bringing `packages/start`'s 13 spec files under the Test conventions.~~ +- ~~Bringing `packages/start-core`'s 13 spec files under the Test conventions.~~ **Closed by decision, not by doing it.** An audit of the 93 tests found the substantive rules (4 and 5) already kept — one conditional assertion, since deleted, and zero optional-chained ones — so the sweep would have been diff --git a/README.md b/README.md index 64cc8bf..c280592 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ boot a [`@btravstack/di`](https://github.com/btravstack/di) module into a runnin process, and stop it again without losing work.** [![CI](https://github.com/btravstack/start/actions/workflows/ci.yml/badge.svg)](https://github.com/btravstack/start/actions/workflows/ci.yml) -[![npm version](https://img.shields.io/npm/v/%40btravstack%2Fstart.svg?logo=npm)](https://www.npmjs.com/package/@btravstack/start) +[![npm version](https://img.shields.io/npm/v/%40btravstack%2Fstart.svg?logo=npm)](https://www.npmjs.com/package/@btravstack/start-core) [![TypeScript](https://img.shields.io/badge/TypeScript-7.0-blue?logo=typescript)](https://www.typescriptlang.org/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) @@ -28,7 +28,7 @@ never calls `process.exit`. ## Install ```sh -pnpm add @btravstack/start @btravstack/di unthrown +pnpm add @btravstack/start-core @btravstack/di unthrown ``` `@btravstack/di` and `unthrown` are **peer dependencies** — install all three. @@ -38,7 +38,7 @@ The kernel itself has no runtime dependencies beyond `node:` builtins. ```ts import { Module, Port, Provider } from "@btravstack/di"; -import { runMain, start, type Runtime, type Serving } from "@btravstack/start"; +import { runMain, start, type Runtime, type Serving } from "@btravstack/start-core"; import { Ok, OkAsync } from "unthrown"; class Greeter extends Port("Greeter")<{ @@ -99,7 +99,7 @@ await runMain(start(AppModule, { runtime: ticker })); `start` call, not a boot-time crash. Every code sample on this page is compiled by -[`packages/start/src/docs-examples.test-d.ts`](./packages/start/src/docs-examples.test-d.ts), +[`packages/start-core/src/docs-examples.test-d.ts`](./packages/start-core/src/docs-examples.test-d.ts), so a sample that stops compiling fails the build. ## What it is not @@ -502,7 +502,7 @@ swallowed: a broken reporter must not take the process down mid-shutdown. ## Testing -`@btravstack/start/testing` ships the deterministic half of the lifecycle. +`@btravstack/start-core/testing` ships the deterministic half of the lifecycle. ```ts const drainTest = async (): Promise => { @@ -576,13 +576,13 @@ lines done well. ## Documentation -See [`packages/start`](./packages/start) for the package README, +See [`packages/start-core`](./packages/start-core) for the package README, [`examples/`](./examples) for an eleven-package clean-architecture application booted under four different runtimes, and [`CLAUDE.md`](./CLAUDE.md) for the authoritative spec: the theses, the public surface and the conventions. The load-bearing invariants with the test that guards each, and the internal design notes, live in -[`packages/start/CLAUDE.md`](./packages/start/CLAUDE.md). +[`packages/start-core/CLAUDE.md`](./packages/start-core/CLAUDE.md). ## License diff --git a/examples/README.md b/examples/README.md index 503c313..c650b2b 100644 --- a/examples/README.md +++ b/examples/README.md @@ -4,7 +4,7 @@ Eleven small packages that are **one application booted four ways**: a clean architecture split across four layers, deployed once as an oRPC API, once as a queue worker, once as a Temporal worker and once as an AMQP consumer, with each transport's contract in a package of its own — and, at the same time, -exercising `@btravstack/start` end to end from a consumer's own workspace, +exercising `@btravstack/start-core` end to end from a consumer's own workspace, `workspace:*` and all. | Package | Layer | Shows | @@ -65,7 +65,7 @@ booting the lot. The api and temporal contracts sat inside `order-api/src/contract.ts` and `order-temporal/src/contract.ts` before being extracted, so no client could take one without the others until then; `order-amqp-contract` started as its own package from the outset, the same -shape without the detour. None of the three depends on `@btravstack/start`, on +shape without the detour. None of the three depends on `@btravstack/start-core`, on `@btravstack/di`, or on any other example — the transports depend on **them**. The rule is enforced by the compiler rather than by review: each contract diff --git a/examples/order-amqp-contract/README.md b/examples/order-amqp-contract/README.md index 4098530..000da6d 100644 --- a/examples/order-amqp-contract/README.md +++ b/examples/order-amqp-contract/README.md @@ -1,4 +1,4 @@ -# `@btravstack/start` example: the order AMQP contract +# `@btravstack/start-core` example: the order AMQP contract The AMQP contract — one exchange, one queue with a dead-letter exchange and a retry policy, one message, one publisher, one consumer — in a package of its diff --git a/examples/order-amqp/README.md b/examples/order-amqp/README.md index eda546c..d92c908 100644 --- a/examples/order-amqp/README.md +++ b/examples/order-amqp/README.md @@ -1,4 +1,4 @@ -# `@btravstack/start` example: the order AMQP worker +# `@btravstack/start-core` example: the order AMQP worker The fourth deployment. The same application, the same persistence, the same composition — driven by a real message broker instead of an HTTP server, an diff --git a/examples/order-amqp/package.json b/examples/order-amqp/package.json index f7f76f6..b239558 100644 --- a/examples/order-amqp/package.json +++ b/examples/order-amqp/package.json @@ -17,7 +17,7 @@ "dependencies": { "@amqp-contract/worker": "catalog:", "@btravstack/di": "catalog:", - "@btravstack/start": "workspace:*", + "@btravstack/start-core": "workspace:*", "@btravstack/start-amqp": "workspace:*", "@btravstack/start-example-order-amqp-contract": "workspace:*", "@btravstack/start-example-order-application": "workspace:*", diff --git a/examples/order-amqp/src/amqp-runtime.ts b/examples/order-amqp/src/amqp-runtime.ts index ae50435..533cc2f 100644 --- a/examples/order-amqp/src/amqp-runtime.ts +++ b/examples/order-amqp/src/amqp-runtime.ts @@ -1,5 +1,5 @@ import { declareHandler, NonRetryableError, RetryableError } from "@amqp-contract/worker"; -import type { Runtime } from "@btravstack/start"; +import type { Runtime } from "@btravstack/start-core"; import { amqpRuntime, messageUnits, diff --git a/examples/order-amqp/src/main.ts b/examples/order-amqp/src/main.ts index 2bcbf4d..f58c646 100644 --- a/examples/order-amqp/src/main.ts +++ b/examples/order-amqp/src/main.ts @@ -1,4 +1,4 @@ -import { runMain, start } from "@btravstack/start"; +import { runMain, start } from "@btravstack/start-core"; import { orderContract } from "@btravstack/start-example-order-amqp-contract"; import { P } from "unthrown"; diff --git a/examples/order-amqp/src/needs-gate.test-d.ts b/examples/order-amqp/src/needs-gate.test-d.ts index 2c154b9..735a175 100644 --- a/examples/order-amqp/src/needs-gate.test-d.ts +++ b/examples/order-amqp/src/needs-gate.test-d.ts @@ -10,7 +10,7 @@ * `start(...)` call site. */ import { Module } from "@btravstack/di"; -import { start } from "@btravstack/start"; +import { start } from "@btravstack/start-core"; import { orderContract } from "@btravstack/start-example-order-amqp-contract"; import { ApplicationModule, diff --git a/examples/order-amqp/src/test-fixtures.ts b/examples/order-amqp/src/test-fixtures.ts index 8537472..5e15902 100644 --- a/examples/order-amqp/src/test-fixtures.ts +++ b/examples/order-amqp/src/test-fixtures.ts @@ -1,7 +1,7 @@ import { it as amqpIt } from "@amqp-contract/testing"; import type { AmqpTestFixtures } from "@amqp-contract/testing/extension"; import { Module, Port, Provider, type Scope, type ServiceOf } from "@btravstack/di"; -import { start, type RunningApp } from "@btravstack/start"; +import { start, type RunningApp } from "@btravstack/start-core"; import type { AmqpInfo } from "@btravstack/start-amqp"; import { orderContract } from "@btravstack/start-example-order-amqp-contract"; import { diff --git a/examples/order-api-contract/README.md b/examples/order-api-contract/README.md index 6c9ea4b..ce43d6b 100644 --- a/examples/order-api-contract/README.md +++ b/examples/order-api-contract/README.md @@ -1,4 +1,4 @@ -# `@btravstack/start` example: the order API contract +# `@btravstack/start-core` example: the order API contract The oRPC contract — the wire shapes and the declared error codes — in a package of its own, depending on `@orpc/contract` and nothing else. diff --git a/examples/order-api/README.md b/examples/order-api/README.md index 0180108..ce252e0 100644 --- a/examples/order-api/README.md +++ b/examples/order-api/README.md @@ -1,4 +1,4 @@ -# `@btravstack/start` example: the order API layer +# `@btravstack/start-core` example: the order API layer The transport. A router implementing [`order-api-contract`](../order-api-contract), served over `node:http` under diff --git a/examples/order-api/package.json b/examples/order-api/package.json index 2c42daf..56b7425 100644 --- a/examples/order-api/package.json +++ b/examples/order-api/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@btravstack/di": "catalog:", - "@btravstack/start": "workspace:*", + "@btravstack/start-core": "workspace:*", "@btravstack/start-example-order-api-contract": "workspace:*", "@btravstack/start-example-order-application": "workspace:*", "@btravstack/start-example-order-config": "workspace:*", diff --git a/examples/order-api/src/main.ts b/examples/order-api/src/main.ts index 629e20d..6388a6e 100644 --- a/examples/order-api/src/main.ts +++ b/examples/order-api/src/main.ts @@ -1,4 +1,4 @@ -import { runMain, start } from "@btravstack/start"; +import { runMain, start } from "@btravstack/start-core"; import { FindOrder, Logger, PlaceOrder } from "@btravstack/start-example-order-application"; import { httpRuntime } from "@btravstack/start-http"; import { P } from "unthrown"; diff --git a/examples/order-api/src/needs-gate.test-d.ts b/examples/order-api/src/needs-gate.test-d.ts index d128247..ae5c82c 100644 --- a/examples/order-api/src/needs-gate.test-d.ts +++ b/examples/order-api/src/needs-gate.test-d.ts @@ -10,7 +10,7 @@ * *classes* while di parameterises `Context` by port *instances*. */ import { Module } from "@btravstack/di"; -import { start } from "@btravstack/start"; +import { start } from "@btravstack/start-core"; import { ApplicationModule, FindOrder, diff --git a/examples/order-api/src/test-fixtures.ts b/examples/order-api/src/test-fixtures.ts index caffcab..47c9fae 100644 --- a/examples/order-api/src/test-fixtures.ts +++ b/examples/order-api/src/test-fixtures.ts @@ -1,7 +1,7 @@ import assert from "node:assert/strict"; import { Module, Port, Provider, type Scope, type ServiceOf } from "@btravstack/di"; -import { start, type RunningApp } from "@btravstack/start"; +import { start, type RunningApp } from "@btravstack/start-core"; import { ApplicationModule, FindOrder, diff --git a/examples/order-application/README.md b/examples/order-application/README.md index 2229a04..60fe989 100644 --- a/examples/order-application/README.md +++ b/examples/order-application/README.md @@ -1,4 +1,4 @@ -# `@btravstack/start` example: the order application layer +# `@btravstack/start-core` example: the order application layer The use cases, and the ports they need to run. This layer turns the domain's rules into operations — "place an order", "find an order" — and declares, as @@ -61,10 +61,10 @@ the log line — with no Prisma, no HTTP and no kernel booted. ## The single kernel touchpoint -`src/logger.ts` imports exactly one thing from `@btravstack/start`: +`src/logger.ts` imports exactly one thing from `@btravstack/start-core`: ```ts -import { currentUnit } from "@btravstack/start"; +import { currentUnit } from "@btravstack/start-core"; ``` One `Logger` is constructed per scope, but the kernel opens a _unit_ per request diff --git a/examples/order-application/package.json b/examples/order-application/package.json index b55100d..15fdc2c 100644 --- a/examples/order-application/package.json +++ b/examples/order-application/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@btravstack/di": "catalog:", - "@btravstack/start": "workspace:*", + "@btravstack/start-core": "workspace:*", "@btravstack/start-example-order-domain": "workspace:*", "unthrown": "catalog:" }, diff --git a/examples/order-application/src/logger.ts b/examples/order-application/src/logger.ts index 1aa3b2a..1b6715f 100644 --- a/examples/order-application/src/logger.ts +++ b/examples/order-application/src/logger.ts @@ -1,5 +1,5 @@ import { Provider } from "@btravstack/di"; -import { currentUnit } from "@btravstack/start"; +import { currentUnit } from "@btravstack/start-core"; import { Logger } from "./ports.js"; diff --git a/examples/order-config/README.md b/examples/order-config/README.md index 669f87b..5b18b69 100644 --- a/examples/order-config/README.md +++ b/examples/order-config/README.md @@ -1,4 +1,4 @@ -# `@btravstack/start` example: the shared configuration reader +# `@btravstack/start-core` example: the shared configuration reader Three deployments, one way to read an environment variable — and the seven cases it has to survive pinned once instead of three times. diff --git a/examples/order-domain/README.md b/examples/order-domain/README.md index 031b8fa..76c79cc 100644 --- a/examples/order-domain/README.md +++ b/examples/order-domain/README.md @@ -1,4 +1,4 @@ -# `@btravstack/start` example: the order domain +# `@btravstack/start-core` example: the order domain The innermost layer. It holds the vocabulary — an `Order`, the rule that a quantity must be positive, and the three failures the rest of the system names. @@ -13,7 +13,7 @@ src/test-fixtures.ts a placed Order, injected as a Vitest fixture ## What is deliberately absent -No `@btravstack/di`, no `@btravstack/start`, no ports. A port describes what a +No `@btravstack/di`, no `@btravstack/start-core`, no ports. A port describes what a use case needs from the outside world, which is a question this layer does not ask; ports live one layer out, in `@btravstack/start-example-order-application`. The `dependencies` block of `package.json` is the whole statement: diff --git a/examples/order-infrastructure/README.md b/examples/order-infrastructure/README.md index be2095b..faf7ad7 100644 --- a/examples/order-infrastructure/README.md +++ b/examples/order-infrastructure/README.md @@ -1,4 +1,4 @@ -# `@btravstack/start` example: the order infrastructure layer +# `@btravstack/start-core` example: the order infrastructure layer The adapter side. This layer speaks Prisma, SQLite and P-codes, and its job is to make sure none of that vocabulary reaches the layers above it. diff --git a/examples/order-temporal-contract/README.md b/examples/order-temporal-contract/README.md index 9fa8bed..3e8b6b6 100644 --- a/examples/order-temporal-contract/README.md +++ b/examples/order-temporal-contract/README.md @@ -1,4 +1,4 @@ -# `@btravstack/start` example: the order Temporal contract +# `@btravstack/start-core` example: the order Temporal contract The Temporal contract — one workflow, one activity, and the two errors a caller may branch on — in a package of its own, depending on diff --git a/examples/order-temporal/README.md b/examples/order-temporal/README.md index 1d0555b..0884423 100644 --- a/examples/order-temporal/README.md +++ b/examples/order-temporal/README.md @@ -1,4 +1,4 @@ -# `@btravstack/start` example: the order Temporal worker +# `@btravstack/start-core` example: the order Temporal worker The third deployment. The same application, the same persistence, the same composition — driven by a durable execution engine instead of an HTTP server or diff --git a/examples/order-temporal/package.json b/examples/order-temporal/package.json index 77d8e85..e900a8e 100644 --- a/examples/order-temporal/package.json +++ b/examples/order-temporal/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@btravstack/di": "catalog:", - "@btravstack/start": "workspace:*", + "@btravstack/start-core": "workspace:*", "@btravstack/start-example-order-application": "workspace:*", "@btravstack/start-example-order-config": "workspace:*", "@btravstack/start-example-order-domain": "workspace:*", diff --git a/examples/order-temporal/src/main.ts b/examples/order-temporal/src/main.ts index 91cadb6..9f24643 100644 --- a/examples/order-temporal/src/main.ts +++ b/examples/order-temporal/src/main.ts @@ -1,4 +1,4 @@ -import { runMain, start } from "@btravstack/start"; +import { runMain, start } from "@btravstack/start-core"; import { orderContract } from "@btravstack/start-example-order-temporal-contract"; import { workflowsPathFromURL } from "@temporal-contract/worker/worker"; import { NativeConnection } from "@temporalio/worker"; diff --git a/examples/order-temporal/src/needs-gate.test-d.ts b/examples/order-temporal/src/needs-gate.test-d.ts index b9c0c36..53e47f8 100644 --- a/examples/order-temporal/src/needs-gate.test-d.ts +++ b/examples/order-temporal/src/needs-gate.test-d.ts @@ -9,7 +9,7 @@ * all proven against the same application graph at the `start(...)` call site. */ import { Module } from "@btravstack/di"; -import { start } from "@btravstack/start"; +import { start } from "@btravstack/start-core"; import { ApplicationModule, FindOrder, diff --git a/examples/order-temporal/src/temporal-runtime.ts b/examples/order-temporal/src/temporal-runtime.ts index 1582187..a5286e1 100644 --- a/examples/order-temporal/src/temporal-runtime.ts +++ b/examples/order-temporal/src/temporal-runtime.ts @@ -1,4 +1,4 @@ -import type { Runtime } from "@btravstack/start"; +import type { Runtime } from "@btravstack/start-core"; import { Logger, PlaceOrder } from "@btravstack/start-example-order-application"; import type { OrderContract } from "@btravstack/start-example-order-temporal-contract"; import { diff --git a/examples/order-temporal/src/test-fixtures.ts b/examples/order-temporal/src/test-fixtures.ts index 28de4b5..764b9fa 100644 --- a/examples/order-temporal/src/test-fixtures.ts +++ b/examples/order-temporal/src/test-fixtures.ts @@ -2,7 +2,7 @@ import { mkdirSync } from "node:fs"; import { fileURLToPath } from "node:url"; import { Module, Port, Provider, type Scope, type ServiceOf } from "@btravstack/di"; -import { start, type RunningApp } from "@btravstack/start"; +import { start, type RunningApp } from "@btravstack/start-core"; import { ApplicationModule, FindOrder, diff --git a/examples/order-worker/README.md b/examples/order-worker/README.md index 7012f55..03614fa 100644 --- a/examples/order-worker/README.md +++ b/examples/order-worker/README.md @@ -1,4 +1,4 @@ -# `@btravstack/start` example: the order worker +# `@btravstack/start-core` example: the order worker The second deployment. The same application, the same persistence, the same composition — consumed off a queue instead of served over HTTP. diff --git a/examples/order-worker/package.json b/examples/order-worker/package.json index 5f1e73f..0d6faf0 100644 --- a/examples/order-worker/package.json +++ b/examples/order-worker/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@btravstack/di": "catalog:", - "@btravstack/start": "workspace:*", + "@btravstack/start-core": "workspace:*", "@btravstack/start-example-order-application": "workspace:*", "@btravstack/start-example-order-config": "workspace:*", "@btravstack/start-example-order-domain": "workspace:*", diff --git a/examples/order-worker/src/main.ts b/examples/order-worker/src/main.ts index 094c7ec..2abc933 100644 --- a/examples/order-worker/src/main.ts +++ b/examples/order-worker/src/main.ts @@ -1,4 +1,4 @@ -import { runMain, start } from "@btravstack/start"; +import { runMain, start } from "@btravstack/start-core"; import { P } from "unthrown"; import { describeEnvIssues, readEnv, type Env } from "./env.js"; diff --git a/examples/order-worker/src/needs-gate.test-d.ts b/examples/order-worker/src/needs-gate.test-d.ts index dbde6ac..2ee7992 100644 --- a/examples/order-worker/src/needs-gate.test-d.ts +++ b/examples/order-worker/src/needs-gate.test-d.ts @@ -9,7 +9,7 @@ * against the same application graph at the `start(...)` call site. */ import { Module } from "@btravstack/di"; -import { start } from "@btravstack/start"; +import { start } from "@btravstack/start-core"; import { ApplicationModule, FindOrder, diff --git a/examples/order-worker/src/queue-runtime.ts b/examples/order-worker/src/queue-runtime.ts index 14ab1fb..129087b 100644 --- a/examples/order-worker/src/queue-runtime.ts +++ b/examples/order-worker/src/queue-runtime.ts @@ -1,5 +1,5 @@ import type { Context, ServiceOf } from "@btravstack/di"; -import type { Runtime, RuntimeHost, Serving, UnitMeta } from "@btravstack/start"; +import type { Runtime, RuntimeHost, Serving, UnitMeta } from "@btravstack/start-core"; import { Logger, PlaceOrder } from "@btravstack/start-example-order-application"; import { OkAsync, P, fromSafePromise, type AsyncResult } from "unthrown"; diff --git a/examples/order-worker/src/test-fixtures.ts b/examples/order-worker/src/test-fixtures.ts index e6cba07..59236e9 100644 --- a/examples/order-worker/src/test-fixtures.ts +++ b/examples/order-worker/src/test-fixtures.ts @@ -1,5 +1,5 @@ import { Module, Port, Provider, type Scope, type ServiceOf } from "@btravstack/di"; -import { start, type RunningApp } from "@btravstack/start"; +import { start, type RunningApp } from "@btravstack/start-core"; import { ApplicationModule, FindOrder, diff --git a/packages/start-amqp/CLAUDE.md b/packages/start-amqp/CLAUDE.md index c8f162e..03ffc6e 100644 --- a/packages/start-amqp/CLAUDE.md +++ b/packages/start-amqp/CLAUDE.md @@ -108,5 +108,5 @@ null })` **raced against `signal`**, and `stop()` reuses whatever deadline transport. `retry: { mode: "ttl-backoff", maxRetries: 3 }` also means **four** total attempts (first plus three retries), not the same count as Temporal's `maximumAttempts: 3`. -- Peer dependencies: `@btravstack/start`, `@btravstack/di`, `unthrown`, +- Peer dependencies: `@btravstack/start-core`, `@btravstack/di`, `unthrown`, `@amqp-contract/worker`, `@opentelemetry/api`. diff --git a/packages/start-amqp/README.md b/packages/start-amqp/README.md index 72a0086..c8f47a2 100644 --- a/packages/start-amqp/README.md +++ b/packages/start-amqp/README.md @@ -1,7 +1,7 @@ # @btravstack/start-amqp **The AMQP consumer runtime for -[`@btravstack/start`](https://github.com/btravstack/start): one unit per +[`@btravstack/start-core`](https://github.com/btravstack/start): one unit per delivery, and a drain with exactly one deadline — the kernel's own.** It runs an [`amqp-contract`](https://github.com/btravstack/amqp-contract) @@ -14,7 +14,7 @@ clock in the process. ## Install ```sh -pnpm add @btravstack/start-amqp @btravstack/start @btravstack/di unthrown \ +pnpm add @btravstack/start-amqp @btravstack/start-core @btravstack/di unthrown \ @amqp-contract/worker @opentelemetry/api ``` diff --git a/packages/start-amqp/package.json b/packages/start-amqp/package.json index 71eb488..80c4b80 100644 --- a/packages/start-amqp/package.json +++ b/packages/start-amqp/package.json @@ -1,7 +1,7 @@ { "name": "@btravstack/start-amqp", "version": "0.0.0", - "description": "The AMQP consumer runtime for @btravstack/start: one unit per delivery, and a drain the kernel's deadline releases", + "description": "The AMQP consumer runtime for @btravstack/start-core: one unit per delivery, and a drain the kernel's deadline releases", "keywords": [ "amqp", "graceful-shutdown", @@ -55,7 +55,7 @@ "@amqp-contract/testing": "catalog:", "@amqp-contract/worker": "catalog:", "@btravstack/di": "catalog:", - "@btravstack/start": "workspace:*", + "@btravstack/start-core": "workspace:*", "@btravstack/tsconfig": "catalog:", "@opentelemetry/api": "catalog:", "@types/node": "catalog:", @@ -70,7 +70,7 @@ "peerDependencies": { "@amqp-contract/worker": "^3.0.0-beta.6", "@btravstack/di": "^0.1.0", - "@btravstack/start": "workspace:^", + "@btravstack/start-core": "workspace:^", "@opentelemetry/api": "^1", "unthrown": "^5.0.0" }, diff --git a/packages/start-amqp/src/amqp-runtime.ts b/packages/start-amqp/src/amqp-runtime.ts index 7db8151..1e7eb55 100644 --- a/packages/start-amqp/src/amqp-runtime.ts +++ b/packages/start-amqp/src/amqp-runtime.ts @@ -5,7 +5,7 @@ import { type Runtime, type RuntimeHost, type Serving, -} from "@btravstack/start"; +} from "@btravstack/start-core"; import { ErrAsync, OkAsync, fromSafePromise, fromThrowable, type AsyncResult } from "unthrown"; import type { MessageMiddleware, MessageUnitContext } from "./message-units.js"; diff --git a/packages/start-amqp/src/message-units.ts b/packages/start-amqp/src/message-units.ts index da55d28..7d12ba9 100644 --- a/packages/start-amqp/src/message-units.ts +++ b/packages/start-amqp/src/message-units.ts @@ -1,7 +1,7 @@ import { randomUUID } from "node:crypto"; import type { AnyPort, Context } from "@btravstack/di"; -import type { RuntimeHost, UnitMeta } from "@btravstack/start"; +import type { RuntimeHost, UnitMeta } from "@btravstack/start-core"; import type { AsyncResult } from "unthrown"; /** What the middleware injects downstream: the application context, and nothing else. */ diff --git a/packages/start-amqp/src/test-fixtures.ts b/packages/start-amqp/src/test-fixtures.ts index d6e4fb7..7fa8c67 100644 --- a/packages/start-amqp/src/test-fixtures.ts +++ b/packages/start-amqp/src/test-fixtures.ts @@ -10,7 +10,7 @@ import { it as amqpIt } from "@amqp-contract/testing"; import type { AmqpTestFixtures } from "@amqp-contract/testing/extension"; import { declareHandler, type WorkerInferHandlers } from "@amqp-contract/worker"; import { Module, Port, Provider } from "@btravstack/di"; -import { start, type RunningApp, type RuntimeHost, type UnitMeta } from "@btravstack/start"; +import { start, type RunningApp, type RuntimeHost, type UnitMeta } from "@btravstack/start-core"; import { OkAsync, fromSafePromise, type AsyncResult } from "unthrown"; import { expect, type TestAPI } from "vitest"; import { z } from "zod"; diff --git a/packages/start/CLAUDE.md b/packages/start-core/CLAUDE.md similarity index 99% rename from packages/start/CLAUDE.md rename to packages/start-core/CLAUDE.md index 146670b..c4bdf14 100644 --- a/packages/start/CLAUDE.md +++ b/packages/start-core/CLAUDE.md @@ -1,9 +1,9 @@ -# packages/start +# packages/start-core The kernel's internals. The root `CLAUDE.md` is still the authoritative spec for what this package **is** — the thesis, the public surface and the conventions live there; this file holds the two sections that only matter when -you are editing `packages/start` itself. Both are load-bearing: keep them in +you are editing `packages/start-core` itself. Both are load-bearing: keep them in sync with the code in the same commit. ## Load-bearing runtime invariants (tests must guard these) @@ -139,7 +139,7 @@ gate. ## Internal design (don't break these) -`packages/start/src/` is one concept per file. +`packages/start-core/src/` is one concept per file. - **The needs check is a trailing phantom rest tuple, not a conditional on an inference-bearing parameter.** diff --git a/packages/start/LICENSE b/packages/start-core/LICENSE similarity index 100% rename from packages/start/LICENSE rename to packages/start-core/LICENSE diff --git a/packages/start/README.md b/packages/start-core/README.md similarity index 98% rename from packages/start/README.md rename to packages/start-core/README.md index 41618d1..8580fc5 100644 --- a/packages/start/README.md +++ b/packages/start-core/README.md @@ -1,9 +1,9 @@ -# @btravstack/start +# @btravstack/start-core **The application kernel: boot a [`@btravstack/di`](https://github.com/btravstack/di) module into a running process, and stop it again without losing work.** -[![npm version](https://img.shields.io/npm/v/%40btravstack%2Fstart.svg?logo=npm)](https://www.npmjs.com/package/@btravstack/start) +[![npm version](https://img.shields.io/npm/v/%40btravstack%2Fstart.svg?logo=npm)](https://www.npmjs.com/package/@btravstack/start-core) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) `di` proves an application's wiring before the process exists. `start` owns @@ -15,7 +15,7 @@ nothing about HTTP, AMQP or Temporal, it never throws, and it never calls ## Install ```sh -pnpm add @btravstack/start @btravstack/di unthrown +pnpm add @btravstack/start-core @btravstack/di unthrown ``` `@btravstack/di` and `unthrown` are **peer dependencies** — install all three. @@ -26,7 +26,7 @@ Node `>=20`. ```ts import { Module, Port, Provider } from "@btravstack/di"; -import { runMain, start, type Runtime, type Serving } from "@btravstack/start"; +import { runMain, start, type Runtime, type Serving } from "@btravstack/start-core"; import { Ok, OkAsync } from "unthrown"; class Greeter extends Port("Greeter")<{ @@ -193,7 +193,7 @@ together — the other way out, at the cost of no signal-driven drain.) ## Testing -`@btravstack/start/testing` ships `createFakeClock`, `testRuntime` and +`@btravstack/start-core/testing` ships `createFakeClock`, `testRuntime` and `withApp`. ```ts diff --git a/packages/start/package.json b/packages/start-core/package.json similarity index 96% rename from packages/start/package.json rename to packages/start-core/package.json index e26f2db..f6d355a 100644 --- a/packages/start/package.json +++ b/packages/start-core/package.json @@ -1,5 +1,5 @@ { - "name": "@btravstack/start", + "name": "@btravstack/start-core", "version": "0.1.0", "description": "The application kernel: boot a di module into a running process, and stop it without losing work", "keywords": [ @@ -21,7 +21,7 @@ "repository": { "type": "git", "url": "https://github.com/btravstack/start.git", - "directory": "packages/start" + "directory": "packages/start-core" }, "files": [ "dist" diff --git a/packages/start/src/clock.spec.ts b/packages/start-core/src/clock.spec.ts similarity index 100% rename from packages/start/src/clock.spec.ts rename to packages/start-core/src/clock.spec.ts diff --git a/packages/start/src/clock.ts b/packages/start-core/src/clock.ts similarity index 100% rename from packages/start/src/clock.ts rename to packages/start-core/src/clock.ts diff --git a/packages/start/src/deferred.ts b/packages/start-core/src/deferred.ts similarity index 100% rename from packages/start/src/deferred.ts rename to packages/start-core/src/deferred.ts diff --git a/packages/start/src/docs-examples.test-d.ts b/packages/start-core/src/docs-examples.test-d.ts similarity index 97% rename from packages/start/src/docs-examples.test-d.ts rename to packages/start-core/src/docs-examples.test-d.ts index daa2833..6caff09 100644 --- a/packages/start/src/docs-examples.test-d.ts +++ b/packages/start-core/src/docs-examples.test-d.ts @@ -1,9 +1,9 @@ -// Every code sample the root `README.md` and `packages/start/README.md` ship, +// Every code sample the root `README.md` and `packages/start-core/README.md` ship, // compiled. A sample that stops compiling fails `pnpm typecheck`. // // The one deliberate divergence from the published text: the samples import -// from `./index.js` / `./testing.js` where a reader imports `@btravstack/start` -// and `@btravstack/start/testing`. The package cannot resolve its own name from +// from `./index.js` / `./testing.js` where a reader imports `@btravstack/start-core` +// and `@btravstack/start-core/testing`. The package cannot resolve its own name from // inside its own source tree, and those two specifiers are exactly what // `package.json`'s `exports` map points at. diff --git a/packages/start/src/drain.spec.ts b/packages/start-core/src/drain.spec.ts similarity index 100% rename from packages/start/src/drain.spec.ts rename to packages/start-core/src/drain.spec.ts diff --git a/packages/start/src/drain.ts b/packages/start-core/src/drain.ts similarity index 100% rename from packages/start/src/drain.ts rename to packages/start-core/src/drain.ts diff --git a/packages/start/src/events.spec.ts b/packages/start-core/src/events.spec.ts similarity index 100% rename from packages/start/src/events.spec.ts rename to packages/start-core/src/events.spec.ts diff --git a/packages/start/src/events.ts b/packages/start-core/src/events.ts similarity index 100% rename from packages/start/src/events.ts rename to packages/start-core/src/events.ts diff --git a/packages/start/src/fake-clock.spec.ts b/packages/start-core/src/fake-clock.spec.ts similarity index 100% rename from packages/start/src/fake-clock.spec.ts rename to packages/start-core/src/fake-clock.spec.ts diff --git a/packages/start/src/fake-clock.ts b/packages/start-core/src/fake-clock.ts similarity index 100% rename from packages/start/src/fake-clock.ts rename to packages/start-core/src/fake-clock.ts diff --git a/packages/start/src/index.ts b/packages/start-core/src/index.ts similarity index 100% rename from packages/start/src/index.ts rename to packages/start-core/src/index.ts diff --git a/packages/start/src/invariants.spec.ts b/packages/start-core/src/invariants.spec.ts similarity index 100% rename from packages/start/src/invariants.spec.ts rename to packages/start-core/src/invariants.spec.ts diff --git a/packages/start/src/phase.spec.ts b/packages/start-core/src/phase.spec.ts similarity index 100% rename from packages/start/src/phase.spec.ts rename to packages/start-core/src/phase.spec.ts diff --git a/packages/start/src/phase.ts b/packages/start-core/src/phase.ts similarity index 100% rename from packages/start/src/phase.ts rename to packages/start-core/src/phase.ts diff --git a/packages/start/src/probes.spec.ts b/packages/start-core/src/probes.spec.ts similarity index 100% rename from packages/start/src/probes.spec.ts rename to packages/start-core/src/probes.spec.ts diff --git a/packages/start/src/probes.ts b/packages/start-core/src/probes.ts similarity index 100% rename from packages/start/src/probes.ts rename to packages/start-core/src/probes.ts diff --git a/packages/start/src/process-handlers.spec.ts b/packages/start-core/src/process-handlers.spec.ts similarity index 100% rename from packages/start/src/process-handlers.spec.ts rename to packages/start-core/src/process-handlers.spec.ts diff --git a/packages/start/src/process-handlers.ts b/packages/start-core/src/process-handlers.ts similarity index 100% rename from packages/start/src/process-handlers.ts rename to packages/start-core/src/process-handlers.ts diff --git a/packages/start/src/run-main.spec.ts b/packages/start-core/src/run-main.spec.ts similarity index 100% rename from packages/start/src/run-main.spec.ts rename to packages/start-core/src/run-main.spec.ts diff --git a/packages/start/src/run-main.ts b/packages/start-core/src/run-main.ts similarity index 100% rename from packages/start/src/run-main.ts rename to packages/start-core/src/run-main.ts diff --git a/packages/start/src/runtime.ts b/packages/start-core/src/runtime.ts similarity index 100% rename from packages/start/src/runtime.ts rename to packages/start-core/src/runtime.ts diff --git a/packages/start/src/start.spec.ts b/packages/start-core/src/start.spec.ts similarity index 100% rename from packages/start/src/start.spec.ts rename to packages/start-core/src/start.spec.ts diff --git a/packages/start/src/start.test-d.ts b/packages/start-core/src/start.test-d.ts similarity index 100% rename from packages/start/src/start.test-d.ts rename to packages/start-core/src/start.test-d.ts diff --git a/packages/start/src/start.ts b/packages/start-core/src/start.ts similarity index 100% rename from packages/start/src/start.ts rename to packages/start-core/src/start.ts diff --git a/packages/start/src/test-runtime.spec.ts b/packages/start-core/src/test-runtime.spec.ts similarity index 100% rename from packages/start/src/test-runtime.spec.ts rename to packages/start-core/src/test-runtime.spec.ts diff --git a/packages/start/src/test-runtime.ts b/packages/start-core/src/test-runtime.ts similarity index 100% rename from packages/start/src/test-runtime.ts rename to packages/start-core/src/test-runtime.ts diff --git a/packages/start/src/testing.ts b/packages/start-core/src/testing.ts similarity index 100% rename from packages/start/src/testing.ts rename to packages/start-core/src/testing.ts diff --git a/packages/start/src/units.spec.ts b/packages/start-core/src/units.spec.ts similarity index 100% rename from packages/start/src/units.spec.ts rename to packages/start-core/src/units.spec.ts diff --git a/packages/start/src/units.ts b/packages/start-core/src/units.ts similarity index 100% rename from packages/start/src/units.ts rename to packages/start-core/src/units.ts diff --git a/packages/start/src/vitest.d.ts b/packages/start-core/src/vitest.d.ts similarity index 100% rename from packages/start/src/vitest.d.ts rename to packages/start-core/src/vitest.d.ts diff --git a/packages/start/src/with-app.spec.ts b/packages/start-core/src/with-app.spec.ts similarity index 100% rename from packages/start/src/with-app.spec.ts rename to packages/start-core/src/with-app.spec.ts diff --git a/packages/start/src/with-app.ts b/packages/start-core/src/with-app.ts similarity index 100% rename from packages/start/src/with-app.ts rename to packages/start-core/src/with-app.ts diff --git a/packages/start/tsconfig.json b/packages/start-core/tsconfig.json similarity index 100% rename from packages/start/tsconfig.json rename to packages/start-core/tsconfig.json diff --git a/packages/start/tsconfig.test-d.json b/packages/start-core/tsconfig.test-d.json similarity index 100% rename from packages/start/tsconfig.test-d.json rename to packages/start-core/tsconfig.test-d.json diff --git a/packages/start/vitest.config.ts b/packages/start-core/vitest.config.ts similarity index 100% rename from packages/start/vitest.config.ts rename to packages/start-core/vitest.config.ts diff --git a/packages/start-http/CLAUDE.md b/packages/start-http/CLAUDE.md index 606355f..6fafe5d 100644 --- a/packages/start-http/CLAUDE.md +++ b/packages/start-http/CLAUDE.md @@ -32,4 +32,4 @@ the same commit, and with `README.md` — the package ships no - **Not included, deliberately**: routing, middleware, `Result` → HTTP status, HTTPS, HTTP/2 — see the package README's _"What it does not do"_ for why each is a non-goal. -- Peer dependencies: `@btravstack/start`, `@btravstack/di`, `unthrown`. +- Peer dependencies: `@btravstack/start-core`, `@btravstack/di`, `unthrown`. diff --git a/packages/start-http/README.md b/packages/start-http/README.md index b6accc9..52b095e 100644 --- a/packages/start-http/README.md +++ b/packages/start-http/README.md @@ -1,6 +1,6 @@ # @btravstack/start-http -**The HTTP runtime for [`@btravstack/start`](https://github.com/btravstack/start): +**The HTTP runtime for [`@btravstack/start-core`](https://github.com/btravstack/start): one unit per request, and a drain that actually stops accepting.** Routing and middleware are solved by oRPC, Hono, Express and half a dozen @@ -12,10 +12,10 @@ and nothing a router already does better. ## Install ```sh -pnpm add @btravstack/start-http @btravstack/start @btravstack/di unthrown +pnpm add @btravstack/start-http @btravstack/start-core @btravstack/di unthrown ``` -`@btravstack/start`, `@btravstack/di` and `unthrown` are peer dependencies — +`@btravstack/start-core`, `@btravstack/di` and `unthrown` are peer dependencies — install all three. Node `>=20`. Not yet published: this repository has not cut a release, so there is nothing @@ -117,7 +117,7 @@ hang. ## Writing a runtime -`@btravstack/start` states two obligations a runtime owes that the kernel +`@btravstack/start-core` states two obligations a runtime owes that the kernel cannot check for you (see its README's own _Writing a runtime_ section). This package exists to discharge both on the caller's behalf, so an application built on it gets them for free rather than having to get them right by hand: diff --git a/packages/start-http/package.json b/packages/start-http/package.json index 413fc2a..51d9518 100644 --- a/packages/start-http/package.json +++ b/packages/start-http/package.json @@ -1,7 +1,7 @@ { "name": "@btravstack/start-http", "version": "0.0.0", - "description": "The HTTP runtime for @btravstack/start: one unit per request, and a drain that actually stops accepting", + "description": "The HTTP runtime for @btravstack/start-core: one unit per request, and a drain that actually stops accepting", "keywords": [ "graceful-shutdown", "http", @@ -50,7 +50,7 @@ }, "devDependencies": { "@btravstack/di": "catalog:", - "@btravstack/start": "workspace:*", + "@btravstack/start-core": "workspace:*", "@btravstack/tsconfig": "catalog:", "@types/node": "catalog:", "@unthrown/vitest": "catalog:", @@ -62,7 +62,7 @@ }, "peerDependencies": { "@btravstack/di": "^0.1.0", - "@btravstack/start": "workspace:^", + "@btravstack/start-core": "workspace:^", "unthrown": "^5.0.0" }, "engines": { diff --git a/packages/start-http/src/http-runtime.ts b/packages/start-http/src/http-runtime.ts index 0ad096e..7f16997 100644 --- a/packages/start-http/src/http-runtime.ts +++ b/packages/start-http/src/http-runtime.ts @@ -9,7 +9,7 @@ import { type RuntimeHost, type Serving, type UnitMeta, -} from "@btravstack/start"; +} from "@btravstack/start-core"; import { Err, Ok, OkAsync, fromSafePromise, type AsyncResult, type Result } from "unthrown"; /** What the runtime publishes once it is listening, read back through `RunningApp.runtimeInfo()`. */ diff --git a/packages/start-http/src/test-fixtures.ts b/packages/start-http/src/test-fixtures.ts index 745cb9c..df8bc39 100644 --- a/packages/start-http/src/test-fixtures.ts +++ b/packages/start-http/src/test-fixtures.ts @@ -26,7 +26,7 @@ import { createServer } from "node:http"; import { connect, type Socket } from "node:net"; import { Module, Port, Provider } from "@btravstack/di"; -import { currentUnit, start, type RunningApp } from "@btravstack/start"; +import { currentUnit, start, type RunningApp } from "@btravstack/start-core"; import { expect, test } from "vitest"; import { httpRuntime, type HttpHandler, type HttpInfo } from "./http-runtime.js"; diff --git a/packages/start-temporal/CLAUDE.md b/packages/start-temporal/CLAUDE.md index 474bfd1..fe5879b 100644 --- a/packages/start-temporal/CLAUDE.md +++ b/packages/start-temporal/CLAUDE.md @@ -59,5 +59,5 @@ with the code in the same commit, and with `README.md` — the package ships no downstream, and `createContext` runs once per activity execution. That last point is what makes the per-unit context ride through the library's own channel rather than a channel this package invented. -- Peer dependencies: `@btravstack/start`, `@btravstack/di`, `unthrown`, +- Peer dependencies: `@btravstack/start-core`, `@btravstack/di`, `unthrown`, `@temporalio/worker`, `@temporalio/activity`, `@temporalio/common`. diff --git a/packages/start-temporal/README.md b/packages/start-temporal/README.md index 0442f0e..2c879e0 100644 --- a/packages/start-temporal/README.md +++ b/packages/start-temporal/README.md @@ -1,7 +1,7 @@ # @btravstack/start-temporal **The Temporal worker runtime for -[`@btravstack/start`](https://github.com/btravstack/start): one unit per +[`@btravstack/start-core`](https://github.com/btravstack/start): one unit per activity attempt, and a drain that releases the kernel at the kernel's deadline.** @@ -17,7 +17,7 @@ this is a package rather than per-application code. ## Install ```sh -pnpm add @btravstack/start-temporal @btravstack/start @btravstack/di unthrown \ +pnpm add @btravstack/start-temporal @btravstack/start-core @btravstack/di unthrown \ @temporalio/worker @temporalio/activity @temporalio/common ``` diff --git a/packages/start-temporal/package.json b/packages/start-temporal/package.json index 0afe402..7cd723b 100644 --- a/packages/start-temporal/package.json +++ b/packages/start-temporal/package.json @@ -1,7 +1,7 @@ { "name": "@btravstack/start-temporal", "version": "0.0.0", - "description": "The Temporal worker runtime for @btravstack/start: one unit per activity attempt, and a drain that honours the kernel's deadline", + "description": "The Temporal worker runtime for @btravstack/start-core: one unit per activity attempt, and a drain that honours the kernel's deadline", "keywords": [ "graceful-shutdown", "lifecycle", @@ -51,7 +51,7 @@ }, "devDependencies": { "@btravstack/di": "catalog:", - "@btravstack/start": "workspace:*", + "@btravstack/start-core": "workspace:*", "@btravstack/tsconfig": "catalog:", "@temporal-contract/contract": "catalog:", "@temporal-contract/worker": "catalog:", @@ -72,7 +72,7 @@ }, "peerDependencies": { "@btravstack/di": "^0.1.0", - "@btravstack/start": "workspace:^", + "@btravstack/start-core": "workspace:^", "@temporalio/activity": "^1.22.0", "@temporalio/common": "^1.22.0", "@temporalio/worker": "^1.22.0", diff --git a/packages/start-temporal/src/activity-units.ts b/packages/start-temporal/src/activity-units.ts index 0fcf288..627162e 100644 --- a/packages/start-temporal/src/activity-units.ts +++ b/packages/start-temporal/src/activity-units.ts @@ -1,5 +1,5 @@ import type { AnyPort, Context } from "@btravstack/di"; -import type { RuntimeHost, UnitMeta } from "@btravstack/start"; +import type { RuntimeHost, UnitMeta } from "@btravstack/start-core"; import { activityInfo } from "@temporalio/activity"; import type { AsyncResult } from "unthrown"; diff --git a/packages/start-temporal/src/temporal-runtime.ts b/packages/start-temporal/src/temporal-runtime.ts index 7841bb8..47eabde 100644 --- a/packages/start-temporal/src/temporal-runtime.ts +++ b/packages/start-temporal/src/temporal-runtime.ts @@ -4,7 +4,7 @@ import { type Runtime, type RuntimeHost, type Serving, -} from "@btravstack/start"; +} from "@btravstack/start-core"; import type { Duration } from "@temporalio/common"; import { Worker, diff --git a/packages/start-temporal/src/test-fixtures.ts b/packages/start-temporal/src/test-fixtures.ts index 88627bb..649be29 100644 --- a/packages/start-temporal/src/test-fixtures.ts +++ b/packages/start-temporal/src/test-fixtures.ts @@ -2,7 +2,7 @@ import { mkdirSync } from "node:fs"; import { fileURLToPath } from "node:url"; import { Module, Port, Provider } from "@btravstack/di"; -import { start, type RunningApp, type RuntimeHost, type UnitMeta } from "@btravstack/start"; +import { start, type RunningApp, type RuntimeHost, type UnitMeta } from "@btravstack/start-core"; import { defineActivity, defineContract, defineWorkflow } from "@temporal-contract/contract"; import { declareActivitiesHandler } from "@temporal-contract/worker/activity"; import { activityInfo } from "@temporalio/activity"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fd6f60c..5b8327a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -188,12 +188,12 @@ importers: '@btravstack/di': specifier: 'catalog:' version: 0.1.0(unthrown@5.5.0) - '@btravstack/start': - specifier: workspace:* - version: link:../../packages/start '@btravstack/start-amqp': specifier: workspace:* version: link:../../packages/start-amqp + '@btravstack/start-core': + specifier: workspace:* + version: link:../../packages/start-core '@btravstack/start-example-order-amqp-contract': specifier: workspace:* version: link:../order-amqp-contract @@ -277,9 +277,9 @@ importers: '@btravstack/di': specifier: 'catalog:' version: 0.1.0(unthrown@5.5.0) - '@btravstack/start': + '@btravstack/start-core': specifier: workspace:* - version: link:../../packages/start + version: link:../../packages/start-core '@btravstack/start-example-order-api-contract': specifier: workspace:* version: link:../order-api-contract @@ -369,9 +369,9 @@ importers: '@btravstack/di': specifier: 'catalog:' version: 0.1.0(unthrown@5.5.0) - '@btravstack/start': + '@btravstack/start-core': specifier: workspace:* - version: link:../../packages/start + version: link:../../packages/start-core '@btravstack/start-example-order-domain': specifier: workspace:* version: link:../order-domain @@ -502,9 +502,9 @@ importers: '@btravstack/di': specifier: 'catalog:' version: 0.1.0(unthrown@5.5.0) - '@btravstack/start': + '@btravstack/start-core': specifier: workspace:* - version: link:../../packages/start + version: link:../../packages/start-core '@btravstack/start-example-order-application': specifier: workspace:* version: link:../order-application @@ -606,9 +606,9 @@ importers: '@btravstack/di': specifier: 'catalog:' version: 0.1.0(unthrown@5.5.0) - '@btravstack/start': + '@btravstack/start-core': specifier: workspace:* - version: link:../../packages/start + version: link:../../packages/start-core '@btravstack/start-example-order-application': specifier: workspace:* version: link:../order-application @@ -647,14 +647,29 @@ importers: specifier: 'catalog:' version: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@26.1.2)(@vitest/coverage-v8@4.1.10)(jiti@2.7.0)(terser@5.50.0)(yaml@2.9.0) - packages/start: + packages/start-amqp: devDependencies: + '@amqp-contract/contract': + specifier: 'catalog:' + version: 3.0.0-beta.6 + '@amqp-contract/testing': + specifier: 'catalog:' + version: 3.0.0-beta.6(vitest@4.1.10) + '@amqp-contract/worker': + specifier: 'catalog:' + version: 3.0.0-beta.6(@opentelemetry/api@1.9.1)(unthrown@5.5.0) '@btravstack/di': specifier: 'catalog:' version: 0.1.0(unthrown@5.5.0) + '@btravstack/start-core': + specifier: workspace:* + version: link:../start-core '@btravstack/tsconfig': specifier: 'catalog:' version: 0.2.0 + '@opentelemetry/api': + specifier: 'catalog:' + version: 1.9.1 '@types/node': specifier: 'catalog:' version: 26.1.2 @@ -676,30 +691,18 @@ importers: vitest: specifier: 'catalog:' version: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@26.1.2)(@vitest/coverage-v8@4.1.10)(jiti@2.7.0)(terser@5.50.0)(yaml@2.9.0) + zod: + specifier: 'catalog:' + version: 4.4.3 - packages/start-amqp: + packages/start-core: devDependencies: - '@amqp-contract/contract': - specifier: 'catalog:' - version: 3.0.0-beta.6 - '@amqp-contract/testing': - specifier: 'catalog:' - version: 3.0.0-beta.6(vitest@4.1.10) - '@amqp-contract/worker': - specifier: 'catalog:' - version: 3.0.0-beta.6(@opentelemetry/api@1.9.1)(unthrown@5.5.0) '@btravstack/di': specifier: 'catalog:' version: 0.1.0(unthrown@5.5.0) - '@btravstack/start': - specifier: workspace:* - version: link:../start '@btravstack/tsconfig': specifier: 'catalog:' version: 0.2.0 - '@opentelemetry/api': - specifier: 'catalog:' - version: 1.9.1 '@types/node': specifier: 'catalog:' version: 26.1.2 @@ -721,18 +724,15 @@ importers: vitest: specifier: 'catalog:' version: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@26.1.2)(@vitest/coverage-v8@4.1.10)(jiti@2.7.0)(terser@5.50.0)(yaml@2.9.0) - zod: - specifier: 'catalog:' - version: 4.4.3 packages/start-http: devDependencies: '@btravstack/di': specifier: 'catalog:' version: 0.1.0(unthrown@5.5.0) - '@btravstack/start': + '@btravstack/start-core': specifier: workspace:* - version: link:../start + version: link:../start-core '@btravstack/tsconfig': specifier: 'catalog:' version: 0.2.0 @@ -763,9 +763,9 @@ importers: '@btravstack/di': specifier: 'catalog:' version: 0.1.0(unthrown@5.5.0) - '@btravstack/start': + '@btravstack/start-core': specifier: workspace:* - version: link:../start + version: link:../start-core '@btravstack/tsconfig': specifier: 'catalog:' version: 0.2.0 @@ -7306,7 +7306,7 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 26.1.2 + '@types/node': 26.2.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -7818,7 +7818,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.2 - '@types/node': 26.1.2 + '@types/node': 26.2.0 long: 5.3.2 pump@3.0.4: From 0108f5cc54b484bf0e2d69b38e4c41d1b29a2255 Mon Sep 17 00:00:00 2001 From: Benoit Travers Date: Thu, 13 Aug 2026 22:06:18 +0200 Subject: [PATCH 2/3] style: oxfmt after the start-core rename Co-Authored-By: Claude Fable 5 --- README.md | 7 ++++++- examples/order-amqp/package.json | 2 +- examples/order-amqp/src/amqp-runtime.ts | 2 +- examples/order-amqp/src/test-fixtures.ts | 2 +- packages/start-core/README.md | 7 ++++++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c280592..e8d7d80 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,12 @@ The kernel itself has no runtime dependencies beyond `node:` builtins. ```ts import { Module, Port, Provider } from "@btravstack/di"; -import { runMain, start, type Runtime, type Serving } from "@btravstack/start-core"; +import { + runMain, + start, + type Runtime, + type Serving, +} from "@btravstack/start-core"; import { Ok, OkAsync } from "unthrown"; class Greeter extends Port("Greeter")<{ diff --git a/examples/order-amqp/package.json b/examples/order-amqp/package.json index b239558..ac0281c 100644 --- a/examples/order-amqp/package.json +++ b/examples/order-amqp/package.json @@ -17,8 +17,8 @@ "dependencies": { "@amqp-contract/worker": "catalog:", "@btravstack/di": "catalog:", - "@btravstack/start-core": "workspace:*", "@btravstack/start-amqp": "workspace:*", + "@btravstack/start-core": "workspace:*", "@btravstack/start-example-order-amqp-contract": "workspace:*", "@btravstack/start-example-order-application": "workspace:*", "@btravstack/start-example-order-config": "workspace:*", diff --git a/examples/order-amqp/src/amqp-runtime.ts b/examples/order-amqp/src/amqp-runtime.ts index 533cc2f..1b61065 100644 --- a/examples/order-amqp/src/amqp-runtime.ts +++ b/examples/order-amqp/src/amqp-runtime.ts @@ -1,11 +1,11 @@ import { declareHandler, NonRetryableError, RetryableError } from "@amqp-contract/worker"; -import type { Runtime } from "@btravstack/start-core"; import { amqpRuntime, messageUnits, type AmqpInfo, type MessageUnitContext, } from "@btravstack/start-amqp"; +import type { Runtime } from "@btravstack/start-core"; import type { OrderContract } from "@btravstack/start-example-order-amqp-contract"; import { Logger, PlaceOrder } from "@btravstack/start-example-order-application"; import { ErrAsync, P } from "unthrown"; diff --git a/examples/order-amqp/src/test-fixtures.ts b/examples/order-amqp/src/test-fixtures.ts index 5e15902..fa1a1a4 100644 --- a/examples/order-amqp/src/test-fixtures.ts +++ b/examples/order-amqp/src/test-fixtures.ts @@ -1,8 +1,8 @@ import { it as amqpIt } from "@amqp-contract/testing"; import type { AmqpTestFixtures } from "@amqp-contract/testing/extension"; import { Module, Port, Provider, type Scope, type ServiceOf } from "@btravstack/di"; -import { start, type RunningApp } from "@btravstack/start-core"; import type { AmqpInfo } from "@btravstack/start-amqp"; +import { start, type RunningApp } from "@btravstack/start-core"; import { orderContract } from "@btravstack/start-example-order-amqp-contract"; import { ApplicationModule, diff --git a/packages/start-core/README.md b/packages/start-core/README.md index 8580fc5..e225dc9 100644 --- a/packages/start-core/README.md +++ b/packages/start-core/README.md @@ -26,7 +26,12 @@ Node `>=20`. ```ts import { Module, Port, Provider } from "@btravstack/di"; -import { runMain, start, type Runtime, type Serving } from "@btravstack/start-core"; +import { + runMain, + start, + type Runtime, + type Serving, +} from "@btravstack/start-core"; import { Ok, OkAsync } from "unthrown"; class Greeter extends Port("Greeter")<{ From 625a8a75861dd6e81863ded60f7771f41813e215 Mon Sep 17 00:00:00 2001 From: Benoit Travers Date: Thu, 13 Aug 2026 22:11:45 +0200 Subject: [PATCH 3/3] docs: fix URL-encoded npm badge names missed by the rename Co-Authored-By: Claude Fable 5 --- README.md | 2 +- packages/start-core/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e8d7d80..068c658 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ boot a [`@btravstack/di`](https://github.com/btravstack/di) module into a runnin process, and stop it again without losing work.** [![CI](https://github.com/btravstack/start/actions/workflows/ci.yml/badge.svg)](https://github.com/btravstack/start/actions/workflows/ci.yml) -[![npm version](https://img.shields.io/npm/v/%40btravstack%2Fstart.svg?logo=npm)](https://www.npmjs.com/package/@btravstack/start-core) +[![npm version](https://img.shields.io/npm/v/%40btravstack%2Fstart-core.svg?logo=npm)](https://www.npmjs.com/package/@btravstack/start-core) [![TypeScript](https://img.shields.io/badge/TypeScript-7.0-blue?logo=typescript)](https://www.typescriptlang.org/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) diff --git a/packages/start-core/README.md b/packages/start-core/README.md index e225dc9..8e3ac6a 100644 --- a/packages/start-core/README.md +++ b/packages/start-core/README.md @@ -3,7 +3,7 @@ **The application kernel: boot a [`@btravstack/di`](https://github.com/btravstack/di) module into a running process, and stop it again without losing work.** -[![npm version](https://img.shields.io/npm/v/%40btravstack%2Fstart.svg?logo=npm)](https://www.npmjs.com/package/@btravstack/start-core) +[![npm version](https://img.shields.io/npm/v/%40btravstack%2Fstart-core.svg?logo=npm)](https://www.npmjs.com/package/@btravstack/start-core) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) `di` proves an application's wiring before the process exists. `start` owns