Assign ownership to many of the remaining libs/common files.
Criteria for ownership:
* Files used by a single team, is now owned by that team.
* Files related to a domain owned by a team is now owned by that team.
* Where ownership is unclear the "lowest level" service takes ownership.
* Change everything to Uint8Array
related to https://github.com/jestjs/jest/issues/14379
* Work on failing type tests
* Revert changes to custom matcher setup
* Remove last BufferArrays from tests
* Fix custom matcher type errors in vscode
* Remove errant `.buffer` calls on Uint8Arrays
* Encryption Pair should serialize Array Buffer and Uint8Array
* Fix EncArrayBuffer encryption
---------
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
* Rename service-factory folder
* Move cryptographic service factories
* Move crypto models
* Move crypto services
* Move domain base class
* Platform code owners
* Move desktop log services
* Move log files
* Establish component library ownership
* Move background listeners
* Move background background
* Move localization to Platform
* Move browser alarms to Platform
* Move browser state to Platform
* Move CLI state to Platform
* Move Desktop native concerns to Platform
* Move flag and misc to Platform
* Lint fixes
* Move electron state to platform
* Move web state to Platform
* Move lib state to Platform
* Fix broken tests
* Rename interface to idiomatic TS
* `npm run prettier` 🤖
* Resolve review feedback
* Set platform as owners of web core and shared
* Expand moved services
* Fix test types
---------
Co-authored-by: Hinton <hinton@users.noreply.github.com>
* Extract files only used in cli out of libs/node
Move commands from libs/node to cli
Move program from libs/node to cli
Move services from libs/node to cli
Move specs from libs/node to cli
Naming changes based on ADR 12
Rename commands
Rename models/request
Rename models/response
Remove entries from whitelist-capital-letters.txt
* Merge lowDbStorageService into base class
Move logic from extended lowdbStorage.service.ts into base-lowdb-storage.service.ts
Delete lowdb-storage.service.ts
Rename base-lowdb-storage.service.ts to lowdb-storage.service.ts
* Merge login.command with base class
program.ts - changed import temporarily to make it easier to review
Remove passing in clientId, set "cli" when constructing ssoRedirectUri call
Remove setting callbacks, use private methods instead
Remove i18nService from constructor params
Add syncService, keyConnectorService and logoutCallback to constructor
Merge successCallback with handleSuccessResponse
Remove validatedParams callback and added private method
Move options(program.OptionValues) and set in run()
Delete login.command.ts
* Rename base-login.command.ts to login.command.ts
* Merge base.program.ts with program.ts
* Add fix for bw login with apikey argument fails bug
* Changes after running the prettier
* Revert chnages on the launch.json file
* Changes after running a lint
* Renaming a filename to remove capital letters
* Resolving the error on test run
* Renaming file names due lint errors
* Renaming new files to conform to snake case
* Remove the test for user api login strategy
* Adding the user api login test and file renaming
* Rename file name to organization-api-login.spec.ts
* Fixing the lint error on PR
* Adding the apiLogIn.strategy to whitelist-capital-letters
* Removing all the apiLogIn.strategy in whitelist-capital-letters.
* Fixing PR comment relating OrganizationApiTokenRequest
* Resolve PR comment on OrganizationApiTokenRequest model
* Fixing PR comment of separating organization token model
* fixing the lint error message
* Fixing the lint error
* Reverting the changes on lunch.js
* revert the actual content on launch.json
* Reverting changes relating to organization api login
* Removing the OrganizationIdentityTokenResponse file
* Removing OrganizationIdentityTokenResponse file
Co-authored-by: dynwee <onwudiweokeke@gmail.com>
* Added abstractions for PolicyApiService and PolicyService
* Added implementations for PolicyApiService and PolicyService
* Updated all references to new PolicyApiService and PolicyService
* Deleted old PolicyService abstraction and implementation
* Fixed CLI import path for policy.service
* Fixed main.background.ts policyApiService dependency for policyService
* Ran prettier
* Updated policy-api.service with the correct imports
* [EC-377] Removed methods from StateService that read policies
* [EC-377] Updated policy service getAll method to use observable collection
* [EC-377] Added first unit tests for policy service
* [EC-377] Added more unit tests for Policy Service
* [EC-376] Sorted methods order in PolicyApiService
* [EC-376] Removed unused clearCache method from PolicyService
* [EC-376] Added upsert method to PolicyService
* [EC-376] PolicyApiService putPolicy method now upserts data to PolicyService
* [EC-377] Removed tests for deleted clearCache method
* [EC-377] Added unit test for PolicyService.upsert
* [EC-377] Updated references to state service observables
* [EC-377] Removed getAll method from PolicyService and refactored components to use observable collection
* [EC-377] Updated components to use concatMap instead of async subscribe
* [EC-377] Removed getPolicyForOrganization from policyApiService
* [EC-377] Updated policyAppliesToUser to return observable collection
* [EC-377] Changed policyService.policyAppliesToUser to return observable
* [EC-377] Fixed browser settings.component.ts getting vault timeout
* Updated people.component.ts to get ResetPassword policy through a subscription
* [EC-377] Changed passwordGenerationService.getOptions to return observable
* [EC-377] Fixed CLI generate.command.ts getting enforcePasswordGeneratorPoliciesOnOptions
* [EC-377] Fixed eslint errors on rxjs
* [EC-377] Reverted changes on passwordGeneration.service and vaultTimeout.service
* [EC-377] Removed eslint disable on web/vault/add-edit-component
* [EC-377] Changed AccountData.policies to TemporaryDataEncryption
* [EC-377] Updated import.component to be reactive to policyAppliesToUser$
* [EC-377] Updated importBlockedByPolicy$
* [EC-377] Fixed missing rename
* [EC-377] Updated policyService.masterPasswordPolicyOptions to return observable
* [EC-377] Fixed vaultTimeout imports from merge
* [EC-377] Reverted call to passwordGenerationService.getOptions
* [EC-377] Reverted call to enforcePasswordGeneratorPoliciesOnOptions
* [EC-377] Removed unneeded ngOnDestroy
* Apply suggestions from code review
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
* [EC-377] Fixed login.component.ts and register.component.ts
* [EC-377] Updated PolicyService to update vaultTimeout
* [EC-377] Updated PolicyService dependencies
* [EC-377] Renamed policyAppliesToUser to policyAppliesToActiveUser
* [EC-377] VaultTimeoutSettings service now gets the vault timeout directly instead of using observables
* [EC-377] Fixed unit tests by removing unneeded vaultTimeoutSettingsService
* [EC-377] Set getDecryptedPolicies and setDecryptedPolicies as deprecated
* [EC-377] Set PolicyService.getAll as deprecated and updated to use prototype.hasOwnProperty
* [EC-565] Reverted unintended change to vaultTimeoutSettings that was causing a bug to not display the correct vault timeout
* [EC-377] Removed unneeded destroy$ from preferences.component.ts
* [EC-377] Fixed policy.service.ts import of OrganizationService
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
Co-authored-by: mimartin12 <77340197+mimartin12@users.noreply.github.com>
* Added abstractions for PolicyApiService and PolicyService
* Added implementations for PolicyApiService and PolicyService
* Updated all references to new PolicyApiService and PolicyService
* Deleted old PolicyService abstraction and implementation
* Fixed CLI import path for policy.service
* Fixed main.background.ts policyApiService dependency for policyService
* Updated policy-api.service with the correct imports
* [EC-376] Sorted methods order in PolicyApiService
* [EC-376] Removed unused clearCache method from PolicyService
* [EC-376] Added upsert method to PolicyService
* [EC-376] PolicyApiService putPolicy method now upserts data to PolicyService
* [refactor] Introduce a file download service
* [refactor] Point platformUtilsService.saveFile() callers to fileDownloadService.download() instead
* [refactor] Remove platformUtilsService.saveFile()
* [fix] Force send attachments to always download and never open
* [fix] Remove the window property from FileDownloadRequest
* [fix] Move FileDownloadRequest to /abstractions/fileDownload
* [fix] Simplify FileDownloadRequest to a type
* [fix] Move BrowserApi.saveFile logic into BrowserFileDownloadService
* [fix] Use proper blob types for file downloads
* [fix] forceDownload -> downloadMethod on FileDownloadRequest
* [fix] Remove fileType from FileDownloadRequest
* [fix] Make fileType private
* Use abstract methods and generics in StorageService
* Prepend `Abstract` to abstract classes
* Create session browser storage service
* Use memory storage service for state memory
* Inject memory storage service
* Maintain filename extensions to help ide formatting
* Preserve state if it's still in memory
* Use jslib's memory storage service
* linter
* Create prototypes on stored objects
* standardize package scripts
* Add type safety to `withPrototype` decorators
* webpack notify manifest version
* Fix desktop
* linter
* Fix script
* Improve prototye application
* do not change prototype if it already matches desired
* fix error with object values prototype application
* Handle null state
* Apply prototypes to browser-specific state
* Add angular language server to recommended extensions
* Improve browser state service tests
* Start testing state Service
* Fix abstract returns
* Move test setup files to not be picked up by default glob matchers
* Add key generation service
* Add low-dependency encrypt service
* Back crypto service with encrypt service.
We'll want to work items that don't require state over to encrypt service
* Add new storage service and tests
* Properly init more stored values
* Fix reload issues when state service is recovering state from session storage
Co-authored-by: Thomas Avery <Thomas-Avery@users.noreply.github.com>
Co-authored-by: Justin Baur <admin@justinbaur.com>
* Simplify encrypt service
* Do not log mac failures for local-backed session storage
* `content` changed to `main` in #2245
* Fix CLI
* Remove loggin
* PR feedback
* Merge remote-tracking branch 'origin/master' into add-memory-storage-to-state-service
* Fix desktop
* Fix decrypt method signature
* Minify if not development
* Key is required
Co-authored-by: Thomas Avery <Thomas-Avery@users.noreply.github.com>
Co-authored-by: Justin Baur <admin@justinbaur.com>