-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(world): add config resolution at runtime #2421
Conversation
alvrs
commented
Mar 13, 2024
•
edited
Loading
edited
- adds the runtime implementation corresponding to feat(world): add types for v2 config resolvers #2389
|
@@ -2,4 +2,4 @@ export * from "./defaults"; | |||
export * from "./storeConfig"; | |||
|
|||
export * from "./experimental/resolveConfig"; | |||
export * from "./v2/store"; | |||
export * from "./v2"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thoughts on a separate config entry point for now?
https://github.com/latticexyz/mud/pull/2415/files#diff-9b298d2cadfb9600e8878ee44b4064e32664a2c00322309b5cf434e75ab87f31
thinking that'll make it easier to grep for things when we inevitably move stuff around
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doin it here #2422
Object.entries(namespaces) | ||
.map(([namespaceKey, namespace]) => { | ||
const tables = get(namespace, "tables") ?? {}; | ||
return Object.entries(tables).map(([tableKey, table]) => [`${namespaceKey}__${tableKey}`, table]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if we wanna use this here but we have resourceLabel
in @latticexyz/common
); | ||
|
||
return { | ||
tables: resolveStoreTablesConfig({ ...(get(input, "tables") ?? {}), ...namespacedTables }, scope), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to do any validation that there are no overlaps?