Problem
The offline migration paths — runBaseline and runOfflineGenerate in packages/cli/src/commands/migrate.ts — call loadMemory(metaRoot) without the consumer providers from metaobjects.config.ts. The postgres/d1 migrate paths and meta gen already thread config.providers.
So a project that registers a custom subtype via a config provider (e.g. a TS-only view.* provider) hits Unknown type <subtype> on offline meta migrate / meta migrate baseline, even though meta gen loads the same metadata fine. This forces a workaround (temporarily stripping the custom nodes from the metadata before generating a migration).
Fix
Load the config up front in both offline functions and pass providers to loadMemory, mirroring the DB paths. Fold the existing later naming-strategy config read into the same up-front load.
Verified locally: CLI tests pass (356/0); with the fix, offline meta migrate loads a config-registered view.* subtype natively — no strip workaround. A patch is ready; happy to open a PR.
Related
Part of the broader consumer-provider CLI-parity question (separate issue) — this one is the TS-internal consistency bug (TS migrate should match TS gen).
Problem
The offline migration paths —
runBaselineandrunOfflineGenerateinpackages/cli/src/commands/migrate.ts— callloadMemory(metaRoot)without the consumerprovidersfrommetaobjects.config.ts. The postgres/d1 migrate paths andmeta genalready threadconfig.providers.So a project that registers a custom subtype via a config provider (e.g. a TS-only
view.*provider) hitsUnknown type <subtype>on offlinemeta migrate/meta migrate baseline, even thoughmeta genloads the same metadata fine. This forces a workaround (temporarily stripping the custom nodes from the metadata before generating a migration).Fix
Load the config up front in both offline functions and pass
providerstoloadMemory, mirroring the DB paths. Fold the existing later naming-strategy config read into the same up-front load.Verified locally: CLI tests pass (356/0); with the fix, offline
meta migrateloads a config-registeredview.*subtype natively — no strip workaround. A patch is ready; happy to open a PR.Related
Part of the broader consumer-provider CLI-parity question (separate issue) — this one is the TS-internal consistency bug (TS migrate should match TS gen).