-
Notifications
You must be signed in to change notification settings - Fork 134
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
A few more store -> core dependency fixes #4383
Conversation
nwmac
commented
Jun 18, 2020
•
edited
Loading
edited
- Move BaseEndpointAuth
- Move StratosTheme
- Move ThemeService
- Move types from utils.service that are only used once in store
- Move PermissionValues
- Move http and jetstream helpers
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.
A few minor grouping questions
@@ -6,7 +8,6 @@ export interface IPermissionConfigs { | |||
export type PermissionTypes = string; | |||
export type CurrentUserPermissions = string; | |||
export type ScopeStrings = string; | |||
export type PermissionValues = string; |
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.
Just a comment, we may find these other types will be referenced by plugins such as cloud-foundry
. It might make sense at that point to group them all together in an types file that exposes all
return pages.find(page => { | ||
return isJetstreamError(page); | ||
}) as JetStreamErrorResponse; | ||
} | ||
|
||
export function jetStreamErrorResponseToSafeString(response: JetStreamErrorResponse): string { |
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.
I think we should move this too, purely so all the jetsream error handlers are in the same place (function is only used in one file in cf package)
props.indexOf('url') >= 0 | ||
) ? obj as HttpErrorResponse : null; | ||
} | ||
|
||
/** | ||
* Attempt to create a sensible string explaining the error object returned from a failed http request | ||
* @param err The raw error from a http request |
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.
Thinking about it, not sure if we want to move this as well, which would be the whole contents of the file. This function is only used in core though, but it's a similar error handler
Codecov Report
@@ Coverage Diff @@
## master #4383 +/- ##
=========================================
Coverage ? 58.97%
=========================================
Files ? 891
Lines ? 29154
Branches ? 4224
=========================================
Hits ? 17194
Misses ? 11960
Partials ? 0 |
@@ -2,27 +2,3 @@ import { HttpErrorResponse } from '@angular/common/http'; | |||
|
|||
import { isHttpErrorResponse, JetStreamErrorResponse } from '../../store/src/jetstream'; |
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.
This file can be nuked in a future PR