* Switch to jest
* Fix jslib-angular package name
* Make angular test project
* Split up tests by jslib project
* Remove obsolete node test script
* Use legacy deps with jest-preset-angular
* Move web tests to common
* Remove build from pipeline
This was only being used because we were not using ts runners.
We are now, so build is unnecessary
* add ellipsis pipe
* run prettier
* Account for ellipsis length in returned string
* Fix complete words case
* Fix another complete words issue
* fix for if there are not spaces in long value
* extract length check to beginning of method
* condense if statements
* remove log
* Remove error Response type check
Minimization is impacting type checking in a non-consistent way.
The previous type check works locally,
but not from build artifacts 🤷. We only set `captchaRequired` on
our errors when we want a resubmit with captcha included, so we're safe
keying off that
* linter
Collapsed groupings have regressed to not maintaining their state through restarting clients.
The state mangement refactor erroniously began saving this field to memory instead of disk, but there were some other issues that changing this brought on that are also fixed in this commit.
Changes:
1. Save collapsedGroupings persistantly in StateService
2. Adjust the type of collapsedGroupings on the Account model from a Set<string> to a string[]
* This is the way we were storing this value in previous releases, and saving the entire set object breaks.
3. Adjust the StateService getter/setter for collapsedGroupings to expect a string[]
4. Extract a string[] from the GroupingsComponent groupings that is a Set<string> before saving
* [bug] Fix logout timeout action for inactive accounts
* Pass userId in to the logout callback parameter to the vaultTimeoutService. The message handle in desktop already expects this.
* Set lastActive on account login, and null it on account deauthentication. This prevents an issue where newly logged in accounts immediatly time out due to inactivity.
* Add userId to locked callbacks
* Add userId to log out callback
* Use different strategy classes for different types of login
* General refactor and cleanup of auth logic
* Create subclasses for different types of login credentials
* Create subclasses for different types of tokenRequests
* Create TwoFactorService, move code out of authService
* refactor base CLI commands to use new interface
Some clients have unique global setting defaults (and unique global settings)
For example: the web vault defaults to light theme, but most clients with theme support default to system theme.
The current way we handle GlobalState is buried in jslib and not easily extendible in clients.
To fix this, we need to treat GlobalState as a generic in the StateService and StateMigration service and allow for its extension in those methods and anywhere GlobalState is inited.
* Initial commit for icon update
* Updated lg to reflect current usage
* Created BitwardenIconsService
* Prettier updates
* More prettier updates
* Updated font
* Prettier
* Added new icons to service map
* Removed variables and converted css to use scss maps and exported list
* Updated font sheet (130)
* Removed base class and replaced bolt icon
* Added 3x icon size
* Added sm text size helper
* Added rotate 270 helper
* Prettier
* Updated font sheet
* Requested Changes
* Removed BitwardenIcons Util - obsolete
* [bug] Improve state management performance
Large vaults see a clear degrade in performance using the state service, especially when multiple vaults are authed and unlocked at the same time.
Some changes made to address this:
1. Clearing in memory decrypted data for non active accounts. This really should have been something we were doing anyway, but letting go of that memory burden has a noticable performance boost.
2. Not loading a bunch of unecsassary data from disk accounts into memory on application startup. This was being done to initilize in memory accounts, but brought a lot of extra baggage with it like storing encrypted data in memory, even though it is never referenced that way.
3. Breaking the on disk state object up into seperate keys for accounts instead of storing everything together under a "state" key. This ensures there is less information fetched from disk each time we call for an account.
There were some restructuring changes needed to facilitate these items:
1. We need to be able to construct an account in the StateService, but typescript doesn't allow for new() constraints on generics so a factory needs to be created and passed into the StateService for this to work.
2. Since we can't reference an all-knowing "accounts" object for on disk state anymore we have to maintain a list of authenticated accounts, and this has been added.
3. The StateMigration service needed to be updated to break up the accounts object, so current dev and QA state will be broken and need to be reset.
Some other general refactorings that were helpful gettings this working:
1. Added a constant for keys to the StateService and StateMigrationService.
2. Bundling everything needed to deauthenticate a user into a dedicated method.
3. Bundling all the disk storage clear methods (that should be refactored later into client specific state services) into one helper method.
4. Bundling everything needed to dynamically select a new active user into a dedicated method.
* [bug] Set environmentUrls appropriatly on account add
* [bug] Stop tracking activity without an active user
* [bug] Remove lastActive from globalState and globalState migration
* [style] Ran prettier