-
Notifications
You must be signed in to change notification settings - Fork 189
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
🛠 global resolver #2023
🛠 global resolver #2023
Conversation
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.
So three topics:
- Rename the _services in config
- Rename CoreServices in global-resolver
- Reduce number of services in global-resolver
Also I am thinking that maybe we could have an other global-resolver for the platform services so in /core/platform/services/global-resolver.ts
instead of having PlatformServices in the current global-resolver.
"webserver", | ||
"websocket" | ||
], | ||
"_services": [ |
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.
What is this ? Should it be removed ? Or renamed ?
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.
Yes, it should be removed
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.
unfortunately we need all services here for now, after I change the way web services are detected it will be necessary to specify only the platform services here
notificationBadge: UserNotificationBadgeServiceAPI; | ||
notificationPreferences: UserNotificationPreferencesAPI; | ||
messages: MessageThreadMessagesServiceAPI; | ||
threads: MessageThreadsServiceAPI; |
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.
Why not just import MessageServiceAPI ? It contains:
userBookmarks: MessageUserBookmarksServiceAPI;
threads: MessageThreadsServiceAPI;
messages: MessageThreadMessagesServiceAPI;
views: MessageViewsServiceAPI;
engine: MessagesEngine;
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.
There is no more MessageServiceAPI 😬
One of goals was to remove this grouping services, because of the over-use of the same services in different groups.
I told you today that I'm going to group some of them on level of global resolver for convinience
threads: MessageThreadsServiceAPI; | ||
userBookmarks: MessageUserBookmarksServiceAPI; | ||
applications: MarketplaceApplicationServiceAPI; | ||
companyApplications: CompanyApplicationServiceAPI; |
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.
Same here, ApplicationServiceAPI contains already this MarketplaceApplicationServiceAPI and CompanyApplicationServiceAPI
members: MemberService; | ||
channelPendingEmail: ChannelPendingEmailService; | ||
tab: TabService; | ||
}; |
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.
In general, I think we would get better code if we have one item here for each folder we have in /services/ or /core/services/
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 I understand you right, but we have here one item for each folder we have in services…. no?
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.
We don't have a /services/channelPendingEmail nor a /services/threads folders, it is related to the "I told you today that I'm going to group some of them on level of global resolver for convinience"
I've pushed fixes, take a look |
@romanesko why is this not merged yet ? The more we work on other stuff the more difficult it will be to merge right ? :p |
|
# Conflicts: # twake/backend/node/src/services/applications/web/routes.ts # twake/backend/node/test/e2e/application/application-events.spec.ts
…al-resolver # Conflicts: # twake/backend/node/src/services/channels/services/channel/service.ts # twake/backend/node/src/services/messages/services/messages.ts
…al-resolver # Conflicts: # twake/backend/node/src/services/channels/services/channel/service.ts # twake/backend/node/src/services/messages/services/messages.ts
…al-resolver # Conflicts: # twake/backend/node/src/services/channels/services/channel/service.ts # twake/backend/node/src/services/messages/services/messages.ts
…al-resolver # Conflicts: # twake/backend/node/src/services/channels/services/channel/service.ts # twake/backend/node/src/services/messages/services/messages.ts
…al-resolver # Conflicts: # twake/backend/node/package-lock.json # twake/backend/node/src/services/applications/api.ts # twake/backend/node/src/services/applications/services/applications.ts # twake/backend/node/src/services/applications/services/index.ts # twake/backend/node/src/services/applications/web/controllers/applications.ts # twake/backend/node/src/services/applications/web/controllers/company-applications.ts # twake/backend/node/src/services/applicationsapi/index.ts # twake/backend/node/src/services/applicationsapi/web/controllers/index.ts # twake/backend/node/src/services/messages/services/engine/index.ts # twake/backend/node/src/services/messages/web/controllers/threads.ts
…al-resolver # Conflicts: # twake/backend/node/package-lock.json # twake/backend/node/src/services/applications/api.ts # twake/backend/node/src/services/applications/services/applications.ts # twake/backend/node/src/services/applications/services/index.ts # twake/backend/node/src/services/applications/web/controllers/applications.ts # twake/backend/node/src/services/applications/web/controllers/company-applications.ts # twake/backend/node/src/services/applicationsapi/index.ts # twake/backend/node/src/services/applicationsapi/web/controllers/index.ts # twake/backend/node/src/services/messages/services/engine/index.ts # twake/backend/node/src/services/messages/web/controllers/threads.ts
…al-resolver # Conflicts: # twake/backend/node/package-lock.json # twake/backend/node/src/services/applications/api.ts # twake/backend/node/src/services/applications/services/applications.ts # twake/backend/node/src/services/applications/services/index.ts # twake/backend/node/src/services/applications/web/controllers/applications.ts # twake/backend/node/src/services/applications/web/controllers/company-applications.ts # twake/backend/node/src/services/applicationsapi/index.ts # twake/backend/node/src/services/applicationsapi/web/controllers/index.ts # twake/backend/node/src/services/messages/services/engine/index.ts # twake/backend/node/src/services/messages/web/controllers/threads.ts
…al-resolver # Conflicts: # twake/backend/node/package-lock.json # twake/backend/node/src/services/applications/api.ts # twake/backend/node/src/services/applications/services/applications.ts # twake/backend/node/src/services/applications/services/index.ts # twake/backend/node/src/services/applications/web/controllers/applications.ts # twake/backend/node/src/services/applications/web/controllers/company-applications.ts # twake/backend/node/src/services/applicationsapi/index.ts # twake/backend/node/src/services/applicationsapi/web/controllers/index.ts # twake/backend/node/src/services/messages/services/engine/index.ts # twake/backend/node/src/services/messages/web/controllers/threads.ts
…al-resolver # Conflicts: # twake/backend/node/package-lock.json # twake/backend/node/src/services/applications/api.ts # twake/backend/node/src/services/applications/services/applications.ts # twake/backend/node/src/services/applications/services/index.ts # twake/backend/node/src/services/applications/web/controllers/applications.ts # twake/backend/node/src/services/applications/web/controllers/company-applications.ts # twake/backend/node/src/services/applicationsapi/index.ts # twake/backend/node/src/services/applicationsapi/web/controllers/index.ts # twake/backend/node/src/services/messages/services/engine/index.ts # twake/backend/node/src/services/messages/web/controllers/threads.ts
…lver # Conflicts: # twake/backend/node/src/services/applications/web/controllers/applications.ts # twake/backend/node/src/services/channels/services/channel/service.ts
it's a draft of global reserver