-
-
Notifications
You must be signed in to change notification settings - Fork 139
@accounts/types : add a types package which contains common types #173
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #173 +/- ##
==========================================
+ Coverage 92.16% 92.24% +0.08%
==========================================
Files 42 43 +1
Lines 1034 1045 +11
Branches 124 124
==========================================
+ Hits 953 964 +11
Misses 70 70
Partials 11 11
Continue to review full report at Codecov.
|
Why do we need a new types package, can this go to common instead? |
In fact the common package actually is a dependency in some packages and a devDependency in others That's why I am creating
It keeps the relation between packages simple |
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.
These are only common types right?
Maybe add a readme that explains that
packages/types/package.json
Outdated
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/js-accounts/accounts/tree/master/packages/server" |
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 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.
Oh yes I am changing that
There is also DatabaseInterface because it makes more sense to have it here |
@Aetherall A user with TS in his project needs to add this package to devDependencies as well? |
@davidyaha only if he is using those types I suppose... |
packages/types/readme.md
Outdated
|
||
It contains the types used across the Accouts Suite. | ||
|
||
#### Usage : This package is used internally by the suite. It's not needed to install it |
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.
OK, so maybe remove that.
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.
Done
export { ImpersonationResult as ImpersonateReturnType } from './types/impersonation-result' | ||
|
||
|
||
// ? Operation Parameters |
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.
maybe we will need to figure this before merging 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.
Yes actually I want to discuss it ASAP
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 this will be used on the password server and password client right?
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.
the @accounts/types package will be used on pretty much every @accounts package, as a devDependency
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 mean the type
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 is used already
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 the idea of Operation Parameters?
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.
For several operations, the function expect one object as parameters which contains all the informations the operation needs to execute
Actually this is not consistent because some operation are using this pattern and others are not
I would prefer to not use this way in order to simplify the workflow, but for this package to be compatible with the actual state suite, those types are needed
packages/types/src/types/user.ts
Outdated
|
||
export interface User { | ||
username?: string; | ||
email?: 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.
is this line accurate?
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 fact I just copied the types and renamed it
But if you look at the index.ts it's all renamed as original for compatibility
It's a part of the type renaming we will discuss in a meeting ( the sooner the better )
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.
Yeah I now but was wondering if this is used or not ^^
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 it should not be used 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.
you mean the email:string field?
or the whole User Interface ?
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.
email string field
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 agree, this was on the UserObjectType interface
I do not use it in the next branch neither
I was assuming the client used it
I am removing this right now
No description provided.