Skip to content
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

GetServices and GetControllers #239

Merged
merged 3 commits into from
Feb 4, 2024
Merged

Conversation

Sleitnick
Copy link
Owner

  • Adds GetServices() and GetControllers() methods.
  • Freeze services and controllers tables.

Note: This does not include the client-side services table. In other words, GetServices() is a server-only method & not available on the client. Items in this table are lazy-initialized as accessed, and require lookup into the data model. Thus, there is no adequate way to get all of them with the current setup.

Copy link
Contributor

@SigmaThetaTech SigmaThetaTech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes provide the flexibility I need to query all modules in my framework for certain properties while also protecting the framework's controllers and services tables from mutations at runtime with table.freeze().

Asserting that Knit has started when calling these methods is an adequate solution, perhaps even favorable over returning a promise since Knit.OnStart() is already a provided promise.

Overall seems like a good solution that gives more flexibility. Thank you!

@Sleitnick Sleitnick merged commit fa8e37d into main Feb 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants