Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .changeset/console-readme-resolution-order.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
---
"@objectstack/console": patch
---

Correct the published `@objectstack/console` README's account of how the CLI
resolves the Console SPA (#11262). `README.md` is in this package's `files`
array, so it is the page npm renders.

The README claimed `resolveConsolePath()` "prefers `@objectstack/console` and
falls back to `@object-ui/console` when present — so cloud's Docker overlay
(which `cp -r`s its build over `node_modules/@object-ui/console`) keeps
working." Both halves are false against
`packages/cli/src/utils/console.ts`:

- There is no `node_modules` fallback to the `@object-ui/console` npm
package. Strategy 1 (`require.resolve('@objectstack/console/package.json')`
from the app and from the CLI itself) and strategy 2 (direct
`<cwd>/node_modules/@objectstack/console`) each require the resolved
`package.json` to be named `@objectstack/console`. The legacy package is
never consulted; the function's own header says so.
- `@object-ui/console` survives in exactly one branch — strategy 3, the
sibling-repo dev fallback, which matches the `name` field of a checked-out
`../objectui/apps/console` **source** tree. That is a source-checkout
probe, not a package resolution, and the corrected text keeps the two
apart.
- The trailing consequence was the load-bearing half: cloud and objectos
Docker images overlay into `@objectstack/console`'s `dist/`, so the README
was telling an operator their overlay works by a mechanism that no longer
exists. Replaced with the real overlay target.

Documentation only — no runtime, type or export change. The removal of the
npm-package fallback was deliberate and is not restored here.
20 changes: 16 additions & 4 deletions packages/console/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,10 +29,22 @@ in sync.
| Use | Cloud overlays, advanced users, anyone consuming Console directly | What every `@objectstack/cli` install gets by default |

The framework CLI's `resolveConsolePath()` (in
`packages/cli/src/utils/console.ts`) prefers `@objectstack/console` and
falls back to `@object-ui/console` when present — so cloud's Docker
overlay (which `cp -r`s its build over `node_modules/@object-ui/console`)
keeps working.
`packages/cli/src/utils/console.ts`) resolves `@objectstack/console` and
nothing else — `require.resolve('@objectstack/console/package.json')` from
the app and from the CLI itself, then a direct
`<cwd>/node_modules/@objectstack/console` check. Both require the resolved
`package.json` to be *named* `@objectstack/console`, so there is **no**
`node_modules` fallback to the `@object-ui/console` npm package; it is
never consulted.

`@object-ui/console` survives in the CLI in exactly one place: the
sibling-repo dev fallback, which accepts a checked-out **source** tree at
`../objectui/apps/console` whose `package.json` `name` is either spelling
(objectui still names that workspace package `@object-ui/console`). That is
a source-checkout probe for developing the framework against in-tree
objectui edits — not a package resolution. Cloud and objectos Docker images
overlay their own Console build into `@objectstack/console`'s `dist/` — not
into any `@object-ui/console` directory.

## Updating

Expand Down
Loading