Skip to content

Commit 8c82289

Browse files
hotlongclaude
andauthored
feat(cli): ratify ./console as a public subpath export — the out-of-repo consumer #13123 predicted (#13662)
#13123 sealed the CLI behind an `exports` map, and its own body names the remedy for a consumer that was reading `dist/` paths: ratify the subpath as public surface rather than keep the deep read. That consumer exists — cloud's `objectos-runtime` node server mounts the Console SPA through the CLI's self-contained static-serve util (`resolveConsolePath` / `hasConsoleDist` / `createConsoleStaticPlugin`, fs/path only, no oclif) via what was `@objectstack/cli/dist/utils/console.js`. Under the sealed map that specifier throws ERR_PACKAGE_PATH_NOT_EXPORTED at BOTH layers: tsup's DTS build refuses (TS2307), and at runtime the consumer's defensive catch silently degrades every boot to API-only — a working deployment loses its console with nothing but a warn line. `./console` maps to exactly the module that was being consumed (`dist/utils/console.{js,d.ts}`), so the surface grows by one deliberate door, not back to "everything under dist/". check:published-files' GATED invariant stays green (the map still names real entries), and the census floor is untouched. Gates run at this head: full 71-package build, full-repo lint, check:published-files, check-empty-changeset — all exit 0. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 575ce83 commit 8c82289

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@objectstack/cli': minor
3+
---
4+
5+
Ratify `./console` as a public subpath export — `resolveConsolePath`, `hasConsoleDist`, `createConsoleStaticPlugin` and the drift-guard helpers were reachable as a deep `dist/` import until #13123 sealed the surface, and cloud's `objectos-runtime` node server consumes them to mount the Console SPA. The #13123 body names exactly this remedy for an out-of-repo consumer: ratify the subpath as public surface rather than read `dist/` paths.

packages/cli/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
".": {
99
"types": "./dist/index.d.ts",
1010
"default": "./dist/index.js"
11+
},
12+
"./console": {
13+
"types": "./dist/utils/console.d.ts",
14+
"default": "./dist/utils/console.js"
1115
}
1216
},
1317
"bin": {

0 commit comments

Comments
 (0)