Powerhouse v6.3.0
6.3.0 makes hosts and ph run the way to run a project. Nothing is removed in
this release. What 6.4 removes prints a warning, and each warning links to the
migration page.
What is new​
Hosts and ph run are always on​
A project describes every way it can run in its hosts/ folder. Each
subfolder holds one host file:
hosts/
connect/host.js ph run connect
switchboard/host.js ph run switchboard
vetra/host.js ph run vetra
desktop/host.js ph run desktop
assistant/host.js ph run assistant
cli/host.js ph run cli
ph run vetra
ph run connect dev
ph run switchboard
ph run <host> [verb]starts a host. The verb defaults torun.ph initalways writes thehosts/folder. The--uniform-runnersoption is no longer needed.ph <host>is short forph run <host>when no built-in command has that name.- The
FEATURE_UNIFORM_RUNNERS_ENABLEDvariable has no effect any more.
Tools for host files​
ph host check switchboard
ph host export switchboard --out switchboard.json
ph generate hosts
ph run switchboard --explain drives
ph host check <host>loads and validates a host the wayph runwould, without starting it. It exits with code 1 on any issue.ph host export <host>prints a host as declared, as JSON.--outwrites it to a file.ph generate hostswritesoutputs.jsfor every host whose runner declares outputs, and refresheshosts/types.d.ts. Run it again after you change a host that other hosts read from.ph run <host> --explain drivesprints the drive plan of a host instead of starting it.--explain outputsprints what each host produces and the start order.
ph migrate adds host files and has a dry run​
ph migrate 6.3.0 --dry-run
ph migrate 6.3.0
ph migrateadds thehosts/folder to a project that has none. The switchboard host lists the plugins the classic Switchboard ran.--dry-runprints a diff of every file the migration would add, change or delete, and writes nothing.ph migrateworks from any folder inside the project.ph migratekeeps thepackage.jsonscripts you changed yourself and updates the ones an earlierph initwrote.ph migratemovesstudio.host,studio.openBrowserandreactor.httpsfrompowerhouse.config.jsoninto the host files it adds, and prints what it did with each key.ph migrateno longer overwrites the root files of the project, such as the Dockerfile and the CI workflows. It adds the ones the project lacks and prints a line for a kept file the current template has moved on from.
A store records its migration release​
A store now records the last release that completed its one-time migrations. A later release that drops a migration uses this record to refuse a store that still needs it, and names the release to run first. 6.3.0 refuses no store.
GraphQL clients send the new argument names​
The clients in this release send idOrSlug, documentIdOrSlug,
parentIdOrSlug, sourceIdOrSlug and targetIdOrSlug. They need a
Switchboard on 6.2.3-dev.35 or later. Upgrade the Switchboard before its
clients.
What warns​
These keep working in 6.3. Each prints a warning once per command. The migration page lists every warning and what to do about it.
| What | Use instead |
|---|---|
ph vetra, ph connect, ph switchboard in a project without host files | ph migrate, then ph run <host> |
ph connect, ph switchboard in a project with host files | ph run connect dev, ph run switchboard |
ph reactor | ph run switchboard |
ph switchboard --migrate, --migrate-status, --reset, --dev | ph run switchboard migrate, migrate-status, reset, dev |
FEATURE_PLUGIN_HOST_ENABLED=false | Remove the variable |
FEATURE_UNIFORM_RUNNERS_ENABLED=false | Remove the variable |
studio.host, studio.https, studio.openBrowser, reactor.https, reactor.storage, switchboard.database.url in powerhouse.config.json | The host files |
connect.drives.allowAddDrive, connect.drives.sections, connect.drives.icons, connect.home.background at the top level | The generic Connect plugin's config in hosts/connect/host.js |
reactor.workflows in a host file | The workflows plugin under runner.plugins |
A host file where readModel.url also holds the reactor store | An explicit storage on the backend |
Deprecated in code, without a link to the migration page:
- The write methods of the
IReactorClientfacade log one warning per process. Use the write half of the client instead. SetPH_SILENCE_DEPRECATIONSto silence these warnings. reactorClientin subgraphs is marked@deprecated. Usectx.clients.readandctx.clients.write.- The GraphQL argument names
identifier,documentId,documentIdentifier,parentIdentifier,sourceIdentifierandtargetIdentifierare marked@deprecatedin the schema. Use the names listed above.
What goes in 6.4​
6.4 is a breaking release. It removes what 6.3 warns about:
- A project without host files does not start. The error names
ph migrate. - The classic boot path of
ph vetra,ph connectandph switchboard. The three names stay as short forms ofph run <host>. ph reactor.- The
powerhouse.config.jsonkeys in the table above become errors. FEATURE_UNIFORM_RUNNERS_ENABLED=falsestops the start.FEATURE_PLUGIN_HOST_ENABLED: the plugin host is the only path.reactor.workflowsand thereadModel.urlfallback in host files.
These stay in 6.4: MCP_ENABLED, PH_WORKFLOWS_ENABLED,
DOCUMENT_MODEL_SUBGRAPHS_ENABLED, DATABASE_URL, PORT and
PH_SWITCHBOARD_PORT.
What goes in 6.5​
Not before 6.5:
- The
IReactorClientfacade with its deprecated write methods, andreactorClientin subgraphs. - The old GraphQL argument names.
How to upgrade​
-
Upgrade the Switchboard before the clients that talk to it.
-
Preview and run the migration in each project:
ph migrate 6.3.0 --dry-runph migrate 6.3.0 -
Review
hosts/switchboard/host.js. Read the linesph migrateprinted under "Settings of powerhouse.config.json the host files take", and move the keys it kept into the host files by hand. -
Replace the classic commands in your scripts, Dockerfile and CI with
ph run <host>. -
Start every host and check that no line starts with
Warning:.
Go to 6.4 only after 6.3 runs without warnings. The migration page has the full steps.
A project that still has document models on the 5.x layout runs the 6.2.2 migration first:
npx @powerhousedao/ph-cli@6.2.2 migrate 6.2.2
Version numbers​
From this release a version reads GENERATION.BREAKING.RELEASE. The second
position may break; the third never does. Pin exact versions or use a tilde
range such as ~6.3.0. A caret range such as ^6.3.0 accepts 6.4.0 and with
it the break.