moose client only mode for OlapTable, View, and MaterializedView #3057
+329
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this is an approach to allowing nextjs HMR to work when using moose-lib without the moose runtime.
it uses a flag to make the registry for these objects permissive to duplicate entries. throw'ing is the default and current behavior, and this change allows for silently allowing duplicates when
MOOSE_CLIENT_ONLYis set in the env.Note
Introduces MOOSE_CLIENT_ONLY mode that permits duplicate OlapTable and SqlResource registrations (overwrite) and adds tests validating behavior.
isClientOnlyMode()insrc/dmv2/internal.tsto toggle permissive registration.OlapTable(src/dmv2/sdk/olapTable.ts) andSqlResource(src/dmv2/sdk/sqlResource.ts) now skip duplicate-name errors whenisClientOnlyMode()is true; duplicates overwrite existing entries.tests/client-only-mode.test.tscoveringisClientOnlyMode, duplicate handling forOlapTableandSqlResource, and registry introspection helpers.Written by Cursor Bugbot for commit 1e5af57. This will update automatically on new commits. Configure here.