From 78248db59044d9796ee979be3300585c2e375da3 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Tue, 6 Jun 2023 15:34:53 -0500 Subject: [PATCH 01/22] Platform/pm 19/platform team file moves (#5460) * 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` :robot: * Resolve review feedback * Set platform as owners of web core and shared * Expand moved services * Fix test types --------- Co-authored-by: Hinton --- .github/CODEOWNERS | 19 ++++ .github/whitelist-capital-letters.txt | 39 --------- .vscode/settings.json | 2 +- .../collection-service.factory.ts | 8 +- .../organization-service.factory.ts | 4 +- .../policy-service.factory.ts | 4 +- .../services/browser-organization.service.ts | 2 +- .../services/browser-policy.service.ts | 4 +- .../service-factories/auth-service.factory.ts | 34 ++++---- .../key-connector-service.factory.ts | 14 +-- .../token-service.factory.ts | 4 +- .../service-factories/totp-service.factory.ts | 6 +- .../two-factor-service.factory.ts | 6 +- .../src/auth/popup/environment.component.ts | 6 +- apps/browser/src/auth/popup/hint.component.ts | 6 +- apps/browser/src/auth/popup/home.component.ts | 8 +- apps/browser/src/auth/popup/lock.component.ts | 14 +-- .../auth/popup/login-with-device.component.ts | 18 ++-- .../browser/src/auth/popup/login.component.ts | 20 ++--- .../src/auth/popup/register.component.ts | 14 +-- .../src/auth/popup/set-password.component.ts | 10 +-- apps/browser/src/auth/popup/sso.component.ts | 14 +-- .../popup/two-factor-options.component.ts | 4 +- .../src/auth/popup/two-factor.component.ts | 18 ++-- .../background/context-menus.background.ts | 2 +- .../background/notification.background.ts | 6 +- .../autofill-service.factory.ts | 16 ++-- .../browser/cipher-context-menu-handler.ts | 10 +-- .../browser/context-menu-clicked-handler.ts | 14 +-- .../browser/main-context-menu-handler.spec.ts | 6 +- .../browser/main-context-menu-handler.ts | 22 ++--- .../clipboard/clear-clipboard.spec.ts | 2 +- .../src/autofill/clipboard/clear-clipboard.ts | 2 +- .../clipboard/copy-to-clipboard-command.ts | 2 +- ...rate-password-to-clipboard-command.spec.ts | 8 +- .../generate-password-to-clipboard-command.ts | 4 +- .../src/autofill/services/autofill.service.ts | 6 +- .../src/background/commands.background.ts | 4 +- .../browser/src/background/idle.background.ts | 2 +- .../browser/src/background/main.background.ts | 86 +++++++++---------- .../background/models/addLoginQueueMessage.ts | 2 +- .../background/nativeMessaging.background.ts | 24 +++--- .../src/background/runtime.background.ts | 18 ++-- .../cipher-file-upload-service.factory.ts | 15 +++- .../cipher-file-upload.service.factory.ts | 15 +++- .../event-collection-service.factory.ts | 11 ++- .../event-upload-service.factory.ts | 21 ++++- .../password-generation-service.factory.ts | 17 +++- .../search-service.factory.ts | 16 +++- .../send-service.factory.ts | 24 ++++-- .../settings-service.factory.ts | 12 ++- .../vault-timeout-service.factory.ts | 32 ++++--- .../vault-timeout-settings-service.factory.ts | 16 ++-- .../src/background/webRequest.background.ts | 4 +- apps/browser/src/browser/safariApp.ts | 2 +- apps/browser/src/models/account.ts | 2 +- .../models/browserGroupingsComponentState.ts | 2 +- .../src/models/browserSendComponentState.ts | 2 +- .../src/{ => platform}/alarms/alarm-state.ts | 4 +- .../alarms/on-alarm-listener.ts | 2 +- .../{ => platform}/alarms/register-alarms.ts | 0 .../src/{ => platform}/background.html | 0 apps/browser/src/{ => platform}/background.ts | 5 +- .../service-factories}/api-service.factory.ts | 8 +- .../app-id-service.factory.ts | 4 +- .../crypto-function-service.factory.ts | 4 +- .../crypto-service.factory.ts | 16 ++-- .../encrypt-service.factory.ts | 10 ++- .../environment-service.factory.ts | 0 .../service-factories}/factory-options.ts | 0 .../file-upload-service.factory.ts | 11 ++- .../i18n-service.factory.ts | 4 +- .../key-generation-service.factory.ts | 4 +- .../service-factories}/log-service.factory.ts | 6 +- .../messaging-service.factory.ts | 11 ++- .../platform-utils-service.factory.ts | 4 +- .../state-migration-service.factory.ts | 8 +- .../state-service.factory.ts | 6 +- .../storage-service.factory.ts | 14 +-- .../browser/browser-api.ts} | 6 +- .../decorators/dev-flag.decorator.spec.ts | 0 .../decorators/dev-flag.decorator.ts | 0 .../browser-session.decorator.spec.ts | 4 +- .../browser-session.decorator.ts | 2 +- .../session-sync-observable/index.ts | 0 .../session-storable.ts | 0 .../session-sync.decorator.spec.ts | 0 .../session-sync.decorator.ts | 0 .../session-syncer.spec.ts | 4 +- .../session-sync-observable/session-syncer.ts | 6 +- .../sync-item-metadata.ts | 0 .../synced-item-metadata.spec.ts | 0 apps/browser/src/{ => platform}/flags.ts | 4 +- apps/browser/src/{ => platform}/globals.d.ts | 0 .../{ => platform}/listeners/combine.spec.ts | 0 .../src/{ => platform}/listeners/combine.ts | 2 +- .../src/{ => platform}/listeners/index.ts | 8 +- .../listeners/on-command-listener.ts} | 28 +++--- .../listeners/on-install-listener.ts} | 12 +-- .../{ => platform}/listeners/update-badge.ts | 28 +++--- .../src/{ => platform}/popup/locales.ts | 0 .../abstract-chrome-storage-api.service.ts} | 2 +- .../abstract-key-generation.service.ts} | 2 +- .../abstractions/browser-state.service.ts | 12 +-- .../services/browser-config.service.ts | 4 +- .../services/browser-crypto.service.ts} | 2 +- .../services/browser-environment.service.ts | 8 +- .../browser-file-download.service.ts} | 12 +-- .../services/browser-i18n.service.ts | 2 +- .../browser-local-storage.service.ts} | 2 +- .../browser-memory-storage.service.ts} | 2 +- ...saging-private-mode-background.service.ts} | 2 +- ...r-messaging-private-mode-popup.service.ts} | 2 +- .../services/browser-messaging.service.ts} | 4 +- .../browser-platform-utils.service.spec.ts} | 2 +- .../browser-platform-utils.service.ts} | 8 +- .../services/browser-state.service.spec.ts | 20 ++--- .../services/browser-state.service.ts | 14 +-- .../{ => platform}/services/i18n.service.ts | 2 +- .../services/key-generation.service.ts} | 6 +- ...al-backed-session-storage.service.spec.ts} | 16 ++-- .../local-backed-session-storage.service.ts} | 16 ++-- apps/browser/src/popup/app.component.ts | 12 +-- apps/browser/src/popup/app.module.ts | 2 +- .../src/popup/components/pop-out.component.ts | 2 +- apps/browser/src/popup/main.ts | 2 +- .../src/popup/services/init.service.ts | 8 +- .../popup/services/popup-search.service.ts | 4 +- .../src/popup/services/popup-utils.service.ts | 2 +- .../src/popup/services/services.module.ts | 70 +++++++-------- .../src/popup/settings/about.component.ts | 8 +- .../src/popup/settings/autofill.component.ts | 8 +- .../settings/excluded-domains.component.ts | 12 +-- .../settings/folder-add-edit.component.ts | 6 +- .../settings/help-and-feedback.component.ts | 2 +- .../src/popup/settings/options.component.ts | 6 +- .../src/popup/settings/premium.component.ts | 8 +- .../src/popup/settings/settings.component.ts | 14 +-- .../src/popup/settings/sync.component.ts | 4 +- .../src/services/browser-send.service.ts | 2 +- .../src/services/browser-settings.service.ts | 4 +- .../popup/generator/generator.component.ts | 8 +- .../password-generator-history.component.ts | 4 +- .../popup/send/efflux-dates.component.ts | 4 +- .../popup/send/send-add-edit.component.ts | 12 +-- .../popup/send/send-groupings.component.ts | 12 +-- .../tools/popup/send/send-type.component.ts | 12 +-- .../tools/popup/settings/export.component.ts | 10 +-- .../cipher-service.factory.ts | 40 ++++----- .../folder-service.factory.ts | 10 +-- .../sync-notifier-service.factory.ts | 2 +- .../components/action-buttons.component.ts | 6 +- .../vault/add-edit-custom-fields.component.ts | 2 +- .../components/vault/add-edit.component.ts | 12 +-- .../components/vault/attachments.component.ts | 12 +-- .../components/vault/collections.component.ts | 6 +- .../components/vault/current-tab.component.ts | 12 +-- .../vault/password-history.component.ts | 4 +- .../popup/components/vault/share.component.ts | 6 +- .../vault/vault-filter.component.ts | 10 +-- .../components/vault/vault-items.component.ts | 10 +-- .../vault/vault-select.component.ts | 6 +- .../popup/components/vault/view.component.ts | 18 ++-- .../vault/services/browser-folder.service.ts | 2 +- .../vault/services/vault-filter.service.ts | 2 +- apps/browser/tsconfig.json | 2 +- apps/browser/webpack.config.js | 8 +- .../admin-console/commands/confirm.command.ts | 4 +- apps/cli/src/auth/commands/login.command.ts | 16 ++-- apps/cli/src/auth/commands/logout.command.ts | 2 +- apps/cli/src/auth/commands/unlock.command.ts | 12 +-- apps/cli/src/bw.ts | 40 ++++----- apps/cli/src/commands/config.command.ts | 2 +- .../convert-to-key-connector.command.ts | 2 +- apps/cli/src/commands/download.command.ts | 6 +- apps/cli/src/commands/edit.command.ts | 4 +- apps/cli/src/commands/get.command.ts | 8 +- apps/cli/src/commands/list.command.ts | 2 +- apps/cli/src/commands/serve.command.ts | 2 +- apps/cli/src/commands/status.command.ts | 4 +- apps/cli/src/commands/update.command.ts | 2 +- apps/cli/src/{ => platform}/flags.ts | 2 +- .../services/cli-platform-utils.service.ts | 2 +- .../services/console-log.service.spec.ts | 0 .../services/console-log.service.ts | 2 +- .../{ => platform}/services/i18n.service.ts | 2 +- .../services/lowdb-storage.service.ts | 8 +- .../services/node-api.service.ts | 6 +- .../node-env-secure-storage.service.ts | 12 +-- apps/cli/src/tools/export.command.ts | 2 +- apps/cli/src/tools/generate.command.ts | 2 +- .../src/tools/send/commands/create.command.ts | 4 +- .../src/tools/send/commands/edit.command.ts | 2 +- .../src/tools/send/commands/get.command.ts | 6 +- .../src/tools/send/commands/list.command.ts | 2 +- .../tools/send/commands/receive.command.ts | 12 +-- .../src/tools/send/models/send.response.ts | 2 +- apps/cli/src/tools/send/send.program.ts | 2 +- apps/cli/src/utils.ts | 4 +- apps/cli/src/vault/create.command.ts | 6 +- apps/cli/src/vault/delete.command.ts | 4 +- .../src/native-message.service.ts | 10 +-- .../organization-filter.component.ts | 4 +- .../src/app/accounts/settings.component.ts | 14 +-- apps/desktop/src/app/app.component.ts | 18 ++-- apps/desktop/src/app/app.module.ts | 2 +- .../src/app/components/avatar.component.ts | 2 +- .../app/layout/account-switcher.component.ts | 8 +- apps/desktop/src/app/layout/nav.component.ts | 2 +- .../src/app/layout/search/search.component.ts | 2 +- .../services/desktop-file-download.service.ts | 6 +- apps/desktop/src/app/services/init.service.ts | 16 ++-- .../src/app/services/services.module.ts | 58 ++++++------- .../src/app/tools/export/export.component.ts | 12 +-- .../src/app/tools/generator.component.spec.ts | 10 +-- .../src/app/tools/generator.component.ts | 8 +- .../password-generator-history.component.ts | 4 +- .../src/app/tools/send/add-edit.component.ts | 12 +-- .../app/tools/send/efflux-dates.component.ts | 4 +- .../src/app/tools/send/send.component.ts | 10 +-- .../auth/accessibility-cookie.component.ts | 10 +-- .../src/auth/delete-account.component.ts | 6 +- .../desktop/src/auth/environment.component.ts | 6 +- apps/desktop/src/auth/guards/login.guard.ts | 6 +- apps/desktop/src/auth/hint.component.ts | 6 +- apps/desktop/src/auth/lock.component.ts | 16 ++-- .../auth/login/login-approval.component.ts | 12 +-- .../auth/login/login-with-device.component.ts | 18 ++-- .../desktop/src/auth/login/login.component.ts | 20 ++--- apps/desktop/src/auth/register.component.ts | 16 ++-- .../src/auth/set-password.component.ts | 12 +-- apps/desktop/src/auth/sso.component.ts | 12 +-- .../src/auth/two-factor-options.component.ts | 4 +- apps/desktop/src/auth/two-factor.component.ts | 12 +-- apps/desktop/src/main.ts | 18 ++-- apps/desktop/src/main/menu/menu.about.ts | 2 +- apps/desktop/src/main/menu/menu.account.ts | 4 +- apps/desktop/src/main/menu/menu.bitwarden.ts | 4 +- apps/desktop/src/main/menu/menu.edit.ts | 4 +- apps/desktop/src/main/menu/menu.file.ts | 4 +- apps/desktop/src/main/menu/menu.first.ts | 4 +- apps/desktop/src/main/menu/menu.help.ts | 2 +- apps/desktop/src/main/menu/menu.main.ts | 6 +- apps/desktop/src/main/menu/menu.view.ts | 4 +- apps/desktop/src/main/menu/menu.window.ts | 4 +- apps/desktop/src/main/menu/menubar.ts | 4 +- apps/desktop/src/main/messaging.main.ts | 2 +- .../desktop/src/main/native-messaging.main.ts | 2 +- apps/desktop/src/main/tray.main.ts | 4 +- apps/desktop/src/main/updater.main.ts | 2 +- apps/desktop/src/main/window.main.ts | 4 +- apps/desktop/src/models/account.ts | 4 +- .../encrypted-message-response.ts | 2 +- .../native-messaging/encrypted-message.ts | 2 +- .../legacy-message-wrapper.ts | 2 +- .../desktop/src/{ => platform}/app/locales.ts | 0 apps/desktop/src/{ => platform}/flags.ts | 2 +- .../main/biometric/biometric.darwin.main.ts | 4 +- .../main/biometric/biometric.windows.main.ts | 10 +-- .../biometrics.service.abstraction.ts | 0 .../main/biometric/biometrics.service.spec.ts | 8 +- .../main/biometric/biometrics.service.ts | 8 +- .../{ => platform}/main/biometric/index.ts | 0 .../desktop-credential-storage-listener.ts | 4 +- .../services/electron-crypto.service.ts | 14 +-- .../services/electron-log.service.spec.ts | 0 .../services/electron-log.service.ts | 4 +- .../electron-platform-utils.service.ts | 12 +-- .../electron-renderer-messaging.service.ts | 4 +- ...lectron-renderer-secure-storage.service.ts | 4 +- .../electron-renderer-storage.service.ts | 2 +- .../electron-state.service.abstraction.ts | 8 +- .../services/electron-state.service.ts | 14 +-- .../services/electron-storage.service.ts | 2 +- .../{ => platform}/services/i18n.service.ts | 2 +- .../electron-main-messaging.service.ts | 2 +- .../encrypted-message-handler.service.ts | 5 +- .../native-message-handler.service.ts | 16 ++-- .../src/services/native-messaging.service.ts | 20 ++--- .../vault/app/accounts/premium.component.ts | 8 +- .../vault/add-edit-custom-fields.component.ts | 2 +- .../src/vault/app/vault/add-edit.component.ts | 12 +-- .../vault/app/vault/attachments.component.ts | 12 +-- .../vault/app/vault/collections.component.ts | 6 +- .../app/vault/folder-add-edit.component.ts | 6 +- .../app/vault/password-history.component.ts | 4 +- .../src/vault/app/vault/share.component.ts | 6 +- .../src/vault/app/vault/vault.component.ts | 10 +-- .../src/vault/app/vault/view.component.ts | 16 ++-- apps/desktop/tsconfig.json | 2 +- .../trial-initiation.component.spec.ts | 8 +- .../trial-initiation.component.ts | 6 +- .../organization-switcher.component.ts | 4 +- .../core/services/collection-admin.service.ts | 4 +- .../organizations/guards/is-paid-org.guard.ts | 2 +- .../guards/org-permissions.guard.spec.ts | 4 +- .../guards/org-permissions.guard.ts | 4 +- .../manage/entity-events.component.ts | 6 +- .../manage/entity-users.component.ts | 8 +- .../organizations/manage/events.component.ts | 8 +- .../manage/group-add-edit.component.ts | 6 +- .../organizations/manage/groups.component.ts | 8 +- .../manage/user-confirm.component.ts | 6 +- .../components/bulk/bulk-confirm.component.ts | 6 +- .../components/bulk/bulk-remove.component.ts | 2 +- .../bulk/bulk-restore-revoke.component.ts | 2 +- .../member-dialog/member-dialog.component.ts | 4 +- .../nested-checkbox.component.ts | 2 +- .../components/reset-password.component.ts | 14 +-- .../organizations/members/people.component.ts | 12 +-- .../policies/master-password.component.ts | 4 +- .../policies/password-generator.component.ts | 2 +- .../policies/policy-edit.component.ts | 6 +- .../policies/require-sso.component.ts | 2 +- .../policies/single-org.component.ts | 2 +- .../reporting/reports-home.component.ts | 2 +- .../settings/account.component.ts | 8 +- .../delete-organization-dialog.component.ts | 8 +- .../settings/two-factor-setup.component.ts | 4 +- .../access-selector.component.spec.ts | 2 +- .../access-selector.component.ts | 2 +- .../access-selector.stories.ts | 2 +- .../access-selector/user-type.pipe.ts | 2 +- .../collection-dialog.component.ts | 4 +- ...families-for-enterprise-setup.component.ts | 6 +- .../exposed-passwords-report.component.ts | 2 +- .../import-export/org-export.component.ts | 10 +-- .../import-export/org-import-export.module.ts | 4 +- .../import-export/org-import.component.ts | 6 +- .../inactive-two-factor-report.component.ts | 4 +- .../reused-passwords-report.component.ts | 4 +- .../organizations/tools/tools.component.ts | 2 +- .../unsecured-websites-report.component.ts | 2 +- .../tools/weak-passwords-report.component.ts | 2 +- .../enroll-master-password-reset.component.ts | 10 +-- .../providers/providers.component.ts | 4 +- .../settings/sponsored-families.component.ts | 6 +- .../settings/sponsoring-org-row.component.ts | 6 +- apps/web/src/app/app.component.ts | 12 +-- .../app/auth/accept-emergency.component.ts | 6 +- .../app/auth/accept-organization.component.ts | 14 +-- apps/web/src/app/auth/hint.component.ts | 6 +- apps/web/src/app/auth/lock.component.ts | 14 +-- .../auth/login/login-with-device.component.ts | 16 ++-- .../web/src/app/auth/login/login.component.ts | 16 ++-- .../src/app/auth/recover-delete.component.ts | 6 +- .../app/auth/recover-two-factor.component.ts | 8 +- .../register-form/register-form.component.ts | 14 +-- .../src/app/auth/set-password.component.ts | 10 +-- .../deauthorize-sessions.component.ts | 8 +- .../emergency-access-add-edit.component.ts | 6 +- .../emergency-access-attachments.component.ts | 12 +-- .../emergency-access-confirm.component.ts | 8 +- .../emergency-access-takeover.component.ts | 14 +-- .../emergency-access-view.component.ts | 4 +- .../emergency-access.component.ts | 14 +-- .../emergency-add-edit.component.ts | 10 +-- .../two-factor-authenticator.component.ts | 10 +-- .../settings/two-factor-base.component.ts | 6 +- .../auth/settings/two-factor-duo.component.ts | 6 +- .../settings/two-factor-email.component.ts | 8 +- .../settings/two-factor-recovery.component.ts | 2 +- .../settings/two-factor-setup.component.ts | 4 +- .../settings/two-factor-verify.component.ts | 2 +- .../settings/two-factor-webauthn.component.ts | 6 +- .../settings/two-factor-yubikey.component.ts | 6 +- .../auth/settings/verify-email.component.ts | 6 +- apps/web/src/app/auth/sso.component.ts | 14 +-- .../app/auth/two-factor-options.component.ts | 4 +- apps/web/src/app/auth/two-factor.component.ts | 12 +-- .../src/app/auth/update-password.component.ts | 12 +-- .../app/auth/verify-email-token.component.ts | 8 +- .../auth/verify-recover-delete.component.ts | 6 +- .../trial-initiation/billing.component.ts | 10 +-- .../adjust-subscription.component.ts | 6 +- .../billing-sync-api-key.component.ts | 4 +- .../organizations/change-plan.component.ts | 2 +- .../download-license.component.ts | 4 +- .../organization-billing-tab.component.ts | 2 +- ...ganization-subscription-cloud.component.ts | 6 +- ...ization-subscription-selfhost.component.ts | 6 +- .../secrets-manager/enroll.component.ts | 4 +- .../billing/settings/add-credit.component.ts | 8 +- .../settings/adjust-payment.component.ts | 6 +- .../billing-history-view.component.ts | 2 +- .../settings/billing-sync-key.component.ts | 2 +- .../settings/organization-plans.component.ts | 14 +-- .../settings/payment-method.component.ts | 6 +- .../app/billing/settings/payment.component.ts | 2 +- .../settings/subscription.component.ts | 4 +- .../billing/settings/tax-info.component.ts | 2 +- .../settings/user-subscription.component.ts | 10 +-- .../src/app/common/base.accept.component.ts | 6 +- .../src/app/common/base.events.component.ts | 8 +- .../src/app/common/base.people.component.ts | 14 +-- .../app/core/broadcaster-messaging.service.ts | 4 +- apps/web/src/app/core/core.module.ts | 24 +++--- apps/web/src/app/core/event.service.ts | 2 +- .../guards/has-premium.guard.ts | 4 +- apps/web/src/app/core/html-storage.service.ts | 4 +- apps/web/src/app/core/i18n.service.ts | 2 +- apps/web/src/app/core/init.service.ts | 22 ++--- apps/web/src/app/core/modal.service.ts | 4 +- apps/web/src/app/core/router.service.ts | 2 +- .../src/app/core/state-migration.service.ts | 2 +- apps/web/src/app/core/state/account.ts | 2 +- apps/web/src/app/core/state/global-state.ts | 2 +- apps/web/src/app/core/state/state.service.ts | 14 +-- apps/web/src/app/core/tests/index.ts | 1 + .../tests/preloaded-english-i18n.module.ts | 6 +- .../src/app/core/web-file-download.service.ts | 8 +- .../app/core/web-platform-utils.service.ts | 8 +- apps/web/src/app/layouts/footer.component.ts | 2 +- .../app/layouts/frontend-layout.component.ts | 6 +- apps/web/src/app/layouts/navbar.component.ts | 6 +- .../product-switcher.module.ts | 2 +- .../product-switcher.stories.ts | 2 +- .../reports/pages/breach-report.component.ts | 2 +- .../reports/pages/cipher-report.component.ts | 2 +- .../exposed-passwords-report.component.ts | 2 +- .../inactive-two-factor-report.component.ts | 6 +- .../reports/pages/reports-home.component.ts | 2 +- .../reused-passwords-report.component.ts | 4 +- .../unsecured-websites-report.component.ts | 2 +- .../pages/weak-passwords-report.component.ts | 2 +- .../src/app/reports/reports-routing.module.ts | 2 +- .../shared/report-card/report-card.stories.ts | 2 +- .../shared/report-list/report-list.stories.ts | 2 +- .../web/src/app/settings/account.component.ts | 2 +- .../app/settings/adjust-storage.component.ts | 6 +- .../web/src/app/settings/api-key.component.ts | 2 +- .../app/settings/change-avatar.component.ts | 8 +- .../app/settings/change-email.component.ts | 12 +-- .../change-kdf-confirmation.component.ts | 12 +-- .../change-kdf/change-kdf.component.ts | 2 +- .../app/settings/change-password.component.ts | 16 ++-- .../app/settings/delete-account.component.ts | 6 +- .../app/settings/domain-rules.component.ts | 6 +- .../src/app/settings/preferences.component.ts | 10 +-- .../web/src/app/settings/premium.component.ts | 10 +-- .../web/src/app/settings/profile.component.ts | 10 +-- .../src/app/settings/purge-vault.component.ts | 6 +- .../app/settings/security-keys.component.ts | 2 +- .../src/app/settings/settings.component.ts | 4 +- .../src/app/settings/update-key.component.ts | 12 +-- .../app/settings/update-license.component.ts | 6 +- apps/web/src/app/tools/generator.component.ts | 8 +- .../tools/import-export/export.component.ts | 10 +-- .../import-export/import-export.module.ts | 4 +- .../tools/import-export/import.component.ts | 6 +- .../password-generator-history.component.ts | 4 +- .../src/app/tools/send/access.component.ts | 16 ++-- .../src/app/tools/send/add-edit.component.ts | 12 +-- .../app/tools/send/efflux-dates.component.ts | 4 +- apps/web/src/app/tools/send/send.component.ts | 10 +-- apps/web/src/app/tools/tools.component.ts | 4 +- .../components/premium-badge.component.ts | 2 +- .../vault/components/premium-badge.stories.ts | 8 +- .../vault-items/vault-items.stories.ts | 8 +- .../add-edit-custom-fields.component.ts | 2 +- .../individual-vault/add-edit.component.ts | 10 +-- .../individual-vault/attachments.component.ts | 12 +-- .../bulk-delete-dialog.component.ts | 4 +- .../bulk-move-dialog.component.ts | 4 +- .../bulk-restore-dialog.component.ts | 4 +- .../bulk-share-dialog.component.ts | 6 +- .../individual-vault/collections.component.ts | 6 +- .../folder-add-edit.component.ts | 6 +- .../organization-name-badge.component.ts | 4 +- .../vault/individual-vault/share.component.ts | 6 +- .../components/link-sso.component.ts | 12 +-- .../organization-options.component.ts | 6 +- .../components/vault-filter.component.ts | 4 +- .../services/vault-filter.service.spec.ts | 4 +- .../services/vault-filter.service.ts | 4 +- .../vault-header/vault-header.component.ts | 2 +- .../vault/individual-vault/vault.component.ts | 18 ++-- .../app/vault/org-vault/add-edit.component.ts | 10 +-- .../vault/org-vault/attachments.component.ts | 12 +-- .../vault/org-vault/collections.component.ts | 6 +- .../group-badge/group-name-badge.component.ts | 2 +- .../vault-filter/vault-filter.service.ts | 2 +- .../vault-header/vault-header.component.ts | 2 +- .../app/vault/org-vault/vault.component.ts | 12 +-- .../web/src/connectors/translation.service.ts | 2 +- apps/web/src/utils/flags.ts | 2 +- apps/web/tsconfig.json | 2 +- .../domain-add-edit-dialog.component.ts | 10 +-- .../domain-verification.component.ts | 6 +- .../organizations/manage/scim.component.ts | 6 +- .../maximum-vault-timeout.component.ts | 2 +- .../clients/add-organization.component.ts | 6 +- .../providers/clients/clients.component.ts | 8 +- .../guards/provider-permissions.guard.spec.ts | 4 +- .../guards/provider-permissions.guard.ts | 4 +- .../manage/accept-provider.component.ts | 6 +- .../providers/manage/events.component.ts | 8 +- .../providers/manage/people.component.ts | 12 +-- .../manage/user-add-edit.component.ts | 6 +- .../services/web-provider.service.ts | 2 +- .../providers/settings/account.component.ts | 6 +- .../providers/setup/setup.component.ts | 8 +- .../bit-web/src/app/auth/sso/sso.component.ts | 8 +- .../secrets-manager/layout/layout.stories.ts | 2 +- .../overview/onboarding.stories.ts | 2 +- .../overview/overview.component.ts | 6 +- .../dialog/project-delete-dialog.component.ts | 4 +- .../dialog/project-dialog.component.ts | 4 +- .../models/requests/project.request.ts | 2 +- .../projects/project.service.ts | 8 +- .../project/project-people.component.ts | 2 +- .../project/project-secrets.component.ts | 4 +- .../project-service-accounts.component.ts | 2 +- .../projects/project/project.component.ts | 4 +- .../secrets/dialog/secret-delete.component.ts | 4 +- .../secrets/dialog/secret-dialog.component.ts | 6 +- .../secrets-manager/secrets/secret.service.ts | 8 +- .../secrets/secrets.component.ts | 4 +- .../access/access-tokens.component.ts | 4 +- .../service-accounts/access/access.service.ts | 12 +-- .../access-token-create-dialog.component.ts | 2 +- .../dialogs/access-token-dialog.component.ts | 4 +- ...service-account-delete-dialog.component.ts | 4 +- .../service-account-dialog.component.ts | 4 +- .../models/requests/access-token.request.ts | 2 +- .../requests/service-account.request.ts | 2 +- .../service-account-people.component.ts | 4 +- .../service-account-projects.component.ts | 2 +- .../service-account.component.ts | 4 +- .../service-account.service.ts | 8 +- .../service-accounts-list.component.ts | 4 +- .../sm-import-error-dialog.component.ts | 2 +- .../requests/sm-imported-project.request.ts | 2 +- .../requests/sm-imported-secret.request.ts | 2 +- .../settings/porting/sm-export.component.ts | 8 +- .../settings/porting/sm-import.component.ts | 8 +- .../services/sm-porting-api.service.ts | 8 +- .../settings/services/sm-porting.service.ts | 2 +- .../access-policies/access-policy.service.ts | 8 +- .../access-selector.component.ts | 2 +- .../shared/header.component.ts | 6 +- .../secrets-manager/shared/header.stories.ts | 8 +- .../shared/projects-list.component.ts | 4 +- .../shared/secrets-list.component.ts | 4 +- .../dialog/secret-hard-delete.component.ts | 4 +- .../trash/dialog/secret-restore.component.ts | 4 +- .../components/collections.component.ts | 6 +- .../components/captcha-protected.component.ts | 8 +- .../components/change-password.component.ts | 16 ++-- .../environment-selector.component.ts | 4 +- .../src/auth/components/hint.component.ts | 6 +- .../src/auth/components/lock.component.ts | 20 ++--- .../components/login-with-device.component.ts | 22 ++--- .../src/auth/components/login.component.ts | 24 +++--- .../components/remove-password.component.ts | 6 +- .../src/auth/components/sso.component.ts | 14 +-- .../two-factor-options.component.ts | 4 +- .../auth/components/two-factor.component.ts | 12 +-- .../components/update-password.component.ts | 16 ++-- .../update-temp-password.component.ts | 16 ++-- .../user-verification-prompt.component.ts | 4 +- .../components/user-verification.component.ts | 2 +- libs/angular/src/auth/guards/auth.guard.ts | 4 +- .../src/components/callout.component.ts | 2 +- .../src/components/environment.component.ts | 6 +- .../src/components/register.component.ts | 22 ++--- .../src/components/set-password.component.ts | 16 ++-- .../src/components/set-pin.component.ts | 6 +- .../settings/vault-timeout-input.component.ts | 2 +- .../angular/src/components/share.component.ts | 8 +- .../src/directives/api-action.directive.ts | 4 +- .../src/directives/autofocus.directive.ts | 2 +- .../src/directives/copy-click.directive.ts | 2 +- .../src/directives/launch-click.directive.ts | 4 +- .../src/directives/not-premium.directive.ts | 2 +- .../src/directives/premium.directive.ts | 2 +- .../src/directives/select-copy.directive.ts | 2 +- libs/angular/src/jslib.module.ts | 4 +- libs/angular/src/pipes/color-password.pipe.ts | 2 +- libs/angular/src/pipes/user-type.pipe.ts | 2 +- .../src/{ => platform}/pipes/ellipsis.pipe.ts | 0 .../src/{ => platform}/pipes/i18n.pipe.ts | 2 +- .../services/broadcaster.service.ts | 2 +- .../src/services/dialog/dialog.service.ts | 2 +- libs/angular/src/services/injection-tokens.ts | 4 +- .../src/services/jslib-services.module.ts | 74 ++++++++-------- .../src/services/theming/theming.service.ts | 2 +- .../password-strength.component.ts | 2 +- .../export-scope-callout.component.ts | 2 +- .../export/components/export.component.ts | 10 +-- .../components/generator.component.ts | 8 +- .../password-generator-history.component.ts | 4 +- .../src/tools/send/add-edit.component.ts | 14 +-- .../src/tools/send/efflux-dates.component.ts | 4 +- libs/angular/src/tools/send/send.component.ts | 8 +- .../validators/inputsFieldMatch.validator.ts | 2 +- .../add-edit-custom-fields.component.ts | 4 +- .../vault/components/add-edit.component.ts | 12 +-- .../vault/components/attachments.component.ts | 14 +-- .../components/folder-add-edit.component.ts | 6 +- .../src/vault/components/icon.component.ts | 4 +- .../components/password-history.component.ts | 4 +- .../components/password-reprompt.component.ts | 6 +- .../src/vault/components/premium.component.ts | 8 +- .../src/vault/components/view.component.ts | 16 ++-- .../services/vault-filter.service.ts | 2 +- libs/common/spec/utils.ts | 2 +- .../device-crypto.service.abstraction.ts | 2 +- .../src/abstractions/settings.service.ts | 2 +- .../organization.service.abstraction.ts | 4 +- .../admin-console/models/domain/collection.ts | 4 +- .../domain/encrypted-organization-key.ts | 6 +- .../domain/master-password-policy-options.ts | 2 +- .../password-generator-policy-options.ts | 2 +- .../src/admin-console/models/domain/policy.ts | 2 +- .../domain/reset-password-policy-options.ts | 2 +- .../services/collection.service.ts | 8 +- .../organization/organization.service.spec.ts | 2 +- .../organization/organization.service.ts | 2 +- .../services/policy/policy-api.service.ts | 4 +- .../services/policy/policy.service.ts | 4 +- .../services/provider.service.ts | 2 +- .../src/auth/abstractions/auth.service.ts | 2 +- libs/common/src/auth/captcha-iframe.ts | 2 +- .../login-strategies/login.strategy.spec.ts | 18 ++-- .../auth/login-strategies/login.strategy.ts | 14 +-- .../password-login.strategy.spec.ts | 16 ++-- .../password-login.strategy.ts | 14 +-- .../passwordless-login.strategy.ts | 12 +-- .../sso-login.strategy.spec.ts | 14 +-- .../login-strategies/sso-login.strategy.ts | 12 +-- .../user-api-login.strategy.spec.ts | 16 ++-- .../user-api-login.strategy.ts | 14 +-- .../src/auth/models/domain/auth-result.ts | 2 +- .../auth/models/domain/log-in-credentials.ts | 2 +- .../request/identity-token/device.request.ts | 2 +- .../identity-token/password-token.request.ts | 2 +- .../response/two-factor-web-authn.response.ts | 2 +- .../src/auth/services/account-api.service.ts | 2 +- .../src/auth/services/account.service.ts | 4 +- libs/common/src/auth/services/auth.service.ts | 22 ++--- .../auth/services/key-connector.service.ts | 12 +-- .../common/src/auth/services/login.service.ts | 2 +- .../common/src/auth/services/token.service.ts | 4 +- .../src/auth/services/two-factor.service.ts | 4 +- .../user-verification.service.ts | 4 +- libs/common/src/auth/webauthn-iframe.ts | 4 +- libs/common/src/models/export/card.export.ts | 2 +- .../common/src/models/export/cipher.export.ts | 2 +- .../src/models/export/collection.export.ts | 2 +- libs/common/src/models/export/field.export.ts | 2 +- .../common/src/models/export/folder.export.ts | 2 +- .../src/models/export/identity.export.ts | 2 +- .../src/models/export/login-uri.export.ts | 2 +- libs/common/src/models/export/login.export.ts | 2 +- .../src/models/response/error.response.ts | 2 +- .../abstractions/app-id.service.ts} | 0 .../abstractions/broadcaster.service.ts | 0 .../config/config-api.service.abstraction.ts | 0 .../config/config.service.abstraction.ts | 2 +- .../abstractions/config/server-config.ts | 0 .../abstractions/crypto-function.service.ts} | 2 +- .../abstractions/crypto.service.ts | 10 +-- .../abstractions/encrypt.service.ts | 6 +- .../abstractions/environment.service.ts | 0 .../file-download/file-download.builder.ts} | 2 +- .../file-download/file-download.request.ts} | 0 .../file-download/file-download.service.ts} | 2 +- .../file-upload/file-upload.service.ts | 2 +- .../form-validation-errors.service.ts} | 0 .../abstractions/i18n.service.ts | 0 .../abstractions/log.service.ts | 2 +- .../abstractions/messaging.service.ts | 0 .../abstractions/platform-utils.service.ts} | 2 +- .../abstractions/state-migration.service.ts} | 0 .../abstractions/state.service.ts | 44 +++++----- .../abstractions/storage.service.ts | 0 .../abstractions/system.service.ts | 2 +- .../abstractions/translation.service.ts | 0 .../abstractions/validation.service.ts | 0 .../factories/account-factory.ts} | 0 .../factories/global-state-factory.ts} | 0 .../factories/state-factory.ts} | 4 +- .../interfaces/decryptable.interface.ts | 0 .../interfaces/encrypted.ts} | 4 +- .../initializer-metadata.interface.ts | 0 .../src/{ => platform}/misc/flags.spec.ts | 0 libs/common/src/{ => platform}/misc/flags.ts | 0 .../{ => platform}/misc/sequentialize.spec.ts | 0 .../src/{ => platform}/misc/sequentialize.ts | 0 .../src/{ => platform}/misc/throttle.spec.ts | 0 .../src/{ => platform}/misc/throttle.ts | 0 .../src/{ => platform}/misc/utils.spec.ts | 0 libs/common/src/{ => platform}/misc/utils.ts | 0 .../src/{ => platform}/misc/wordlist.ts | 0 .../models/data/server-config.data.spec.ts | 0 .../models/data/server-config.data.ts | 0 .../models/domain/account-keys.spec.ts | 2 +- .../models/domain/account-profile.spec.ts | 0 .../models/domain/account-settings.spec.ts | 0 .../models/domain/account-tokens.spec.ts | 0 .../models/domain/account.spec.ts | 0 .../{ => platform}/models/domain/account.ts | 40 ++++----- .../models/domain/decrypt-parameters.ts | 0 .../models/domain/domain-base.ts | 2 +- .../models/domain/enc-array-buffer.spec.ts | 4 +- .../models/domain/enc-array-buffer.ts | 8 +- .../models/domain/enc-string.spec.ts | 6 +- .../models/domain/enc-string.ts | 8 +- .../models/domain/encrypted-object.ts | 2 +- .../models/domain/encryption-pair.spec.ts | 0 .../models/domain/global-state.ts | 7 +- .../models/domain/state.spec.ts | 0 .../src/{ => platform}/models/domain/state.ts | 0 .../models/domain/storage-options.ts | 2 +- .../domain/symmetric-crypto-key.spec.ts | 4 +- .../models/domain/symmetric-crypto-key.ts | 4 +- .../models/response/server-config.response.ts | 2 +- .../services/app-id.service.ts} | 4 +- .../services/broadcaster.service.ts | 0 .../services/config/config-api.service.ts | 2 +- .../services/config/config.service.ts | 6 +- .../services/console-log.service.spec.ts | 4 +- .../services/console-log.service.ts} | 2 +- .../services/container.service.ts | 0 .../services/crypto.service.spec.ts | 4 +- .../{ => platform}/services/crypto.service.ts | 34 ++++---- .../encrypt.service.implementation.ts | 12 +-- .../services/cryptography/encrypt.worker.ts | 6 +- .../cryptography/get-class-initializer.ts | 4 +- .../services/cryptography/initializer-key.ts | 0 ...tithread-encrypt.service.implementation.ts | 4 +- .../services/encrypt.service.spec.ts | 11 ++- .../services/environment.service.ts | 2 +- .../file-upload/azure-file-upload.service.ts} | 6 +- .../bitwarden-file-upload.service.ts} | 4 +- .../file-upload/file-upload.service.ts | 7 +- .../form-validation-errors.service.ts} | 2 +- .../{ => platform}/services/i18n.service.ts | 0 .../services/memory-storage.service.ts} | 0 .../services/noop-messaging.service.ts} | 0 .../services/state-migration.service.spec.ts | 6 +- .../services/state-migration.service.ts} | 28 +++--- .../{ => platform}/services/state.service.ts | 56 ++++++------ .../{ => platform}/services/system.service.ts | 6 +- .../services/translation.service.ts | 0 .../services/validation.service.ts | 4 +- .../web-crypto-function.service.spec.ts | 6 +- .../services/web-crypto-function.service.ts} | 6 +- .../services/account/avatar-update.service.ts | 2 +- .../src/services/anonymousHub.service.ts | 4 +- libs/common/src/services/api.service.ts | 8 +- libs/common/src/services/audit.service.ts | 6 +- .../device-crypto.service.implementation.ts | 12 +-- .../services/device-crypto.service.spec.ts | 14 +-- .../devices-api.service.implementation.ts | 2 +- .../event/event-collection.service.ts | 2 +- .../services/event/event-upload.service.ts | 4 +- .../src/services/notifications.service.ts | 10 +-- .../org-domain-api.service.spec.ts | 4 +- .../org-domain.service.spec.ts | 4 +- .../organization-domain/org-domain.service.ts | 4 +- .../src/services/policy.service.spec.ts | 9 +- libs/common/src/services/search.service.ts | 4 +- .../src/services/settings.service.spec.ts | 8 +- libs/common/src/services/settings.service.ts | 6 +- libs/common/src/services/totp.service.ts | 6 +- .../vaultTimeout/vaultTimeout.service.ts | 8 +- .../vaultTimeoutSettings.service.ts | 4 +- .../password/password-generation.service.ts | 8 +- .../username/username-generation.service.ts | 6 +- .../tools/send/models/domain/send-access.ts | 6 +- .../src/tools/send/models/domain/send-file.ts | 6 +- .../src/tools/send/models/domain/send-text.ts | 6 +- .../src/tools/send/models/domain/send.spec.ts | 8 +- .../src/tools/send/models/domain/send.ts | 6 +- .../src/tools/send/models/view/send.view.ts | 4 +- .../services/send-api.service.abstraction.ts | 2 +- .../tools/send/services/send-api.service.ts | 10 +-- .../send/services/send.service.abstraction.ts | 4 +- .../tools/send/services/send.service.spec.ts | 14 +-- .../src/tools/send/services/send.service.ts | 16 ++-- .../src/vault/abstractions/cipher.service.ts | 2 +- .../file-upload/cipher-file-upload.service.ts | 6 +- .../folder/folder.service.abstraction.ts | 2 +- .../vault/models/domain/attachment.spec.ts | 10 +-- .../src/vault/models/domain/attachment.ts | 8 +- .../src/vault/models/domain/card.spec.ts | 2 +- libs/common/src/vault/models/domain/card.ts | 6 +- .../src/vault/models/domain/cipher.spec.ts | 4 +- libs/common/src/vault/models/domain/cipher.ts | 10 +-- .../src/vault/models/domain/field.spec.ts | 2 +- libs/common/src/vault/models/domain/field.ts | 6 +- .../src/vault/models/domain/folder.spec.ts | 4 +- libs/common/src/vault/models/domain/folder.ts | 4 +- .../src/vault/models/domain/identity.spec.ts | 2 +- .../src/vault/models/domain/identity.ts | 6 +- .../src/vault/models/domain/login-uri.spec.ts | 2 +- .../src/vault/models/domain/login-uri.ts | 6 +- .../src/vault/models/domain/login.spec.ts | 2 +- libs/common/src/vault/models/domain/login.ts | 6 +- .../src/vault/models/domain/password.spec.ts | 2 +- .../src/vault/models/domain/password.ts | 6 +- .../src/vault/models/domain/secure-note.ts | 4 +- .../vault/models/view/attachment.view.spec.ts | 4 +- .../src/vault/models/view/attachment.view.ts | 2 +- .../src/vault/models/view/cipher.view.ts | 4 +- .../src/vault/models/view/identity.view.ts | 2 +- .../vault/models/view/login-uri-view.spec.ts | 2 +- .../src/vault/models/view/login-uri.view.ts | 2 +- .../src/vault/models/view/login.view.ts | 2 +- .../src/vault/services/cipher.service.spec.ts | 14 +-- .../src/vault/services/cipher.service.ts | 20 ++--- .../file-upload/cipher-file-upload.service.ts | 12 +-- .../services/folder/folder.service.spec.ts | 12 +-- .../vault/services/folder/folder.service.ts | 10 +-- .../src/vault/services/sync/sync.service.ts | 10 +-- .../src/async-actions/bit-action.directive.ts | 4 +- .../src/async-actions/bit-submit.directive.ts | 4 +- .../src/async-actions/in-forms.stories.ts | 4 +- .../src/async-actions/standalone.stories.ts | 4 +- .../components/src/avatar/avatar.component.ts | 2 +- .../src/badge-list/badge-list.stories.ts | 2 +- .../src/banner/banner.component.spec.ts | 2 +- libs/components/src/banner/banner.stories.ts | 2 +- .../src/callout/callout.component.spec.ts | 2 +- .../src/callout/callout.component.ts | 2 +- .../components/src/callout/callout.stories.ts | 2 +- .../src/checkbox/checkbox.stories.ts | 2 +- .../color-password.component.ts | 2 +- .../src/dialog/dialog.service.stories.ts | 2 +- .../src/dialog/dialog/dialog.stories.ts | 2 +- .../simple-configurable-dialog.component.ts | 2 +- ...ple-configurable-dialog.service.stories.ts | 2 +- .../dialog/simple-dialog.service.stories.ts | 2 +- .../form-control/form-control.component.ts | 2 +- .../src/form-field/bit-validators.stories.ts | 2 +- .../src/form-field/error-summary.stories.ts | 2 +- .../src/form-field/error.component.ts | 2 +- .../src/form-field/form-field.stories.ts | 2 +- .../src/form-field/multi-select.stories.ts | 2 +- .../password-input-toggle.directive.ts | 2 +- .../form-field/password-input-toggle.spec.ts | 2 +- .../password-input-toggle.stories.ts | 2 +- libs/components/src/form/form.stories.ts | 2 +- .../multi-select/multi-select.component.ts | 2 +- .../src/navigation/nav-group.stories.ts | 2 +- .../radio-button.component.spec.ts | 2 +- .../src/radio-button/radio-button.stories.ts | 2 +- .../radio-group.component.spec.ts | 2 +- libs/components/src/search/search.stories.ts | 2 +- .../components/src/select/select.component.ts | 2 +- libs/components/src/select/select.stories.ts | 2 +- libs/components/src/shared/i18n.pipe.ts | 2 +- .../src/utils/function-to-observable.ts | 2 +- .../components/src/utils/i18n-mock.service.ts | 2 +- .../services/vault-export.service.spec.ts | 10 +-- .../services/vault-export.service.ts | 8 +- ...warden-password-protected-importer.spec.ts | 6 +- .../importer/spec/keeper-csv-importer.spec.ts | 2 +- .../spec/keeper-json-importer.spec.ts | 2 +- .../spec/onepassword-1pux-importer.spec.ts | 2 +- libs/importer/src/importers/base-importer.ts | 6 +- .../bitwarden/bitwarden-json-importer.ts | 6 +- .../bitwarden-password-protected-importer.ts | 8 +- .../src/services/import.service.spec.ts | 6 +- libs/importer/src/services/import.service.ts | 6 +- .../node-crypto-function.service.spec.ts | 4 +- .../services/node-crypto-function.service.ts | 8 +- 869 files changed, 2840 insertions(+), 2746 deletions(-) rename apps/browser/src/background/{service_factories => service-factories}/cipher-file-upload-service.factory.ts (76%) rename apps/browser/src/background/{service_factories => service-factories}/cipher-file-upload.service.factory.ts (76%) rename apps/browser/src/background/{service_factories => service-factories}/event-collection-service.factory.ts (84%) rename apps/browser/src/background/{service_factories => service-factories}/event-upload-service.factory.ts (63%) rename apps/browser/src/background/{service_factories => service-factories}/password-generation-service.factory.ts (72%) rename apps/browser/src/background/{service_factories => service-factories}/search-service.factory.ts (64%) rename apps/browser/src/background/{service_factories => service-factories}/send-service.factory.ts (56%) rename apps/browser/src/background/{service_factories => service-factories}/settings-service.factory.ts (72%) rename apps/browser/src/background/{service_factories => service-factories}/vault-timeout-service.factory.ts (83%) rename apps/browser/src/background/{service_factories => service-factories}/vault-timeout-settings-service.factory.ts (79%) rename apps/browser/src/{ => platform}/alarms/alarm-state.ts (95%) rename apps/browser/src/{ => platform}/alarms/on-alarm-listener.ts (86%) rename apps/browser/src/{ => platform}/alarms/register-alarms.ts (100%) rename apps/browser/src/{ => platform}/background.html (100%) rename apps/browser/src/{ => platform}/background.ts (91%) rename apps/browser/src/{background/service_factories => platform/background/service-factories}/api-service.factory.ts (88%) rename apps/browser/src/{background/service_factories => platform/background/service-factories}/app-id-service.factory.ts (84%) rename apps/browser/src/{background/service_factories => platform/background/service-factories}/crypto-function-service.factory.ts (75%) rename apps/browser/src/{background/service_factories => platform/background/service-factories}/crypto-service.factory.ts (77%) rename apps/browser/src/{background/service_factories => platform/background/service-factories}/encrypt-service.factory.ts (78%) rename apps/browser/src/{background/service_factories => platform/background/service-factories}/environment-service.factory.ts (100%) rename apps/browser/src/{background/service_factories => platform/background/service-factories}/factory-options.ts (100%) rename apps/browser/src/{background/service_factories => platform/background/service-factories}/file-upload-service.factory.ts (68%) rename apps/browser/src/{background/service_factories => platform/background/service-factories}/i18n-service.factory.ts (91%) rename apps/browser/src/{background/service_factories => platform/background/service-factories}/key-generation-service.factory.ts (82%) rename apps/browser/src/{background/service_factories => platform/background/service-factories}/log-service.factory.ts (71%) rename apps/browser/src/{background/service_factories => platform/background/service-factories}/messaging-service.factory.ts (65%) rename apps/browser/src/{background/service_factories => platform/background/service-factories}/platform-utils-service.factory.ts (85%) rename apps/browser/src/{background/service_factories => platform/background/service-factories}/state-migration-service.factory.ts (76%) rename apps/browser/src/{background/service_factories => platform/background/service-factories}/state-service.factory.ts (88%) rename apps/browser/src/{background/service_factories => platform/background/service-factories}/storage-service.factory.ts (81%) rename apps/browser/src/{browser/browserApi.ts => platform/browser/browser-api.ts} (97%) rename apps/browser/src/{ => platform}/decorators/dev-flag.decorator.spec.ts (100%) rename apps/browser/src/{ => platform}/decorators/dev-flag.decorator.ts (100%) rename apps/browser/src/{ => platform}/decorators/session-sync-observable/browser-session.decorator.spec.ts (95%) rename apps/browser/src/{ => platform}/decorators/session-sync-observable/browser-session.decorator.ts (98%) rename apps/browser/src/{ => platform}/decorators/session-sync-observable/index.ts (100%) rename apps/browser/src/{ => platform}/decorators/session-sync-observable/session-storable.ts (100%) rename apps/browser/src/{ => platform}/decorators/session-sync-observable/session-sync.decorator.spec.ts (100%) rename apps/browser/src/{ => platform}/decorators/session-sync-observable/session-sync.decorator.ts (100%) rename apps/browser/src/{ => platform}/decorators/session-sync-observable/session-syncer.spec.ts (98%) rename apps/browser/src/{ => platform}/decorators/session-sync-observable/session-syncer.ts (95%) rename apps/browser/src/{ => platform}/decorators/session-sync-observable/sync-item-metadata.ts (100%) rename apps/browser/src/{ => platform}/decorators/session-sync-observable/synced-item-metadata.spec.ts (100%) rename apps/browser/src/{ => platform}/flags.ts (86%) rename apps/browser/src/{ => platform}/globals.d.ts (100%) rename apps/browser/src/{ => platform}/listeners/combine.spec.ts (100%) rename apps/browser/src/{ => platform}/listeners/combine.ts (86%) rename apps/browser/src/{ => platform}/listeners/index.ts (78%) rename apps/browser/src/{listeners/onCommandListener.ts => platform/listeners/on-command-listener.ts} (74%) rename apps/browser/src/{listeners/onInstallListener.ts => platform/listeners/on-install-listener.ts} (75%) rename apps/browser/src/{ => platform}/listeners/update-badge.ts (87%) rename apps/browser/src/{ => platform}/popup/locales.ts (100%) rename apps/browser/src/{services/abstractChromeStorageApi.service.ts => platform/services/abstractions/abstract-chrome-storage-api.service.ts} (92%) rename apps/browser/src/{services/abstractions/abstractKeyGeneration.service.ts => platform/services/abstractions/abstract-key-generation.service.ts} (54%) rename apps/browser/src/{ => platform}/services/abstractions/browser-state.service.ts (70%) rename apps/browser/src/{ => platform}/services/browser-config.service.ts (64%) rename apps/browser/src/{services/browserCrypto.service.ts => platform/services/browser-crypto.service.ts} (82%) rename apps/browser/src/{ => platform}/services/browser-environment.service.ts (83%) rename apps/browser/src/{services/browserFileDownloadService.ts => platform/services/browser-file-download.service.ts} (66%) rename apps/browser/src/{ => platform}/services/browser-i18n.service.ts (83%) rename apps/browser/src/{services/browserLocalStorage.service.ts => platform/services/browser-local-storage.service.ts} (60%) rename apps/browser/src/{services/browserMemoryStorage.service.ts => platform/services/browser-memory-storage.service.ts} (60%) rename apps/browser/src/{services/browserMessagingPrivateModeBackground.service.ts => platform/services/browser-messaging-private-mode-background.service.ts} (74%) rename apps/browser/src/{services/browserMessagingPrivateModePopup.service.ts => platform/services/browser-messaging-private-mode-popup.service.ts} (74%) rename apps/browser/src/{services/browserMessaging.service.ts => platform/services/browser-messaging.service.ts} (54%) rename apps/browser/src/{services/browserPlatformUtils.service.spec.ts => platform/services/browser-platform-utils.service.spec.ts} (98%) rename apps/browser/src/{services/browserPlatformUtils.service.ts => platform/services/browser-platform-utils.service.ts} (97%) rename apps/browser/src/{ => platform}/services/browser-state.service.spec.ts (82%) rename apps/browser/src/{ => platform}/services/browser-state.service.ts (89%) rename apps/browser/src/{ => platform}/services/i18n.service.ts (98%) rename apps/browser/src/{services/keyGeneration.service.ts => platform/services/key-generation.service.ts} (70%) rename apps/browser/src/{services/localBackedSessionStorage.service.spec.ts => platform/services/local-backed-session-storage.service.spec.ts} (94%) rename apps/browser/src/{services/localBackedSessionStorage.service.ts => platform/services/local-backed-session-storage.service.ts} (88%) rename apps/cli/src/{ => platform}/flags.ts (94%) rename apps/cli/src/{ => platform}/services/cli-platform-utils.service.ts (96%) rename apps/cli/src/{ => platform}/services/console-log.service.spec.ts (100%) rename apps/cli/src/{ => platform}/services/console-log.service.ts (91%) rename apps/cli/src/{ => platform}/services/i18n.service.ts (95%) rename apps/cli/src/{ => platform}/services/lowdb-storage.service.ts (93%) rename apps/cli/src/{ => platform}/services/node-api.service.ts (80%) rename apps/cli/src/{ => platform}/services/node-env-secure-storage.service.ts (83%) rename apps/desktop/src/{ => platform}/app/locales.ts (100%) rename apps/desktop/src/{ => platform}/flags.ts (94%) rename apps/desktop/src/{ => platform}/main/biometric/biometric.darwin.main.ts (91%) rename apps/desktop/src/{ => platform}/main/biometric/biometric.windows.main.ts (94%) rename apps/desktop/src/{ => platform}/main/biometric/biometrics.service.abstraction.ts (100%) rename apps/desktop/src/{ => platform}/main/biometric/biometrics.service.spec.ts (92%) rename apps/desktop/src/{ => platform}/main/biometric/biometrics.service.ts (94%) rename apps/desktop/src/{ => platform}/main/biometric/index.ts (100%) rename apps/desktop/src/{ => platform}/main/desktop-credential-storage-listener.ts (95%) rename apps/desktop/src/{ => platform}/services/electron-crypto.service.ts (78%) rename apps/desktop/src/{ => platform}/services/electron-log.service.spec.ts (100%) rename apps/desktop/src/{ => platform}/services/electron-log.service.ts (92%) rename apps/desktop/src/{ => platform}/services/electron-platform-utils.service.ts (88%) rename apps/desktop/src/{ => platform}/services/electron-renderer-messaging.service.ts (79%) rename apps/desktop/src/{ => platform}/services/electron-renderer-secure-storage.service.ts (85%) rename apps/desktop/src/{ => platform}/services/electron-renderer-storage.service.ts (87%) rename apps/desktop/src/{ => platform}/services/electron-state.service.abstraction.ts (68%) rename apps/desktop/src/{ => platform}/services/electron-state.service.ts (88%) rename apps/desktop/src/{ => platform}/services/electron-storage.service.ts (95%) rename apps/desktop/src/{ => platform}/services/i18n.service.ts (97%) rename apps/web/src/app/{shared => core}/guards/has-premium.guard.ts (82%) create mode 100644 apps/web/src/app/core/tests/index.ts rename apps/web/src/app/{ => core}/tests/preloaded-english-i18n.module.ts (83%) rename libs/angular/src/{ => platform}/pipes/ellipsis.pipe.ts (100%) rename libs/angular/src/{ => platform}/pipes/i18n.pipe.ts (80%) rename libs/angular/src/{ => platform}/services/broadcaster.service.ts (77%) rename libs/common/src/{abstractions/appId.service.ts => platform/abstractions/app-id.service.ts} (100%) rename libs/common/src/{ => platform}/abstractions/broadcaster.service.ts (100%) rename libs/common/src/{ => platform}/abstractions/config/config-api.service.abstraction.ts (100%) rename libs/common/src/{ => platform}/abstractions/config/config.service.abstraction.ts (88%) rename libs/common/src/{ => platform}/abstractions/config/server-config.ts (100%) rename libs/common/src/{abstractions/cryptoFunction.service.ts => platform/abstractions/crypto-function.service.ts} (97%) rename libs/common/src/{ => platform}/abstractions/crypto.service.ts (89%) rename libs/common/src/{ => platform}/abstractions/encrypt.service.ts (82%) rename libs/common/src/{ => platform}/abstractions/environment.service.ts (100%) rename libs/common/src/{abstractions/fileDownload/fileDownloadBuilder.ts => platform/abstractions/file-download/file-download.builder.ts} (96%) rename libs/common/src/{abstractions/fileDownload/fileDownloadRequest.ts => platform/abstractions/file-download/file-download.request.ts} (100%) rename libs/common/src/{abstractions/fileDownload/fileDownload.service.ts => platform/abstractions/file-download/file-download.service.ts} (61%) rename libs/common/src/{ => platform}/abstractions/file-upload/file-upload.service.ts (91%) rename libs/common/src/{abstractions/formValidationErrors.service.ts => platform/abstractions/form-validation-errors.service.ts} (100%) rename libs/common/src/{ => platform}/abstractions/i18n.service.ts (100%) rename libs/common/src/{ => platform}/abstractions/log.service.ts (84%) rename libs/common/src/{ => platform}/abstractions/messaging.service.ts (100%) rename libs/common/src/{abstractions/platformUtils.service.ts => platform/abstractions/platform-utils.service.ts} (95%) rename libs/common/src/{abstractions/stateMigration.service.ts => platform/abstractions/state-migration.service.ts} (100%) rename libs/common/src/{ => platform}/abstractions/state.service.ts (93%) rename libs/common/src/{ => platform}/abstractions/storage.service.ts (100%) rename libs/common/src/{ => platform}/abstractions/system.service.ts (79%) rename libs/common/src/{ => platform}/abstractions/translation.service.ts (100%) rename libs/common/src/{ => platform}/abstractions/validation.service.ts (100%) rename libs/common/src/{factories/accountFactory.ts => platform/factories/account-factory.ts} (100%) rename libs/common/src/{factories/globalStateFactory.ts => platform/factories/global-state-factory.ts} (100%) rename libs/common/src/{factories/stateFactory.ts => platform/factories/state-factory.ts} (88%) rename libs/common/src/{ => platform}/interfaces/decryptable.interface.ts (100%) rename libs/common/src/{interfaces/IEncrypted.ts => platform/interfaces/encrypted.ts} (60%) rename libs/common/src/{ => platform}/interfaces/initializer-metadata.interface.ts (100%) rename libs/common/src/{ => platform}/misc/flags.spec.ts (100%) rename libs/common/src/{ => platform}/misc/flags.ts (100%) rename libs/common/src/{ => platform}/misc/sequentialize.spec.ts (100%) rename libs/common/src/{ => platform}/misc/sequentialize.ts (100%) rename libs/common/src/{ => platform}/misc/throttle.spec.ts (100%) rename libs/common/src/{ => platform}/misc/throttle.ts (100%) rename libs/common/src/{ => platform}/misc/utils.spec.ts (100%) rename libs/common/src/{ => platform}/misc/utils.ts (100%) rename libs/common/src/{ => platform}/misc/wordlist.ts (100%) rename libs/common/src/{ => platform}/models/data/server-config.data.spec.ts (100%) rename libs/common/src/{ => platform}/models/data/server-config.data.ts (100%) rename libs/common/src/{ => platform}/models/domain/account-keys.spec.ts (97%) rename libs/common/src/{ => platform}/models/domain/account-profile.spec.ts (100%) rename libs/common/src/{ => platform}/models/domain/account-settings.spec.ts (100%) rename libs/common/src/{ => platform}/models/domain/account-tokens.spec.ts (100%) rename libs/common/src/{ => platform}/models/domain/account.spec.ts (100%) rename libs/common/src/{ => platform}/models/domain/account.ts (85%) rename libs/common/src/{ => platform}/models/domain/decrypt-parameters.ts (100%) rename libs/common/src/{ => platform}/models/domain/domain-base.ts (97%) rename libs/common/src/{ => platform}/models/domain/enc-array-buffer.spec.ts (96%) rename libs/common/src/{ => platform}/models/domain/enc-array-buffer.ts (91%) rename libs/common/src/{ => platform}/models/domain/enc-string.spec.ts (97%) rename libs/common/src/{ => platform}/models/domain/enc-string.ts (96%) rename libs/common/src/{ => platform}/models/domain/encrypted-object.ts (57%) rename libs/common/src/{ => platform}/models/domain/encryption-pair.spec.ts (100%) rename libs/common/src/{ => platform}/models/domain/global-state.ts (84%) rename libs/common/src/{ => platform}/models/domain/state.spec.ts (100%) rename libs/common/src/{ => platform}/models/domain/state.ts (100%) rename libs/common/src/{ => platform}/models/domain/storage-options.ts (82%) rename libs/common/src/{ => platform}/models/domain/symmetric-crypto-key.spec.ts (95%) rename libs/common/src/{ => platform}/models/domain/symmetric-crypto-key.ts (95%) rename libs/common/src/{ => platform}/models/response/server-config.response.ts (95%) rename libs/common/src/{services/appId.service.ts => platform/services/app-id.service.ts} (92%) rename libs/common/src/{ => platform}/services/broadcaster.service.ts (100%) rename libs/common/src/{ => platform}/services/config/config-api.service.ts (88%) rename libs/common/src/{ => platform}/services/config/config.service.ts (93%) rename libs/common/src/{ => platform}/services/console-log.service.spec.ts (92%) rename libs/common/src/{services/consoleLog.service.ts => platform/services/console-log.service.ts} (96%) rename libs/common/src/{ => platform}/services/container.service.ts (100%) rename libs/common/src/{ => platform}/services/crypto.service.spec.ts (86%) rename libs/common/src/{ => platform}/services/crypto.service.ts (97%) rename libs/common/src/{ => platform}/services/cryptography/encrypt.service.implementation.ts (94%) rename libs/common/src/{ => platform}/services/cryptography/encrypt.worker.ts (87%) rename libs/common/src/{ => platform}/services/cryptography/get-class-initializer.ts (83%) rename libs/common/src/{ => platform}/services/cryptography/initializer-key.ts (100%) rename libs/common/src/{ => platform}/services/cryptography/multithread-encrypt.service.implementation.ts (94%) rename libs/common/src/{ => platform}/services/encrypt.service.spec.ts (95%) rename libs/common/src/{ => platform}/services/environment.service.ts (98%) rename libs/common/src/{services/azureFileUpload.service.ts => platform/services/file-upload/azure-file-upload.service.ts} (97%) rename libs/common/src/{services/bitwardenFileUpload.service.ts => platform/services/file-upload/bitwarden-file-upload.service.ts} (86%) rename libs/common/src/{ => platform}/services/file-upload/file-upload.service.ts (89%) rename libs/common/src/{services/formValidationErrors.service.ts => platform/services/form-validation-errors.service.ts} (94%) rename libs/common/src/{ => platform}/services/i18n.service.ts (100%) rename libs/common/src/{services/memoryStorage.service.ts => platform/services/memory-storage.service.ts} (100%) rename libs/common/src/{services/noopMessaging.service.ts => platform/services/noop-messaging.service.ts} (100%) rename libs/common/src/{ => platform}/services/state-migration.service.spec.ts (97%) rename libs/common/src/{services/stateMigration.service.ts => platform/services/state-migration.service.ts} (96%) rename libs/common/src/{ => platform}/services/state.service.ts (98%) rename libs/common/src/{ => platform}/services/system.service.ts (93%) rename libs/common/src/{ => platform}/services/translation.service.ts (100%) rename libs/common/src/{ => platform}/services/validation.service.ts (89%) rename libs/common/src/{ => platform}/services/web-crypto-function.service.spec.ts (99%) rename libs/common/src/{services/webCryptoFunction.service.ts => platform/services/web-crypto-function.service.ts} (98%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 6e2a9f53d99..a954236cdf7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -54,4 +54,23 @@ libs/angular/src/billing @bitwarden/team-billing-dev libs/common/src/billing @bitwarden/team-billing-dev ## Platform team files ## +apps/browser/src/platform @bitwarden/team-platform-dev +apps/cli/src/platform @bitwarden/team-platform-dev +apps/desktop/src/platform @bitwarden/team-platform-dev +apps/web/src/app/platform @bitwarden/team-platform-dev +libs/angular/src/platform @bitwarden/team-platform-dev +libs/common/src/platform @bitwarden/team-platform-dev +# Node-specifc platform files +libs/node @bitwarden/team-platform-dev +# Web utils used across app and connectors +apps/web/src/utils/ @bitwarden/team-platform-dev +# Web core and shared files +apps/web/src/app/core @bitwarden/team-platform-dev +apps/web/src/app/shared @bitwarden/team-platform-dev +apps/web/src/translation-constants.ts @bitwarden/team-platform-dev + +## Component Library ## libs/components @bitwarden/team-platform-dev + +## Desktop native module ## +apps/desktop/desktop_native @bitwarden/team-platform-dev diff --git a/.github/whitelist-capital-letters.txt b/.github/whitelist-capital-letters.txt index c62b6947eea..471602a09b0 100644 --- a/.github/whitelist-capital-letters.txt +++ b/.github/whitelist-capital-letters.txt @@ -4,7 +4,6 @@ ./apps/browser/src/safari/desktop/Base.lproj ./apps/browser/src/services/vaultTimeout ./apps/browser/store/windows/Assets -./libs/common/src/abstractions/fileDownload ./libs/common/src/abstractions/userVerification ./libs/common/src/abstractions/vaultTimeout ./libs/common/src/services/vaultTimeout @@ -27,35 +26,14 @@ ./libs/common/src/misc/linkedFieldOption.decorator.ts ./libs/common/src/misc/serviceUtils.ts ./libs/common/src/misc/serviceUtils.spec.ts -./libs/common/src/factories/accountFactory.ts -./libs/common/src/factories/globalStateFactory.ts -./libs/common/src/factories/stateFactory.ts ./libs/common/src/abstractions/userVerification/userVerification.service.abstraction.ts ./libs/common/src/abstractions/userVerification/userVerification-api.service.abstraction.ts -./libs/common/src/abstractions/platformUtils.service.ts -./libs/common/src/abstractions/stateMigration.service.ts -./libs/common/src/abstractions/fileDownload/fileDownloadBuilder.ts -./libs/common/src/abstractions/fileDownload/fileDownload.service.ts -./libs/common/src/abstractions/fileDownload/fileDownloadRequest.ts -./libs/common/src/abstractions/formValidationErrors.service.ts ./libs/common/src/abstractions/vaultTimeout/vaultTimeoutSettings.service.ts ./libs/common/src/abstractions/vaultTimeout/vaultTimeout.service.ts -./libs/common/src/abstractions/cryptoFunction.service.ts ./libs/common/src/abstractions/anonymousHub.service.ts -./libs/common/src/abstractions/appId.service.ts -./libs/common/src/services/azureFileUpload.service.ts -./libs/common/src/services/stateMigration.service.ts -./libs/common/src/services/consoleLog.service.ts -./libs/common/src/services/formValidationErrors.service.ts ./libs/common/src/services/vaultTimeout/vaultTimeoutSettings.service.ts ./libs/common/src/services/vaultTimeout/vaultTimeout.service.ts ./libs/common/src/services/anonymousHub.service.ts -./libs/common/src/services/appId.service.ts -./libs/common/src/services/noopMessaging.service.ts -./libs/common/src/services/memoryStorage.service.ts -./libs/common/src/services/bitwardenFileUpload.service.ts -./libs/common/src/services/webCryptoFunction.service.ts -./libs/common/src/interfaces/IEncrypted.ts ./README.md ./LICENSE_BITWARDEN.txt ./CONTRIBUTING.md @@ -92,7 +70,6 @@ ./apps/browser/src/models/browserGroupingsComponentState.ts ./apps/browser/src/models/biometricErrors.ts ./apps/browser/src/browser/safariApp.ts -./apps/browser/src/browser/browserApi.ts ./apps/browser/src/safari/desktop/ViewController.swift ./apps/browser/src/safari/desktop/Assets.xcassets/AppIcon.appiconset/Contents.json ./apps/browser/src/safari/desktop/Assets.xcassets/AccentColor.colorset/Contents.json @@ -103,21 +80,5 @@ ./apps/browser/src/safari/safari/SafariWebExtensionHandler.swift ./apps/browser/src/safari/safari/Info.plist ./apps/browser/src/safari/desktop.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist -./apps/browser/src/listeners/onCommandListener.ts -./apps/browser/src/listeners/onInstallListener.ts -./apps/browser/src/services/browserFileDownloadService.ts -./apps/browser/src/services/localBackedSessionStorage.service.spec.ts -./apps/browser/src/services/browserMessagingPrivateModeBackground.service.ts -./apps/browser/src/services/browserPlatformUtils.service.spec.ts -./apps/browser/src/services/browserMemoryStorage.service.ts ./apps/browser/src/services/vaultTimeout/vaultTimeout.service.ts -./apps/browser/src/services/browserCrypto.service.ts -./apps/browser/src/services/browserPlatformUtils.service.ts -./apps/browser/src/services/abstractions/abstractKeyGeneration.service.ts -./apps/browser/src/services/browserLocalStorage.service.ts -./apps/browser/src/services/localBackedSessionStorage.service.ts -./apps/browser/src/services/browserMessagingPrivateModePopup.service.ts -./apps/browser/src/services/browserMessaging.service.ts -./apps/browser/src/services/keyGeneration.service.ts -./apps/browser/src/services/abstractChromeStorageApi.service.ts ./SECURITY.md diff --git a/.vscode/settings.json b/.vscode/settings.json index 48fd373db46..07423dd18ba 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "cSpell.words": ["Csprng", "Popout", "Reprompt", "takeuntil"] + "cSpell.words": ["Csprng", "decryptable", "Popout", "Reprompt", "takeuntil"] } diff --git a/apps/browser/src/admin-console/background/service-factories/collection-service.factory.ts b/apps/browser/src/admin-console/background/service-factories/collection-service.factory.ts index 0035eee8c42..dcf48537b37 100644 --- a/apps/browser/src/admin-console/background/service-factories/collection-service.factory.ts +++ b/apps/browser/src/admin-console/background/service-factories/collection-service.factory.ts @@ -4,20 +4,20 @@ import { CollectionService } from "@bitwarden/common/admin-console/services/coll import { cryptoServiceFactory, CryptoServiceInitOptions, -} from "../../../background/service_factories/crypto-service.factory"; +} from "../../../platform/background/service-factories/crypto-service.factory"; import { CachedServices, factory, FactoryOptions, -} from "../../../background/service_factories/factory-options"; +} from "../../../platform/background/service-factories/factory-options"; import { i18nServiceFactory, I18nServiceInitOptions, -} from "../../../background/service_factories/i18n-service.factory"; +} from "../../../platform/background/service-factories/i18n-service.factory"; import { stateServiceFactory as stateServiceFactory, StateServiceInitOptions, -} from "../../../background/service_factories/state-service.factory"; +} from "../../../platform/background/service-factories/state-service.factory"; type CollectionServiceFactoryOptions = FactoryOptions; diff --git a/apps/browser/src/admin-console/background/service-factories/organization-service.factory.ts b/apps/browser/src/admin-console/background/service-factories/organization-service.factory.ts index 454b1ce9cd2..a050dc22ecc 100644 --- a/apps/browser/src/admin-console/background/service-factories/organization-service.factory.ts +++ b/apps/browser/src/admin-console/background/service-factories/organization-service.factory.ts @@ -4,11 +4,11 @@ import { FactoryOptions, CachedServices, factory, -} from "../../../background/service_factories/factory-options"; +} from "../../../platform/background/service-factories/factory-options"; import { stateServiceFactory, StateServiceInitOptions, -} from "../../../background/service_factories/state-service.factory"; +} from "../../../platform/background/service-factories/state-service.factory"; import { BrowserOrganizationService } from "../../services/browser-organization.service"; type OrganizationServiceFactoryOptions = FactoryOptions; diff --git a/apps/browser/src/admin-console/background/service-factories/policy-service.factory.ts b/apps/browser/src/admin-console/background/service-factories/policy-service.factory.ts index 4bb19639c88..89f4a667f8d 100644 --- a/apps/browser/src/admin-console/background/service-factories/policy-service.factory.ts +++ b/apps/browser/src/admin-console/background/service-factories/policy-service.factory.ts @@ -4,11 +4,11 @@ import { CachedServices, factory, FactoryOptions, -} from "../../../background/service_factories/factory-options"; +} from "../../../platform/background/service-factories/factory-options"; import { stateServiceFactory as stateServiceFactory, StateServiceInitOptions, -} from "../../../background/service_factories/state-service.factory"; +} from "../../../platform/background/service-factories/state-service.factory"; import { BrowserPolicyService } from "../../services/browser-policy.service"; import { diff --git a/apps/browser/src/admin-console/services/browser-organization.service.ts b/apps/browser/src/admin-console/services/browser-organization.service.ts index 3b0ae245a64..6294756cdf7 100644 --- a/apps/browser/src/admin-console/services/browser-organization.service.ts +++ b/apps/browser/src/admin-console/services/browser-organization.service.ts @@ -3,7 +3,7 @@ import { BehaviorSubject } from "rxjs"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { OrganizationService } from "@bitwarden/common/admin-console/services/organization/organization.service"; -import { browserSession, sessionSync } from "../../decorators/session-sync-observable"; +import { browserSession, sessionSync } from "../../platform/decorators/session-sync-observable"; @browserSession export class BrowserOrganizationService extends OrganizationService { diff --git a/apps/browser/src/admin-console/services/browser-policy.service.ts b/apps/browser/src/admin-console/services/browser-policy.service.ts index e51c8dc5978..74aa0f546af 100644 --- a/apps/browser/src/admin-console/services/browser-policy.service.ts +++ b/apps/browser/src/admin-console/services/browser-policy.service.ts @@ -1,13 +1,13 @@ import { BehaviorSubject, filter, map, Observable, switchMap, tap } from "rxjs"; import { Jsonify } from "type-fest"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { Policy } from "@bitwarden/common/admin-console/models/domain/policy"; import { PolicyService } from "@bitwarden/common/admin-console/services/policy/policy.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; -import { browserSession, sessionSync } from "../../decorators/session-sync-observable"; +import { browserSession, sessionSync } from "../../platform/decorators/session-sync-observable"; @browserSession export class BrowserPolicyService extends PolicyService { diff --git a/apps/browser/src/auth/background/service-factories/auth-service.factory.ts b/apps/browser/src/auth/background/service-factories/auth-service.factory.ts index 251ceee0aa0..eefbf8e27fb 100644 --- a/apps/browser/src/auth/background/service-factories/auth-service.factory.ts +++ b/apps/browser/src/auth/background/service-factories/auth-service.factory.ts @@ -5,52 +5,52 @@ import { policyServiceFactory, PolicyServiceInitOptions, } from "../../../admin-console/background/service-factories/policy-service.factory"; +import { + passwordGenerationServiceFactory, + PasswordGenerationServiceInitOptions, +} from "../../../background/service-factories/password-generation-service.factory"; import { apiServiceFactory, ApiServiceInitOptions, -} from "../../../background/service_factories/api-service.factory"; -import { appIdServiceFactory } from "../../../background/service_factories/app-id-service.factory"; +} from "../../../platform/background/service-factories/api-service.factory"; +import { appIdServiceFactory } from "../../../platform/background/service-factories/app-id-service.factory"; import { - cryptoServiceFactory, CryptoServiceInitOptions, -} from "../../../background/service_factories/crypto-service.factory"; + cryptoServiceFactory, +} from "../../../platform/background/service-factories/crypto-service.factory"; import { - encryptServiceFactory, EncryptServiceInitOptions, -} from "../../../background/service_factories/encrypt-service.factory"; + encryptServiceFactory, +} from "../../../platform/background/service-factories/encrypt-service.factory"; import { environmentServiceFactory, EnvironmentServiceInitOptions, -} from "../../../background/service_factories/environment-service.factory"; +} from "../../../platform/background/service-factories/environment-service.factory"; import { CachedServices, factory, FactoryOptions, -} from "../../../background/service_factories/factory-options"; +} from "../../../platform/background/service-factories/factory-options"; import { i18nServiceFactory, I18nServiceInitOptions, -} from "../../../background/service_factories/i18n-service.factory"; +} from "../../../platform/background/service-factories/i18n-service.factory"; import { logServiceFactory, LogServiceInitOptions, -} from "../../../background/service_factories/log-service.factory"; +} from "../../../platform/background/service-factories/log-service.factory"; import { messagingServiceFactory, MessagingServiceInitOptions, -} from "../../../background/service_factories/messaging-service.factory"; -import { - passwordGenerationServiceFactory, - PasswordGenerationServiceInitOptions, -} from "../../../background/service_factories/password-generation-service.factory"; +} from "../../../platform/background/service-factories/messaging-service.factory"; import { platformUtilsServiceFactory, PlatformUtilsServiceInitOptions, -} from "../../../background/service_factories/platform-utils-service.factory"; +} from "../../../platform/background/service-factories/platform-utils-service.factory"; import { stateServiceFactory, StateServiceInitOptions, -} from "../../../background/service_factories/state-service.factory"; +} from "../../../platform/background/service-factories/state-service.factory"; import { keyConnectorServiceFactory, diff --git a/apps/browser/src/auth/background/service-factories/key-connector-service.factory.ts b/apps/browser/src/auth/background/service-factories/key-connector-service.factory.ts index 0689398f9c4..25eb85e5568 100644 --- a/apps/browser/src/auth/background/service-factories/key-connector-service.factory.ts +++ b/apps/browser/src/auth/background/service-factories/key-connector-service.factory.ts @@ -8,28 +8,28 @@ import { import { apiServiceFactory, ApiServiceInitOptions, -} from "../../../background/service_factories/api-service.factory"; +} from "../../../platform/background/service-factories/api-service.factory"; import { - cryptoFunctionServiceFactory, CryptoFunctionServiceInitOptions, -} from "../../../background/service_factories/crypto-function-service.factory"; + cryptoFunctionServiceFactory, +} from "../../../platform/background/service-factories/crypto-function-service.factory"; import { CryptoServiceInitOptions, cryptoServiceFactory, -} from "../../../background/service_factories/crypto-service.factory"; +} from "../../../platform/background/service-factories/crypto-service.factory"; import { FactoryOptions, CachedServices, factory, -} from "../../../background/service_factories/factory-options"; +} from "../../../platform/background/service-factories/factory-options"; import { logServiceFactory, LogServiceInitOptions, -} from "../../../background/service_factories/log-service.factory"; +} from "../../../platform/background/service-factories/log-service.factory"; import { stateServiceFactory, StateServiceInitOptions, -} from "../../../background/service_factories/state-service.factory"; +} from "../../../platform/background/service-factories/state-service.factory"; import { TokenServiceInitOptions, tokenServiceFactory } from "./token-service.factory"; diff --git a/apps/browser/src/auth/background/service-factories/token-service.factory.ts b/apps/browser/src/auth/background/service-factories/token-service.factory.ts index 00f09cbde11..389f8d1541a 100644 --- a/apps/browser/src/auth/background/service-factories/token-service.factory.ts +++ b/apps/browser/src/auth/background/service-factories/token-service.factory.ts @@ -5,11 +5,11 @@ import { FactoryOptions, CachedServices, factory, -} from "../../../background/service_factories/factory-options"; +} from "../../../platform/background/service-factories/factory-options"; import { stateServiceFactory, StateServiceInitOptions, -} from "../../../background/service_factories/state-service.factory"; +} from "../../../platform/background/service-factories/state-service.factory"; type TokenServiceFactoryOptions = FactoryOptions; diff --git a/apps/browser/src/auth/background/service-factories/totp-service.factory.ts b/apps/browser/src/auth/background/service-factories/totp-service.factory.ts index c6533bd0b4b..48331576cd3 100644 --- a/apps/browser/src/auth/background/service-factories/totp-service.factory.ts +++ b/apps/browser/src/auth/background/service-factories/totp-service.factory.ts @@ -4,16 +4,16 @@ import { TotpService } from "@bitwarden/common/services/totp.service"; import { CryptoFunctionServiceInitOptions, cryptoFunctionServiceFactory, -} from "../../../background/service_factories/crypto-function-service.factory"; +} from "../../../platform/background/service-factories/crypto-function-service.factory"; import { FactoryOptions, CachedServices, factory, -} from "../../../background/service_factories/factory-options"; +} from "../../../platform/background/service-factories/factory-options"; import { LogServiceInitOptions, logServiceFactory, -} from "../../../background/service_factories/log-service.factory"; +} from "../../../platform/background/service-factories/log-service.factory"; type TotpServiceOptions = FactoryOptions; diff --git a/apps/browser/src/auth/background/service-factories/two-factor-service.factory.ts b/apps/browser/src/auth/background/service-factories/two-factor-service.factory.ts index 8763a96d04e..040a5edfb4a 100644 --- a/apps/browser/src/auth/background/service-factories/two-factor-service.factory.ts +++ b/apps/browser/src/auth/background/service-factories/two-factor-service.factory.ts @@ -5,15 +5,15 @@ import { FactoryOptions, CachedServices, factory, -} from "../../../background/service_factories/factory-options"; +} from "../../../platform/background/service-factories/factory-options"; import { I18nServiceInitOptions, i18nServiceFactory, -} from "../../../background/service_factories/i18n-service.factory"; +} from "../../../platform/background/service-factories/i18n-service.factory"; import { PlatformUtilsServiceInitOptions, platformUtilsServiceFactory, -} from "../../../background/service_factories/platform-utils-service.factory"; +} from "../../../platform/background/service-factories/platform-utils-service.factory"; type TwoFactorServiceFactoryOptions = FactoryOptions; diff --git a/apps/browser/src/auth/popup/environment.component.ts b/apps/browser/src/auth/popup/environment.component.ts index 5ad42a600c7..c70b5f597c1 100644 --- a/apps/browser/src/auth/popup/environment.component.ts +++ b/apps/browser/src/auth/popup/environment.component.ts @@ -3,10 +3,10 @@ import { Router } from "@angular/router"; import { EnvironmentComponent as BaseEnvironmentComponent } from "@bitwarden/angular/components/environment.component"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; -import { BrowserEnvironmentService } from "../../services/browser-environment.service"; +import { BrowserEnvironmentService } from "../../platform/services/browser-environment.service"; @Component({ selector: "app-environment", diff --git a/apps/browser/src/auth/popup/hint.component.ts b/apps/browser/src/auth/popup/hint.component.ts index a0477bb27a0..a743dc7da24 100644 --- a/apps/browser/src/auth/popup/hint.component.ts +++ b/apps/browser/src/auth/popup/hint.component.ts @@ -3,10 +3,10 @@ import { ActivatedRoute, Router } from "@angular/router"; import { HintComponent as BaseHintComponent } from "@bitwarden/angular/auth/components/hint.component"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-hint", diff --git a/apps/browser/src/auth/popup/home.component.ts b/apps/browser/src/auth/popup/home.component.ts index 361218c6e4b..5dd3bdd641a 100644 --- a/apps/browser/src/auth/popup/home.component.ts +++ b/apps/browser/src/auth/popup/home.component.ts @@ -4,11 +4,11 @@ import { Router } from "@angular/router"; import { Subject, takeUntil } from "rxjs"; import { EnvironmentSelectorComponent } from "@bitwarden/angular/auth/components/environment-selector.component"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Component({ selector: "app-home", diff --git a/apps/browser/src/auth/popup/lock.component.ts b/apps/browser/src/auth/popup/lock.component.ts index ffcc6efa2cf..d95ff79fc8f 100644 --- a/apps/browser/src/auth/popup/lock.component.ts +++ b/apps/browser/src/auth/popup/lock.component.ts @@ -4,13 +4,6 @@ import { Router } from "@angular/router"; import { LockComponent as BaseLockComponent } from "@bitwarden/angular/auth/components/lock.component"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; @@ -18,6 +11,13 @@ import { InternalPolicyService } from "@bitwarden/common/admin-console/abstracti import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { BiometricErrors, BiometricErrorTypes } from "../../models/biometricErrors"; diff --git a/apps/browser/src/auth/popup/login-with-device.component.ts b/apps/browser/src/auth/popup/login-with-device.component.ts index dae6fd2d4da..cf0e57b5ee5 100644 --- a/apps/browser/src/auth/popup/login-with-device.component.ts +++ b/apps/browser/src/auth/popup/login-with-device.component.ts @@ -4,17 +4,17 @@ import { Router } from "@angular/router"; import { LoginWithDeviceComponent as BaseLoginWithDeviceComponent } from "@bitwarden/angular/auth/components/login-with-device.component"; import { AnonymousHubService } from "@bitwarden/common/abstractions/anonymousHub.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { AppIdService } from "@bitwarden/common/abstractions/appId.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; +import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; diff --git a/apps/browser/src/auth/popup/login.component.ts b/apps/browser/src/auth/popup/login.component.ts index 0652070a4da..496de2c54b5 100644 --- a/apps/browser/src/auth/popup/login.component.ts +++ b/apps/browser/src/auth/popup/login.component.ts @@ -3,22 +3,22 @@ import { FormBuilder } from "@angular/forms"; import { ActivatedRoute, Router } from "@angular/router"; import { LoginComponent as BaseLoginComponent } from "@bitwarden/angular/auth/components/login.component"; -import { AppIdService } from "@bitwarden/common/abstractions/appId.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; import { DevicesApiServiceAbstraction } from "@bitwarden/common/abstractions/devices/devices-api.service.abstraction"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { FormValidationErrorsService } from "@bitwarden/common/abstractions/formValidationErrors.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { FormValidationErrorsService } from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; -import { flagEnabled } from "../../flags"; +import { flagEnabled } from "../../platform/flags"; @Component({ selector: "app-login", diff --git a/apps/browser/src/auth/popup/register.component.ts b/apps/browser/src/auth/popup/register.component.ts index f7a80b62938..b061e1faf6a 100644 --- a/apps/browser/src/auth/popup/register.component.ts +++ b/apps/browser/src/auth/popup/register.component.ts @@ -6,14 +6,14 @@ import { RegisterComponent as BaseRegisterComponent } from "@bitwarden/angular/c import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { FormValidationErrorsService } from "@bitwarden/common/abstractions/formValidationErrors.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { FormValidationErrorsService } from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; @Component({ diff --git a/apps/browser/src/auth/popup/set-password.component.ts b/apps/browser/src/auth/popup/set-password.component.ts index 35af812714a..83ec3572737 100644 --- a/apps/browser/src/auth/popup/set-password.component.ts +++ b/apps/browser/src/auth/popup/set-password.component.ts @@ -4,15 +4,15 @@ import { ActivatedRoute, Router } from "@angular/router"; import { SetPasswordComponent as BaseSetPasswordComponent } from "@bitwarden/angular/components/set-password.component"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; diff --git a/apps/browser/src/auth/popup/sso.component.ts b/apps/browser/src/auth/popup/sso.component.ts index 3892704ca47..2214e91687a 100644 --- a/apps/browser/src/auth/popup/sso.component.ts +++ b/apps/browser/src/auth/popup/sso.component.ts @@ -3,19 +3,19 @@ import { ActivatedRoute, Router } from "@angular/router"; import { SsoComponent as BaseSsoComponent } from "@bitwarden/angular/auth/components/sso.component"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; -import { BrowserApi } from "../../browser/browserApi"; +import { BrowserApi } from "../../platform/browser/browser-api"; @Component({ selector: "app-sso", diff --git a/apps/browser/src/auth/popup/two-factor-options.component.ts b/apps/browser/src/auth/popup/two-factor-options.component.ts index b0aced9dd9d..a7e95a2a4ec 100644 --- a/apps/browser/src/auth/popup/two-factor-options.component.ts +++ b/apps/browser/src/auth/popup/two-factor-options.component.ts @@ -2,9 +2,9 @@ import { Component } from "@angular/core"; import { ActivatedRoute, Router } from "@angular/router"; import { TwoFactorOptionsComponent as BaseTwoFactorOptionsComponent } from "@bitwarden/angular/auth/components/two-factor-options.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { TwoFactorService } from "@bitwarden/common/auth/abstractions/two-factor.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-two-factor-options", diff --git a/apps/browser/src/auth/popup/two-factor.component.ts b/apps/browser/src/auth/popup/two-factor.component.ts index e6652e7ba32..21a2bd42f85 100644 --- a/apps/browser/src/auth/popup/two-factor.component.ts +++ b/apps/browser/src/auth/popup/two-factor.component.ts @@ -5,21 +5,21 @@ import { first } from "rxjs/operators"; import { TwoFactorComponent as BaseTwoFactorComponent } from "@bitwarden/angular/auth/components/two-factor.component"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { AppIdService } from "@bitwarden/common/abstractions/appId.service"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; import { TwoFactorService } from "@bitwarden/common/auth/abstractions/two-factor.service"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; +import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; -import { BrowserApi } from "../../browser/browserApi"; +import { BrowserApi } from "../../platform/browser/browser-api"; import { PopupUtilsService } from "../../popup/services/popup-utils.service"; const BroadcasterSubscriptionId = "TwoFactorComponent"; diff --git a/apps/browser/src/autofill/background/context-menus.background.ts b/apps/browser/src/autofill/background/context-menus.background.ts index 9d04571a7c4..681f86cdf67 100644 --- a/apps/browser/src/autofill/background/context-menus.background.ts +++ b/apps/browser/src/autofill/background/context-menus.background.ts @@ -1,5 +1,5 @@ import LockedVaultPendingNotificationsItem from "../../background/models/lockedVaultPendingNotificationsItem"; -import { BrowserApi } from "../../browser/browserApi"; +import { BrowserApi } from "../../platform/browser/browser-api"; import { ContextMenuClickedHandler } from "../browser/context-menu-clicked-handler"; export default class ContextMenusBackground { diff --git a/apps/browser/src/autofill/background/notification.background.ts b/apps/browser/src/autofill/background/notification.background.ts index b7cdfd97929..1f733f252c8 100644 --- a/apps/browser/src/autofill/background/notification.background.ts +++ b/apps/browser/src/autofill/background/notification.background.ts @@ -5,7 +5,7 @@ import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; import { ThemeType } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; @@ -17,8 +17,8 @@ import AddLoginRuntimeMessage from "../../background/models/addLoginRuntimeMessa import ChangePasswordRuntimeMessage from "../../background/models/changePasswordRuntimeMessage"; import LockedVaultPendingNotificationsItem from "../../background/models/lockedVaultPendingNotificationsItem"; import { NotificationQueueMessageType } from "../../background/models/notificationQueueMessageType"; -import { BrowserApi } from "../../browser/browserApi"; -import { BrowserStateService } from "../../services/abstractions/browser-state.service"; +import { BrowserApi } from "../../platform/browser/browser-api"; +import { BrowserStateService } from "../../platform/services/abstractions/browser-state.service"; import { AutofillService } from "../services/abstractions/autofill.service"; export default class NotificationBackground { diff --git a/apps/browser/src/autofill/background/service_factories/autofill-service.factory.ts b/apps/browser/src/autofill/background/service_factories/autofill-service.factory.ts index a23b5e8dbaf..a802fd8cf1c 100644 --- a/apps/browser/src/autofill/background/service_factories/autofill-service.factory.ts +++ b/apps/browser/src/autofill/background/service_factories/autofill-service.factory.ts @@ -5,24 +5,24 @@ import { import { EventCollectionServiceInitOptions, eventCollectionServiceFactory, -} from "../../../background/service_factories/event-collection-service.factory"; +} from "../../../background/service-factories/event-collection-service.factory"; +import { + settingsServiceFactory, + SettingsServiceInitOptions, +} from "../../../background/service-factories/settings-service.factory"; import { CachedServices, factory, FactoryOptions, -} from "../../../background/service_factories/factory-options"; +} from "../../../platform/background/service-factories/factory-options"; import { logServiceFactory, LogServiceInitOptions, -} from "../../../background/service_factories/log-service.factory"; -import { - settingsServiceFactory, - SettingsServiceInitOptions, -} from "../../../background/service_factories/settings-service.factory"; +} from "../../../platform/background/service-factories/log-service.factory"; import { stateServiceFactory, StateServiceInitOptions, -} from "../../../background/service_factories/state-service.factory"; +} from "../../../platform/background/service-factories/state-service.factory"; import { cipherServiceFactory, CipherServiceInitOptions, diff --git a/apps/browser/src/autofill/browser/cipher-context-menu-handler.ts b/apps/browser/src/autofill/browser/cipher-context-menu-handler.ts index 8803267685c..2eccc03c12b 100644 --- a/apps/browser/src/autofill/browser/cipher-context-menu-handler.ts +++ b/apps/browser/src/autofill/browser/cipher-context-menu-handler.ts @@ -1,8 +1,8 @@ import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { GlobalState } from "@bitwarden/common/models/domain/global-state"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { CipherRepromptType } from "@bitwarden/common/vault/enums/cipher-reprompt-type"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; @@ -12,9 +12,9 @@ import { authServiceFactory, AuthServiceInitOptions, } from "../../auth/background/service-factories/auth-service.factory"; -import { CachedServices } from "../../background/service_factories/factory-options"; -import { BrowserApi } from "../../browser/browserApi"; import { Account } from "../../models/account"; +import { CachedServices } from "../../platform/background/service-factories/factory-options"; +import { BrowserApi } from "../../platform/browser/browser-api"; import { cipherServiceFactory, CipherServiceInitOptions, diff --git a/apps/browser/src/autofill/browser/context-menu-clicked-handler.ts b/apps/browser/src/autofill/browser/context-menu-clicked-handler.ts index 4b75942e031..be7dee80a07 100644 --- a/apps/browser/src/autofill/browser/context-menu-clicked-handler.ts +++ b/apps/browser/src/autofill/browser/context-menu-clicked-handler.ts @@ -3,8 +3,8 @@ import { TotpService } from "@bitwarden/common/abstractions/totp.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; import { EventType } from "@bitwarden/common/enums"; -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; -import { GlobalState } from "@bitwarden/common/models/domain/global-state"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; +import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { CipherRepromptType } from "@bitwarden/common/vault/enums/cipher-reprompt-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; @@ -15,12 +15,12 @@ import { } from "../../auth/background/service-factories/auth-service.factory"; import { totpServiceFactory } from "../../auth/background/service-factories/totp-service.factory"; import LockedVaultPendingNotificationsItem from "../../background/models/lockedVaultPendingNotificationsItem"; -import { eventCollectionServiceFactory } from "../../background/service_factories/event-collection-service.factory"; -import { CachedServices } from "../../background/service_factories/factory-options"; -import { passwordGenerationServiceFactory } from "../../background/service_factories/password-generation-service.factory"; -import { stateServiceFactory } from "../../background/service_factories/state-service.factory"; -import { BrowserApi } from "../../browser/browserApi"; +import { eventCollectionServiceFactory } from "../../background/service-factories/event-collection-service.factory"; +import { passwordGenerationServiceFactory } from "../../background/service-factories/password-generation-service.factory"; import { Account } from "../../models/account"; +import { CachedServices } from "../../platform/background/service-factories/factory-options"; +import { stateServiceFactory } from "../../platform/background/service-factories/state-service.factory"; +import { BrowserApi } from "../../platform/browser/browser-api"; import { cipherServiceFactory, CipherServiceInitOptions, diff --git a/apps/browser/src/autofill/browser/main-context-menu-handler.spec.ts b/apps/browser/src/autofill/browser/main-context-menu-handler.spec.ts index 9d6a1db84a7..6b599986b67 100644 --- a/apps/browser/src/autofill/browser/main-context-menu-handler.spec.ts +++ b/apps/browser/src/autofill/browser/main-context-menu-handler.spec.ts @@ -1,12 +1,12 @@ import { mock, MockProxy } from "jest-mock-extended"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { Cipher } from "@bitwarden/common/vault/models/domain/cipher"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; -import { BrowserStateService } from "../../services/abstractions/browser-state.service"; +import { BrowserStateService } from "../../platform/services/abstractions/browser-state.service"; import { MainContextMenuHandler } from "./main-context-menu-handler"; diff --git a/apps/browser/src/autofill/browser/main-context-menu-handler.ts b/apps/browser/src/autofill/browser/main-context-menu-handler.ts index 14775c846f3..9b16aa266db 100644 --- a/apps/browser/src/autofill/browser/main-context-menu-handler.ts +++ b/apps/browser/src/autofill/browser/main-context-menu-handler.ts @@ -1,26 +1,26 @@ -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { GlobalState } from "@bitwarden/common/models/domain/global-state"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; -import { CachedServices } from "../../background/service_factories/factory-options"; +import { Account } from "../../models/account"; +import { CachedServices } from "../../platform/background/service-factories/factory-options"; import { i18nServiceFactory, I18nServiceInitOptions, -} from "../../background/service_factories/i18n-service.factory"; +} from "../../platform/background/service-factories/i18n-service.factory"; import { logServiceFactory, LogServiceInitOptions, -} from "../../background/service_factories/log-service.factory"; +} from "../../platform/background/service-factories/log-service.factory"; import { stateServiceFactory, StateServiceInitOptions, -} from "../../background/service_factories/state-service.factory"; -import { Account } from "../../models/account"; -import { BrowserStateService } from "../../services/abstractions/browser-state.service"; +} from "../../platform/background/service-factories/state-service.factory"; +import { BrowserStateService } from "../../platform/services/abstractions/browser-state.service"; export const ROOT_ID = "root"; diff --git a/apps/browser/src/autofill/clipboard/clear-clipboard.spec.ts b/apps/browser/src/autofill/clipboard/clear-clipboard.spec.ts index baced83894d..7bfe7934046 100644 --- a/apps/browser/src/autofill/clipboard/clear-clipboard.spec.ts +++ b/apps/browser/src/autofill/clipboard/clear-clipboard.spec.ts @@ -1,4 +1,4 @@ -import { BrowserApi } from "../../browser/browserApi"; +import { BrowserApi } from "../../platform/browser/browser-api"; import { ClearClipboard } from "./clear-clipboard"; diff --git a/apps/browser/src/autofill/clipboard/clear-clipboard.ts b/apps/browser/src/autofill/clipboard/clear-clipboard.ts index a96a72fc658..f8018bb036a 100644 --- a/apps/browser/src/autofill/clipboard/clear-clipboard.ts +++ b/apps/browser/src/autofill/clipboard/clear-clipboard.ts @@ -1,4 +1,4 @@ -import { BrowserApi } from "../../browser/browserApi"; +import { BrowserApi } from "../../platform/browser/browser-api"; export const clearClipboardAlarmName = "clearClipboard"; diff --git a/apps/browser/src/autofill/clipboard/copy-to-clipboard-command.ts b/apps/browser/src/autofill/clipboard/copy-to-clipboard-command.ts index 926b78b9762..92d35e70e57 100644 --- a/apps/browser/src/autofill/clipboard/copy-to-clipboard-command.ts +++ b/apps/browser/src/autofill/clipboard/copy-to-clipboard-command.ts @@ -1,4 +1,4 @@ -import { BrowserApi } from "../../browser/browserApi"; +import { BrowserApi } from "../../platform/browser/browser-api"; /** * Copies text to the clipboard in a MV3 safe way. diff --git a/apps/browser/src/autofill/clipboard/generate-password-to-clipboard-command.spec.ts b/apps/browser/src/autofill/clipboard/generate-password-to-clipboard-command.spec.ts index 38c62231ac8..3001087f74f 100644 --- a/apps/browser/src/autofill/clipboard/generate-password-to-clipboard-command.spec.ts +++ b/apps/browser/src/autofill/clipboard/generate-password-to-clipboard-command.spec.ts @@ -2,14 +2,14 @@ import { mock, MockProxy } from "jest-mock-extended"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; -import { setAlarmTime } from "../../alarms/alarm-state"; -import { BrowserApi } from "../../browser/browserApi"; -import { BrowserStateService } from "../../services/abstractions/browser-state.service"; +import { setAlarmTime } from "../../platform/alarms/alarm-state"; +import { BrowserApi } from "../../platform/browser/browser-api"; +import { BrowserStateService } from "../../platform/services/abstractions/browser-state.service"; import { clearClipboardAlarmName } from "./clear-clipboard"; import { GeneratePasswordToClipboardCommand } from "./generate-password-to-clipboard-command"; -jest.mock("../../alarms/alarm-state", () => { +jest.mock("../../platform/alarms/alarm-state", () => { return { setAlarmTime: jest.fn(), }; diff --git a/apps/browser/src/autofill/clipboard/generate-password-to-clipboard-command.ts b/apps/browser/src/autofill/clipboard/generate-password-to-clipboard-command.ts index 7dd37a64ad4..62110166658 100644 --- a/apps/browser/src/autofill/clipboard/generate-password-to-clipboard-command.ts +++ b/apps/browser/src/autofill/clipboard/generate-password-to-clipboard-command.ts @@ -1,7 +1,7 @@ import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; -import { setAlarmTime } from "../../alarms/alarm-state"; -import { BrowserStateService } from "../../services/abstractions/browser-state.service"; +import { setAlarmTime } from "../../platform/alarms/alarm-state"; +import { BrowserStateService } from "../../platform/services/abstractions/browser-state.service"; import { clearClipboardAlarmName } from "./clear-clipboard"; import { copyToClipboard } from "./copy-to-clipboard-command"; diff --git a/apps/browser/src/autofill/services/autofill.service.ts b/apps/browser/src/autofill/services/autofill.service.ts index 090acf35dc3..54e7a833b65 100644 --- a/apps/browser/src/autofill/services/autofill.service.ts +++ b/apps/browser/src/autofill/services/autofill.service.ts @@ -1,16 +1,16 @@ import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { SettingsService } from "@bitwarden/common/abstractions/settings.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; import { EventType, FieldType, UriMatchType } from "@bitwarden/common/enums"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { CipherRepromptType } from "@bitwarden/common/vault/enums/cipher-reprompt-type"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { FieldView } from "@bitwarden/common/vault/models/view/field.view"; -import { BrowserApi } from "../../browser/browserApi"; -import { BrowserStateService } from "../../services/abstractions/browser-state.service"; +import { BrowserApi } from "../../platform/browser/browser-api"; +import { BrowserStateService } from "../../platform/services/abstractions/browser-state.service"; import AutofillField from "../models/autofill-field"; import AutofillPageDetails from "../models/autofill-page-details"; import AutofillScript from "../models/autofill-script"; diff --git a/apps/browser/src/background/commands.background.ts b/apps/browser/src/background/commands.background.ts index b53c809c357..118953b9da0 100644 --- a/apps/browser/src/background/commands.background.ts +++ b/apps/browser/src/background/commands.background.ts @@ -1,10 +1,10 @@ -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; -import { BrowserApi } from "../browser/browserApi"; +import { BrowserApi } from "../platform/browser/browser-api"; import MainBackground from "./main.background"; import LockedVaultPendingNotificationsItem from "./models/lockedVaultPendingNotificationsItem"; diff --git a/apps/browser/src/background/idle.background.ts b/apps/browser/src/background/idle.background.ts index 0037340f03d..3854d2383b4 100644 --- a/apps/browser/src/background/idle.background.ts +++ b/apps/browser/src/background/idle.background.ts @@ -2,7 +2,7 @@ import { NotificationsService } from "@bitwarden/common/abstractions/notificatio import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; import { VaultTimeoutAction } from "@bitwarden/common/enums/vault-timeout-action.enum"; -import { BrowserStateService } from "../services/abstractions/browser-state.service"; +import { BrowserStateService } from "../platform/services/abstractions/browser-state.service"; const IdleInterval = 60 * 5; // 5 minutes diff --git a/apps/browser/src/background/main.background.ts b/apps/browser/src/background/main.background.ts index d47a6ae7c93..1304f82de52 100644 --- a/apps/browser/src/background/main.background.ts +++ b/apps/browser/src/background/main.background.ts @@ -1,27 +1,11 @@ import { AvatarUpdateService as AvatarUpdateServiceAbstraction } from "@bitwarden/common/abstractions/account/avatar-update.service"; import { ApiService as ApiServiceAbstraction } from "@bitwarden/common/abstractions/api.service"; -import { AppIdService as AppIdServiceAbstraction } from "@bitwarden/common/abstractions/appId.service"; import { AuditService as AuditServiceAbstraction } from "@bitwarden/common/abstractions/audit.service"; -import { ConfigApiServiceAbstraction } from "@bitwarden/common/abstractions/config/config-api.service.abstraction"; -import { ConfigServiceAbstraction } from "@bitwarden/common/abstractions/config/config.service.abstraction"; -import { CryptoService as CryptoServiceAbstraction } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { EncryptService } from "@bitwarden/common/abstractions/encrypt.service"; import { EventCollectionService as EventCollectionServiceAbstraction } from "@bitwarden/common/abstractions/event/event-collection.service"; import { EventUploadService as EventUploadServiceAbstraction } from "@bitwarden/common/abstractions/event/event-upload.service"; -import { FileUploadService as FileUploadServiceAbstraction } from "@bitwarden/common/abstractions/file-upload/file-upload.service"; -import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService as LogServiceAbstraction } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService as MessagingServiceAbstraction } from "@bitwarden/common/abstractions/messaging.service"; import { NotificationsService as NotificationsServiceAbstraction } from "@bitwarden/common/abstractions/notifications.service"; -import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService as SearchServiceAbstraction } from "@bitwarden/common/abstractions/search.service"; import { SettingsService as SettingsServiceAbstraction } from "@bitwarden/common/abstractions/settings.service"; -import { - AbstractMemoryStorageService, - AbstractStorageService, -} from "@bitwarden/common/abstractions/storage.service"; -import { SystemService as SystemServiceAbstraction } from "@bitwarden/common/abstractions/system.service"; import { TotpService as TotpServiceAbstraction } from "@bitwarden/common/abstractions/totp.service"; import { UserVerificationApiServiceAbstraction } from "@bitwarden/common/abstractions/userVerification/userVerification-api.service.abstraction"; import { UserVerificationService as UserVerificationServiceAbstraction } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; @@ -45,28 +29,44 @@ import { TokenService } from "@bitwarden/common/auth/services/token.service"; import { TwoFactorService } from "@bitwarden/common/auth/services/two-factor.service"; import { UserVerificationApiService } from "@bitwarden/common/auth/services/user-verification/user-verification-api.service"; import { UserVerificationService } from "@bitwarden/common/auth/services/user-verification/user-verification.service"; -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; -import { GlobalState } from "@bitwarden/common/models/domain/global-state"; +import { AppIdService as AppIdServiceAbstraction } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { ConfigApiServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config-api.service.abstraction"; +import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction"; +import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService as CryptoServiceAbstraction } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EncryptService } from "@bitwarden/common/platform/abstractions/encrypt.service"; +import { FileUploadService as FileUploadServiceAbstraction } from "@bitwarden/common/platform/abstractions/file-upload/file-upload.service"; +import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService as LogServiceAbstraction } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService as MessagingServiceAbstraction } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { + AbstractMemoryStorageService, + AbstractStorageService, +} from "@bitwarden/common/platform/abstractions/storage.service"; +import { SystemService as SystemServiceAbstraction } from "@bitwarden/common/platform/abstractions/system.service"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; +import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state"; +import { AppIdService } from "@bitwarden/common/platform/services/app-id.service"; +import { ConfigService } from "@bitwarden/common/platform/services/config/config.service"; +import { ConsoleLogService } from "@bitwarden/common/platform/services/console-log.service"; +import { ContainerService } from "@bitwarden/common/platform/services/container.service"; +import { EncryptServiceImplementation } from "@bitwarden/common/platform/services/cryptography/encrypt.service.implementation"; +import { MultithreadEncryptServiceImplementation } from "@bitwarden/common/platform/services/cryptography/multithread-encrypt.service.implementation"; +import { FileUploadService } from "@bitwarden/common/platform/services/file-upload/file-upload.service"; +import { MemoryStorageService } from "@bitwarden/common/platform/services/memory-storage.service"; +import { StateMigrationService } from "@bitwarden/common/platform/services/state-migration.service"; +import { SystemService } from "@bitwarden/common/platform/services/system.service"; +import { WebCryptoFunctionService } from "@bitwarden/common/platform/services/web-crypto-function.service"; import { AvatarUpdateService } from "@bitwarden/common/services/account/avatar-update.service"; import { ApiService } from "@bitwarden/common/services/api.service"; -import { AppIdService } from "@bitwarden/common/services/appId.service"; import { AuditService } from "@bitwarden/common/services/audit.service"; -import { ConfigService } from "@bitwarden/common/services/config/config.service"; -import { ConsoleLogService } from "@bitwarden/common/services/consoleLog.service"; -import { ContainerService } from "@bitwarden/common/services/container.service"; -import { EncryptServiceImplementation } from "@bitwarden/common/services/cryptography/encrypt.service.implementation"; -import { MultithreadEncryptServiceImplementation } from "@bitwarden/common/services/cryptography/multithread-encrypt.service.implementation"; import { EventCollectionService } from "@bitwarden/common/services/event/event-collection.service"; import { EventUploadService } from "@bitwarden/common/services/event/event-upload.service"; -import { FileUploadService } from "@bitwarden/common/services/file-upload/file-upload.service"; -import { MemoryStorageService } from "@bitwarden/common/services/memoryStorage.service"; import { NotificationsService } from "@bitwarden/common/services/notifications.service"; import { SearchService } from "@bitwarden/common/services/search.service"; -import { StateMigrationService } from "@bitwarden/common/services/stateMigration.service"; -import { SystemService } from "@bitwarden/common/services/system.service"; import { TotpService } from "@bitwarden/common/services/totp.service"; import { VaultTimeoutSettingsService } from "@bitwarden/common/services/vaultTimeout/vaultTimeoutSettings.service"; -import { WebCryptoFunctionService } from "@bitwarden/common/services/webCryptoFunction.service"; import { PasswordGenerationService, PasswordGenerationServiceAbstraction, @@ -105,24 +105,24 @@ import { ContextMenuClickedHandler } from "../autofill/browser/context-menu-clic import { MainContextMenuHandler } from "../autofill/browser/main-context-menu-handler"; import { AutofillService as AutofillServiceAbstraction } from "../autofill/services/abstractions/autofill.service"; import AutofillService from "../autofill/services/autofill.service"; -import { BrowserApi } from "../browser/browserApi"; import { SafariApp } from "../browser/safariApp"; -import { flagEnabled } from "../flags"; -import { UpdateBadge } from "../listeners/update-badge"; import { Account } from "../models/account"; -import { BrowserStateService as StateServiceAbstraction } from "../services/abstractions/browser-state.service"; -import { BrowserEnvironmentService } from "../services/browser-environment.service"; -import { BrowserI18nService } from "../services/browser-i18n.service"; +import { BrowserApi } from "../platform/browser/browser-api"; +import { flagEnabled } from "../platform/flags"; +import { UpdateBadge } from "../platform/listeners/update-badge"; +import { BrowserStateService as StateServiceAbstraction } from "../platform/services/abstractions/browser-state.service"; +import { BrowserCryptoService } from "../platform/services/browser-crypto.service"; +import { BrowserEnvironmentService } from "../platform/services/browser-environment.service"; +import { BrowserI18nService } from "../platform/services/browser-i18n.service"; +import BrowserLocalStorageService from "../platform/services/browser-local-storage.service"; +import BrowserMessagingPrivateModeBackgroundService from "../platform/services/browser-messaging-private-mode-background.service"; +import BrowserMessagingService from "../platform/services/browser-messaging.service"; +import BrowserPlatformUtilsService from "../platform/services/browser-platform-utils.service"; +import { BrowserStateService } from "../platform/services/browser-state.service"; +import { KeyGenerationService } from "../platform/services/key-generation.service"; +import { LocalBackedSessionStorageService } from "../platform/services/local-backed-session-storage.service"; import { BrowserSendService } from "../services/browser-send.service"; import { BrowserSettingsService } from "../services/browser-settings.service"; -import { BrowserStateService } from "../services/browser-state.service"; -import { BrowserCryptoService } from "../services/browserCrypto.service"; -import BrowserLocalStorageService from "../services/browserLocalStorage.service"; -import BrowserMessagingService from "../services/browserMessaging.service"; -import BrowserMessagingPrivateModeBackgroundService from "../services/browserMessagingPrivateModeBackground.service"; -import BrowserPlatformUtilsService from "../services/browserPlatformUtils.service"; -import { KeyGenerationService } from "../services/keyGeneration.service"; -import { LocalBackedSessionStorageService } from "../services/localBackedSessionStorage.service"; import VaultTimeoutService from "../services/vaultTimeout/vaultTimeout.service"; import { BrowserFolderService } from "../vault/services/browser-folder.service"; import { VaultFilterService } from "../vault/services/vault-filter.service"; diff --git a/apps/browser/src/background/models/addLoginQueueMessage.ts b/apps/browser/src/background/models/addLoginQueueMessage.ts index 7409100902a..d5db5db135b 100644 --- a/apps/browser/src/background/models/addLoginQueueMessage.ts +++ b/apps/browser/src/background/models/addLoginQueueMessage.ts @@ -1,4 +1,4 @@ -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { LoginUriView } from "@bitwarden/common/vault/models/view/login-uri.view"; diff --git a/apps/browser/src/background/nativeMessaging.background.ts b/apps/browser/src/background/nativeMessaging.background.ts index 7e4b91694c9..90c114a8650 100644 --- a/apps/browser/src/background/nativeMessaging.background.ts +++ b/apps/browser/src/background/nativeMessaging.background.ts @@ -1,18 +1,18 @@ -import { AppIdService } from "@bitwarden/common/abstractions/appId.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; -import { BrowserApi } from "../browser/browserApi"; +import { BrowserApi } from "../platform/browser/browser-api"; import RuntimeBackground from "./runtime.background"; diff --git a/apps/browser/src/background/runtime.background.ts b/apps/browser/src/background/runtime.background.ts index 7a6f293f8d1..a06ba43eff4 100644 --- a/apps/browser/src/background/runtime.background.ts +++ b/apps/browser/src/background/runtime.background.ts @@ -1,15 +1,15 @@ -import { ConfigServiceAbstraction } from "@bitwarden/common/abstractions/config/config.service.abstraction"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { NotificationsService } from "@bitwarden/common/abstractions/notifications.service"; -import { SystemService } from "@bitwarden/common/abstractions/system.service"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { SystemService } from "@bitwarden/common/platform/abstractions/system.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { AutofillService } from "../autofill/services/abstractions/autofill.service"; -import { BrowserApi } from "../browser/browserApi"; -import { BrowserEnvironmentService } from "../services/browser-environment.service"; -import BrowserPlatformUtilsService from "../services/browserPlatformUtils.service"; +import { BrowserApi } from "../platform/browser/browser-api"; +import { BrowserEnvironmentService } from "../platform/services/browser-environment.service"; +import BrowserPlatformUtilsService from "../platform/services/browser-platform-utils.service"; import MainBackground from "./main.background"; import LockedVaultPendingNotificationsItem from "./models/lockedVaultPendingNotificationsItem"; diff --git a/apps/browser/src/background/service_factories/cipher-file-upload-service.factory.ts b/apps/browser/src/background/service-factories/cipher-file-upload-service.factory.ts similarity index 76% rename from apps/browser/src/background/service_factories/cipher-file-upload-service.factory.ts rename to apps/browser/src/background/service-factories/cipher-file-upload-service.factory.ts index ef2be8fa761..7c83958927f 100644 --- a/apps/browser/src/background/service_factories/cipher-file-upload-service.factory.ts +++ b/apps/browser/src/background/service-factories/cipher-file-upload-service.factory.ts @@ -1,12 +1,19 @@ import { CipherFileUploadService as CipherFileUploadServiceAbstraction } from "@bitwarden/common/vault/abstractions/file-upload/cipher-file-upload.service"; import { CipherFileUploadService } from "@bitwarden/common/vault/services/file-upload/cipher-file-upload.service"; -import { apiServiceFactory, ApiServiceInitOptions } from "./api-service.factory"; -import { FactoryOptions, CachedServices, factory } from "./factory-options"; import { - fileUploadServiceFactory, + ApiServiceInitOptions, + apiServiceFactory, +} from "../../platform/background/service-factories/api-service.factory"; +import { + FactoryOptions, + CachedServices, + factory, +} from "../../platform/background/service-factories/factory-options"; +import { FileUploadServiceInitOptions, -} from "./file-upload-service.factory"; + fileUploadServiceFactory, +} from "../../platform/background/service-factories/file-upload-service.factory"; type CipherFileUploadServiceFactoyOptions = FactoryOptions; diff --git a/apps/browser/src/background/service_factories/cipher-file-upload.service.factory.ts b/apps/browser/src/background/service-factories/cipher-file-upload.service.factory.ts similarity index 76% rename from apps/browser/src/background/service_factories/cipher-file-upload.service.factory.ts rename to apps/browser/src/background/service-factories/cipher-file-upload.service.factory.ts index ef2be8fa761..7c83958927f 100644 --- a/apps/browser/src/background/service_factories/cipher-file-upload.service.factory.ts +++ b/apps/browser/src/background/service-factories/cipher-file-upload.service.factory.ts @@ -1,12 +1,19 @@ import { CipherFileUploadService as CipherFileUploadServiceAbstraction } from "@bitwarden/common/vault/abstractions/file-upload/cipher-file-upload.service"; import { CipherFileUploadService } from "@bitwarden/common/vault/services/file-upload/cipher-file-upload.service"; -import { apiServiceFactory, ApiServiceInitOptions } from "./api-service.factory"; -import { FactoryOptions, CachedServices, factory } from "./factory-options"; import { - fileUploadServiceFactory, + ApiServiceInitOptions, + apiServiceFactory, +} from "../../platform/background/service-factories/api-service.factory"; +import { + FactoryOptions, + CachedServices, + factory, +} from "../../platform/background/service-factories/factory-options"; +import { FileUploadServiceInitOptions, -} from "./file-upload-service.factory"; + fileUploadServiceFactory, +} from "../../platform/background/service-factories/file-upload-service.factory"; type CipherFileUploadServiceFactoyOptions = FactoryOptions; diff --git a/apps/browser/src/background/service_factories/event-collection-service.factory.ts b/apps/browser/src/background/service-factories/event-collection-service.factory.ts similarity index 84% rename from apps/browser/src/background/service_factories/event-collection-service.factory.ts rename to apps/browser/src/background/service-factories/event-collection-service.factory.ts index 4008091c222..5ed6c24ca4b 100644 --- a/apps/browser/src/background/service_factories/event-collection-service.factory.ts +++ b/apps/browser/src/background/service-factories/event-collection-service.factory.ts @@ -5,6 +5,15 @@ import { organizationServiceFactory, OrganizationServiceInitOptions, } from "../../admin-console/background/service-factories/organization-service.factory"; +import { + FactoryOptions, + CachedServices, + factory, +} from "../../platform/background/service-factories/factory-options"; +import { + stateServiceFactory, + StateServiceInitOptions, +} from "../../platform/background/service-factories/state-service.factory"; import { cipherServiceFactory, CipherServiceInitOptions, @@ -14,8 +23,6 @@ import { eventUploadServiceFactory, EventUploadServiceInitOptions, } from "./event-upload-service.factory"; -import { FactoryOptions, CachedServices, factory } from "./factory-options"; -import { stateServiceFactory, StateServiceInitOptions } from "./state-service.factory"; type EventCollectionServiceOptions = FactoryOptions; diff --git a/apps/browser/src/background/service_factories/event-upload-service.factory.ts b/apps/browser/src/background/service-factories/event-upload-service.factory.ts similarity index 63% rename from apps/browser/src/background/service_factories/event-upload-service.factory.ts rename to apps/browser/src/background/service-factories/event-upload-service.factory.ts index c0ed0e5426d..f9e72395a74 100644 --- a/apps/browser/src/background/service_factories/event-upload-service.factory.ts +++ b/apps/browser/src/background/service-factories/event-upload-service.factory.ts @@ -1,10 +1,23 @@ import { EventUploadService as AbstractEventUploadService } from "@bitwarden/common/abstractions/event/event-upload.service"; import { EventUploadService } from "@bitwarden/common/services/event/event-upload.service"; -import { apiServiceFactory, ApiServiceInitOptions } from "./api-service.factory"; -import { FactoryOptions, CachedServices, factory } from "./factory-options"; -import { logServiceFactory, LogServiceInitOptions } from "./log-service.factory"; -import { stateServiceFactory, StateServiceInitOptions } from "./state-service.factory"; +import { + ApiServiceInitOptions, + apiServiceFactory, +} from "../../platform/background/service-factories/api-service.factory"; +import { + FactoryOptions, + CachedServices, + factory, +} from "../../platform/background/service-factories/factory-options"; +import { + logServiceFactory, + LogServiceInitOptions, +} from "../../platform/background/service-factories/log-service.factory"; +import { + stateServiceFactory, + StateServiceInitOptions, +} from "../../platform/background/service-factories/state-service.factory"; type EventUploadServiceOptions = FactoryOptions; diff --git a/apps/browser/src/background/service_factories/password-generation-service.factory.ts b/apps/browser/src/background/service-factories/password-generation-service.factory.ts similarity index 72% rename from apps/browser/src/background/service_factories/password-generation-service.factory.ts rename to apps/browser/src/background/service-factories/password-generation-service.factory.ts index cffbf376d4f..d97e8ce98a6 100644 --- a/apps/browser/src/background/service_factories/password-generation-service.factory.ts +++ b/apps/browser/src/background/service-factories/password-generation-service.factory.ts @@ -7,10 +7,19 @@ import { policyServiceFactory, PolicyServiceInitOptions, } from "../../admin-console/background/service-factories/policy-service.factory"; - -import { cryptoServiceFactory, CryptoServiceInitOptions } from "./crypto-service.factory"; -import { CachedServices, factory, FactoryOptions } from "./factory-options"; -import { stateServiceFactory, StateServiceInitOptions } from "./state-service.factory"; +import { + CryptoServiceInitOptions, + cryptoServiceFactory, +} from "../../platform/background/service-factories/crypto-service.factory"; +import { + CachedServices, + factory, + FactoryOptions, +} from "../../platform/background/service-factories/factory-options"; +import { + stateServiceFactory, + StateServiceInitOptions, +} from "../../platform/background/service-factories/state-service.factory"; type PasswordGenerationServiceFactoryOptions = FactoryOptions; diff --git a/apps/browser/src/background/service_factories/search-service.factory.ts b/apps/browser/src/background/service-factories/search-service.factory.ts similarity index 64% rename from apps/browser/src/background/service_factories/search-service.factory.ts rename to apps/browser/src/background/service-factories/search-service.factory.ts index eb6213c2b39..6ff9691c524 100644 --- a/apps/browser/src/background/service_factories/search-service.factory.ts +++ b/apps/browser/src/background/service-factories/search-service.factory.ts @@ -1,9 +1,19 @@ import { SearchService as AbstractSearchService } from "@bitwarden/common/abstractions/search.service"; import { SearchService } from "@bitwarden/common/services/search.service"; -import { CachedServices, factory, FactoryOptions } from "./factory-options"; -import { i18nServiceFactory, I18nServiceInitOptions } from "./i18n-service.factory"; -import { logServiceFactory, LogServiceInitOptions } from "./log-service.factory"; +import { + CachedServices, + factory, + FactoryOptions, +} from "../../platform/background/service-factories/factory-options"; +import { + i18nServiceFactory, + I18nServiceInitOptions, +} from "../../platform/background/service-factories/i18n-service.factory"; +import { + logServiceFactory, + LogServiceInitOptions, +} from "../../platform/background/service-factories/log-service.factory"; type SearchServiceFactoryOptions = FactoryOptions; diff --git a/apps/browser/src/background/service_factories/send-service.factory.ts b/apps/browser/src/background/service-factories/send-service.factory.ts similarity index 56% rename from apps/browser/src/background/service_factories/send-service.factory.ts rename to apps/browser/src/background/service-factories/send-service.factory.ts index 2da4d88a1d8..bc0f83787fd 100644 --- a/apps/browser/src/background/service_factories/send-service.factory.ts +++ b/apps/browser/src/background/service-factories/send-service.factory.ts @@ -1,13 +1,25 @@ import { InternalSendService } from "@bitwarden/common/tools/send/services/send.service.abstraction"; +import { cryptoFunctionServiceFactory } from "../../platform/background/service-factories/crypto-function-service.factory"; +import { + CryptoServiceInitOptions, + cryptoServiceFactory, +} from "../../platform/background/service-factories/crypto-service.factory"; +import { + FactoryOptions, + CachedServices, + factory, +} from "../../platform/background/service-factories/factory-options"; +import { + i18nServiceFactory, + I18nServiceInitOptions, +} from "../../platform/background/service-factories/i18n-service.factory"; +import { + stateServiceFactory, + StateServiceInitOptions, +} from "../../platform/background/service-factories/state-service.factory"; import { BrowserSendService } from "../../services/browser-send.service"; -import { cryptoFunctionServiceFactory } from "./crypto-function-service.factory"; -import { cryptoServiceFactory, CryptoServiceInitOptions } from "./crypto-service.factory"; -import { FactoryOptions, CachedServices, factory } from "./factory-options"; -import { i18nServiceFactory, I18nServiceInitOptions } from "./i18n-service.factory"; -import { stateServiceFactory, StateServiceInitOptions } from "./state-service.factory"; - type SendServiceFactoryOptions = FactoryOptions; export type SendServiceInitOptions = SendServiceFactoryOptions & diff --git a/apps/browser/src/background/service_factories/settings-service.factory.ts b/apps/browser/src/background/service-factories/settings-service.factory.ts similarity index 72% rename from apps/browser/src/background/service_factories/settings-service.factory.ts rename to apps/browser/src/background/service-factories/settings-service.factory.ts index 73e0ae52032..17e22a6678d 100644 --- a/apps/browser/src/background/service_factories/settings-service.factory.ts +++ b/apps/browser/src/background/service-factories/settings-service.factory.ts @@ -1,10 +1,16 @@ import { SettingsService as AbstractSettingsService } from "@bitwarden/common/abstractions/settings.service"; +import { + FactoryOptions, + CachedServices, + factory, +} from "../../platform/background/service-factories/factory-options"; +import { + stateServiceFactory, + StateServiceInitOptions, +} from "../../platform/background/service-factories/state-service.factory"; import { BrowserSettingsService } from "../../services/browser-settings.service"; -import { FactoryOptions, CachedServices, factory } from "./factory-options"; -import { stateServiceFactory, StateServiceInitOptions } from "./state-service.factory"; - type SettingsServiceFactoryOptions = FactoryOptions; export type SettingsServiceInitOptions = SettingsServiceFactoryOptions & StateServiceInitOptions; diff --git a/apps/browser/src/background/service_factories/vault-timeout-service.factory.ts b/apps/browser/src/background/service-factories/vault-timeout-service.factory.ts similarity index 83% rename from apps/browser/src/background/service_factories/vault-timeout-service.factory.ts rename to apps/browser/src/background/service-factories/vault-timeout-service.factory.ts index b69d8d1d65f..f3f97803d1e 100644 --- a/apps/browser/src/background/service_factories/vault-timeout-service.factory.ts +++ b/apps/browser/src/background/service-factories/vault-timeout-service.factory.ts @@ -12,6 +12,27 @@ import { keyConnectorServiceFactory, KeyConnectorServiceInitOptions, } from "../../auth/background/service-factories/key-connector-service.factory"; +import { + CryptoServiceInitOptions, + cryptoServiceFactory, +} from "../../platform/background/service-factories/crypto-service.factory"; +import { + CachedServices, + factory, + FactoryOptions, +} from "../../platform/background/service-factories/factory-options"; +import { + messagingServiceFactory, + MessagingServiceInitOptions, +} from "../../platform/background/service-factories/messaging-service.factory"; +import { + platformUtilsServiceFactory, + PlatformUtilsServiceInitOptions, +} from "../../platform/background/service-factories/platform-utils-service.factory"; +import { + StateServiceInitOptions, + stateServiceFactory, +} from "../../platform/background/service-factories/state-service.factory"; import VaultTimeoutService from "../../services/vaultTimeout/vaultTimeout.service"; import { cipherServiceFactory, @@ -22,18 +43,7 @@ import { FolderServiceInitOptions, } from "../../vault/background/service_factories/folder-service.factory"; -import { cryptoServiceFactory, CryptoServiceInitOptions } from "./crypto-service.factory"; -import { CachedServices, factory, FactoryOptions } from "./factory-options"; -import { messagingServiceFactory, MessagingServiceInitOptions } from "./messaging-service.factory"; -import { - platformUtilsServiceFactory, - PlatformUtilsServiceInitOptions, -} from "./platform-utils-service.factory"; import { searchServiceFactory, SearchServiceInitOptions } from "./search-service.factory"; -import { - stateServiceFactory as stateServiceFactory, - StateServiceInitOptions, -} from "./state-service.factory"; import { vaultTimeoutSettingsServiceFactory, VaultTimeoutSettingsServiceInitOptions, diff --git a/apps/browser/src/background/service_factories/vault-timeout-settings-service.factory.ts b/apps/browser/src/background/service-factories/vault-timeout-settings-service.factory.ts similarity index 79% rename from apps/browser/src/background/service_factories/vault-timeout-settings-service.factory.ts rename to apps/browser/src/background/service-factories/vault-timeout-settings-service.factory.ts index d349771f428..724993127b7 100644 --- a/apps/browser/src/background/service_factories/vault-timeout-settings-service.factory.ts +++ b/apps/browser/src/background/service-factories/vault-timeout-settings-service.factory.ts @@ -9,13 +9,19 @@ import { tokenServiceFactory, TokenServiceInitOptions, } from "../../auth/background/service-factories/token-service.factory"; - -import { cryptoServiceFactory, CryptoServiceInitOptions } from "./crypto-service.factory"; -import { CachedServices, factory, FactoryOptions } from "./factory-options"; import { - stateServiceFactory as stateServiceFactory, + CryptoServiceInitOptions, + cryptoServiceFactory, +} from "../../platform/background/service-factories/crypto-service.factory"; +import { + CachedServices, + factory, + FactoryOptions, +} from "../../platform/background/service-factories/factory-options"; +import { StateServiceInitOptions, -} from "./state-service.factory"; + stateServiceFactory, +} from "../../platform/background/service-factories/state-service.factory"; type VaultTimeoutSettingsServiceFactoryOptions = FactoryOptions; diff --git a/apps/browser/src/background/webRequest.background.ts b/apps/browser/src/background/webRequest.background.ts index ca8ed05ea3e..6dd50c23e26 100644 --- a/apps/browser/src/background/webRequest.background.ts +++ b/apps/browser/src/background/webRequest.background.ts @@ -1,10 +1,10 @@ -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; import { UriMatchType } from "@bitwarden/common/enums"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; -import { BrowserApi } from "../browser/browserApi"; +import { BrowserApi } from "../platform/browser/browser-api"; export default class WebRequestBackground { private pendingAuthRequests: any[] = []; diff --git a/apps/browser/src/browser/safariApp.ts b/apps/browser/src/browser/safariApp.ts index 7a86295df67..683c9ef08a0 100644 --- a/apps/browser/src/browser/safariApp.ts +++ b/apps/browser/src/browser/safariApp.ts @@ -1,4 +1,4 @@ -import { BrowserApi } from "./browserApi"; +import { BrowserApi } from "../platform/browser/browser-api"; export class SafariApp { static sendMessageToApp(command: string, data: any = null, resolveNow = false): Promise { diff --git a/apps/browser/src/models/account.ts b/apps/browser/src/models/account.ts index cfbcbecf979..57d7844fde6 100644 --- a/apps/browser/src/models/account.ts +++ b/apps/browser/src/models/account.ts @@ -3,7 +3,7 @@ import { Jsonify } from "type-fest"; import { Account as BaseAccount, AccountSettings as BaseAccountSettings, -} from "@bitwarden/common/models/domain/account"; +} from "@bitwarden/common/platform/models/domain/account"; import { BrowserComponentState } from "./browserComponentState"; import { BrowserGroupingsComponentState } from "./browserGroupingsComponentState"; diff --git a/apps/browser/src/models/browserGroupingsComponentState.ts b/apps/browser/src/models/browserGroupingsComponentState.ts index 32375463701..f47a9ff6ac6 100644 --- a/apps/browser/src/models/browserGroupingsComponentState.ts +++ b/apps/browser/src/models/browserGroupingsComponentState.ts @@ -1,5 +1,5 @@ import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { DeepJsonify } from "@bitwarden/common/types/deep-jsonify"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; diff --git a/apps/browser/src/models/browserSendComponentState.ts b/apps/browser/src/models/browserSendComponentState.ts index d4086f3703b..9158efc21d4 100644 --- a/apps/browser/src/models/browserSendComponentState.ts +++ b/apps/browser/src/models/browserSendComponentState.ts @@ -1,4 +1,4 @@ -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { SendView } from "@bitwarden/common/tools/send/models/view/send.view"; import { DeepJsonify } from "@bitwarden/common/types/deep-jsonify"; diff --git a/apps/browser/src/alarms/alarm-state.ts b/apps/browser/src/platform/alarms/alarm-state.ts similarity index 95% rename from apps/browser/src/alarms/alarm-state.ts rename to apps/browser/src/platform/alarms/alarm-state.ts index 695f8642809..c58d6035175 100644 --- a/apps/browser/src/alarms/alarm-state.ts +++ b/apps/browser/src/platform/alarms/alarm-state.ts @@ -1,5 +1,5 @@ -import { clearClipboardAlarmName } from "../autofill/clipboard"; -import { BrowserApi } from "../browser/browserApi"; +import { clearClipboardAlarmName } from "../../autofill/clipboard"; +import { BrowserApi } from "../browser/browser-api"; export const alarmKeys = [clearClipboardAlarmName] as const; export type AlarmKeys = (typeof alarmKeys)[number]; diff --git a/apps/browser/src/alarms/on-alarm-listener.ts b/apps/browser/src/platform/alarms/on-alarm-listener.ts similarity index 86% rename from apps/browser/src/alarms/on-alarm-listener.ts rename to apps/browser/src/platform/alarms/on-alarm-listener.ts index a476b6e4961..25516930233 100644 --- a/apps/browser/src/alarms/on-alarm-listener.ts +++ b/apps/browser/src/platform/alarms/on-alarm-listener.ts @@ -1,4 +1,4 @@ -import { ClearClipboard, clearClipboardAlarmName } from "../autofill/clipboard"; +import { ClearClipboard, clearClipboardAlarmName } from "../../autofill/clipboard"; import { alarmKeys, clearAlarmTime, getAlarmTime } from "./alarm-state"; diff --git a/apps/browser/src/alarms/register-alarms.ts b/apps/browser/src/platform/alarms/register-alarms.ts similarity index 100% rename from apps/browser/src/alarms/register-alarms.ts rename to apps/browser/src/platform/alarms/register-alarms.ts diff --git a/apps/browser/src/background.html b/apps/browser/src/platform/background.html similarity index 100% rename from apps/browser/src/background.html rename to apps/browser/src/platform/background.html diff --git a/apps/browser/src/background.ts b/apps/browser/src/platform/background.ts similarity index 91% rename from apps/browser/src/background.ts rename to apps/browser/src/platform/background.ts index 2c888cfd4b4..949991df9f0 100644 --- a/apps/browser/src/background.ts +++ b/apps/browser/src/platform/background.ts @@ -1,7 +1,8 @@ +import MainBackground from "../background/main.background"; + import { onAlarmListener } from "./alarms/on-alarm-listener"; import { registerAlarms } from "./alarms/register-alarms"; -import MainBackground from "./background/main.background"; -import { BrowserApi } from "./browser/browserApi"; +import { BrowserApi } from "./browser/browser-api"; import { contextMenusClickedListener, onCommandListener, diff --git a/apps/browser/src/background/service_factories/api-service.factory.ts b/apps/browser/src/platform/background/service-factories/api-service.factory.ts similarity index 88% rename from apps/browser/src/background/service_factories/api-service.factory.ts rename to apps/browser/src/platform/background/service-factories/api-service.factory.ts index 830d51a1a2d..bcde07fbb20 100644 --- a/apps/browser/src/background/service_factories/api-service.factory.ts +++ b/apps/browser/src/platform/background/service-factories/api-service.factory.ts @@ -4,14 +4,18 @@ import { ApiService } from "@bitwarden/common/services/api.service"; import { tokenServiceFactory, TokenServiceInitOptions, -} from "../../auth/background/service-factories/token-service.factory"; +} from "../../../auth/background/service-factories/token-service.factory"; +import { + CachedServices, + factory, + FactoryOptions, +} from "../../background/service-factories/factory-options"; import { AppIdServiceInitOptions, appIdServiceFactory } from "./app-id-service.factory"; import { environmentServiceFactory, EnvironmentServiceInitOptions, } from "./environment-service.factory"; -import { CachedServices, factory, FactoryOptions } from "./factory-options"; import { PlatformUtilsServiceInitOptions, platformUtilsServiceFactory, diff --git a/apps/browser/src/background/service_factories/app-id-service.factory.ts b/apps/browser/src/platform/background/service-factories/app-id-service.factory.ts similarity index 84% rename from apps/browser/src/background/service_factories/app-id-service.factory.ts rename to apps/browser/src/platform/background/service-factories/app-id-service.factory.ts index 743c8eb5bc6..30397d737ef 100644 --- a/apps/browser/src/background/service_factories/app-id-service.factory.ts +++ b/apps/browser/src/platform/background/service-factories/app-id-service.factory.ts @@ -1,7 +1,7 @@ import { DiskStorageOptions } from "@koa/multer"; -import { AppIdService as AbstractAppIdService } from "@bitwarden/common/abstractions/appId.service"; -import { AppIdService } from "@bitwarden/common/services/appId.service"; +import { AppIdService as AbstractAppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { AppIdService } from "@bitwarden/common/platform/services/app-id.service"; import { FactoryOptions, CachedServices, factory } from "./factory-options"; import { diskStorageServiceFactory } from "./storage-service.factory"; diff --git a/apps/browser/src/background/service_factories/crypto-function-service.factory.ts b/apps/browser/src/platform/background/service-factories/crypto-function-service.factory.ts similarity index 75% rename from apps/browser/src/background/service_factories/crypto-function-service.factory.ts rename to apps/browser/src/platform/background/service-factories/crypto-function-service.factory.ts index 6a092091746..bcfffb6bd08 100644 --- a/apps/browser/src/background/service_factories/crypto-function-service.factory.ts +++ b/apps/browser/src/platform/background/service-factories/crypto-function-service.factory.ts @@ -1,5 +1,5 @@ -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { WebCryptoFunctionService } from "@bitwarden/common/services/webCryptoFunction.service"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { WebCryptoFunctionService } from "@bitwarden/common/platform/services/web-crypto-function.service"; import { CachedServices, factory, FactoryOptions } from "./factory-options"; diff --git a/apps/browser/src/background/service_factories/crypto-service.factory.ts b/apps/browser/src/platform/background/service-factories/crypto-service.factory.ts similarity index 77% rename from apps/browser/src/background/service_factories/crypto-service.factory.ts rename to apps/browser/src/platform/background/service-factories/crypto-service.factory.ts index 784314b12d2..7f66a4f6fe7 100644 --- a/apps/browser/src/background/service_factories/crypto-service.factory.ts +++ b/apps/browser/src/platform/background/service-factories/crypto-service.factory.ts @@ -1,6 +1,14 @@ -import { CryptoService as AbstractCryptoService } from "@bitwarden/common/abstractions/crypto.service"; +import { CryptoService as AbstractCryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; -import { BrowserCryptoService } from "../../services/browserCrypto.service"; +import { + StateServiceInitOptions, + stateServiceFactory, +} from "../../../platform/background/service-factories/state-service.factory"; +import { + LogServiceInitOptions, + logServiceFactory, +} from "../../background/service-factories/log-service.factory"; +import { BrowserCryptoService } from "../../services/browser-crypto.service"; import { cryptoFunctionServiceFactory, @@ -8,12 +16,10 @@ import { } from "./crypto-function-service.factory"; import { encryptServiceFactory, EncryptServiceInitOptions } from "./encrypt-service.factory"; import { FactoryOptions, CachedServices, factory } from "./factory-options"; -import { logServiceFactory, LogServiceInitOptions } from "./log-service.factory"; import { - platformUtilsServiceFactory, PlatformUtilsServiceInitOptions, + platformUtilsServiceFactory, } from "./platform-utils-service.factory"; -import { stateServiceFactory, StateServiceInitOptions } from "./state-service.factory"; type CryptoServiceFactoryOptions = FactoryOptions; diff --git a/apps/browser/src/background/service_factories/encrypt-service.factory.ts b/apps/browser/src/platform/background/service-factories/encrypt-service.factory.ts similarity index 78% rename from apps/browser/src/background/service_factories/encrypt-service.factory.ts rename to apps/browser/src/platform/background/service-factories/encrypt-service.factory.ts index 5b2a3766a3f..75e8c1974e2 100644 --- a/apps/browser/src/background/service_factories/encrypt-service.factory.ts +++ b/apps/browser/src/platform/background/service-factories/encrypt-service.factory.ts @@ -1,11 +1,15 @@ -import { EncryptServiceImplementation } from "@bitwarden/common/services/cryptography/encrypt.service.implementation"; +import { EncryptServiceImplementation } from "@bitwarden/common/platform/services/cryptography/encrypt.service.implementation"; + +import { + LogServiceInitOptions, + logServiceFactory, +} from "../../background/service-factories/log-service.factory"; import { cryptoFunctionServiceFactory, CryptoFunctionServiceInitOptions, } from "./crypto-function-service.factory"; -import { CachedServices, factory, FactoryOptions } from "./factory-options"; -import { LogServiceInitOptions, logServiceFactory } from "./log-service.factory"; +import { FactoryOptions, CachedServices, factory } from "./factory-options"; type EncryptServiceFactoryOptions = FactoryOptions & { encryptServiceOptions: { diff --git a/apps/browser/src/background/service_factories/environment-service.factory.ts b/apps/browser/src/platform/background/service-factories/environment-service.factory.ts similarity index 100% rename from apps/browser/src/background/service_factories/environment-service.factory.ts rename to apps/browser/src/platform/background/service-factories/environment-service.factory.ts diff --git a/apps/browser/src/background/service_factories/factory-options.ts b/apps/browser/src/platform/background/service-factories/factory-options.ts similarity index 100% rename from apps/browser/src/background/service_factories/factory-options.ts rename to apps/browser/src/platform/background/service-factories/factory-options.ts diff --git a/apps/browser/src/background/service_factories/file-upload-service.factory.ts b/apps/browser/src/platform/background/service-factories/file-upload-service.factory.ts similarity index 68% rename from apps/browser/src/background/service_factories/file-upload-service.factory.ts rename to apps/browser/src/platform/background/service-factories/file-upload-service.factory.ts index 5ead09f929c..d890a3b37a7 100644 --- a/apps/browser/src/background/service_factories/file-upload-service.factory.ts +++ b/apps/browser/src/platform/background/service-factories/file-upload-service.factory.ts @@ -1,7 +1,12 @@ -import { FileUploadService as FileUploadServiceAbstraction } from "@bitwarden/common/abstractions/file-upload/file-upload.service"; -import { FileUploadService } from "@bitwarden/common/services/file-upload/file-upload.service"; +import { FileUploadService as FileUploadServiceAbstraction } from "@bitwarden/common/platform/abstractions/file-upload/file-upload.service"; +import { FileUploadService } from "@bitwarden/common/platform/services/file-upload/file-upload.service"; + +import { + CachedServices, + factory, + FactoryOptions, +} from "../../background/service-factories/factory-options"; -import { CachedServices, factory, FactoryOptions } from "./factory-options"; import { logServiceFactory, LogServiceInitOptions } from "./log-service.factory"; type FileUploadServiceFactoryOptions = FactoryOptions; diff --git a/apps/browser/src/background/service_factories/i18n-service.factory.ts b/apps/browser/src/platform/background/service-factories/i18n-service.factory.ts similarity index 91% rename from apps/browser/src/background/service_factories/i18n-service.factory.ts rename to apps/browser/src/platform/background/service-factories/i18n-service.factory.ts index 1ba61d70b34..3dd7e1814ff 100644 --- a/apps/browser/src/background/service_factories/i18n-service.factory.ts +++ b/apps/browser/src/platform/background/service-factories/i18n-service.factory.ts @@ -1,5 +1,5 @@ -import { I18nService as AbstractI18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { I18nService as BaseI18nService } from "@bitwarden/common/services/i18n.service"; +import { I18nService as AbstractI18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { I18nService as BaseI18nService } from "@bitwarden/common/platform/services/i18n.service"; import I18nService from "../../services/i18n.service"; diff --git a/apps/browser/src/background/service_factories/key-generation-service.factory.ts b/apps/browser/src/platform/background/service-factories/key-generation-service.factory.ts similarity index 82% rename from apps/browser/src/background/service_factories/key-generation-service.factory.ts rename to apps/browser/src/platform/background/service-factories/key-generation-service.factory.ts index d6d31b6326e..7dbcf3fa79e 100644 --- a/apps/browser/src/background/service_factories/key-generation-service.factory.ts +++ b/apps/browser/src/platform/background/service-factories/key-generation-service.factory.ts @@ -1,10 +1,10 @@ -import { KeyGenerationService } from "../../services/keyGeneration.service"; +import { KeyGenerationService } from "../../services/key-generation.service"; import { cryptoFunctionServiceFactory, CryptoFunctionServiceInitOptions, } from "./crypto-function-service.factory"; -import { CachedServices, factory, FactoryOptions } from "./factory-options"; +import { FactoryOptions, CachedServices, factory } from "./factory-options"; type KeyGenerationServiceFactoryOptions = FactoryOptions; diff --git a/apps/browser/src/background/service_factories/log-service.factory.ts b/apps/browser/src/platform/background/service-factories/log-service.factory.ts similarity index 71% rename from apps/browser/src/background/service_factories/log-service.factory.ts rename to apps/browser/src/platform/background/service-factories/log-service.factory.ts index 286bafd9516..69e49fabb70 100644 --- a/apps/browser/src/background/service_factories/log-service.factory.ts +++ b/apps/browser/src/platform/background/service-factories/log-service.factory.ts @@ -1,8 +1,8 @@ -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { LogLevelType } from "@bitwarden/common/enums"; -import { ConsoleLogService } from "@bitwarden/common/services/consoleLog.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { ConsoleLogService } from "@bitwarden/common/platform/services/console-log.service"; -import { CachedServices, factory, FactoryOptions } from "./factory-options"; +import { FactoryOptions, CachedServices, factory } from "./factory-options"; type LogServiceFactoryOptions = FactoryOptions & { logServiceOptions: { diff --git a/apps/browser/src/background/service_factories/messaging-service.factory.ts b/apps/browser/src/platform/background/service-factories/messaging-service.factory.ts similarity index 65% rename from apps/browser/src/background/service_factories/messaging-service.factory.ts rename to apps/browser/src/platform/background/service-factories/messaging-service.factory.ts index 633f1b2d578..0d0c797056e 100644 --- a/apps/browser/src/background/service_factories/messaging-service.factory.ts +++ b/apps/browser/src/platform/background/service-factories/messaging-service.factory.ts @@ -1,8 +1,11 @@ -import { MessagingService as AbstractMessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { MessagingService as AbstractMessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; -import BrowserMessagingService from "../../services/browserMessaging.service"; - -import { CachedServices, factory, FactoryOptions } from "./factory-options"; +import { + CachedServices, + factory, + FactoryOptions, +} from "../../background/service-factories/factory-options"; +import BrowserMessagingService from "../../services/browser-messaging.service"; type MessagingServiceFactoryOptions = FactoryOptions; diff --git a/apps/browser/src/background/service_factories/platform-utils-service.factory.ts b/apps/browser/src/platform/background/service-factories/platform-utils-service.factory.ts similarity index 85% rename from apps/browser/src/background/service_factories/platform-utils-service.factory.ts rename to apps/browser/src/platform/background/service-factories/platform-utils-service.factory.ts index da25e51ce0c..5748c523f70 100644 --- a/apps/browser/src/background/service_factories/platform-utils-service.factory.ts +++ b/apps/browser/src/platform/background/service-factories/platform-utils-service.factory.ts @@ -1,6 +1,6 @@ -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; -import BrowserPlatformUtilsService from "../../services/browserPlatformUtils.service"; +import BrowserPlatformUtilsService from "../../services/browser-platform-utils.service"; import { CachedServices, factory, FactoryOptions } from "./factory-options"; import { MessagingServiceInitOptions, messagingServiceFactory } from "./messaging-service.factory"; diff --git a/apps/browser/src/background/service_factories/state-migration-service.factory.ts b/apps/browser/src/platform/background/service-factories/state-migration-service.factory.ts similarity index 76% rename from apps/browser/src/background/service_factories/state-migration-service.factory.ts rename to apps/browser/src/platform/background/service-factories/state-migration-service.factory.ts index 5c7fba3ed85..8d4ee969583 100644 --- a/apps/browser/src/background/service_factories/state-migration-service.factory.ts +++ b/apps/browser/src/platform/background/service-factories/state-migration-service.factory.ts @@ -1,8 +1,8 @@ -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; -import { GlobalState } from "@bitwarden/common/models/domain/global-state"; -import { StateMigrationService } from "@bitwarden/common/services/stateMigration.service"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; +import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state"; +import { StateMigrationService } from "@bitwarden/common/platform/services/state-migration.service"; -import { Account } from "../../models/account"; +import { Account } from "../../../models/account"; import { CachedServices, factory, FactoryOptions } from "./factory-options"; import { diff --git a/apps/browser/src/background/service_factories/state-service.factory.ts b/apps/browser/src/platform/background/service-factories/state-service.factory.ts similarity index 88% rename from apps/browser/src/background/service_factories/state-service.factory.ts rename to apps/browser/src/platform/background/service-factories/state-service.factory.ts index 6d2c5cb4fa7..f926d428890 100644 --- a/apps/browser/src/background/service_factories/state-service.factory.ts +++ b/apps/browser/src/platform/background/service-factories/state-service.factory.ts @@ -1,7 +1,7 @@ -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; -import { GlobalState } from "@bitwarden/common/models/domain/global-state"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; +import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state"; -import { Account } from "../../models/account"; +import { Account } from "../../../models/account"; import { BrowserStateService } from "../../services/browser-state.service"; import { CachedServices, factory, FactoryOptions } from "./factory-options"; diff --git a/apps/browser/src/background/service_factories/storage-service.factory.ts b/apps/browser/src/platform/background/service-factories/storage-service.factory.ts similarity index 81% rename from apps/browser/src/background/service_factories/storage-service.factory.ts rename to apps/browser/src/platform/background/service-factories/storage-service.factory.ts index c30bda731e6..9de8f1cffca 100644 --- a/apps/browser/src/background/service_factories/storage-service.factory.ts +++ b/apps/browser/src/platform/background/service-factories/storage-service.factory.ts @@ -1,18 +1,18 @@ import { AbstractMemoryStorageService, AbstractStorageService, -} from "@bitwarden/common/abstractions/storage.service"; -import { MemoryStorageService } from "@bitwarden/common/services/memoryStorage.service"; +} from "@bitwarden/common/platform/abstractions/storage.service"; +import { MemoryStorageService } from "@bitwarden/common/platform/services/memory-storage.service"; -import { BrowserApi } from "../../browser/browserApi"; -import BrowserLocalStorageService from "../../services/browserLocalStorage.service"; -import { LocalBackedSessionStorageService } from "../../services/localBackedSessionStorage.service"; +import { BrowserApi } from "../../browser/browser-api"; +import BrowserLocalStorageService from "../../services/browser-local-storage.service"; +import { LocalBackedSessionStorageService } from "../../services/local-backed-session-storage.service"; -import { encryptServiceFactory, EncryptServiceInitOptions } from "./encrypt-service.factory"; +import { EncryptServiceInitOptions, encryptServiceFactory } from "./encrypt-service.factory"; import { CachedServices, factory, FactoryOptions } from "./factory-options"; import { - keyGenerationServiceFactory, KeyGenerationServiceInitOptions, + keyGenerationServiceFactory, } from "./key-generation-service.factory"; type StorageServiceFactoryOptions = FactoryOptions; diff --git a/apps/browser/src/browser/browserApi.ts b/apps/browser/src/platform/browser/browser-api.ts similarity index 97% rename from apps/browser/src/browser/browserApi.ts rename to apps/browser/src/platform/browser/browser-api.ts index b69cf388de7..7c646e5c7e6 100644 --- a/apps/browser/src/browser/browserApi.ts +++ b/apps/browser/src/platform/browser/browser-api.ts @@ -1,7 +1,7 @@ -import { DeviceType } from "@bitwarden/common/enums/device-type.enum"; +import { DeviceType } from "@bitwarden/common/enums"; -import BrowserPlatformUtilsService from "../services/browserPlatformUtils.service"; -import { TabMessage } from "../types/tab-messages"; +import { TabMessage } from "../../types/tab-messages"; +import BrowserPlatformUtilsService from "../services/browser-platform-utils.service"; export class BrowserApi { static isWebExtensionsApi: boolean = typeof browser !== "undefined"; diff --git a/apps/browser/src/decorators/dev-flag.decorator.spec.ts b/apps/browser/src/platform/decorators/dev-flag.decorator.spec.ts similarity index 100% rename from apps/browser/src/decorators/dev-flag.decorator.spec.ts rename to apps/browser/src/platform/decorators/dev-flag.decorator.spec.ts diff --git a/apps/browser/src/decorators/dev-flag.decorator.ts b/apps/browser/src/platform/decorators/dev-flag.decorator.ts similarity index 100% rename from apps/browser/src/decorators/dev-flag.decorator.ts rename to apps/browser/src/platform/decorators/dev-flag.decorator.ts diff --git a/apps/browser/src/decorators/session-sync-observable/browser-session.decorator.spec.ts b/apps/browser/src/platform/decorators/session-sync-observable/browser-session.decorator.spec.ts similarity index 95% rename from apps/browser/src/decorators/session-sync-observable/browser-session.decorator.spec.ts rename to apps/browser/src/platform/decorators/session-sync-observable/browser-session.decorator.spec.ts index ab29c86e984..5ddc3f8e07e 100644 --- a/apps/browser/src/decorators/session-sync-observable/browser-session.decorator.spec.ts +++ b/apps/browser/src/platform/decorators/session-sync-observable/browser-session.decorator.spec.ts @@ -1,7 +1,7 @@ import { BehaviorSubject } from "rxjs"; -import { AbstractMemoryStorageService } from "@bitwarden/common/abstractions/storage.service"; -import { MemoryStorageService } from "@bitwarden/common/services/memoryStorage.service"; +import { AbstractMemoryStorageService } from "@bitwarden/common/platform/abstractions/storage.service"; +import { MemoryStorageService } from "@bitwarden/common/platform/services/memory-storage.service"; import { BrowserStateService } from "../../services/browser-state.service"; diff --git a/apps/browser/src/decorators/session-sync-observable/browser-session.decorator.ts b/apps/browser/src/platform/decorators/session-sync-observable/browser-session.decorator.ts similarity index 98% rename from apps/browser/src/decorators/session-sync-observable/browser-session.decorator.ts rename to apps/browser/src/platform/decorators/session-sync-observable/browser-session.decorator.ts index dbb45ddba8e..b325f6b9a56 100644 --- a/apps/browser/src/decorators/session-sync-observable/browser-session.decorator.ts +++ b/apps/browser/src/platform/decorators/session-sync-observable/browser-session.decorator.ts @@ -1,6 +1,6 @@ import { Constructor } from "type-fest"; -import { AbstractMemoryStorageService } from "@bitwarden/common/abstractions/storage.service"; +import { AbstractMemoryStorageService } from "@bitwarden/common/platform/abstractions/storage.service"; import { SessionStorable } from "./session-storable"; import { SessionSyncer } from "./session-syncer"; diff --git a/apps/browser/src/decorators/session-sync-observable/index.ts b/apps/browser/src/platform/decorators/session-sync-observable/index.ts similarity index 100% rename from apps/browser/src/decorators/session-sync-observable/index.ts rename to apps/browser/src/platform/decorators/session-sync-observable/index.ts diff --git a/apps/browser/src/decorators/session-sync-observable/session-storable.ts b/apps/browser/src/platform/decorators/session-sync-observable/session-storable.ts similarity index 100% rename from apps/browser/src/decorators/session-sync-observable/session-storable.ts rename to apps/browser/src/platform/decorators/session-sync-observable/session-storable.ts diff --git a/apps/browser/src/decorators/session-sync-observable/session-sync.decorator.spec.ts b/apps/browser/src/platform/decorators/session-sync-observable/session-sync.decorator.spec.ts similarity index 100% rename from apps/browser/src/decorators/session-sync-observable/session-sync.decorator.spec.ts rename to apps/browser/src/platform/decorators/session-sync-observable/session-sync.decorator.spec.ts diff --git a/apps/browser/src/decorators/session-sync-observable/session-sync.decorator.ts b/apps/browser/src/platform/decorators/session-sync-observable/session-sync.decorator.ts similarity index 100% rename from apps/browser/src/decorators/session-sync-observable/session-sync.decorator.ts rename to apps/browser/src/platform/decorators/session-sync-observable/session-sync.decorator.ts diff --git a/apps/browser/src/decorators/session-sync-observable/session-syncer.spec.ts b/apps/browser/src/platform/decorators/session-sync-observable/session-syncer.spec.ts similarity index 98% rename from apps/browser/src/decorators/session-sync-observable/session-syncer.spec.ts rename to apps/browser/src/platform/decorators/session-sync-observable/session-syncer.spec.ts index 63312376293..afa66db0454 100644 --- a/apps/browser/src/decorators/session-sync-observable/session-syncer.spec.ts +++ b/apps/browser/src/platform/decorators/session-sync-observable/session-syncer.spec.ts @@ -2,9 +2,9 @@ import { awaitAsync } from "@bitwarden/angular/../test-utils"; import { mock, MockProxy } from "jest-mock-extended"; import { BehaviorSubject, ReplaySubject } from "rxjs"; -import { MemoryStorageService } from "@bitwarden/common/services/memoryStorage.service"; +import { MemoryStorageService } from "@bitwarden/common/platform/services/memory-storage.service"; -import { BrowserApi } from "../../browser/browserApi"; +import { BrowserApi } from "../../browser/browser-api"; import { SessionSyncer } from "./session-syncer"; import { SyncedItemMetadata } from "./sync-item-metadata"; diff --git a/apps/browser/src/decorators/session-sync-observable/session-syncer.ts b/apps/browser/src/platform/decorators/session-sync-observable/session-syncer.ts similarity index 95% rename from apps/browser/src/decorators/session-sync-observable/session-syncer.ts rename to apps/browser/src/platform/decorators/session-sync-observable/session-syncer.ts index 8751a12d1df..001c546b9c6 100644 --- a/apps/browser/src/decorators/session-sync-observable/session-syncer.ts +++ b/apps/browser/src/platform/decorators/session-sync-observable/session-syncer.ts @@ -1,9 +1,9 @@ import { BehaviorSubject, concatMap, ReplaySubject, skip, Subject, Subscription } from "rxjs"; -import { AbstractMemoryStorageService } from "@bitwarden/common/abstractions/storage.service"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { AbstractMemoryStorageService } from "@bitwarden/common/platform/abstractions/storage.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; -import { BrowserApi } from "../../browser/browserApi"; +import { BrowserApi } from "../../browser/browser-api"; import { SyncedItemMetadata } from "./sync-item-metadata"; diff --git a/apps/browser/src/decorators/session-sync-observable/sync-item-metadata.ts b/apps/browser/src/platform/decorators/session-sync-observable/sync-item-metadata.ts similarity index 100% rename from apps/browser/src/decorators/session-sync-observable/sync-item-metadata.ts rename to apps/browser/src/platform/decorators/session-sync-observable/sync-item-metadata.ts diff --git a/apps/browser/src/decorators/session-sync-observable/synced-item-metadata.spec.ts b/apps/browser/src/platform/decorators/session-sync-observable/synced-item-metadata.spec.ts similarity index 100% rename from apps/browser/src/decorators/session-sync-observable/synced-item-metadata.spec.ts rename to apps/browser/src/platform/decorators/session-sync-observable/synced-item-metadata.spec.ts diff --git a/apps/browser/src/flags.ts b/apps/browser/src/platform/flags.ts similarity index 86% rename from apps/browser/src/flags.ts rename to apps/browser/src/platform/flags.ts index 5159cac9683..270835bc6a1 100644 --- a/apps/browser/src/flags.ts +++ b/apps/browser/src/platform/flags.ts @@ -4,9 +4,9 @@ import { devFlagValue as baseDevFlagValue, SharedFlags, SharedDevFlags, -} from "@bitwarden/common/misc/flags"; +} from "@bitwarden/common/platform/misc/flags"; -import { GroupPolicyEnvironment } from "./admin-console/types/group-policy-environment"; +import { GroupPolicyEnvironment } from "../admin-console/types/group-policy-environment"; // required to avoid linting errors when there are no flags /* eslint-disable-next-line @typescript-eslint/ban-types */ diff --git a/apps/browser/src/globals.d.ts b/apps/browser/src/platform/globals.d.ts similarity index 100% rename from apps/browser/src/globals.d.ts rename to apps/browser/src/platform/globals.d.ts diff --git a/apps/browser/src/listeners/combine.spec.ts b/apps/browser/src/platform/listeners/combine.spec.ts similarity index 100% rename from apps/browser/src/listeners/combine.spec.ts rename to apps/browser/src/platform/listeners/combine.spec.ts diff --git a/apps/browser/src/listeners/combine.ts b/apps/browser/src/platform/listeners/combine.ts similarity index 86% rename from apps/browser/src/listeners/combine.ts rename to apps/browser/src/platform/listeners/combine.ts index b87631de977..91d2af7ba55 100644 --- a/apps/browser/src/listeners/combine.ts +++ b/apps/browser/src/platform/listeners/combine.ts @@ -1,4 +1,4 @@ -import { CachedServices } from "../background/service_factories/factory-options"; +import { CachedServices } from "../background/service-factories/factory-options"; type Listener = (...args: [...T, CachedServices]) => Promise; diff --git a/apps/browser/src/listeners/index.ts b/apps/browser/src/platform/listeners/index.ts similarity index 78% rename from apps/browser/src/listeners/index.ts rename to apps/browser/src/platform/listeners/index.ts index e9dc0908278..cf4950023f3 100644 --- a/apps/browser/src/listeners/index.ts +++ b/apps/browser/src/platform/listeners/index.ts @@ -1,9 +1,9 @@ -import { CipherContextMenuHandler } from "../autofill/browser/cipher-context-menu-handler"; -import { ContextMenuClickedHandler } from "../autofill/browser/context-menu-clicked-handler"; +import { CipherContextMenuHandler } from "../../autofill/browser/cipher-context-menu-handler"; +import { ContextMenuClickedHandler } from "../../autofill/browser/context-menu-clicked-handler"; import { combine } from "./combine"; -import { onCommandListener } from "./onCommandListener"; -import { onInstallListener } from "./onInstallListener"; +import { onCommandListener } from "./on-command-listener"; +import { onInstallListener } from "./on-install-listener"; import { UpdateBadge } from "./update-badge"; const tabsOnActivatedListener = combine([ diff --git a/apps/browser/src/listeners/onCommandListener.ts b/apps/browser/src/platform/listeners/on-command-listener.ts similarity index 74% rename from apps/browser/src/listeners/onCommandListener.ts rename to apps/browser/src/platform/listeners/on-command-listener.ts index 7ea7de9a0f0..1511e937813 100644 --- a/apps/browser/src/listeners/onCommandListener.ts +++ b/apps/browser/src/platform/listeners/on-command-listener.ts @@ -1,20 +1,20 @@ import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; -import { GlobalState } from "@bitwarden/common/models/domain/global-state"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; +import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state"; -import { authServiceFactory } from "../auth/background/service-factories/auth-service.factory"; -import { autofillServiceFactory } from "../autofill/background/service_factories/autofill-service.factory"; -import { GeneratePasswordToClipboardCommand } from "../autofill/clipboard"; -import { AutofillTabCommand } from "../autofill/commands/autofill-tab-command"; -import { CachedServices } from "../background/service_factories/factory-options"; -import { logServiceFactory } from "../background/service_factories/log-service.factory"; +import { authServiceFactory } from "../../auth/background/service-factories/auth-service.factory"; +import { autofillServiceFactory } from "../../autofill/background/service_factories/autofill-service.factory"; +import { GeneratePasswordToClipboardCommand } from "../../autofill/clipboard"; +import { AutofillTabCommand } from "../../autofill/commands/autofill-tab-command"; import { - passwordGenerationServiceFactory, PasswordGenerationServiceInitOptions, -} from "../background/service_factories/password-generation-service.factory"; -import { stateServiceFactory } from "../background/service_factories/state-service.factory"; -import { BrowserApi } from "../browser/browserApi"; -import { Account } from "../models/account"; + passwordGenerationServiceFactory, +} from "../../background/service-factories/password-generation-service.factory"; +import { Account } from "../../models/account"; +import { stateServiceFactory } from "../../platform/background/service-factories/state-service.factory"; +import { CachedServices } from "../background/service-factories/factory-options"; +import { logServiceFactory } from "../background/service-factories/log-service.factory"; +import { BrowserApi } from "../browser/browser-api"; export const onCommandListener = async (command: string, tab: chrome.tabs.Tab) => { switch (command) { @@ -91,7 +91,7 @@ const doGeneratePasswordToClipboard = async (tab: chrome.tabs.Tab): Promise Promise.resolve(true), - clipboardWriteCallback: (_clipboardValue, _clearMs) => Promise.resolve(), + clipboardWriteCallback: () => Promise.resolve(), win: self, }, stateMigrationServiceOptions: { diff --git a/apps/browser/src/listeners/onInstallListener.ts b/apps/browser/src/platform/listeners/on-install-listener.ts similarity index 75% rename from apps/browser/src/listeners/onInstallListener.ts rename to apps/browser/src/platform/listeners/on-install-listener.ts index 92cd2fd6b78..480e811fd26 100644 --- a/apps/browser/src/listeners/onInstallListener.ts +++ b/apps/browser/src/platform/listeners/on-install-listener.ts @@ -1,12 +1,12 @@ -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; -import { GlobalState } from "@bitwarden/common/models/domain/global-state"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; +import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state"; +import { Account } from "../../models/account"; import { - environmentServiceFactory, EnvironmentServiceInitOptions, -} from "../background/service_factories/environment-service.factory"; -import { BrowserApi } from "../browser/browserApi"; -import { Account } from "../models/account"; + environmentServiceFactory, +} from "../background/service-factories/environment-service.factory"; +import { BrowserApi } from "../browser/browser-api"; export async function onInstallListener(details: chrome.runtime.InstalledDetails) { const cache = {}; diff --git a/apps/browser/src/listeners/update-badge.ts b/apps/browser/src/platform/listeners/update-badge.ts similarity index 87% rename from apps/browser/src/listeners/update-badge.ts rename to apps/browser/src/platform/listeners/update-badge.ts index 14a93c474ff..4623ff30f05 100644 --- a/apps/browser/src/listeners/update-badge.ts +++ b/apps/browser/src/platform/listeners/update-badge.ts @@ -1,21 +1,21 @@ -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { EncryptService } from "@bitwarden/common/abstractions/encrypt.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { GlobalState } from "@bitwarden/common/models/domain/global-state"; -import { ContainerService } from "@bitwarden/common/services/container.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EncryptService } from "@bitwarden/common/platform/abstractions/encrypt.service"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state"; +import { ContainerService } from "@bitwarden/common/platform/services/container.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; -import { authServiceFactory } from "../auth/background/service-factories/auth-service.factory"; -import { stateServiceFactory } from "../background/service_factories/state-service.factory"; -import { BrowserApi } from "../browser/browserApi"; -import { Account } from "../models/account"; -import { BrowserStateService } from "../services/abstractions/browser-state.service"; -import BrowserPlatformUtilsService from "../services/browserPlatformUtils.service"; -import IconDetails from "../vault/background/models/icon-details"; -import { cipherServiceFactory } from "../vault/background/service_factories/cipher-service.factory"; +import { authServiceFactory } from "../../auth/background/service-factories/auth-service.factory"; +import { Account } from "../../models/account"; +import { stateServiceFactory } from "../../platform/background/service-factories/state-service.factory"; +import { BrowserStateService } from "../../platform/services/abstractions/browser-state.service"; +import IconDetails from "../../vault/background/models/icon-details"; +import { cipherServiceFactory } from "../../vault/background/service_factories/cipher-service.factory"; +import { BrowserApi } from "../browser/browser-api"; +import BrowserPlatformUtilsService from "../services/browser-platform-utils.service"; export type BadgeOptions = { tab?: chrome.tabs.Tab; diff --git a/apps/browser/src/popup/locales.ts b/apps/browser/src/platform/popup/locales.ts similarity index 100% rename from apps/browser/src/popup/locales.ts rename to apps/browser/src/platform/popup/locales.ts diff --git a/apps/browser/src/services/abstractChromeStorageApi.service.ts b/apps/browser/src/platform/services/abstractions/abstract-chrome-storage-api.service.ts similarity index 92% rename from apps/browser/src/services/abstractChromeStorageApi.service.ts rename to apps/browser/src/platform/services/abstractions/abstract-chrome-storage-api.service.ts index 4d83e369727..5e9c14fd3c4 100644 --- a/apps/browser/src/services/abstractChromeStorageApi.service.ts +++ b/apps/browser/src/platform/services/abstractions/abstract-chrome-storage-api.service.ts @@ -1,4 +1,4 @@ -import { AbstractStorageService } from "@bitwarden/common/abstractions/storage.service"; +import { AbstractStorageService } from "@bitwarden/common/platform/abstractions/storage.service"; export default abstract class AbstractChromeStorageService implements AbstractStorageService { protected abstract chromeStorageApi: chrome.storage.StorageArea; diff --git a/apps/browser/src/services/abstractions/abstractKeyGeneration.service.ts b/apps/browser/src/platform/services/abstractions/abstract-key-generation.service.ts similarity index 54% rename from apps/browser/src/services/abstractions/abstractKeyGeneration.service.ts rename to apps/browser/src/platform/services/abstractions/abstract-key-generation.service.ts index 6a70718addf..5c2751dceff 100644 --- a/apps/browser/src/services/abstractions/abstractKeyGeneration.service.ts +++ b/apps/browser/src/platform/services/abstractions/abstract-key-generation.service.ts @@ -1,4 +1,4 @@ -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; export interface AbstractKeyGenerationService { makeEphemeralKey(numBytes?: number): Promise; diff --git a/apps/browser/src/services/abstractions/browser-state.service.ts b/apps/browser/src/platform/services/abstractions/browser-state.service.ts similarity index 70% rename from apps/browser/src/services/abstractions/browser-state.service.ts rename to apps/browser/src/platform/services/abstractions/browser-state.service.ts index 0c8a35afbd2..30b1bb98635 100644 --- a/apps/browser/src/services/abstractions/browser-state.service.ts +++ b/apps/browser/src/platform/services/abstractions/browser-state.service.ts @@ -1,10 +1,10 @@ -import { StateService as BaseStateServiceAbstraction } from "@bitwarden/common/abstractions/state.service"; -import { StorageOptions } from "@bitwarden/common/models/domain/storage-options"; +import { StateService as BaseStateServiceAbstraction } from "@bitwarden/common/platform/abstractions/state.service"; +import { StorageOptions } from "@bitwarden/common/platform/models/domain/storage-options"; -import { Account } from "../../models/account"; -import { BrowserComponentState } from "../../models/browserComponentState"; -import { BrowserGroupingsComponentState } from "../../models/browserGroupingsComponentState"; -import { BrowserSendComponentState } from "../../models/browserSendComponentState"; +import { Account } from "../../../models/account"; +import { BrowserComponentState } from "../../../models/browserComponentState"; +import { BrowserGroupingsComponentState } from "../../../models/browserGroupingsComponentState"; +import { BrowserSendComponentState } from "../../../models/browserSendComponentState"; export abstract class BrowserStateService extends BaseStateServiceAbstraction { getBrowserGroupingComponentState: ( diff --git a/apps/browser/src/services/browser-config.service.ts b/apps/browser/src/platform/services/browser-config.service.ts similarity index 64% rename from apps/browser/src/services/browser-config.service.ts rename to apps/browser/src/platform/services/browser-config.service.ts index 14aae684bd3..68237b4c206 100644 --- a/apps/browser/src/services/browser-config.service.ts +++ b/apps/browser/src/platform/services/browser-config.service.ts @@ -1,7 +1,7 @@ import { BehaviorSubject } from "rxjs"; -import { ServerConfig } from "@bitwarden/common/abstractions/config/server-config"; -import { ConfigService } from "@bitwarden/common/services/config/config.service"; +import { ServerConfig } from "@bitwarden/common/platform/abstractions/config/server-config"; +import { ConfigService } from "@bitwarden/common/platform/services/config/config.service"; import { browserSession, sessionSync } from "../decorators/session-sync-observable"; diff --git a/apps/browser/src/services/browserCrypto.service.ts b/apps/browser/src/platform/services/browser-crypto.service.ts similarity index 82% rename from apps/browser/src/services/browserCrypto.service.ts rename to apps/browser/src/platform/services/browser-crypto.service.ts index 3714e265fa5..1018c270cb2 100644 --- a/apps/browser/src/services/browserCrypto.service.ts +++ b/apps/browser/src/platform/services/browser-crypto.service.ts @@ -1,5 +1,5 @@ import { KeySuffixOptions } from "@bitwarden/common/enums"; -import { CryptoService } from "@bitwarden/common/services/crypto.service"; +import { CryptoService } from "@bitwarden/common/platform/services/crypto.service"; export class BrowserCryptoService extends CryptoService { protected async retrieveKeyFromStorage(keySuffix: KeySuffixOptions) { diff --git a/apps/browser/src/services/browser-environment.service.ts b/apps/browser/src/platform/services/browser-environment.service.ts similarity index 83% rename from apps/browser/src/services/browser-environment.service.ts rename to apps/browser/src/platform/services/browser-environment.service.ts index bad4b4b8321..08a4d811d9d 100644 --- a/apps/browser/src/services/browser-environment.service.ts +++ b/apps/browser/src/platform/services/browser-environment.service.ts @@ -1,8 +1,8 @@ -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; -import { EnvironmentService } from "@bitwarden/common/services/environment.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { EnvironmentService } from "@bitwarden/common/platform/services/environment.service"; -import { GroupPolicyEnvironment } from "../admin-console/types/group-policy-environment"; +import { GroupPolicyEnvironment } from "../../admin-console/types/group-policy-environment"; import { devFlagEnabled, devFlagValue } from "../flags"; export class BrowserEnvironmentService extends EnvironmentService { diff --git a/apps/browser/src/services/browserFileDownloadService.ts b/apps/browser/src/platform/services/browser-file-download.service.ts similarity index 66% rename from apps/browser/src/services/browserFileDownloadService.ts rename to apps/browser/src/platform/services/browser-file-download.service.ts index 89ae6722b59..1ade74367f5 100644 --- a/apps/browser/src/services/browserFileDownloadService.ts +++ b/apps/browser/src/platform/services/browser-file-download.service.ts @@ -1,12 +1,12 @@ import { Injectable } from "@angular/core"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { FileDownloadBuilder } from "@bitwarden/common/abstractions/fileDownload/fileDownloadBuilder"; -import { FileDownloadRequest } from "@bitwarden/common/abstractions/fileDownload/fileDownloadRequest"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { FileDownloadBuilder } from "@bitwarden/common/platform/abstractions/file-download/file-download.builder"; +import { FileDownloadRequest } from "@bitwarden/common/platform/abstractions/file-download/file-download.request"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; -import { BrowserApi } from "../browser/browserApi"; -import { SafariApp } from "../browser/safariApp"; +import { SafariApp } from "../../browser/safariApp"; +import { BrowserApi } from "../browser/browser-api"; @Injectable() export class BrowserFileDownloadService implements FileDownloadService { diff --git a/apps/browser/src/services/browser-i18n.service.ts b/apps/browser/src/platform/services/browser-i18n.service.ts similarity index 83% rename from apps/browser/src/services/browser-i18n.service.ts rename to apps/browser/src/platform/services/browser-i18n.service.ts index 3d2f244ab57..03406c5b706 100644 --- a/apps/browser/src/services/browser-i18n.service.ts +++ b/apps/browser/src/platform/services/browser-i18n.service.ts @@ -1,6 +1,6 @@ import { ReplaySubject } from "rxjs"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { browserSession, sessionSync } from "../decorators/session-sync-observable"; diff --git a/apps/browser/src/services/browserLocalStorage.service.ts b/apps/browser/src/platform/services/browser-local-storage.service.ts similarity index 60% rename from apps/browser/src/services/browserLocalStorage.service.ts rename to apps/browser/src/platform/services/browser-local-storage.service.ts index 2c93920df0c..8be8127d545 100644 --- a/apps/browser/src/services/browserLocalStorage.service.ts +++ b/apps/browser/src/platform/services/browser-local-storage.service.ts @@ -1,4 +1,4 @@ -import AbstractChromeStorageService from "./abstractChromeStorageApi.service"; +import AbstractChromeStorageService from "./abstractions/abstract-chrome-storage-api.service"; export default class BrowserLocalStorageService extends AbstractChromeStorageService { protected chromeStorageApi = chrome.storage.local; diff --git a/apps/browser/src/services/browserMemoryStorage.service.ts b/apps/browser/src/platform/services/browser-memory-storage.service.ts similarity index 60% rename from apps/browser/src/services/browserMemoryStorage.service.ts rename to apps/browser/src/platform/services/browser-memory-storage.service.ts index 993ae8a16ef..cdefbe45812 100644 --- a/apps/browser/src/services/browserMemoryStorage.service.ts +++ b/apps/browser/src/platform/services/browser-memory-storage.service.ts @@ -1,4 +1,4 @@ -import AbstractChromeStorageService from "./abstractChromeStorageApi.service"; +import AbstractChromeStorageService from "./abstractions/abstract-chrome-storage-api.service"; export default class BrowserMemoryStorageService extends AbstractChromeStorageService { protected chromeStorageApi = chrome.storage.session; diff --git a/apps/browser/src/services/browserMessagingPrivateModeBackground.service.ts b/apps/browser/src/platform/services/browser-messaging-private-mode-background.service.ts similarity index 74% rename from apps/browser/src/services/browserMessagingPrivateModeBackground.service.ts rename to apps/browser/src/platform/services/browser-messaging-private-mode-background.service.ts index 6d0bcd81afc..c2a6f8c5e1f 100644 --- a/apps/browser/src/services/browserMessagingPrivateModeBackground.service.ts +++ b/apps/browser/src/platform/services/browser-messaging-private-mode-background.service.ts @@ -1,4 +1,4 @@ -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; export default class BrowserMessagingPrivateModeBackgroundService implements MessagingService { send(subscriber: string, arg: any = {}) { diff --git a/apps/browser/src/services/browserMessagingPrivateModePopup.service.ts b/apps/browser/src/platform/services/browser-messaging-private-mode-popup.service.ts similarity index 74% rename from apps/browser/src/services/browserMessagingPrivateModePopup.service.ts rename to apps/browser/src/platform/services/browser-messaging-private-mode-popup.service.ts index a0a3c938acf..5572ba1ba41 100644 --- a/apps/browser/src/services/browserMessagingPrivateModePopup.service.ts +++ b/apps/browser/src/platform/services/browser-messaging-private-mode-popup.service.ts @@ -1,4 +1,4 @@ -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; export default class BrowserMessagingPrivateModePopupService implements MessagingService { send(subscriber: string, arg: any = {}) { diff --git a/apps/browser/src/services/browserMessaging.service.ts b/apps/browser/src/platform/services/browser-messaging.service.ts similarity index 54% rename from apps/browser/src/services/browserMessaging.service.ts rename to apps/browser/src/platform/services/browser-messaging.service.ts index 7832e08b323..5eff957cb50 100644 --- a/apps/browser/src/services/browserMessaging.service.ts +++ b/apps/browser/src/platform/services/browser-messaging.service.ts @@ -1,6 +1,6 @@ -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; -import { BrowserApi } from "../browser/browserApi"; +import { BrowserApi } from "../browser/browser-api"; export default class BrowserMessagingService implements MessagingService { send(subscriber: string, arg: any = {}) { diff --git a/apps/browser/src/services/browserPlatformUtils.service.spec.ts b/apps/browser/src/platform/services/browser-platform-utils.service.spec.ts similarity index 98% rename from apps/browser/src/services/browserPlatformUtils.service.spec.ts rename to apps/browser/src/platform/services/browser-platform-utils.service.spec.ts index c0d62b4d994..964200dfcea 100644 --- a/apps/browser/src/services/browserPlatformUtils.service.spec.ts +++ b/apps/browser/src/platform/services/browser-platform-utils.service.spec.ts @@ -1,6 +1,6 @@ import { DeviceType } from "@bitwarden/common/enums"; -import BrowserPlatformUtilsService from "./browserPlatformUtils.service"; +import BrowserPlatformUtilsService from "./browser-platform-utils.service"; describe("Browser Utils Service", () => { describe("getBrowser", () => { diff --git a/apps/browser/src/services/browserPlatformUtils.service.ts b/apps/browser/src/platform/services/browser-platform-utils.service.ts similarity index 97% rename from apps/browser/src/services/browserPlatformUtils.service.ts rename to apps/browser/src/platform/services/browser-platform-utils.service.ts index 29086db9ec8..79c52d615fb 100644 --- a/apps/browser/src/services/browserPlatformUtils.service.ts +++ b/apps/browser/src/platform/services/browser-platform-utils.service.ts @@ -1,9 +1,9 @@ -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { ClientType, DeviceType } from "@bitwarden/common/enums"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; -import { BrowserApi } from "../browser/browserApi"; -import { SafariApp } from "../browser/safariApp"; +import { SafariApp } from "../../browser/safariApp"; +import { BrowserApi } from "../browser/browser-api"; export default class BrowserPlatformUtilsService implements PlatformUtilsService { private static deviceCache: DeviceType = null; diff --git a/apps/browser/src/services/browser-state.service.spec.ts b/apps/browser/src/platform/services/browser-state.service.spec.ts similarity index 82% rename from apps/browser/src/services/browser-state.service.spec.ts rename to apps/browser/src/platform/services/browser-state.service.spec.ts index 5ef70897b30..874e13b7d8f 100644 --- a/apps/browser/src/services/browser-state.service.spec.ts +++ b/apps/browser/src/platform/services/browser-state.service.spec.ts @@ -1,21 +1,21 @@ import { mock, MockProxy } from "jest-mock-extended"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { AbstractMemoryStorageService, AbstractStorageService, -} from "@bitwarden/common/abstractions/storage.service"; -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; -import { GlobalState } from "@bitwarden/common/models/domain/global-state"; -import { State } from "@bitwarden/common/models/domain/state"; -import { StateMigrationService } from "@bitwarden/common/services/stateMigration.service"; +} from "@bitwarden/common/platform/abstractions/storage.service"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; +import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state"; +import { State } from "@bitwarden/common/platform/models/domain/state"; +import { StateMigrationService } from "@bitwarden/common/platform/services/state-migration.service"; import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { SendView } from "@bitwarden/common/tools/send/models/view/send.view"; -import { Account } from "../models/account"; -import { BrowserComponentState } from "../models/browserComponentState"; -import { BrowserGroupingsComponentState } from "../models/browserGroupingsComponentState"; -import { BrowserSendComponentState } from "../models/browserSendComponentState"; +import { Account } from "../../models/account"; +import { BrowserComponentState } from "../../models/browserComponentState"; +import { BrowserGroupingsComponentState } from "../../models/browserGroupingsComponentState"; +import { BrowserSendComponentState } from "../../models/browserSendComponentState"; import { BrowserStateService } from "./browser-state.service"; diff --git a/apps/browser/src/services/browser-state.service.ts b/apps/browser/src/platform/services/browser-state.service.ts similarity index 89% rename from apps/browser/src/services/browser-state.service.ts rename to apps/browser/src/platform/services/browser-state.service.ts index 3efd6e2edc5..37f50d6dc77 100644 --- a/apps/browser/src/services/browser-state.service.ts +++ b/apps/browser/src/platform/services/browser-state.service.ts @@ -1,14 +1,14 @@ import { BehaviorSubject } from "rxjs"; -import { GlobalState } from "@bitwarden/common/models/domain/global-state"; -import { StorageOptions } from "@bitwarden/common/models/domain/storage-options"; -import { StateService as BaseStateService } from "@bitwarden/common/services/state.service"; +import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state"; +import { StorageOptions } from "@bitwarden/common/platform/models/domain/storage-options"; +import { StateService as BaseStateService } from "@bitwarden/common/platform/services/state.service"; +import { Account } from "../../models/account"; +import { BrowserComponentState } from "../../models/browserComponentState"; +import { BrowserGroupingsComponentState } from "../../models/browserGroupingsComponentState"; +import { BrowserSendComponentState } from "../../models/browserSendComponentState"; import { browserSession, sessionSync } from "../decorators/session-sync-observable"; -import { Account } from "../models/account"; -import { BrowserComponentState } from "../models/browserComponentState"; -import { BrowserGroupingsComponentState } from "../models/browserGroupingsComponentState"; -import { BrowserSendComponentState } from "../models/browserSendComponentState"; import { BrowserStateService as StateServiceAbstraction } from "./abstractions/browser-state.service"; diff --git a/apps/browser/src/services/i18n.service.ts b/apps/browser/src/platform/services/i18n.service.ts similarity index 98% rename from apps/browser/src/services/i18n.service.ts rename to apps/browser/src/platform/services/i18n.service.ts index eddd2559a1a..1badfdb7cb2 100644 --- a/apps/browser/src/services/i18n.service.ts +++ b/apps/browser/src/platform/services/i18n.service.ts @@ -1,4 +1,4 @@ -import { I18nService as BaseI18nService } from "@bitwarden/common/services/i18n.service"; +import { I18nService as BaseI18nService } from "@bitwarden/common/platform/services/i18n.service"; export default class I18nService extends BaseI18nService { constructor(systemLanguage: string) { diff --git a/apps/browser/src/services/keyGeneration.service.ts b/apps/browser/src/platform/services/key-generation.service.ts similarity index 70% rename from apps/browser/src/services/keyGeneration.service.ts rename to apps/browser/src/platform/services/key-generation.service.ts index 0dbb1e81225..b2c76e1aee2 100644 --- a/apps/browser/src/services/keyGeneration.service.ts +++ b/apps/browser/src/platform/services/key-generation.service.ts @@ -1,7 +1,7 @@ -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; -import { AbstractKeyGenerationService } from "./abstractions/abstractKeyGeneration.service"; +import { AbstractKeyGenerationService } from "./abstractions/abstract-key-generation.service"; export class KeyGenerationService implements AbstractKeyGenerationService { constructor(private cryptoFunctionService: CryptoFunctionService) {} diff --git a/apps/browser/src/services/localBackedSessionStorage.service.spec.ts b/apps/browser/src/platform/services/local-backed-session-storage.service.spec.ts similarity index 94% rename from apps/browser/src/services/localBackedSessionStorage.service.spec.ts rename to apps/browser/src/platform/services/local-backed-session-storage.service.spec.ts index b5f80d4fee1..d2da5f6fc1a 100644 --- a/apps/browser/src/services/localBackedSessionStorage.service.spec.ts +++ b/apps/browser/src/platform/services/local-backed-session-storage.service.spec.ts @@ -1,15 +1,15 @@ // eslint-disable-next-line no-restricted-imports import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; -import { EncryptServiceImplementation } from "@bitwarden/common/services/cryptography/encrypt.service.implementation"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; +import { EncryptServiceImplementation } from "@bitwarden/common/platform/services/cryptography/encrypt.service.implementation"; -import BrowserLocalStorageService from "./browserLocalStorage.service"; -import BrowserMemoryStorageService from "./browserMemoryStorage.service"; -import { KeyGenerationService } from "./keyGeneration.service"; -import { LocalBackedSessionStorageService } from "./localBackedSessionStorage.service"; +import BrowserLocalStorageService from "./browser-local-storage.service"; +import BrowserMemoryStorageService from "./browser-memory-storage.service"; +import { KeyGenerationService } from "./key-generation.service"; +import { LocalBackedSessionStorageService } from "./local-backed-session-storage.service"; describe("Browser Session Storage Service", () => { let encryptService: SubstituteOf; diff --git a/apps/browser/src/services/localBackedSessionStorage.service.ts b/apps/browser/src/platform/services/local-backed-session-storage.service.ts similarity index 88% rename from apps/browser/src/services/localBackedSessionStorage.service.ts rename to apps/browser/src/platform/services/local-backed-session-storage.service.ts index 662a431b797..6c44adabccc 100644 --- a/apps/browser/src/services/localBackedSessionStorage.service.ts +++ b/apps/browser/src/platform/services/local-backed-session-storage.service.ts @@ -1,17 +1,17 @@ import { Jsonify } from "type-fest"; -import { EncryptService } from "@bitwarden/common/abstractions/encrypt.service"; -import { AbstractMemoryStorageService } from "@bitwarden/common/abstractions/storage.service"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { MemoryStorageOptions } from "@bitwarden/common/models/domain/storage-options"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { EncryptService } from "@bitwarden/common/platform/abstractions/encrypt.service"; +import { AbstractMemoryStorageService } from "@bitwarden/common/platform/abstractions/storage.service"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { MemoryStorageOptions } from "@bitwarden/common/platform/models/domain/storage-options"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { devFlag } from "../decorators/dev-flag.decorator"; import { devFlagEnabled } from "../flags"; -import { AbstractKeyGenerationService } from "./abstractions/abstractKeyGeneration.service"; -import BrowserLocalStorageService from "./browserLocalStorage.service"; -import BrowserMemoryStorageService from "./browserMemoryStorage.service"; +import { AbstractKeyGenerationService } from "./abstractions/abstract-key-generation.service"; +import BrowserLocalStorageService from "./browser-local-storage.service"; +import BrowserMemoryStorageService from "./browser-memory-storage.service"; const keys = { encKey: "localEncryptionKey", diff --git a/apps/browser/src/popup/app.component.ts b/apps/browser/src/popup/app.component.ts index d9dc602a0cc..485b283407e 100644 --- a/apps/browser/src/popup/app.component.ts +++ b/apps/browser/src/popup/app.component.ts @@ -13,14 +13,14 @@ import { filter, concatMap, Subject, takeUntil } from "rxjs"; import Swal from "sweetalert2"; import { DialogServiceAbstraction, SimpleDialogOptions } from "@bitwarden/angular/services/dialog"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; -import { BrowserApi } from "../browser/browserApi"; -import { BrowserStateService } from "../services/abstractions/browser-state.service"; +import { BrowserApi } from "../platform/browser/browser-api"; +import { BrowserStateService } from "../platform/services/abstractions/browser-state.service"; import { routerTransition } from "./app-routing.animations"; diff --git a/apps/browser/src/popup/app.module.ts b/apps/browser/src/popup/app.module.ts index 3b8501be447..d48465b0a47 100644 --- a/apps/browser/src/popup/app.module.ts +++ b/apps/browser/src/popup/app.module.ts @@ -74,7 +74,7 @@ import { VaultTimeoutInputComponent } from "./settings/vault-timeout-input.compo import { TabsComponent } from "./tabs.component"; // Register the locales for the application -import "./locales"; +import "../platform/popup/locales"; @NgModule({ imports: [ diff --git a/apps/browser/src/popup/components/pop-out.component.ts b/apps/browser/src/popup/components/pop-out.component.ts index f3cf66c13f0..b8675ec4d4c 100644 --- a/apps/browser/src/popup/components/pop-out.component.ts +++ b/apps/browser/src/popup/components/pop-out.component.ts @@ -1,6 +1,6 @@ import { Component, Input, OnInit } from "@angular/core"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { PopupUtilsService } from "../services/popup-utils.service"; diff --git a/apps/browser/src/popup/main.ts b/apps/browser/src/popup/main.ts index 3103fa2d99c..0772f3c7f09 100644 --- a/apps/browser/src/popup/main.ts +++ b/apps/browser/src/popup/main.ts @@ -1,7 +1,7 @@ import { enableProdMode } from "@angular/core"; import { platformBrowserDynamic } from "@angular/platform-browser-dynamic"; -import BrowserPlatformUtilsService from "../services/browserPlatformUtils.service"; +import BrowserPlatformUtilsService from "../platform/services/browser-platform-utils.service"; require("./scss/popup.scss"); diff --git a/apps/browser/src/popup/services/init.service.ts b/apps/browser/src/popup/services/init.service.ts index 8008f6c88ce..23ae6e8e892 100644 --- a/apps/browser/src/popup/services/init.service.ts +++ b/apps/browser/src/popup/services/init.service.ts @@ -1,11 +1,11 @@ import { Injectable } from "@angular/core"; import { AbstractThemingService } from "@bitwarden/angular/services/theming/theming.service.abstraction"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService as LogServiceAbstraction } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService as LogServiceAbstraction } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; -import { BrowserStateService as StateServiceAbstraction } from "../../services/abstractions/browser-state.service"; +import { BrowserStateService as StateServiceAbstraction } from "../../platform/services/abstractions/browser-state.service"; import { PopupUtilsService } from "./popup-utils.service"; diff --git a/apps/browser/src/popup/services/popup-search.service.ts b/apps/browser/src/popup/services/popup-search.service.ts index 21b6e307959..43fbed055e8 100644 --- a/apps/browser/src/popup/services/popup-search.service.ts +++ b/apps/browser/src/popup/services/popup-search.service.ts @@ -1,5 +1,5 @@ -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { ConsoleLogService } from "@bitwarden/common/services/consoleLog.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { ConsoleLogService } from "@bitwarden/common/platform/services/console-log.service"; import { SearchService } from "@bitwarden/common/services/search.service"; export class PopupSearchService extends SearchService { diff --git a/apps/browser/src/popup/services/popup-utils.service.ts b/apps/browser/src/popup/services/popup-utils.service.ts index 62557bf9457..1ab80a4564d 100644 --- a/apps/browser/src/popup/services/popup-utils.service.ts +++ b/apps/browser/src/popup/services/popup-utils.service.ts @@ -1,7 +1,7 @@ import { Injectable } from "@angular/core"; import { fromEvent, Subscription } from "rxjs"; -import { BrowserApi } from "../../browser/browserApi"; +import { BrowserApi } from "../../platform/browser/browser-api"; @Injectable() export class PopupUtilsService { diff --git a/apps/browser/src/popup/services/services.module.ts b/apps/browser/src/popup/services/services.module.ts index 3e505d62dff..8a2a7f7a505 100644 --- a/apps/browser/src/popup/services/services.module.ts +++ b/apps/browser/src/popup/services/services.module.ts @@ -8,34 +8,12 @@ import { JslibServicesModule } from "@bitwarden/angular/services/jslib-services. import { ThemingService } from "@bitwarden/angular/services/theming/theming.service"; import { AbstractThemingService } from "@bitwarden/angular/services/theming/theming.service.abstraction"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { AppIdService } from "@bitwarden/common/abstractions/appId.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; -import { ConfigApiServiceAbstraction } from "@bitwarden/common/abstractions/config/config-api.service.abstraction"; -import { ConfigServiceAbstraction } from "@bitwarden/common/abstractions/config/config.service.abstraction"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { EncryptService } from "@bitwarden/common/abstractions/encrypt.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; import { EventUploadService } from "@bitwarden/common/abstractions/event/event-upload.service"; -import { FileUploadService } from "@bitwarden/common/abstractions/file-upload/file-upload.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService as LogServiceAbstraction } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { NotificationsService } from "@bitwarden/common/abstractions/notifications.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService as SearchServiceAbstraction } from "@bitwarden/common/abstractions/search.service"; import { SettingsService } from "@bitwarden/common/abstractions/settings.service"; -import { - StateService as BaseStateServiceAbstraction, - StateService, -} from "@bitwarden/common/abstractions/state.service"; -import { StateMigrationService } from "@bitwarden/common/abstractions/stateMigration.service"; -import { - AbstractMemoryStorageService, - AbstractStorageService, -} from "@bitwarden/common/abstractions/storage.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; @@ -56,10 +34,32 @@ import { TokenService } from "@bitwarden/common/auth/abstractions/token.service" import { TwoFactorService } from "@bitwarden/common/auth/abstractions/two-factor.service"; import { AuthService } from "@bitwarden/common/auth/services/auth.service"; import { LoginService } from "@bitwarden/common/auth/services/login.service"; -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; -import { GlobalState } from "@bitwarden/common/models/domain/global-state"; -import { ConsoleLogService } from "@bitwarden/common/services/consoleLog.service"; -import { ContainerService } from "@bitwarden/common/services/container.service"; +import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { ConfigApiServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config-api.service.abstraction"; +import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EncryptService } from "@bitwarden/common/platform/abstractions/encrypt.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { FileUploadService } from "@bitwarden/common/platform/abstractions/file-upload/file-upload.service"; +import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService as LogServiceAbstraction } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateMigrationService } from "@bitwarden/common/platform/abstractions/state-migration.service"; +import { + StateService as BaseStateServiceAbstraction, + StateService, +} from "@bitwarden/common/platform/abstractions/state.service"; +import { + AbstractMemoryStorageService, + AbstractStorageService, +} from "@bitwarden/common/platform/abstractions/storage.service"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; +import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state"; +import { ConsoleLogService } from "@bitwarden/common/platform/services/console-log.service"; +import { ContainerService } from "@bitwarden/common/platform/services/container.service"; import { SearchService } from "@bitwarden/common/services/search.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { UsernameGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/username"; @@ -86,18 +86,18 @@ import { BrowserPolicyService } from "../../admin-console/services/browser-polic import { LockGuardService, UnauthGuardService } from "../../auth/popup/services"; import { AutofillService } from "../../autofill/services/abstractions/autofill.service"; import MainBackground from "../../background/main.background"; -import { BrowserApi } from "../../browser/browserApi"; import { Account } from "../../models/account"; -import { BrowserStateService as StateServiceAbstraction } from "../../services/abstractions/browser-state.service"; -import { BrowserConfigService } from "../../services/browser-config.service"; -import { BrowserEnvironmentService } from "../../services/browser-environment.service"; -import { BrowserI18nService } from "../../services/browser-i18n.service"; +import { BrowserApi } from "../../platform/browser/browser-api"; +import { BrowserStateService as StateServiceAbstraction } from "../../platform/services/abstractions/browser-state.service"; +import { BrowserConfigService } from "../../platform/services/browser-config.service"; +import { BrowserEnvironmentService } from "../../platform/services/browser-environment.service"; +import { BrowserFileDownloadService } from "../../platform/services/browser-file-download.service"; +import { BrowserI18nService } from "../../platform/services/browser-i18n.service"; +import BrowserMessagingPrivateModePopupService from "../../platform/services/browser-messaging-private-mode-popup.service"; +import BrowserMessagingService from "../../platform/services/browser-messaging.service"; +import { BrowserStateService } from "../../platform/services/browser-state.service"; import { BrowserSendService } from "../../services/browser-send.service"; import { BrowserSettingsService } from "../../services/browser-settings.service"; -import { BrowserStateService } from "../../services/browser-state.service"; -import { BrowserFileDownloadService } from "../../services/browserFileDownloadService"; -import BrowserMessagingService from "../../services/browserMessaging.service"; -import BrowserMessagingPrivateModePopupService from "../../services/browserMessagingPrivateModePopup.service"; import { PasswordRepromptService } from "../../vault/popup/services/password-reprompt.service"; import { BrowserFolderService } from "../../vault/services/browser-folder.service"; import { VaultFilterService } from "../../vault/services/vault-filter.service"; diff --git a/apps/browser/src/popup/settings/about.component.ts b/apps/browser/src/popup/settings/about.component.ts index 338a00e2685..459dd7850fa 100644 --- a/apps/browser/src/popup/settings/about.component.ts +++ b/apps/browser/src/popup/settings/about.component.ts @@ -1,11 +1,11 @@ import { Component } from "@angular/core"; import { Observable } from "rxjs"; -import { ConfigServiceAbstraction } from "@bitwarden/common/abstractions/config/config.service.abstraction"; -import { ServerConfig } from "@bitwarden/common/abstractions/config/server-config"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; +import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction"; +import { ServerConfig } from "@bitwarden/common/platform/abstractions/config/server-config"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; -import { BrowserApi } from "../../browser/browserApi"; +import { BrowserApi } from "../../platform/browser/browser-api"; @Component({ selector: "app-about", diff --git a/apps/browser/src/popup/settings/autofill.component.ts b/apps/browser/src/popup/settings/autofill.component.ts index 05975e60920..477c0592664 100644 --- a/apps/browser/src/popup/settings/autofill.component.ts +++ b/apps/browser/src/popup/settings/autofill.component.ts @@ -1,11 +1,11 @@ import { Component, OnInit } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { UriMatchType } from "@bitwarden/common/enums"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; -import { BrowserApi } from "../../browser/browserApi"; +import { BrowserApi } from "../../platform/browser/browser-api"; @Component({ selector: "app-autofill", diff --git a/apps/browser/src/popup/settings/excluded-domains.component.ts b/apps/browser/src/popup/settings/excluded-domains.component.ts index 74c336ad85b..7adedd72240 100644 --- a/apps/browser/src/popup/settings/excluded-domains.component.ts +++ b/apps/browser/src/popup/settings/excluded-domains.component.ts @@ -1,13 +1,13 @@ import { Component, NgZone, OnDestroy, OnInit } from "@angular/core"; import { Router } from "@angular/router"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; -import { BrowserApi } from "../../browser/browserApi"; +import { BrowserApi } from "../../platform/browser/browser-api"; interface ExcludedDomain { uri: string; diff --git a/apps/browser/src/popup/settings/folder-add-edit.component.ts b/apps/browser/src/popup/settings/folder-add-edit.component.ts index 92db7e4ba56..781dbff5721 100644 --- a/apps/browser/src/popup/settings/folder-add-edit.component.ts +++ b/apps/browser/src/popup/settings/folder-add-edit.component.ts @@ -4,9 +4,9 @@ import { first } from "rxjs/operators"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { FolderAddEditComponent as BaseFolderAddEditComponent } from "@bitwarden/angular/vault/components/folder-add-edit.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; diff --git a/apps/browser/src/popup/settings/help-and-feedback.component.ts b/apps/browser/src/popup/settings/help-and-feedback.component.ts index 006f76f48bc..0ff9887353c 100644 --- a/apps/browser/src/popup/settings/help-and-feedback.component.ts +++ b/apps/browser/src/popup/settings/help-and-feedback.component.ts @@ -1,6 +1,6 @@ import { Component } from "@angular/core"; -import { BrowserApi } from "../../browser/browserApi"; +import { BrowserApi } from "../../platform/browser/browser-api"; @Component({ selector: "app-help-and-feedback", diff --git a/apps/browser/src/popup/settings/options.component.ts b/apps/browser/src/popup/settings/options.component.ts index e5d7f4b80ed..b020816158c 100644 --- a/apps/browser/src/popup/settings/options.component.ts +++ b/apps/browser/src/popup/settings/options.component.ts @@ -1,12 +1,12 @@ import { Component, OnInit } from "@angular/core"; import { AbstractThemingService } from "@bitwarden/angular/services/theming/theming.service.abstraction"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { SettingsService } from "@bitwarden/common/abstractions/settings.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; import { ThemeType, UriMatchType } from "@bitwarden/common/enums"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Component({ selector: "app-options", diff --git a/apps/browser/src/popup/settings/premium.component.ts b/apps/browser/src/popup/settings/premium.component.ts index 63d45d79141..426347ada97 100644 --- a/apps/browser/src/popup/settings/premium.component.ts +++ b/apps/browser/src/popup/settings/premium.component.ts @@ -4,10 +4,10 @@ import { Component } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { PremiumComponent as BasePremiumComponent } from "@bitwarden/angular/vault/components/premium.component"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Component({ selector: "app-premium", diff --git a/apps/browser/src/popup/settings/settings.component.ts b/apps/browser/src/popup/settings/settings.component.ts index 383e18de292..562cf55f2da 100644 --- a/apps/browser/src/popup/settings/settings.component.ts +++ b/apps/browser/src/popup/settings/settings.component.ts @@ -6,12 +6,6 @@ import Swal from "sweetalert2"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; @@ -19,9 +13,15 @@ import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; import { DeviceType } from "@bitwarden/common/enums"; import { VaultTimeoutAction } from "@bitwarden/common/enums/vault-timeout-action.enum"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; -import { BrowserApi } from "../../browser/browserApi"; import { BiometricErrors, BiometricErrorTypes } from "../../models/biometricErrors"; +import { BrowserApi } from "../../platform/browser/browser-api"; import { SetPinComponent } from "../components/set-pin.component"; import { PopupUtilsService } from "../services/popup-utils.service"; diff --git a/apps/browser/src/popup/settings/sync.component.ts b/apps/browser/src/popup/settings/sync.component.ts index 2ce6d2c27b3..ffc20363f71 100644 --- a/apps/browser/src/popup/settings/sync.component.ts +++ b/apps/browser/src/popup/settings/sync.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; @Component({ diff --git a/apps/browser/src/services/browser-send.service.ts b/apps/browser/src/services/browser-send.service.ts index d937a1387fb..8a197444a98 100644 --- a/apps/browser/src/services/browser-send.service.ts +++ b/apps/browser/src/services/browser-send.service.ts @@ -4,7 +4,7 @@ import { Send } from "@bitwarden/common/tools/send/models/domain/send"; import { SendView } from "@bitwarden/common/tools/send/models/view/send.view"; import { SendService } from "@bitwarden/common/tools/send/services/send.service"; -import { browserSession, sessionSync } from "../decorators/session-sync-observable"; +import { browserSession, sessionSync } from "../platform/decorators/session-sync-observable"; @browserSession export class BrowserSendService extends SendService { diff --git a/apps/browser/src/services/browser-settings.service.ts b/apps/browser/src/services/browser-settings.service.ts index 0fc71eddc61..89378bcc745 100644 --- a/apps/browser/src/services/browser-settings.service.ts +++ b/apps/browser/src/services/browser-settings.service.ts @@ -1,9 +1,9 @@ import { BehaviorSubject } from "rxjs"; -import { AccountSettingsSettings } from "@bitwarden/common/models/domain/account"; +import { AccountSettingsSettings } from "@bitwarden/common/platform/models/domain/account"; import { SettingsService } from "@bitwarden/common/services/settings.service"; -import { browserSession, sessionSync } from "../decorators/session-sync-observable"; +import { browserSession, sessionSync } from "../platform/decorators/session-sync-observable"; @browserSession export class BrowserSettingsService extends SettingsService { diff --git a/apps/browser/src/tools/popup/generator/generator.component.ts b/apps/browser/src/tools/popup/generator/generator.component.ts index e869f6d7794..03d7442e6eb 100644 --- a/apps/browser/src/tools/popup/generator/generator.component.ts +++ b/apps/browser/src/tools/popup/generator/generator.component.ts @@ -3,10 +3,10 @@ import { Component } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { GeneratorComponent as BaseGeneratorComponent } from "@bitwarden/angular/tools/generator/components/generator.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { UsernameGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/username"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; diff --git a/apps/browser/src/tools/popup/generator/password-generator-history.component.ts b/apps/browser/src/tools/popup/generator/password-generator-history.component.ts index 18110fc5d96..fbe1ba10d33 100644 --- a/apps/browser/src/tools/popup/generator/password-generator-history.component.ts +++ b/apps/browser/src/tools/popup/generator/password-generator-history.component.ts @@ -2,8 +2,8 @@ import { Location } from "@angular/common"; import { Component } from "@angular/core"; import { PasswordGeneratorHistoryComponent as BasePasswordGeneratorHistoryComponent } from "@bitwarden/angular/tools/generator/components/password-generator-history.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; @Component({ diff --git a/apps/browser/src/tools/popup/send/efflux-dates.component.ts b/apps/browser/src/tools/popup/send/efflux-dates.component.ts index 0578cce2dda..3d575b41fa7 100644 --- a/apps/browser/src/tools/popup/send/efflux-dates.component.ts +++ b/apps/browser/src/tools/popup/send/efflux-dates.component.ts @@ -3,8 +3,8 @@ import { Component, EventEmitter, Input, Output } from "@angular/core"; import { ControlContainer, NgForm } from "@angular/forms"; import { EffluxDatesComponent as BaseEffluxDatesComponent } from "@bitwarden/angular/tools/send/efflux-dates.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-send-efflux-dates", diff --git a/apps/browser/src/tools/popup/send/send-add-edit.component.ts b/apps/browser/src/tools/popup/send/send-add-edit.component.ts index 8a45d39dcc8..aaf951e036f 100644 --- a/apps/browser/src/tools/popup/send/send-add-edit.component.ts +++ b/apps/browser/src/tools/popup/send/send-add-edit.component.ts @@ -5,17 +5,17 @@ import { first } from "rxjs/operators"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/tools/send/add-edit.component"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction"; +import { BrowserStateService } from "../../../platform/services/abstractions/browser-state.service"; import { PopupUtilsService } from "../../../popup/services/popup-utils.service"; -import { BrowserStateService } from "../../../services/abstractions/browser-state.service"; @Component({ selector: "app-send-add-edit", diff --git a/apps/browser/src/tools/popup/send/send-groupings.component.ts b/apps/browser/src/tools/popup/send/send-groupings.component.ts index 8c84df39768..596d6e5ed35 100644 --- a/apps/browser/src/tools/popup/send/send-groupings.component.ts +++ b/apps/browser/src/tools/popup/send/send-groupings.component.ts @@ -3,13 +3,13 @@ import { Router } from "@angular/router"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { SendComponent as BaseSendComponent } from "@bitwarden/angular/tools/send/send.component"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { SendView } from "@bitwarden/common/tools/send/models/view/send.view"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; @@ -17,8 +17,8 @@ import { SendService } from "@bitwarden/common/tools/send/services/send.service. import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { BrowserSendComponentState } from "../../../models/browserSendComponentState"; +import { BrowserStateService } from "../../../platform/services/abstractions/browser-state.service"; import { PopupUtilsService } from "../../../popup/services/popup-utils.service"; -import { BrowserStateService } from "../../../services/abstractions/browser-state.service"; const ComponentId = "SendComponent"; diff --git a/apps/browser/src/tools/popup/send/send-type.component.ts b/apps/browser/src/tools/popup/send/send-type.component.ts index f7637070413..c76561586d0 100644 --- a/apps/browser/src/tools/popup/send/send-type.component.ts +++ b/apps/browser/src/tools/popup/send/send-type.component.ts @@ -5,21 +5,21 @@ import { first } from "rxjs/operators"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { SendComponent as BaseSendComponent } from "@bitwarden/angular/tools/send/send.component"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { SendView } from "@bitwarden/common/tools/send/models/view/send.view"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction"; import { BrowserComponentState } from "../../../models/browserComponentState"; +import { BrowserStateService } from "../../../platform/services/abstractions/browser-state.service"; import { PopupUtilsService } from "../../../popup/services/popup-utils.service"; -import { BrowserStateService } from "../../../services/abstractions/browser-state.service"; const ComponentId = "SendTypeComponent"; diff --git a/apps/browser/src/tools/popup/settings/export.component.ts b/apps/browser/src/tools/popup/settings/export.component.ts index b90dda05232..c56b5c1f252 100644 --- a/apps/browser/src/tools/popup/settings/export.component.ts +++ b/apps/browser/src/tools/popup/settings/export.component.ts @@ -4,14 +4,14 @@ import { Router } from "@angular/router"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ExportComponent as BaseExportComponent } from "@bitwarden/angular/tools/export/components/export.component"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { VaultExportServiceAbstraction } from "@bitwarden/exporter/vault-export"; @Component({ diff --git a/apps/browser/src/vault/background/service_factories/cipher-service.factory.ts b/apps/browser/src/vault/background/service_factories/cipher-service.factory.ts index 24cc6f2f89a..006daadc1af 100644 --- a/apps/browser/src/vault/background/service_factories/cipher-service.factory.ts +++ b/apps/browser/src/vault/background/service_factories/cipher-service.factory.ts @@ -1,43 +1,43 @@ import { CipherService as AbstractCipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { CipherService } from "@bitwarden/common/vault/services/cipher.service"; -import { - apiServiceFactory, - ApiServiceInitOptions, -} from "../../../background/service_factories/api-service.factory"; import { CipherFileUploadServiceInitOptions, cipherFileUploadServiceFactory, -} from "../../../background/service_factories/cipher-file-upload-service.factory"; +} from "../../../background/service-factories/cipher-file-upload-service.factory"; +import { + searchServiceFactory, + SearchServiceInitOptions, +} from "../../../background/service-factories/search-service.factory"; +import { + SettingsServiceInitOptions, + settingsServiceFactory, +} from "../../../background/service-factories/settings-service.factory"; +import { + apiServiceFactory, + ApiServiceInitOptions, +} from "../../../platform/background/service-factories/api-service.factory"; import { - cryptoServiceFactory, CryptoServiceInitOptions, -} from "../../../background/service_factories/crypto-service.factory"; + cryptoServiceFactory, +} from "../../../platform/background/service-factories/crypto-service.factory"; import { - encryptServiceFactory, EncryptServiceInitOptions, -} from "../../../background/service_factories/encrypt-service.factory"; + encryptServiceFactory, +} from "../../../platform/background/service-factories/encrypt-service.factory"; import { CachedServices, factory, FactoryOptions, -} from "../../../background/service_factories/factory-options"; +} from "../../../platform/background/service-factories/factory-options"; import { i18nServiceFactory, I18nServiceInitOptions, -} from "../../../background/service_factories/i18n-service.factory"; -import { - searchServiceFactory, - SearchServiceInitOptions, -} from "../../../background/service_factories/search-service.factory"; -import { - SettingsServiceInitOptions, - settingsServiceFactory, -} from "../../../background/service_factories/settings-service.factory"; +} from "../../../platform/background/service-factories/i18n-service.factory"; import { stateServiceFactory, StateServiceInitOptions, -} from "../../../background/service_factories/state-service.factory"; +} from "../../../platform/background/service-factories/state-service.factory"; type CipherServiceFactoryOptions = FactoryOptions; diff --git a/apps/browser/src/vault/background/service_factories/folder-service.factory.ts b/apps/browser/src/vault/background/service_factories/folder-service.factory.ts index ba6cad613fc..b33c79a012b 100644 --- a/apps/browser/src/vault/background/service_factories/folder-service.factory.ts +++ b/apps/browser/src/vault/background/service_factories/folder-service.factory.ts @@ -1,22 +1,22 @@ import { FolderService as AbstractFolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { - cryptoServiceFactory, CryptoServiceInitOptions, -} from "../../../background/service_factories/crypto-service.factory"; + cryptoServiceFactory, +} from "../../../platform/background/service-factories/crypto-service.factory"; import { CachedServices, factory, FactoryOptions, -} from "../../../background/service_factories/factory-options"; +} from "../../../platform/background/service-factories/factory-options"; import { i18nServiceFactory, I18nServiceInitOptions, -} from "../../../background/service_factories/i18n-service.factory"; +} from "../../../platform/background/service-factories/i18n-service.factory"; import { stateServiceFactory as stateServiceFactory, StateServiceInitOptions, -} from "../../../background/service_factories/state-service.factory"; +} from "../../../platform/background/service-factories/state-service.factory"; import { BrowserFolderService } from "../../services/browser-folder.service"; import { cipherServiceFactory, CipherServiceInitOptions } from "./cipher-service.factory"; diff --git a/apps/browser/src/vault/background/service_factories/sync-notifier-service.factory.ts b/apps/browser/src/vault/background/service_factories/sync-notifier-service.factory.ts index 78ebb0c7730..9e976b3bf75 100644 --- a/apps/browser/src/vault/background/service_factories/sync-notifier-service.factory.ts +++ b/apps/browser/src/vault/background/service_factories/sync-notifier-service.factory.ts @@ -5,7 +5,7 @@ import { FactoryOptions, CachedServices, factory, -} from "../../../background/service_factories/factory-options"; +} from "../../../platform/background/service-factories/factory-options"; type SyncNotifierServiceFactoryOptions = FactoryOptions; diff --git a/apps/browser/src/vault/popup/components/action-buttons.component.ts b/apps/browser/src/vault/popup/components/action-buttons.component.ts index fb6f7d78110..110e4ef32a5 100644 --- a/apps/browser/src/vault/popup/components/action-buttons.component.ts +++ b/apps/browser/src/vault/popup/components/action-buttons.component.ts @@ -1,11 +1,11 @@ import { Component, EventEmitter, Input, Output } from "@angular/core"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; import { EventType } from "@bitwarden/common/enums"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { CipherRepromptType } from "@bitwarden/common/vault/enums/cipher-reprompt-type"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; diff --git a/apps/browser/src/vault/popup/components/vault/add-edit-custom-fields.component.ts b/apps/browser/src/vault/popup/components/vault/add-edit-custom-fields.component.ts index 517e5016c6f..6992455a8a6 100644 --- a/apps/browser/src/vault/popup/components/vault/add-edit-custom-fields.component.ts +++ b/apps/browser/src/vault/popup/components/vault/add-edit-custom-fields.component.ts @@ -2,7 +2,7 @@ import { Component } from "@angular/core"; import { AddEditCustomFieldsComponent as BaseAddEditCustomFieldsComponent } from "@bitwarden/angular/vault/components/add-edit-custom-fields.component"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @Component({ selector: "app-vault-add-edit-custom-fields", diff --git a/apps/browser/src/vault/popup/components/vault/add-edit.component.ts b/apps/browser/src/vault/popup/components/vault/add-edit.component.ts index 1c4dc5dadef..f6e8c1f03b6 100644 --- a/apps/browser/src/vault/popup/components/vault/add-edit.component.ts +++ b/apps/browser/src/vault/popup/components/vault/add-edit.component.ts @@ -7,14 +7,14 @@ import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/vault/components/add-edit.component"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; @@ -22,7 +22,7 @@ import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/pa import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { LoginUriView } from "@bitwarden/common/vault/models/view/login-uri.view"; -import { BrowserApi } from "../../../../browser/browserApi"; +import { BrowserApi } from "../../../../platform/browser/browser-api"; import { PopupUtilsService } from "../../../../popup/services/popup-utils.service"; @Component({ diff --git a/apps/browser/src/vault/popup/components/vault/attachments.component.ts b/apps/browser/src/vault/popup/components/vault/attachments.component.ts index 68f59def546..7c1107caa42 100644 --- a/apps/browser/src/vault/popup/components/vault/attachments.component.ts +++ b/apps/browser/src/vault/popup/components/vault/attachments.component.ts @@ -6,12 +6,12 @@ import { first } from "rxjs/operators"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { AttachmentsComponent as BaseAttachmentsComponent } from "@bitwarden/angular/vault/components/attachments.component"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; @Component({ diff --git a/apps/browser/src/vault/popup/components/vault/collections.component.ts b/apps/browser/src/vault/popup/components/vault/collections.component.ts index 3f61c1f23ff..1b7570eaf6e 100644 --- a/apps/browser/src/vault/popup/components/vault/collections.component.ts +++ b/apps/browser/src/vault/popup/components/vault/collections.component.ts @@ -4,10 +4,10 @@ import { ActivatedRoute } from "@angular/router"; import { first } from "rxjs/operators"; import { CollectionsComponent as BaseCollectionsComponent } from "@bitwarden/angular/admin-console/components/collections.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; @Component({ diff --git a/apps/browser/src/vault/popup/components/vault/current-tab.component.ts b/apps/browser/src/vault/popup/components/vault/current-tab.component.ts index 1a83142cf11..a48c7003759 100644 --- a/apps/browser/src/vault/popup/components/vault/current-tab.component.ts +++ b/apps/browser/src/vault/popup/components/vault/current-tab.component.ts @@ -3,13 +3,13 @@ import { Router } from "@angular/router"; import { Subject } from "rxjs"; import { debounceTime, takeUntil } from "rxjs/operators"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; @@ -18,7 +18,7 @@ import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { AutofillService } from "../../../../autofill/services/abstractions/autofill.service"; -import { BrowserApi } from "../../../../browser/browserApi"; +import { BrowserApi } from "../../../../platform/browser/browser-api"; import { PopupUtilsService } from "../../../../popup/services/popup-utils.service"; import { VaultFilterService } from "../../../services/vault-filter.service"; diff --git a/apps/browser/src/vault/popup/components/vault/password-history.component.ts b/apps/browser/src/vault/popup/components/vault/password-history.component.ts index 44c5d683b83..1dd7697a7d5 100644 --- a/apps/browser/src/vault/popup/components/vault/password-history.component.ts +++ b/apps/browser/src/vault/popup/components/vault/password-history.component.ts @@ -4,8 +4,8 @@ import { ActivatedRoute } from "@angular/router"; import { first } from "rxjs/operators"; import { PasswordHistoryComponent as BasePasswordHistoryComponent } from "@bitwarden/angular/vault/components/password-history.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; @Component({ diff --git a/apps/browser/src/vault/popup/components/vault/share.component.ts b/apps/browser/src/vault/popup/components/vault/share.component.ts index c7dde9ab78d..e6103b4f261 100644 --- a/apps/browser/src/vault/popup/components/vault/share.component.ts +++ b/apps/browser/src/vault/popup/components/vault/share.component.ts @@ -3,11 +3,11 @@ import { ActivatedRoute, Router } from "@angular/router"; import { first } from "rxjs/operators"; import { ShareComponent as BaseShareComponent } from "@bitwarden/angular/components/share.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; @Component({ diff --git a/apps/browser/src/vault/popup/components/vault/vault-filter.component.ts b/apps/browser/src/vault/popup/components/vault/vault-filter.component.ts index a5eaa8bc383..1b41a9d0a1b 100644 --- a/apps/browser/src/vault/popup/components/vault/vault-filter.component.ts +++ b/apps/browser/src/vault/popup/components/vault/vault-filter.component.ts @@ -5,22 +5,22 @@ import { firstValueFrom } from "rxjs"; import { first } from "rxjs/operators"; import { VaultFilter } from "@bitwarden/angular/vault/vault-filter/models/vault-filter.model"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; -import { BrowserApi } from "../../../../browser/browserApi"; import { BrowserGroupingsComponentState } from "../../../../models/browserGroupingsComponentState"; +import { BrowserApi } from "../../../../platform/browser/browser-api"; +import { BrowserStateService } from "../../../../platform/services/abstractions/browser-state.service"; import { PopupUtilsService } from "../../../../popup/services/popup-utils.service"; -import { BrowserStateService } from "../../../../services/abstractions/browser-state.service"; import { VaultFilterService } from "../../../services/vault-filter.service"; const ComponentId = "VaultComponent"; diff --git a/apps/browser/src/vault/popup/components/vault/vault-items.component.ts b/apps/browser/src/vault/popup/components/vault/vault-items.component.ts index c3c6da6332a..1ce8b3ab41b 100644 --- a/apps/browser/src/vault/popup/components/vault/vault-items.component.ts +++ b/apps/browser/src/vault/popup/components/vault/vault-items.component.ts @@ -5,24 +5,24 @@ import { first } from "rxjs/operators"; import { VaultItemsComponent as BaseVaultItemsComponent } from "@bitwarden/angular/vault/components/vault-items.component"; import { VaultFilter } from "@bitwarden/angular/vault/vault-filter/models/vault-filter.model"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; -import { BrowserApi } from "../../../../browser/browserApi"; import { BrowserComponentState } from "../../../../models/browserComponentState"; +import { BrowserApi } from "../../../../platform/browser/browser-api"; +import { BrowserStateService } from "../../../../platform/services/abstractions/browser-state.service"; import { PopupUtilsService } from "../../../../popup/services/popup-utils.service"; -import { BrowserStateService } from "../../../../services/abstractions/browser-state.service"; import { VaultFilterService } from "../../../services/vault-filter.service"; const ComponentId = "VaultItemsComponent"; diff --git a/apps/browser/src/vault/popup/components/vault/vault-select.component.ts b/apps/browser/src/vault/popup/components/vault/vault-select.component.ts index aea920ad2a1..c9049c6ee21 100644 --- a/apps/browser/src/vault/popup/components/vault/vault-select.component.ts +++ b/apps/browser/src/vault/popup/components/vault/vault-select.component.ts @@ -15,11 +15,11 @@ import { } from "@angular/core"; import { BehaviorSubject, concatMap, map, merge, Observable, Subject, takeUntil } from "rxjs"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { VaultFilterService } from "../../../services/vault-filter.service"; diff --git a/apps/browser/src/vault/popup/components/vault/view.component.ts b/apps/browser/src/vault/popup/components/vault/view.component.ts index 237a4cfed21..efdb48b95cd 100644 --- a/apps/browser/src/vault/popup/components/vault/view.component.ts +++ b/apps/browser/src/vault/popup/components/vault/view.component.ts @@ -7,17 +7,17 @@ import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ViewComponent as BaseViewComponent } from "@bitwarden/angular/vault/components/view.component"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; import { TokenService } from "@bitwarden/common/auth/abstractions/token.service"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; @@ -26,7 +26,7 @@ import { Cipher } from "@bitwarden/common/vault/models/domain/cipher"; import { LoginUriView } from "@bitwarden/common/vault/models/view/login-uri.view"; import { AutofillService } from "../../../../autofill/services/abstractions/autofill.service"; -import { BrowserApi } from "../../../../browser/browserApi"; +import { BrowserApi } from "../../../../platform/browser/browser-api"; import { PopupUtilsService } from "../../../../popup/services/popup-utils.service"; const BroadcasterSubscriptionId = "ChildViewComponent"; diff --git a/apps/browser/src/vault/services/browser-folder.service.ts b/apps/browser/src/vault/services/browser-folder.service.ts index ca7b57989ff..b86dd2d5f1f 100644 --- a/apps/browser/src/vault/services/browser-folder.service.ts +++ b/apps/browser/src/vault/services/browser-folder.service.ts @@ -4,7 +4,7 @@ import { Folder } from "@bitwarden/common/vault/models/domain/folder"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; import { FolderService as BaseFolderService } from "@bitwarden/common/vault/services/folder/folder.service"; -import { browserSession, sessionSync } from "../../decorators/session-sync-observable"; +import { browserSession, sessionSync } from "../../platform/decorators/session-sync-observable"; @browserSession export class BrowserFolderService extends BaseFolderService { diff --git a/apps/browser/src/vault/services/vault-filter.service.ts b/apps/browser/src/vault/services/vault-filter.service.ts index 4b7c497fd48..4b8b9de7085 100644 --- a/apps/browser/src/vault/services/vault-filter.service.ts +++ b/apps/browser/src/vault/services/vault-filter.service.ts @@ -1,9 +1,9 @@ import { VaultFilter } from "@bitwarden/angular/vault/vault-filter/models/vault-filter.model"; import { VaultFilterService as BaseVaultFilterService } from "@bitwarden/angular/vault/vault-filter/services/vault-filter.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; diff --git a/apps/browser/tsconfig.json b/apps/browser/tsconfig.json index fa3df30d131..7744c082f17 100644 --- a/apps/browser/tsconfig.json +++ b/apps/browser/tsconfig.json @@ -20,5 +20,5 @@ "strictTemplates": true, "preserveWhitespaces": true }, - "include": ["src", "../../libs/common/src/services/**/*.worker.ts"] + "include": ["src", "../../libs/common/src/platform/services/**/*.worker.ts"] } diff --git a/apps/browser/webpack.config.js b/apps/browser/webpack.config.js index 546f2322b9a..992462b615d 100644 --- a/apps/browser/webpack.config.js +++ b/apps/browser/webpack.config.js @@ -148,7 +148,7 @@ const mainConfig = { "content/contextMenuHandler": "./src/autofill/content/context-menu-handler.ts", "content/message_handler": "./src/autofill/content/message_handler.ts", "notification/bar": "./src/autofill/notification/bar.ts", - "encrypt-worker": "../../libs/common/src/services/cryptography/encrypt.worker.ts", + "encrypt-worker": "../../libs/common/src/platform/services/cryptography/encrypt.worker.ts", }, optimization: { minimize: ENV !== "development", @@ -241,7 +241,7 @@ if (manifestVersion == 2) { // Manifest V2 uses Background Pages which requires a html page. mainConfig.plugins.push( new HtmlWebpackPlugin({ - template: "./src/background.html", + template: "./src/platform/background.html", filename: "background.html", chunks: ["vendor", "background"], }) @@ -249,7 +249,7 @@ if (manifestVersion == 2) { // Manifest V2 background pages can be run through the regular build pipeline. // Since it's a standard webpage. - mainConfig.entry.background = "./src/background.ts"; + mainConfig.entry.background = "./src/platform/background.ts"; configs.push(mainConfig); } else { @@ -264,7 +264,7 @@ if (manifestVersion == 2) { name: "background", mode: ENV, devtool: false, - entry: "./src/background.ts", + entry: "./src/platform/background.ts", target: "webworker", output: { filename: "background.js", diff --git a/apps/cli/src/admin-console/commands/confirm.command.ts b/apps/cli/src/admin-console/commands/confirm.command.ts index c91af4d6683..912c8417753 100644 --- a/apps/cli/src/admin-console/commands/confirm.command.ts +++ b/apps/cli/src/admin-console/commands/confirm.command.ts @@ -1,8 +1,8 @@ import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; import { OrganizationUserConfirmRequest } from "@bitwarden/common/abstractions/organization-user/requests"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { Response } from "../../models/response"; diff --git a/apps/cli/src/auth/commands/login.command.ts b/apps/cli/src/auth/commands/login.command.ts index 1a62543a1d1..b8d8d1335fd 100644 --- a/apps/cli/src/auth/commands/login.command.ts +++ b/apps/cli/src/auth/commands/login.command.ts @@ -6,11 +6,6 @@ import Separator from "inquirer/lib/objects/separator"; import { firstValueFrom } from "rxjs"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; @@ -30,10 +25,15 @@ import { PasswordRequest } from "@bitwarden/common/auth/models/request/password. import { TwoFactorEmailRequest } from "@bitwarden/common/auth/models/request/two-factor-email.request"; import { UpdateTempPasswordRequest } from "@bitwarden/common/auth/models/request/update-temp-password.request"; import { NodeUtils } from "@bitwarden/common/misc/nodeUtils"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; diff --git a/apps/cli/src/auth/commands/logout.command.ts b/apps/cli/src/auth/commands/logout.command.ts index a82edc62f9c..a2dce59da3f 100644 --- a/apps/cli/src/auth/commands/logout.command.ts +++ b/apps/cli/src/auth/commands/logout.command.ts @@ -1,5 +1,5 @@ -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { Response } from "../../models/response"; import { MessageResponse } from "../../models/response/message.response"; diff --git a/apps/cli/src/auth/commands/unlock.command.ts b/apps/cli/src/auth/commands/unlock.command.ts index bfe609f4f3a..30625672126 100644 --- a/apps/cli/src/auth/commands/unlock.command.ts +++ b/apps/cli/src/auth/commands/unlock.command.ts @@ -1,14 +1,14 @@ import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; import { SecretVerificationRequest } from "@bitwarden/common/auth/models/request/secret-verification.request"; import { HashPurpose } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { ConsoleLogService } from "@bitwarden/common/services/consoleLog.service"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { ConsoleLogService } from "@bitwarden/common/platform/services/console-log.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { ConvertToKeyConnectorCommand } from "../../commands/convert-to-key-connector.command"; diff --git a/apps/cli/src/bw.ts b/apps/cli/src/bw.ts index b3696db0c23..956ae23b008 100644 --- a/apps/cli/src/bw.ts +++ b/apps/cli/src/bw.ts @@ -20,24 +20,24 @@ import { TwoFactorService } from "@bitwarden/common/auth/services/two-factor.ser import { UserVerificationApiService } from "@bitwarden/common/auth/services/user-verification/user-verification-api.service"; import { UserVerificationService } from "@bitwarden/common/auth/services/user-verification/user-verification.service"; import { ClientType, KeySuffixOptions, LogLevelType } from "@bitwarden/common/enums"; -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; -import { Account } from "@bitwarden/common/models/domain/account"; -import { GlobalState } from "@bitwarden/common/models/domain/global-state"; -import { AppIdService } from "@bitwarden/common/services/appId.service"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; +import { Account } from "@bitwarden/common/platform/models/domain/account"; +import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state"; +import { AppIdService } from "@bitwarden/common/platform/services/app-id.service"; +import { BroadcasterService } from "@bitwarden/common/platform/services/broadcaster.service"; +import { ContainerService } from "@bitwarden/common/platform/services/container.service"; +import { CryptoService } from "@bitwarden/common/platform/services/crypto.service"; +import { EncryptServiceImplementation } from "@bitwarden/common/platform/services/cryptography/encrypt.service.implementation"; +import { EnvironmentService } from "@bitwarden/common/platform/services/environment.service"; +import { FileUploadService } from "@bitwarden/common/platform/services/file-upload/file-upload.service"; +import { MemoryStorageService } from "@bitwarden/common/platform/services/memory-storage.service"; +import { NoopMessagingService } from "@bitwarden/common/platform/services/noop-messaging.service"; +import { StateMigrationService } from "@bitwarden/common/platform/services/state-migration.service"; +import { StateService } from "@bitwarden/common/platform/services/state.service"; import { AuditService } from "@bitwarden/common/services/audit.service"; -import { BroadcasterService } from "@bitwarden/common/services/broadcaster.service"; -import { ContainerService } from "@bitwarden/common/services/container.service"; -import { CryptoService } from "@bitwarden/common/services/crypto.service"; -import { EncryptServiceImplementation } from "@bitwarden/common/services/cryptography/encrypt.service.implementation"; -import { EnvironmentService } from "@bitwarden/common/services/environment.service"; -import { FileUploadService } from "@bitwarden/common/services/file-upload/file-upload.service"; -import { MemoryStorageService } from "@bitwarden/common/services/memoryStorage.service"; -import { NoopMessagingService } from "@bitwarden/common/services/noopMessaging.service"; import { OrganizationUserServiceImplementation } from "@bitwarden/common/services/organization-user/organization-user.service.implementation"; import { SearchService } from "@bitwarden/common/services/search.service"; import { SettingsService } from "@bitwarden/common/services/settings.service"; -import { StateService } from "@bitwarden/common/services/state.service"; -import { StateMigrationService } from "@bitwarden/common/services/stateMigration.service"; import { TotpService } from "@bitwarden/common/services/totp.service"; import { VaultTimeoutService } from "@bitwarden/common/services/vaultTimeout/vaultTimeout.service"; import { VaultTimeoutSettingsService } from "@bitwarden/common/services/vaultTimeout/vaultTimeoutSettings.service"; @@ -66,13 +66,13 @@ import { } from "@bitwarden/importer"; import { NodeCryptoFunctionService } from "@bitwarden/node/services/node-crypto-function.service"; +import { CliPlatformUtilsService } from "./platform/services/cli-platform-utils.service"; +import { ConsoleLogService } from "./platform/services/console-log.service"; +import { I18nService } from "./platform/services/i18n.service"; +import { LowdbStorageService } from "./platform/services/lowdb-storage.service"; +import { NodeApiService } from "./platform/services/node-api.service"; +import { NodeEnvSecureStorageService } from "./platform/services/node-env-secure-storage.service"; import { Program } from "./program"; -import { CliPlatformUtilsService } from "./services/cli-platform-utils.service"; -import { ConsoleLogService } from "./services/console-log.service"; -import { I18nService } from "./services/i18n.service"; -import { LowdbStorageService } from "./services/lowdb-storage.service"; -import { NodeApiService } from "./services/node-api.service"; -import { NodeEnvSecureStorageService } from "./services/node-env-secure-storage.service"; import { SendProgram } from "./tools/send/send.program"; import { VaultProgram } from "./vault.program"; diff --git a/apps/cli/src/commands/config.command.ts b/apps/cli/src/commands/config.command.ts index 9110b46bf29..bf3507ee3d0 100644 --- a/apps/cli/src/commands/config.command.ts +++ b/apps/cli/src/commands/config.command.ts @@ -1,6 +1,6 @@ import * as program from "commander"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; import { Response } from "../models/response"; import { MessageResponse } from "../models/response/message.response"; diff --git a/apps/cli/src/commands/convert-to-key-connector.command.ts b/apps/cli/src/commands/convert-to-key-connector.command.ts index d124fbfc67d..d3c7b5c3fc7 100644 --- a/apps/cli/src/commands/convert-to-key-connector.command.ts +++ b/apps/cli/src/commands/convert-to-key-connector.command.ts @@ -1,8 +1,8 @@ import * as inquirer from "inquirer"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { Response } from "../models/response"; diff --git a/apps/cli/src/commands/download.command.ts b/apps/cli/src/commands/download.command.ts index 8d7a6130c0d..5c3decc27d4 100644 --- a/apps/cli/src/commands/download.command.ts +++ b/apps/cli/src/commands/download.command.ts @@ -1,8 +1,8 @@ import * as fet from "node-fetch"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { EncArrayBuffer } from "@bitwarden/common/models/domain/enc-array-buffer"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EncArrayBuffer } from "@bitwarden/common/platform/models/domain/enc-array-buffer"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { Response } from "../models/response"; import { FileResponse } from "../models/response/file.response"; diff --git a/apps/cli/src/commands/edit.command.ts b/apps/cli/src/commands/edit.command.ts index 29cccc6b430..e0b81e914ec 100644 --- a/apps/cli/src/commands/edit.command.ts +++ b/apps/cli/src/commands/edit.command.ts @@ -1,11 +1,11 @@ import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; import { CollectionRequest } from "@bitwarden/common/admin-console/models/request/collection.request"; import { SelectionReadOnlyRequest } from "@bitwarden/common/admin-console/models/request/selection-read-only.request"; -import { Utils } from "@bitwarden/common/misc/utils"; import { CipherExport } from "@bitwarden/common/models/export/cipher.export"; import { CollectionExport } from "@bitwarden/common/models/export/collection.export"; import { FolderExport } from "@bitwarden/common/models/export/folder.export"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; diff --git a/apps/cli/src/commands/get.command.ts b/apps/cli/src/commands/get.command.ts index 6ffe432b187..5ef7e1e17db 100644 --- a/apps/cli/src/commands/get.command.ts +++ b/apps/cli/src/commands/get.command.ts @@ -1,15 +1,11 @@ import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; import { CardExport } from "@bitwarden/common/models/export/card.export"; import { CipherExport } from "@bitwarden/common/models/export/cipher.export"; import { CollectionExport } from "@bitwarden/common/models/export/collection.export"; @@ -20,6 +16,10 @@ import { LoginUriExport } from "@bitwarden/common/models/export/login-uri.export import { LoginExport } from "@bitwarden/common/models/export/login.export"; import { SecureNoteExport } from "@bitwarden/common/models/export/secure-note.export"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; diff --git a/apps/cli/src/commands/list.command.ts b/apps/cli/src/commands/list.command.ts index ade81aac024..59c2b92e74f 100644 --- a/apps/cli/src/commands/list.command.ts +++ b/apps/cli/src/commands/list.command.ts @@ -9,8 +9,8 @@ import { CollectionDetailsResponse as ApiCollectionDetailsResponse, CollectionResponse as ApiCollectionResponse, } from "@bitwarden/common/admin-console/models/response/collection.response"; -import { Utils } from "@bitwarden/common/misc/utils"; import { ListResponse as ApiListResponse } from "@bitwarden/common/models/response/list.response"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; diff --git a/apps/cli/src/commands/serve.command.ts b/apps/cli/src/commands/serve.command.ts index 81243cd4a49..92e8747bc33 100644 --- a/apps/cli/src/commands/serve.command.ts +++ b/apps/cli/src/commands/serve.command.ts @@ -6,7 +6,7 @@ import * as koaBodyParser from "koa-bodyparser"; import * as koaJson from "koa-json"; import { KeySuffixOptions } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { ConfirmCommand } from "../admin-console/commands/confirm.command"; import { ShareCommand } from "../admin-console/commands/share.command"; diff --git a/apps/cli/src/commands/status.command.ts b/apps/cli/src/commands/status.command.ts index b847ce389cd..b04a9dcb760 100644 --- a/apps/cli/src/commands/status.command.ts +++ b/apps/cli/src/commands/status.command.ts @@ -1,7 +1,7 @@ -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { Response } from "../models/response"; diff --git a/apps/cli/src/commands/update.command.ts b/apps/cli/src/commands/update.command.ts index 449afabbb55..b70c4abcc57 100644 --- a/apps/cli/src/commands/update.command.ts +++ b/apps/cli/src/commands/update.command.ts @@ -1,6 +1,6 @@ import * as fetch from "node-fetch"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { Response } from "../models/response"; import { MessageResponse } from "../models/response/message.response"; diff --git a/apps/cli/src/flags.ts b/apps/cli/src/platform/flags.ts similarity index 94% rename from apps/cli/src/flags.ts rename to apps/cli/src/platform/flags.ts index d8692db0871..4e31e39e998 100644 --- a/apps/cli/src/flags.ts +++ b/apps/cli/src/platform/flags.ts @@ -4,7 +4,7 @@ import { devFlagValue as baseDevFlagValue, SharedFlags, SharedDevFlags, -} from "@bitwarden/common/misc/flags"; +} from "@bitwarden/common/platform/misc/flags"; // required to avoid linting errors when there are no flags /* eslint-disable-next-line @typescript-eslint/ban-types */ diff --git a/apps/cli/src/services/cli-platform-utils.service.ts b/apps/cli/src/platform/services/cli-platform-utils.service.ts similarity index 96% rename from apps/cli/src/services/cli-platform-utils.service.ts rename to apps/cli/src/platform/services/cli-platform-utils.service.ts index b109610a4ae..e6e25e237b7 100644 --- a/apps/cli/src/services/cli-platform-utils.service.ts +++ b/apps/cli/src/platform/services/cli-platform-utils.service.ts @@ -1,7 +1,7 @@ import * as child_process from "child_process"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { ClientType, DeviceType } from "@bitwarden/common/enums"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; // eslint-disable-next-line const open = require("open"); diff --git a/apps/cli/src/services/console-log.service.spec.ts b/apps/cli/src/platform/services/console-log.service.spec.ts similarity index 100% rename from apps/cli/src/services/console-log.service.spec.ts rename to apps/cli/src/platform/services/console-log.service.spec.ts diff --git a/apps/cli/src/services/console-log.service.ts b/apps/cli/src/platform/services/console-log.service.ts similarity index 91% rename from apps/cli/src/services/console-log.service.ts rename to apps/cli/src/platform/services/console-log.service.ts index 4fe4d61e7f9..cf3aec036ff 100644 --- a/apps/cli/src/services/console-log.service.ts +++ b/apps/cli/src/platform/services/console-log.service.ts @@ -1,5 +1,5 @@ import { LogLevelType } from "@bitwarden/common/enums"; -import { ConsoleLogService as BaseConsoleLogService } from "@bitwarden/common/services/consoleLog.service"; +import { ConsoleLogService as BaseConsoleLogService } from "@bitwarden/common/platform/services/console-log.service"; export class ConsoleLogService extends BaseConsoleLogService { constructor(isDev: boolean, filter: (level: LogLevelType) => boolean = null) { diff --git a/apps/cli/src/services/i18n.service.ts b/apps/cli/src/platform/services/i18n.service.ts similarity index 95% rename from apps/cli/src/services/i18n.service.ts rename to apps/cli/src/platform/services/i18n.service.ts index f3e6eabc609..276fa7ef9a9 100644 --- a/apps/cli/src/services/i18n.service.ts +++ b/apps/cli/src/platform/services/i18n.service.ts @@ -1,7 +1,7 @@ import * as fs from "fs"; import * as path from "path"; -import { I18nService as BaseI18nService } from "@bitwarden/common/services/i18n.service"; +import { I18nService as BaseI18nService } from "@bitwarden/common/platform/services/i18n.service"; export class I18nService extends BaseI18nService { constructor(systemLanguage: string, localesDirectory: string) { diff --git a/apps/cli/src/services/lowdb-storage.service.ts b/apps/cli/src/platform/services/lowdb-storage.service.ts similarity index 93% rename from apps/cli/src/services/lowdb-storage.service.ts rename to apps/cli/src/platform/services/lowdb-storage.service.ts index 6e096bd3c37..bd5895907c3 100644 --- a/apps/cli/src/services/lowdb-storage.service.ts +++ b/apps/cli/src/platform/services/lowdb-storage.service.ts @@ -6,11 +6,11 @@ import * as FileSync from "lowdb/adapters/FileSync"; import * as lock from "proper-lockfile"; import { OperationOptions } from "retry"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { AbstractStorageService } from "@bitwarden/common/abstractions/storage.service"; import { NodeUtils } from "@bitwarden/common/misc/nodeUtils"; -import { sequentialize } from "@bitwarden/common/misc/sequentialize"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { AbstractStorageService } from "@bitwarden/common/platform/abstractions/storage.service"; +import { sequentialize } from "@bitwarden/common/platform/misc/sequentialize"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; const retries: OperationOptions = { retries: 50, diff --git a/apps/cli/src/services/node-api.service.ts b/apps/cli/src/platform/services/node-api.service.ts similarity index 80% rename from apps/cli/src/services/node-api.service.ts rename to apps/cli/src/platform/services/node-api.service.ts index 9a757afd25e..669a562d597 100644 --- a/apps/cli/src/services/node-api.service.ts +++ b/apps/cli/src/platform/services/node-api.service.ts @@ -2,10 +2,10 @@ import * as FormData from "form-data"; import { HttpsProxyAgent } from "https-proxy-agent"; import * as fe from "node-fetch"; -import { AppIdService } from "@bitwarden/common/abstractions/appId.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { TokenService } from "@bitwarden/common/auth/abstractions/token.service"; +import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { ApiService } from "@bitwarden/common/services/api.service"; (global as any).fetch = fe.default; diff --git a/apps/cli/src/services/node-env-secure-storage.service.ts b/apps/cli/src/platform/services/node-env-secure-storage.service.ts similarity index 83% rename from apps/cli/src/services/node-env-secure-storage.service.ts rename to apps/cli/src/platform/services/node-env-secure-storage.service.ts index 2d1a8663eb8..80e3cea64c4 100644 --- a/apps/cli/src/services/node-env-secure-storage.service.ts +++ b/apps/cli/src/platform/services/node-env-secure-storage.service.ts @@ -1,9 +1,9 @@ -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { AbstractStorageService } from "@bitwarden/common/abstractions/storage.service"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { EncArrayBuffer } from "@bitwarden/common/models/domain/enc-array-buffer"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { AbstractStorageService } from "@bitwarden/common/platform/abstractions/storage.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { EncArrayBuffer } from "@bitwarden/common/platform/models/domain/enc-array-buffer"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; export class NodeEnvSecureStorageService implements AbstractStorageService { constructor( diff --git a/apps/cli/src/tools/export.command.ts b/apps/cli/src/tools/export.command.ts index 161086c2ea8..272901a34c9 100644 --- a/apps/cli/src/tools/export.command.ts +++ b/apps/cli/src/tools/export.command.ts @@ -3,7 +3,7 @@ import * as inquirer from "inquirer"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { ExportFormat, EXPORT_FORMATS, diff --git a/apps/cli/src/tools/generate.command.ts b/apps/cli/src/tools/generate.command.ts index c203c14ea8c..bd9ad88a04f 100644 --- a/apps/cli/src/tools/generate.command.ts +++ b/apps/cli/src/tools/generate.command.ts @@ -1,4 +1,4 @@ -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { Response } from "../models/response"; diff --git a/apps/cli/src/tools/send/commands/create.command.ts b/apps/cli/src/tools/send/commands/create.command.ts index 229babd5c26..54e8340bdbe 100644 --- a/apps/cli/src/tools/send/commands/create.command.ts +++ b/apps/cli/src/tools/send/commands/create.command.ts @@ -1,9 +1,9 @@ import * as fs from "fs"; import * as path from "path"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { NodeUtils } from "@bitwarden/common/misc/nodeUtils"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction"; diff --git a/apps/cli/src/tools/send/commands/edit.command.ts b/apps/cli/src/tools/send/commands/edit.command.ts index 2b4e6d23f9e..d17694f46df 100644 --- a/apps/cli/src/tools/send/commands/edit.command.ts +++ b/apps/cli/src/tools/send/commands/edit.command.ts @@ -1,4 +1,4 @@ -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction"; diff --git a/apps/cli/src/tools/send/commands/get.command.ts b/apps/cli/src/tools/send/commands/get.command.ts index b92044ac4b1..4746e3dfe2d 100644 --- a/apps/cli/src/tools/send/commands/get.command.ts +++ b/apps/cli/src/tools/send/commands/get.command.ts @@ -1,9 +1,9 @@ import * as program from "commander"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { SendView } from "@bitwarden/common/tools/send/models/view/send.view"; import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction"; diff --git a/apps/cli/src/tools/send/commands/list.command.ts b/apps/cli/src/tools/send/commands/list.command.ts index d6fce941830..008c584388a 100644 --- a/apps/cli/src/tools/send/commands/list.command.ts +++ b/apps/cli/src/tools/send/commands/list.command.ts @@ -1,5 +1,5 @@ -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction"; import { Response } from "../../../models/response"; diff --git a/apps/cli/src/tools/send/commands/receive.command.ts b/apps/cli/src/tools/send/commands/receive.command.ts index 578f1d4695b..486afed2613 100644 --- a/apps/cli/src/tools/send/commands/receive.command.ts +++ b/apps/cli/src/tools/send/commands/receive.command.ts @@ -2,14 +2,14 @@ import * as program from "commander"; import * as inquirer from "inquirer"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { NodeUtils } from "@bitwarden/common/misc/nodeUtils"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { SendAccess } from "@bitwarden/common/tools/send/models/domain/send-access"; import { SendAccessRequest } from "@bitwarden/common/tools/send/models/request/send-access.request"; diff --git a/apps/cli/src/tools/send/models/send.response.ts b/apps/cli/src/tools/send/models/send.response.ts index 0615a73289a..c238663529c 100644 --- a/apps/cli/src/tools/send/models/send.response.ts +++ b/apps/cli/src/tools/send/models/send.response.ts @@ -1,4 +1,4 @@ -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { SendView } from "@bitwarden/common/tools/send/models/view/send.view"; diff --git a/apps/cli/src/tools/send/send.program.ts b/apps/cli/src/tools/send/send.program.ts index 8d7921f8310..48aba023c10 100644 --- a/apps/cli/src/tools/send/send.program.ts +++ b/apps/cli/src/tools/send/send.program.ts @@ -4,7 +4,7 @@ import * as path from "path"; import * as chalk from "chalk"; import * as program from "commander"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { Main } from "../../bw"; diff --git a/apps/cli/src/utils.ts b/apps/cli/src/utils.ts index a2e9008239a..42f1482b694 100644 --- a/apps/cli/src/utils.ts +++ b/apps/cli/src/utils.ts @@ -4,11 +4,11 @@ import * as path from "path"; import * as inquirer from "inquirer"; import * as JSZip from "jszip"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { NodeUtils } from "@bitwarden/common/misc/nodeUtils"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; import { Response } from "./models/response"; diff --git a/apps/cli/src/vault/create.command.ts b/apps/cli/src/vault/create.command.ts index f6ee54a32ff..d98221dc39c 100644 --- a/apps/cli/src/vault/create.command.ts +++ b/apps/cli/src/vault/create.command.ts @@ -2,14 +2,14 @@ import * as fs from "fs"; import * as path from "path"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { CollectionRequest } from "@bitwarden/common/admin-console/models/request/collection.request"; import { SelectionReadOnlyRequest } from "@bitwarden/common/admin-console/models/request/selection-read-only.request"; -import { Utils } from "@bitwarden/common/misc/utils"; import { CipherExport } from "@bitwarden/common/models/export/cipher.export"; import { CollectionExport } from "@bitwarden/common/models/export/collection.export"; import { FolderExport } from "@bitwarden/common/models/export/folder.export"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; diff --git a/apps/cli/src/vault/delete.command.ts b/apps/cli/src/vault/delete.command.ts index cf952e3a681..12b8ae415f8 100644 --- a/apps/cli/src/vault/delete.command.ts +++ b/apps/cli/src/vault/delete.command.ts @@ -1,6 +1,6 @@ import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; diff --git a/apps/desktop/native-messaging-test-runner/src/native-message.service.ts b/apps/desktop/native-messaging-test-runner/src/native-message.service.ts index 8ba6526384e..a6a535a73d0 100644 --- a/apps/desktop/native-messaging-test-runner/src/native-message.service.ts +++ b/apps/desktop/native-messaging-test-runner/src/native-message.service.ts @@ -2,11 +2,11 @@ import "module-alias/register"; import { v4 as uuidv4 } from "uuid"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; -import { ConsoleLogService } from "@bitwarden/common/services/consoleLog.service"; -import { EncryptServiceImplementation } from "@bitwarden/common/services/cryptography/encrypt.service.implementation"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; +import { ConsoleLogService } from "@bitwarden/common/platform/services/console-log.service"; +import { EncryptServiceImplementation } from "@bitwarden/common/platform/services/cryptography/encrypt.service.implementation"; import { NodeCryptoFunctionService } from "@bitwarden/node/services/node-crypto-function.service"; import { DecryptedCommandData } from "../../src/models/native-messaging/decrypted-command-data"; diff --git a/apps/desktop/src/admin-console/vault-filters/organization-filter.component.ts b/apps/desktop/src/admin-console/vault-filters/organization-filter.component.ts index 03f858243b1..80d003b6089 100644 --- a/apps/desktop/src/admin-console/vault-filters/organization-filter.component.ts +++ b/apps/desktop/src/admin-console/vault-filters/organization-filter.component.ts @@ -2,9 +2,9 @@ import { Component } from "@angular/core"; import { OrganizationFilterComponent as BaseOrganizationFilterComponent } from "@bitwarden/angular/vault/vault-filter/components/organization-filter.component"; import { DisplayMode } from "@bitwarden/angular/vault/vault-filter/models/display-mode"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-organization-filter", diff --git a/apps/desktop/src/app/accounts/settings.component.ts b/apps/desktop/src/app/accounts/settings.component.ts index 0e95b3fc54c..162cb338bca 100644 --- a/apps/desktop/src/app/accounts/settings.component.ts +++ b/apps/desktop/src/app/accounts/settings.component.ts @@ -6,20 +6,20 @@ import { concatMap, debounceTime, filter, map, takeUntil, tap } from "rxjs/opera import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { AbstractThemingService } from "@bitwarden/angular/services/theming/theming.service.abstraction"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SettingsService } from "@bitwarden/common/abstractions/settings.service"; import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { DeviceType, ThemeType, KeySuffixOptions } from "@bitwarden/common/enums"; import { VaultTimeoutAction } from "@bitwarden/common/enums/vault-timeout-action.enum"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; -import { flagEnabled } from "../../flags"; -import { ElectronStateService } from "../../services/electron-state.service.abstraction"; +import { flagEnabled } from "../../platform/flags"; +import { ElectronStateService } from "../../platform/services/electron-state.service.abstraction"; import { isWindowsStore } from "../../utils"; import { SetPinComponent } from "../components/set-pin.component"; diff --git a/apps/desktop/src/app/app.component.ts b/apps/desktop/src/app/app.component.ts index 835b568c8cb..3ffd2277c4b 100644 --- a/apps/desktop/src/app/app.component.ts +++ b/apps/desktop/src/app/app.component.ts @@ -16,19 +16,10 @@ import { firstValueFrom, Subject, takeUntil } from "rxjs"; import { ModalRef } from "@bitwarden/angular/components/modal/modal.ref"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { ConfigServiceAbstraction } from "@bitwarden/common/abstractions/config/config.service.abstraction"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; import { EventUploadService } from "@bitwarden/common/abstractions/event/event-upload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { NotificationsService } from "@bitwarden/common/abstractions/notifications.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; import { SettingsService } from "@bitwarden/common/abstractions/settings.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; -import { SystemService } from "@bitwarden/common/abstractions/system.service"; import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; @@ -37,6 +28,15 @@ import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; import { ForceResetPasswordReason } from "@bitwarden/common/auth/models/domain/force-reset-password-reason"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { SystemService } from "@bitwarden/common/platform/abstractions/system.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { InternalFolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; diff --git a/apps/desktop/src/app/app.module.ts b/apps/desktop/src/app/app.module.ts index 5e1cb5b9ca1..3ac2ca29756 100644 --- a/apps/desktop/src/app/app.module.ts +++ b/apps/desktop/src/app/app.module.ts @@ -1,7 +1,7 @@ import "zone.js"; // Register the locales for the application -import "./locales"; +import "../platform/app/locales"; import { DialogModule } from "@angular/cdk/dialog"; import { NgModule } from "@angular/core"; diff --git a/apps/desktop/src/app/components/avatar.component.ts b/apps/desktop/src/app/components/avatar.component.ts index 8caba7f4593..1560c440783 100644 --- a/apps/desktop/src/app/components/avatar.component.ts +++ b/apps/desktop/src/app/components/avatar.component.ts @@ -1,7 +1,7 @@ import { Component, Input, OnChanges, OnInit } from "@angular/core"; import { DomSanitizer, SafeResourceUrl } from "@angular/platform-browser"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; @Component({ selector: "app-avatar", diff --git a/apps/desktop/src/app/layout/account-switcher.component.ts b/apps/desktop/src/app/layout/account-switcher.component.ts index 08995aa109d..e3f878b0bf1 100644 --- a/apps/desktop/src/app/layout/account-switcher.component.ts +++ b/apps/desktop/src/app/layout/account-switcher.component.ts @@ -4,13 +4,13 @@ import { Component, OnDestroy, OnInit } from "@angular/core"; import { Router } from "@angular/router"; import { concatMap, Subject, takeUntil } from "rxjs"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { TokenService } from "@bitwarden/common/auth/abstractions/token.service"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { Account } from "@bitwarden/common/models/domain/account"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { Account } from "@bitwarden/common/platform/models/domain/account"; type ActiveAccount = { id: string; diff --git a/apps/desktop/src/app/layout/nav.component.ts b/apps/desktop/src/app/layout/nav.component.ts index 4a1a4b21e00..2b413cbc48c 100644 --- a/apps/desktop/src/app/layout/nav.component.ts +++ b/apps/desktop/src/app/layout/nav.component.ts @@ -1,6 +1,6 @@ import { Component } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @Component({ selector: "app-nav", diff --git a/apps/desktop/src/app/layout/search/search.component.ts b/apps/desktop/src/app/layout/search/search.component.ts index 36e17c676a5..3ede3f75abe 100644 --- a/apps/desktop/src/app/layout/search/search.component.ts +++ b/apps/desktop/src/app/layout/search/search.component.ts @@ -2,7 +2,7 @@ import { Component, OnDestroy, OnInit } from "@angular/core"; import { UntypedFormControl } from "@angular/forms"; import { Subscription } from "rxjs"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { SearchBarService, SearchBarState } from "./search-bar.service"; diff --git a/apps/desktop/src/app/services/desktop-file-download.service.ts b/apps/desktop/src/app/services/desktop-file-download.service.ts index df9be255958..ff113cb5e77 100644 --- a/apps/desktop/src/app/services/desktop-file-download.service.ts +++ b/apps/desktop/src/app/services/desktop-file-download.service.ts @@ -1,8 +1,8 @@ import { Injectable } from "@angular/core"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { FileDownloadBuilder } from "@bitwarden/common/abstractions/fileDownload/fileDownloadBuilder"; -import { FileDownloadRequest } from "@bitwarden/common/abstractions/fileDownload/fileDownloadRequest"; +import { FileDownloadBuilder } from "@bitwarden/common/platform/abstractions/file-download/file-download.builder"; +import { FileDownloadRequest } from "@bitwarden/common/platform/abstractions/file-download/file-download.request"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; @Injectable() export class DesktopFileDownloadService implements FileDownloadService { diff --git a/apps/desktop/src/app/services/init.service.ts b/apps/desktop/src/app/services/init.service.ts index 1208ab38534..8a62f3fae39 100644 --- a/apps/desktop/src/app/services/init.service.ts +++ b/apps/desktop/src/app/services/init.service.ts @@ -2,22 +2,22 @@ import { Inject, Injectable } from "@angular/core"; import { WINDOW } from "@bitwarden/angular/services/injection-tokens"; import { AbstractThemingService } from "@bitwarden/angular/services/theming/theming.service.abstraction"; -import { CryptoService as CryptoServiceAbstraction } from "@bitwarden/common/abstractions/crypto.service"; -import { EncryptService } from "@bitwarden/common/abstractions/encrypt.service"; -import { EnvironmentService as EnvironmentServiceAbstraction } from "@bitwarden/common/abstractions/environment.service"; import { EventUploadService as EventUploadServiceAbstraction } from "@bitwarden/common/abstractions/event/event-upload.service"; -import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/abstractions/i18n.service"; import { NotificationsService as NotificationsServiceAbstraction } from "@bitwarden/common/abstractions/notifications.service"; -import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService as StateServiceAbstraction } from "@bitwarden/common/abstractions/state.service"; import { VaultTimeoutService as VaultTimeoutServiceAbstraction } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; import { TwoFactorService as TwoFactorServiceAbstraction } from "@bitwarden/common/auth/abstractions/two-factor.service"; -import { ContainerService } from "@bitwarden/common/services/container.service"; +import { CryptoService as CryptoServiceAbstraction } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EncryptService } from "@bitwarden/common/platform/abstractions/encrypt.service"; +import { EnvironmentService as EnvironmentServiceAbstraction } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService as StateServiceAbstraction } from "@bitwarden/common/platform/abstractions/state.service"; +import { ContainerService } from "@bitwarden/common/platform/services/container.service"; import { EventUploadService } from "@bitwarden/common/services/event/event-upload.service"; import { VaultTimeoutService } from "@bitwarden/common/services/vaultTimeout/vaultTimeout.service"; import { SyncService as SyncServiceAbstraction } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; -import { I18nService } from "../../services/i18n.service"; +import { I18nService } from "../../platform/services/i18n.service"; import { NativeMessagingService } from "../../services/native-messaging.service"; @Injectable() diff --git a/apps/desktop/src/app/services/services.module.ts b/apps/desktop/src/app/services/services.module.ts index d9d6377c179..bee3ae4c7e1 100644 --- a/apps/desktop/src/app/services/services.module.ts +++ b/apps/desktop/src/app/services/services.module.ts @@ -12,48 +12,48 @@ import { } from "@bitwarden/angular/services/injection-tokens"; import { JslibServicesModule } from "@bitwarden/angular/services/jslib-services.module"; import { AbstractThemingService } from "@bitwarden/angular/services/theming/theming.service.abstraction"; -import { BroadcasterService as BroadcasterServiceAbstraction } from "@bitwarden/common/abstractions/broadcaster.service"; -import { CryptoService as CryptoServiceAbstraction } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { EncryptService } from "@bitwarden/common/abstractions/encrypt.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/abstractions/i18n.service"; -import { - LogService, - LogService as LogServiceAbstraction, -} from "@bitwarden/common/abstractions/log.service"; -import { MessagingService as MessagingServiceAbstraction } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService as StateServiceAbstraction } from "@bitwarden/common/abstractions/state.service"; -import { StateMigrationService as StateMigrationServiceAbstraction } from "@bitwarden/common/abstractions/stateMigration.service"; -import { AbstractStorageService } from "@bitwarden/common/abstractions/storage.service"; -import { SystemService as SystemServiceAbstraction } from "@bitwarden/common/abstractions/system.service"; import { PolicyService as PolicyServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { AuthService as AuthServiceAbstraction } from "@bitwarden/common/auth/abstractions/auth.service"; import { LoginService as LoginServiceAbstraction } from "@bitwarden/common/auth/abstractions/login.service"; import { LoginService } from "@bitwarden/common/auth/services/login.service"; import { ClientType } from "@bitwarden/common/enums"; -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; -import { GlobalState } from "@bitwarden/common/models/domain/global-state"; -import { MemoryStorageService } from "@bitwarden/common/services/memoryStorage.service"; -import { SystemService } from "@bitwarden/common/services/system.service"; +import { BroadcasterService as BroadcasterServiceAbstraction } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService as CryptoServiceAbstraction } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EncryptService } from "@bitwarden/common/platform/abstractions/encrypt.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { + LogService, + LogService as LogServiceAbstraction, +} from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService as MessagingServiceAbstraction } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateMigrationService as StateMigrationServiceAbstraction } from "@bitwarden/common/platform/abstractions/state-migration.service"; +import { StateService as StateServiceAbstraction } from "@bitwarden/common/platform/abstractions/state.service"; +import { AbstractStorageService } from "@bitwarden/common/platform/abstractions/storage.service"; +import { SystemService as SystemServiceAbstraction } from "@bitwarden/common/platform/abstractions/system.service"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; +import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state"; +import { MemoryStorageService } from "@bitwarden/common/platform/services/memory-storage.service"; +import { SystemService } from "@bitwarden/common/platform/services/system.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { CipherService as CipherServiceAbstraction } from "@bitwarden/common/vault/abstractions/cipher.service"; import { PasswordRepromptService as PasswordRepromptServiceAbstraction } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { LoginGuard } from "../../auth/guards/login.guard"; import { Account } from "../../models/account"; -import { ElectronCryptoService } from "../../services/electron-crypto.service"; +import { ElectronCryptoService } from "../../platform/services/electron-crypto.service"; +import { ElectronLogService } from "../../platform/services/electron-log.service"; +import { ElectronPlatformUtilsService } from "../../platform/services/electron-platform-utils.service"; +import { ElectronRendererMessagingService } from "../../platform/services/electron-renderer-messaging.service"; +import { ElectronRendererSecureStorageService } from "../../platform/services/electron-renderer-secure-storage.service"; +import { ElectronRendererStorageService } from "../../platform/services/electron-renderer-storage.service"; +import { ElectronStateService } from "../../platform/services/electron-state.service"; +import { ElectronStateService as ElectronStateServiceAbstraction } from "../../platform/services/electron-state.service.abstraction"; +import { I18nService } from "../../platform/services/i18n.service"; import { ElectronDialogService } from "../../services/electron-dialog.service"; -import { ElectronLogService } from "../../services/electron-log.service"; -import { ElectronPlatformUtilsService } from "../../services/electron-platform-utils.service"; -import { ElectronRendererMessagingService } from "../../services/electron-renderer-messaging.service"; -import { ElectronRendererSecureStorageService } from "../../services/electron-renderer-secure-storage.service"; -import { ElectronRendererStorageService } from "../../services/electron-renderer-storage.service"; -import { ElectronStateService } from "../../services/electron-state.service"; -import { ElectronStateService as ElectronStateServiceAbstraction } from "../../services/electron-state.service.abstraction"; import { EncryptedMessageHandlerService } from "../../services/encrypted-message-handler.service"; -import { I18nService } from "../../services/i18n.service"; import { NativeMessageHandlerService } from "../../services/native-message-handler.service"; import { NativeMessagingService } from "../../services/native-messaging.service"; import { PasswordRepromptService } from "../../vault/services/password-reprompt.service"; diff --git a/apps/desktop/src/app/tools/export/export.component.ts b/apps/desktop/src/app/tools/export/export.component.ts index 00991ed8ecc..70f74d0ecda 100644 --- a/apps/desktop/src/app/tools/export/export.component.ts +++ b/apps/desktop/src/app/tools/export/export.component.ts @@ -5,15 +5,15 @@ import { UntypedFormBuilder } from "@angular/forms"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ExportComponent as BaseExportComponent } from "@bitwarden/angular/tools/export/components/export.component"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { VaultExportServiceAbstraction } from "@bitwarden/exporter/vault-export"; const BroadcasterSubscriptionId = "ExportComponent"; diff --git a/apps/desktop/src/app/tools/generator.component.spec.ts b/apps/desktop/src/app/tools/generator.component.spec.ts index 5b932de1105..2e8669c2021 100644 --- a/apps/desktop/src/app/tools/generator.component.spec.ts +++ b/apps/desktop/src/app/tools/generator.component.spec.ts @@ -5,11 +5,11 @@ import { ActivatedRoute } from "@angular/router"; import { Substitute } from "@fluffy-spoon/substitute"; import { mock, MockProxy } from "jest-mock-extended"; -import { I18nPipe } from "@bitwarden/angular/pipes/i18n.pipe"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { I18nPipe } from "@bitwarden/angular/platform/pipes/i18n.pipe"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { UsernameGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/username"; diff --git a/apps/desktop/src/app/tools/generator.component.ts b/apps/desktop/src/app/tools/generator.component.ts index 83c2f48f772..0aa20c0c946 100644 --- a/apps/desktop/src/app/tools/generator.component.ts +++ b/apps/desktop/src/app/tools/generator.component.ts @@ -2,10 +2,10 @@ import { Component } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { GeneratorComponent as BaseGeneratorComponent } from "@bitwarden/angular/tools/generator/components/generator.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { UsernameGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/username"; diff --git a/apps/desktop/src/app/tools/password-generator-history.component.ts b/apps/desktop/src/app/tools/password-generator-history.component.ts index bd1928fff14..7c1d76bb044 100644 --- a/apps/desktop/src/app/tools/password-generator-history.component.ts +++ b/apps/desktop/src/app/tools/password-generator-history.component.ts @@ -1,8 +1,8 @@ import { Component } from "@angular/core"; import { PasswordGeneratorHistoryComponent as BasePasswordGeneratorHistoryComponent } from "@bitwarden/angular/tools/generator/components/password-generator-history.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; @Component({ diff --git a/apps/desktop/src/app/tools/send/add-edit.component.ts b/apps/desktop/src/app/tools/send/add-edit.component.ts index 3fa766daf7f..adfdb0fa64a 100644 --- a/apps/desktop/src/app/tools/send/add-edit.component.ts +++ b/apps/desktop/src/app/tools/send/add-edit.component.ts @@ -3,13 +3,13 @@ import { Component } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/tools/send/add-edit.component"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction"; diff --git a/apps/desktop/src/app/tools/send/efflux-dates.component.ts b/apps/desktop/src/app/tools/send/efflux-dates.component.ts index c2bdfc744a6..40215348d55 100644 --- a/apps/desktop/src/app/tools/send/efflux-dates.component.ts +++ b/apps/desktop/src/app/tools/send/efflux-dates.component.ts @@ -3,8 +3,8 @@ import { Component, OnChanges } from "@angular/core"; import { ControlContainer, NgForm } from "@angular/forms"; import { EffluxDatesComponent as BaseEffluxDatesComponent } from "@bitwarden/angular/tools/send/efflux-dates.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-send-efflux-dates", diff --git a/apps/desktop/src/app/tools/send/send.component.ts b/apps/desktop/src/app/tools/send/send.component.ts index 7ac254190e0..8cdc90d9950 100644 --- a/apps/desktop/src/app/tools/send/send.component.ts +++ b/apps/desktop/src/app/tools/send/send.component.ts @@ -2,13 +2,13 @@ import { Component, NgZone, OnDestroy, OnInit, ViewChild } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { SendComponent as BaseSendComponent } from "@bitwarden/angular/tools/send/send.component"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SendView } from "@bitwarden/common/tools/send/models/view/send.view"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction"; diff --git a/apps/desktop/src/auth/accessibility-cookie.component.ts b/apps/desktop/src/auth/accessibility-cookie.component.ts index dbcbd097fa3..b90af04e7ff 100644 --- a/apps/desktop/src/auth/accessibility-cookie.component.ts +++ b/apps/desktop/src/auth/accessibility-cookie.component.ts @@ -2,11 +2,11 @@ import { Component, NgZone } from "@angular/core"; import { UntypedFormControl, UntypedFormGroup, Validators } from "@angular/forms"; import { Router } from "@angular/router"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { getCookie } from "../utils"; diff --git a/apps/desktop/src/auth/delete-account.component.ts b/apps/desktop/src/auth/delete-account.component.ts index 573a796d2fc..a6e3775b638 100644 --- a/apps/desktop/src/auth/delete-account.component.ts +++ b/apps/desktop/src/auth/delete-account.component.ts @@ -1,10 +1,10 @@ import { Component } from "@angular/core"; import { FormBuilder } from "@angular/forms"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { AccountApiService } from "@bitwarden/common/auth/abstractions/account-api.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { Verification } from "@bitwarden/common/types/verification"; @Component({ diff --git a/apps/desktop/src/auth/environment.component.ts b/apps/desktop/src/auth/environment.component.ts index 8c40ee974d9..1f01b7445b4 100644 --- a/apps/desktop/src/auth/environment.component.ts +++ b/apps/desktop/src/auth/environment.component.ts @@ -2,9 +2,9 @@ import { Component } from "@angular/core"; import { EnvironmentComponent as BaseEnvironmentComponent } from "@bitwarden/angular/components/environment.component"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-environment", diff --git a/apps/desktop/src/auth/guards/login.guard.ts b/apps/desktop/src/auth/guards/login.guard.ts index b4dd5e485a9..01ba108c90c 100644 --- a/apps/desktop/src/auth/guards/login.guard.ts +++ b/apps/desktop/src/auth/guards/login.guard.ts @@ -2,9 +2,9 @@ import { Injectable } from "@angular/core"; import { CanActivate } from "@angular/router"; import { firstValueFrom } from "rxjs"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; const maxAllowedAccounts = 5; diff --git a/apps/desktop/src/auth/hint.component.ts b/apps/desktop/src/auth/hint.component.ts index 0de5c6c79b1..5a7d5177067 100644 --- a/apps/desktop/src/auth/hint.component.ts +++ b/apps/desktop/src/auth/hint.component.ts @@ -3,10 +3,10 @@ import { Router } from "@angular/router"; import { HintComponent as BaseHintComponent } from "@bitwarden/angular/auth/components/hint.component"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-hint", diff --git a/apps/desktop/src/auth/lock.component.ts b/apps/desktop/src/auth/lock.component.ts index b7ccedb8487..ef8dbe967df 100644 --- a/apps/desktop/src/auth/lock.component.ts +++ b/apps/desktop/src/auth/lock.component.ts @@ -5,22 +5,22 @@ import { ipcRenderer } from "electron"; import { LockComponent as BaseLockComponent } from "@bitwarden/angular/auth/components/lock.component"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; import { InternalPolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; import { DeviceType, KeySuffixOptions } from "@bitwarden/common/enums"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; -import { ElectronStateService } from "../services/electron-state.service.abstraction"; +import { ElectronStateService } from "../platform/services/electron-state.service.abstraction"; import { BiometricStorageAction, BiometricMessage } from "../types/biometric-message"; const BroadcasterSubscriptionId = "LockComponent"; diff --git a/apps/desktop/src/auth/login/login-approval.component.ts b/apps/desktop/src/auth/login/login-approval.component.ts index f8124d2a50b..d28e69e3580 100644 --- a/apps/desktop/src/auth/login/login-approval.component.ts +++ b/apps/desktop/src/auth/login/login-approval.component.ts @@ -5,14 +5,14 @@ import { Subject } from "rxjs"; import { ModalRef } from "@bitwarden/angular/components/modal/modal.ref"; import { ModalConfig } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { AppIdService } from "@bitwarden/common/abstractions/appId.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { AuthRequestResponse } from "@bitwarden/common/auth/models/response/auth-request.response"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; const RequestTimeOut = 60000 * 15; //15 Minutes const RequestTimeUpdate = 60000 * 5; //5 Minutes diff --git a/apps/desktop/src/auth/login/login-with-device.component.ts b/apps/desktop/src/auth/login/login-with-device.component.ts index 5a4224e3add..3b3ee83ae49 100644 --- a/apps/desktop/src/auth/login/login-with-device.component.ts +++ b/apps/desktop/src/auth/login/login-with-device.component.ts @@ -5,17 +5,17 @@ import { LoginWithDeviceComponent as BaseLoginWithDeviceComponent } from "@bitwa import { ModalService } from "@bitwarden/angular/services/modal.service"; import { AnonymousHubService } from "@bitwarden/common/abstractions/anonymousHub.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { AppIdService } from "@bitwarden/common/abstractions/appId.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; +import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; diff --git a/apps/desktop/src/auth/login/login.component.ts b/apps/desktop/src/auth/login/login.component.ts index a5c2f6f3f7a..77894b77f6f 100644 --- a/apps/desktop/src/auth/login/login.component.ts +++ b/apps/desktop/src/auth/login/login.component.ts @@ -6,19 +6,19 @@ import { Subject, takeUntil } from "rxjs"; import { EnvironmentSelectorComponent } from "@bitwarden/angular/auth/components/environment-selector.component"; import { LoginComponent as BaseLoginComponent } from "@bitwarden/angular/auth/components/login.component"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { AppIdService } from "@bitwarden/common/abstractions/appId.service"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; import { DevicesApiServiceAbstraction } from "@bitwarden/common/abstractions/devices/devices-api.service.abstraction"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { FormValidationErrorsService } from "@bitwarden/common/abstractions/formValidationErrors.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; +import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { FormValidationErrorsService } from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; diff --git a/apps/desktop/src/auth/register.component.ts b/apps/desktop/src/auth/register.component.ts index 5e6b0b16778..6cf46de7c70 100644 --- a/apps/desktop/src/auth/register.component.ts +++ b/apps/desktop/src/auth/register.component.ts @@ -6,15 +6,15 @@ import { RegisterComponent as BaseRegisterComponent } from "@bitwarden/angular/c import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { FormValidationErrorsService } from "@bitwarden/common/abstractions/formValidationErrors.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { FormValidationErrorsService } from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; const BroadcasterSubscriptionId = "RegisterComponent"; diff --git a/apps/desktop/src/auth/set-password.component.ts b/apps/desktop/src/auth/set-password.component.ts index d7a7c8d699d..b710e96b7ee 100644 --- a/apps/desktop/src/auth/set-password.component.ts +++ b/apps/desktop/src/auth/set-password.component.ts @@ -4,16 +4,16 @@ import { ActivatedRoute, Router } from "@angular/router"; import { SetPasswordComponent as BaseSetPasswordComponent } from "@bitwarden/angular/components/set-password.component"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; diff --git a/apps/desktop/src/auth/sso.component.ts b/apps/desktop/src/auth/sso.component.ts index b56fc663a41..75f380b0ed3 100644 --- a/apps/desktop/src/auth/sso.component.ts +++ b/apps/desktop/src/auth/sso.component.ts @@ -3,13 +3,13 @@ import { ActivatedRoute, Router } from "@angular/router"; import { SsoComponent as BaseSsoComponent } from "@bitwarden/angular/auth/components/sso.component"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; diff --git a/apps/desktop/src/auth/two-factor-options.component.ts b/apps/desktop/src/auth/two-factor-options.component.ts index 514994f7537..5743711e831 100644 --- a/apps/desktop/src/auth/two-factor-options.component.ts +++ b/apps/desktop/src/auth/two-factor-options.component.ts @@ -2,9 +2,9 @@ import { Component } from "@angular/core"; import { Router } from "@angular/router"; import { TwoFactorOptionsComponent as BaseTwoFactorOptionsComponent } from "@bitwarden/angular/auth/components/two-factor-options.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { TwoFactorService } from "@bitwarden/common/auth/abstractions/two-factor.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-two-factor-options", diff --git a/apps/desktop/src/auth/two-factor.component.ts b/apps/desktop/src/auth/two-factor.component.ts index 47f52b36d1b..ee3764027a5 100644 --- a/apps/desktop/src/auth/two-factor.component.ts +++ b/apps/desktop/src/auth/two-factor.component.ts @@ -4,16 +4,16 @@ import { ActivatedRoute, Router } from "@angular/router"; import { TwoFactorComponent as BaseTwoFactorComponent } from "@bitwarden/angular/auth/components/two-factor.component"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { AppIdService } from "@bitwarden/common/abstractions/appId.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; import { TwoFactorService } from "@bitwarden/common/auth/abstractions/two-factor.service"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; +import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { TwoFactorOptionsComponent } from "./two-factor-options.component"; diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.ts index 918daf47d20..9dfcd9776a6 100644 --- a/apps/desktop/src/main.ts +++ b/apps/desktop/src/main.ts @@ -2,12 +2,10 @@ import * as path from "path"; import { app } from "electron"; -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; -import { GlobalState } from "@bitwarden/common/models/domain/global-state"; -import { MemoryStorageService } from "@bitwarden/common/services/memoryStorage.service"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; +import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state"; +import { MemoryStorageService } from "@bitwarden/common/platform/services/memory-storage.service"; -import { BiometricsService, BiometricsServiceAbstraction } from "./main/biometric/index"; -import { DesktopCredentialStorageListener } from "./main/desktop-credential-storage-listener"; import { MenuMain } from "./main/menu/menu.main"; import { MessagingMain } from "./main/messaging.main"; import { NativeMessagingMain } from "./main/native-messaging.main"; @@ -16,11 +14,13 @@ import { TrayMain } from "./main/tray.main"; import { UpdaterMain } from "./main/updater.main"; import { WindowMain } from "./main/window.main"; import { Account } from "./models/account"; -import { ElectronLogService } from "./services/electron-log.service"; +import { BiometricsService, BiometricsServiceAbstraction } from "./platform/main/biometric/index"; +import { DesktopCredentialStorageListener } from "./platform/main/desktop-credential-storage-listener"; +import { ElectronLogService } from "./platform/services/electron-log.service"; +import { ElectronStateService } from "./platform/services/electron-state.service"; +import { ElectronStorageService } from "./platform/services/electron-storage.service"; +import { I18nService } from "./platform/services/i18n.service"; import { ElectronMainMessagingService } from "./services/electron-main-messaging.service"; -import { ElectronStateService } from "./services/electron-state.service"; -import { ElectronStorageService } from "./services/electron-storage.service"; -import { I18nService } from "./services/i18n.service"; export class Main { logService: ElectronLogService; diff --git a/apps/desktop/src/main/menu/menu.about.ts b/apps/desktop/src/main/menu/menu.about.ts index 33d4f12ea55..aa50f2d9978 100644 --- a/apps/desktop/src/main/menu/menu.about.ts +++ b/apps/desktop/src/main/menu/menu.about.ts @@ -1,6 +1,6 @@ import { BrowserWindow, clipboard, dialog, MenuItemConstructorOptions } from "electron"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { isMacAppStore, isSnapStore, isWindowsStore } from "../../utils"; import { UpdaterMain } from "../updater.main"; diff --git a/apps/desktop/src/main/menu/menu.account.ts b/apps/desktop/src/main/menu/menu.account.ts index 31e0797ebb6..10a6d6d77d5 100644 --- a/apps/desktop/src/main/menu/menu.account.ts +++ b/apps/desktop/src/main/menu/menu.account.ts @@ -1,7 +1,7 @@ import { BrowserWindow, dialog, MenuItemConstructorOptions, shell } from "electron"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { isMacAppStore, isWindowsStore } from "../../utils"; diff --git a/apps/desktop/src/main/menu/menu.bitwarden.ts b/apps/desktop/src/main/menu/menu.bitwarden.ts index 7a20b381f58..3c3a16702ee 100644 --- a/apps/desktop/src/main/menu/menu.bitwarden.ts +++ b/apps/desktop/src/main/menu/menu.bitwarden.ts @@ -1,7 +1,7 @@ import { BrowserWindow, MenuItemConstructorOptions } from "electron"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { isMac } from "../../utils"; import { UpdaterMain } from "../updater.main"; diff --git a/apps/desktop/src/main/menu/menu.edit.ts b/apps/desktop/src/main/menu/menu.edit.ts index c5827015ba6..6b817dd3902 100644 --- a/apps/desktop/src/main/menu/menu.edit.ts +++ b/apps/desktop/src/main/menu/menu.edit.ts @@ -1,7 +1,7 @@ import { MenuItemConstructorOptions } from "electron"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { IMenubarMenu } from "./menubar"; diff --git a/apps/desktop/src/main/menu/menu.file.ts b/apps/desktop/src/main/menu/menu.file.ts index 6a7c3ba16dd..618acdc7fe1 100644 --- a/apps/desktop/src/main/menu/menu.file.ts +++ b/apps/desktop/src/main/menu/menu.file.ts @@ -1,7 +1,7 @@ import { BrowserWindow, MenuItemConstructorOptions } from "electron"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { isMac, isMacAppStore } from "../../utils"; import { UpdaterMain } from "../updater.main"; diff --git a/apps/desktop/src/main/menu/menu.first.ts b/apps/desktop/src/main/menu/menu.first.ts index 06f24b0570e..805956f2632 100644 --- a/apps/desktop/src/main/menu/menu.first.ts +++ b/apps/desktop/src/main/menu/menu.first.ts @@ -1,7 +1,7 @@ import { BrowserWindow, dialog, MenuItem, MenuItemConstructorOptions } from "electron"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { isMacAppStore, isSnapStore, isWindowsStore } from "../../utils"; import { UpdaterMain } from "../updater.main"; diff --git a/apps/desktop/src/main/menu/menu.help.ts b/apps/desktop/src/main/menu/menu.help.ts index 6a17d088fba..41c9e71776f 100644 --- a/apps/desktop/src/main/menu/menu.help.ts +++ b/apps/desktop/src/main/menu/menu.help.ts @@ -1,6 +1,6 @@ import { shell, MenuItemConstructorOptions } from "electron"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { isMacAppStore, isWindowsStore } from "../../utils"; diff --git a/apps/desktop/src/main/menu/menu.main.ts b/apps/desktop/src/main/menu/menu.main.ts index 4ae9669c488..094ff27b454 100644 --- a/apps/desktop/src/main/menu/menu.main.ts +++ b/apps/desktop/src/main/menu/menu.main.ts @@ -1,8 +1,8 @@ import { app, Menu } from "electron"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { UpdaterMain } from "../updater.main"; import { WindowMain } from "../window.main"; diff --git a/apps/desktop/src/main/menu/menu.view.ts b/apps/desktop/src/main/menu/menu.view.ts index 2953ec8eaac..e884337cf77 100644 --- a/apps/desktop/src/main/menu/menu.view.ts +++ b/apps/desktop/src/main/menu/menu.view.ts @@ -1,7 +1,7 @@ import { MenuItemConstructorOptions } from "electron"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { IMenubarMenu } from "./menubar"; diff --git a/apps/desktop/src/main/menu/menu.window.ts b/apps/desktop/src/main/menu/menu.window.ts index 8f588781a56..811d01e793e 100644 --- a/apps/desktop/src/main/menu/menu.window.ts +++ b/apps/desktop/src/main/menu/menu.window.ts @@ -1,7 +1,7 @@ import { MenuItemConstructorOptions } from "electron"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { isMac } from "../../utils"; import { WindowMain } from "../window.main"; diff --git a/apps/desktop/src/main/menu/menubar.ts b/apps/desktop/src/main/menu/menubar.ts index 5048c60dc09..6ac28a1c8db 100644 --- a/apps/desktop/src/main/menu/menubar.ts +++ b/apps/desktop/src/main/menu/menubar.ts @@ -1,7 +1,7 @@ import { Menu, MenuItemConstructorOptions } from "electron"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { isMac } from "../../utils"; import { UpdaterMain } from "../updater.main"; diff --git a/apps/desktop/src/main/messaging.main.ts b/apps/desktop/src/main/messaging.main.ts index 430949703bb..2dec019da89 100644 --- a/apps/desktop/src/main/messaging.main.ts +++ b/apps/desktop/src/main/messaging.main.ts @@ -3,7 +3,7 @@ import * as path from "path"; import { app, ipcMain } from "electron"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { Main } from "../main"; diff --git a/apps/desktop/src/main/native-messaging.main.ts b/apps/desktop/src/main/native-messaging.main.ts index 360e219e22a..c1bccd5e0a9 100644 --- a/apps/desktop/src/main/native-messaging.main.ts +++ b/apps/desktop/src/main/native-messaging.main.ts @@ -7,7 +7,7 @@ import * as util from "util"; import { ipcMain } from "electron"; import * as ipc from "node-ipc"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { getIpcSocketRoot } from "../proxy/ipc"; diff --git a/apps/desktop/src/main/tray.main.ts b/apps/desktop/src/main/tray.main.ts index aea05d6606d..a4cedc82179 100644 --- a/apps/desktop/src/main/tray.main.ts +++ b/apps/desktop/src/main/tray.main.ts @@ -2,8 +2,8 @@ import * as path from "path"; import { app, BrowserWindow, Menu, MenuItemConstructorOptions, nativeImage, Tray } from "electron"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { WindowMain } from "./window.main"; diff --git a/apps/desktop/src/main/updater.main.ts b/apps/desktop/src/main/updater.main.ts index 088e76e2c5e..946d09b255a 100644 --- a/apps/desktop/src/main/updater.main.ts +++ b/apps/desktop/src/main/updater.main.ts @@ -2,7 +2,7 @@ import { dialog, shell } from "electron"; import log from "electron-log"; import { autoUpdater } from "electron-updater"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { isAppImage, isDev, isMacAppStore, isWindowsPortable, isWindowsStore } from "../utils"; diff --git a/apps/desktop/src/main/window.main.ts b/apps/desktop/src/main/window.main.ts index e4489f70203..5e976bb93c8 100644 --- a/apps/desktop/src/main/window.main.ts +++ b/apps/desktop/src/main/window.main.ts @@ -3,9 +3,9 @@ import * as url from "url"; import { app, BrowserWindow, screen } from "electron"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { WindowState } from "@bitwarden/common/models/domain/window-state"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { cleanUserAgent, isDev, isMacAppStore, isSnapStore } from "../utils"; diff --git a/apps/desktop/src/models/account.ts b/apps/desktop/src/models/account.ts index 2c4b5c39103..65140975aff 100644 --- a/apps/desktop/src/models/account.ts +++ b/apps/desktop/src/models/account.ts @@ -4,8 +4,8 @@ import { Account as BaseAccount, AccountSettings as BaseAccountSettings, AccountKeys as BaseAccountKeys, -} from "@bitwarden/common/models/domain/account"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; +} from "@bitwarden/common/platform/models/domain/account"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; export class AccountSettings extends BaseAccountSettings { vaultTimeout = -1; // On Restart diff --git a/apps/desktop/src/models/native-messaging/encrypted-message-response.ts b/apps/desktop/src/models/native-messaging/encrypted-message-response.ts index 5f8deb05a30..b47422f565c 100644 --- a/apps/desktop/src/models/native-messaging/encrypted-message-response.ts +++ b/apps/desktop/src/models/native-messaging/encrypted-message-response.ts @@ -1,4 +1,4 @@ -import { EncString } from "@bitwarden/common/models/domain/enc-string"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; import { MessageCommon } from "./message-common"; diff --git a/apps/desktop/src/models/native-messaging/encrypted-message.ts b/apps/desktop/src/models/native-messaging/encrypted-message.ts index fc06214875e..474459242be 100644 --- a/apps/desktop/src/models/native-messaging/encrypted-message.ts +++ b/apps/desktop/src/models/native-messaging/encrypted-message.ts @@ -1,4 +1,4 @@ -import { EncString } from "@bitwarden/common/models/domain/enc-string"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; import { MessageCommon } from "./message-common"; diff --git a/apps/desktop/src/models/native-messaging/legacy-message-wrapper.ts b/apps/desktop/src/models/native-messaging/legacy-message-wrapper.ts index 03068374069..f520dd40e4b 100644 --- a/apps/desktop/src/models/native-messaging/legacy-message-wrapper.ts +++ b/apps/desktop/src/models/native-messaging/legacy-message-wrapper.ts @@ -1,4 +1,4 @@ -import { EncString } from "@bitwarden/common/models/domain/enc-string"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; import { LegacyMessage } from "./legacy-message"; diff --git a/apps/desktop/src/app/locales.ts b/apps/desktop/src/platform/app/locales.ts similarity index 100% rename from apps/desktop/src/app/locales.ts rename to apps/desktop/src/platform/app/locales.ts diff --git a/apps/desktop/src/flags.ts b/apps/desktop/src/platform/flags.ts similarity index 94% rename from apps/desktop/src/flags.ts rename to apps/desktop/src/platform/flags.ts index 8306e3c8795..0481c8ce9b4 100644 --- a/apps/desktop/src/flags.ts +++ b/apps/desktop/src/platform/flags.ts @@ -4,7 +4,7 @@ import { devFlagValue as baseDevFlagValue, SharedFlags, SharedDevFlags, -} from "@bitwarden/common/misc/flags"; +} from "@bitwarden/common/platform/misc/flags"; // required to avoid linting errors when there are no flags /* eslint-disable-next-line @typescript-eslint/ban-types */ diff --git a/apps/desktop/src/main/biometric/biometric.darwin.main.ts b/apps/desktop/src/platform/main/biometric/biometric.darwin.main.ts similarity index 91% rename from apps/desktop/src/main/biometric/biometric.darwin.main.ts rename to apps/desktop/src/platform/main/biometric/biometric.darwin.main.ts index 8eb893d2ba7..e50c0644a45 100644 --- a/apps/desktop/src/main/biometric/biometric.darwin.main.ts +++ b/apps/desktop/src/platform/main/biometric/biometric.darwin.main.ts @@ -1,7 +1,7 @@ import { systemPreferences } from "electron"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { passwords } from "@bitwarden/desktop-native"; import { OsBiometricService } from "./biometrics.service.abstraction"; diff --git a/apps/desktop/src/main/biometric/biometric.windows.main.ts b/apps/desktop/src/platform/main/biometric/biometric.windows.main.ts similarity index 94% rename from apps/desktop/src/main/biometric/biometric.windows.main.ts rename to apps/desktop/src/platform/main/biometric/biometric.windows.main.ts index 04139b666a5..749013a47c1 100644 --- a/apps/desktop/src/main/biometric/biometric.windows.main.ts +++ b/apps/desktop/src/platform/main/biometric/biometric.windows.main.ts @@ -1,11 +1,11 @@ -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { biometrics, passwords } from "@bitwarden/desktop-native"; +import { WindowMain } from "../../../main/window.main"; import { ElectronStateService } from "../../services/electron-state.service.abstraction"; -import { WindowMain } from "../window.main"; import { OsBiometricService } from "./biometrics.service.abstraction"; diff --git a/apps/desktop/src/main/biometric/biometrics.service.abstraction.ts b/apps/desktop/src/platform/main/biometric/biometrics.service.abstraction.ts similarity index 100% rename from apps/desktop/src/main/biometric/biometrics.service.abstraction.ts rename to apps/desktop/src/platform/main/biometric/biometrics.service.abstraction.ts diff --git a/apps/desktop/src/main/biometric/biometrics.service.spec.ts b/apps/desktop/src/platform/main/biometric/biometrics.service.spec.ts similarity index 92% rename from apps/desktop/src/main/biometric/biometrics.service.spec.ts rename to apps/desktop/src/platform/main/biometric/biometrics.service.spec.ts index bb2ab881c04..8bccaf4b9b2 100644 --- a/apps/desktop/src/main/biometric/biometrics.service.spec.ts +++ b/apps/desktop/src/platform/main/biometric/biometrics.service.spec.ts @@ -1,11 +1,11 @@ import { mock, MockProxy } from "jest-mock-extended"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { WindowMain } from "../../../main/window.main"; import { ElectronStateService } from "../../services/electron-state.service.abstraction"; -import { WindowMain } from "../window.main"; import BiometricDarwinMain from "./biometric.darwin.main"; import BiometricWindowsMain from "./biometric.windows.main"; diff --git a/apps/desktop/src/main/biometric/biometrics.service.ts b/apps/desktop/src/platform/main/biometric/biometrics.service.ts similarity index 94% rename from apps/desktop/src/main/biometric/biometrics.service.ts rename to apps/desktop/src/platform/main/biometric/biometrics.service.ts index ce45003b247..c5b3a10b14e 100644 --- a/apps/desktop/src/main/biometric/biometrics.service.ts +++ b/apps/desktop/src/platform/main/biometric/biometrics.service.ts @@ -1,9 +1,9 @@ -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { WindowMain } from "../../../main/window.main"; import { ElectronStateService } from "../../services/electron-state.service.abstraction"; -import { WindowMain } from "../window.main"; import { BiometricsServiceAbstraction, OsBiometricService } from "./biometrics.service.abstraction"; diff --git a/apps/desktop/src/main/biometric/index.ts b/apps/desktop/src/platform/main/biometric/index.ts similarity index 100% rename from apps/desktop/src/main/biometric/index.ts rename to apps/desktop/src/platform/main/biometric/index.ts diff --git a/apps/desktop/src/main/desktop-credential-storage-listener.ts b/apps/desktop/src/platform/main/desktop-credential-storage-listener.ts similarity index 95% rename from apps/desktop/src/main/desktop-credential-storage-listener.ts rename to apps/desktop/src/platform/main/desktop-credential-storage-listener.ts index 472dd88169b..c1af4fc5113 100644 --- a/apps/desktop/src/main/desktop-credential-storage-listener.ts +++ b/apps/desktop/src/platform/main/desktop-credential-storage-listener.ts @@ -1,10 +1,10 @@ import { ipcMain } from "electron"; import { BiometricKey } from "@bitwarden/common/auth/types/biometric-key"; -import { ConsoleLogService } from "@bitwarden/common/services/consoleLog.service"; +import { ConsoleLogService } from "@bitwarden/common/platform/services/console-log.service"; import { passwords } from "@bitwarden/desktop-native"; -import { BiometricMessage, BiometricStorageAction } from "../types/biometric-message"; +import { BiometricMessage, BiometricStorageAction } from "../../types/biometric-message"; import { BiometricsServiceAbstraction } from "./biometric/index"; diff --git a/apps/desktop/src/services/electron-crypto.service.ts b/apps/desktop/src/platform/services/electron-crypto.service.ts similarity index 78% rename from apps/desktop/src/services/electron-crypto.service.ts rename to apps/desktop/src/platform/services/electron-crypto.service.ts index 98e1a29a013..1fb90e52ca4 100644 --- a/apps/desktop/src/services/electron-crypto.service.ts +++ b/apps/desktop/src/platform/services/electron-crypto.service.ts @@ -1,11 +1,11 @@ -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { EncryptService } from "@bitwarden/common/abstractions/encrypt.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { KeySuffixOptions } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; -import { CryptoService } from "@bitwarden/common/services/crypto.service"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { EncryptService } from "@bitwarden/common/platform/abstractions/encrypt.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; +import { CryptoService } from "@bitwarden/common/platform/services/crypto.service"; import { CsprngString } from "@bitwarden/common/types/csprng"; import { ElectronStateService } from "./electron-state.service.abstraction"; diff --git a/apps/desktop/src/services/electron-log.service.spec.ts b/apps/desktop/src/platform/services/electron-log.service.spec.ts similarity index 100% rename from apps/desktop/src/services/electron-log.service.spec.ts rename to apps/desktop/src/platform/services/electron-log.service.spec.ts diff --git a/apps/desktop/src/services/electron-log.service.ts b/apps/desktop/src/platform/services/electron-log.service.ts similarity index 92% rename from apps/desktop/src/services/electron-log.service.ts rename to apps/desktop/src/platform/services/electron-log.service.ts index 177b6b7cbac..d5e8e4ae806 100644 --- a/apps/desktop/src/services/electron-log.service.ts +++ b/apps/desktop/src/platform/services/electron-log.service.ts @@ -3,9 +3,9 @@ import * as path from "path"; import log from "electron-log"; import { LogLevelType } from "@bitwarden/common/enums"; -import { ConsoleLogService as BaseLogService } from "@bitwarden/common/services/consoleLog.service"; +import { ConsoleLogService as BaseLogService } from "@bitwarden/common/platform/services/console-log.service"; -import { isDev } from "../utils"; +import { isDev } from "../../utils"; export class ElectronLogService extends BaseLogService { constructor(protected filter: (level: LogLevelType) => boolean = null, logDir: string = null) { diff --git a/apps/desktop/src/services/electron-platform-utils.service.ts b/apps/desktop/src/platform/services/electron-platform-utils.service.ts similarity index 88% rename from apps/desktop/src/services/electron-platform-utils.service.ts rename to apps/desktop/src/platform/services/electron-platform-utils.service.ts index 4a646033043..485490c0a87 100644 --- a/apps/desktop/src/services/electron-platform-utils.service.ts +++ b/apps/desktop/src/platform/services/electron-platform-utils.service.ts @@ -1,13 +1,13 @@ import { clipboard, ipcRenderer, shell } from "electron"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { ClientType, DeviceType } from "@bitwarden/common/enums"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; -import { BiometricMessage, BiometricStorageAction } from "../types/biometric-message"; -import { isDev, isMacAppStore } from "../utils"; +import { BiometricMessage, BiometricStorageAction } from "../../types/biometric-message"; +import { isDev, isMacAppStore } from "../../utils"; export class ElectronPlatformUtilsService implements PlatformUtilsService { private deviceCache: DeviceType = null; diff --git a/apps/desktop/src/services/electron-renderer-messaging.service.ts b/apps/desktop/src/platform/services/electron-renderer-messaging.service.ts similarity index 79% rename from apps/desktop/src/services/electron-renderer-messaging.service.ts rename to apps/desktop/src/platform/services/electron-renderer-messaging.service.ts index 842c26a2e03..25414812c42 100644 --- a/apps/desktop/src/services/electron-renderer-messaging.service.ts +++ b/apps/desktop/src/platform/services/electron-renderer-messaging.service.ts @@ -1,7 +1,7 @@ import { ipcRenderer } from "electron"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; export class ElectronRendererMessagingService implements MessagingService { constructor(private broadcasterService: BroadcasterService) { diff --git a/apps/desktop/src/services/electron-renderer-secure-storage.service.ts b/apps/desktop/src/platform/services/electron-renderer-secure-storage.service.ts similarity index 85% rename from apps/desktop/src/services/electron-renderer-secure-storage.service.ts rename to apps/desktop/src/platform/services/electron-renderer-secure-storage.service.ts index 2a645559c89..ce3923af5f4 100644 --- a/apps/desktop/src/services/electron-renderer-secure-storage.service.ts +++ b/apps/desktop/src/platform/services/electron-renderer-secure-storage.service.ts @@ -1,7 +1,7 @@ import { ipcRenderer } from "electron"; -import { AbstractStorageService } from "@bitwarden/common/abstractions/storage.service"; -import { StorageOptions } from "@bitwarden/common/models/domain/storage-options"; +import { AbstractStorageService } from "@bitwarden/common/platform/abstractions/storage.service"; +import { StorageOptions } from "@bitwarden/common/platform/models/domain/storage-options"; export class ElectronRendererSecureStorageService implements AbstractStorageService { async get(key: string, options?: StorageOptions): Promise { diff --git a/apps/desktop/src/services/electron-renderer-storage.service.ts b/apps/desktop/src/platform/services/electron-renderer-storage.service.ts similarity index 87% rename from apps/desktop/src/services/electron-renderer-storage.service.ts rename to apps/desktop/src/platform/services/electron-renderer-storage.service.ts index 601dcbb22f1..3810e10ab50 100644 --- a/apps/desktop/src/services/electron-renderer-storage.service.ts +++ b/apps/desktop/src/platform/services/electron-renderer-storage.service.ts @@ -1,6 +1,6 @@ import { ipcRenderer } from "electron"; -import { AbstractStorageService } from "@bitwarden/common/abstractions/storage.service"; +import { AbstractStorageService } from "@bitwarden/common/platform/abstractions/storage.service"; export class ElectronRendererStorageService implements AbstractStorageService { get(key: string): Promise { diff --git a/apps/desktop/src/services/electron-state.service.abstraction.ts b/apps/desktop/src/platform/services/electron-state.service.abstraction.ts similarity index 68% rename from apps/desktop/src/services/electron-state.service.abstraction.ts rename to apps/desktop/src/platform/services/electron-state.service.abstraction.ts index e8c3459a243..2beabe48eae 100644 --- a/apps/desktop/src/services/electron-state.service.abstraction.ts +++ b/apps/desktop/src/platform/services/electron-state.service.abstraction.ts @@ -1,8 +1,8 @@ -import { StateService } from "@bitwarden/common/abstractions/state.service"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { StorageOptions } from "@bitwarden/common/models/domain/storage-options"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { StorageOptions } from "@bitwarden/common/platform/models/domain/storage-options"; -import { Account } from "../models/account"; +import { Account } from "../../models/account"; export abstract class ElectronStateService extends StateService { getBiometricEncryptionClientKeyHalf: (options?: StorageOptions) => Promise; diff --git a/apps/desktop/src/services/electron-state.service.ts b/apps/desktop/src/platform/services/electron-state.service.ts similarity index 88% rename from apps/desktop/src/services/electron-state.service.ts rename to apps/desktop/src/platform/services/electron-state.service.ts index 137302c8019..7c3ff38a1b5 100644 --- a/apps/desktop/src/services/electron-state.service.ts +++ b/apps/desktop/src/platform/services/electron-state.service.ts @@ -1,14 +1,14 @@ -import { Utils } from "@bitwarden/common/misc/utils"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { GlobalState } from "@bitwarden/common/models/domain/global-state"; -import { StorageOptions } from "@bitwarden/common/models/domain/storage-options"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state"; +import { StorageOptions } from "@bitwarden/common/platform/models/domain/storage-options"; import { DeviceKey, SymmetricCryptoKey, -} from "@bitwarden/common/models/domain/symmetric-crypto-key"; -import { StateService as BaseStateService } from "@bitwarden/common/services/state.service"; +} from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; +import { StateService as BaseStateService } from "@bitwarden/common/platform/services/state.service"; -import { Account } from "../models/account"; +import { Account } from "../../models/account"; import { ElectronStateService as ElectronStateServiceAbstraction } from "./electron-state.service.abstraction"; diff --git a/apps/desktop/src/services/electron-storage.service.ts b/apps/desktop/src/platform/services/electron-storage.service.ts similarity index 95% rename from apps/desktop/src/services/electron-storage.service.ts rename to apps/desktop/src/platform/services/electron-storage.service.ts index d6e5bc4d523..51fb9cfe9c0 100644 --- a/apps/desktop/src/services/electron-storage.service.ts +++ b/apps/desktop/src/platform/services/electron-storage.service.ts @@ -2,8 +2,8 @@ import * as fs from "fs"; import { ipcMain } from "electron"; -import { AbstractStorageService } from "@bitwarden/common/abstractions/storage.service"; import { NodeUtils } from "@bitwarden/common/misc/nodeUtils"; +import { AbstractStorageService } from "@bitwarden/common/platform/abstractions/storage.service"; // See: https://github.com/sindresorhus/electron-store/blob/main/index.d.ts interface ElectronStoreOptions { diff --git a/apps/desktop/src/services/i18n.service.ts b/apps/desktop/src/platform/services/i18n.service.ts similarity index 97% rename from apps/desktop/src/services/i18n.service.ts rename to apps/desktop/src/platform/services/i18n.service.ts index e36af04c181..ddcc9ca972e 100644 --- a/apps/desktop/src/services/i18n.service.ts +++ b/apps/desktop/src/platform/services/i18n.service.ts @@ -1,7 +1,7 @@ import * as fs from "fs"; import * as path from "path"; -import { I18nService as BaseI18nService } from "@bitwarden/common/services/i18n.service"; +import { I18nService as BaseI18nService } from "@bitwarden/common/platform/services/i18n.service"; export class I18nService extends BaseI18nService { constructor(systemLanguage: string, localesDirectory: string) { diff --git a/apps/desktop/src/services/electron-main-messaging.service.ts b/apps/desktop/src/services/electron-main-messaging.service.ts index 07afddec8c3..c37fe3ea49f 100644 --- a/apps/desktop/src/services/electron-main-messaging.service.ts +++ b/apps/desktop/src/services/electron-main-messaging.service.ts @@ -2,8 +2,8 @@ import * as path from "path"; import { app, dialog, ipcMain, Menu, MenuItem, nativeTheme, session, Notification } from "electron"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { ThemeType } from "@bitwarden/common/enums"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { WindowMain } from "../main/window.main"; import { RendererMenuItem } from "../utils"; diff --git a/apps/desktop/src/services/encrypted-message-handler.service.ts b/apps/desktop/src/services/encrypted-message-handler.service.ts index 4891a5799a6..1889bfc7451 100644 --- a/apps/desktop/src/services/encrypted-message-handler.service.ts +++ b/apps/desktop/src/services/encrypted-message-handler.service.ts @@ -1,10 +1,10 @@ import { firstValueFrom } from "rxjs"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; @@ -24,8 +24,7 @@ import { GenerateResponse } from "../models/native-messaging/encrypted-message-r import { MessageResponseData } from "../models/native-messaging/encrypted-message-responses/message-response-data"; import { SuccessStatusResponse } from "../models/native-messaging/encrypted-message-responses/success-status-response"; import { UserStatusErrorResponse } from "../models/native-messaging/encrypted-message-responses/user-status-error-response"; - -import { ElectronStateService } from "./electron-state.service"; +import { ElectronStateService } from "../platform/services/electron-state.service"; export class EncryptedMessageHandlerService { constructor( diff --git a/apps/desktop/src/services/native-message-handler.service.ts b/apps/desktop/src/services/native-message-handler.service.ts index 4ef4545d2b1..1921ea5fa05 100644 --- a/apps/desktop/src/services/native-message-handler.service.ts +++ b/apps/desktop/src/services/native-message-handler.service.ts @@ -2,15 +2,15 @@ import { Injectable } from "@angular/core"; import { ipcRenderer } from "electron"; import Swal from "sweetalert2"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { NativeMessagingVersion } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; -import { StateService } from "@bitwarden/common/services/state.service"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; +import { StateService } from "@bitwarden/common/platform/services/state.service"; import { DecryptedCommandData } from "../models/native-messaging/decrypted-command-data"; import { EncryptedMessage } from "../models/native-messaging/encrypted-message"; diff --git a/apps/desktop/src/services/native-messaging.service.ts b/apps/desktop/src/services/native-messaging.service.ts index 39b916261e8..494a65b6703 100644 --- a/apps/desktop/src/services/native-messaging.service.ts +++ b/apps/desktop/src/services/native-messaging.service.ts @@ -3,17 +3,17 @@ import { ipcRenderer } from "electron"; import { firstValueFrom } from "rxjs"; import Swal from "sweetalert2"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { KeySuffixOptions } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { LegacyMessage } from "../models/native-messaging/legacy-message"; import { LegacyMessageWrapper } from "../models/native-messaging/legacy-message-wrapper"; diff --git a/apps/desktop/src/vault/app/accounts/premium.component.ts b/apps/desktop/src/vault/app/accounts/premium.component.ts index 70650661e77..13116fd3ed4 100644 --- a/apps/desktop/src/vault/app/accounts/premium.component.ts +++ b/apps/desktop/src/vault/app/accounts/premium.component.ts @@ -3,10 +3,10 @@ import { Component } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { PremiumComponent as BasePremiumComponent } from "@bitwarden/angular/vault/components/premium.component"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Component({ selector: "app-premium", diff --git a/apps/desktop/src/vault/app/vault/add-edit-custom-fields.component.ts b/apps/desktop/src/vault/app/vault/add-edit-custom-fields.component.ts index 517e5016c6f..6992455a8a6 100644 --- a/apps/desktop/src/vault/app/vault/add-edit-custom-fields.component.ts +++ b/apps/desktop/src/vault/app/vault/add-edit-custom-fields.component.ts @@ -2,7 +2,7 @@ import { Component } from "@angular/core"; import { AddEditCustomFieldsComponent as BaseAddEditCustomFieldsComponent } from "@bitwarden/angular/vault/components/add-edit-custom-fields.component"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @Component({ selector: "app-vault-add-edit-custom-fields", diff --git a/apps/desktop/src/vault/app/vault/add-edit.component.ts b/apps/desktop/src/vault/app/vault/add-edit.component.ts index 8718f171d1d..d06f37dc08d 100644 --- a/apps/desktop/src/vault/app/vault/add-edit.component.ts +++ b/apps/desktop/src/vault/app/vault/add-edit.component.ts @@ -4,16 +4,16 @@ import { NgForm } from "@angular/forms"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/vault/components/add-edit.component"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; diff --git a/apps/desktop/src/vault/app/vault/attachments.component.ts b/apps/desktop/src/vault/app/vault/attachments.component.ts index bd327951a1a..edee15fc4e5 100644 --- a/apps/desktop/src/vault/app/vault/attachments.component.ts +++ b/apps/desktop/src/vault/app/vault/attachments.component.ts @@ -3,12 +3,12 @@ import { Component } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { AttachmentsComponent as BaseAttachmentsComponent } from "@bitwarden/angular/vault/components/attachments.component"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; @Component({ diff --git a/apps/desktop/src/vault/app/vault/collections.component.ts b/apps/desktop/src/vault/app/vault/collections.component.ts index ae64f67b0ff..1b596c9c6a8 100644 --- a/apps/desktop/src/vault/app/vault/collections.component.ts +++ b/apps/desktop/src/vault/app/vault/collections.component.ts @@ -1,10 +1,10 @@ import { Component } from "@angular/core"; import { CollectionsComponent as BaseCollectionsComponent } from "@bitwarden/angular/admin-console/components/collections.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; @Component({ diff --git a/apps/desktop/src/vault/app/vault/folder-add-edit.component.ts b/apps/desktop/src/vault/app/vault/folder-add-edit.component.ts index 6b7321e634a..9f28a2ea063 100644 --- a/apps/desktop/src/vault/app/vault/folder-add-edit.component.ts +++ b/apps/desktop/src/vault/app/vault/folder-add-edit.component.ts @@ -2,9 +2,9 @@ import { Component } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { FolderAddEditComponent as BaseFolderAddEditComponent } from "@bitwarden/angular/vault/components/folder-add-edit.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; diff --git a/apps/desktop/src/vault/app/vault/password-history.component.ts b/apps/desktop/src/vault/app/vault/password-history.component.ts index e52236a0c0b..3d542f62331 100644 --- a/apps/desktop/src/vault/app/vault/password-history.component.ts +++ b/apps/desktop/src/vault/app/vault/password-history.component.ts @@ -1,8 +1,8 @@ import { Component } from "@angular/core"; import { PasswordHistoryComponent as BasePasswordHistoryComponent } from "@bitwarden/angular/vault/components/password-history.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; @Component({ diff --git a/apps/desktop/src/vault/app/vault/share.component.ts b/apps/desktop/src/vault/app/vault/share.component.ts index 683bd7d5238..e07a100d882 100644 --- a/apps/desktop/src/vault/app/vault/share.component.ts +++ b/apps/desktop/src/vault/app/vault/share.component.ts @@ -2,11 +2,11 @@ import { Component } from "@angular/core"; import { ModalRef } from "@bitwarden/angular/components/modal/modal.ref"; import { ShareComponent as BaseShareComponent } from "@bitwarden/angular/components/share.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; @Component({ diff --git a/apps/desktop/src/vault/app/vault/vault.component.ts b/apps/desktop/src/vault/app/vault/vault.component.ts index 2290806e307..5405a913a75 100644 --- a/apps/desktop/src/vault/app/vault/vault.component.ts +++ b/apps/desktop/src/vault/app/vault/vault.component.ts @@ -15,14 +15,14 @@ import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/s import { ModalService } from "@bitwarden/angular/services/modal.service"; import { VaultFilter } from "@bitwarden/angular/vault/vault-filter/models/vault-filter.model"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; import { EventType } from "@bitwarden/common/enums"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { CipherRepromptType } from "@bitwarden/common/vault/enums/cipher-reprompt-type"; diff --git a/apps/desktop/src/vault/app/vault/view.component.ts b/apps/desktop/src/vault/app/vault/view.component.ts index 85b8930916b..1555199d0ca 100644 --- a/apps/desktop/src/vault/app/vault/view.component.ts +++ b/apps/desktop/src/vault/app/vault/view.component.ts @@ -11,17 +11,17 @@ import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ViewComponent as BaseViewComponent } from "@bitwarden/angular/vault/components/view.component"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; import { TokenService } from "@bitwarden/common/auth/abstractions/token.service"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; diff --git a/apps/desktop/tsconfig.json b/apps/desktop/tsconfig.json index 3d01b5ba6fd..3721d4f211e 100644 --- a/apps/desktop/tsconfig.json +++ b/apps/desktop/tsconfig.json @@ -20,5 +20,5 @@ "strictTemplates": true, "preserveWhitespaces": true }, - "include": ["src", "../../libs/common/src/services/**/*.worker.ts"] + "include": ["src", "../../libs/common/src/platform/services/**/*.worker.ts"] } diff --git a/apps/web/src/app/accounts/trial-initiation/trial-initiation.component.spec.ts b/apps/web/src/app/accounts/trial-initiation/trial-initiation.component.spec.ts index 30f5835a572..4cc9aa914f1 100644 --- a/apps/web/src/app/accounts/trial-initiation/trial-initiation.component.spec.ts +++ b/apps/web/src/app/accounts/trial-initiation/trial-initiation.component.spec.ts @@ -8,16 +8,16 @@ import { RouterTestingModule } from "@angular/router/testing"; import { mock, MockProxy } from "jest-mock-extended"; import { BehaviorSubject, of } from "rxjs"; -import { I18nPipe } from "@bitwarden/angular/pipes/i18n.pipe"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { I18nPipe } from "@bitwarden/angular/platform/pipes/i18n.pipe"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { MasterPasswordPolicyOptions } from "@bitwarden/common/admin-console/models/domain/master-password-policy-options"; import { PolicyResponse } from "@bitwarden/common/admin-console/models/response/policy.response"; import { PlanType } from "@bitwarden/common/billing/enums"; import { ListResponse } from "@bitwarden/common/models/response/list.response"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { RouterService } from "../../core"; diff --git a/apps/web/src/app/accounts/trial-initiation/trial-initiation.component.ts b/apps/web/src/app/accounts/trial-initiation/trial-initiation.component.ts index 80d69f0915d..57a807c9a35 100644 --- a/apps/web/src/app/accounts/trial-initiation/trial-initiation.component.ts +++ b/apps/web/src/app/accounts/trial-initiation/trial-initiation.component.ts @@ -5,9 +5,6 @@ import { UntypedFormBuilder, Validators } from "@angular/forms"; import { ActivatedRoute, Router } from "@angular/router"; import { first, Subject, takeUntil } from "rxjs"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyData } from "@bitwarden/common/admin-console/models/data/policy.data"; @@ -16,6 +13,9 @@ import { Policy } from "@bitwarden/common/admin-console/models/domain/policy"; import { PlanType } from "@bitwarden/common/billing/enums"; import { ProductType } from "@bitwarden/common/enums"; import { ReferenceEventRequest } from "@bitwarden/common/models/request/reference-event.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { RouterService } from "./../../core/router.service"; import { VerticalStepperComponent } from "./vertical-stepper/vertical-stepper.component"; diff --git a/apps/web/src/app/admin-console/components/organization-switcher.component.ts b/apps/web/src/app/admin-console/components/organization-switcher.component.ts index 518b99240d2..daca58d601a 100644 --- a/apps/web/src/app/admin-console/components/organization-switcher.component.ts +++ b/apps/web/src/app/admin-console/components/organization-switcher.component.ts @@ -1,13 +1,13 @@ import { Component, Input, OnInit } from "@angular/core"; import { map, Observable } from "rxjs"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { canAccessAdmin, OrganizationService, } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; @Component({ selector: "app-organization-switcher", diff --git a/apps/web/src/app/admin-console/organizations/core/services/collection-admin.service.ts b/apps/web/src/app/admin-console/organizations/core/services/collection-admin.service.ts index 45adb008426..85f3d9423f1 100644 --- a/apps/web/src/app/admin-console/organizations/core/services/collection-admin.service.ts +++ b/apps/web/src/app/admin-console/organizations/core/services/collection-admin.service.ts @@ -1,14 +1,14 @@ import { Injectable } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; import { CollectionRequest } from "@bitwarden/common/admin-console/models/request/collection.request"; import { SelectionReadOnlyRequest } from "@bitwarden/common/admin-console/models/request/selection-read-only.request"; import { CollectionAccessDetailsResponse, CollectionResponse, } from "@bitwarden/common/admin-console/models/response/collection.response"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; import { CoreOrganizationModule } from "../core-organization.module"; import { CollectionAdminView } from "../views/collection-admin.view"; diff --git a/apps/web/src/app/admin-console/organizations/guards/is-paid-org.guard.ts b/apps/web/src/app/admin-console/organizations/guards/is-paid-org.guard.ts index 8460568ea6e..10d39d110e4 100644 --- a/apps/web/src/app/admin-console/organizations/guards/is-paid-org.guard.ts +++ b/apps/web/src/app/admin-console/organizations/guards/is-paid-org.guard.ts @@ -2,8 +2,8 @@ import { Injectable } from "@angular/core"; import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from "@angular/router"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; @Injectable({ providedIn: "root", diff --git a/apps/web/src/app/admin-console/organizations/guards/org-permissions.guard.spec.ts b/apps/web/src/app/admin-console/organizations/guards/org-permissions.guard.spec.ts index b7e64e2fec6..d599ce768df 100644 --- a/apps/web/src/app/admin-console/organizations/guards/org-permissions.guard.spec.ts +++ b/apps/web/src/app/admin-console/organizations/guards/org-permissions.guard.spec.ts @@ -6,11 +6,11 @@ import { } from "@angular/router"; import { mock, MockProxy } from "jest-mock-extended"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { OrganizationUserType } from "@bitwarden/common/admin-console/enums"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { OrganizationPermissionsGuard } from "./org-permissions.guard"; diff --git a/apps/web/src/app/admin-console/organizations/guards/org-permissions.guard.ts b/apps/web/src/app/admin-console/organizations/guards/org-permissions.guard.ts index 26263eb8169..595f72ba86e 100644 --- a/apps/web/src/app/admin-console/organizations/guards/org-permissions.guard.ts +++ b/apps/web/src/app/admin-console/organizations/guards/org-permissions.guard.ts @@ -1,13 +1,13 @@ import { Injectable } from "@angular/core"; import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from "@angular/router"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { canAccessOrgAdmin, OrganizationService, } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; @Injectable({ diff --git a/apps/web/src/app/admin-console/organizations/manage/entity-events.component.ts b/apps/web/src/app/admin-console/organizations/manage/entity-events.component.ts index 26f2bccd3ce..d6ecb8ca94e 100644 --- a/apps/web/src/app/admin-console/organizations/manage/entity-events.component.ts +++ b/apps/web/src/app/admin-console/organizations/manage/entity-events.component.ts @@ -2,12 +2,12 @@ import { Component, Input, OnInit } from "@angular/core"; import { UserNamePipe } from "@bitwarden/angular/pipes/user-name.pipe"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { EventResponse } from "@bitwarden/common/models/response/event.response"; import { ListResponse } from "@bitwarden/common/models/response/list.response"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { EventService } from "../../../core"; diff --git a/apps/web/src/app/admin-console/organizations/manage/entity-users.component.ts b/apps/web/src/app/admin-console/organizations/manage/entity-users.component.ts index 5f522a258e6..af0c344a29e 100644 --- a/apps/web/src/app/admin-console/organizations/manage/entity-users.component.ts +++ b/apps/web/src/app/admin-console/organizations/manage/entity-users.component.ts @@ -2,17 +2,17 @@ import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core"; import { SearchPipe } from "@bitwarden/angular/pipes/search.pipe"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; import { OrganizationUserUserDetailsResponse } from "@bitwarden/common/abstractions/organization-user/responses"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationUserStatusType, OrganizationUserType, } from "@bitwarden/common/admin-console/enums"; import { SelectionReadOnlyRequest } from "@bitwarden/common/admin-console/models/request/selection-read-only.request"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; @Component({ selector: "app-entity-users", diff --git a/apps/web/src/app/admin-console/organizations/manage/events.component.ts b/apps/web/src/app/admin-console/organizations/manage/events.component.ts index df10e3c7e39..0d6e1c0f079 100644 --- a/apps/web/src/app/admin-console/organizations/manage/events.component.ts +++ b/apps/web/src/app/admin-console/organizations/manage/events.component.ts @@ -4,16 +4,16 @@ import { concatMap, Subject, takeUntil } from "rxjs"; import { UserNamePipe } from "@bitwarden/angular/pipes/user-name.pipe"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { ProviderService } from "@bitwarden/common/admin-console/abstractions/provider.service"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { EventSystemUser } from "@bitwarden/common/enums"; import { EventResponse } from "@bitwarden/common/models/response/event.response"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { BaseEventsComponent } from "../../../common/base.events.component"; import { EventService } from "../../../core"; diff --git a/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.ts b/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.ts index d70cc061fd7..433c6049f6a 100644 --- a/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.ts +++ b/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.ts @@ -5,15 +5,15 @@ import { catchError, combineLatest, from, map, of, Subject, switchMap, takeUntil import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { CollectionData } from "@bitwarden/common/admin-console/models/data/collection.data"; import { Collection } from "@bitwarden/common/admin-console/models/domain/collection"; import { CollectionDetailsResponse } from "@bitwarden/common/admin-console/models/response/collection.response"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { GroupService, GroupView } from "../core"; import { diff --git a/apps/web/src/app/admin-console/organizations/manage/groups.component.ts b/apps/web/src/app/admin-console/organizations/manage/groups.component.ts index 79a8d3d86b3..24eb9305858 100644 --- a/apps/web/src/app/admin-console/organizations/manage/groups.component.ts +++ b/apps/web/src/app/admin-console/organizations/manage/groups.component.ts @@ -18,9 +18,6 @@ import { SearchPipe } from "@bitwarden/angular/pipes/search.pipe"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { CollectionData } from "@bitwarden/common/admin-console/models/data/collection.data"; @@ -30,8 +27,11 @@ import { CollectionResponse, } from "@bitwarden/common/admin-console/models/response/collection.response"; import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; -import { Utils } from "@bitwarden/common/misc/utils"; import { ListResponse } from "@bitwarden/common/models/response/list.response"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { GroupService, GroupView } from "../core"; diff --git a/apps/web/src/app/admin-console/organizations/manage/user-confirm.component.ts b/apps/web/src/app/admin-console/organizations/manage/user-confirm.component.ts index 0ae5bdf8047..4d3cd0b6ede 100644 --- a/apps/web/src/app/admin-console/organizations/manage/user-confirm.component.ts +++ b/apps/web/src/app/admin-console/organizations/manage/user-confirm.component.ts @@ -1,8 +1,8 @@ import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Component({ selector: "app-user-confirm", diff --git a/apps/web/src/app/admin-console/organizations/members/components/bulk/bulk-confirm.component.ts b/apps/web/src/app/admin-console/organizations/members/components/bulk/bulk-confirm.component.ts index ac861249066..669a8954eee 100644 --- a/apps/web/src/app/admin-console/organizations/members/components/bulk/bulk-confirm.component.ts +++ b/apps/web/src/app/admin-console/organizations/members/components/bulk/bulk-confirm.component.ts @@ -1,12 +1,12 @@ import { Component, Input, OnInit } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; import { OrganizationUserBulkConfirmRequest } from "@bitwarden/common/abstractions/organization-user/requests"; import { OrganizationUserStatusType } from "@bitwarden/common/admin-console/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { BulkUserDetails } from "./bulk-status.component"; diff --git a/apps/web/src/app/admin-console/organizations/members/components/bulk/bulk-remove.component.ts b/apps/web/src/app/admin-console/organizations/members/components/bulk/bulk-remove.component.ts index 792be72920e..d083d0cd1e0 100644 --- a/apps/web/src/app/admin-console/organizations/members/components/bulk/bulk-remove.component.ts +++ b/apps/web/src/app/admin-console/organizations/members/components/bulk/bulk-remove.component.ts @@ -1,8 +1,8 @@ import { Component, Input } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { BulkUserDetails } from "./bulk-status.component"; diff --git a/apps/web/src/app/admin-console/organizations/members/components/bulk/bulk-restore-revoke.component.ts b/apps/web/src/app/admin-console/organizations/members/components/bulk/bulk-restore-revoke.component.ts index b039db78788..82f3a4d7e32 100644 --- a/apps/web/src/app/admin-console/organizations/members/components/bulk/bulk-restore-revoke.component.ts +++ b/apps/web/src/app/admin-console/organizations/members/components/bulk/bulk-restore-revoke.component.ts @@ -1,8 +1,8 @@ import { Component } from "@angular/core"; import { ModalConfig } from "@bitwarden/angular/services/modal.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { BulkUserDetails } from "./bulk-status.component"; diff --git a/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.ts b/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.ts index 894eca5547b..72833a09719 100644 --- a/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.ts +++ b/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.ts @@ -4,9 +4,7 @@ import { FormBuilder, Validators } from "@angular/forms"; import { combineLatest, of, shareReplay, Subject, switchMap, takeUntil } from "rxjs"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { OrganizationUserStatusType, @@ -15,6 +13,8 @@ import { import { PermissionsApi } from "@bitwarden/common/admin-console/models/api/permissions.api"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { flagEnabled } from "../../../../../../utils/flags"; import { diff --git a/apps/web/src/app/admin-console/organizations/members/components/member-dialog/nested-checkbox.component.ts b/apps/web/src/app/admin-console/organizations/members/components/member-dialog/nested-checkbox.component.ts index 278bd27fdd6..f16a932ddc1 100644 --- a/apps/web/src/app/admin-console/organizations/members/components/member-dialog/nested-checkbox.component.ts +++ b/apps/web/src/app/admin-console/organizations/members/components/member-dialog/nested-checkbox.component.ts @@ -3,7 +3,7 @@ import { Component, EventEmitter, Input, Output, OnInit, OnDestroy } from "@angu import { FormControl, FormGroup } from "@angular/forms"; import { Subject, takeUntil } from "rxjs"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; @Component({ selector: "app-nested-checkbox", diff --git a/apps/web/src/app/admin-console/organizations/members/components/reset-password.component.ts b/apps/web/src/app/admin-console/organizations/members/components/reset-password.component.ts index cc15ccf8e30..55f935c575e 100644 --- a/apps/web/src/app/admin-console/organizations/members/components/reset-password.component.ts +++ b/apps/web/src/app/admin-console/organizations/members/components/reset-password.component.ts @@ -12,18 +12,18 @@ import zxcvbn from "zxcvbn"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { PasswordStrengthComponent } from "@bitwarden/angular/shared/components/password-strength/password-strength.component"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; import { OrganizationUserResetPasswordRequest } from "@bitwarden/common/abstractions/organization-user/requests"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { MasterPasswordPolicyOptions } from "@bitwarden/common/admin-console/models/domain/master-password-policy-options"; import { KdfConfig } from "@bitwarden/common/auth/models/domain/kdf-config"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; @Component({ diff --git a/apps/web/src/app/admin-console/organizations/members/people.component.ts b/apps/web/src/app/admin-console/organizations/members/people.component.ts index aa42f488bdc..33241604976 100644 --- a/apps/web/src/app/admin-console/organizations/members/people.component.ts +++ b/apps/web/src/app/admin-console/organizations/members/people.component.ts @@ -23,19 +23,13 @@ import { } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; import { OrganizationUserConfirmRequest } from "@bitwarden/common/abstractions/organization-user/requests"; import { OrganizationUserBulkResponse, OrganizationUserUserDetailsResponse, } from "@bitwarden/common/abstractions/organization-user/responses"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; @@ -53,6 +47,12 @@ import { OrganizationKeysRequest } from "@bitwarden/common/admin-console/models/ import { CollectionDetailsResponse } from "@bitwarden/common/admin-console/models/response/collection.response"; import { ProductType } from "@bitwarden/common/enums"; import { ListResponse } from "@bitwarden/common/models/response/list.response"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { EntityEventsComponent } from "../../../admin-console/organizations/manage/entity-events.component"; diff --git a/apps/web/src/app/admin-console/organizations/policies/master-password.component.ts b/apps/web/src/app/admin-console/organizations/policies/master-password.component.ts index b0a338ce865..3824e0bc555 100644 --- a/apps/web/src/app/admin-console/organizations/policies/master-password.component.ts +++ b/apps/web/src/app/admin-console/organizations/policies/master-password.component.ts @@ -2,11 +2,11 @@ import { Component } from "@angular/core"; import { FormBuilder, FormGroup, Validators } from "@angular/forms"; import { ControlsOf } from "@bitwarden/angular/types/controls-of"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { MasterPasswordPolicyOptions } from "@bitwarden/common/admin-console/models/domain/master-password-policy-options"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { BasePolicy, BasePolicyComponent } from "./base-policy.component"; diff --git a/apps/web/src/app/admin-console/organizations/policies/password-generator.component.ts b/apps/web/src/app/admin-console/organizations/policies/password-generator.component.ts index ec7397697c5..2bd98cf796d 100644 --- a/apps/web/src/app/admin-console/organizations/policies/password-generator.component.ts +++ b/apps/web/src/app/admin-console/organizations/policies/password-generator.component.ts @@ -1,8 +1,8 @@ import { Component } from "@angular/core"; import { UntypedFormBuilder } from "@angular/forms"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { BasePolicy, BasePolicyComponent } from "./base-policy.component"; diff --git a/apps/web/src/app/admin-console/organizations/policies/policy-edit.component.ts b/apps/web/src/app/admin-console/organizations/policies/policy-edit.component.ts index 71f3238d7b8..11cb1673cc1 100644 --- a/apps/web/src/app/admin-console/organizations/policies/policy-edit.component.ts +++ b/apps/web/src/app/admin-console/organizations/policies/policy-edit.component.ts @@ -9,13 +9,13 @@ import { ViewContainerRef, } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { PolicyRequest } from "@bitwarden/common/admin-console/models/request/policy.request"; import { PolicyResponse } from "@bitwarden/common/admin-console/models/response/policy.response"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { BasePolicy, BasePolicyComponent } from "../policies"; diff --git a/apps/web/src/app/admin-console/organizations/policies/require-sso.component.ts b/apps/web/src/app/admin-console/organizations/policies/require-sso.component.ts index 8e2cdbe3f9a..c969343670f 100644 --- a/apps/web/src/app/admin-console/organizations/policies/require-sso.component.ts +++ b/apps/web/src/app/admin-console/organizations/policies/require-sso.component.ts @@ -1,9 +1,9 @@ import { Component } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { PolicyRequest } from "@bitwarden/common/admin-console/models/request/policy.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { BasePolicy, BasePolicyComponent } from "./base-policy.component"; diff --git a/apps/web/src/app/admin-console/organizations/policies/single-org.component.ts b/apps/web/src/app/admin-console/organizations/policies/single-org.component.ts index bb496199e7a..12b93145359 100644 --- a/apps/web/src/app/admin-console/organizations/policies/single-org.component.ts +++ b/apps/web/src/app/admin-console/organizations/policies/single-org.component.ts @@ -1,8 +1,8 @@ import { Component } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { PolicyRequest } from "@bitwarden/common/admin-console/models/request/policy.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { BasePolicy, BasePolicyComponent } from "./base-policy.component"; diff --git a/apps/web/src/app/admin-console/organizations/reporting/reports-home.component.ts b/apps/web/src/app/admin-console/organizations/reporting/reports-home.component.ts index 803e76c8bfd..57ea7c74732 100644 --- a/apps/web/src/app/admin-console/organizations/reporting/reports-home.component.ts +++ b/apps/web/src/app/admin-console/organizations/reporting/reports-home.component.ts @@ -2,8 +2,8 @@ import { Component, OnInit } from "@angular/core"; import { ActivatedRoute, NavigationEnd, Router } from "@angular/router"; import { filter, map, Observable, startWith } from "rxjs"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { ReportVariant, reports, ReportType, ReportEntry } from "../../../reports"; diff --git a/apps/web/src/app/admin-console/organizations/settings/account.component.ts b/apps/web/src/app/admin-console/organizations/settings/account.component.ts index 473ce88f2d4..2d0c1b17bea 100644 --- a/apps/web/src/app/admin-console/organizations/settings/account.component.ts +++ b/apps/web/src/app/admin-console/organizations/settings/account.component.ts @@ -4,15 +4,15 @@ import { lastValueFrom } from "rxjs"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { OrganizationKeysRequest } from "@bitwarden/common/admin-console/models/request/organization-keys.request"; import { OrganizationUpdateRequest } from "@bitwarden/common/admin-console/models/request/organization-update.request"; import { OrganizationResponse } from "@bitwarden/common/admin-console/models/response/organization.response"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { ApiKeyComponent } from "../../../settings/api-key.component"; import { PurgeVaultComponent } from "../../../settings/purge-vault.component"; diff --git a/apps/web/src/app/admin-console/organizations/settings/components/delete-organization-dialog.component.ts b/apps/web/src/app/admin-console/organizations/settings/components/delete-organization-dialog.component.ts index e99a0d29109..646b542aa13 100644 --- a/apps/web/src/app/admin-console/organizations/settings/components/delete-organization-dialog.component.ts +++ b/apps/web/src/app/admin-console/organizations/settings/components/delete-organization-dialog.component.ts @@ -4,14 +4,14 @@ import { FormBuilder, FormControl, Validators } from "@angular/forms"; import { combineLatest, Subject, takeUntil } from "rxjs"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { Verification } from "@bitwarden/common/types/verification"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; diff --git a/apps/web/src/app/admin-console/organizations/settings/two-factor-setup.component.ts b/apps/web/src/app/admin-console/organizations/settings/two-factor-setup.component.ts index 9f223d6b71b..f94ad051009 100644 --- a/apps/web/src/app/admin-console/organizations/settings/two-factor-setup.component.ts +++ b/apps/web/src/app/admin-console/organizations/settings/two-factor-setup.component.ts @@ -3,10 +3,10 @@ import { ActivatedRoute } from "@angular/router"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { TwoFactorDuoComponent } from "../../../auth/settings/two-factor-duo.component"; import { TwoFactorSetupComponent as BaseTwoFactorSetupComponent } from "../../../auth/settings/two-factor-setup.component"; diff --git a/apps/web/src/app/admin-console/organizations/shared/components/access-selector/access-selector.component.spec.ts b/apps/web/src/app/admin-console/organizations/shared/components/access-selector/access-selector.component.spec.ts index 47c4dc01751..10bcb9e5083 100644 --- a/apps/web/src/app/admin-console/organizations/shared/components/access-selector/access-selector.component.spec.ts +++ b/apps/web/src/app/admin-console/organizations/shared/components/access-selector/access-selector.component.spec.ts @@ -17,7 +17,7 @@ import { } from "@bitwarden/components"; import { SelectItemView } from "@bitwarden/components/src/multi-select/models/select-item-view"; -import { PreloadedEnglishI18nModule } from "../../../../../tests/preloaded-english-i18n.module"; +import { PreloadedEnglishI18nModule } from "../../../../../core/tests"; import { AccessSelectorComponent, PermissionMode } from "./access-selector.component"; import { AccessItemType, CollectionPermission } from "./access-selector.models"; diff --git a/apps/web/src/app/admin-console/organizations/shared/components/access-selector/access-selector.component.ts b/apps/web/src/app/admin-console/organizations/shared/components/access-selector/access-selector.component.ts index d268a6ca5e6..d2d1768a67c 100644 --- a/apps/web/src/app/admin-console/organizations/shared/components/access-selector/access-selector.component.ts +++ b/apps/web/src/app/admin-console/organizations/shared/components/access-selector/access-selector.component.ts @@ -10,7 +10,7 @@ import { Subject, takeUntil } from "rxjs"; import { ControlsOf } from "@bitwarden/angular/types/controls-of"; import { FormSelectionList } from "@bitwarden/angular/utils/form-selection-list"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { SelectItemView } from "@bitwarden/components/src/multi-select/models/select-item-view"; import { diff --git a/apps/web/src/app/admin-console/organizations/shared/components/access-selector/access-selector.stories.ts b/apps/web/src/app/admin-console/organizations/shared/components/access-selector/access-selector.stories.ts index 4fa8e43520d..b569d941b6e 100644 --- a/apps/web/src/app/admin-console/organizations/shared/components/access-selector/access-selector.stories.ts +++ b/apps/web/src/app/admin-console/organizations/shared/components/access-selector/access-selector.stories.ts @@ -19,7 +19,7 @@ import { TabsModule, } from "@bitwarden/components"; -import { PreloadedEnglishI18nModule } from "../../../../../tests/preloaded-english-i18n.module"; +import { PreloadedEnglishI18nModule } from "../../../../../core/tests"; import { AccessSelectorComponent } from "./access-selector.component"; import { AccessItemType, AccessItemView, CollectionPermission } from "./access-selector.models"; diff --git a/apps/web/src/app/admin-console/organizations/shared/components/access-selector/user-type.pipe.ts b/apps/web/src/app/admin-console/organizations/shared/components/access-selector/user-type.pipe.ts index 82c4a0c7daf..01963406e29 100644 --- a/apps/web/src/app/admin-console/organizations/shared/components/access-selector/user-type.pipe.ts +++ b/apps/web/src/app/admin-console/organizations/shared/components/access-selector/user-type.pipe.ts @@ -1,7 +1,7 @@ import { Pipe, PipeTransform } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { OrganizationUserType } from "@bitwarden/common/admin-console/enums"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @Pipe({ name: "userType", diff --git a/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.ts b/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.ts index 817f8486e44..2ac91bf0abd 100644 --- a/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.ts +++ b/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.ts @@ -4,13 +4,13 @@ import { FormBuilder, Validators } from "@angular/forms"; import { combineLatest, of, shareReplay, Subject, switchMap, takeUntil } from "rxjs"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; import { OrganizationUserUserDetailsResponse } from "@bitwarden/common/abstractions/organization-user/responses"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { BitValidators } from "@bitwarden/components"; import { diff --git a/apps/web/src/app/admin-console/organizations/sponsorships/families-for-enterprise-setup.component.ts b/apps/web/src/app/admin-console/organizations/sponsorships/families-for-enterprise-setup.component.ts index 1406f080249..e7e81431cb9 100644 --- a/apps/web/src/app/admin-console/organizations/sponsorships/families-for-enterprise-setup.component.ts +++ b/apps/web/src/app/admin-console/organizations/sponsorships/families-for-enterprise-setup.component.ts @@ -5,14 +5,14 @@ import { first, map, takeUntil } from "rxjs/operators"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { OrganizationSponsorshipRedeemRequest } from "@bitwarden/common/admin-console/models/request/organization/organization-sponsorship-redeem.request"; import { PlanSponsorshipType, PlanType } from "@bitwarden/common/billing/enums"; import { ProductType } from "@bitwarden/common/enums"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { OrganizationPlansComponent } from "../../../billing/settings/organization-plans.component"; diff --git a/apps/web/src/app/admin-console/organizations/tools/exposed-passwords-report.component.ts b/apps/web/src/app/admin-console/organizations/tools/exposed-passwords-report.component.ts index ca0f51dda8e..cf721098a2c 100644 --- a/apps/web/src/app/admin-console/organizations/tools/exposed-passwords-report.component.ts +++ b/apps/web/src/app/admin-console/organizations/tools/exposed-passwords-report.component.ts @@ -3,8 +3,8 @@ import { ActivatedRoute } from "@angular/router"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { Cipher } from "@bitwarden/common/vault/models/domain/cipher"; diff --git a/apps/web/src/app/admin-console/organizations/tools/import-export/org-export.component.ts b/apps/web/src/app/admin-console/organizations/tools/import-export/org-export.component.ts index d8c657cdab4..56fffd82603 100644 --- a/apps/web/src/app/admin-console/organizations/tools/import-export/org-export.component.ts +++ b/apps/web/src/app/admin-console/organizations/tools/import-export/org-export.component.ts @@ -4,15 +4,15 @@ import { ActivatedRoute } from "@angular/router"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { EventType } from "@bitwarden/common/enums"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { VaultExportServiceAbstraction } from "@bitwarden/exporter/vault-export"; import { ExportComponent } from "../../../../tools/import-export/export.component"; diff --git a/apps/web/src/app/admin-console/organizations/tools/import-export/org-import-export.module.ts b/apps/web/src/app/admin-console/organizations/tools/import-export/org-import-export.module.ts index 6b5ad81511e..106b524caf6 100644 --- a/apps/web/src/app/admin-console/organizations/tools/import-export/org-import-export.module.ts +++ b/apps/web/src/app/admin-console/organizations/tools/import-export/org-import-export.module.ts @@ -1,9 +1,9 @@ import { NgModule } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { diff --git a/apps/web/src/app/admin-console/organizations/tools/import-export/org-import.component.ts b/apps/web/src/app/admin-console/organizations/tools/import-export/org-import.component.ts index 355426b06c6..d0dffd481f0 100644 --- a/apps/web/src/app/admin-console/organizations/tools/import-export/org-import.component.ts +++ b/apps/web/src/app/admin-console/organizations/tools/import-export/org-import.component.ts @@ -4,15 +4,15 @@ import { switchMap, takeUntil } from "rxjs/operators"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { canAccessVaultTab, OrganizationService, } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { ImportServiceAbstraction } from "@bitwarden/importer"; diff --git a/apps/web/src/app/admin-console/organizations/tools/inactive-two-factor-report.component.ts b/apps/web/src/app/admin-console/organizations/tools/inactive-two-factor-report.component.ts index 4ba3c4ee4af..9d62073e066 100644 --- a/apps/web/src/app/admin-console/organizations/tools/inactive-two-factor-report.component.ts +++ b/apps/web/src/app/admin-console/organizations/tools/inactive-two-factor-report.component.ts @@ -2,9 +2,9 @@ import { Component } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; diff --git a/apps/web/src/app/admin-console/organizations/tools/reused-passwords-report.component.ts b/apps/web/src/app/admin-console/organizations/tools/reused-passwords-report.component.ts index 5cb2c7c20e0..b410b63e0ff 100644 --- a/apps/web/src/app/admin-console/organizations/tools/reused-passwords-report.component.ts +++ b/apps/web/src/app/admin-console/organizations/tools/reused-passwords-report.component.ts @@ -2,9 +2,9 @@ import { Component } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { Cipher } from "@bitwarden/common/vault/models/domain/cipher"; diff --git a/apps/web/src/app/admin-console/organizations/tools/tools.component.ts b/apps/web/src/app/admin-console/organizations/tools/tools.component.ts index 1978dd194f9..a22cf791b20 100644 --- a/apps/web/src/app/admin-console/organizations/tools/tools.component.ts +++ b/apps/web/src/app/admin-console/organizations/tools/tools.component.ts @@ -1,9 +1,9 @@ import { Component } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; @Component({ selector: "app-org-tools", diff --git a/apps/web/src/app/admin-console/organizations/tools/unsecured-websites-report.component.ts b/apps/web/src/app/admin-console/organizations/tools/unsecured-websites-report.component.ts index f1db307a553..53ce0304507 100644 --- a/apps/web/src/app/admin-console/organizations/tools/unsecured-websites-report.component.ts +++ b/apps/web/src/app/admin-console/organizations/tools/unsecured-websites-report.component.ts @@ -2,8 +2,8 @@ import { Component } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; diff --git a/apps/web/src/app/admin-console/organizations/tools/weak-passwords-report.component.ts b/apps/web/src/app/admin-console/organizations/tools/weak-passwords-report.component.ts index d073cc09951..8f545beb38f 100644 --- a/apps/web/src/app/admin-console/organizations/tools/weak-passwords-report.component.ts +++ b/apps/web/src/app/admin-console/organizations/tools/weak-passwords-report.component.ts @@ -2,8 +2,8 @@ import { Component } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; diff --git a/apps/web/src/app/admin-console/organizations/users/enroll-master-password-reset.component.ts b/apps/web/src/app/admin-console/organizations/users/enroll-master-password-reset.component.ts index eea6641de35..68203033ee7 100644 --- a/apps/web/src/app/admin-console/organizations/users/enroll-master-password-reset.component.ts +++ b/apps/web/src/app/admin-console/organizations/users/enroll-master-password-reset.component.ts @@ -2,16 +2,16 @@ import { Component } from "@angular/core"; import { ModalRef } from "@bitwarden/angular/components/modal/modal.ref"; import { ModalConfig } from "@bitwarden/angular/services/modal.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; import { OrganizationUserResetPasswordEnrollmentRequest } from "@bitwarden/common/abstractions/organization-user/requests"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { Verification } from "@bitwarden/common/types/verification"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; diff --git a/apps/web/src/app/admin-console/providers/providers.component.ts b/apps/web/src/app/admin-console/providers/providers.component.ts index 5d5f4737afd..f7e707b7f6e 100644 --- a/apps/web/src/app/admin-console/providers/providers.component.ts +++ b/apps/web/src/app/admin-console/providers/providers.component.ts @@ -1,9 +1,9 @@ import { Component, OnInit } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { ProviderService } from "@bitwarden/common/admin-console/abstractions/provider.service"; -import { Utils } from "@bitwarden/common/misc/utils"; import { Provider } from "@bitwarden/common/models/domain/provider"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; @Component({ selector: "app-providers", diff --git a/apps/web/src/app/admin-console/settings/sponsored-families.component.ts b/apps/web/src/app/admin-console/settings/sponsored-families.component.ts index 35769f32eaa..0a95773def9 100644 --- a/apps/web/src/app/admin-console/settings/sponsored-families.component.ts +++ b/apps/web/src/app/admin-console/settings/sponsored-families.component.ts @@ -4,12 +4,12 @@ import { map, Observable, Subject, takeUntil } from "rxjs"; import { notAllowedValueAsync } from "@bitwarden/angular/validators/notAllowedValueAsync.validator"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { PlanSponsorshipType } from "@bitwarden/common/billing/enums/"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; interface RequestSponsorshipForm { diff --git a/apps/web/src/app/admin-console/settings/sponsoring-org-row.component.ts b/apps/web/src/app/admin-console/settings/sponsoring-org-row.component.ts index 71f129831b7..aa1bcf0b4fc 100644 --- a/apps/web/src/app/admin-console/settings/sponsoring-org-row.component.ts +++ b/apps/web/src/app/admin-console/settings/sponsoring-org-row.component.ts @@ -4,10 +4,10 @@ import { firstValueFrom } from "rxjs"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "[sponsoring-org-row]", diff --git a/apps/web/src/app/app.component.ts b/apps/web/src/app/app.component.ts index cc1ca40650c..d7447c7a864 100644 --- a/apps/web/src/app/app.component.ts +++ b/apps/web/src/app/app.component.ts @@ -8,21 +8,21 @@ import { Subject, takeUntil } from "rxjs"; import Swal from "sweetalert2"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { ConfigServiceAbstraction } from "@bitwarden/common/abstractions/config/config.service.abstraction"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; import { EventUploadService } from "@bitwarden/common/abstractions/event/event-upload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { NotificationsService } from "@bitwarden/common/abstractions/notifications.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; import { SettingsService } from "@bitwarden/common/abstractions/settings.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { InternalPolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { InternalFolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; diff --git a/apps/web/src/app/auth/accept-emergency.component.ts b/apps/web/src/app/auth/accept-emergency.component.ts index 802d69ba4b5..8ade8d69025 100644 --- a/apps/web/src/app/auth/accept-emergency.component.ts +++ b/apps/web/src/app/auth/accept-emergency.component.ts @@ -2,10 +2,10 @@ import { Component } from "@angular/core"; import { ActivatedRoute, Params, Router } from "@angular/router"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { EmergencyAccessAcceptRequest } from "@bitwarden/common/auth/models/request/emergency-access-accept.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { BaseAcceptComponent } from "../common/base.accept.component"; diff --git a/apps/web/src/app/auth/accept-organization.component.ts b/apps/web/src/app/auth/accept-organization.component.ts index e4a6e95399e..291cea09a49 100644 --- a/apps/web/src/app/auth/accept-organization.component.ts +++ b/apps/web/src/app/auth/accept-organization.component.ts @@ -1,23 +1,23 @@ import { Component } from "@angular/core"; import { ActivatedRoute, Params, Router } from "@angular/router"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; import { OrganizationUserAcceptInitRequest, OrganizationUserAcceptRequest, } from "@bitwarden/common/abstractions/organization-user/requests"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { Policy } from "@bitwarden/common/admin-console/models/domain/policy"; import { OrganizationKeysRequest } from "@bitwarden/common/admin-console/models/request/organization-keys.request"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { BaseAcceptComponent } from "../common/base.accept.component"; diff --git a/apps/web/src/app/auth/hint.component.ts b/apps/web/src/app/auth/hint.component.ts index bb99f0dd683..22c66957f63 100644 --- a/apps/web/src/app/auth/hint.component.ts +++ b/apps/web/src/app/auth/hint.component.ts @@ -3,10 +3,10 @@ import { Router } from "@angular/router"; import { HintComponent as BaseHintComponent } from "@bitwarden/angular/auth/components/hint.component"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-hint", diff --git a/apps/web/src/app/auth/lock.component.ts b/apps/web/src/app/auth/lock.component.ts index d28bc3cfbb5..dbb6b118ca4 100644 --- a/apps/web/src/app/auth/lock.component.ts +++ b/apps/web/src/app/auth/lock.component.ts @@ -4,18 +4,18 @@ import { Router } from "@angular/router"; import { LockComponent as BaseLockComponent } from "@bitwarden/angular/auth/components/lock.component"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; import { InternalPolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { RouterService } from "../core"; diff --git a/apps/web/src/app/auth/login/login-with-device.component.ts b/apps/web/src/app/auth/login/login-with-device.component.ts index 50c583abe27..c5e73bf04b1 100644 --- a/apps/web/src/app/auth/login/login-with-device.component.ts +++ b/apps/web/src/app/auth/login/login-with-device.component.ts @@ -4,16 +4,16 @@ import { Router } from "@angular/router"; import { LoginWithDeviceComponent as BaseLoginWithDeviceComponent } from "@bitwarden/angular/auth/components/login-with-device.component"; import { AnonymousHubService } from "@bitwarden/common/abstractions/anonymousHub.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { AppIdService } from "@bitwarden/common/abstractions/appId.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; +import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { StateService } from "../../core"; diff --git a/apps/web/src/app/auth/login/login.component.ts b/apps/web/src/app/auth/login/login.component.ts index fa5a96cc37f..430e3cfb7d9 100644 --- a/apps/web/src/app/auth/login/login.component.ts +++ b/apps/web/src/app/auth/login/login.component.ts @@ -5,15 +5,7 @@ import { Subject, takeUntil } from "rxjs"; import { first } from "rxjs/operators"; import { LoginComponent as BaseLoginComponent } from "@bitwarden/angular/auth/components/login.component"; -import { AppIdService } from "@bitwarden/common/abstractions/appId.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; import { DevicesApiServiceAbstraction } from "@bitwarden/common/abstractions/devices/devices-api.service.abstraction"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { FormValidationErrorsService } from "@bitwarden/common/abstractions/formValidationErrors.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; import { InternalPolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyData } from "@bitwarden/common/admin-console/models/data/policy.data"; @@ -23,6 +15,14 @@ import { PolicyResponse } from "@bitwarden/common/admin-console/models/response/ import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; import { ListResponse } from "@bitwarden/common/models/response/list.response"; +import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { FormValidationErrorsService } from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { flagEnabled } from "../../../utils/flags"; diff --git a/apps/web/src/app/auth/recover-delete.component.ts b/apps/web/src/app/auth/recover-delete.component.ts index c6af89b3adf..c0e4314a2bc 100644 --- a/apps/web/src/app/auth/recover-delete.component.ts +++ b/apps/web/src/app/auth/recover-delete.component.ts @@ -2,10 +2,10 @@ import { Component } from "@angular/core"; import { Router } from "@angular/router"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { DeleteRecoverRequest } from "@bitwarden/common/models/request/delete-recover.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-recover-delete", diff --git a/apps/web/src/app/auth/recover-two-factor.component.ts b/apps/web/src/app/auth/recover-two-factor.component.ts index df84c4ead67..06816d85460 100644 --- a/apps/web/src/app/auth/recover-two-factor.component.ts +++ b/apps/web/src/app/auth/recover-two-factor.component.ts @@ -2,12 +2,12 @@ import { Component } from "@angular/core"; import { Router } from "@angular/router"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { TwoFactorRecoveryRequest } from "@bitwarden/common/auth/models/request/two-factor-recovery.request"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-recover-two-factor", diff --git a/apps/web/src/app/auth/register-form/register-form.component.ts b/apps/web/src/app/auth/register-form/register-form.component.ts index 0c9631a970f..14071aba7c2 100644 --- a/apps/web/src/app/auth/register-form/register-form.component.ts +++ b/apps/web/src/app/auth/register-form/register-form.component.ts @@ -6,17 +6,17 @@ import { RegisterComponent as BaseRegisterComponent } from "@bitwarden/angular/c import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { FormValidationErrorsService } from "@bitwarden/common/abstractions/formValidationErrors.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { MasterPasswordPolicyOptions } from "@bitwarden/common/admin-console/models/domain/master-password-policy-options"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { ReferenceEventRequest } from "@bitwarden/common/models/request/reference-event.request"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { FormValidationErrorsService } from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; @Component({ diff --git a/apps/web/src/app/auth/set-password.component.ts b/apps/web/src/app/auth/set-password.component.ts index ed8ca0d7453..fcce84a9c2a 100644 --- a/apps/web/src/app/auth/set-password.component.ts +++ b/apps/web/src/app/auth/set-password.component.ts @@ -4,15 +4,15 @@ import { ActivatedRoute, Router } from "@angular/router"; import { SetPasswordComponent as BaseSetPasswordComponent } from "@bitwarden/angular/components/set-password.component"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; diff --git a/apps/web/src/app/auth/settings/deauthorize-sessions.component.ts b/apps/web/src/app/auth/settings/deauthorize-sessions.component.ts index 05a93233b6a..fe758024cc5 100644 --- a/apps/web/src/app/auth/settings/deauthorize-sessions.component.ts +++ b/apps/web/src/app/auth/settings/deauthorize-sessions.component.ts @@ -1,11 +1,11 @@ import { Component } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { Verification } from "@bitwarden/common/types/verification"; @Component({ diff --git a/apps/web/src/app/auth/settings/emergency-access/emergency-access-add-edit.component.ts b/apps/web/src/app/auth/settings/emergency-access/emergency-access-add-edit.component.ts index 21f647d5710..2406f7d061b 100644 --- a/apps/web/src/app/auth/settings/emergency-access/emergency-access-add-edit.component.ts +++ b/apps/web/src/app/auth/settings/emergency-access/emergency-access-add-edit.component.ts @@ -1,12 +1,12 @@ import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { EmergencyAccessType } from "@bitwarden/common/auth/enums/emergency-access-type"; import { EmergencyAccessInviteRequest } from "@bitwarden/common/auth/models/request/emergency-access-invite.request"; import { EmergencyAccessUpdateRequest } from "@bitwarden/common/auth/models/request/emergency-access-update.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "emergency-access-add-edit", diff --git a/apps/web/src/app/auth/settings/emergency-access/emergency-access-attachments.component.ts b/apps/web/src/app/auth/settings/emergency-access/emergency-access-attachments.component.ts index c57750cd13a..a62f56bbc6a 100644 --- a/apps/web/src/app/auth/settings/emergency-access/emergency-access-attachments.component.ts +++ b/apps/web/src/app/auth/settings/emergency-access/emergency-access-attachments.component.ts @@ -3,12 +3,12 @@ import { Component } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { AttachmentsComponent as BaseAttachmentsComponent } from "@bitwarden/angular/vault/components/attachments.component"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { AttachmentView } from "@bitwarden/common/vault/models/view/attachment.view"; diff --git a/apps/web/src/app/auth/settings/emergency-access/emergency-access-confirm.component.ts b/apps/web/src/app/auth/settings/emergency-access/emergency-access-confirm.component.ts index 6c767b851ba..1b5cf883d44 100644 --- a/apps/web/src/app/auth/settings/emergency-access/emergency-access-confirm.component.ts +++ b/apps/web/src/app/auth/settings/emergency-access/emergency-access-confirm.component.ts @@ -1,10 +1,10 @@ import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; @Component({ selector: "emergency-access-confirm", diff --git a/apps/web/src/app/auth/settings/emergency-access/emergency-access-takeover.component.ts b/apps/web/src/app/auth/settings/emergency-access/emergency-access-takeover.component.ts index 23a68315062..026529dc116 100644 --- a/apps/web/src/app/auth/settings/emergency-access/emergency-access-takeover.component.ts +++ b/apps/web/src/app/auth/settings/emergency-access/emergency-access-takeover.component.ts @@ -4,12 +4,6 @@ import { takeUntil } from "rxjs"; import { ChangePasswordComponent } from "@bitwarden/angular/auth/components/change-password.component"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyData } from "@bitwarden/common/admin-console/models/data/policy.data"; import { Policy } from "@bitwarden/common/admin-console/models/domain/policy"; @@ -17,7 +11,13 @@ import { PolicyResponse } from "@bitwarden/common/admin-console/models/response/ import { KdfConfig } from "@bitwarden/common/auth/models/domain/kdf-config"; import { EmergencyAccessPasswordRequest } from "@bitwarden/common/auth/models/request/emergency-access-password.request"; import { KdfType } from "@bitwarden/common/enums"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; @Component({ diff --git a/apps/web/src/app/auth/settings/emergency-access/emergency-access-view.component.ts b/apps/web/src/app/auth/settings/emergency-access/emergency-access-view.component.ts index 82bc9a706f6..95079802489 100644 --- a/apps/web/src/app/auth/settings/emergency-access/emergency-access-view.component.ts +++ b/apps/web/src/app/auth/settings/emergency-access/emergency-access-view.component.ts @@ -3,9 +3,9 @@ import { ActivatedRoute, Router } from "@angular/router"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; import { EmergencyAccessViewResponse } from "@bitwarden/common/auth/models/response/emergency-access.response"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { CipherData } from "@bitwarden/common/vault/models/data/cipher.data"; import { Cipher } from "@bitwarden/common/vault/models/domain/cipher"; diff --git a/apps/web/src/app/auth/settings/emergency-access/emergency-access.component.ts b/apps/web/src/app/auth/settings/emergency-access/emergency-access.component.ts index a03c6822530..73f8f1f6531 100644 --- a/apps/web/src/app/auth/settings/emergency-access/emergency-access.component.ts +++ b/apps/web/src/app/auth/settings/emergency-access/emergency-access.component.ts @@ -4,12 +4,6 @@ import { UserNamePipe } from "@bitwarden/angular/pipes/user-name.pipe"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { EmergencyAccessStatusType } from "@bitwarden/common/auth/enums/emergency-access-status-type"; import { EmergencyAccessType } from "@bitwarden/common/auth/enums/emergency-access-type"; @@ -18,7 +12,13 @@ import { EmergencyAccessGranteeDetailsResponse, EmergencyAccessGrantorDetailsResponse, } from "@bitwarden/common/auth/models/response/emergency-access.response"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { EmergencyAccessAddEditComponent } from "./emergency-access-add-edit.component"; import { EmergencyAccessConfirmComponent } from "./emergency-access-confirm.component"; diff --git a/apps/web/src/app/auth/settings/emergency-access/emergency-add-edit.component.ts b/apps/web/src/app/auth/settings/emergency-access/emergency-add-edit.component.ts index 632b42069ec..e04175b890d 100644 --- a/apps/web/src/app/auth/settings/emergency-access/emergency-add-edit.component.ts +++ b/apps/web/src/app/auth/settings/emergency-access/emergency-add-edit.component.ts @@ -3,15 +3,15 @@ import { Component } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password/"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; diff --git a/apps/web/src/app/auth/settings/two-factor-authenticator.component.ts b/apps/web/src/app/auth/settings/two-factor-authenticator.component.ts index a75d2ebd291..fadf03b32e6 100644 --- a/apps/web/src/app/auth/settings/two-factor-authenticator.component.ts +++ b/apps/web/src/app/auth/settings/two-factor-authenticator.component.ts @@ -2,16 +2,16 @@ import { Component, OnDestroy, OnInit } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; import { UpdateTwoFactorAuthenticatorRequest } from "@bitwarden/common/auth/models/request/update-two-factor-authenticator.request"; import { TwoFactorAuthenticatorResponse } from "@bitwarden/common/auth/models/response/two-factor-authenticator.response"; import { AuthResponse } from "@bitwarden/common/auth/types/auth-response"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { TwoFactorBaseComponent } from "./two-factor-base.component"; diff --git a/apps/web/src/app/auth/settings/two-factor-base.component.ts b/apps/web/src/app/auth/settings/two-factor-base.component.ts index fb832eddc26..95257421f86 100644 --- a/apps/web/src/app/auth/settings/two-factor-base.component.ts +++ b/apps/web/src/app/auth/settings/two-factor-base.component.ts @@ -2,15 +2,15 @@ import { Directive, EventEmitter, Output } from "@angular/core"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; import { VerificationType } from "@bitwarden/common/auth/enums/verification-type"; import { SecretVerificationRequest } from "@bitwarden/common/auth/models/request/secret-verification.request"; import { TwoFactorProviderRequest } from "@bitwarden/common/auth/models/request/two-factor-provider.request"; import { AuthResponseBase } from "@bitwarden/common/auth/types/auth-response"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Directive() export abstract class TwoFactorBaseComponent { diff --git a/apps/web/src/app/auth/settings/two-factor-duo.component.ts b/apps/web/src/app/auth/settings/two-factor-duo.component.ts index 23a297c494c..81d6ed859ed 100644 --- a/apps/web/src/app/auth/settings/two-factor-duo.component.ts +++ b/apps/web/src/app/auth/settings/two-factor-duo.component.ts @@ -2,14 +2,14 @@ import { Component } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; import { UpdateTwoFactorDuoRequest } from "@bitwarden/common/auth/models/request/update-two-factor-duo.request"; import { TwoFactorDuoResponse } from "@bitwarden/common/auth/models/response/two-factor-duo.response"; import { AuthResponse } from "@bitwarden/common/auth/types/auth-response"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { TwoFactorBaseComponent } from "./two-factor-base.component"; diff --git a/apps/web/src/app/auth/settings/two-factor-email.component.ts b/apps/web/src/app/auth/settings/two-factor-email.component.ts index 34cbadaf50e..f0140dd2451 100644 --- a/apps/web/src/app/auth/settings/two-factor-email.component.ts +++ b/apps/web/src/app/auth/settings/two-factor-email.component.ts @@ -2,16 +2,16 @@ import { Component } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; import { TwoFactorEmailRequest } from "@bitwarden/common/auth/models/request/two-factor-email.request"; import { UpdateTwoFactorEmailRequest } from "@bitwarden/common/auth/models/request/update-two-factor-email.request"; import { TwoFactorEmailResponse } from "@bitwarden/common/auth/models/response/two-factor-email.response"; import { AuthResponse } from "@bitwarden/common/auth/types/auth-response"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { TwoFactorBaseComponent } from "./two-factor-base.component"; diff --git a/apps/web/src/app/auth/settings/two-factor-recovery.component.ts b/apps/web/src/app/auth/settings/two-factor-recovery.component.ts index 9d7fe24c502..74df384e5db 100644 --- a/apps/web/src/app/auth/settings/two-factor-recovery.component.ts +++ b/apps/web/src/app/auth/settings/two-factor-recovery.component.ts @@ -1,8 +1,8 @@ import { Component } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; import { TwoFactorRecoverResponse } from "@bitwarden/common/auth/models/response/two-factor-recover.response"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @Component({ selector: "app-two-factor-recovery", diff --git a/apps/web/src/app/auth/settings/two-factor-setup.component.ts b/apps/web/src/app/auth/settings/two-factor-setup.component.ts index f1550937b8a..856801a176f 100644 --- a/apps/web/src/app/auth/settings/two-factor-setup.component.ts +++ b/apps/web/src/app/auth/settings/two-factor-setup.component.ts @@ -4,12 +4,12 @@ import { Subject, takeUntil } from "rxjs"; import { ModalRef } from "@bitwarden/angular/components/modal/modal.ref"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; import { TwoFactorProviders } from "@bitwarden/common/auth/services/two-factor.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { TwoFactorAuthenticatorComponent } from "./two-factor-authenticator.component"; import { TwoFactorDuoComponent } from "./two-factor-duo.component"; diff --git a/apps/web/src/app/auth/settings/two-factor-verify.component.ts b/apps/web/src/app/auth/settings/two-factor-verify.component.ts index 47b10db7f1e..e460a8cbd6e 100644 --- a/apps/web/src/app/auth/settings/two-factor-verify.component.ts +++ b/apps/web/src/app/auth/settings/two-factor-verify.component.ts @@ -1,13 +1,13 @@ import { Component, EventEmitter, Input, Output } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; import { VerificationType } from "@bitwarden/common/auth/enums/verification-type"; import { SecretVerificationRequest } from "@bitwarden/common/auth/models/request/secret-verification.request"; import { AuthResponse } from "@bitwarden/common/auth/types/auth-response"; import { TwoFactorResponse } from "@bitwarden/common/auth/types/two-factor-response"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { Verification } from "@bitwarden/common/types/verification"; @Component({ diff --git a/apps/web/src/app/auth/settings/two-factor-webauthn.component.ts b/apps/web/src/app/auth/settings/two-factor-webauthn.component.ts index de1a7fde7b9..8e57e6e152d 100644 --- a/apps/web/src/app/auth/settings/two-factor-webauthn.component.ts +++ b/apps/web/src/app/auth/settings/two-factor-webauthn.component.ts @@ -2,9 +2,6 @@ import { Component, NgZone } from "@angular/core"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; import { SecretVerificationRequest } from "@bitwarden/common/auth/models/request/secret-verification.request"; @@ -15,6 +12,9 @@ import { TwoFactorWebAuthnResponse, } from "@bitwarden/common/auth/models/response/two-factor-web-authn.response"; import { AuthResponse } from "@bitwarden/common/auth/types/auth-response"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { TwoFactorBaseComponent } from "./two-factor-base.component"; diff --git a/apps/web/src/app/auth/settings/two-factor-yubikey.component.ts b/apps/web/src/app/auth/settings/two-factor-yubikey.component.ts index cc8da3962ed..4f6be97813b 100644 --- a/apps/web/src/app/auth/settings/two-factor-yubikey.component.ts +++ b/apps/web/src/app/auth/settings/two-factor-yubikey.component.ts @@ -2,14 +2,14 @@ import { Component } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; import { UpdateTwoFactorYubioOtpRequest } from "@bitwarden/common/auth/models/request/update-two-factor-yubio-otp.request"; import { TwoFactorYubiKeyResponse } from "@bitwarden/common/auth/models/response/two-factor-yubi-key.response"; import { AuthResponse } from "@bitwarden/common/auth/types/auth-response"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { TwoFactorBaseComponent } from "./two-factor-base.component"; diff --git a/apps/web/src/app/auth/settings/verify-email.component.ts b/apps/web/src/app/auth/settings/verify-email.component.ts index 21c6667fa2e..91ccf96c5fc 100644 --- a/apps/web/src/app/auth/settings/verify-email.component.ts +++ b/apps/web/src/app/auth/settings/verify-email.component.ts @@ -1,10 +1,10 @@ import { Component, EventEmitter, Output } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { TokenService } from "@bitwarden/common/auth/abstractions/token.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-verify-email", diff --git a/apps/web/src/app/auth/sso.component.ts b/apps/web/src/app/auth/sso.component.ts index dec18647b5d..0b1ec0e0006 100644 --- a/apps/web/src/app/auth/sso.component.ts +++ b/apps/web/src/app/auth/sso.component.ts @@ -4,19 +4,19 @@ import { first } from "rxjs/operators"; import { SsoComponent as BaseSsoComponent } from "@bitwarden/angular/auth/components/sso.component"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { OrgDomainApiServiceAbstraction } from "@bitwarden/common/abstractions/organization-domain/org-domain-api.service.abstraction"; import { OrganizationDomainSsoDetailsResponse } from "@bitwarden/common/abstractions/organization-domain/responses/organization-domain-sso-details.response"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; import { HttpStatusCode } from "@bitwarden/common/enums"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; @Component({ diff --git a/apps/web/src/app/auth/two-factor-options.component.ts b/apps/web/src/app/auth/two-factor-options.component.ts index 514994f7537..5743711e831 100644 --- a/apps/web/src/app/auth/two-factor-options.component.ts +++ b/apps/web/src/app/auth/two-factor-options.component.ts @@ -2,9 +2,9 @@ import { Component } from "@angular/core"; import { Router } from "@angular/router"; import { TwoFactorOptionsComponent as BaseTwoFactorOptionsComponent } from "@bitwarden/angular/auth/components/two-factor-options.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { TwoFactorService } from "@bitwarden/common/auth/abstractions/two-factor.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-two-factor-options", diff --git a/apps/web/src/app/auth/two-factor.component.ts b/apps/web/src/app/auth/two-factor.component.ts index 762a2a52470..57b384e97cc 100644 --- a/apps/web/src/app/auth/two-factor.component.ts +++ b/apps/web/src/app/auth/two-factor.component.ts @@ -4,16 +4,16 @@ import { ActivatedRoute, Router } from "@angular/router"; import { TwoFactorComponent as BaseTwoFactorComponent } from "@bitwarden/angular/auth/components/two-factor.component"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { AppIdService } from "@bitwarden/common/abstractions/appId.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; import { TwoFactorService } from "@bitwarden/common/auth/abstractions/two-factor.service"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; +import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { RouterService } from "../core"; diff --git a/apps/web/src/app/auth/update-password.component.ts b/apps/web/src/app/auth/update-password.component.ts index 403120a3e59..d1d0ea8071a 100644 --- a/apps/web/src/app/auth/update-password.component.ts +++ b/apps/web/src/app/auth/update-password.component.ts @@ -4,14 +4,14 @@ import { Router } from "@angular/router"; import { UpdatePasswordComponent as BaseUpdatePasswordComponent } from "@bitwarden/angular/auth/components/update-password.component"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; @Component({ diff --git a/apps/web/src/app/auth/verify-email-token.component.ts b/apps/web/src/app/auth/verify-email-token.component.ts index 6c2cf169a90..bd4bdf2b254 100644 --- a/apps/web/src/app/auth/verify-email-token.component.ts +++ b/apps/web/src/app/auth/verify-email-token.component.ts @@ -3,11 +3,11 @@ import { ActivatedRoute, Router } from "@angular/router"; import { first } from "rxjs/operators"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { VerifyEmailRequest } from "@bitwarden/common/models/request/verify-email.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Component({ selector: "app-verify-email-token", diff --git a/apps/web/src/app/auth/verify-recover-delete.component.ts b/apps/web/src/app/auth/verify-recover-delete.component.ts index b3eb4819b8b..b0258656bf3 100644 --- a/apps/web/src/app/auth/verify-recover-delete.component.ts +++ b/apps/web/src/app/auth/verify-recover-delete.component.ts @@ -3,10 +3,10 @@ import { ActivatedRoute, Router } from "@angular/router"; import { first } from "rxjs/operators"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { VerifyDeleteRecoverRequest } from "@bitwarden/common/models/request/verify-delete-recover.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-verify-recover-delete", diff --git a/apps/web/src/app/billing/accounts/trial-initiation/billing.component.ts b/apps/web/src/app/billing/accounts/trial-initiation/billing.component.ts index e79dc46ee18..35aee967450 100644 --- a/apps/web/src/app/billing/accounts/trial-initiation/billing.component.ts +++ b/apps/web/src/app/billing/accounts/trial-initiation/billing.component.ts @@ -3,15 +3,15 @@ import { UntypedFormBuilder, FormGroup } from "@angular/forms"; import { Router } from "@angular/router"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { ProductType } from "@bitwarden/common/enums"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { OrganizationPlansComponent } from "../../settings/organization-plans.component"; diff --git a/apps/web/src/app/billing/organizations/adjust-subscription.component.ts b/apps/web/src/app/billing/organizations/adjust-subscription.component.ts index ae75b5c3398..012d815b5f1 100644 --- a/apps/web/src/app/billing/organizations/adjust-subscription.component.ts +++ b/apps/web/src/app/billing/organizations/adjust-subscription.component.ts @@ -1,10 +1,10 @@ import { Component, EventEmitter, Input, Output } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { OrganizationSubscriptionUpdateRequest } from "@bitwarden/common/billing/models/request/organization-subscription-update.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-adjust-subscription", diff --git a/apps/web/src/app/billing/organizations/billing-sync-api-key.component.ts b/apps/web/src/app/billing/organizations/billing-sync-api-key.component.ts index adebb3abdeb..9bbcdf9333f 100644 --- a/apps/web/src/app/billing/organizations/billing-sync-api-key.component.ts +++ b/apps/web/src/app/billing/organizations/billing-sync-api-key.component.ts @@ -2,13 +2,13 @@ import { Component } from "@angular/core"; import { ModalConfig } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { OrganizationApiKeyType } from "@bitwarden/common/admin-console/enums"; import { OrganizationApiKeyRequest } from "@bitwarden/common/admin-console/models/request/organization-api-key.request"; import { ApiKeyResponse } from "@bitwarden/common/auth/models/response/api-key.response"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { Verification } from "@bitwarden/common/types/verification"; export interface BillingSyncApiModalData { diff --git a/apps/web/src/app/billing/organizations/change-plan.component.ts b/apps/web/src/app/billing/organizations/change-plan.component.ts index d0bd263eba5..d14fd96a97f 100644 --- a/apps/web/src/app/billing/organizations/change-plan.component.ts +++ b/apps/web/src/app/billing/organizations/change-plan.component.ts @@ -1,8 +1,8 @@ import { Component, EventEmitter, Input, Output } from "@angular/core"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { PlanType } from "@bitwarden/common/billing/enums"; import { ProductType } from "@bitwarden/common/enums"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; @Component({ selector: "app-change-plan", diff --git a/apps/web/src/app/billing/organizations/download-license.component.ts b/apps/web/src/app/billing/organizations/download-license.component.ts index cecc704a43e..0247d8b76dc 100644 --- a/apps/web/src/app/billing/organizations/download-license.component.ts +++ b/apps/web/src/app/billing/organizations/download-license.component.ts @@ -1,8 +1,8 @@ import { Component, EventEmitter, Input, Output } from "@angular/core"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; @Component({ selector: "app-download-license", diff --git a/apps/web/src/app/billing/organizations/organization-billing-tab.component.ts b/apps/web/src/app/billing/organizations/organization-billing-tab.component.ts index 11609dc5e72..b0946ae5604 100644 --- a/apps/web/src/app/billing/organizations/organization-billing-tab.component.ts +++ b/apps/web/src/app/billing/organizations/organization-billing-tab.component.ts @@ -2,8 +2,8 @@ import { Component, OnInit } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { map, Observable, switchMap } from "rxjs"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-org-billing-tab", diff --git a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts index af24c8a9ebf..b9fc6798ec9 100644 --- a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts +++ b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts @@ -5,15 +5,15 @@ import { concatMap, Subject, takeUntil } from "rxjs"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ModalConfig, ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { OrganizationApiKeyType } from "@bitwarden/common/admin-console/enums"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { PlanType } from "@bitwarden/common/billing/enums"; import { OrganizationSubscriptionResponse } from "@bitwarden/common/billing/models/response/organization-subscription.response"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { BillingSyncApiKeyComponent, diff --git a/apps/web/src/app/billing/organizations/organization-subscription-selfhost.component.ts b/apps/web/src/app/billing/organizations/organization-subscription-selfhost.component.ts index fb01d07c59d..a8289db15c9 100644 --- a/apps/web/src/app/billing/organizations/organization-subscription-selfhost.component.ts +++ b/apps/web/src/app/billing/organizations/organization-subscription-selfhost.component.ts @@ -5,9 +5,6 @@ import { concatMap, Subject, takeUntil } from "rxjs"; import { ModalConfig, ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { OrganizationConnectionType } from "@bitwarden/common/admin-console/enums"; @@ -15,6 +12,9 @@ import { Organization } from "@bitwarden/common/admin-console/models/domain/orga import { OrganizationConnectionResponse } from "@bitwarden/common/admin-console/models/response/organization-connection.response"; import { BillingSyncConfigApi } from "@bitwarden/common/billing/models/api/billing-sync-config.api"; import { SelfHostedOrganizationSubscriptionView } from "@bitwarden/common/billing/models/view/self-hosted-organization-subscription.view"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { BillingSyncKeyComponent, diff --git a/apps/web/src/app/billing/organizations/secrets-manager/enroll.component.ts b/apps/web/src/app/billing/organizations/secrets-manager/enroll.component.ts index bc6ed17ba76..edcedc8d548 100644 --- a/apps/web/src/app/billing/organizations/secrets-manager/enroll.component.ts +++ b/apps/web/src/app/billing/organizations/secrets-manager/enroll.component.ts @@ -1,10 +1,10 @@ import { Component, Input, OnInit } from "@angular/core"; import { FormBuilder } from "@angular/forms"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { OrganizationEnrollSecretsManagerRequest } from "@bitwarden/common/admin-console/models/request/organization/organization-enroll-secrets-manager.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { flagEnabled } from "../../../../utils/flags"; diff --git a/apps/web/src/app/billing/settings/add-credit.component.ts b/apps/web/src/app/billing/settings/add-credit.component.ts index 8a9c332ea53..d679f027580 100644 --- a/apps/web/src/app/billing/settings/add-credit.component.ts +++ b/apps/web/src/app/billing/settings/add-credit.component.ts @@ -9,13 +9,13 @@ import { } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { PayPalConfig } from "@bitwarden/common/abstractions/environment.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PaymentMethodType } from "@bitwarden/common/billing/enums"; import { BitPayInvoiceRequest } from "@bitwarden/common/billing/models/request/bit-pay-invoice.request"; +import { PayPalConfig } from "@bitwarden/common/platform/abstractions/environment.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Component({ selector: "app-add-credit", diff --git a/apps/web/src/app/billing/settings/adjust-payment.component.ts b/apps/web/src/app/billing/settings/adjust-payment.component.ts index 4348dcaddfc..6ed77896bbb 100644 --- a/apps/web/src/app/billing/settings/adjust-payment.component.ts +++ b/apps/web/src/app/billing/settings/adjust-payment.component.ts @@ -1,12 +1,12 @@ import { Component, EventEmitter, Input, Output, ViewChild } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { PaymentMethodType } from "@bitwarden/common/billing/enums"; import { PaymentRequest } from "@bitwarden/common/billing/models/request/payment.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { PaymentComponent } from "./payment.component"; import { TaxInfoComponent } from "./tax-info.component"; diff --git a/apps/web/src/app/billing/settings/billing-history-view.component.ts b/apps/web/src/app/billing/settings/billing-history-view.component.ts index baa024c764b..0c64e3f92e0 100644 --- a/apps/web/src/app/billing/settings/billing-history-view.component.ts +++ b/apps/web/src/app/billing/settings/billing-history-view.component.ts @@ -2,8 +2,8 @@ import { Component, OnInit } from "@angular/core"; import { Router } from "@angular/router"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { BillingHistoryResponse } from "@bitwarden/common/billing/models/response/billing-history.response"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-billing-history-view", diff --git a/apps/web/src/app/billing/settings/billing-sync-key.component.ts b/apps/web/src/app/billing/settings/billing-sync-key.component.ts index e9b2c6009f0..3a855bb3ed8 100644 --- a/apps/web/src/app/billing/settings/billing-sync-key.component.ts +++ b/apps/web/src/app/billing/settings/billing-sync-key.component.ts @@ -3,12 +3,12 @@ import { Component } from "@angular/core"; import { ModalRef } from "@bitwarden/angular/components/modal/modal.ref"; import { ModalConfig } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { OrganizationConnectionType } from "@bitwarden/common/admin-console/enums"; import { OrganizationConnectionRequest } from "@bitwarden/common/admin-console/models/request/organization-connection.request"; import { OrganizationConnectionResponse } from "@bitwarden/common/admin-console/models/response/organization-connection.response"; import { BillingSyncConfigApi } from "@bitwarden/common/billing/models/api/billing-sync-config.api"; import { BillingSyncConfigRequest } from "@bitwarden/common/billing/models/request/billing-sync-config.request"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; export interface BillingSyncKeyModalData { entityId: string; diff --git a/apps/web/src/app/billing/settings/organization-plans.component.ts b/apps/web/src/app/billing/settings/organization-plans.component.ts index c5cc39e691c..363f7bc46bc 100644 --- a/apps/web/src/app/billing/settings/organization-plans.component.ts +++ b/apps/web/src/app/billing/settings/organization-plans.component.ts @@ -12,11 +12,6 @@ import { Router } from "@angular/router"; import { Subject, takeUntil } from "rxjs"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; @@ -28,8 +23,13 @@ import { ProviderOrganizationCreateRequest } from "@bitwarden/common/admin-conso import { PaymentMethodType, PlanType } from "@bitwarden/common/billing/enums"; import { PlanResponse } from "@bitwarden/common/billing/models/response/plan.response"; import { ProductType } from "@bitwarden/common/enums"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { PaymentComponent } from "./payment.component"; diff --git a/apps/web/src/app/billing/settings/payment-method.component.ts b/apps/web/src/app/billing/settings/payment-method.component.ts index 0ea51eb4fca..4792e0fb715 100644 --- a/apps/web/src/app/billing/settings/payment-method.component.ts +++ b/apps/web/src/app/billing/settings/payment-method.component.ts @@ -4,14 +4,14 @@ import { ActivatedRoute, Router } from "@angular/router"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { OrganizationResponse } from "@bitwarden/common/admin-console/models/response/organization.response"; import { PaymentMethodType } from "@bitwarden/common/billing/enums"; import { BillingPaymentResponse } from "@bitwarden/common/billing/models/response/billing-payment.response"; import { VerifyBankRequest } from "@bitwarden/common/models/request/verify-bank.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { TaxInfoComponent } from "./tax-info.component"; diff --git a/apps/web/src/app/billing/settings/payment.component.ts b/apps/web/src/app/billing/settings/payment.component.ts index 21cfbff7d82..e5c9c3dd3c5 100644 --- a/apps/web/src/app/billing/settings/payment.component.ts +++ b/apps/web/src/app/billing/settings/payment.component.ts @@ -3,8 +3,8 @@ import { Subject, takeUntil } from "rxjs"; import { AbstractThemingService } from "@bitwarden/angular/services/theming/theming.service.abstraction"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { PaymentMethodType } from "@bitwarden/common/billing/enums"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; @Component({ selector: "app-payment", diff --git a/apps/web/src/app/billing/settings/subscription.component.ts b/apps/web/src/app/billing/settings/subscription.component.ts index b84ffa8893f..a6d5f13eae6 100644 --- a/apps/web/src/app/billing/settings/subscription.component.ts +++ b/apps/web/src/app/billing/settings/subscription.component.ts @@ -1,7 +1,7 @@ import { Component } from "@angular/core"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Component({ selector: "app-subscription", diff --git a/apps/web/src/app/billing/settings/tax-info.component.ts b/apps/web/src/app/billing/settings/tax-info.component.ts index 9ac57716aa9..df5ddfa0a03 100644 --- a/apps/web/src/app/billing/settings/tax-info.component.ts +++ b/apps/web/src/app/billing/settings/tax-info.component.ts @@ -2,12 +2,12 @@ import { Component, EventEmitter, Input, Output } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { OrganizationTaxInfoUpdateRequest } from "@bitwarden/common/billing/models/request/organization-tax-info-update.request"; import { TaxInfoUpdateRequest } from "@bitwarden/common/billing/models/request/tax-info-update.request"; import { TaxInfoResponse } from "@bitwarden/common/billing/models/response/tax-info.response"; import { TaxRateResponse } from "@bitwarden/common/billing/models/response/tax-rate.response"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; type TaxInfoView = Omit & { includeTaxId: boolean; diff --git a/apps/web/src/app/billing/settings/user-subscription.component.ts b/apps/web/src/app/billing/settings/user-subscription.component.ts index 6f78a420604..51bacdfd1ee 100644 --- a/apps/web/src/app/billing/settings/user-subscription.component.ts +++ b/apps/web/src/app/billing/settings/user-subscription.component.ts @@ -3,12 +3,12 @@ import { Router } from "@angular/router"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { SubscriptionResponse } from "@bitwarden/common/billing/models/response/subscription.response"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Component({ selector: "app-user-subscription", diff --git a/apps/web/src/app/common/base.accept.component.ts b/apps/web/src/app/common/base.accept.component.ts index a9591f0aefb..55a68ab2bf3 100644 --- a/apps/web/src/app/common/base.accept.component.ts +++ b/apps/web/src/app/common/base.accept.component.ts @@ -3,9 +3,9 @@ import { ActivatedRoute, Params, Router } from "@angular/router"; import { Subject } from "rxjs"; import { first, switchMap, takeUntil } from "rxjs/operators"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Directive() export abstract class BaseAcceptComponent implements OnInit { diff --git a/apps/web/src/app/common/base.events.component.ts b/apps/web/src/app/common/base.events.component.ts index ddd384a249b..35a53228f21 100644 --- a/apps/web/src/app/common/base.events.component.ts +++ b/apps/web/src/app/common/base.events.component.ts @@ -1,12 +1,12 @@ import { Directive } from "@angular/core"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { EventResponse } from "@bitwarden/common/models/response/event.response"; import { ListResponse } from "@bitwarden/common/models/response/list.response"; import { EventView } from "@bitwarden/common/models/view/event.view"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { EventService } from "../core"; import { EventExportService } from "../tools/event-export"; diff --git a/apps/web/src/app/common/base.people.component.ts b/apps/web/src/app/common/base.people.component.ts index 46d9c03a81b..200e0e762b7 100644 --- a/apps/web/src/app/common/base.people.component.ts +++ b/apps/web/src/app/common/base.people.component.ts @@ -5,13 +5,7 @@ import { UserNamePipe } from "@bitwarden/angular/pipes/user-name.pipe"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; import { OrganizationUserStatusType, OrganizationUserType, @@ -19,8 +13,14 @@ import { ProviderUserType, } from "@bitwarden/common/admin-console/enums"; import { ProviderUserUserDetailsResponse } from "@bitwarden/common/admin-console/models/response/provider/provider-user.response"; -import { Utils } from "@bitwarden/common/misc/utils"; import { ListResponse } from "@bitwarden/common/models/response/list.response"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { OrganizationUserView } from "../admin-console/organizations/core/views/organization-user.view"; import { UserConfirmComponent } from "../admin-console/organizations/manage/user-confirm.component"; diff --git a/apps/web/src/app/core/broadcaster-messaging.service.ts b/apps/web/src/app/core/broadcaster-messaging.service.ts index 47745a9e443..7c8e4eef43c 100644 --- a/apps/web/src/app/core/broadcaster-messaging.service.ts +++ b/apps/web/src/app/core/broadcaster-messaging.service.ts @@ -1,7 +1,7 @@ import { Injectable } from "@angular/core"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; @Injectable() export class BroadcasterMessagingService implements MessagingService { diff --git a/apps/web/src/app/core/core.module.ts b/apps/web/src/app/core/core.module.ts index 3fe52a5af8f..69d08169f74 100644 --- a/apps/web/src/app/core/core.module.ts +++ b/apps/web/src/app/core/core.module.ts @@ -11,31 +11,31 @@ import { } from "@bitwarden/angular/services/injection-tokens"; import { JslibServicesModule } from "@bitwarden/angular/services/jslib-services.module"; import { ModalService as ModalServiceAbstraction } from "@bitwarden/angular/services/modal.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService as MessagingServiceAbstraction } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService as BaseStateServiceAbstraction } from "@bitwarden/common/abstractions/state.service"; -import { StateMigrationService as StateMigrationServiceAbstraction } from "@bitwarden/common/abstractions/stateMigration.service"; -import { AbstractStorageService } from "@bitwarden/common/abstractions/storage.service"; import { LoginService as LoginServiceAbstraction } from "@bitwarden/common/auth/abstractions/login.service"; import { LoginService } from "@bitwarden/common/auth/services/login.service"; -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; -import { MemoryStorageService } from "@bitwarden/common/services/memoryStorage.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService as MessagingServiceAbstraction } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateMigrationService as StateMigrationServiceAbstraction } from "@bitwarden/common/platform/abstractions/state-migration.service"; +import { StateService as BaseStateServiceAbstraction } from "@bitwarden/common/platform/abstractions/state.service"; +import { AbstractStorageService } from "@bitwarden/common/platform/abstractions/storage.service"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; +import { MemoryStorageService } from "@bitwarden/common/platform/services/memory-storage.service"; import { PasswordRepromptService as PasswordRepromptServiceAbstraction } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { PolicyListService } from "../admin-console/core/policy-list.service"; +import { HtmlStorageService } from "../core/html-storage.service"; +import { I18nService } from "../core/i18n.service"; +import { StateMigrationService } from "../core/state-migration.service"; import { PasswordRepromptService } from "../vault/core/password-reprompt.service"; import { BroadcasterMessagingService } from "./broadcaster-messaging.service"; import { EventService } from "./event.service"; -import { HtmlStorageService } from "./html-storage.service"; -import { I18nService } from "./i18n.service"; import { InitService } from "./init.service"; import { ModalService } from "./modal.service"; import { RouterService } from "./router.service"; import { Account, GlobalState, StateService } from "./state"; -import { StateMigrationService } from "./state-migration.service"; import { WebFileDownloadService } from "./web-file-download.service"; import { WebPlatformUtilsService } from "./web-platform-utils.service"; diff --git a/apps/web/src/app/core/event.service.ts b/apps/web/src/app/core/event.service.ts index 0e4b74e13ed..1247c5a3678 100644 --- a/apps/web/src/app/core/event.service.ts +++ b/apps/web/src/app/core/event.service.ts @@ -1,11 +1,11 @@ import { Injectable } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { Policy } from "@bitwarden/common/admin-console/models/domain/policy"; import { DeviceType, EventType } from "@bitwarden/common/enums"; import { EventResponse } from "@bitwarden/common/models/response/event.response"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @Injectable() export class EventService { diff --git a/apps/web/src/app/shared/guards/has-premium.guard.ts b/apps/web/src/app/core/guards/has-premium.guard.ts similarity index 82% rename from apps/web/src/app/shared/guards/has-premium.guard.ts rename to apps/web/src/app/core/guards/has-premium.guard.ts index 9f0656d007c..5f551e73029 100644 --- a/apps/web/src/app/shared/guards/has-premium.guard.ts +++ b/apps/web/src/app/core/guards/has-premium.guard.ts @@ -1,8 +1,8 @@ import { Injectable } from "@angular/core"; import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from "@angular/router"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Injectable({ providedIn: "root", diff --git a/apps/web/src/app/core/html-storage.service.ts b/apps/web/src/app/core/html-storage.service.ts index e5653853775..370f475a504 100644 --- a/apps/web/src/app/core/html-storage.service.ts +++ b/apps/web/src/app/core/html-storage.service.ts @@ -1,8 +1,8 @@ import { Injectable } from "@angular/core"; -import { AbstractStorageService } from "@bitwarden/common/abstractions/storage.service"; import { HtmlStorageLocation } from "@bitwarden/common/enums"; -import { StorageOptions } from "@bitwarden/common/models/domain/storage-options"; +import { AbstractStorageService } from "@bitwarden/common/platform/abstractions/storage.service"; +import { StorageOptions } from "@bitwarden/common/platform/models/domain/storage-options"; @Injectable() export class HtmlStorageService implements AbstractStorageService { diff --git a/apps/web/src/app/core/i18n.service.ts b/apps/web/src/app/core/i18n.service.ts index 132b8c40bcb..c1580c4bf17 100644 --- a/apps/web/src/app/core/i18n.service.ts +++ b/apps/web/src/app/core/i18n.service.ts @@ -1,4 +1,4 @@ -import { I18nService as BaseI18nService } from "@bitwarden/common/services/i18n.service"; +import { I18nService as BaseI18nService } from "@bitwarden/common/platform/services/i18n.service"; import { SupportedTranslationLocales } from "../../translation-constants"; diff --git a/apps/web/src/app/core/init.service.ts b/apps/web/src/app/core/init.service.ts index 1ecd7d3fef5..60eeeeea18b 100644 --- a/apps/web/src/app/core/init.service.ts +++ b/apps/web/src/app/core/init.service.ts @@ -2,23 +2,23 @@ import { Inject, Injectable } from "@angular/core"; import { WINDOW } from "@bitwarden/angular/services/injection-tokens"; import { AbstractThemingService } from "@bitwarden/angular/services/theming/theming.service.abstraction"; -import { CryptoService as CryptoServiceAbstraction } from "@bitwarden/common/abstractions/crypto.service"; -import { EncryptService } from "@bitwarden/common/abstractions/encrypt.service"; +import { EventUploadService as EventUploadServiceAbstraction } from "@bitwarden/common/abstractions/event/event-upload.service"; +import { NotificationsService as NotificationsServiceAbstraction } from "@bitwarden/common/abstractions/notifications.service"; +import { VaultTimeoutService as VaultTimeoutServiceAbstraction } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; +import { TwoFactorService as TwoFactorServiceAbstraction } from "@bitwarden/common/auth/abstractions/two-factor.service"; +import { CryptoService as CryptoServiceAbstraction } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EncryptService } from "@bitwarden/common/platform/abstractions/encrypt.service"; import { EnvironmentService as EnvironmentServiceAbstraction, Urls, -} from "@bitwarden/common/abstractions/environment.service"; -import { EventUploadService as EventUploadServiceAbstraction } from "@bitwarden/common/abstractions/event/event-upload.service"; -import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/abstractions/i18n.service"; -import { NotificationsService as NotificationsServiceAbstraction } from "@bitwarden/common/abstractions/notifications.service"; -import { StateService as StateServiceAbstraction } from "@bitwarden/common/abstractions/state.service"; -import { VaultTimeoutService as VaultTimeoutServiceAbstraction } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; -import { TwoFactorService as TwoFactorServiceAbstraction } from "@bitwarden/common/auth/abstractions/two-factor.service"; -import { ContainerService } from "@bitwarden/common/services/container.service"; +} from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { StateService as StateServiceAbstraction } from "@bitwarden/common/platform/abstractions/state.service"; +import { ContainerService } from "@bitwarden/common/platform/services/container.service"; import { EventUploadService } from "@bitwarden/common/services/event/event-upload.service"; import { VaultTimeoutService as VaultTimeoutService } from "@bitwarden/common/services/vaultTimeout/vaultTimeout.service"; -import { I18nService } from "./i18n.service"; +import { I18nService } from "../core/i18n.service"; @Injectable() export class InitService { diff --git a/apps/web/src/app/core/modal.service.ts b/apps/web/src/app/core/modal.service.ts index 19c54a23bce..1192cabb5e9 100644 --- a/apps/web/src/app/core/modal.service.ts +++ b/apps/web/src/app/core/modal.service.ts @@ -4,8 +4,8 @@ import { first } from "rxjs/operators"; import { ModalRef } from "@bitwarden/angular/components/modal/modal.ref"; import { ModalService as BaseModalService } from "@bitwarden/angular/services/modal.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; @Injectable() export class ModalService extends BaseModalService { diff --git a/apps/web/src/app/core/router.service.ts b/apps/web/src/app/core/router.service.ts index aa9041875a1..279b94d4ef4 100644 --- a/apps/web/src/app/core/router.service.ts +++ b/apps/web/src/app/core/router.service.ts @@ -3,7 +3,7 @@ import { Title } from "@angular/platform-browser"; import { ActivatedRoute, NavigationEnd, Router } from "@angular/router"; import { filter } from "rxjs"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @Injectable() export class RouterService { diff --git a/apps/web/src/app/core/state-migration.service.ts b/apps/web/src/app/core/state-migration.service.ts index 0c0c0ad6821..c1d6e2ded5d 100644 --- a/apps/web/src/app/core/state-migration.service.ts +++ b/apps/web/src/app/core/state-migration.service.ts @@ -1,4 +1,4 @@ -import { StateMigrationService as BaseStateMigrationService } from "@bitwarden/common/services/stateMigration.service"; +import { StateMigrationService as BaseStateMigrationService } from "@bitwarden/common/platform/services/state-migration.service"; import { Account } from "./state/account"; import { GlobalState } from "./state/global-state"; diff --git a/apps/web/src/app/core/state/account.ts b/apps/web/src/app/core/state/account.ts index 8403e91547f..0cb16505e30 100644 --- a/apps/web/src/app/core/state/account.ts +++ b/apps/web/src/app/core/state/account.ts @@ -1,7 +1,7 @@ import { Account as BaseAccount, AccountSettings as BaseAccountSettings, -} from "@bitwarden/common/models/domain/account"; +} from "@bitwarden/common/platform/models/domain/account"; export class AccountSettings extends BaseAccountSettings { vaultTimeout: number = process.env.NODE_ENV === "development" ? null : 15; diff --git a/apps/web/src/app/core/state/global-state.ts b/apps/web/src/app/core/state/global-state.ts index 170d3ba34d5..79d3712c9c5 100644 --- a/apps/web/src/app/core/state/global-state.ts +++ b/apps/web/src/app/core/state/global-state.ts @@ -1,5 +1,5 @@ import { ThemeType } from "@bitwarden/common/enums"; -import { GlobalState as BaseGlobalState } from "@bitwarden/common/models/domain/global-state"; +import { GlobalState as BaseGlobalState } from "@bitwarden/common/platform/models/domain/global-state"; export class GlobalState extends BaseGlobalState { theme?: ThemeType = ThemeType.Light; diff --git a/apps/web/src/app/core/state/state.service.ts b/apps/web/src/app/core/state/state.service.ts index 46102325a43..ca5d00a5e58 100644 --- a/apps/web/src/app/core/state/state.service.ts +++ b/apps/web/src/app/core/state/state.service.ts @@ -6,16 +6,16 @@ import { STATE_FACTORY, STATE_SERVICE_USE_CACHE, } from "@bitwarden/angular/services/injection-tokens"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { StateMigrationService } from "@bitwarden/common/abstractions/stateMigration.service"; +import { CollectionData } from "@bitwarden/common/admin-console/models/data/collection.data"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { StateMigrationService } from "@bitwarden/common/platform/abstractions/state-migration.service"; import { AbstractMemoryStorageService, AbstractStorageService, -} from "@bitwarden/common/abstractions/storage.service"; -import { CollectionData } from "@bitwarden/common/admin-console/models/data/collection.data"; -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; -import { StorageOptions } from "@bitwarden/common/models/domain/storage-options"; -import { StateService as BaseStateService } from "@bitwarden/common/services/state.service"; +} from "@bitwarden/common/platform/abstractions/storage.service"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; +import { StorageOptions } from "@bitwarden/common/platform/models/domain/storage-options"; +import { StateService as BaseStateService } from "@bitwarden/common/platform/services/state.service"; import { SendData } from "@bitwarden/common/tools/send/models/data/send.data"; import { CipherData } from "@bitwarden/common/vault/models/data/cipher.data"; import { FolderData } from "@bitwarden/common/vault/models/data/folder.data"; diff --git a/apps/web/src/app/core/tests/index.ts b/apps/web/src/app/core/tests/index.ts new file mode 100644 index 00000000000..e33c6f11525 --- /dev/null +++ b/apps/web/src/app/core/tests/index.ts @@ -0,0 +1 @@ +export { PreloadedEnglishI18nModule } from "./preloaded-english-i18n.module"; diff --git a/apps/web/src/app/tests/preloaded-english-i18n.module.ts b/apps/web/src/app/core/tests/preloaded-english-i18n.module.ts similarity index 83% rename from apps/web/src/app/tests/preloaded-english-i18n.module.ts rename to apps/web/src/app/core/tests/preloaded-english-i18n.module.ts index e51fafc28f4..49e8475bf1a 100644 --- a/apps/web/src/app/tests/preloaded-english-i18n.module.ts +++ b/apps/web/src/app/core/tests/preloaded-english-i18n.module.ts @@ -1,9 +1,9 @@ import { APP_INITIALIZER, NgModule } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { I18nService as BaseI18nService } from "@bitwarden/common/services/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { I18nService as BaseI18nService } from "@bitwarden/common/platform/services/i18n.service"; -import eng from "../../locales/en/messages.json"; +import eng from "../../../locales/en/messages.json"; class PreloadedEnglishI18nService extends BaseI18nService { constructor() { diff --git a/apps/web/src/app/core/web-file-download.service.ts b/apps/web/src/app/core/web-file-download.service.ts index de1626c8df1..d59baec6693 100644 --- a/apps/web/src/app/core/web-file-download.service.ts +++ b/apps/web/src/app/core/web-file-download.service.ts @@ -1,9 +1,9 @@ import { Injectable } from "@angular/core"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { FileDownloadBuilder } from "@bitwarden/common/abstractions/fileDownload/fileDownloadBuilder"; -import { FileDownloadRequest } from "@bitwarden/common/abstractions/fileDownload/fileDownloadRequest"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { FileDownloadBuilder } from "@bitwarden/common/platform/abstractions/file-download/file-download.builder"; +import { FileDownloadRequest } from "@bitwarden/common/platform/abstractions/file-download/file-download.request"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Injectable() export class WebFileDownloadService implements FileDownloadService { diff --git a/apps/web/src/app/core/web-platform-utils.service.ts b/apps/web/src/app/core/web-platform-utils.service.ts index 7b9a7b94770..ec829d71fb1 100644 --- a/apps/web/src/app/core/web-platform-utils.service.ts +++ b/apps/web/src/app/core/web-platform-utils.service.ts @@ -1,10 +1,10 @@ import { Injectable } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { ClientType, DeviceType } from "@bitwarden/common/enums"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Injectable() export class WebPlatformUtilsService implements PlatformUtilsService { diff --git a/apps/web/src/app/layouts/footer.component.ts b/apps/web/src/app/layouts/footer.component.ts index 02bdacc6ddc..d4557aa28b2 100644 --- a/apps/web/src/app/layouts/footer.component.ts +++ b/apps/web/src/app/layouts/footer.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from "@angular/core"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-footer", diff --git a/apps/web/src/app/layouts/frontend-layout.component.ts b/apps/web/src/app/layouts/frontend-layout.component.ts index cdbaa94f0e5..66c71e0d627 100644 --- a/apps/web/src/app/layouts/frontend-layout.component.ts +++ b/apps/web/src/app/layouts/frontend-layout.component.ts @@ -1,9 +1,9 @@ import { Component, OnDestroy, OnInit } from "@angular/core"; -import { ConfigServiceAbstraction } from "@bitwarden/common/abstractions/config/config.service.abstraction"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; @Component({ selector: "app-frontend-layout", diff --git a/apps/web/src/app/layouts/navbar.component.ts b/apps/web/src/app/layouts/navbar.component.ts index 0b23093dc9c..f2721663314 100644 --- a/apps/web/src/app/layouts/navbar.component.ts +++ b/apps/web/src/app/layouts/navbar.component.ts @@ -1,9 +1,6 @@ import { Component, OnInit } from "@angular/core"; import { Observable } from "rxjs"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { canAccessAdmin, OrganizationService, @@ -12,6 +9,9 @@ import { ProviderService } from "@bitwarden/common/admin-console/abstractions/pr import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { TokenService } from "@bitwarden/common/auth/abstractions/token.service"; import { Provider } from "@bitwarden/common/models/domain/provider"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; @Component({ diff --git a/apps/web/src/app/layouts/product-switcher/product-switcher.module.ts b/apps/web/src/app/layouts/product-switcher/product-switcher.module.ts index a8d08427a0f..76a35045d8c 100644 --- a/apps/web/src/app/layouts/product-switcher/product-switcher.module.ts +++ b/apps/web/src/app/layouts/product-switcher/product-switcher.module.ts @@ -2,7 +2,7 @@ import { A11yModule } from "@angular/cdk/a11y"; import { NgModule } from "@angular/core"; import { RouterModule } from "@angular/router"; -import { I18nPipe } from "@bitwarden/angular/pipes/i18n.pipe"; +import { I18nPipe } from "@bitwarden/angular/platform/pipes/i18n.pipe"; import { SharedModule } from "../../shared"; diff --git a/apps/web/src/app/layouts/product-switcher/product-switcher.stories.ts b/apps/web/src/app/layouts/product-switcher/product-switcher.stories.ts index 82144afa723..87e42027476 100644 --- a/apps/web/src/app/layouts/product-switcher/product-switcher.stories.ts +++ b/apps/web/src/app/layouts/product-switcher/product-switcher.stories.ts @@ -4,9 +4,9 @@ import { Meta, Story, applicationConfig, moduleMetadata } from "@storybook/angul import { BehaviorSubject } from "rxjs"; import { JslibModule } from "@bitwarden/angular/jslib.module"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { IconButtonModule, LinkModule, MenuModule } from "@bitwarden/components"; import { I18nMockService } from "@bitwarden/components/src/utils/i18n-mock.service"; diff --git a/apps/web/src/app/reports/pages/breach-report.component.ts b/apps/web/src/app/reports/pages/breach-report.component.ts index 7e3c80fcbbb..88851d26ad6 100644 --- a/apps/web/src/app/reports/pages/breach-report.component.ts +++ b/apps/web/src/app/reports/pages/breach-report.component.ts @@ -1,8 +1,8 @@ import { Component, OnInit } from "@angular/core"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { BreachAccountResponse } from "@bitwarden/common/models/response/breach-account.response"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Component({ selector: "app-breach-report", diff --git a/apps/web/src/app/reports/pages/cipher-report.component.ts b/apps/web/src/app/reports/pages/cipher-report.component.ts index 3f73d6d2dca..c6af91fb962 100644 --- a/apps/web/src/app/reports/pages/cipher-report.component.ts +++ b/apps/web/src/app/reports/pages/cipher-report.component.ts @@ -1,8 +1,8 @@ import { Directive, ViewChild, ViewContainerRef } from "@angular/core"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { CipherRepromptType } from "@bitwarden/common/vault/enums/cipher-reprompt-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; diff --git a/apps/web/src/app/reports/pages/exposed-passwords-report.component.ts b/apps/web/src/app/reports/pages/exposed-passwords-report.component.ts index e30c9c69b31..38b18dae160 100644 --- a/apps/web/src/app/reports/pages/exposed-passwords-report.component.ts +++ b/apps/web/src/app/reports/pages/exposed-passwords-report.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from "@angular/core"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; diff --git a/apps/web/src/app/reports/pages/inactive-two-factor-report.component.ts b/apps/web/src/app/reports/pages/inactive-two-factor-report.component.ts index ca5cc25c765..a70ede0102e 100644 --- a/apps/web/src/app/reports/pages/inactive-two-factor-report.component.ts +++ b/apps/web/src/app/reports/pages/inactive-two-factor-report.component.ts @@ -1,9 +1,9 @@ import { Component, OnInit } from "@angular/core"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; diff --git a/apps/web/src/app/reports/pages/reports-home.component.ts b/apps/web/src/app/reports/pages/reports-home.component.ts index 81058c60949..3d85db8cb26 100644 --- a/apps/web/src/app/reports/pages/reports-home.component.ts +++ b/apps/web/src/app/reports/pages/reports-home.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from "@angular/core"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { reports, ReportType } from "../reports"; import { ReportEntry, ReportVariant } from "../shared"; diff --git a/apps/web/src/app/reports/pages/reused-passwords-report.component.ts b/apps/web/src/app/reports/pages/reused-passwords-report.component.ts index c01a7ab2901..95851eca1b7 100644 --- a/apps/web/src/app/reports/pages/reused-passwords-report.component.ts +++ b/apps/web/src/app/reports/pages/reused-passwords-report.component.ts @@ -1,8 +1,8 @@ import { Component, OnInit } from "@angular/core"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; diff --git a/apps/web/src/app/reports/pages/unsecured-websites-report.component.ts b/apps/web/src/app/reports/pages/unsecured-websites-report.component.ts index f83fe906734..14bc961e347 100644 --- a/apps/web/src/app/reports/pages/unsecured-websites-report.component.ts +++ b/apps/web/src/app/reports/pages/unsecured-websites-report.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from "@angular/core"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; diff --git a/apps/web/src/app/reports/pages/weak-passwords-report.component.ts b/apps/web/src/app/reports/pages/weak-passwords-report.component.ts index 0ea6e5a7cfd..14d159deee3 100644 --- a/apps/web/src/app/reports/pages/weak-passwords-report.component.ts +++ b/apps/web/src/app/reports/pages/weak-passwords-report.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from "@angular/core"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; diff --git a/apps/web/src/app/reports/reports-routing.module.ts b/apps/web/src/app/reports/reports-routing.module.ts index 1bfaaf546eb..cfb90d092fe 100644 --- a/apps/web/src/app/reports/reports-routing.module.ts +++ b/apps/web/src/app/reports/reports-routing.module.ts @@ -3,7 +3,7 @@ import { RouterModule, Routes } from "@angular/router"; import { AuthGuard } from "@bitwarden/angular/auth/guards/auth.guard"; -import { HasPremiumGuard } from "../shared/guards/has-premium.guard"; +import { HasPremiumGuard } from "../core/guards/has-premium.guard"; import { BreachReportComponent } from "./pages/breach-report.component"; import { ExposedPasswordsReportComponent } from "./pages/exposed-passwords-report.component"; diff --git a/apps/web/src/app/reports/shared/report-card/report-card.stories.ts b/apps/web/src/app/reports/shared/report-card/report-card.stories.ts index f3dea693b36..16a0dfc07ff 100644 --- a/apps/web/src/app/reports/shared/report-card/report-card.stories.ts +++ b/apps/web/src/app/reports/shared/report-card/report-card.stories.ts @@ -5,7 +5,7 @@ import { Meta, Story, applicationConfig, moduleMetadata } from "@storybook/angul import { JslibModule } from "@bitwarden/angular/jslib.module"; import { BadgeModule, IconModule } from "@bitwarden/components"; -import { PreloadedEnglishI18nModule } from "../../../tests/preloaded-english-i18n.module"; +import { PreloadedEnglishI18nModule } from "../../../core/tests"; import { PremiumBadgeComponent } from "../../../vault/components/premium-badge.component"; import { ReportVariant } from "../models/report-variant"; diff --git a/apps/web/src/app/reports/shared/report-list/report-list.stories.ts b/apps/web/src/app/reports/shared/report-list/report-list.stories.ts index b477792dd4b..9a5f41890fc 100644 --- a/apps/web/src/app/reports/shared/report-list/report-list.stories.ts +++ b/apps/web/src/app/reports/shared/report-list/report-list.stories.ts @@ -5,7 +5,7 @@ import { Meta, Story, applicationConfig, moduleMetadata } from "@storybook/angul import { JslibModule } from "@bitwarden/angular/jslib.module"; import { BadgeModule, IconModule } from "@bitwarden/components"; -import { PreloadedEnglishI18nModule } from "../../../tests/preloaded-english-i18n.module"; +import { PreloadedEnglishI18nModule } from "../../../core/tests"; import { PremiumBadgeComponent } from "../../../vault/components/premium-badge.component"; import { reports } from "../../reports"; import { ReportVariant } from "../models/report-variant"; diff --git a/apps/web/src/app/settings/account.component.ts b/apps/web/src/app/settings/account.component.ts index af9e5a448b8..4cedadc40e7 100644 --- a/apps/web/src/app/settings/account.component.ts +++ b/apps/web/src/app/settings/account.component.ts @@ -2,8 +2,8 @@ import { Component, ViewChild, ViewContainerRef } from "@angular/core"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { DeauthorizeSessionsComponent } from "../auth/settings/deauthorize-sessions.component"; diff --git a/apps/web/src/app/settings/adjust-storage.component.ts b/apps/web/src/app/settings/adjust-storage.component.ts index 346b67c505e..df570d7f9a1 100644 --- a/apps/web/src/app/settings/adjust-storage.component.ts +++ b/apps/web/src/app/settings/adjust-storage.component.ts @@ -2,12 +2,12 @@ import { Component, EventEmitter, Input, Output, ViewChild } from "@angular/core import { ActivatedRoute, Router } from "@angular/router"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { PaymentResponse } from "@bitwarden/common/billing/models/response/payment.response"; import { StorageRequest } from "@bitwarden/common/models/request/storage.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { PaymentComponent } from "../billing/settings/payment.component"; diff --git a/apps/web/src/app/settings/api-key.component.ts b/apps/web/src/app/settings/api-key.component.ts index 5607f320092..2360a84e011 100644 --- a/apps/web/src/app/settings/api-key.component.ts +++ b/apps/web/src/app/settings/api-key.component.ts @@ -1,9 +1,9 @@ import { Component } from "@angular/core"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { SecretVerificationRequest } from "@bitwarden/common/auth/models/request/secret-verification.request"; import { ApiKeyResponse } from "@bitwarden/common/auth/models/response/api-key.response"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { Verification } from "@bitwarden/common/types/verification"; @Component({ diff --git a/apps/web/src/app/settings/change-avatar.component.ts b/apps/web/src/app/settings/change-avatar.component.ts index ba6a234cbfa..4655110c06d 100644 --- a/apps/web/src/app/settings/change-avatar.component.ts +++ b/apps/web/src/app/settings/change-avatar.component.ts @@ -12,11 +12,11 @@ import { import { BehaviorSubject, debounceTime, Subject, takeUntil } from "rxjs"; import { AvatarUpdateService } from "@bitwarden/common/abstractions/account/avatar-update.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { Utils } from "@bitwarden/common/misc/utils"; import { ProfileResponse } from "@bitwarden/common/models/response/profile.response"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; @Component({ selector: "app-change-avatar", diff --git a/apps/web/src/app/settings/change-email.component.ts b/apps/web/src/app/settings/change-email.component.ts index 320441979d8..c28bf3dcfd6 100644 --- a/apps/web/src/app/settings/change-email.component.ts +++ b/apps/web/src/app/settings/change-email.component.ts @@ -1,15 +1,15 @@ import { Component, OnInit } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; import { EmailTokenRequest } from "@bitwarden/common/auth/models/request/email-token.request"; import { EmailRequest } from "@bitwarden/common/auth/models/request/email.request"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Component({ selector: "app-change-email", diff --git a/apps/web/src/app/settings/change-kdf/change-kdf-confirmation.component.ts b/apps/web/src/app/settings/change-kdf/change-kdf-confirmation.component.ts index 36a8028308a..ebf74f44570 100644 --- a/apps/web/src/app/settings/change-kdf/change-kdf-confirmation.component.ts +++ b/apps/web/src/app/settings/change-kdf/change-kdf-confirmation.component.ts @@ -3,15 +3,15 @@ import { Component, Inject } from "@angular/core"; import { FormGroup, FormControl, Validators } from "@angular/forms"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { KdfConfig } from "@bitwarden/common/auth/models/domain/kdf-config"; import { KdfType } from "@bitwarden/common/enums"; import { KdfRequest } from "@bitwarden/common/models/request/kdf.request"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Component({ selector: "app-change-kdf-confirmation", diff --git a/apps/web/src/app/settings/change-kdf/change-kdf.component.ts b/apps/web/src/app/settings/change-kdf/change-kdf.component.ts index ae599bca6b3..d0acf2c1d5b 100644 --- a/apps/web/src/app/settings/change-kdf/change-kdf.component.ts +++ b/apps/web/src/app/settings/change-kdf/change-kdf.component.ts @@ -1,7 +1,6 @@ import { Component, OnInit } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { KdfConfig } from "@bitwarden/common/auth/models/domain/kdf-config"; import { DEFAULT_KDF_CONFIG, @@ -11,6 +10,7 @@ import { DEFAULT_ARGON2_PARALLELISM, KdfType, } from "@bitwarden/common/enums"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { ChangeKdfConfirmationComponent } from "./change-kdf-confirmation.component"; diff --git a/apps/web/src/app/settings/change-password.component.ts b/apps/web/src/app/settings/change-password.component.ts index 10b83e9ff77..8b57c6cfb60 100644 --- a/apps/web/src/app/settings/change-password.component.ts +++ b/apps/web/src/app/settings/change-password.component.ts @@ -6,13 +6,8 @@ import { ChangePasswordComponent as BaseChangePasswordComponent } from "@bitward import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; import { OrganizationUserResetPasswordEnrollmentRequest } from "@bitwarden/common/abstractions/organization-user/requests"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; @@ -20,10 +15,15 @@ import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-con import { EmergencyAccessStatusType } from "@bitwarden/common/auth/enums/emergency-access-status-type"; import { EmergencyAccessUpdateRequest } from "@bitwarden/common/auth/models/request/emergency-access-update.request"; import { PasswordRequest } from "@bitwarden/common/auth/models/request/password.request"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; import { UpdateKeyRequest } from "@bitwarden/common/models/request/update-key.request"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { SendWithIdRequest } from "@bitwarden/common/tools/send/models/request/send-with-id.request"; import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction"; diff --git a/apps/web/src/app/settings/delete-account.component.ts b/apps/web/src/app/settings/delete-account.component.ts index 65f3daf9f73..61423d0e4fc 100644 --- a/apps/web/src/app/settings/delete-account.component.ts +++ b/apps/web/src/app/settings/delete-account.component.ts @@ -1,10 +1,10 @@ import { Component } from "@angular/core"; import { FormBuilder } from "@angular/forms"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { AccountApiService } from "@bitwarden/common/auth/abstractions/account-api.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { Verification } from "@bitwarden/common/types/verification"; @Component({ diff --git a/apps/web/src/app/settings/domain-rules.component.ts b/apps/web/src/app/settings/domain-rules.component.ts index 5f95a06ac5e..ae6d2eb1c9d 100644 --- a/apps/web/src/app/settings/domain-rules.component.ts +++ b/apps/web/src/app/settings/domain-rules.component.ts @@ -1,10 +1,10 @@ import { Component, OnInit } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { UpdateDomainsRequest } from "@bitwarden/common/models/request/update-domains.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-domain-rules", diff --git a/apps/web/src/app/settings/preferences.component.ts b/apps/web/src/app/settings/preferences.component.ts index 5f9e156b099..7a9b3c9a1c6 100644 --- a/apps/web/src/app/settings/preferences.component.ts +++ b/apps/web/src/app/settings/preferences.component.ts @@ -4,17 +4,17 @@ import { concatMap, filter, map, Observable, Subject, takeUntil, tap } from "rxj import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { AbstractThemingService } from "@bitwarden/angular/services/theming/theming.service.abstraction"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SettingsService } from "@bitwarden/common/abstractions/settings.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { ThemeType } from "@bitwarden/common/enums"; import { VaultTimeoutAction } from "@bitwarden/common/enums/vault-timeout-action.enum"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; @Component({ selector: "app-preferences", diff --git a/apps/web/src/app/settings/premium.component.ts b/apps/web/src/app/settings/premium.component.ts index 2e78882fa53..ff338969406 100644 --- a/apps/web/src/app/settings/premium.component.ts +++ b/apps/web/src/app/settings/premium.component.ts @@ -2,12 +2,12 @@ import { Component, OnInit, ViewChild } from "@angular/core"; import { Router } from "@angular/router"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { TokenService } from "@bitwarden/common/auth/abstractions/token.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { PaymentComponent } from "../billing/settings/payment.component"; diff --git a/apps/web/src/app/settings/profile.component.ts b/apps/web/src/app/settings/profile.component.ts index a5fe239d043..d2c115f3eec 100644 --- a/apps/web/src/app/settings/profile.component.ts +++ b/apps/web/src/app/settings/profile.component.ts @@ -3,14 +3,14 @@ import { Subject, takeUntil } from "rxjs"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; import { UpdateProfileRequest } from "@bitwarden/common/auth/models/request/update-profile.request"; import { ProfileResponse } from "@bitwarden/common/models/response/profile.response"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { ChangeAvatarComponent } from "./change-avatar.component"; diff --git a/apps/web/src/app/settings/purge-vault.component.ts b/apps/web/src/app/settings/purge-vault.component.ts index e93e68f91e1..23b75132686 100644 --- a/apps/web/src/app/settings/purge-vault.component.ts +++ b/apps/web/src/app/settings/purge-vault.component.ts @@ -2,10 +2,10 @@ import { Component, Input } from "@angular/core"; import { Router } from "@angular/router"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { Verification } from "@bitwarden/common/types/verification"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; diff --git a/apps/web/src/app/settings/security-keys.component.ts b/apps/web/src/app/settings/security-keys.component.ts index 822ba4d5780..887ba3d5879 100644 --- a/apps/web/src/app/settings/security-keys.component.ts +++ b/apps/web/src/app/settings/security-keys.component.ts @@ -2,8 +2,8 @@ import { Component, OnInit, ViewChild, ViewContainerRef } from "@angular/core"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { ApiKeyComponent } from "./api-key.component"; diff --git a/apps/web/src/app/settings/settings.component.ts b/apps/web/src/app/settings/settings.component.ts index c65f22b00db..60e81b17eb4 100644 --- a/apps/web/src/app/settings/settings.component.ts +++ b/apps/web/src/app/settings/settings.component.ts @@ -1,10 +1,10 @@ import { Component, NgZone, OnDestroy, OnInit } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { TokenService } from "@bitwarden/common/auth/abstractions/token.service"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { StateService } from "../core"; diff --git a/apps/web/src/app/settings/update-key.component.ts b/apps/web/src/app/settings/update-key.component.ts index 243c3334fa4..9f46d732694 100644 --- a/apps/web/src/app/settings/update-key.component.ts +++ b/apps/web/src/app/settings/update-key.component.ts @@ -2,13 +2,13 @@ import { Component } from "@angular/core"; import { firstValueFrom } from "rxjs"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; import { UpdateKeyRequest } from "@bitwarden/common/models/request/update-key.request"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; import { CipherWithIdRequest } from "@bitwarden/common/vault//models/request/cipher-with-id.request"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; diff --git a/apps/web/src/app/settings/update-license.component.ts b/apps/web/src/app/settings/update-license.component.ts index d12ec0ebc4a..73d8b0de141 100644 --- a/apps/web/src/app/settings/update-license.component.ts +++ b/apps/web/src/app/settings/update-license.component.ts @@ -1,10 +1,10 @@ import { Component, EventEmitter, Input, Output } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-update-license", diff --git a/apps/web/src/app/tools/generator.component.ts b/apps/web/src/app/tools/generator.component.ts index 6587fc5d8a2..425f5cca2ff 100644 --- a/apps/web/src/app/tools/generator.component.ts +++ b/apps/web/src/app/tools/generator.component.ts @@ -3,10 +3,10 @@ import { ActivatedRoute } from "@angular/router"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { GeneratorComponent as BaseGeneratorComponent } from "@bitwarden/angular/tools/generator/components/generator.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { UsernameGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/username"; diff --git a/apps/web/src/app/tools/import-export/export.component.ts b/apps/web/src/app/tools/import-export/export.component.ts index a615eed07de..71c25bbb7ce 100644 --- a/apps/web/src/app/tools/import-export/export.component.ts +++ b/apps/web/src/app/tools/import-export/export.component.ts @@ -4,15 +4,15 @@ import { UntypedFormBuilder } from "@angular/forms"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ExportComponent as BaseExportComponent } from "@bitwarden/angular/tools/export/components/export.component"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { EncryptedExportType } from "@bitwarden/common/enums"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { VaultExportServiceAbstraction } from "@bitwarden/exporter/vault-export"; import { UserVerificationPromptComponent } from "../../shared/components/user-verification"; diff --git a/apps/web/src/app/tools/import-export/import-export.module.ts b/apps/web/src/app/tools/import-export/import-export.module.ts index 770fdcf4d53..68338c23040 100644 --- a/apps/web/src/app/tools/import-export/import-export.module.ts +++ b/apps/web/src/app/tools/import-export/import-export.module.ts @@ -1,9 +1,9 @@ import { NgModule } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { diff --git a/apps/web/src/app/tools/import-export/import.component.ts b/apps/web/src/app/tools/import-export/import.component.ts index f0f530ba0ef..6247bcea249 100644 --- a/apps/web/src/app/tools/import-export/import.component.ts +++ b/apps/web/src/app/tools/import-export/import.component.ts @@ -7,11 +7,11 @@ import Swal, { SweetAlertIcon } from "sweetalert2"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { ImportOption, diff --git a/apps/web/src/app/tools/password-generator-history.component.ts b/apps/web/src/app/tools/password-generator-history.component.ts index bd1928fff14..7c1d76bb044 100644 --- a/apps/web/src/app/tools/password-generator-history.component.ts +++ b/apps/web/src/app/tools/password-generator-history.component.ts @@ -1,8 +1,8 @@ import { Component } from "@angular/core"; import { PasswordGeneratorHistoryComponent as BasePasswordGeneratorHistoryComponent } from "@bitwarden/angular/tools/generator/components/password-generator-history.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; @Component({ diff --git a/apps/web/src/app/tools/send/access.component.ts b/apps/web/src/app/tools/send/access.component.ts index 7893ce9f742..180acfd69f7 100644 --- a/apps/web/src/app/tools/send/access.component.ts +++ b/apps/web/src/app/tools/send/access.component.ts @@ -2,16 +2,16 @@ import { Component, OnInit } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SEND_KDF_ITERATIONS } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { EncArrayBuffer } from "@bitwarden/common/models/domain/enc-array-buffer"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { EncArrayBuffer } from "@bitwarden/common/platform/models/domain/enc-array-buffer"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { SendAccess } from "@bitwarden/common/tools/send/models/domain/send-access"; import { SendAccessRequest } from "@bitwarden/common/tools/send/models/request/send-access.request"; diff --git a/apps/web/src/app/tools/send/add-edit.component.ts b/apps/web/src/app/tools/send/add-edit.component.ts index 627b5f4e314..c7ab4542bcf 100644 --- a/apps/web/src/app/tools/send/add-edit.component.ts +++ b/apps/web/src/app/tools/send/add-edit.component.ts @@ -3,13 +3,13 @@ import { Component } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/tools/send/add-edit.component"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction"; diff --git a/apps/web/src/app/tools/send/efflux-dates.component.ts b/apps/web/src/app/tools/send/efflux-dates.component.ts index 063c7137a49..e6ef9acdf9b 100644 --- a/apps/web/src/app/tools/send/efflux-dates.component.ts +++ b/apps/web/src/app/tools/send/efflux-dates.component.ts @@ -3,8 +3,8 @@ import { Component } from "@angular/core"; import { ControlContainer, NgForm } from "@angular/forms"; import { EffluxDatesComponent as BaseEffluxDatesComponent } from "@bitwarden/angular/tools/send/efflux-dates.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-send-efflux-dates", diff --git a/apps/web/src/app/tools/send/send.component.ts b/apps/web/src/app/tools/send/send.component.ts index 9d67dbbc5f0..616abaf4f29 100644 --- a/apps/web/src/app/tools/send/send.component.ts +++ b/apps/web/src/app/tools/send/send.component.ts @@ -3,13 +3,13 @@ import { Component, NgZone, ViewChild, ViewContainerRef } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { SendComponent as BaseSendComponent } from "@bitwarden/angular/tools/send/send.component"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SendView } from "@bitwarden/common/tools/send/models/view/send.view"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction"; diff --git a/apps/web/src/app/tools/tools.component.ts b/apps/web/src/app/tools/tools.component.ts index e77b935507b..0de08a25db3 100644 --- a/apps/web/src/app/tools/tools.component.ts +++ b/apps/web/src/app/tools/tools.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from "@angular/core"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Component({ selector: "app-tools", diff --git a/apps/web/src/app/vault/components/premium-badge.component.ts b/apps/web/src/app/vault/components/premium-badge.component.ts index d2365c39250..5dafda25517 100644 --- a/apps/web/src/app/vault/components/premium-badge.component.ts +++ b/apps/web/src/app/vault/components/premium-badge.component.ts @@ -1,6 +1,6 @@ import { Component } from "@angular/core"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; @Component({ selector: "app-premium-badge", diff --git a/apps/web/src/app/vault/components/premium-badge.stories.ts b/apps/web/src/app/vault/components/premium-badge.stories.ts index a1fcfd471e3..4585f235ba5 100644 --- a/apps/web/src/app/vault/components/premium-badge.stories.ts +++ b/apps/web/src/app/vault/components/premium-badge.stories.ts @@ -1,10 +1,10 @@ import { Meta, moduleMetadata, Story } from "@storybook/angular"; import { JslibModule } from "@bitwarden/angular/jslib.module"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; -import { StorageOptions } from "@bitwarden/common/models/domain/storage-options"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { StorageOptions } from "@bitwarden/common/platform/models/domain/storage-options"; import { BadgeModule, I18nMockService } from "@bitwarden/components"; import { PremiumBadgeComponent } from "./premium-badge.component"; diff --git a/apps/web/src/app/vault/components/vault-items/vault-items.stories.ts b/apps/web/src/app/vault/components/vault-items/vault-items.stories.ts index 2f40ad9ab43..99799436151 100644 --- a/apps/web/src/app/vault/components/vault-items/vault-items.stories.ts +++ b/apps/web/src/app/vault/components/vault-items/vault-items.stories.ts @@ -4,13 +4,13 @@ import { applicationConfig, Meta, moduleMetadata, Story } from "@storybook/angul import { BehaviorSubject } from "rxjs"; import { AvatarUpdateService } from "@bitwarden/common/abstractions/account/avatar-update.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; import { SettingsService } from "@bitwarden/common/abstractions/settings.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationUserType } from "@bitwarden/common/admin-console/enums"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { TokenService } from "@bitwarden/common/auth/abstractions/token.service"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { AttachmentView } from "@bitwarden/common/vault/models/view/attachment.view"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; @@ -22,7 +22,7 @@ import { CollectionAdminView, GroupView, } from "../../../admin-console/organizations/core"; -import { PreloadedEnglishI18nModule } from "../../../tests/preloaded-english-i18n.module"; +import { PreloadedEnglishI18nModule } from "../../../core/tests"; import { Unassigned } from "../../individual-vault/vault-filter/shared/models/routed-vault-filter.model"; import { VaultItemsComponent } from "./vault-items.component"; diff --git a/apps/web/src/app/vault/individual-vault/add-edit-custom-fields.component.ts b/apps/web/src/app/vault/individual-vault/add-edit-custom-fields.component.ts index 0deb3f9c0be..f9e2342d07b 100644 --- a/apps/web/src/app/vault/individual-vault/add-edit-custom-fields.component.ts +++ b/apps/web/src/app/vault/individual-vault/add-edit-custom-fields.component.ts @@ -2,7 +2,7 @@ import { Component, Input } from "@angular/core"; import { AddEditCustomFieldsComponent as BaseAddEditCustomFieldsComponent } from "@bitwarden/angular/vault/components/add-edit-custom-fields.component"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @Component({ selector: "app-vault-add-edit-custom-fields", diff --git a/apps/web/src/app/vault/individual-vault/add-edit.component.ts b/apps/web/src/app/vault/individual-vault/add-edit.component.ts index 6d6c474b106..548bddcd332 100644 --- a/apps/web/src/app/vault/individual-vault/add-edit.component.ts +++ b/apps/web/src/app/vault/individual-vault/add-edit.component.ts @@ -4,16 +4,16 @@ import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/vault/components/add-edit.component"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { EventType, ProductType } from "@bitwarden/common/enums"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; diff --git a/apps/web/src/app/vault/individual-vault/attachments.component.ts b/apps/web/src/app/vault/individual-vault/attachments.component.ts index cd28b82277f..697cb819665 100644 --- a/apps/web/src/app/vault/individual-vault/attachments.component.ts +++ b/apps/web/src/app/vault/individual-vault/attachments.component.ts @@ -3,12 +3,12 @@ import { Component } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { AttachmentsComponent as BaseAttachmentsComponent } from "@bitwarden/angular/vault/components/attachments.component"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { AttachmentView } from "@bitwarden/common/vault/models/view/attachment.view"; diff --git a/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-delete-dialog/bulk-delete-dialog.component.ts b/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-delete-dialog/bulk-delete-dialog.component.ts index 1d85ec3e82f..239d7a3d4ef 100644 --- a/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-delete-dialog/bulk-delete-dialog.component.ts +++ b/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-delete-dialog/bulk-delete-dialog.component.ts @@ -3,10 +3,10 @@ import { Component, Inject } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { CollectionBulkDeleteRequest } from "@bitwarden/common/models/request/collection-bulk-delete.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { CipherBulkDeleteRequest } from "@bitwarden/common/vault/models/request/cipher-bulk-delete.request"; diff --git a/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-move-dialog/bulk-move-dialog.component.ts b/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-move-dialog/bulk-move-dialog.component.ts index a2ba7b5a26b..4be422cf293 100644 --- a/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-move-dialog/bulk-move-dialog.component.ts +++ b/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-move-dialog/bulk-move-dialog.component.ts @@ -4,8 +4,8 @@ import { FormBuilder, Validators } from "@angular/forms"; import { firstValueFrom, Observable } from "rxjs"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; diff --git a/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-restore-dialog/bulk-restore-dialog.component.ts b/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-restore-dialog/bulk-restore-dialog.component.ts index 08e0801dc5e..62722978c85 100644 --- a/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-restore-dialog/bulk-restore-dialog.component.ts +++ b/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-restore-dialog/bulk-restore-dialog.component.ts @@ -2,8 +2,8 @@ import { DialogConfig, DialogRef, DIALOG_DATA } from "@angular/cdk/dialog"; import { Component, Inject } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; export interface BulkRestoreDialogParams { diff --git a/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-share-dialog/bulk-share-dialog.component.ts b/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-share-dialog/bulk-share-dialog.component.ts index 8a60f929ce4..742f2bbef78 100644 --- a/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-share-dialog/bulk-share-dialog.component.ts +++ b/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-share-dialog/bulk-share-dialog.component.ts @@ -2,13 +2,13 @@ import { DialogConfig, DialogRef, DIALOG_DATA } from "@angular/cdk/dialog"; import { Component, Inject, OnInit } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { Checkable, isChecked } from "@bitwarden/common/types/checkable"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; diff --git a/apps/web/src/app/vault/individual-vault/collections.component.ts b/apps/web/src/app/vault/individual-vault/collections.component.ts index 1df9350bd55..509833c7067 100644 --- a/apps/web/src/app/vault/individual-vault/collections.component.ts +++ b/apps/web/src/app/vault/individual-vault/collections.component.ts @@ -1,11 +1,11 @@ import { Component, OnDestroy } from "@angular/core"; import { CollectionsComponent as BaseCollectionsComponent } from "@bitwarden/angular/admin-console/components/collections.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; @Component({ diff --git a/apps/web/src/app/vault/individual-vault/folder-add-edit.component.ts b/apps/web/src/app/vault/individual-vault/folder-add-edit.component.ts index 4f593bf7d75..059ad3dbfcd 100644 --- a/apps/web/src/app/vault/individual-vault/folder-add-edit.component.ts +++ b/apps/web/src/app/vault/individual-vault/folder-add-edit.component.ts @@ -2,9 +2,9 @@ import { Component } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { FolderAddEditComponent as BaseFolderAddEditComponent } from "@bitwarden/angular/vault/components/folder-add-edit.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; diff --git a/apps/web/src/app/vault/individual-vault/organization-badge/organization-name-badge.component.ts b/apps/web/src/app/vault/individual-vault/organization-badge/organization-name-badge.component.ts index 702aff82463..f38d45b6310 100644 --- a/apps/web/src/app/vault/individual-vault/organization-badge/organization-name-badge.component.ts +++ b/apps/web/src/app/vault/individual-vault/organization-badge/organization-name-badge.component.ts @@ -1,9 +1,9 @@ import { Component, Input, OnChanges } from "@angular/core"; import { AvatarUpdateService } from "@bitwarden/common/abstractions/account/avatar-update.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { TokenService } from "@bitwarden/common/auth/abstractions/token.service"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { Unassigned } from "../vault-filter/shared/models/routed-vault-filter.model"; diff --git a/apps/web/src/app/vault/individual-vault/share.component.ts b/apps/web/src/app/vault/individual-vault/share.component.ts index 6e962c3b563..f5c62644ff4 100644 --- a/apps/web/src/app/vault/individual-vault/share.component.ts +++ b/apps/web/src/app/vault/individual-vault/share.component.ts @@ -1,12 +1,12 @@ import { Component, OnDestroy } from "@angular/core"; import { ShareComponent as BaseShareComponent } from "@bitwarden/angular/components/share.component"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; @Component({ diff --git a/apps/web/src/app/vault/individual-vault/vault-filter/components/link-sso.component.ts b/apps/web/src/app/vault/individual-vault/vault-filter/components/link-sso.component.ts index deeb4caf926..bf16d2513f7 100644 --- a/apps/web/src/app/vault/individual-vault/vault-filter/components/link-sso.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault-filter/components/link-sso.component.ts @@ -3,14 +3,14 @@ import { ActivatedRoute, Router } from "@angular/router"; import { SsoComponent } from "@bitwarden/angular/auth/components/sso.component"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; @Component({ diff --git a/apps/web/src/app/vault/individual-vault/vault-filter/components/organization-options.component.ts b/apps/web/src/app/vault/individual-vault/vault-filter/components/organization-options.component.ts index d661c307535..4c3b94246da 100644 --- a/apps/web/src/app/vault/individual-vault/vault-filter/components/organization-options.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault-filter/components/organization-options.component.ts @@ -4,16 +4,16 @@ import { map, Subject, takeUntil } from "rxjs"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; import { OrganizationUserResetPasswordEnrollmentRequest } from "@bitwarden/common/abstractions/organization-user/requests"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { Policy } from "@bitwarden/common/admin-console/models/domain/policy"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { EnrollMasterPasswordReset } from "../../../../admin-console/organizations/users/enroll-master-password-reset.component"; diff --git a/apps/web/src/app/vault/individual-vault/vault-filter/components/vault-filter.component.ts b/apps/web/src/app/vault/individual-vault/vault-filter/components/vault-filter.component.ts index b0076f664df..0cce8df38b9 100644 --- a/apps/web/src/app/vault/individual-vault/vault-filter/components/vault-filter.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault-filter/components/vault-filter.component.ts @@ -1,11 +1,11 @@ import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from "@angular/core"; import { firstValueFrom, Subject } from "rxjs"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { VaultFilterService } from "../services/abstractions/vault-filter.service"; diff --git a/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.spec.ts b/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.spec.ts index 23aa0f7ffbd..42743f37f90 100644 --- a/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.spec.ts +++ b/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.spec.ts @@ -1,13 +1,13 @@ import { mock, MockProxy } from "jest-mock-extended"; import { firstValueFrom, ReplaySubject, take } from "rxjs"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; diff --git a/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.ts b/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.ts index a36c41b81ef..ddc2df61099 100644 --- a/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.ts +++ b/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.ts @@ -11,8 +11,6 @@ import { switchMap, } from "rxjs"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { isMember, OrganizationService, @@ -23,6 +21,8 @@ import { Organization } from "@bitwarden/common/admin-console/models/domain/orga import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { ServiceUtils } from "@bitwarden/common/misc/serviceUtils"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; diff --git a/apps/web/src/app/vault/individual-vault/vault-header/vault-header.component.ts b/apps/web/src/app/vault/individual-vault/vault-header/vault-header.component.ts index 82b54b3e093..f2a7b855321 100644 --- a/apps/web/src/app/vault/individual-vault/vault-header/vault-header.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault-header/vault-header.component.ts @@ -1,9 +1,9 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { All, diff --git a/apps/web/src/app/vault/individual-vault/vault.component.ts b/apps/web/src/app/vault/individual-vault/vault.component.ts index 2954e7e3b6a..168fb912147 100644 --- a/apps/web/src/app/vault/individual-vault/vault.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault.component.ts @@ -31,16 +31,8 @@ import { import { SearchPipe } from "@bitwarden/angular/pipes/search.pipe"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { ConfigServiceAbstraction } from "@bitwarden/common/abstractions/config/config.service.abstraction"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; @@ -50,8 +42,16 @@ import { TokenService } from "@bitwarden/common/auth/abstractions/token.service" import { DEFAULT_PBKDF2_ITERATIONS, EventType, KdfType } from "@bitwarden/common/enums"; import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; import { ServiceUtils } from "@bitwarden/common/misc/serviceUtils"; -import { Utils } from "@bitwarden/common/misc/utils"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; diff --git a/apps/web/src/app/vault/org-vault/add-edit.component.ts b/apps/web/src/app/vault/org-vault/add-edit.component.ts index 02bc3899b89..88d1ef7018d 100644 --- a/apps/web/src/app/vault/org-vault/add-edit.component.ts +++ b/apps/web/src/app/vault/org-vault/add-edit.component.ts @@ -4,15 +4,15 @@ import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; diff --git a/apps/web/src/app/vault/org-vault/attachments.component.ts b/apps/web/src/app/vault/org-vault/attachments.component.ts index 7ccdb3931a7..4dc0df74c03 100644 --- a/apps/web/src/app/vault/org-vault/attachments.component.ts +++ b/apps/web/src/app/vault/org-vault/attachments.component.ts @@ -2,13 +2,13 @@ import { Component } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { CipherData } from "@bitwarden/common/vault/models/data/cipher.data"; import { Cipher } from "@bitwarden/common/vault/models/domain/cipher"; diff --git a/apps/web/src/app/vault/org-vault/collections.component.ts b/apps/web/src/app/vault/org-vault/collections.component.ts index 2d5995f0de4..e31ae408173 100644 --- a/apps/web/src/app/vault/org-vault/collections.component.ts +++ b/apps/web/src/app/vault/org-vault/collections.component.ts @@ -1,11 +1,11 @@ import { Component } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { CipherData } from "@bitwarden/common/vault/models/data/cipher.data"; import { Cipher } from "@bitwarden/common/vault/models/domain/cipher"; diff --git a/apps/web/src/app/vault/org-vault/group-badge/group-name-badge.component.ts b/apps/web/src/app/vault/org-vault/group-badge/group-name-badge.component.ts index 828855997c6..98c49f59548 100644 --- a/apps/web/src/app/vault/org-vault/group-badge/group-name-badge.component.ts +++ b/apps/web/src/app/vault/org-vault/group-badge/group-name-badge.component.ts @@ -1,7 +1,7 @@ import { Component, Input, OnChanges } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { SelectionReadOnlyRequest } from "@bitwarden/common/admin-console/models/request/selection-read-only.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { GroupView } from "../../../admin-console/organizations/core"; diff --git a/apps/web/src/app/vault/org-vault/vault-filter/vault-filter.service.ts b/apps/web/src/app/vault/org-vault/vault-filter/vault-filter.service.ts index 4918ef82bfb..222537c4b1c 100644 --- a/apps/web/src/app/vault/org-vault/vault-filter/vault-filter.service.ts +++ b/apps/web/src/app/vault/org-vault/vault-filter/vault-filter.service.ts @@ -1,10 +1,10 @@ import { Injectable, OnDestroy } from "@angular/core"; import { map, Observable, ReplaySubject, Subject } from "rxjs"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; diff --git a/apps/web/src/app/vault/org-vault/vault-header/vault-header.component.ts b/apps/web/src/app/vault/org-vault/vault-header/vault-header.component.ts index 997b7ee795d..6c614d229b4 100644 --- a/apps/web/src/app/vault/org-vault/vault-header/vault-header.component.ts +++ b/apps/web/src/app/vault/org-vault/vault-header/vault-header.component.ts @@ -8,11 +8,11 @@ import { SimpleDialogCloseType, SimpleDialogOptions, } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { ProductType } from "@bitwarden/common/enums"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { CollectionAdminService, diff --git a/apps/web/src/app/vault/org-vault/vault.component.ts b/apps/web/src/app/vault/org-vault/vault.component.ts index 1867b157d1a..2cb7a8f14cf 100644 --- a/apps/web/src/app/vault/org-vault/vault.component.ts +++ b/apps/web/src/app/vault/org-vault/vault.component.ts @@ -33,12 +33,7 @@ import { SearchPipe } from "@bitwarden/angular/pipes/search.pipe"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; @@ -46,8 +41,13 @@ import { Organization } from "@bitwarden/common/admin-console/models/domain/orga import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { EventType } from "@bitwarden/common/enums"; import { ServiceUtils } from "@bitwarden/common/misc/serviceUtils"; -import { Utils } from "@bitwarden/common/misc/utils"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; diff --git a/apps/web/src/connectors/translation.service.ts b/apps/web/src/connectors/translation.service.ts index 3bf73c66c18..266ded7ce9c 100644 --- a/apps/web/src/connectors/translation.service.ts +++ b/apps/web/src/connectors/translation.service.ts @@ -1,4 +1,4 @@ -import { TranslationService as BaseTranslationService } from "@bitwarden/common/services/translation.service"; +import { TranslationService as BaseTranslationService } from "@bitwarden/common/platform/services/translation.service"; import { SupportedTranslationLocales } from "../translation-constants"; diff --git a/apps/web/src/utils/flags.ts b/apps/web/src/utils/flags.ts index 601734ea5bc..902159147e9 100644 --- a/apps/web/src/utils/flags.ts +++ b/apps/web/src/utils/flags.ts @@ -4,7 +4,7 @@ import { devFlagValue as baseDevFlagValue, SharedFlags, SharedDevFlags, -} from "@bitwarden/common/misc/flags"; +} from "@bitwarden/common/platform/misc/flags"; // required to avoid linting errors when there are no flags /* eslint-disable-next-line @typescript-eslint/ban-types */ diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index 9ead7d5a8c9..f5d6f72d96c 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -22,6 +22,6 @@ "src/connectors/*.ts", "src/**/*.stories.ts", "src/**/*.spec.ts", - "../../libs/common/src/services/**/*.worker.ts" + "../../libs/common/src/platform/services/**/*.worker.ts" ] } diff --git a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.ts b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.ts index c205f766d5f..f858b8e0914 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.ts @@ -4,16 +4,16 @@ import { FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from "@a import { Subject, takeUntil } from "rxjs"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; -import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { OrgDomainApiServiceAbstraction } from "@bitwarden/common/abstractions/organization-domain/org-domain-api.service.abstraction"; import { OrgDomainServiceAbstraction } from "@bitwarden/common/abstractions/organization-domain/org-domain.service.abstraction"; import { OrganizationDomainResponse } from "@bitwarden/common/abstractions/organization-domain/responses/organization-domain.response"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; import { HttpStatusCode } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; +import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { OrganizationDomainRequest } from "@bitwarden/common/services/organization-domain/requests/organization-domain.request"; import { domainNameValidator } from "./validators/domain-name.validator"; diff --git a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.ts b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.ts index 8de4077478b..ddeada522d5 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.ts @@ -3,14 +3,14 @@ import { ActivatedRoute, Params } from "@angular/router"; import { concatMap, Observable, Subject, take, takeUntil } from "rxjs"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { OrgDomainApiServiceAbstraction } from "@bitwarden/common/abstractions/organization-domain/org-domain-api.service.abstraction"; import { OrgDomainServiceAbstraction } from "@bitwarden/common/abstractions/organization-domain/org-domain.service.abstraction"; import { OrganizationDomainResponse } from "@bitwarden/common/abstractions/organization-domain/responses/organization-domain.response"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; import { HttpStatusCode } from "@bitwarden/common/enums"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { DomainAddEditDialogComponent, diff --git a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/scim.component.ts b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/scim.component.ts index 1e1e9eb58c1..618c9bcd107 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/scim.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/scim.component.ts @@ -4,9 +4,6 @@ import { ActivatedRoute } from "@angular/router"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { OrganizationApiKeyType, @@ -18,6 +15,9 @@ import { OrganizationConnectionRequest } from "@bitwarden/common/admin-console/m import { ScimConfigRequest } from "@bitwarden/common/admin-console/models/request/scim-config.request"; import { OrganizationConnectionResponse } from "@bitwarden/common/admin-console/models/response/organization-connection.response"; import { ApiKeyResponse } from "@bitwarden/common/auth/models/response/api-key.response"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "app-org-manage-scim", diff --git a/bitwarden_license/bit-web/src/app/admin-console/policies/maximum-vault-timeout.component.ts b/bitwarden_license/bit-web/src/app/admin-console/policies/maximum-vault-timeout.component.ts index cffed9b5856..afbc6fc8f6b 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/policies/maximum-vault-timeout.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/policies/maximum-vault-timeout.component.ts @@ -1,10 +1,10 @@ import { Component } from "@angular/core"; import { FormBuilder, FormControl } from "@angular/forms"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { PolicyRequest } from "@bitwarden/common/admin-console/models/request/policy.request"; import { VaultTimeoutAction } from "@bitwarden/common/enums/vault-timeout-action.enum"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { BasePolicy, BasePolicyComponent, diff --git a/bitwarden_license/bit-web/src/app/admin-console/providers/clients/add-organization.component.ts b/bitwarden_license/bit-web/src/app/admin-console/providers/clients/add-organization.component.ts index 36207decbd9..b0eb5e9e946 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/providers/clients/add-organization.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/providers/clients/add-organization.component.ts @@ -1,12 +1,12 @@ import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; import { ProviderService } from "@bitwarden/common/admin-console/abstractions/provider.service"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { Provider } from "@bitwarden/common/models/domain/provider"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { WebProviderService } from "../services/web-provider.service"; diff --git a/bitwarden_license/bit-web/src/app/admin-console/providers/clients/clients.component.ts b/bitwarden_license/bit-web/src/app/admin-console/providers/clients/clients.component.ts index 69e5dcf063f..f4fd2374995 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/providers/clients/clients.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/providers/clients/clients.component.ts @@ -5,11 +5,7 @@ import { first } from "rxjs/operators"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { ProviderService } from "@bitwarden/common/admin-console/abstractions/provider.service"; @@ -17,6 +13,10 @@ import { ProviderUserType } from "@bitwarden/common/admin-console/enums"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { ProviderOrganizationOrganizationDetailsResponse } from "@bitwarden/common/admin-console/models/response/provider/provider-organization.response"; import { PlanType } from "@bitwarden/common/billing/enums"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { WebProviderService } from "../services/web-provider.service"; diff --git a/bitwarden_license/bit-web/src/app/admin-console/providers/guards/provider-permissions.guard.spec.ts b/bitwarden_license/bit-web/src/app/admin-console/providers/guards/provider-permissions.guard.spec.ts index adfdc20056c..c584dc37533 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/providers/guards/provider-permissions.guard.spec.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/providers/guards/provider-permissions.guard.spec.ts @@ -1,11 +1,11 @@ import { ActivatedRouteSnapshot, Router } from "@angular/router"; import { mock, MockProxy } from "jest-mock-extended"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { ProviderService } from "@bitwarden/common/admin-console/abstractions/provider.service"; import { ProviderUserType } from "@bitwarden/common/admin-console/enums"; import { Provider } from "@bitwarden/common/models/domain/provider"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { ProviderPermissionsGuard } from "./provider-permissions.guard"; diff --git a/bitwarden_license/bit-web/src/app/admin-console/providers/guards/provider-permissions.guard.ts b/bitwarden_license/bit-web/src/app/admin-console/providers/guards/provider-permissions.guard.ts index 6606068e488..6c903fce6ed 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/providers/guards/provider-permissions.guard.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/providers/guards/provider-permissions.guard.ts @@ -1,10 +1,10 @@ import { Injectable } from "@angular/core"; import { ActivatedRouteSnapshot, CanActivate, Router } from "@angular/router"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { ProviderService } from "@bitwarden/common/admin-console/abstractions/provider.service"; import { Provider } from "@bitwarden/common/models/domain/provider"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Injectable() export class ProviderPermissionsGuard implements CanActivate { diff --git a/bitwarden_license/bit-web/src/app/admin-console/providers/manage/accept-provider.component.ts b/bitwarden_license/bit-web/src/app/admin-console/providers/manage/accept-provider.component.ts index 3c4d2166bf2..59dc96df958 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/providers/manage/accept-provider.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/providers/manage/accept-provider.component.ts @@ -2,10 +2,10 @@ import { Component } from "@angular/core"; import { ActivatedRoute, Params, Router } from "@angular/router"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { ProviderUserAcceptRequest } from "@bitwarden/common/admin-console/models/request/provider/provider-user-accept.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { BaseAcceptComponent } from "@bitwarden/web-vault/app/common/base.accept.component"; @Component({ diff --git a/bitwarden_license/bit-web/src/app/admin-console/providers/manage/events.component.ts b/bitwarden_license/bit-web/src/app/admin-console/providers/manage/events.component.ts index 288685f78af..0ed91a1f630 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/providers/manage/events.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/providers/manage/events.component.ts @@ -3,12 +3,12 @@ import { ActivatedRoute, Router } from "@angular/router"; import { UserNamePipe } from "@bitwarden/angular/pipes/user-name.pipe"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { ProviderService } from "@bitwarden/common/admin-console/abstractions/provider.service"; import { EventResponse } from "@bitwarden/common/models/response/event.response"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { BaseEventsComponent } from "@bitwarden/web-vault/app/common/base.events.component"; import { EventService } from "@bitwarden/web-vault/app/core"; import { EventExportService } from "@bitwarden/web-vault/app/tools/event-export"; diff --git a/bitwarden_license/bit-web/src/app/admin-console/providers/manage/people.component.ts b/bitwarden_license/bit-web/src/app/admin-console/providers/manage/people.component.ts index 69f965901bc..7c787951d4d 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/providers/manage/people.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/providers/manage/people.component.ts @@ -7,13 +7,7 @@ import { UserNamePipe } from "@bitwarden/angular/pipes/user-name.pipe"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; import { ProviderService } from "@bitwarden/common/admin-console/abstractions/provider.service"; import { ProviderUserStatusType, ProviderUserType } from "@bitwarden/common/admin-console/enums"; import { ProviderUserBulkRequest } from "@bitwarden/common/admin-console/models/request/provider/provider-user-bulk.request"; @@ -21,6 +15,12 @@ import { ProviderUserConfirmRequest } from "@bitwarden/common/admin-console/mode import { ProviderUserBulkResponse } from "@bitwarden/common/admin-console/models/response/provider/provider-user-bulk.response"; import { ProviderUserUserDetailsResponse } from "@bitwarden/common/admin-console/models/response/provider/provider-user.response"; import { ListResponse } from "@bitwarden/common/models/response/list.response"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { EntityEventsComponent } from "@bitwarden/web-vault/app/admin-console/organizations/manage/entity-events.component"; import { BulkStatusComponent } from "@bitwarden/web-vault/app/admin-console/organizations/members/components/bulk/bulk-status.component"; import { BasePeopleComponent } from "@bitwarden/web-vault/app/common/base.people.component"; diff --git a/bitwarden_license/bit-web/src/app/admin-console/providers/manage/user-add-edit.component.ts b/bitwarden_license/bit-web/src/app/admin-console/providers/manage/user-add-edit.component.ts index 7a83cab7493..8f13da92b6e 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/providers/manage/user-add-edit.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/providers/manage/user-add-edit.component.ts @@ -2,13 +2,13 @@ import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core"; import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { ProviderUserType } from "@bitwarden/common/admin-console/enums"; import { PermissionsApi } from "@bitwarden/common/admin-console/models/api/permissions.api"; import { ProviderUserInviteRequest } from "@bitwarden/common/admin-console/models/request/provider/provider-user-invite.request"; import { ProviderUserUpdateRequest } from "@bitwarden/common/admin-console/models/request/provider/provider-user-update.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Component({ selector: "provider-user-add-edit", diff --git a/bitwarden_license/bit-web/src/app/admin-console/providers/services/web-provider.service.ts b/bitwarden_license/bit-web/src/app/admin-console/providers/services/web-provider.service.ts index dc6678903fe..177a580029b 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/providers/services/web-provider.service.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/providers/services/web-provider.service.ts @@ -1,8 +1,8 @@ import { Injectable } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; import { ProviderAddOrganizationRequest } from "@bitwarden/common/admin-console/models/request/provider/provider-add-organization.request"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; @Injectable() diff --git a/bitwarden_license/bit-web/src/app/admin-console/providers/settings/account.component.ts b/bitwarden_license/bit-web/src/app/admin-console/providers/settings/account.component.ts index 939623d8ef6..138beb2cc0b 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/providers/settings/account.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/providers/settings/account.component.ts @@ -2,11 +2,11 @@ import { Component } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { ProviderUpdateRequest } from "@bitwarden/common/admin-console/models/request/provider/provider-update.request"; import { ProviderResponse } from "@bitwarden/common/admin-console/models/response/provider/provider.response"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; @Component({ diff --git a/bitwarden_license/bit-web/src/app/admin-console/providers/setup/setup.component.ts b/bitwarden_license/bit-web/src/app/admin-console/providers/setup/setup.component.ts index 46e4151ff32..c15f793aa3f 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/providers/setup/setup.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/providers/setup/setup.component.ts @@ -3,11 +3,11 @@ import { ActivatedRoute, Router } from "@angular/router"; import { first } from "rxjs/operators"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; import { ProviderSetupRequest } from "@bitwarden/common/admin-console/models/request/provider/provider-setup.request"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; @Component({ diff --git a/bitwarden_license/bit-web/src/app/auth/sso/sso.component.ts b/bitwarden_license/bit-web/src/app/auth/sso/sso.component.ts index 3ccdbbdff3f..1ea6c6dd798 100644 --- a/bitwarden_license/bit-web/src/app/auth/sso/sso.component.ts +++ b/bitwarden_license/bit-web/src/app/auth/sso/sso.component.ts @@ -11,9 +11,6 @@ import { concatMap, Subject, takeUntil } from "rxjs"; import { ControlsOf } from "@bitwarden/angular/types/controls-of"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { ConfigServiceAbstraction } from "@bitwarden/common/abstractions/config/config.service.abstraction"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; @@ -30,7 +27,10 @@ import { OrganizationSsoRequest } from "@bitwarden/common/auth/models/request/or import { OrganizationSsoResponse } from "@bitwarden/common/auth/models/response/organization-sso.response"; import { SsoConfigView } from "@bitwarden/common/auth/models/view/sso-config.view"; import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { ssoTypeValidator } from "./sso-type.validator"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/layout/layout.stories.ts b/bitwarden_license/bit-web/src/app/secrets-manager/layout/layout.stories.ts index 533f86a6e62..3eeac62b7fa 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/layout/layout.stories.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/layout/layout.stories.ts @@ -6,7 +6,7 @@ import { BehaviorSubject } from "rxjs"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { IconModule } from "@bitwarden/components"; -import { PreloadedEnglishI18nModule } from "@bitwarden/web-vault/app/tests/preloaded-english-i18n.module"; +import { PreloadedEnglishI18nModule } from "@bitwarden/web-vault/app/core/tests"; import { LayoutComponent } from "./layout.component"; import { LayoutModule } from "./layout.module"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/overview/onboarding.stories.ts b/bitwarden_license/bit-web/src/app/secrets-manager/overview/onboarding.stories.ts index a25e3863071..77436e3ec04 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/overview/onboarding.stories.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/overview/onboarding.stories.ts @@ -5,7 +5,7 @@ import { delay, of, startWith } from "rxjs"; import { JslibModule } from "@bitwarden/angular/jslib.module"; import { LinkModule, IconModule, ProgressModule } from "@bitwarden/components"; -import { PreloadedEnglishI18nModule } from "@bitwarden/web-vault/app/tests/preloaded-english-i18n.module"; +import { PreloadedEnglishI18nModule } from "@bitwarden/web-vault/app/core/tests"; import { OnboardingTaskComponent } from "./onboarding-task.component"; import { OnboardingComponent } from "./onboarding.component"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.ts index 8b345402565..6007cbce68c 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.ts @@ -14,10 +14,10 @@ import { } from "rxjs"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { ProjectListView } from "../models/view/project-list.view"; import { SecretListView } from "../models/view/secret-list.view"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/projects/dialog/project-delete-dialog.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/projects/dialog/project-delete-dialog.component.ts index 5a6d9084e15..1375677d2d9 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/projects/dialog/project-delete-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/projects/dialog/project-delete-dialog.component.ts @@ -9,8 +9,8 @@ import { } from "@angular/forms"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { ProjectListView } from "../../models/view/project-list.view"; import { diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/projects/dialog/project-dialog.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/projects/dialog/project-dialog.component.ts index 842c153692e..42ec8ef02f6 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/projects/dialog/project-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/projects/dialog/project-dialog.component.ts @@ -3,8 +3,8 @@ import { Component, Inject, OnInit } from "@angular/core"; import { FormControl, FormGroup, Validators } from "@angular/forms"; import { Router } from "@angular/router"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { BitValidators } from "@bitwarden/components"; import { ProjectView } from "../../models/view/project.view"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/projects/models/requests/project.request.ts b/bitwarden_license/bit-web/src/app/secrets-manager/projects/models/requests/project.request.ts index 994c12e927f..8e9f2c72c10 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/projects/models/requests/project.request.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/projects/models/requests/project.request.ts @@ -1,4 +1,4 @@ -import { EncString } from "@bitwarden/common/models/domain/enc-string"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; export class ProjectRequest { name: EncString; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/projects/project.service.ts b/bitwarden_license/bit-web/src/app/secrets-manager/projects/project.service.ts index 513601c5ba0..d3051916ccf 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/projects/project.service.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/projects/project.service.ts @@ -2,11 +2,11 @@ import { Injectable } from "@angular/core"; import { Subject } from "rxjs"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { EncryptService } from "@bitwarden/common/abstractions/encrypt.service"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; import { ListResponse } from "@bitwarden/common/models/response/list.response"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EncryptService } from "@bitwarden/common/platform/abstractions/encrypt.service"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { ProjectListView } from "../models/view/project-list.view"; import { ProjectView } from "../models/view/project.view"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project-people.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project-people.component.ts index d5129815bf3..eee12368800 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project-people.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project-people.component.ts @@ -3,7 +3,7 @@ import { ActivatedRoute } from "@angular/router"; import { map, Observable, share, startWith, Subject, switchMap, takeUntil } from "rxjs"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { SelectItemView } from "@bitwarden/components"; import { diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project-secrets.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project-secrets.component.ts index 905b68cf037..c9ecbb3e378 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project-secrets.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project-secrets.component.ts @@ -3,8 +3,8 @@ import { ActivatedRoute } from "@angular/router"; import { combineLatest, combineLatestWith, filter, Observable, startWith, switchMap } from "rxjs"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { ProjectView } from "../../models/view/project.view"; import { SecretListView } from "../../models/view/secret-list.view"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project-service-accounts.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project-service-accounts.component.ts index 19105c6cf88..d64aec5f31d 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project-service-accounts.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project-service-accounts.component.ts @@ -2,7 +2,7 @@ import { Component, OnDestroy, OnInit } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { map, Observable, startWith, Subject, switchMap, takeUntil } from "rxjs"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { SelectItemView } from "@bitwarden/components"; import { diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project.component.ts index 0fef75daf2e..d60b3209b1f 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project.component.ts @@ -13,8 +13,8 @@ import { } from "rxjs"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { ProjectView } from "../../models/view/project.view"; import { diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-delete.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-delete.component.ts index de06e6c926a..8ee0d192e4f 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-delete.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-delete.component.ts @@ -2,8 +2,8 @@ import { DialogRef, DIALOG_DATA } from "@angular/cdk/dialog"; import { Component, Inject } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SecretListView } from "../../models/view/secret-list.view"; import { diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-dialog.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-dialog.component.ts index ace5e5d2cab..4bf9bd6f768 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-dialog.component.ts @@ -4,10 +4,10 @@ import { FormControl, FormGroup, Validators } from "@angular/forms"; import { lastValueFrom, Subject, takeUntil } from "rxjs"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { BitValidators } from "@bitwarden/components"; import { ProjectListView } from "../../models/view/project-list.view"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/secrets/secret.service.ts b/bitwarden_license/bit-web/src/app/secrets-manager/secrets/secret.service.ts index 0acc292b9c1..faa80f061da 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/secrets/secret.service.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/secrets/secret.service.ts @@ -2,10 +2,10 @@ import { Injectable } from "@angular/core"; import { Subject } from "rxjs"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { EncryptService } from "@bitwarden/common/abstractions/encrypt.service"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EncryptService } from "@bitwarden/common/platform/abstractions/encrypt.service"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { SecretListView } from "../models/view/secret-list.view"; import { SecretProjectView } from "../models/view/secret-project.view"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/secrets/secrets.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/secrets/secrets.component.ts index 940823ea62c..dfa489d4910 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/secrets/secrets.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/secrets/secrets.component.ts @@ -3,8 +3,8 @@ import { ActivatedRoute } from "@angular/router"; import { combineLatestWith, Observable, startWith, switchMap } from "rxjs"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SecretListView } from "../models/view/secret-list.view"; import { SecretsListComponent } from "../shared/secrets-list.component"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/access-tokens.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/access-tokens.component.ts index e6eadd9e927..4e088c5a3c9 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/access-tokens.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/access-tokens.component.ts @@ -4,8 +4,8 @@ import { combineLatestWith, Observable, startWith, switchMap } from "rxjs"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { UserVerificationPromptComponent } from "@bitwarden/web-vault/app/shared/components/user-verification"; import { AccessTokenView } from "../models/view/access-token.view"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/access.service.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/access.service.ts index 92b248999f7..75b6473fd1c 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/access.service.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/access.service.ts @@ -2,13 +2,13 @@ import { Injectable } from "@angular/core"; import { Subject } from "rxjs"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { EncryptService } from "@bitwarden/common/abstractions/encrypt.service"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; import { ListResponse } from "@bitwarden/common/models/response/list.response"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EncryptService } from "@bitwarden/common/platform/abstractions/encrypt.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { AccessTokenRequest } from "../models/requests/access-token.request"; import { RevokeAccessTokensRequest } from "../models/requests/revoke-access-tokens.request"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/dialogs/access-token-create-dialog.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/dialogs/access-token-create-dialog.component.ts index ba9f2e8f946..ded295025bc 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/dialogs/access-token-create-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/dialogs/access-token-create-dialog.component.ts @@ -3,7 +3,7 @@ import { Component, Inject, OnInit } from "@angular/core"; import { FormControl, FormGroup, Validators } from "@angular/forms"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { BitValidators } from "@bitwarden/components"; import { ServiceAccountView } from "../../../models/view/service-account.view"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/dialogs/access-token-dialog.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/dialogs/access-token-dialog.component.ts index 505f48c88f3..4244c4aa50a 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/dialogs/access-token-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/dialogs/access-token-dialog.component.ts @@ -1,8 +1,8 @@ import { DialogRef, DIALOG_DATA } from "@angular/cdk/dialog"; import { Component, Inject, OnInit } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; export interface AccessTokenDetails { subTitle: string; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-delete-dialog.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-delete-dialog.component.ts index da75b61c7aa..69ad03e9121 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-delete-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-delete-dialog.component.ts @@ -9,8 +9,8 @@ import { } from "@angular/forms"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { ServiceAccountView } from "../../models/view/service-account.view"; import { diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.ts index fb0f56a8139..68efb9e475d 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.ts @@ -2,8 +2,8 @@ import { DialogRef, DIALOG_DATA } from "@angular/cdk/dialog"; import { Component, Inject } from "@angular/core"; import { FormControl, FormGroup, Validators } from "@angular/forms"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { BitValidators } from "@bitwarden/components"; import { ServiceAccountView } from "../../models/view/service-account.view"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/models/requests/access-token.request.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/models/requests/access-token.request.ts index c570d3d2051..3801e7398fe 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/models/requests/access-token.request.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/models/requests/access-token.request.ts @@ -1,4 +1,4 @@ -import { EncString } from "@bitwarden/common/models/domain/enc-string"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; export class AccessTokenRequest { name: EncString; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/models/requests/service-account.request.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/models/requests/service-account.request.ts index 8c62324a783..47221b2b82a 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/models/requests/service-account.request.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/models/requests/service-account.request.ts @@ -1,4 +1,4 @@ -import { EncString } from "@bitwarden/common/models/domain/enc-string"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; export class ServiceAccountRequest { name: EncString; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/people/service-account-people.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/people/service-account-people.component.ts index e346d25871e..ba4b59abcf9 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/people/service-account-people.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/people/service-account-people.component.ts @@ -16,8 +16,8 @@ import { DialogServiceAbstraction, SimpleDialogOptions, } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { SelectItemView } from "@bitwarden/components/src/multi-select/models/select-item-view"; import { diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/projects/service-account-projects.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/projects/service-account-projects.component.ts index 87e88082799..ecce07aef5f 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/projects/service-account-projects.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/projects/service-account-projects.component.ts @@ -2,7 +2,7 @@ import { Component } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { combineLatestWith, map, Observable, startWith, Subject, switchMap, takeUntil } from "rxjs"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { SelectItemView } from "@bitwarden/components/src/multi-select/models/select-item-view"; import { ServiceAccountProjectAccessPolicyView } from "../../models/view/access-policy.view"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-account.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-account.component.ts index cc0c3a4d88f..98d316467db 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-account.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-account.component.ts @@ -12,8 +12,8 @@ import { } from "rxjs"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { AccessTokenCreateDialogComponent } from "./access/dialogs/access-token-create-dialog.component"; import { ServiceAccountService } from "./service-account.service"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-account.service.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-account.service.ts index ba6c71beb1c..1faf0ff1933 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-account.service.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-account.service.ts @@ -2,11 +2,11 @@ import { Injectable } from "@angular/core"; import { Subject } from "rxjs"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { EncryptService } from "@bitwarden/common/abstractions/encrypt.service"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; import { ListResponse } from "@bitwarden/common/models/response/list.response"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EncryptService } from "@bitwarden/common/platform/abstractions/encrypt.service"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { ServiceAccountView } from "../models/view/service-account.view"; import { BulkOperationStatus } from "../shared/dialogs/bulk-status-dialog.component"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.ts index 5bc0b1e7f97..3ff6ad760e7 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.ts @@ -2,8 +2,8 @@ import { SelectionModel } from "@angular/cdk/collections"; import { Component, EventEmitter, Input, OnDestroy, Output } from "@angular/core"; import { Subject, takeUntil } from "rxjs"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { TableDataSource } from "@bitwarden/components"; import { ServiceAccountView } from "../models/view/service-account.view"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/settings/dialog/sm-import-error-dialog.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/settings/dialog/sm-import-error-dialog.component.ts index 59133c614b8..81aad270f6c 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/settings/dialog/sm-import-error-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/settings/dialog/sm-import-error-dialog.component.ts @@ -1,7 +1,7 @@ import { DialogRef, DIALOG_DATA } from "@angular/cdk/dialog"; import { Component, Inject } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { SecretsManagerImportError } from "../models/error/sm-import-error"; import { SecretsManagerImportErrorLine } from "../models/error/sm-import-error-line"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/settings/models/requests/sm-imported-project.request.ts b/bitwarden_license/bit-web/src/app/secrets-manager/settings/models/requests/sm-imported-project.request.ts index ff509e084ff..bee91972bb8 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/settings/models/requests/sm-imported-project.request.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/settings/models/requests/sm-imported-project.request.ts @@ -1,4 +1,4 @@ -import { EncString } from "@bitwarden/common/models/domain/enc-string"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; export class SecretsManagerImportedProjectRequest { id: string; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/settings/models/requests/sm-imported-secret.request.ts b/bitwarden_license/bit-web/src/app/secrets-manager/settings/models/requests/sm-imported-secret.request.ts index e6e73b7fe24..55c5382b3ad 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/settings/models/requests/sm-imported-secret.request.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/settings/models/requests/sm-imported-secret.request.ts @@ -1,4 +1,4 @@ -import { EncString } from "@bitwarden/common/models/domain/enc-string"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; export class SecretsManagerImportedSecretRequest { id: string; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/settings/porting/sm-export.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/settings/porting/sm-export.component.ts index 6032d3981d9..492207415af 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/settings/porting/sm-export.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/settings/porting/sm-export.component.ts @@ -4,11 +4,11 @@ import { ActivatedRoute } from "@angular/router"; import { Subject, switchMap, takeUntil } from "rxjs"; import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { UserVerificationPromptComponent } from "@bitwarden/web-vault/app/shared/components/user-verification"; import { SecretsManagerPortingApiService } from "../services/sm-porting-api.service"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/settings/porting/sm-import.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/settings/porting/sm-import.component.ts index 0a9279b3301..ffa1024c8e6 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/settings/porting/sm-import.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/settings/porting/sm-import.component.ts @@ -4,11 +4,11 @@ import { ActivatedRoute } from "@angular/router"; import { Subject, takeUntil } from "rxjs"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SecretsManagerImportErrorDialogComponent, diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/settings/services/sm-porting-api.service.ts b/bitwarden_license/bit-web/src/app/secrets-manager/settings/services/sm-porting-api.service.ts index 5add06e363e..41d75e8c639 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/settings/services/sm-porting-api.service.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/settings/services/sm-porting-api.service.ts @@ -1,11 +1,11 @@ import { Injectable } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { EncryptService } from "@bitwarden/common/abstractions/encrypt.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EncryptService } from "@bitwarden/common/platform/abstractions/encrypt.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; import { SecretsManagerImportError } from "../models/error/sm-import-error"; import { SecretsManagerImportRequest } from "../models/requests/sm-import.request"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/settings/services/sm-porting.service.ts b/bitwarden_license/bit-web/src/app/secrets-manager/settings/services/sm-porting.service.ts index eb92a4a58be..8f29e38a9e5 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/settings/services/sm-porting.service.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/settings/services/sm-porting.service.ts @@ -2,7 +2,7 @@ import { formatDate } from "@angular/common"; import { Injectable } from "@angular/core"; import { firstValueFrom } from "rxjs"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @Injectable({ providedIn: "root", diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/shared/access-policies/access-policy.service.ts b/bitwarden_license/bit-web/src/app/secrets-manager/shared/access-policies/access-policy.service.ts index 1157f4878fc..c9b51b382ad 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/shared/access-policies/access-policy.service.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/shared/access-policies/access-policy.service.ts @@ -2,12 +2,12 @@ import { Injectable } from "@angular/core"; import { Subject } from "rxjs"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { EncryptService } from "@bitwarden/common/abstractions/encrypt.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; import { ListResponse } from "@bitwarden/common/models/response/list.response"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EncryptService } from "@bitwarden/common/platform/abstractions/encrypt.service"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { BaseAccessPolicyView, diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/shared/access-policies/access-selector.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/shared/access-policies/access-selector.component.ts index 96915dc419c..942d14df48b 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/shared/access-policies/access-selector.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/shared/access-policies/access-selector.component.ts @@ -12,7 +12,7 @@ import { tap, } from "rxjs"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { SelectItemView } from "@bitwarden/components/src/multi-select/models/select-item-view"; import { BaseAccessPolicyView } from "../../models/view/access-policy.view"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/shared/header.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/shared/header.component.ts index 8c9110a3a65..999a53081b7 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/shared/header.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/shared/header.component.ts @@ -2,9 +2,9 @@ import { Component, Input } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { combineLatest, map, Observable } from "rxjs"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; -import { AccountProfile } from "@bitwarden/common/models/domain/account"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { AccountProfile } from "@bitwarden/common/platform/models/domain/account"; @Component({ selector: "sm-header", diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/shared/header.stories.ts b/bitwarden_license/bit-web/src/app/secrets-manager/shared/header.stories.ts index 508573d4669..9ade2c1bec3 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/shared/header.stories.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/shared/header.stories.ts @@ -4,14 +4,14 @@ import { Meta, Story, moduleMetadata, - componentWrapperDecorator, applicationConfig, + componentWrapperDecorator, } from "@storybook/angular"; import { BehaviorSubject, combineLatest, map } from "rxjs"; import { JslibModule } from "@bitwarden/angular/jslib.module"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { AvatarModule, BreadcrumbsModule, @@ -24,7 +24,7 @@ import { TypographyModule, InputModule, } from "@bitwarden/components"; -import { PreloadedEnglishI18nModule } from "@bitwarden/web-vault/app/tests/preloaded-english-i18n.module"; +import { PreloadedEnglishI18nModule } from "@bitwarden/web-vault/app/core/tests"; import { HeaderComponent } from "./header.component"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/shared/projects-list.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/shared/projects-list.component.ts index e327547c6d8..2c4836934df 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/shared/projects-list.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/shared/projects-list.component.ts @@ -2,8 +2,8 @@ import { SelectionModel } from "@angular/cdk/collections"; import { Component, EventEmitter, Input, Output } from "@angular/core"; import { map } from "rxjs"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { TableDataSource } from "@bitwarden/components"; import { ProjectListView } from "../models/view/project-list.view"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.ts index ec0be650d6e..301a4f9c2ad 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.ts @@ -2,8 +2,8 @@ import { SelectionModel } from "@angular/cdk/collections"; import { Component, EventEmitter, Input, OnDestroy, Output } from "@angular/core"; import { Subject, takeUntil } from "rxjs"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { TableDataSource } from "@bitwarden/components"; import { SecretListView } from "../models/view/secret-list.view"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/trash/dialog/secret-hard-delete.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/trash/dialog/secret-hard-delete.component.ts index 6787a81c9c8..bdc0b94f745 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/trash/dialog/secret-hard-delete.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/trash/dialog/secret-hard-delete.component.ts @@ -1,8 +1,8 @@ import { DialogRef, DIALOG_DATA } from "@angular/cdk/dialog"; import { Component, Inject } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SecretService } from "../../secrets/secret.service"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/trash/dialog/secret-restore.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/trash/dialog/secret-restore.component.ts index 99dce75f575..06fc20ca827 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/trash/dialog/secret-restore.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/trash/dialog/secret-restore.component.ts @@ -1,8 +1,8 @@ import { DialogRef, DIALOG_DATA } from "@angular/cdk/dialog"; import { Component, Inject } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SecretService } from "../../secrets/secret.service"; diff --git a/libs/angular/src/admin-console/components/collections.component.ts b/libs/angular/src/admin-console/components/collections.component.ts index c26d3b930ac..d56d111e071 100644 --- a/libs/angular/src/admin-console/components/collections.component.ts +++ b/libs/angular/src/admin-console/components/collections.component.ts @@ -1,10 +1,10 @@ import { Directive, EventEmitter, Input, OnInit, Output } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { Cipher } from "@bitwarden/common/vault/models/domain/cipher"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; diff --git a/libs/angular/src/auth/components/captcha-protected.component.ts b/libs/angular/src/auth/components/captcha-protected.component.ts index 0783b2605b7..621c6e9c7b5 100644 --- a/libs/angular/src/auth/components/captcha-protected.component.ts +++ b/libs/angular/src/auth/components/captcha-protected.component.ts @@ -1,10 +1,10 @@ import { Directive, Input } from "@angular/core"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { CaptchaIFrame } from "@bitwarden/common/auth/captcha-iframe"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; @Directive() export abstract class CaptchaProtectedComponent { diff --git a/libs/angular/src/auth/components/change-password.component.ts b/libs/angular/src/auth/components/change-password.component.ts index 18e98242b21..2e440b984d3 100644 --- a/libs/angular/src/auth/components/change-password.component.ts +++ b/libs/angular/src/auth/components/change-password.component.ts @@ -1,18 +1,18 @@ import { Directive, OnDestroy, OnInit } from "@angular/core"; import { Subject, takeUntil } from "rxjs"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { MasterPasswordPolicyOptions } from "@bitwarden/common/admin-console/models/domain/master-password-policy-options"; import { KdfConfig } from "@bitwarden/common/auth/models/domain/kdf-config"; import { KdfType } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { DialogServiceAbstraction, SimpleDialogType } from "../../services/dialog"; diff --git a/libs/angular/src/auth/components/environment-selector.component.ts b/libs/angular/src/auth/components/environment-selector.component.ts index d35347c1479..90d958221e4 100644 --- a/libs/angular/src/auth/components/environment-selector.component.ts +++ b/libs/angular/src/auth/components/environment-selector.component.ts @@ -4,9 +4,9 @@ import { Component, EventEmitter, OnDestroy, OnInit, Output } from "@angular/cor import { Router } from "@angular/router"; import { Subject, takeUntil } from "rxjs"; -import { ConfigServiceAbstraction } from "@bitwarden/common/abstractions/config/config.service.abstraction"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; +import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; @Component({ selector: "environment-selector", diff --git a/libs/angular/src/auth/components/hint.component.ts b/libs/angular/src/auth/components/hint.component.ts index bfa5d3b92ef..92875a345ff 100644 --- a/libs/angular/src/auth/components/hint.component.ts +++ b/libs/angular/src/auth/components/hint.component.ts @@ -2,11 +2,11 @@ import { Directive, OnInit } from "@angular/core"; import { Router } from "@angular/router"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; import { PasswordHintRequest } from "@bitwarden/common/auth/models/request/password-hint.request"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Directive() export class HintComponent implements OnInit { diff --git a/libs/angular/src/auth/components/lock.component.ts b/libs/angular/src/auth/components/lock.component.ts index 77957ff4fea..9114539d7a8 100644 --- a/libs/angular/src/auth/components/lock.component.ts +++ b/libs/angular/src/auth/components/lock.component.ts @@ -4,13 +4,6 @@ import { firstValueFrom, Subject } from "rxjs"; import { concatMap, take, takeUntil } from "rxjs/operators"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; @@ -21,9 +14,16 @@ import { ForceResetPasswordReason } from "@bitwarden/common/auth/models/domain/f import { SecretVerificationRequest } from "@bitwarden/common/auth/models/request/secret-verification.request"; import { MasterPasswordPolicyResponse } from "@bitwarden/common/auth/models/response/master-password-policy.response"; import { HashPurpose, KeySuffixOptions } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { DialogServiceAbstraction, SimpleDialogType } from "../../services/dialog"; diff --git a/libs/angular/src/auth/components/login-with-device.component.ts b/libs/angular/src/auth/components/login-with-device.component.ts index d2ed9f02a45..7af5afeca7a 100644 --- a/libs/angular/src/auth/components/login-with-device.component.ts +++ b/libs/angular/src/auth/components/login-with-device.component.ts @@ -4,15 +4,6 @@ import { Subject, takeUntil } from "rxjs"; import { AnonymousHubService } from "@bitwarden/common/abstractions/anonymousHub.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { AppIdService } from "@bitwarden/common/abstractions/appId.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; import { AuthRequestType } from "@bitwarden/common/auth/enums/auth-request-type"; @@ -20,9 +11,18 @@ import { ForceResetPasswordReason } from "@bitwarden/common/auth/models/domain/f import { PasswordlessLogInCredentials } from "@bitwarden/common/auth/models/domain/log-in-credentials"; import { PasswordlessCreateAuthRequest } from "@bitwarden/common/auth/models/request/passwordless-create-auth.request"; import { AuthRequestResponse } from "@bitwarden/common/auth/models/response/auth-request.response"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; +import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { CaptchaProtectedComponent } from "./captcha-protected.component"; diff --git a/libs/angular/src/auth/components/login.component.ts b/libs/angular/src/auth/components/login.component.ts index 9dc6ca2f7a9..cdb8f303699 100644 --- a/libs/angular/src/auth/components/login.component.ts +++ b/libs/angular/src/auth/components/login.component.ts @@ -3,24 +3,24 @@ import { FormBuilder, Validators } from "@angular/forms"; import { ActivatedRoute, Router } from "@angular/router"; import { take } from "rxjs/operators"; -import { AppIdService } from "@bitwarden/common/abstractions/appId.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; import { DevicesApiServiceAbstraction } from "@bitwarden/common/abstractions/devices/devices-api.service.abstraction"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { - AllValidationErrors, - FormValidationErrorsService, -} from "@bitwarden/common/abstractions/formValidationErrors.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; import { AuthResult } from "@bitwarden/common/auth/models/domain/auth-result"; import { ForceResetPasswordReason } from "@bitwarden/common/auth/models/domain/force-reset-password-reason"; import { PasswordLogInCredentials } from "@bitwarden/common/auth/models/domain/log-in-credentials"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { + AllValidationErrors, + FormValidationErrorsService, +} from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { CaptchaProtectedComponent } from "./captcha-protected.component"; diff --git a/libs/angular/src/auth/components/remove-password.component.ts b/libs/angular/src/auth/components/remove-password.component.ts index c53196feaff..444973f2d53 100644 --- a/libs/angular/src/auth/components/remove-password.component.ts +++ b/libs/angular/src/auth/components/remove-password.component.ts @@ -1,12 +1,12 @@ import { Directive, OnInit } from "@angular/core"; import { Router } from "@angular/router"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { DialogServiceAbstraction, SimpleDialogType } from "../../services/dialog"; diff --git a/libs/angular/src/auth/components/sso.component.ts b/libs/angular/src/auth/components/sso.component.ts index 83c6494ace0..93f40d861d8 100644 --- a/libs/angular/src/auth/components/sso.component.ts +++ b/libs/angular/src/auth/components/sso.component.ts @@ -3,18 +3,18 @@ import { ActivatedRoute, Router } from "@angular/router"; import { first } from "rxjs/operators"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { AuthResult } from "@bitwarden/common/auth/models/domain/auth-result"; import { ForceResetPasswordReason } from "@bitwarden/common/auth/models/domain/force-reset-password-reason"; import { SsoLogInCredentials } from "@bitwarden/common/auth/models/domain/log-in-credentials"; import { SsoPreValidateResponse } from "@bitwarden/common/auth/models/response/sso-pre-validate.response"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; @Directive() diff --git a/libs/angular/src/auth/components/two-factor-options.component.ts b/libs/angular/src/auth/components/two-factor-options.component.ts index 3b18a5c2f7a..a7d8a3235e3 100644 --- a/libs/angular/src/auth/components/two-factor-options.component.ts +++ b/libs/angular/src/auth/components/two-factor-options.component.ts @@ -1,10 +1,10 @@ import { Directive, EventEmitter, OnInit, Output } from "@angular/core"; import { Router } from "@angular/router"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { TwoFactorService } from "@bitwarden/common/auth/abstractions/two-factor.service"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Directive() export class TwoFactorOptionsComponent implements OnInit { diff --git a/libs/angular/src/auth/components/two-factor.component.ts b/libs/angular/src/auth/components/two-factor.component.ts index 11b7c9bbac5..fa7aa66f9f5 100644 --- a/libs/angular/src/auth/components/two-factor.component.ts +++ b/libs/angular/src/auth/components/two-factor.component.ts @@ -4,12 +4,6 @@ import * as DuoWebSDK from "duo_web_sdk"; import { first } from "rxjs/operators"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { AppIdService } from "@bitwarden/common/abstractions/appId.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; import { TwoFactorService } from "@bitwarden/common/auth/abstractions/two-factor.service"; @@ -20,6 +14,12 @@ import { TokenTwoFactorRequest } from "@bitwarden/common/auth/models/request/ide import { TwoFactorEmailRequest } from "@bitwarden/common/auth/models/request/two-factor-email.request"; import { TwoFactorProviders } from "@bitwarden/common/auth/services/two-factor.service"; import { WebAuthnIFrame } from "@bitwarden/common/auth/webauthn-iframe"; +import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { CaptchaProtectedComponent } from "./captcha-protected.component"; diff --git a/libs/angular/src/auth/components/update-password.component.ts b/libs/angular/src/auth/components/update-password.component.ts index f0389951787..9a6e98156a6 100644 --- a/libs/angular/src/auth/components/update-password.component.ts +++ b/libs/angular/src/auth/components/update-password.component.ts @@ -2,19 +2,19 @@ import { Directive } from "@angular/core"; import { Router } from "@angular/router"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { MasterPasswordPolicyOptions } from "@bitwarden/common/admin-console/models/domain/master-password-policy-options"; import { VerificationType } from "@bitwarden/common/auth/enums/verification-type"; import { PasswordRequest } from "@bitwarden/common/auth/models/request/password.request"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { Verification } from "@bitwarden/common/types/verification"; diff --git a/libs/angular/src/auth/components/update-temp-password.component.ts b/libs/angular/src/auth/components/update-temp-password.component.ts index 9899b2db273..34833c3bbf3 100644 --- a/libs/angular/src/auth/components/update-temp-password.component.ts +++ b/libs/angular/src/auth/components/update-temp-password.component.ts @@ -2,12 +2,6 @@ import { Directive } from "@angular/core"; import { Router } from "@angular/router"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { MasterPasswordPolicyOptions } from "@bitwarden/common/admin-console/models/domain/master-password-policy-options"; @@ -15,8 +9,14 @@ import { VerificationType } from "@bitwarden/common/auth/enums/verification-type import { ForceResetPasswordReason } from "@bitwarden/common/auth/models/domain/force-reset-password-reason"; import { PasswordRequest } from "@bitwarden/common/auth/models/request/password.request"; import { UpdateTempPasswordRequest } from "@bitwarden/common/auth/models/request/update-temp-password.request"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { Verification } from "@bitwarden/common/types/verification"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; diff --git a/libs/angular/src/auth/components/user-verification-prompt.component.ts b/libs/angular/src/auth/components/user-verification-prompt.component.ts index 842d9e12229..1a10c96cf5d 100644 --- a/libs/angular/src/auth/components/user-verification-prompt.component.ts +++ b/libs/angular/src/auth/components/user-verification-prompt.component.ts @@ -1,9 +1,9 @@ import { Directive } from "@angular/core"; import { FormBuilder, FormControl } from "@angular/forms"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { ModalRef } from "../../components/modal/modal.ref"; import { ModalConfig } from "../../services/modal.service"; diff --git a/libs/angular/src/auth/components/user-verification.component.ts b/libs/angular/src/auth/components/user-verification.component.ts index ea514e177c8..5f9d62c3dc8 100644 --- a/libs/angular/src/auth/components/user-verification.component.ts +++ b/libs/angular/src/auth/components/user-verification.component.ts @@ -4,7 +4,7 @@ import { ControlValueAccessor, FormControl } from "@angular/forms"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; import { VerificationType } from "@bitwarden/common/auth/enums/verification-type"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { Verification } from "@bitwarden/common/types/verification"; /** diff --git a/libs/angular/src/auth/guards/auth.guard.ts b/libs/angular/src/auth/guards/auth.guard.ts index 2a7e0554762..b8535da9371 100644 --- a/libs/angular/src/auth/guards/auth.guard.ts +++ b/libs/angular/src/auth/guards/auth.guard.ts @@ -1,12 +1,12 @@ import { Injectable } from "@angular/core"; import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from "@angular/router"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; import { ForceResetPasswordReason } from "@bitwarden/common/auth/models/domain/force-reset-password-reason"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Injectable() export class AuthGuard implements CanActivate { diff --git a/libs/angular/src/components/callout.component.ts b/libs/angular/src/components/callout.component.ts index 0edaafe17ce..c595beec196 100644 --- a/libs/angular/src/components/callout.component.ts +++ b/libs/angular/src/components/callout.component.ts @@ -1,7 +1,7 @@ import { Component, Input, OnInit } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { MasterPasswordPolicyOptions } from "@bitwarden/common/admin-console/models/domain/master-password-policy-options"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @Component({ selector: "app-callout", diff --git a/libs/angular/src/components/environment.component.ts b/libs/angular/src/components/environment.component.ts index f47fcf91247..ed3e000624f 100644 --- a/libs/angular/src/components/environment.component.ts +++ b/libs/angular/src/components/environment.component.ts @@ -1,8 +1,8 @@ import { Directive, EventEmitter, Output } from "@angular/core"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { ModalService } from "../services/modal.service"; diff --git a/libs/angular/src/components/register.component.ts b/libs/angular/src/components/register.component.ts index cb5ba243d99..ac28dc6803b 100644 --- a/libs/angular/src/components/register.component.ts +++ b/libs/angular/src/components/register.component.ts @@ -4,24 +4,24 @@ import { Router } from "@angular/router"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { - AllValidationErrors, - FormValidationErrorsService, -} from "@bitwarden/common/abstractions/formValidationErrors.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { PasswordLogInCredentials } from "@bitwarden/common/auth/models/domain/log-in-credentials"; import { RegisterResponse } from "@bitwarden/common/auth/models/response/register.response"; import { DEFAULT_KDF_CONFIG, DEFAULT_KDF_TYPE } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; import { KeysRequest } from "@bitwarden/common/models/request/keys.request"; import { ReferenceEventRequest } from "@bitwarden/common/models/request/reference-event.request"; import { RegisterRequest } from "@bitwarden/common/models/request/register.request"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { + AllValidationErrors, + FormValidationErrorsService, +} from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { CaptchaProtectedComponent } from "../auth/components/captcha-protected.component"; diff --git a/libs/angular/src/components/set-password.component.ts b/libs/angular/src/components/set-password.component.ts index 1a2b4a91522..a4ae3edb80a 100644 --- a/libs/angular/src/components/set-password.component.ts +++ b/libs/angular/src/components/set-password.component.ts @@ -3,22 +3,22 @@ import { ActivatedRoute, Router } from "@angular/router"; import { first } from "rxjs/operators"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; import { OrganizationUserResetPasswordEnrollmentRequest } from "@bitwarden/common/abstractions/organization-user/requests"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { SetPasswordRequest } from "@bitwarden/common/auth/models/request/set-password.request"; import { HashPurpose, DEFAULT_KDF_TYPE, DEFAULT_KDF_CONFIG } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; import { KeysRequest } from "@bitwarden/common/models/request/keys.request"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; diff --git a/libs/angular/src/components/set-pin.component.ts b/libs/angular/src/components/set-pin.component.ts index 74461d72dff..af00980f156 100644 --- a/libs/angular/src/components/set-pin.component.ts +++ b/libs/angular/src/components/set-pin.component.ts @@ -1,9 +1,9 @@ import { Directive, OnInit } from "@angular/core"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { ModalRef } from "./modal/modal.ref"; diff --git a/libs/angular/src/components/settings/vault-timeout-input.component.ts b/libs/angular/src/components/settings/vault-timeout-input.component.ts index 8ac3074a4cd..1bec3e1e396 100644 --- a/libs/angular/src/components/settings/vault-timeout-input.component.ts +++ b/libs/angular/src/components/settings/vault-timeout-input.component.ts @@ -8,10 +8,10 @@ import { } from "@angular/forms"; import { filter, Subject, takeUntil } from "rxjs"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { Policy } from "@bitwarden/common/admin-console/models/domain/policy"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @Directive() export class VaultTimeoutInputComponent diff --git a/libs/angular/src/components/share.component.ts b/libs/angular/src/components/share.component.ts index 286e4da00db..5c8224eaddc 100644 --- a/libs/angular/src/components/share.component.ts +++ b/libs/angular/src/components/share.component.ts @@ -1,15 +1,15 @@ import { Directive, EventEmitter, Input, OnDestroy, OnInit, Output } from "@angular/core"; import { firstValueFrom, map, Observable, Subject, takeUntil } from "rxjs"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { OrganizationUserStatusType } from "@bitwarden/common/admin-console/enums"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { Checkable, isChecked } from "@bitwarden/common/types/checkable"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; diff --git a/libs/angular/src/directives/api-action.directive.ts b/libs/angular/src/directives/api-action.directive.ts index a156b3c78fe..4ace69d7d75 100644 --- a/libs/angular/src/directives/api-action.directive.ts +++ b/libs/angular/src/directives/api-action.directive.ts @@ -1,8 +1,8 @@ import { Directive, ElementRef, Input, OnChanges } from "@angular/core"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; /** * Provides error handling, in particular for any error returned by the server in an api call. diff --git a/libs/angular/src/directives/autofocus.directive.ts b/libs/angular/src/directives/autofocus.directive.ts index 168cd1cc211..c45dc0f8f45 100644 --- a/libs/angular/src/directives/autofocus.directive.ts +++ b/libs/angular/src/directives/autofocus.directive.ts @@ -1,7 +1,7 @@ import { Directive, ElementRef, Input, NgZone } from "@angular/core"; import { take } from "rxjs/operators"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; @Directive({ selector: "[appAutofocus]", diff --git a/libs/angular/src/directives/copy-click.directive.ts b/libs/angular/src/directives/copy-click.directive.ts index a735896211d..5e449572bf8 100644 --- a/libs/angular/src/directives/copy-click.directive.ts +++ b/libs/angular/src/directives/copy-click.directive.ts @@ -1,6 +1,6 @@ import { Directive, HostListener, Input } from "@angular/core"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Directive({ selector: "[appCopyClick]", diff --git a/libs/angular/src/directives/launch-click.directive.ts b/libs/angular/src/directives/launch-click.directive.ts index 547af519442..e748afabf49 100644 --- a/libs/angular/src/directives/launch-click.directive.ts +++ b/libs/angular/src/directives/launch-click.directive.ts @@ -1,7 +1,7 @@ import { Directive, HostListener, Input } from "@angular/core"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; @Directive({ selector: "[appLaunchClick]", diff --git a/libs/angular/src/directives/not-premium.directive.ts b/libs/angular/src/directives/not-premium.directive.ts index b25615a8edb..ad7f4a7b47f 100644 --- a/libs/angular/src/directives/not-premium.directive.ts +++ b/libs/angular/src/directives/not-premium.directive.ts @@ -1,6 +1,6 @@ import { Directive, OnInit, TemplateRef, ViewContainerRef } from "@angular/core"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; /** * Hides the element if the user has premium. diff --git a/libs/angular/src/directives/premium.directive.ts b/libs/angular/src/directives/premium.directive.ts index 8729fea2450..ca9f36bc694 100644 --- a/libs/angular/src/directives/premium.directive.ts +++ b/libs/angular/src/directives/premium.directive.ts @@ -1,6 +1,6 @@ import { Directive, OnInit, TemplateRef, ViewContainerRef } from "@angular/core"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; /** * Only shows the element if the user has premium. diff --git a/libs/angular/src/directives/select-copy.directive.ts b/libs/angular/src/directives/select-copy.directive.ts index 8d894b14d56..908418c26fe 100644 --- a/libs/angular/src/directives/select-copy.directive.ts +++ b/libs/angular/src/directives/select-copy.directive.ts @@ -1,6 +1,6 @@ import { Directive, ElementRef, HostListener } from "@angular/core"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @Directive({ selector: "[appSelectCopy]", diff --git a/libs/angular/src/jslib.module.ts b/libs/angular/src/jslib.module.ts index dac7a0779ea..bfe8f758f92 100644 --- a/libs/angular/src/jslib.module.ts +++ b/libs/angular/src/jslib.module.ts @@ -20,12 +20,12 @@ import { StopClickDirective } from "./directives/stop-click.directive"; import { StopPropDirective } from "./directives/stop-prop.directive"; import { TrueFalseValueDirective } from "./directives/true-false-value.directive"; import { CreditCardNumberPipe } from "./pipes/credit-card-number.pipe"; -import { EllipsisPipe } from "./pipes/ellipsis.pipe"; -import { I18nPipe } from "./pipes/i18n.pipe"; import { SearchCiphersPipe } from "./pipes/search-ciphers.pipe"; import { SearchPipe } from "./pipes/search.pipe"; import { UserNamePipe } from "./pipes/user-name.pipe"; import { UserTypePipe } from "./pipes/user-type.pipe"; +import { EllipsisPipe } from "./platform/pipes/ellipsis.pipe"; +import { I18nPipe } from "./platform/pipes/i18n.pipe"; import { PasswordStrengthComponent } from "./shared/components/password-strength/password-strength.component"; import { ExportScopeCalloutComponent } from "./tools/export/components/export-scope-callout.component"; import { IconComponent } from "./vault/components/icon.component"; diff --git a/libs/angular/src/pipes/color-password.pipe.ts b/libs/angular/src/pipes/color-password.pipe.ts index 2b3a6bdf1ea..ae5791b834b 100644 --- a/libs/angular/src/pipes/color-password.pipe.ts +++ b/libs/angular/src/pipes/color-password.pipe.ts @@ -1,6 +1,6 @@ import { Pipe, PipeTransform } from "@angular/core"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; /* An updated pipe that sanitizes HTML, highlights numbers and special characters (in different colors each) diff --git a/libs/angular/src/pipes/user-type.pipe.ts b/libs/angular/src/pipes/user-type.pipe.ts index cc499f81c9b..49feb3c530d 100644 --- a/libs/angular/src/pipes/user-type.pipe.ts +++ b/libs/angular/src/pipes/user-type.pipe.ts @@ -1,7 +1,7 @@ import { Pipe, PipeTransform } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { OrganizationUserType } from "@bitwarden/common/admin-console/enums"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @Pipe({ name: "userType", diff --git a/libs/angular/src/pipes/ellipsis.pipe.ts b/libs/angular/src/platform/pipes/ellipsis.pipe.ts similarity index 100% rename from libs/angular/src/pipes/ellipsis.pipe.ts rename to libs/angular/src/platform/pipes/ellipsis.pipe.ts diff --git a/libs/angular/src/pipes/i18n.pipe.ts b/libs/angular/src/platform/pipes/i18n.pipe.ts similarity index 80% rename from libs/angular/src/pipes/i18n.pipe.ts rename to libs/angular/src/platform/pipes/i18n.pipe.ts index afab9b8d024..1f92bbb19a4 100644 --- a/libs/angular/src/pipes/i18n.pipe.ts +++ b/libs/angular/src/platform/pipes/i18n.pipe.ts @@ -1,6 +1,6 @@ import { Pipe, PipeTransform } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @Pipe({ name: "i18n", diff --git a/libs/angular/src/services/broadcaster.service.ts b/libs/angular/src/platform/services/broadcaster.service.ts similarity index 77% rename from libs/angular/src/services/broadcaster.service.ts rename to libs/angular/src/platform/services/broadcaster.service.ts index 9f62ecbd10c..cf58d2b311c 100644 --- a/libs/angular/src/services/broadcaster.service.ts +++ b/libs/angular/src/platform/services/broadcaster.service.ts @@ -1,6 +1,6 @@ import { Injectable } from "@angular/core"; -import { BroadcasterService as BaseBroadcasterService } from "@bitwarden/common/services/broadcaster.service"; +import { BroadcasterService as BaseBroadcasterService } from "@bitwarden/common/platform/services/broadcaster.service"; @Injectable() export class BroadcasterService extends BaseBroadcasterService {} diff --git a/libs/angular/src/services/dialog/dialog.service.ts b/libs/angular/src/services/dialog/dialog.service.ts index aaddf651e31..ffd7a09b2c6 100644 --- a/libs/angular/src/services/dialog/dialog.service.ts +++ b/libs/angular/src/services/dialog/dialog.service.ts @@ -9,7 +9,7 @@ import { Overlay, OverlayContainer } from "@angular/cdk/overlay"; import { ComponentType } from "@angular/cdk/portal"; import { Inject, Injectable, Injector, Optional, SkipSelf, TemplateRef } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { DialogServiceAbstraction } from "./dialog.service.abstraction"; import { SimpleDialogOptions } from "./simple-dialog-options"; diff --git a/libs/angular/src/services/injection-tokens.ts b/libs/angular/src/services/injection-tokens.ts index 6ae4f45ea40..270a5dfdf0c 100644 --- a/libs/angular/src/services/injection-tokens.ts +++ b/libs/angular/src/services/injection-tokens.ts @@ -3,8 +3,8 @@ import { InjectionToken } from "@angular/core"; import { AbstractMemoryStorageService, AbstractStorageService, -} from "@bitwarden/common/abstractions/storage.service"; -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; +} from "@bitwarden/common/platform/abstractions/storage.service"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; export const WINDOW = new InjectionToken("WINDOW"); export const MEMORY_STORAGE = new InjectionToken("MEMORY_STORAGE"); diff --git a/libs/angular/src/services/jslib-services.module.ts b/libs/angular/src/services/jslib-services.module.ts index 7ae54c92133..a170389efbe 100644 --- a/libs/angular/src/services/jslib-services.module.ts +++ b/libs/angular/src/services/jslib-services.module.ts @@ -3,24 +3,11 @@ import { LOCALE_ID, NgModule } from "@angular/core"; import { AvatarUpdateService as AccountUpdateServiceAbstraction } from "@bitwarden/common/abstractions/account/avatar-update.service"; import { AnonymousHubService as AnonymousHubServiceAbstraction } from "@bitwarden/common/abstractions/anonymousHub.service"; import { ApiService as ApiServiceAbstraction } from "@bitwarden/common/abstractions/api.service"; -import { AppIdService as AppIdServiceAbstraction } from "@bitwarden/common/abstractions/appId.service"; import { AuditService as AuditServiceAbstraction } from "@bitwarden/common/abstractions/audit.service"; -import { BroadcasterService as BroadcasterServiceAbstraction } from "@bitwarden/common/abstractions/broadcaster.service"; -import { ConfigApiServiceAbstraction } from "@bitwarden/common/abstractions/config/config-api.service.abstraction"; -import { ConfigServiceAbstraction } from "@bitwarden/common/abstractions/config/config.service.abstraction"; -import { CryptoService as CryptoServiceAbstraction } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from "@bitwarden/common/abstractions/cryptoFunction.service"; import { DeviceCryptoServiceAbstraction } from "@bitwarden/common/abstractions/device-crypto.service.abstraction"; import { DevicesApiServiceAbstraction } from "@bitwarden/common/abstractions/devices/devices-api.service.abstraction"; -import { EncryptService } from "@bitwarden/common/abstractions/encrypt.service"; -import { EnvironmentService as EnvironmentServiceAbstraction } from "@bitwarden/common/abstractions/environment.service"; import { EventCollectionService as EventCollectionServiceAbstraction } from "@bitwarden/common/abstractions/event/event-collection.service"; import { EventUploadService as EventUploadServiceAbstraction } from "@bitwarden/common/abstractions/event/event-upload.service"; -import { FileUploadService as FileUploadServiceAbstraction } from "@bitwarden/common/abstractions/file-upload/file-upload.service"; -import { FormValidationErrorsService as FormValidationErrorsServiceAbstraction } from "@bitwarden/common/abstractions/formValidationErrors.service"; -import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService as MessagingServiceAbstraction } from "@bitwarden/common/abstractions/messaging.service"; import { NotificationsService as NotificationsServiceAbstraction } from "@bitwarden/common/abstractions/notifications.service"; import { OrgDomainApiServiceAbstraction } from "@bitwarden/common/abstractions/organization-domain/org-domain-api.service.abstraction"; import { @@ -28,16 +15,11 @@ import { OrgDomainServiceAbstraction, } from "@bitwarden/common/abstractions/organization-domain/org-domain.service.abstraction"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; -import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService as SearchServiceAbstraction } from "@bitwarden/common/abstractions/search.service"; import { SettingsService as SettingsServiceAbstraction } from "@bitwarden/common/abstractions/settings.service"; -import { StateService as StateServiceAbstraction } from "@bitwarden/common/abstractions/state.service"; -import { StateMigrationService as StateMigrationServiceAbstraction } from "@bitwarden/common/abstractions/stateMigration.service"; -import { AbstractStorageService } from "@bitwarden/common/abstractions/storage.service"; import { TotpService as TotpServiceAbstraction } from "@bitwarden/common/abstractions/totp.service"; import { UserVerificationApiServiceAbstraction } from "@bitwarden/common/abstractions/userVerification/userVerification-api.service.abstraction"; import { UserVerificationService as UserVerificationServiceAbstraction } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; -import { ValidationService as ValidationServiceAbstraction } from "@bitwarden/common/abstractions/validation.service"; import { VaultTimeoutService as VaultTimeoutServiceAbstraction } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; import { VaultTimeoutSettingsService as VaultTimeoutSettingsServiceAbstraction } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service"; import { CollectionService as CollectionServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/collection.service"; @@ -77,41 +59,59 @@ import { TokenService } from "@bitwarden/common/auth/services/token.service"; import { TwoFactorService } from "@bitwarden/common/auth/services/two-factor.service"; import { UserVerificationApiService } from "@bitwarden/common/auth/services/user-verification/user-verification-api.service"; import { UserVerificationService } from "@bitwarden/common/auth/services/user-verification/user-verification.service"; -import { StateFactory } from "@bitwarden/common/factories/stateFactory"; -import { flagEnabled } from "@bitwarden/common/misc/flags"; -import { Account } from "@bitwarden/common/models/domain/account"; -import { GlobalState } from "@bitwarden/common/models/domain/global-state"; +import { AppIdService as AppIdServiceAbstraction } from "@bitwarden/common/platform/abstractions/app-id.service"; +import { BroadcasterService as BroadcasterServiceAbstraction } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { ConfigApiServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config-api.service.abstraction"; +import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction"; +import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService as CryptoServiceAbstraction } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EncryptService } from "@bitwarden/common/platform/abstractions/encrypt.service"; +import { EnvironmentService as EnvironmentServiceAbstraction } from "@bitwarden/common/platform/abstractions/environment.service"; +import { FileUploadService as FileUploadServiceAbstraction } from "@bitwarden/common/platform/abstractions/file-upload/file-upload.service"; +import { FormValidationErrorsService as FormValidationErrorsServiceAbstraction } from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; +import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService as MessagingServiceAbstraction } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateMigrationService as StateMigrationServiceAbstraction } from "@bitwarden/common/platform/abstractions/state-migration.service"; +import { StateService as StateServiceAbstraction } from "@bitwarden/common/platform/abstractions/state.service"; +import { AbstractStorageService } from "@bitwarden/common/platform/abstractions/storage.service"; +import { ValidationService as ValidationServiceAbstraction } from "@bitwarden/common/platform/abstractions/validation.service"; +import { StateFactory } from "@bitwarden/common/platform/factories/state-factory"; +import { flagEnabled } from "@bitwarden/common/platform/misc/flags"; +import { Account } from "@bitwarden/common/platform/models/domain/account"; +import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state"; +import { AppIdService } from "@bitwarden/common/platform/services/app-id.service"; +import { ConfigApiService } from "@bitwarden/common/platform/services/config/config-api.service"; +import { ConfigService } from "@bitwarden/common/platform/services/config/config.service"; +import { ConsoleLogService } from "@bitwarden/common/platform/services/console-log.service"; +import { CryptoService } from "@bitwarden/common/platform/services/crypto.service"; +import { EncryptServiceImplementation } from "@bitwarden/common/platform/services/cryptography/encrypt.service.implementation"; +import { MultithreadEncryptServiceImplementation } from "@bitwarden/common/platform/services/cryptography/multithread-encrypt.service.implementation"; +import { EnvironmentService } from "@bitwarden/common/platform/services/environment.service"; +import { FileUploadService } from "@bitwarden/common/platform/services/file-upload/file-upload.service"; +import { FormValidationErrorsService } from "@bitwarden/common/platform/services/form-validation-errors.service"; +import { StateMigrationService } from "@bitwarden/common/platform/services/state-migration.service"; +import { StateService } from "@bitwarden/common/platform/services/state.service"; +import { ValidationService } from "@bitwarden/common/platform/services/validation.service"; +import { WebCryptoFunctionService } from "@bitwarden/common/platform/services/web-crypto-function.service"; import { AvatarUpdateService } from "@bitwarden/common/services/account/avatar-update.service"; import { AnonymousHubService } from "@bitwarden/common/services/anonymousHub.service"; import { ApiService } from "@bitwarden/common/services/api.service"; -import { AppIdService } from "@bitwarden/common/services/appId.service"; import { AuditService } from "@bitwarden/common/services/audit.service"; -import { ConfigApiService } from "@bitwarden/common/services/config/config-api.service"; -import { ConfigService } from "@bitwarden/common/services/config/config.service"; -import { ConsoleLogService } from "@bitwarden/common/services/consoleLog.service"; -import { CryptoService } from "@bitwarden/common/services/crypto.service"; -import { EncryptServiceImplementation } from "@bitwarden/common/services/cryptography/encrypt.service.implementation"; -import { MultithreadEncryptServiceImplementation } from "@bitwarden/common/services/cryptography/multithread-encrypt.service.implementation"; import { DeviceCryptoService } from "@bitwarden/common/services/device-crypto.service.implementation"; import { DevicesApiServiceImplementation } from "@bitwarden/common/services/devices/devices-api.service.implementation"; -import { EnvironmentService } from "@bitwarden/common/services/environment.service"; import { EventCollectionService } from "@bitwarden/common/services/event/event-collection.service"; import { EventUploadService } from "@bitwarden/common/services/event/event-upload.service"; -import { FileUploadService } from "@bitwarden/common/services/file-upload/file-upload.service"; -import { FormValidationErrorsService } from "@bitwarden/common/services/formValidationErrors.service"; import { NotificationsService } from "@bitwarden/common/services/notifications.service"; import { OrgDomainApiService } from "@bitwarden/common/services/organization-domain/org-domain-api.service"; import { OrgDomainService } from "@bitwarden/common/services/organization-domain/org-domain.service"; import { OrganizationUserServiceImplementation } from "@bitwarden/common/services/organization-user/organization-user.service.implementation"; import { SearchService } from "@bitwarden/common/services/search.service"; import { SettingsService } from "@bitwarden/common/services/settings.service"; -import { StateService } from "@bitwarden/common/services/state.service"; -import { StateMigrationService } from "@bitwarden/common/services/stateMigration.service"; import { TotpService } from "@bitwarden/common/services/totp.service"; -import { ValidationService } from "@bitwarden/common/services/validation.service"; import { VaultTimeoutService } from "@bitwarden/common/services/vaultTimeout/vaultTimeout.service"; import { VaultTimeoutSettingsService } from "@bitwarden/common/services/vaultTimeout/vaultTimeoutSettings.service"; -import { WebCryptoFunctionService } from "@bitwarden/common/services/webCryptoFunction.service"; import { PasswordGenerationService, PasswordGenerationServiceAbstraction, @@ -148,9 +148,9 @@ import { import { AuthGuard } from "../auth/guards/auth.guard"; import { LockGuard } from "../auth/guards/lock.guard"; import { UnauthGuard } from "../auth/guards/unauth.guard"; +import { BroadcasterService } from "../platform/services/broadcaster.service"; import { PasswordRepromptService } from "../vault/services/password-reprompt.service"; -import { BroadcasterService } from "./broadcaster.service"; import { LOCALES_DIRECTORY, LOCKED_CALLBACK, diff --git a/libs/angular/src/services/theming/theming.service.ts b/libs/angular/src/services/theming/theming.service.ts index fbae277cabb..91760e07fec 100644 --- a/libs/angular/src/services/theming/theming.service.ts +++ b/libs/angular/src/services/theming/theming.service.ts @@ -2,8 +2,8 @@ import { DOCUMENT } from "@angular/common"; import { Inject, Injectable } from "@angular/core"; import { BehaviorSubject, filter, fromEvent, Observable } from "rxjs"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { ThemeType } from "@bitwarden/common/enums"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { WINDOW } from "../injection-tokens"; diff --git a/libs/angular/src/shared/components/password-strength/password-strength.component.ts b/libs/angular/src/shared/components/password-strength/password-strength.component.ts index 77a2e3f8098..91167ffc5c1 100644 --- a/libs/angular/src/shared/components/password-strength/password-strength.component.ts +++ b/libs/angular/src/shared/components/password-strength/password-strength.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Input, OnChanges, Output } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; export interface PasswordColorText { diff --git a/libs/angular/src/tools/export/components/export-scope-callout.component.ts b/libs/angular/src/tools/export/components/export-scope-callout.component.ts index d7c15657f5e..301d427c296 100644 --- a/libs/angular/src/tools/export/components/export-scope-callout.component.ts +++ b/libs/angular/src/tools/export/components/export-scope-callout.component.ts @@ -1,7 +1,7 @@ import { Component, Input, OnInit } from "@angular/core"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Component({ selector: "app-export-scope-callout", diff --git a/libs/angular/src/tools/export/components/export.component.ts b/libs/angular/src/tools/export/components/export.component.ts index a9f06922a3b..d7d3a1fc4c2 100644 --- a/libs/angular/src/tools/export/components/export.component.ts +++ b/libs/angular/src/tools/export/components/export.component.ts @@ -2,16 +2,16 @@ import { Directive, EventEmitter, OnDestroy, OnInit, Output } from "@angular/cor import { UntypedFormBuilder, Validators } from "@angular/forms"; import { merge, startWith, Subject, takeUntil } from "rxjs"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { EncryptedExportType, EventType } from "@bitwarden/common/enums"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { VaultExportServiceAbstraction } from "@bitwarden/exporter/vault-export"; import { DialogServiceAbstraction, SimpleDialogType } from "../../../services/dialog"; diff --git a/libs/angular/src/tools/generator/components/generator.component.ts b/libs/angular/src/tools/generator/components/generator.component.ts index e5e48a7f8eb..af88ae24759 100644 --- a/libs/angular/src/tools/generator/components/generator.component.ts +++ b/libs/angular/src/tools/generator/components/generator.component.ts @@ -2,12 +2,12 @@ import { Directive, EventEmitter, Input, OnInit, Output } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { first } from "rxjs/operators"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { PasswordGeneratorPolicyOptions } from "@bitwarden/common/admin-console/models/domain/password-generator-policy-options"; import { EmailForwarderOptions } from "@bitwarden/common/models/domain/email-forwarder-options"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { UsernameGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/username"; diff --git a/libs/angular/src/tools/generator/components/password-generator-history.component.ts b/libs/angular/src/tools/generator/components/password-generator-history.component.ts index 1c2e93928ab..5c0da324db1 100644 --- a/libs/angular/src/tools/generator/components/password-generator-history.component.ts +++ b/libs/angular/src/tools/generator/components/password-generator-history.component.ts @@ -1,7 +1,7 @@ import { Directive, OnInit } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { GeneratedPasswordHistory, PasswordGenerationServiceAbstraction, diff --git a/libs/angular/src/tools/send/add-edit.component.ts b/libs/angular/src/tools/send/add-edit.component.ts index 747df5780cb..8551a2067c6 100644 --- a/libs/angular/src/tools/send/add-edit.component.ts +++ b/libs/angular/src/tools/send/add-edit.component.ts @@ -2,15 +2,15 @@ import { DatePipe } from "@angular/common"; import { Directive, EventEmitter, Input, OnDestroy, OnInit, Output } from "@angular/core"; import { Subject, takeUntil } from "rxjs"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; -import { EncArrayBuffer } from "@bitwarden/common/models/domain/enc-array-buffer"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { EncArrayBuffer } from "@bitwarden/common/platform/models/domain/enc-array-buffer"; import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { Send } from "@bitwarden/common/tools/send/models/domain/send"; import { SendFileView } from "@bitwarden/common/tools/send/models/view/send-file.view"; diff --git a/libs/angular/src/tools/send/efflux-dates.component.ts b/libs/angular/src/tools/send/efflux-dates.component.ts index 16389789309..ffa8fd5a9db 100644 --- a/libs/angular/src/tools/send/efflux-dates.component.ts +++ b/libs/angular/src/tools/send/efflux-dates.component.ts @@ -2,8 +2,8 @@ import { DatePipe } from "@angular/common"; import { Directive, EventEmitter, Input, OnInit, Output } from "@angular/core"; import { UntypedFormControl, UntypedFormGroup } from "@angular/forms"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; // Different BrowserPath = different controls. enum BrowserPath { diff --git a/libs/angular/src/tools/send/send.component.ts b/libs/angular/src/tools/send/send.component.ts index bec82d7c69a..c3215e98185 100644 --- a/libs/angular/src/tools/send/send.component.ts +++ b/libs/angular/src/tools/send/send.component.ts @@ -1,13 +1,13 @@ import { Directive, NgZone, OnDestroy, OnInit } from "@angular/core"; import { Subject, takeUntil } from "rxjs"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { SendView } from "@bitwarden/common/tools/send/models/view/send.view"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; diff --git a/libs/angular/src/validators/inputsFieldMatch.validator.ts b/libs/angular/src/validators/inputsFieldMatch.validator.ts index bf9779d9dc0..7c7c876d0db 100644 --- a/libs/angular/src/validators/inputsFieldMatch.validator.ts +++ b/libs/angular/src/validators/inputsFieldMatch.validator.ts @@ -1,6 +1,6 @@ import { AbstractControl, UntypedFormGroup, ValidatorFn } from "@angular/forms"; -import { FormGroupControls } from "@bitwarden/common/abstractions/formValidationErrors.service"; +import { FormGroupControls } from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; export class InputsFieldMatch { //check to ensure two fields do not have the same value diff --git a/libs/angular/src/vault/components/add-edit-custom-fields.component.ts b/libs/angular/src/vault/components/add-edit-custom-fields.component.ts index 063fd73838b..7d696e99a1d 100644 --- a/libs/angular/src/vault/components/add-edit-custom-fields.component.ts +++ b/libs/angular/src/vault/components/add-edit-custom-fields.component.ts @@ -2,9 +2,9 @@ import { CdkDragDrop, moveItemInArray } from "@angular/cdk/drag-drop"; import { Directive, Input, OnChanges, SimpleChanges } from "@angular/core"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { EventType, FieldType } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { FieldView } from "@bitwarden/common/vault/models/view/field.view"; diff --git a/libs/angular/src/vault/components/add-edit.component.ts b/libs/angular/src/vault/components/add-edit.component.ts index 2d53d6a7d98..19896c20c14 100644 --- a/libs/angular/src/vault/components/add-edit.component.ts +++ b/libs/angular/src/vault/components/add-edit.component.ts @@ -3,11 +3,6 @@ import { Observable, Subject, takeUntil, concatMap } from "rxjs"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { isMember, @@ -18,7 +13,12 @@ import { OrganizationUserStatusType, PolicyType } from "@bitwarden/common/admin- import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { EventType, SecureNoteType, UriMatchType } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; diff --git a/libs/angular/src/vault/components/attachments.component.ts b/libs/angular/src/vault/components/attachments.component.ts index d137375b188..e4daf6e37f3 100644 --- a/libs/angular/src/vault/components/attachments.component.ts +++ b/libs/angular/src/vault/components/attachments.component.ts @@ -1,14 +1,14 @@ import { Directive, EventEmitter, Input, OnInit, Output } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; -import { EncArrayBuffer } from "@bitwarden/common/models/domain/enc-array-buffer"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { EncArrayBuffer } from "@bitwarden/common/platform/models/domain/enc-array-buffer"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { Cipher } from "@bitwarden/common/vault/models/domain/cipher"; import { AttachmentView } from "@bitwarden/common/vault/models/view/attachment.view"; diff --git a/libs/angular/src/vault/components/folder-add-edit.component.ts b/libs/angular/src/vault/components/folder-add-edit.component.ts index 768a2dc519e..aa2ccd3a7c6 100644 --- a/libs/angular/src/vault/components/folder-add-edit.component.ts +++ b/libs/angular/src/vault/components/folder-add-edit.component.ts @@ -1,8 +1,8 @@ import { Directive, EventEmitter, Input, OnInit, Output } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; diff --git a/libs/angular/src/vault/components/icon.component.ts b/libs/angular/src/vault/components/icon.component.ts index 7fac39a6386..84a72ca0c3c 100644 --- a/libs/angular/src/vault/components/icon.component.ts +++ b/libs/angular/src/vault/components/icon.component.ts @@ -8,9 +8,9 @@ import { Observable, } from "rxjs"; -import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service"; import { SettingsService } from "@bitwarden/common/abstractions/settings.service"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; diff --git a/libs/angular/src/vault/components/password-history.component.ts b/libs/angular/src/vault/components/password-history.component.ts index d9d9654c8ef..8fbea9d8fb9 100644 --- a/libs/angular/src/vault/components/password-history.component.ts +++ b/libs/angular/src/vault/components/password-history.component.ts @@ -1,7 +1,7 @@ import { Directive, OnInit } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { PasswordHistoryView } from "@bitwarden/common/vault/models/view/password-history.view"; diff --git a/libs/angular/src/vault/components/password-reprompt.component.ts b/libs/angular/src/vault/components/password-reprompt.component.ts index ca0d6fb7696..0f0fd685b20 100644 --- a/libs/angular/src/vault/components/password-reprompt.component.ts +++ b/libs/angular/src/vault/components/password-reprompt.component.ts @@ -1,8 +1,8 @@ import { Directive } from "@angular/core"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { ModalRef } from "../../components/modal/modal.ref"; diff --git a/libs/angular/src/vault/components/premium.component.ts b/libs/angular/src/vault/components/premium.component.ts index a44c30187db..af66db7f4b6 100644 --- a/libs/angular/src/vault/components/premium.component.ts +++ b/libs/angular/src/vault/components/premium.component.ts @@ -1,10 +1,10 @@ import { Directive, OnInit } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { DialogServiceAbstraction, SimpleDialogType } from "../../services/dialog"; diff --git a/libs/angular/src/vault/components/view.component.ts b/libs/angular/src/vault/components/view.component.ts index 2dbb6d65e5a..afe7d7ed57f 100644 --- a/libs/angular/src/vault/components/view.component.ts +++ b/libs/angular/src/vault/components/view.component.ts @@ -12,19 +12,19 @@ import { firstValueFrom } from "rxjs"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; -import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; import { TokenService } from "@bitwarden/common/auth/abstractions/token.service"; import { EventType, FieldType } from "@bitwarden/common/enums"; -import { EncArrayBuffer } from "@bitwarden/common/models/domain/enc-array-buffer"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; +import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { EncArrayBuffer } from "@bitwarden/common/platform/models/domain/enc-array-buffer"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; diff --git a/libs/angular/src/vault/vault-filter/services/vault-filter.service.ts b/libs/angular/src/vault/vault-filter/services/vault-filter.service.ts index 7bb216983df..6464254e458 100644 --- a/libs/angular/src/vault/vault-filter/services/vault-filter.service.ts +++ b/libs/angular/src/vault/vault-filter/services/vault-filter.service.ts @@ -1,7 +1,6 @@ import { Injectable } from "@angular/core"; import { firstValueFrom, from, mergeMap, Observable } from "rxjs"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { isMember, @@ -13,6 +12,7 @@ import { Organization } from "@bitwarden/common/admin-console/models/domain/orga import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { ServiceUtils } from "@bitwarden/common/misc/serviceUtils"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; diff --git a/libs/common/spec/utils.ts b/libs/common/spec/utils.ts index 21b0f581e0c..4013d3ac36f 100644 --- a/libs/common/spec/utils.ts +++ b/libs/common/spec/utils.ts @@ -1,7 +1,7 @@ // eslint-disable-next-line no-restricted-imports import { Substitute, Arg } from "@fluffy-spoon/substitute"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; function newGuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => { diff --git a/libs/common/src/abstractions/device-crypto.service.abstraction.ts b/libs/common/src/abstractions/device-crypto.service.abstraction.ts index 23b3be967f5..f720ade9a2d 100644 --- a/libs/common/src/abstractions/device-crypto.service.abstraction.ts +++ b/libs/common/src/abstractions/device-crypto.service.abstraction.ts @@ -1,4 +1,4 @@ -import { DeviceKey } from "../models/domain/symmetric-crypto-key"; +import { DeviceKey } from "../platform/models/domain/symmetric-crypto-key"; import { DeviceResponse } from "./devices/responses/device.response"; diff --git a/libs/common/src/abstractions/settings.service.ts b/libs/common/src/abstractions/settings.service.ts index ade21aaaae7..78ed7183c88 100644 --- a/libs/common/src/abstractions/settings.service.ts +++ b/libs/common/src/abstractions/settings.service.ts @@ -1,6 +1,6 @@ import { Observable } from "rxjs"; -import { AccountSettingsSettings } from "../models/domain/account"; +import { AccountSettingsSettings } from "../platform/models/domain/account"; export abstract class SettingsService { settings$: Observable; diff --git a/libs/common/src/admin-console/abstractions/organization/organization.service.abstraction.ts b/libs/common/src/admin-console/abstractions/organization/organization.service.abstraction.ts index 1fdfb260d25..1210f4527ac 100644 --- a/libs/common/src/admin-console/abstractions/organization/organization.service.abstraction.ts +++ b/libs/common/src/admin-console/abstractions/organization/organization.service.abstraction.ts @@ -1,7 +1,7 @@ import { map, Observable } from "rxjs"; -import { I18nService } from "../../../abstractions/i18n.service"; -import { Utils } from "../../../misc/utils"; +import { I18nService } from "../../../platform/abstractions/i18n.service"; +import { Utils } from "../../../platform/misc/utils"; import { OrganizationData } from "../../models/data/organization.data"; import { Organization } from "../../models/domain/organization"; diff --git a/libs/common/src/admin-console/models/domain/collection.ts b/libs/common/src/admin-console/models/domain/collection.ts index 22c26bc11c6..8bcec318dfb 100644 --- a/libs/common/src/admin-console/models/domain/collection.ts +++ b/libs/common/src/admin-console/models/domain/collection.ts @@ -1,5 +1,5 @@ -import Domain from "../../../models/domain/domain-base"; -import { EncString } from "../../../models/domain/enc-string"; +import Domain from "../../../platform/models/domain/domain-base"; +import { EncString } from "../../../platform/models/domain/enc-string"; import { CollectionData } from "../data/collection.data"; import { CollectionView } from "../view/collection.view"; diff --git a/libs/common/src/admin-console/models/domain/encrypted-organization-key.ts b/libs/common/src/admin-console/models/domain/encrypted-organization-key.ts index 4e7dd9ef2bb..7b35235c0c8 100644 --- a/libs/common/src/admin-console/models/domain/encrypted-organization-key.ts +++ b/libs/common/src/admin-console/models/domain/encrypted-organization-key.ts @@ -1,6 +1,6 @@ -import { CryptoService } from "../../../abstractions/crypto.service"; -import { EncString } from "../../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; +import { CryptoService } from "../../../platform/abstractions/crypto.service"; +import { EncString } from "../../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { EncryptedOrganizationKeyData } from "../data/encrypted-organization-key.data"; export abstract class BaseEncryptedOrganizationKey { diff --git a/libs/common/src/admin-console/models/domain/master-password-policy-options.ts b/libs/common/src/admin-console/models/domain/master-password-policy-options.ts index 8acce2c0488..889a84a4fc9 100644 --- a/libs/common/src/admin-console/models/domain/master-password-policy-options.ts +++ b/libs/common/src/admin-console/models/domain/master-password-policy-options.ts @@ -1,5 +1,5 @@ import { MasterPasswordPolicyResponse } from "../../../auth/models/response/master-password-policy.response"; -import Domain from "../../../models/domain/domain-base"; +import Domain from "../../../platform/models/domain/domain-base"; export class MasterPasswordPolicyOptions extends Domain { minComplexity = 0; diff --git a/libs/common/src/admin-console/models/domain/password-generator-policy-options.ts b/libs/common/src/admin-console/models/domain/password-generator-policy-options.ts index eba15fae263..858b9fd8829 100644 --- a/libs/common/src/admin-console/models/domain/password-generator-policy-options.ts +++ b/libs/common/src/admin-console/models/domain/password-generator-policy-options.ts @@ -1,4 +1,4 @@ -import Domain from "../../../models/domain/domain-base"; +import Domain from "../../../platform/models/domain/domain-base"; export class PasswordGeneratorPolicyOptions extends Domain { defaultType = ""; diff --git a/libs/common/src/admin-console/models/domain/policy.ts b/libs/common/src/admin-console/models/domain/policy.ts index a179c6d236f..223066a2534 100644 --- a/libs/common/src/admin-console/models/domain/policy.ts +++ b/libs/common/src/admin-console/models/domain/policy.ts @@ -1,4 +1,4 @@ -import Domain from "../../../models/domain/domain-base"; +import Domain from "../../../platform/models/domain/domain-base"; import { PolicyType } from "../../enums"; import { PolicyData } from "../data/policy.data"; diff --git a/libs/common/src/admin-console/models/domain/reset-password-policy-options.ts b/libs/common/src/admin-console/models/domain/reset-password-policy-options.ts index efa8ecdeca5..a637c6c6ecb 100644 --- a/libs/common/src/admin-console/models/domain/reset-password-policy-options.ts +++ b/libs/common/src/admin-console/models/domain/reset-password-policy-options.ts @@ -1,4 +1,4 @@ -import Domain from "../../../models/domain/domain-base"; +import Domain from "../../../platform/models/domain/domain-base"; export class ResetPasswordPolicyOptions extends Domain { autoEnrollEnabled = false; diff --git a/libs/common/src/admin-console/services/collection.service.ts b/libs/common/src/admin-console/services/collection.service.ts index ccd58455114..3c90fc50996 100644 --- a/libs/common/src/admin-console/services/collection.service.ts +++ b/libs/common/src/admin-console/services/collection.service.ts @@ -1,9 +1,9 @@ -import { CryptoService } from "../../abstractions/crypto.service"; -import { I18nService } from "../../abstractions/i18n.service"; -import { StateService } from "../../abstractions/state.service"; import { ServiceUtils } from "../../misc/serviceUtils"; -import { Utils } from "../../misc/utils"; import { TreeNode } from "../../models/domain/tree-node"; +import { CryptoService } from "../../platform/abstractions/crypto.service"; +import { I18nService } from "../../platform/abstractions/i18n.service"; +import { StateService } from "../../platform/abstractions/state.service"; +import { Utils } from "../../platform/misc/utils"; import { CollectionService as CollectionServiceAbstraction } from "../abstractions/collection.service"; import { CollectionData } from "../models/data/collection.data"; import { Collection } from "../models/domain/collection"; diff --git a/libs/common/src/admin-console/services/organization/organization.service.spec.ts b/libs/common/src/admin-console/services/organization/organization.service.spec.ts index 3947df97071..64f6697f4c2 100644 --- a/libs/common/src/admin-console/services/organization/organization.service.spec.ts +++ b/libs/common/src/admin-console/services/organization/organization.service.spec.ts @@ -1,7 +1,7 @@ import { MockProxy, mock, any, mockClear } from "jest-mock-extended"; import { BehaviorSubject, firstValueFrom } from "rxjs"; -import { StateService } from "../../../abstractions/state.service"; +import { StateService } from "../../../platform/abstractions/state.service"; import { OrganizationData } from "../../models/data/organization.data"; import { OrganizationService } from "./organization.service"; diff --git a/libs/common/src/admin-console/services/organization/organization.service.ts b/libs/common/src/admin-console/services/organization/organization.service.ts index 8d33684c20d..9e5e1695e97 100644 --- a/libs/common/src/admin-console/services/organization/organization.service.ts +++ b/libs/common/src/admin-console/services/organization/organization.service.ts @@ -1,6 +1,6 @@ import { BehaviorSubject, concatMap, map, Observable } from "rxjs"; -import { StateService } from "../../../abstractions/state.service"; +import { StateService } from "../../../platform/abstractions/state.service"; import { InternalOrganizationService as InternalOrganizationServiceAbstraction, isMember, diff --git a/libs/common/src/admin-console/services/policy/policy-api.service.ts b/libs/common/src/admin-console/services/policy/policy-api.service.ts index 02ff0150498..c0a572ae8d3 100644 --- a/libs/common/src/admin-console/services/policy/policy-api.service.ts +++ b/libs/common/src/admin-console/services/policy/policy-api.service.ts @@ -1,9 +1,9 @@ import { firstValueFrom } from "rxjs"; import { ApiService } from "../../../abstractions/api.service"; -import { StateService } from "../../../abstractions/state.service"; -import { Utils } from "../../../misc/utils"; import { ListResponse } from "../../../models/response/list.response"; +import { StateService } from "../../../platform/abstractions/state.service"; +import { Utils } from "../../../platform/misc/utils"; import { PolicyApiServiceAbstraction } from "../../abstractions/policy/policy-api.service.abstraction"; import { InternalPolicyService } from "../../abstractions/policy/policy.service.abstraction"; import { PolicyType } from "../../enums"; diff --git a/libs/common/src/admin-console/services/policy/policy.service.ts b/libs/common/src/admin-console/services/policy/policy.service.ts index b65aa5dc850..4ef3356c18e 100644 --- a/libs/common/src/admin-console/services/policy/policy.service.ts +++ b/libs/common/src/admin-console/services/policy/policy.service.ts @@ -1,8 +1,8 @@ import { BehaviorSubject, concatMap, map, Observable, of } from "rxjs"; -import { StateService } from "../../../abstractions/state.service"; -import { Utils } from "../../../misc/utils"; import { ListResponse } from "../../../models/response/list.response"; +import { StateService } from "../../../platform/abstractions/state.service"; +import { Utils } from "../../../platform/misc/utils"; import { OrganizationService } from "../../abstractions/organization/organization.service.abstraction"; import { InternalPolicyService as InternalPolicyServiceAbstraction } from "../../abstractions/policy/policy.service.abstraction"; import { OrganizationUserStatusType, OrganizationUserType, PolicyType } from "../../enums"; diff --git a/libs/common/src/admin-console/services/provider.service.ts b/libs/common/src/admin-console/services/provider.service.ts index 31934260ee4..99a2d463d8f 100644 --- a/libs/common/src/admin-console/services/provider.service.ts +++ b/libs/common/src/admin-console/services/provider.service.ts @@ -1,5 +1,5 @@ -import { StateService } from "../../abstractions/state.service"; import { Provider } from "../../models/domain/provider"; +import { StateService } from "../../platform/abstractions/state.service"; import { ProviderService as ProviderServiceAbstraction } from "../abstractions/provider.service"; import { ProviderData } from "../models/data/provider.data"; diff --git a/libs/common/src/auth/abstractions/auth.service.ts b/libs/common/src/auth/abstractions/auth.service.ts index 4a59f0ac4ee..231521382fe 100644 --- a/libs/common/src/auth/abstractions/auth.service.ts +++ b/libs/common/src/auth/abstractions/auth.service.ts @@ -1,7 +1,7 @@ import { Observable } from "rxjs"; -import { SymmetricCryptoKey } from "../../models/domain/symmetric-crypto-key"; import { AuthRequestPushNotification } from "../../models/response/notification.response"; +import { SymmetricCryptoKey } from "../../platform/models/domain/symmetric-crypto-key"; import { AuthenticationStatus } from "../enums/authentication-status"; import { AuthResult } from "../models/domain/auth-result"; import { diff --git a/libs/common/src/auth/captcha-iframe.ts b/libs/common/src/auth/captcha-iframe.ts index 8559ef40501..6fb0f5a43a4 100644 --- a/libs/common/src/auth/captcha-iframe.ts +++ b/libs/common/src/auth/captcha-iframe.ts @@ -1,5 +1,5 @@ -import { I18nService } from "../abstractions/i18n.service"; import { IFrameComponent } from "../misc/iframe_component"; +import { I18nService } from "../platform/abstractions/i18n.service"; export class CaptchaIFrame extends IFrameComponent { constructor( diff --git a/libs/common/src/auth/login-strategies/login.strategy.spec.ts b/libs/common/src/auth/login-strategies/login.strategy.spec.ts index 3f7e8fb8c13..09756fbd995 100644 --- a/libs/common/src/auth/login-strategies/login.strategy.spec.ts +++ b/libs/common/src/auth/login-strategies/login.strategy.spec.ts @@ -1,16 +1,16 @@ import { mock, MockProxy } from "jest-mock-extended"; import { ApiService } from "../../abstractions/api.service"; -import { AppIdService } from "../../abstractions/appId.service"; -import { CryptoService } from "../../abstractions/crypto.service"; -import { LogService } from "../../abstractions/log.service"; -import { MessagingService } from "../../abstractions/messaging.service"; -import { PlatformUtilsService } from "../../abstractions/platformUtils.service"; -import { StateService } from "../../abstractions/state.service"; import { PolicyService } from "../../admin-console/abstractions/policy/policy.service.abstraction"; -import { Utils } from "../../misc/utils"; -import { Account, AccountProfile, AccountTokens } from "../../models/domain/account"; -import { EncString } from "../../models/domain/enc-string"; +import { AppIdService } from "../../platform/abstractions/app-id.service"; +import { CryptoService } from "../../platform/abstractions/crypto.service"; +import { LogService } from "../../platform/abstractions/log.service"; +import { MessagingService } from "../../platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service"; +import { StateService } from "../../platform/abstractions/state.service"; +import { Utils } from "../../platform/misc/utils"; +import { Account, AccountProfile, AccountTokens } from "../../platform/models/domain/account"; +import { EncString } from "../../platform/models/domain/enc-string"; import { PasswordGenerationService } from "../../tools/generator/password"; import { AuthService } from "../abstractions/auth.service"; import { TokenService } from "../abstractions/token.service"; diff --git a/libs/common/src/auth/login-strategies/login.strategy.ts b/libs/common/src/auth/login-strategies/login.strategy.ts index 2bcbee88e00..fbfa912f438 100644 --- a/libs/common/src/auth/login-strategies/login.strategy.ts +++ b/libs/common/src/auth/login-strategies/login.strategy.ts @@ -1,12 +1,12 @@ import { ApiService } from "../../abstractions/api.service"; -import { AppIdService } from "../../abstractions/appId.service"; -import { CryptoService } from "../../abstractions/crypto.service"; -import { LogService } from "../../abstractions/log.service"; -import { MessagingService } from "../../abstractions/messaging.service"; -import { PlatformUtilsService } from "../../abstractions/platformUtils.service"; -import { StateService } from "../../abstractions/state.service"; -import { Account, AccountProfile, AccountTokens } from "../../models/domain/account"; import { KeysRequest } from "../../models/request/keys.request"; +import { AppIdService } from "../../platform/abstractions/app-id.service"; +import { CryptoService } from "../../platform/abstractions/crypto.service"; +import { LogService } from "../../platform/abstractions/log.service"; +import { MessagingService } from "../../platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service"; +import { StateService } from "../../platform/abstractions/state.service"; +import { Account, AccountProfile, AccountTokens } from "../../platform/models/domain/account"; import { TokenService } from "../abstractions/token.service"; import { TwoFactorService } from "../abstractions/two-factor.service"; import { TwoFactorProviderType } from "../enums/two-factor-provider-type"; diff --git a/libs/common/src/auth/login-strategies/password-login.strategy.spec.ts b/libs/common/src/auth/login-strategies/password-login.strategy.spec.ts index f13c87bdc5c..0c2d1e2d575 100644 --- a/libs/common/src/auth/login-strategies/password-login.strategy.spec.ts +++ b/libs/common/src/auth/login-strategies/password-login.strategy.spec.ts @@ -1,16 +1,16 @@ import { mock, MockProxy } from "jest-mock-extended"; import { ApiService } from "../../abstractions/api.service"; -import { AppIdService } from "../../abstractions/appId.service"; -import { CryptoService } from "../../abstractions/crypto.service"; -import { LogService } from "../../abstractions/log.service"; -import { MessagingService } from "../../abstractions/messaging.service"; -import { PlatformUtilsService } from "../../abstractions/platformUtils.service"; -import { StateService } from "../../abstractions/state.service"; import { PolicyService } from "../../admin-console/abstractions/policy/policy.service.abstraction"; import { HashPurpose } from "../../enums"; -import { Utils } from "../../misc/utils"; -import { SymmetricCryptoKey } from "../../models/domain/symmetric-crypto-key"; +import { AppIdService } from "../../platform/abstractions/app-id.service"; +import { CryptoService } from "../../platform/abstractions/crypto.service"; +import { LogService } from "../../platform/abstractions/log.service"; +import { MessagingService } from "../../platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service"; +import { StateService } from "../../platform/abstractions/state.service"; +import { Utils } from "../../platform/misc/utils"; +import { SymmetricCryptoKey } from "../../platform/models/domain/symmetric-crypto-key"; import { PasswordGenerationService } from "../../tools/generator/password"; import { AuthService } from "../abstractions/auth.service"; import { TokenService } from "../abstractions/token.service"; diff --git a/libs/common/src/auth/login-strategies/password-login.strategy.ts b/libs/common/src/auth/login-strategies/password-login.strategy.ts index 272387940e5..200656a08ff 100644 --- a/libs/common/src/auth/login-strategies/password-login.strategy.ts +++ b/libs/common/src/auth/login-strategies/password-login.strategy.ts @@ -1,14 +1,14 @@ import { ApiService } from "../../abstractions/api.service"; -import { AppIdService } from "../../abstractions/appId.service"; -import { CryptoService } from "../../abstractions/crypto.service"; -import { LogService } from "../../abstractions/log.service"; -import { MessagingService } from "../../abstractions/messaging.service"; -import { PlatformUtilsService } from "../../abstractions/platformUtils.service"; -import { StateService } from "../../abstractions/state.service"; import { PolicyService } from "../../admin-console/abstractions/policy/policy.service.abstraction"; import { MasterPasswordPolicyOptions } from "../../admin-console/models/domain/master-password-policy-options"; import { HashPurpose } from "../../enums"; -import { SymmetricCryptoKey } from "../../models/domain/symmetric-crypto-key"; +import { AppIdService } from "../../platform/abstractions/app-id.service"; +import { CryptoService } from "../../platform/abstractions/crypto.service"; +import { LogService } from "../../platform/abstractions/log.service"; +import { MessagingService } from "../../platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service"; +import { StateService } from "../../platform/abstractions/state.service"; +import { SymmetricCryptoKey } from "../../platform/models/domain/symmetric-crypto-key"; import { PasswordGenerationServiceAbstraction } from "../../tools/generator/password"; import { AuthService } from "../abstractions/auth.service"; import { TokenService } from "../abstractions/token.service"; diff --git a/libs/common/src/auth/login-strategies/passwordless-login.strategy.ts b/libs/common/src/auth/login-strategies/passwordless-login.strategy.ts index b42d200f405..382c55f06eb 100644 --- a/libs/common/src/auth/login-strategies/passwordless-login.strategy.ts +++ b/libs/common/src/auth/login-strategies/passwordless-login.strategy.ts @@ -1,10 +1,10 @@ import { ApiService } from "../../abstractions/api.service"; -import { AppIdService } from "../../abstractions/appId.service"; -import { CryptoService } from "../../abstractions/crypto.service"; -import { LogService } from "../../abstractions/log.service"; -import { MessagingService } from "../../abstractions/messaging.service"; -import { PlatformUtilsService } from "../../abstractions/platformUtils.service"; -import { StateService } from "../../abstractions/state.service"; +import { AppIdService } from "../../platform/abstractions/app-id.service"; +import { CryptoService } from "../../platform/abstractions/crypto.service"; +import { LogService } from "../../platform/abstractions/log.service"; +import { MessagingService } from "../../platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service"; +import { StateService } from "../../platform/abstractions/state.service"; import { AuthService } from "../abstractions/auth.service"; import { TokenService } from "../abstractions/token.service"; import { TwoFactorService } from "../abstractions/two-factor.service"; diff --git a/libs/common/src/auth/login-strategies/sso-login.strategy.spec.ts b/libs/common/src/auth/login-strategies/sso-login.strategy.spec.ts index d1d34aa2568..e0225fcacc5 100644 --- a/libs/common/src/auth/login-strategies/sso-login.strategy.spec.ts +++ b/libs/common/src/auth/login-strategies/sso-login.strategy.spec.ts @@ -1,13 +1,13 @@ import { mock, MockProxy } from "jest-mock-extended"; import { ApiService } from "../../abstractions/api.service"; -import { AppIdService } from "../../abstractions/appId.service"; -import { CryptoService } from "../../abstractions/crypto.service"; -import { LogService } from "../../abstractions/log.service"; -import { MessagingService } from "../../abstractions/messaging.service"; -import { PlatformUtilsService } from "../../abstractions/platformUtils.service"; -import { StateService } from "../../abstractions/state.service"; -import { Utils } from "../../misc/utils"; +import { AppIdService } from "../../platform/abstractions/app-id.service"; +import { CryptoService } from "../../platform/abstractions/crypto.service"; +import { LogService } from "../../platform/abstractions/log.service"; +import { MessagingService } from "../../platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service"; +import { StateService } from "../../platform/abstractions/state.service"; +import { Utils } from "../../platform/misc/utils"; import { KeyConnectorService } from "../abstractions/key-connector.service"; import { TokenService } from "../abstractions/token.service"; import { TwoFactorService } from "../abstractions/two-factor.service"; diff --git a/libs/common/src/auth/login-strategies/sso-login.strategy.ts b/libs/common/src/auth/login-strategies/sso-login.strategy.ts index 2285d1b6b4e..c77aa168419 100644 --- a/libs/common/src/auth/login-strategies/sso-login.strategy.ts +++ b/libs/common/src/auth/login-strategies/sso-login.strategy.ts @@ -1,10 +1,10 @@ import { ApiService } from "../../abstractions/api.service"; -import { AppIdService } from "../../abstractions/appId.service"; -import { CryptoService } from "../../abstractions/crypto.service"; -import { LogService } from "../../abstractions/log.service"; -import { MessagingService } from "../../abstractions/messaging.service"; -import { PlatformUtilsService } from "../../abstractions/platformUtils.service"; -import { StateService } from "../../abstractions/state.service"; +import { AppIdService } from "../../platform/abstractions/app-id.service"; +import { CryptoService } from "../../platform/abstractions/crypto.service"; +import { LogService } from "../../platform/abstractions/log.service"; +import { MessagingService } from "../../platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service"; +import { StateService } from "../../platform/abstractions/state.service"; import { KeyConnectorService } from "../abstractions/key-connector.service"; import { TokenService } from "../abstractions/token.service"; import { TwoFactorService } from "../abstractions/two-factor.service"; diff --git a/libs/common/src/auth/login-strategies/user-api-login.strategy.spec.ts b/libs/common/src/auth/login-strategies/user-api-login.strategy.spec.ts index 66452f44577..92cae9d98ce 100644 --- a/libs/common/src/auth/login-strategies/user-api-login.strategy.spec.ts +++ b/libs/common/src/auth/login-strategies/user-api-login.strategy.spec.ts @@ -1,14 +1,14 @@ import { mock, MockProxy } from "jest-mock-extended"; import { ApiService } from "../../abstractions/api.service"; -import { AppIdService } from "../../abstractions/appId.service"; -import { CryptoService } from "../../abstractions/crypto.service"; -import { EnvironmentService } from "../../abstractions/environment.service"; -import { LogService } from "../../abstractions/log.service"; -import { MessagingService } from "../../abstractions/messaging.service"; -import { PlatformUtilsService } from "../../abstractions/platformUtils.service"; -import { StateService } from "../../abstractions/state.service"; -import { Utils } from "../../misc/utils"; +import { AppIdService } from "../../platform/abstractions/app-id.service"; +import { CryptoService } from "../../platform/abstractions/crypto.service"; +import { EnvironmentService } from "../../platform/abstractions/environment.service"; +import { LogService } from "../../platform/abstractions/log.service"; +import { MessagingService } from "../../platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service"; +import { StateService } from "../../platform/abstractions/state.service"; +import { Utils } from "../../platform/misc/utils"; import { KeyConnectorService } from "../abstractions/key-connector.service"; import { TokenService } from "../abstractions/token.service"; import { TwoFactorService } from "../abstractions/two-factor.service"; diff --git a/libs/common/src/auth/login-strategies/user-api-login.strategy.ts b/libs/common/src/auth/login-strategies/user-api-login.strategy.ts index ce0b52e51e0..967856ddd35 100644 --- a/libs/common/src/auth/login-strategies/user-api-login.strategy.ts +++ b/libs/common/src/auth/login-strategies/user-api-login.strategy.ts @@ -1,13 +1,13 @@ import { ApiService } from "../../abstractions/api.service"; -import { AppIdService } from "../../abstractions/appId.service"; -import { CryptoService } from "../../abstractions/crypto.service"; -import { EnvironmentService } from "../../abstractions/environment.service"; -import { LogService } from "../../abstractions/log.service"; -import { MessagingService } from "../../abstractions/messaging.service"; -import { PlatformUtilsService } from "../../abstractions/platformUtils.service"; -import { StateService } from "../../abstractions/state.service"; import { TokenService } from "../../auth/abstractions/token.service"; import { TwoFactorService } from "../../auth/abstractions/two-factor.service"; +import { AppIdService } from "../../platform/abstractions/app-id.service"; +import { CryptoService } from "../../platform/abstractions/crypto.service"; +import { EnvironmentService } from "../../platform/abstractions/environment.service"; +import { LogService } from "../../platform/abstractions/log.service"; +import { MessagingService } from "../../platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service"; +import { StateService } from "../../platform/abstractions/state.service"; import { KeyConnectorService } from "../abstractions/key-connector.service"; import { UserApiLogInCredentials } from "../models/domain/log-in-credentials"; import { UserApiTokenRequest } from "../models/request/identity-token/user-api-token.request"; diff --git a/libs/common/src/auth/models/domain/auth-result.ts b/libs/common/src/auth/models/domain/auth-result.ts index 6ce1e568e1e..7a88d490f00 100644 --- a/libs/common/src/auth/models/domain/auth-result.ts +++ b/libs/common/src/auth/models/domain/auth-result.ts @@ -1,4 +1,4 @@ -import { Utils } from "../../../misc/utils"; +import { Utils } from "../../../platform/misc/utils"; import { TwoFactorProviderType } from "../../enums/two-factor-provider-type"; import { ForceResetPasswordReason } from "./force-reset-password-reason"; diff --git a/libs/common/src/auth/models/domain/log-in-credentials.ts b/libs/common/src/auth/models/domain/log-in-credentials.ts index aabdaea02d2..5312b137511 100644 --- a/libs/common/src/auth/models/domain/log-in-credentials.ts +++ b/libs/common/src/auth/models/domain/log-in-credentials.ts @@ -1,4 +1,4 @@ -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { AuthenticationType } from "../../enums/authentication-type"; import { TokenTwoFactorRequest } from "../request/identity-token/token-two-factor.request"; diff --git a/libs/common/src/auth/models/request/identity-token/device.request.ts b/libs/common/src/auth/models/request/identity-token/device.request.ts index 50d6c9c7e28..49b40f11d03 100644 --- a/libs/common/src/auth/models/request/identity-token/device.request.ts +++ b/libs/common/src/auth/models/request/identity-token/device.request.ts @@ -1,5 +1,5 @@ -import { PlatformUtilsService } from "../../../../abstractions/platformUtils.service"; import { DeviceType } from "../../../../enums"; +import { PlatformUtilsService } from "../../../../platform/abstractions/platform-utils.service"; export class DeviceRequest { type: DeviceType; diff --git a/libs/common/src/auth/models/request/identity-token/password-token.request.ts b/libs/common/src/auth/models/request/identity-token/password-token.request.ts index 5fc8abe71aa..a7b23479117 100644 --- a/libs/common/src/auth/models/request/identity-token/password-token.request.ts +++ b/libs/common/src/auth/models/request/identity-token/password-token.request.ts @@ -1,5 +1,5 @@ import { ClientType } from "../../../../enums"; -import { Utils } from "../../../../misc/utils"; +import { Utils } from "../../../../platform/misc/utils"; import { CaptchaProtectedRequest } from "../captcha-protected.request"; import { DeviceRequest } from "./device.request"; diff --git a/libs/common/src/auth/models/response/two-factor-web-authn.response.ts b/libs/common/src/auth/models/response/two-factor-web-authn.response.ts index 4a311095d71..35b6830b0df 100644 --- a/libs/common/src/auth/models/response/two-factor-web-authn.response.ts +++ b/libs/common/src/auth/models/response/two-factor-web-authn.response.ts @@ -1,5 +1,5 @@ -import { Utils } from "../../../misc/utils"; import { BaseResponse } from "../../../models/response/base.response"; +import { Utils } from "../../../platform/misc/utils"; export class TwoFactorWebAuthnResponse extends BaseResponse { enabled: boolean; diff --git a/libs/common/src/auth/services/account-api.service.ts b/libs/common/src/auth/services/account-api.service.ts index 4d96f6506f7..05ec1b8453c 100644 --- a/libs/common/src/auth/services/account-api.service.ts +++ b/libs/common/src/auth/services/account-api.service.ts @@ -1,6 +1,6 @@ import { ApiService } from "../../abstractions/api.service"; -import { LogService } from "../../abstractions/log.service"; import { UserVerificationService } from "../../abstractions/userVerification/userVerification.service.abstraction"; +import { LogService } from "../../platform/abstractions/log.service"; import { Verification } from "../../types/verification"; import { AccountApiService } from "../abstractions/account-api.service"; import { InternalAccountService } from "../abstractions/account.service"; diff --git a/libs/common/src/auth/services/account.service.ts b/libs/common/src/auth/services/account.service.ts index 8d6cd310c0d..02c12050952 100644 --- a/libs/common/src/auth/services/account.service.ts +++ b/libs/common/src/auth/services/account.service.ts @@ -1,6 +1,6 @@ -import { LogService } from "../../abstractions/log.service"; -import { MessagingService } from "../../abstractions/messaging.service"; import { InternalAccountService } from "../../auth/abstractions/account.service"; +import { LogService } from "../../platform/abstractions/log.service"; +import { MessagingService } from "../../platform/abstractions/messaging.service"; export class AccountServiceImplementation implements InternalAccountService { constructor(private messagingService: MessagingService, private logService: LogService) {} diff --git a/libs/common/src/auth/services/auth.service.ts b/libs/common/src/auth/services/auth.service.ts index f8028c6944a..6650ce798ea 100644 --- a/libs/common/src/auth/services/auth.service.ts +++ b/libs/common/src/auth/services/auth.service.ts @@ -1,22 +1,22 @@ import { Observable, Subject } from "rxjs"; import { ApiService } from "../../abstractions/api.service"; -import { AppIdService } from "../../abstractions/appId.service"; -import { CryptoService } from "../../abstractions/crypto.service"; -import { EncryptService } from "../../abstractions/encrypt.service"; -import { EnvironmentService } from "../../abstractions/environment.service"; -import { I18nService } from "../../abstractions/i18n.service"; -import { LogService } from "../../abstractions/log.service"; -import { MessagingService } from "../../abstractions/messaging.service"; -import { PlatformUtilsService } from "../../abstractions/platformUtils.service"; -import { StateService } from "../../abstractions/state.service"; import { PolicyService } from "../../admin-console/abstractions/policy/policy.service.abstraction"; import { KdfType, KeySuffixOptions } from "../../enums"; -import { Utils } from "../../misc/utils"; -import { SymmetricCryptoKey } from "../../models/domain/symmetric-crypto-key"; import { PreloginRequest } from "../../models/request/prelogin.request"; import { ErrorResponse } from "../../models/response/error.response"; import { AuthRequestPushNotification } from "../../models/response/notification.response"; +import { AppIdService } from "../../platform/abstractions/app-id.service"; +import { CryptoService } from "../../platform/abstractions/crypto.service"; +import { EncryptService } from "../../platform/abstractions/encrypt.service"; +import { EnvironmentService } from "../../platform/abstractions/environment.service"; +import { I18nService } from "../../platform/abstractions/i18n.service"; +import { LogService } from "../../platform/abstractions/log.service"; +import { MessagingService } from "../../platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service"; +import { StateService } from "../../platform/abstractions/state.service"; +import { Utils } from "../../platform/misc/utils"; +import { SymmetricCryptoKey } from "../../platform/models/domain/symmetric-crypto-key"; import { PasswordGenerationServiceAbstraction } from "../../tools/generator/password"; import { AuthService as AuthServiceAbstraction } from "../abstractions/auth.service"; import { KeyConnectorService } from "../abstractions/key-connector.service"; diff --git a/libs/common/src/auth/services/key-connector.service.ts b/libs/common/src/auth/services/key-connector.service.ts index c601e6d42b3..17a891c40ad 100644 --- a/libs/common/src/auth/services/key-connector.service.ts +++ b/libs/common/src/auth/services/key-connector.service.ts @@ -1,13 +1,13 @@ import { ApiService } from "../../abstractions/api.service"; -import { CryptoService } from "../../abstractions/crypto.service"; -import { CryptoFunctionService } from "../../abstractions/cryptoFunction.service"; -import { LogService } from "../../abstractions/log.service"; -import { StateService } from "../../abstractions/state.service"; import { OrganizationService } from "../../admin-console/abstractions/organization/organization.service.abstraction"; import { OrganizationUserType } from "../../admin-console/enums"; -import { Utils } from "../../misc/utils"; -import { SymmetricCryptoKey } from "../../models/domain/symmetric-crypto-key"; import { KeysRequest } from "../../models/request/keys.request"; +import { CryptoFunctionService } from "../../platform/abstractions/crypto-function.service"; +import { CryptoService } from "../../platform/abstractions/crypto.service"; +import { LogService } from "../../platform/abstractions/log.service"; +import { StateService } from "../../platform/abstractions/state.service"; +import { Utils } from "../../platform/misc/utils"; +import { SymmetricCryptoKey } from "../../platform/models/domain/symmetric-crypto-key"; import { KeyConnectorService as KeyConnectorServiceAbstraction } from "../abstractions/key-connector.service"; import { TokenService } from "../abstractions/token.service"; import { KdfConfig } from "../models/domain/kdf-config"; diff --git a/libs/common/src/auth/services/login.service.ts b/libs/common/src/auth/services/login.service.ts index d1ab63c5660..f1d038b2f80 100644 --- a/libs/common/src/auth/services/login.service.ts +++ b/libs/common/src/auth/services/login.service.ts @@ -1,4 +1,4 @@ -import { StateService } from "../../abstractions/state.service"; +import { StateService } from "../../platform/abstractions/state.service"; import { LoginService as LoginServiceAbstraction } from "../abstractions/login.service"; export class LoginService implements LoginServiceAbstraction { diff --git a/libs/common/src/auth/services/token.service.ts b/libs/common/src/auth/services/token.service.ts index fec14272572..d68917f21be 100644 --- a/libs/common/src/auth/services/token.service.ts +++ b/libs/common/src/auth/services/token.service.ts @@ -1,5 +1,5 @@ -import { StateService } from "../../abstractions/state.service"; -import { Utils } from "../../misc/utils"; +import { StateService } from "../../platform/abstractions/state.service"; +import { Utils } from "../../platform/misc/utils"; import { TokenService as TokenServiceAbstraction } from "../abstractions/token.service"; import { IdentityTokenResponse } from "../models/response/identity-token.response"; diff --git a/libs/common/src/auth/services/two-factor.service.ts b/libs/common/src/auth/services/two-factor.service.ts index 542d190c04e..b391b7d39e1 100644 --- a/libs/common/src/auth/services/two-factor.service.ts +++ b/libs/common/src/auth/services/two-factor.service.ts @@ -1,5 +1,5 @@ -import { I18nService } from "../../abstractions/i18n.service"; -import { PlatformUtilsService } from "../../abstractions/platformUtils.service"; +import { I18nService } from "../../platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service"; import { TwoFactorProviderDetails, TwoFactorService as TwoFactorServiceAbstraction, diff --git a/libs/common/src/auth/services/user-verification/user-verification.service.ts b/libs/common/src/auth/services/user-verification/user-verification.service.ts index 244db1da921..085c6ac5727 100644 --- a/libs/common/src/auth/services/user-verification/user-verification.service.ts +++ b/libs/common/src/auth/services/user-verification/user-verification.service.ts @@ -1,7 +1,7 @@ -import { CryptoService } from "../../../abstractions/crypto.service"; -import { I18nService } from "../../../abstractions/i18n.service"; import { UserVerificationApiServiceAbstraction } from "../../../abstractions/userVerification/userVerification-api.service.abstraction"; import { UserVerificationService as UserVerificationServiceAbstraction } from "../../../abstractions/userVerification/userVerification.service.abstraction"; +import { CryptoService } from "../../../platform/abstractions/crypto.service"; +import { I18nService } from "../../../platform/abstractions/i18n.service"; import { Verification } from "../../../types/verification"; import { VerificationType } from "../../enums/verification-type"; import { SecretVerificationRequest } from "../../models/request/secret-verification.request"; diff --git a/libs/common/src/auth/webauthn-iframe.ts b/libs/common/src/auth/webauthn-iframe.ts index 969dde04605..b08977e87c9 100644 --- a/libs/common/src/auth/webauthn-iframe.ts +++ b/libs/common/src/auth/webauthn-iframe.ts @@ -1,5 +1,5 @@ -import { I18nService } from "../abstractions/i18n.service"; -import { PlatformUtilsService } from "../abstractions/platformUtils.service"; +import { I18nService } from "../platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "../platform/abstractions/platform-utils.service"; export class WebAuthnIFrame { private iframe: HTMLIFrameElement = null; diff --git a/libs/common/src/models/export/card.export.ts b/libs/common/src/models/export/card.export.ts index 9818625e542..55bb3a7be14 100644 --- a/libs/common/src/models/export/card.export.ts +++ b/libs/common/src/models/export/card.export.ts @@ -1,6 +1,6 @@ +import { EncString } from "../../platform/models/domain/enc-string"; import { Card as CardDomain } from "../../vault/models/domain/card"; import { CardView } from "../../vault/models/view/card.view"; -import { EncString } from "../domain/enc-string"; export class CardExport { static template(): CardExport { diff --git a/libs/common/src/models/export/cipher.export.ts b/libs/common/src/models/export/cipher.export.ts index 44b1cb4efff..5bfde78b557 100644 --- a/libs/common/src/models/export/cipher.export.ts +++ b/libs/common/src/models/export/cipher.export.ts @@ -1,8 +1,8 @@ +import { EncString } from "../../platform/models/domain/enc-string"; import { CipherRepromptType } from "../../vault/enums/cipher-reprompt-type"; import { CipherType } from "../../vault/enums/cipher-type"; import { Cipher as CipherDomain } from "../../vault/models/domain/cipher"; import { CipherView } from "../../vault/models/view/cipher.view"; -import { EncString } from "../domain/enc-string"; import { CardExport } from "./card.export"; import { FieldExport } from "./field.export"; diff --git a/libs/common/src/models/export/collection.export.ts b/libs/common/src/models/export/collection.export.ts index aa0d7d194f2..1d454323a9c 100644 --- a/libs/common/src/models/export/collection.export.ts +++ b/libs/common/src/models/export/collection.export.ts @@ -1,6 +1,6 @@ import { Collection as CollectionDomain } from "../../admin-console/models/domain/collection"; import { CollectionView } from "../../admin-console/models/view/collection.view"; -import { EncString } from "../domain/enc-string"; +import { EncString } from "../../platform/models/domain/enc-string"; export class CollectionExport { static template(): CollectionExport { diff --git a/libs/common/src/models/export/field.export.ts b/libs/common/src/models/export/field.export.ts index 645bec10867..b30ce64eeb9 100644 --- a/libs/common/src/models/export/field.export.ts +++ b/libs/common/src/models/export/field.export.ts @@ -1,7 +1,7 @@ import { FieldType, LinkedIdType } from "../../enums"; +import { EncString } from "../../platform/models/domain/enc-string"; import { Field as FieldDomain } from "../../vault/models/domain/field"; import { FieldView } from "../../vault/models/view/field.view"; -import { EncString } from "../domain/enc-string"; export class FieldExport { static template(): FieldExport { diff --git a/libs/common/src/models/export/folder.export.ts b/libs/common/src/models/export/folder.export.ts index 94446d77858..4015034ebe5 100644 --- a/libs/common/src/models/export/folder.export.ts +++ b/libs/common/src/models/export/folder.export.ts @@ -1,6 +1,6 @@ +import { EncString } from "../../platform/models/domain/enc-string"; import { Folder as FolderDomain } from "../../vault/models/domain/folder"; import { FolderView } from "../../vault/models/view/folder.view"; -import { EncString } from "../domain/enc-string"; export class FolderExport { static template(): FolderExport { diff --git a/libs/common/src/models/export/identity.export.ts b/libs/common/src/models/export/identity.export.ts index 4a1b4056569..2eb9c8364f2 100644 --- a/libs/common/src/models/export/identity.export.ts +++ b/libs/common/src/models/export/identity.export.ts @@ -1,6 +1,6 @@ +import { EncString } from "../../platform/models/domain/enc-string"; import { Identity as IdentityDomain } from "../../vault/models/domain/identity"; import { IdentityView } from "../../vault/models/view/identity.view"; -import { EncString } from "../domain/enc-string"; export class IdentityExport { static template(): IdentityExport { diff --git a/libs/common/src/models/export/login-uri.export.ts b/libs/common/src/models/export/login-uri.export.ts index fd031f64754..af9c362e44e 100644 --- a/libs/common/src/models/export/login-uri.export.ts +++ b/libs/common/src/models/export/login-uri.export.ts @@ -1,7 +1,7 @@ import { UriMatchType } from "../../enums"; +import { EncString } from "../../platform/models/domain/enc-string"; import { LoginUri as LoginUriDomain } from "../../vault/models/domain/login-uri"; import { LoginUriView } from "../../vault/models/view/login-uri.view"; -import { EncString } from "../domain/enc-string"; export class LoginUriExport { static template(): LoginUriExport { diff --git a/libs/common/src/models/export/login.export.ts b/libs/common/src/models/export/login.export.ts index f33fccc0dbc..7a22b12537f 100644 --- a/libs/common/src/models/export/login.export.ts +++ b/libs/common/src/models/export/login.export.ts @@ -1,6 +1,6 @@ +import { EncString } from "../../platform/models/domain/enc-string"; import { Login as LoginDomain } from "../../vault/models/domain/login"; import { LoginView } from "../../vault/models/view/login.view"; -import { EncString } from "../domain/enc-string"; import { LoginUriExport } from "./login-uri.export"; diff --git a/libs/common/src/models/response/error.response.ts b/libs/common/src/models/response/error.response.ts index 81b69d540b9..43e30df0eaa 100644 --- a/libs/common/src/models/response/error.response.ts +++ b/libs/common/src/models/response/error.response.ts @@ -1,4 +1,4 @@ -import { Utils } from "../../misc/utils"; +import { Utils } from "../../platform/misc/utils"; import { BaseResponse } from "./base.response"; diff --git a/libs/common/src/abstractions/appId.service.ts b/libs/common/src/platform/abstractions/app-id.service.ts similarity index 100% rename from libs/common/src/abstractions/appId.service.ts rename to libs/common/src/platform/abstractions/app-id.service.ts diff --git a/libs/common/src/abstractions/broadcaster.service.ts b/libs/common/src/platform/abstractions/broadcaster.service.ts similarity index 100% rename from libs/common/src/abstractions/broadcaster.service.ts rename to libs/common/src/platform/abstractions/broadcaster.service.ts diff --git a/libs/common/src/abstractions/config/config-api.service.abstraction.ts b/libs/common/src/platform/abstractions/config/config-api.service.abstraction.ts similarity index 100% rename from libs/common/src/abstractions/config/config-api.service.abstraction.ts rename to libs/common/src/platform/abstractions/config/config-api.service.abstraction.ts diff --git a/libs/common/src/abstractions/config/config.service.abstraction.ts b/libs/common/src/platform/abstractions/config/config.service.abstraction.ts similarity index 88% rename from libs/common/src/abstractions/config/config.service.abstraction.ts rename to libs/common/src/platform/abstractions/config/config.service.abstraction.ts index dd9d435ed3a..a08bb31f961 100644 --- a/libs/common/src/abstractions/config/config.service.abstraction.ts +++ b/libs/common/src/platform/abstractions/config/config.service.abstraction.ts @@ -1,6 +1,6 @@ import { Observable } from "rxjs"; -import { FeatureFlag } from "../../enums/feature-flag.enum"; +import { FeatureFlag } from "../../../enums/feature-flag.enum"; import { ServerConfig } from "./server-config"; diff --git a/libs/common/src/abstractions/config/server-config.ts b/libs/common/src/platform/abstractions/config/server-config.ts similarity index 100% rename from libs/common/src/abstractions/config/server-config.ts rename to libs/common/src/platform/abstractions/config/server-config.ts diff --git a/libs/common/src/abstractions/cryptoFunction.service.ts b/libs/common/src/platform/abstractions/crypto-function.service.ts similarity index 97% rename from libs/common/src/abstractions/cryptoFunction.service.ts rename to libs/common/src/platform/abstractions/crypto-function.service.ts index 313f9436cb6..98b47b0f38c 100644 --- a/libs/common/src/abstractions/cryptoFunction.service.ts +++ b/libs/common/src/platform/abstractions/crypto-function.service.ts @@ -1,6 +1,6 @@ +import { CsprngArray } from "../../types/csprng"; import { DecryptParameters } from "../models/domain/decrypt-parameters"; import { SymmetricCryptoKey } from "../models/domain/symmetric-crypto-key"; -import { CsprngArray } from "../types/csprng"; export abstract class CryptoFunctionService { pbkdf2: ( diff --git a/libs/common/src/abstractions/crypto.service.ts b/libs/common/src/platform/abstractions/crypto.service.ts similarity index 89% rename from libs/common/src/abstractions/crypto.service.ts rename to libs/common/src/platform/abstractions/crypto.service.ts index 19a0017737d..4fbd6536a35 100644 --- a/libs/common/src/abstractions/crypto.service.ts +++ b/libs/common/src/platform/abstractions/crypto.service.ts @@ -1,8 +1,8 @@ -import { ProfileOrganizationResponse } from "../admin-console/models/response/profile-organization.response"; -import { ProfileProviderOrganizationResponse } from "../admin-console/models/response/profile-provider-organization.response"; -import { ProfileProviderResponse } from "../admin-console/models/response/profile-provider.response"; -import { KdfConfig } from "../auth/models/domain/kdf-config"; -import { HashPurpose, KdfType, KeySuffixOptions } from "../enums"; +import { ProfileOrganizationResponse } from "../../admin-console/models/response/profile-organization.response"; +import { ProfileProviderOrganizationResponse } from "../../admin-console/models/response/profile-provider-organization.response"; +import { ProfileProviderResponse } from "../../admin-console/models/response/profile-provider.response"; +import { KdfConfig } from "../../auth/models/domain/kdf-config"; +import { KeySuffixOptions, KdfType, HashPurpose } from "../../enums"; import { EncArrayBuffer } from "../models/domain/enc-array-buffer"; import { EncString } from "../models/domain/enc-string"; import { SymmetricCryptoKey } from "../models/domain/symmetric-crypto-key"; diff --git a/libs/common/src/abstractions/encrypt.service.ts b/libs/common/src/platform/abstractions/encrypt.service.ts similarity index 82% rename from libs/common/src/abstractions/encrypt.service.ts rename to libs/common/src/platform/abstractions/encrypt.service.ts index 17e72907c8a..98802b5b3ba 100644 --- a/libs/common/src/abstractions/encrypt.service.ts +++ b/libs/common/src/platform/abstractions/encrypt.service.ts @@ -1,5 +1,5 @@ -import { IEncrypted } from "../interfaces/IEncrypted"; import { Decryptable } from "../interfaces/decryptable.interface"; +import { Encrypted } from "../interfaces/encrypted"; import { InitializerMetadata } from "../interfaces/initializer-metadata.interface"; import { EncArrayBuffer } from "../models/domain/enc-array-buffer"; import { EncString } from "../models/domain/enc-string"; @@ -12,8 +12,8 @@ export abstract class EncryptService { key?: SymmetricCryptoKey ) => Promise; abstract decryptToUtf8: (encString: EncString, key: SymmetricCryptoKey) => Promise; - abstract decryptToBytes: (encThing: IEncrypted, key: SymmetricCryptoKey) => Promise; - abstract resolveLegacyKey: (key: SymmetricCryptoKey, encThing: IEncrypted) => SymmetricCryptoKey; + abstract decryptToBytes: (encThing: Encrypted, key: SymmetricCryptoKey) => Promise; + abstract resolveLegacyKey: (key: SymmetricCryptoKey, encThing: Encrypted) => SymmetricCryptoKey; abstract decryptItems: ( items: Decryptable[], key: SymmetricCryptoKey diff --git a/libs/common/src/abstractions/environment.service.ts b/libs/common/src/platform/abstractions/environment.service.ts similarity index 100% rename from libs/common/src/abstractions/environment.service.ts rename to libs/common/src/platform/abstractions/environment.service.ts diff --git a/libs/common/src/abstractions/fileDownload/fileDownloadBuilder.ts b/libs/common/src/platform/abstractions/file-download/file-download.builder.ts similarity index 96% rename from libs/common/src/abstractions/fileDownload/fileDownloadBuilder.ts rename to libs/common/src/platform/abstractions/file-download/file-download.builder.ts index 29e54a6e28a..8db379fec73 100644 --- a/libs/common/src/abstractions/fileDownload/fileDownloadBuilder.ts +++ b/libs/common/src/platform/abstractions/file-download/file-download.builder.ts @@ -1,4 +1,4 @@ -import { FileDownloadRequest } from "./fileDownloadRequest"; +import { FileDownloadRequest } from "./file-download.request"; export class FileDownloadBuilder { get blobOptions(): any { diff --git a/libs/common/src/abstractions/fileDownload/fileDownloadRequest.ts b/libs/common/src/platform/abstractions/file-download/file-download.request.ts similarity index 100% rename from libs/common/src/abstractions/fileDownload/fileDownloadRequest.ts rename to libs/common/src/platform/abstractions/file-download/file-download.request.ts diff --git a/libs/common/src/abstractions/fileDownload/fileDownload.service.ts b/libs/common/src/platform/abstractions/file-download/file-download.service.ts similarity index 61% rename from libs/common/src/abstractions/fileDownload/fileDownload.service.ts rename to libs/common/src/platform/abstractions/file-download/file-download.service.ts index c3829225897..44d082d72bf 100644 --- a/libs/common/src/abstractions/fileDownload/fileDownload.service.ts +++ b/libs/common/src/platform/abstractions/file-download/file-download.service.ts @@ -1,4 +1,4 @@ -import { FileDownloadRequest } from "./fileDownloadRequest"; +import { FileDownloadRequest } from "./file-download.request"; export abstract class FileDownloadService { download: (request: FileDownloadRequest) => void; diff --git a/libs/common/src/abstractions/file-upload/file-upload.service.ts b/libs/common/src/platform/abstractions/file-upload/file-upload.service.ts similarity index 91% rename from libs/common/src/abstractions/file-upload/file-upload.service.ts rename to libs/common/src/platform/abstractions/file-upload/file-upload.service.ts index eff5a018a29..29fde216453 100644 --- a/libs/common/src/abstractions/file-upload/file-upload.service.ts +++ b/libs/common/src/platform/abstractions/file-upload/file-upload.service.ts @@ -1,4 +1,4 @@ -import { FileUploadType } from "../../enums"; +import { FileUploadType } from "../../../enums"; import { EncArrayBuffer } from "../../models/domain/enc-array-buffer"; import { EncString } from "../../models/domain/enc-string"; diff --git a/libs/common/src/abstractions/formValidationErrors.service.ts b/libs/common/src/platform/abstractions/form-validation-errors.service.ts similarity index 100% rename from libs/common/src/abstractions/formValidationErrors.service.ts rename to libs/common/src/platform/abstractions/form-validation-errors.service.ts diff --git a/libs/common/src/abstractions/i18n.service.ts b/libs/common/src/platform/abstractions/i18n.service.ts similarity index 100% rename from libs/common/src/abstractions/i18n.service.ts rename to libs/common/src/platform/abstractions/i18n.service.ts diff --git a/libs/common/src/abstractions/log.service.ts b/libs/common/src/platform/abstractions/log.service.ts similarity index 84% rename from libs/common/src/abstractions/log.service.ts rename to libs/common/src/platform/abstractions/log.service.ts index ea8520a5206..e8258060170 100644 --- a/libs/common/src/abstractions/log.service.ts +++ b/libs/common/src/platform/abstractions/log.service.ts @@ -1,4 +1,4 @@ -import { LogLevelType } from "../enums"; +import { LogLevelType } from "../../enums"; export abstract class LogService { debug: (message: string) => void; diff --git a/libs/common/src/abstractions/messaging.service.ts b/libs/common/src/platform/abstractions/messaging.service.ts similarity index 100% rename from libs/common/src/abstractions/messaging.service.ts rename to libs/common/src/platform/abstractions/messaging.service.ts diff --git a/libs/common/src/abstractions/platformUtils.service.ts b/libs/common/src/platform/abstractions/platform-utils.service.ts similarity index 95% rename from libs/common/src/abstractions/platformUtils.service.ts rename to libs/common/src/platform/abstractions/platform-utils.service.ts index fd21d854335..5db02f5a052 100644 --- a/libs/common/src/abstractions/platformUtils.service.ts +++ b/libs/common/src/platform/abstractions/platform-utils.service.ts @@ -1,4 +1,4 @@ -import { ClientType, DeviceType } from "../enums"; +import { ClientType, DeviceType } from "../../enums"; interface ToastOptions { timeout?: number; diff --git a/libs/common/src/abstractions/stateMigration.service.ts b/libs/common/src/platform/abstractions/state-migration.service.ts similarity index 100% rename from libs/common/src/abstractions/stateMigration.service.ts rename to libs/common/src/platform/abstractions/state-migration.service.ts diff --git a/libs/common/src/abstractions/state.service.ts b/libs/common/src/platform/abstractions/state.service.ts similarity index 93% rename from libs/common/src/abstractions/state.service.ts rename to libs/common/src/platform/abstractions/state.service.ts index 04cfb609fed..fffeb07909a 100644 --- a/libs/common/src/abstractions/state.service.ts +++ b/libs/common/src/platform/abstractions/state.service.ts @@ -1,32 +1,32 @@ import { Observable } from "rxjs"; -import { CollectionData } from "../admin-console/models/data/collection.data"; -import { EncryptedOrganizationKeyData } from "../admin-console/models/data/encrypted-organization-key.data"; -import { OrganizationData } from "../admin-console/models/data/organization.data"; -import { PolicyData } from "../admin-console/models/data/policy.data"; -import { ProviderData } from "../admin-console/models/data/provider.data"; -import { Policy } from "../admin-console/models/domain/policy"; -import { CollectionView } from "../admin-console/models/view/collection.view"; -import { EnvironmentUrls } from "../auth/models/domain/environment-urls"; -import { ForceResetPasswordReason } from "../auth/models/domain/force-reset-password-reason"; -import { KdfConfig } from "../auth/models/domain/kdf-config"; -import { BiometricKey } from "../auth/types/biometric-key"; -import { KdfType, ThemeType, UriMatchType } from "../enums"; -import { EventData } from "../models/data/event.data"; +import { CollectionData } from "../../admin-console/models/data/collection.data"; +import { EncryptedOrganizationKeyData } from "../../admin-console/models/data/encrypted-organization-key.data"; +import { OrganizationData } from "../../admin-console/models/data/organization.data"; +import { PolicyData } from "../../admin-console/models/data/policy.data"; +import { ProviderData } from "../../admin-console/models/data/provider.data"; +import { Policy } from "../../admin-console/models/domain/policy"; +import { CollectionView } from "../../admin-console/models/view/collection.view"; +import { EnvironmentUrls } from "../../auth/models/domain/environment-urls"; +import { ForceResetPasswordReason } from "../../auth/models/domain/force-reset-password-reason"; +import { KdfConfig } from "../../auth/models/domain/kdf-config"; +import { BiometricKey } from "../../auth/types/biometric-key"; +import { KdfType, ThemeType, UriMatchType } from "../../enums"; +import { EventData } from "../../models/data/event.data"; +import { WindowState } from "../../models/domain/window-state"; +import { GeneratedPasswordHistory } from "../../tools/generator/password"; +import { SendData } from "../../tools/send/models/data/send.data"; +import { SendView } from "../../tools/send/models/view/send.view"; +import { CipherData } from "../../vault/models/data/cipher.data"; +import { FolderData } from "../../vault/models/data/folder.data"; +import { LocalData } from "../../vault/models/data/local.data"; +import { CipherView } from "../../vault/models/view/cipher.view"; +import { AddEditCipherInfo } from "../../vault/types/add-edit-cipher-info"; import { ServerConfigData } from "../models/data/server-config.data"; import { Account, AccountSettingsSettings } from "../models/domain/account"; import { EncString } from "../models/domain/enc-string"; import { StorageOptions } from "../models/domain/storage-options"; import { DeviceKey, SymmetricCryptoKey } from "../models/domain/symmetric-crypto-key"; -import { WindowState } from "../models/domain/window-state"; -import { GeneratedPasswordHistory } from "../tools/generator/password"; -import { SendData } from "../tools/send/models/data/send.data"; -import { SendView } from "../tools/send/models/view/send.view"; -import { CipherData } from "../vault/models/data/cipher.data"; -import { FolderData } from "../vault/models/data/folder.data"; -import { LocalData } from "../vault/models/data/local.data"; -import { CipherView } from "../vault/models/view/cipher.view"; -import { AddEditCipherInfo } from "../vault/types/add-edit-cipher-info"; export abstract class StateService { accounts$: Observable<{ [userId: string]: T }>; diff --git a/libs/common/src/abstractions/storage.service.ts b/libs/common/src/platform/abstractions/storage.service.ts similarity index 100% rename from libs/common/src/abstractions/storage.service.ts rename to libs/common/src/platform/abstractions/storage.service.ts diff --git a/libs/common/src/abstractions/system.service.ts b/libs/common/src/platform/abstractions/system.service.ts similarity index 79% rename from libs/common/src/abstractions/system.service.ts rename to libs/common/src/platform/abstractions/system.service.ts index 20e77ed1495..5a7e11f9a12 100644 --- a/libs/common/src/abstractions/system.service.ts +++ b/libs/common/src/platform/abstractions/system.service.ts @@ -1,4 +1,4 @@ -import { AuthService } from "../auth/abstractions/auth.service"; +import { AuthService } from "../../auth/abstractions/auth.service"; export abstract class SystemService { startProcessReload: (authService: AuthService) => Promise; diff --git a/libs/common/src/abstractions/translation.service.ts b/libs/common/src/platform/abstractions/translation.service.ts similarity index 100% rename from libs/common/src/abstractions/translation.service.ts rename to libs/common/src/platform/abstractions/translation.service.ts diff --git a/libs/common/src/abstractions/validation.service.ts b/libs/common/src/platform/abstractions/validation.service.ts similarity index 100% rename from libs/common/src/abstractions/validation.service.ts rename to libs/common/src/platform/abstractions/validation.service.ts diff --git a/libs/common/src/factories/accountFactory.ts b/libs/common/src/platform/factories/account-factory.ts similarity index 100% rename from libs/common/src/factories/accountFactory.ts rename to libs/common/src/platform/factories/account-factory.ts diff --git a/libs/common/src/factories/globalStateFactory.ts b/libs/common/src/platform/factories/global-state-factory.ts similarity index 100% rename from libs/common/src/factories/globalStateFactory.ts rename to libs/common/src/platform/factories/global-state-factory.ts diff --git a/libs/common/src/factories/stateFactory.ts b/libs/common/src/platform/factories/state-factory.ts similarity index 88% rename from libs/common/src/factories/stateFactory.ts rename to libs/common/src/platform/factories/state-factory.ts index ea53d7765c9..5a11b90e18a 100644 --- a/libs/common/src/factories/stateFactory.ts +++ b/libs/common/src/platform/factories/state-factory.ts @@ -1,8 +1,8 @@ import { Account } from "../models/domain/account"; import { GlobalState } from "../models/domain/global-state"; -import { AccountFactory } from "./accountFactory"; -import { GlobalStateFactory } from "./globalStateFactory"; +import { AccountFactory } from "./account-factory"; +import { GlobalStateFactory } from "./global-state-factory"; export class StateFactory< TGlobal extends GlobalState = GlobalState, diff --git a/libs/common/src/interfaces/decryptable.interface.ts b/libs/common/src/platform/interfaces/decryptable.interface.ts similarity index 100% rename from libs/common/src/interfaces/decryptable.interface.ts rename to libs/common/src/platform/interfaces/decryptable.interface.ts diff --git a/libs/common/src/interfaces/IEncrypted.ts b/libs/common/src/platform/interfaces/encrypted.ts similarity index 60% rename from libs/common/src/interfaces/IEncrypted.ts rename to libs/common/src/platform/interfaces/encrypted.ts index 9ad23b2f4b3..a5730302dca 100644 --- a/libs/common/src/interfaces/IEncrypted.ts +++ b/libs/common/src/platform/interfaces/encrypted.ts @@ -1,6 +1,6 @@ -import { EncryptionType } from "../enums"; +import { EncryptionType } from "../../enums"; -export interface IEncrypted { +export interface Encrypted { encryptionType?: EncryptionType; dataBytes: ArrayBuffer; macBytes: ArrayBuffer; diff --git a/libs/common/src/interfaces/initializer-metadata.interface.ts b/libs/common/src/platform/interfaces/initializer-metadata.interface.ts similarity index 100% rename from libs/common/src/interfaces/initializer-metadata.interface.ts rename to libs/common/src/platform/interfaces/initializer-metadata.interface.ts diff --git a/libs/common/src/misc/flags.spec.ts b/libs/common/src/platform/misc/flags.spec.ts similarity index 100% rename from libs/common/src/misc/flags.spec.ts rename to libs/common/src/platform/misc/flags.spec.ts diff --git a/libs/common/src/misc/flags.ts b/libs/common/src/platform/misc/flags.ts similarity index 100% rename from libs/common/src/misc/flags.ts rename to libs/common/src/platform/misc/flags.ts diff --git a/libs/common/src/misc/sequentialize.spec.ts b/libs/common/src/platform/misc/sequentialize.spec.ts similarity index 100% rename from libs/common/src/misc/sequentialize.spec.ts rename to libs/common/src/platform/misc/sequentialize.spec.ts diff --git a/libs/common/src/misc/sequentialize.ts b/libs/common/src/platform/misc/sequentialize.ts similarity index 100% rename from libs/common/src/misc/sequentialize.ts rename to libs/common/src/platform/misc/sequentialize.ts diff --git a/libs/common/src/misc/throttle.spec.ts b/libs/common/src/platform/misc/throttle.spec.ts similarity index 100% rename from libs/common/src/misc/throttle.spec.ts rename to libs/common/src/platform/misc/throttle.spec.ts diff --git a/libs/common/src/misc/throttle.ts b/libs/common/src/platform/misc/throttle.ts similarity index 100% rename from libs/common/src/misc/throttle.ts rename to libs/common/src/platform/misc/throttle.ts diff --git a/libs/common/src/misc/utils.spec.ts b/libs/common/src/platform/misc/utils.spec.ts similarity index 100% rename from libs/common/src/misc/utils.spec.ts rename to libs/common/src/platform/misc/utils.spec.ts diff --git a/libs/common/src/misc/utils.ts b/libs/common/src/platform/misc/utils.ts similarity index 100% rename from libs/common/src/misc/utils.ts rename to libs/common/src/platform/misc/utils.ts diff --git a/libs/common/src/misc/wordlist.ts b/libs/common/src/platform/misc/wordlist.ts similarity index 100% rename from libs/common/src/misc/wordlist.ts rename to libs/common/src/platform/misc/wordlist.ts diff --git a/libs/common/src/models/data/server-config.data.spec.ts b/libs/common/src/platform/models/data/server-config.data.spec.ts similarity index 100% rename from libs/common/src/models/data/server-config.data.spec.ts rename to libs/common/src/platform/models/data/server-config.data.spec.ts diff --git a/libs/common/src/models/data/server-config.data.ts b/libs/common/src/platform/models/data/server-config.data.ts similarity index 100% rename from libs/common/src/models/data/server-config.data.ts rename to libs/common/src/platform/models/data/server-config.data.ts diff --git a/libs/common/src/models/domain/account-keys.spec.ts b/libs/common/src/platform/models/domain/account-keys.spec.ts similarity index 97% rename from libs/common/src/models/domain/account-keys.spec.ts rename to libs/common/src/platform/models/domain/account-keys.spec.ts index bacfac25a65..88183229f55 100644 --- a/libs/common/src/models/domain/account-keys.spec.ts +++ b/libs/common/src/platform/models/domain/account-keys.spec.ts @@ -1,4 +1,4 @@ -import { makeStaticByteArray } from "../../../spec"; +import { makeStaticByteArray } from "../../../../spec"; import { Utils } from "../../misc/utils"; import { AccountKeys, EncryptionPair } from "./account"; diff --git a/libs/common/src/models/domain/account-profile.spec.ts b/libs/common/src/platform/models/domain/account-profile.spec.ts similarity index 100% rename from libs/common/src/models/domain/account-profile.spec.ts rename to libs/common/src/platform/models/domain/account-profile.spec.ts diff --git a/libs/common/src/models/domain/account-settings.spec.ts b/libs/common/src/platform/models/domain/account-settings.spec.ts similarity index 100% rename from libs/common/src/models/domain/account-settings.spec.ts rename to libs/common/src/platform/models/domain/account-settings.spec.ts diff --git a/libs/common/src/models/domain/account-tokens.spec.ts b/libs/common/src/platform/models/domain/account-tokens.spec.ts similarity index 100% rename from libs/common/src/models/domain/account-tokens.spec.ts rename to libs/common/src/platform/models/domain/account-tokens.spec.ts diff --git a/libs/common/src/models/domain/account.spec.ts b/libs/common/src/platform/models/domain/account.spec.ts similarity index 100% rename from libs/common/src/models/domain/account.spec.ts rename to libs/common/src/platform/models/domain/account.spec.ts diff --git a/libs/common/src/models/domain/account.ts b/libs/common/src/platform/models/domain/account.ts similarity index 85% rename from libs/common/src/models/domain/account.ts rename to libs/common/src/platform/models/domain/account.ts index db98a17b42c..39461d19851 100644 --- a/libs/common/src/models/domain/account.ts +++ b/libs/common/src/platform/models/domain/account.ts @@ -1,26 +1,26 @@ import { Jsonify } from "type-fest"; -import { CollectionData } from "../../admin-console/models/data/collection.data"; -import { EncryptedOrganizationKeyData } from "../../admin-console/models/data/encrypted-organization-key.data"; -import { OrganizationData } from "../../admin-console/models/data/organization.data"; -import { PolicyData } from "../../admin-console/models/data/policy.data"; -import { ProviderData } from "../../admin-console/models/data/provider.data"; -import { Policy } from "../../admin-console/models/domain/policy"; -import { CollectionView } from "../../admin-console/models/view/collection.view"; -import { AuthenticationStatus } from "../../auth/enums/authentication-status"; -import { EnvironmentUrls } from "../../auth/models/domain/environment-urls"; -import { ForceResetPasswordReason } from "../../auth/models/domain/force-reset-password-reason"; -import { KdfType, UriMatchType } from "../../enums"; +import { CollectionData } from "../../../admin-console/models/data/collection.data"; +import { EncryptedOrganizationKeyData } from "../../../admin-console/models/data/encrypted-organization-key.data"; +import { OrganizationData } from "../../../admin-console/models/data/organization.data"; +import { PolicyData } from "../../../admin-console/models/data/policy.data"; +import { ProviderData } from "../../../admin-console/models/data/provider.data"; +import { Policy } from "../../../admin-console/models/domain/policy"; +import { CollectionView } from "../../../admin-console/models/view/collection.view"; +import { AuthenticationStatus } from "../../../auth/enums/authentication-status"; +import { EnvironmentUrls } from "../../../auth/models/domain/environment-urls"; +import { ForceResetPasswordReason } from "../../../auth/models/domain/force-reset-password-reason"; +import { KdfType, UriMatchType } from "../../../enums"; +import { EventData } from "../../../models/data/event.data"; +import { GeneratedPasswordHistory } from "../../../tools/generator/password"; +import { SendData } from "../../../tools/send/models/data/send.data"; +import { SendView } from "../../../tools/send/models/view/send.view"; +import { DeepJsonify } from "../../../types/deep-jsonify"; +import { CipherData } from "../../../vault/models/data/cipher.data"; +import { FolderData } from "../../../vault/models/data/folder.data"; +import { CipherView } from "../../../vault/models/view/cipher.view"; import { Utils } from "../../misc/utils"; -import { GeneratedPasswordHistory } from "../../tools/generator/password"; -import { SendData } from "../../tools/send/models/data/send.data"; -import { SendView } from "../../tools/send/models/view/send.view"; -import { DeepJsonify } from "../../types/deep-jsonify"; -import { CipherData } from "../../vault/models/data/cipher.data"; -import { FolderData } from "../../vault/models/data/folder.data"; -import { CipherView } from "../../vault/models/view/cipher.view"; -import { EventData } from "../data/event.data"; -import { ServerConfigData } from "../data/server-config.data"; +import { ServerConfigData } from "../../models/data/server-config.data"; import { EncString } from "./enc-string"; import { DeviceKey, SymmetricCryptoKey } from "./symmetric-crypto-key"; diff --git a/libs/common/src/models/domain/decrypt-parameters.ts b/libs/common/src/platform/models/domain/decrypt-parameters.ts similarity index 100% rename from libs/common/src/models/domain/decrypt-parameters.ts rename to libs/common/src/platform/models/domain/decrypt-parameters.ts diff --git a/libs/common/src/models/domain/domain-base.ts b/libs/common/src/platform/models/domain/domain-base.ts similarity index 97% rename from libs/common/src/models/domain/domain-base.ts rename to libs/common/src/platform/models/domain/domain-base.ts index 4c4bffd4cd5..af7df3de187 100644 --- a/libs/common/src/models/domain/domain-base.ts +++ b/libs/common/src/platform/models/domain/domain-base.ts @@ -1,4 +1,4 @@ -import { View } from "../view/view"; +import { View } from "../../../models/view/view"; import { EncString } from "./enc-string"; import { SymmetricCryptoKey } from "./symmetric-crypto-key"; diff --git a/libs/common/src/models/domain/enc-array-buffer.spec.ts b/libs/common/src/platform/models/domain/enc-array-buffer.spec.ts similarity index 96% rename from libs/common/src/models/domain/enc-array-buffer.spec.ts rename to libs/common/src/platform/models/domain/enc-array-buffer.spec.ts index 2a2052484fd..9e15d05e883 100644 --- a/libs/common/src/models/domain/enc-array-buffer.spec.ts +++ b/libs/common/src/platform/models/domain/enc-array-buffer.spec.ts @@ -1,5 +1,5 @@ -import { makeStaticByteArray } from "../../../spec"; -import { EncryptionType } from "../../enums"; +import { makeStaticByteArray } from "../../../../spec"; +import { EncryptionType } from "../../../enums"; import { EncArrayBuffer } from "./enc-array-buffer"; diff --git a/libs/common/src/models/domain/enc-array-buffer.ts b/libs/common/src/platform/models/domain/enc-array-buffer.ts similarity index 91% rename from libs/common/src/models/domain/enc-array-buffer.ts rename to libs/common/src/platform/models/domain/enc-array-buffer.ts index a3548c037e0..afaa4a5fb6f 100644 --- a/libs/common/src/models/domain/enc-array-buffer.ts +++ b/libs/common/src/platform/models/domain/enc-array-buffer.ts @@ -1,13 +1,13 @@ -import { EncryptionType } from "../../enums"; -import { IEncrypted } from "../../interfaces/IEncrypted"; -import { Utils } from "../../misc/utils"; +import { EncryptionType } from "../../../enums"; +import { Utils } from "../../../platform/misc/utils"; +import { Encrypted } from "../../interfaces/encrypted"; const ENC_TYPE_LENGTH = 1; const IV_LENGTH = 16; const MAC_LENGTH = 32; const MIN_DATA_LENGTH = 1; -export class EncArrayBuffer implements IEncrypted { +export class EncArrayBuffer implements Encrypted { readonly encryptionType: EncryptionType = null; readonly dataBytes: ArrayBuffer = null; readonly ivBytes: ArrayBuffer = null; diff --git a/libs/common/src/models/domain/enc-string.spec.ts b/libs/common/src/platform/models/domain/enc-string.spec.ts similarity index 97% rename from libs/common/src/models/domain/enc-string.spec.ts rename to libs/common/src/platform/models/domain/enc-string.spec.ts index 08ff9c145d4..31f515229d7 100644 --- a/libs/common/src/models/domain/enc-string.spec.ts +++ b/libs/common/src/platform/models/domain/enc-string.spec.ts @@ -2,13 +2,13 @@ import { Substitute, Arg } from "@fluffy-spoon/substitute"; import { mock, MockProxy } from "jest-mock-extended"; +import { EncryptionType } from "../../../enums"; +import { EncryptService } from "../../../platform/abstractions/encrypt.service"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { CryptoService } from "../../abstractions/crypto.service"; -import { EncryptService } from "../../abstractions/encrypt.service"; -import { EncryptionType } from "../../enums"; import { ContainerService } from "../../services/container.service"; import { EncString } from "./enc-string"; -import { SymmetricCryptoKey } from "./symmetric-crypto-key"; describe("EncString", () => { afterEach(() => { diff --git a/libs/common/src/models/domain/enc-string.ts b/libs/common/src/platform/models/domain/enc-string.ts similarity index 96% rename from libs/common/src/models/domain/enc-string.ts rename to libs/common/src/platform/models/domain/enc-string.ts index 3b2eed30962..8fe9fbe93f9 100644 --- a/libs/common/src/models/domain/enc-string.ts +++ b/libs/common/src/platform/models/domain/enc-string.ts @@ -1,12 +1,12 @@ import { Jsonify } from "type-fest"; -import { EncryptionType, EXPECTED_NUM_PARTS_BY_ENCRYPTION_TYPE } from "../../enums"; -import { IEncrypted } from "../../interfaces/IEncrypted"; -import { Utils } from "../../misc/utils"; +import { EncryptionType, EXPECTED_NUM_PARTS_BY_ENCRYPTION_TYPE } from "../../../enums"; +import { Utils } from "../../../platform/misc/utils"; +import { Encrypted } from "../../interfaces/encrypted"; import { SymmetricCryptoKey } from "./symmetric-crypto-key"; -export class EncString implements IEncrypted { +export class EncString implements Encrypted { encryptedString?: string; encryptionType?: EncryptionType; decryptedValue?: string; diff --git a/libs/common/src/models/domain/encrypted-object.ts b/libs/common/src/platform/models/domain/encrypted-object.ts similarity index 57% rename from libs/common/src/models/domain/encrypted-object.ts rename to libs/common/src/platform/models/domain/encrypted-object.ts index 08186fd357f..7679788efa0 100644 --- a/libs/common/src/models/domain/encrypted-object.ts +++ b/libs/common/src/platform/models/domain/encrypted-object.ts @@ -1,4 +1,4 @@ -import { SymmetricCryptoKey } from "./symmetric-crypto-key"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; export class EncryptedObject { iv: ArrayBuffer; diff --git a/libs/common/src/models/domain/encryption-pair.spec.ts b/libs/common/src/platform/models/domain/encryption-pair.spec.ts similarity index 100% rename from libs/common/src/models/domain/encryption-pair.spec.ts rename to libs/common/src/platform/models/domain/encryption-pair.spec.ts diff --git a/libs/common/src/models/domain/global-state.ts b/libs/common/src/platform/models/domain/global-state.ts similarity index 84% rename from libs/common/src/models/domain/global-state.ts rename to libs/common/src/platform/models/domain/global-state.ts index 5ed8557b48f..13a296883b4 100644 --- a/libs/common/src/models/domain/global-state.ts +++ b/libs/common/src/platform/models/domain/global-state.ts @@ -1,7 +1,6 @@ -import { EnvironmentUrls } from "../../auth/models/domain/environment-urls"; -import { StateVersion, ThemeType } from "../../enums"; - -import { WindowState } from "./window-state"; +import { EnvironmentUrls } from "../../../auth/models/domain/environment-urls"; +import { StateVersion, ThemeType } from "../../../enums"; +import { WindowState } from "../../../models/domain/window-state"; export class GlobalState { enableAlwaysOnTop?: boolean; diff --git a/libs/common/src/models/domain/state.spec.ts b/libs/common/src/platform/models/domain/state.spec.ts similarity index 100% rename from libs/common/src/models/domain/state.spec.ts rename to libs/common/src/platform/models/domain/state.spec.ts diff --git a/libs/common/src/models/domain/state.ts b/libs/common/src/platform/models/domain/state.ts similarity index 100% rename from libs/common/src/models/domain/state.ts rename to libs/common/src/platform/models/domain/state.ts diff --git a/libs/common/src/models/domain/storage-options.ts b/libs/common/src/platform/models/domain/storage-options.ts similarity index 82% rename from libs/common/src/models/domain/storage-options.ts rename to libs/common/src/platform/models/domain/storage-options.ts index 6ed430ac50f..767c4ba2379 100644 --- a/libs/common/src/models/domain/storage-options.ts +++ b/libs/common/src/platform/models/domain/storage-options.ts @@ -1,6 +1,6 @@ import { Jsonify } from "type-fest"; -import { HtmlStorageLocation, StorageLocation } from "../../enums"; +import { HtmlStorageLocation, StorageLocation } from "../../../enums"; export type StorageOptions = { storageLocation?: StorageLocation; diff --git a/libs/common/src/models/domain/symmetric-crypto-key.spec.ts b/libs/common/src/platform/models/domain/symmetric-crypto-key.spec.ts similarity index 95% rename from libs/common/src/models/domain/symmetric-crypto-key.spec.ts rename to libs/common/src/platform/models/domain/symmetric-crypto-key.spec.ts index c371008bb36..85aae2e30ea 100644 --- a/libs/common/src/models/domain/symmetric-crypto-key.spec.ts +++ b/libs/common/src/platform/models/domain/symmetric-crypto-key.spec.ts @@ -1,5 +1,5 @@ -import { makeStaticByteArray } from "../../../spec"; -import { EncryptionType } from "../../enums"; +import { makeStaticByteArray } from "../../../../spec"; +import { EncryptionType } from "../../../enums"; import { SymmetricCryptoKey } from "./symmetric-crypto-key"; diff --git a/libs/common/src/models/domain/symmetric-crypto-key.ts b/libs/common/src/platform/models/domain/symmetric-crypto-key.ts similarity index 95% rename from libs/common/src/models/domain/symmetric-crypto-key.ts rename to libs/common/src/platform/models/domain/symmetric-crypto-key.ts index 8c9920d1319..a553b1ae4fb 100644 --- a/libs/common/src/models/domain/symmetric-crypto-key.ts +++ b/libs/common/src/platform/models/domain/symmetric-crypto-key.ts @@ -1,7 +1,7 @@ import { Jsonify, Opaque } from "type-fest"; -import { EncryptionType } from "../../enums"; -import { Utils } from "../../misc/utils"; +import { EncryptionType } from "../../../enums"; +import { Utils } from "../../../platform/misc/utils"; export class SymmetricCryptoKey { key: ArrayBuffer; diff --git a/libs/common/src/models/response/server-config.response.ts b/libs/common/src/platform/models/response/server-config.response.ts similarity index 95% rename from libs/common/src/models/response/server-config.response.ts rename to libs/common/src/platform/models/response/server-config.response.ts index 7594f86aa80..c40d68293b6 100644 --- a/libs/common/src/models/response/server-config.response.ts +++ b/libs/common/src/platform/models/response/server-config.response.ts @@ -1,4 +1,4 @@ -import { BaseResponse } from "./base.response"; +import { BaseResponse } from "../../../models/response/base.response"; export class ServerConfigResponse extends BaseResponse { version: string; diff --git a/libs/common/src/services/appId.service.ts b/libs/common/src/platform/services/app-id.service.ts similarity index 92% rename from libs/common/src/services/appId.service.ts rename to libs/common/src/platform/services/app-id.service.ts index a1baf4fc701..0ce1286e4d3 100644 --- a/libs/common/src/services/appId.service.ts +++ b/libs/common/src/platform/services/app-id.service.ts @@ -1,6 +1,6 @@ -import { AppIdService as AppIdServiceAbstraction } from "../abstractions/appId.service"; +import { HtmlStorageLocation } from "../../enums"; +import { AppIdService as AppIdServiceAbstraction } from "../abstractions/app-id.service"; import { AbstractStorageService } from "../abstractions/storage.service"; -import { HtmlStorageLocation } from "../enums"; import { Utils } from "../misc/utils"; export class AppIdService implements AppIdServiceAbstraction { diff --git a/libs/common/src/services/broadcaster.service.ts b/libs/common/src/platform/services/broadcaster.service.ts similarity index 100% rename from libs/common/src/services/broadcaster.service.ts rename to libs/common/src/platform/services/broadcaster.service.ts diff --git a/libs/common/src/services/config/config-api.service.ts b/libs/common/src/platform/services/config/config-api.service.ts similarity index 88% rename from libs/common/src/services/config/config-api.service.ts rename to libs/common/src/platform/services/config/config-api.service.ts index 743f48a4967..087b6094930 100644 --- a/libs/common/src/services/config/config-api.service.ts +++ b/libs/common/src/platform/services/config/config-api.service.ts @@ -1,4 +1,4 @@ -import { ApiService } from "../../abstractions/api.service"; +import { ApiService } from "../../../abstractions/api.service"; import { ConfigApiServiceAbstraction as ConfigApiServiceAbstraction } from "../../abstractions/config/config-api.service.abstraction"; import { ServerConfigResponse } from "../../models/response/server-config.response"; diff --git a/libs/common/src/services/config/config.service.ts b/libs/common/src/platform/services/config/config.service.ts similarity index 93% rename from libs/common/src/services/config/config.service.ts rename to libs/common/src/platform/services/config/config.service.ts index dba5d1ca09c..5149c4e4b7e 100644 --- a/libs/common/src/services/config/config.service.ts +++ b/libs/common/src/platform/services/config/config.service.ts @@ -1,14 +1,14 @@ import { Injectable, OnDestroy } from "@angular/core"; import { BehaviorSubject, Subject, concatMap, from, takeUntil, timer } from "rxjs"; +import { AuthService } from "../../../auth/abstractions/auth.service"; +import { AuthenticationStatus } from "../../../auth/enums/authentication-status"; +import { FeatureFlag } from "../../../enums/feature-flag.enum"; import { ConfigApiServiceAbstraction } from "../../abstractions/config/config-api.service.abstraction"; import { ConfigServiceAbstraction } from "../../abstractions/config/config.service.abstraction"; import { ServerConfig } from "../../abstractions/config/server-config"; import { EnvironmentService } from "../../abstractions/environment.service"; import { StateService } from "../../abstractions/state.service"; -import { AuthService } from "../../auth/abstractions/auth.service"; -import { AuthenticationStatus } from "../../auth/enums/authentication-status"; -import { FeatureFlag } from "../../enums/feature-flag.enum"; import { ServerConfigData } from "../../models/data/server-config.data"; @Injectable() diff --git a/libs/common/src/services/console-log.service.spec.ts b/libs/common/src/platform/services/console-log.service.spec.ts similarity index 92% rename from libs/common/src/services/console-log.service.spec.ts rename to libs/common/src/platform/services/console-log.service.spec.ts index 0b14ac559b1..129969bbc4f 100644 --- a/libs/common/src/services/console-log.service.spec.ts +++ b/libs/common/src/platform/services/console-log.service.spec.ts @@ -1,6 +1,6 @@ -import { interceptConsole, restoreConsole } from "../../spec"; +import { interceptConsole, restoreConsole } from "../../../spec"; -import { ConsoleLogService } from "./consoleLog.service"; +import { ConsoleLogService } from "./console-log.service"; let caughtMessage: any; diff --git a/libs/common/src/services/consoleLog.service.ts b/libs/common/src/platform/services/console-log.service.ts similarity index 96% rename from libs/common/src/services/consoleLog.service.ts rename to libs/common/src/platform/services/console-log.service.ts index 23047f2a92b..966d848f765 100644 --- a/libs/common/src/services/consoleLog.service.ts +++ b/libs/common/src/platform/services/console-log.service.ts @@ -1,5 +1,5 @@ +import { LogLevelType } from "../../enums"; import { LogService as LogServiceAbstraction } from "../abstractions/log.service"; -import { LogLevelType } from "../enums"; export class ConsoleLogService implements LogServiceAbstraction { protected timersMap: Map = new Map(); diff --git a/libs/common/src/services/container.service.ts b/libs/common/src/platform/services/container.service.ts similarity index 100% rename from libs/common/src/services/container.service.ts rename to libs/common/src/platform/services/container.service.ts diff --git a/libs/common/src/services/crypto.service.spec.ts b/libs/common/src/platform/services/crypto.service.spec.ts similarity index 86% rename from libs/common/src/services/crypto.service.spec.ts rename to libs/common/src/platform/services/crypto.service.spec.ts index cc0d3ba212a..6e8e1982e97 100644 --- a/libs/common/src/services/crypto.service.spec.ts +++ b/libs/common/src/platform/services/crypto.service.spec.ts @@ -1,9 +1,9 @@ import { mock, mockReset } from "jest-mock-extended"; -import { CryptoFunctionService } from "../abstractions/cryptoFunction.service"; +import { CryptoFunctionService } from "../abstractions/crypto-function.service"; import { EncryptService } from "../abstractions/encrypt.service"; import { LogService } from "../abstractions/log.service"; -import { PlatformUtilsService } from "../abstractions/platformUtils.service"; +import { PlatformUtilsService } from "../abstractions/platform-utils.service"; import { StateService } from "../abstractions/state.service"; import { CryptoService } from "../services/crypto.service"; diff --git a/libs/common/src/services/crypto.service.ts b/libs/common/src/platform/services/crypto.service.ts similarity index 97% rename from libs/common/src/services/crypto.service.ts rename to libs/common/src/platform/services/crypto.service.ts index bfbae2952ab..07cc1d98653 100644 --- a/libs/common/src/services/crypto.service.ts +++ b/libs/common/src/platform/services/crypto.service.ts @@ -1,28 +1,28 @@ import * as bigInt from "big-integer"; -import { CryptoService as CryptoServiceAbstraction } from "../abstractions/crypto.service"; -import { CryptoFunctionService } from "../abstractions/cryptoFunction.service"; -import { EncryptService } from "../abstractions/encrypt.service"; -import { LogService } from "../abstractions/log.service"; -import { PlatformUtilsService } from "../abstractions/platformUtils.service"; -import { StateService } from "../abstractions/state.service"; -import { EncryptedOrganizationKeyData } from "../admin-console/models/data/encrypted-organization-key.data"; -import { BaseEncryptedOrganizationKey } from "../admin-console/models/domain/encrypted-organization-key"; -import { ProfileOrganizationResponse } from "../admin-console/models/response/profile-organization.response"; -import { ProfileProviderOrganizationResponse } from "../admin-console/models/response/profile-provider-organization.response"; -import { ProfileProviderResponse } from "../admin-console/models/response/profile-provider.response"; -import { KdfConfig } from "../auth/models/domain/kdf-config"; +import { EncryptedOrganizationKeyData } from "../../admin-console/models/data/encrypted-organization-key.data"; +import { BaseEncryptedOrganizationKey } from "../../admin-console/models/domain/encrypted-organization-key"; +import { ProfileOrganizationResponse } from "../../admin-console/models/response/profile-organization.response"; +import { ProfileProviderOrganizationResponse } from "../../admin-console/models/response/profile-provider-organization.response"; +import { ProfileProviderResponse } from "../../admin-console/models/response/profile-provider.response"; +import { KdfConfig } from "../../auth/models/domain/kdf-config"; import { + KeySuffixOptions, + HashPurpose, + KdfType, DEFAULT_ARGON2_ITERATIONS, DEFAULT_ARGON2_MEMORY, DEFAULT_ARGON2_PARALLELISM, EncryptionType, - HashPurpose, - KdfType, - KeySuffixOptions, -} from "../enums"; +} from "../../enums"; +import { Utils } from "../../platform/misc/utils"; +import { CryptoFunctionService } from "../abstractions/crypto-function.service"; +import { CryptoService as CryptoServiceAbstraction } from "../abstractions/crypto.service"; +import { EncryptService } from "../abstractions/encrypt.service"; +import { LogService } from "../abstractions/log.service"; +import { PlatformUtilsService } from "../abstractions/platform-utils.service"; +import { StateService } from "../abstractions/state.service"; import { sequentialize } from "../misc/sequentialize"; -import { Utils } from "../misc/utils"; import { EFFLongWordList } from "../misc/wordlist"; import { EncArrayBuffer } from "../models/domain/enc-array-buffer"; import { EncString } from "../models/domain/enc-string"; diff --git a/libs/common/src/services/cryptography/encrypt.service.implementation.ts b/libs/common/src/platform/services/cryptography/encrypt.service.implementation.ts similarity index 94% rename from libs/common/src/services/cryptography/encrypt.service.implementation.ts rename to libs/common/src/platform/services/cryptography/encrypt.service.implementation.ts index a5a4e03658d..2ccd6208ce7 100644 --- a/libs/common/src/services/cryptography/encrypt.service.implementation.ts +++ b/libs/common/src/platform/services/cryptography/encrypt.service.implementation.ts @@ -1,11 +1,11 @@ -import { CryptoFunctionService } from "../../abstractions/cryptoFunction.service"; +import { EncryptionType } from "../../../enums"; +import { Utils } from "../../../platform/misc/utils"; +import { CryptoFunctionService } from "../../abstractions/crypto-function.service"; import { EncryptService } from "../../abstractions/encrypt.service"; import { LogService } from "../../abstractions/log.service"; -import { EncryptionType } from "../../enums"; -import { IEncrypted } from "../../interfaces/IEncrypted"; import { Decryptable } from "../../interfaces/decryptable.interface"; +import { Encrypted } from "../../interfaces/encrypted"; import { InitializerMetadata } from "../../interfaces/initializer-metadata.interface"; -import { Utils } from "../../misc/utils"; import { EncArrayBuffer } from "../../models/domain/enc-array-buffer"; import { EncString } from "../../models/domain/enc-string"; import { EncryptedObject } from "../../models/domain/encrypted-object"; @@ -102,7 +102,7 @@ export class EncryptServiceImplementation implements EncryptService { return await this.cryptoFunctionService.aesDecryptFast(fastParams); } - async decryptToBytes(encThing: IEncrypted, key: SymmetricCryptoKey): Promise { + async decryptToBytes(encThing: Encrypted, key: SymmetricCryptoKey): Promise { if (key == null) { throw new Error("No encryption key provided."); } @@ -187,7 +187,7 @@ export class EncryptServiceImplementation implements EncryptService { * Transform into new key for the old encrypt-then-mac scheme if required, otherwise return the current key unchanged * @param encThing The encrypted object (e.g. encString or encArrayBuffer) that you want to decrypt */ - resolveLegacyKey(key: SymmetricCryptoKey, encThing: IEncrypted): SymmetricCryptoKey { + resolveLegacyKey(key: SymmetricCryptoKey, encThing: Encrypted): SymmetricCryptoKey { if ( encThing.encryptionType === EncryptionType.AesCbc128_HmacSha256_B64 && key.encType === EncryptionType.AesCbc256_B64 diff --git a/libs/common/src/services/cryptography/encrypt.worker.ts b/libs/common/src/platform/services/cryptography/encrypt.worker.ts similarity index 87% rename from libs/common/src/services/cryptography/encrypt.worker.ts rename to libs/common/src/platform/services/cryptography/encrypt.worker.ts index 0ee2914ad4b..047b7a9556a 100644 --- a/libs/common/src/services/cryptography/encrypt.worker.ts +++ b/libs/common/src/platform/services/cryptography/encrypt.worker.ts @@ -2,9 +2,9 @@ import { Jsonify } from "type-fest"; import { Decryptable } from "../../interfaces/decryptable.interface"; import { SymmetricCryptoKey } from "../../models/domain/symmetric-crypto-key"; -import { ConsoleLogService } from "../../services/consoleLog.service"; -import { ContainerService } from "../../services/container.service"; -import { WebCryptoFunctionService } from "../../services/webCryptoFunction.service"; +import { ConsoleLogService } from "../console-log.service"; +import { ContainerService } from "../container.service"; +import { WebCryptoFunctionService } from "../web-crypto-function.service"; import { EncryptServiceImplementation } from "./encrypt.service.implementation"; import { getClassInitializer } from "./get-class-initializer"; diff --git a/libs/common/src/services/cryptography/get-class-initializer.ts b/libs/common/src/platform/services/cryptography/get-class-initializer.ts similarity index 83% rename from libs/common/src/services/cryptography/get-class-initializer.ts rename to libs/common/src/platform/services/cryptography/get-class-initializer.ts index 1bd710eb3df..3693e509ce5 100644 --- a/libs/common/src/services/cryptography/get-class-initializer.ts +++ b/libs/common/src/platform/services/cryptography/get-class-initializer.ts @@ -1,8 +1,8 @@ import { Jsonify } from "type-fest"; +import { Cipher } from "../../../vault/models/domain/cipher"; +import { CipherView } from "../../../vault/models/view/cipher.view"; import { InitializerMetadata } from "../../interfaces/initializer-metadata.interface"; -import { Cipher } from "../../vault/models/domain/cipher"; -import { CipherView } from "../../vault/models/view/cipher.view"; import { InitializerKey } from "./initializer-key"; diff --git a/libs/common/src/services/cryptography/initializer-key.ts b/libs/common/src/platform/services/cryptography/initializer-key.ts similarity index 100% rename from libs/common/src/services/cryptography/initializer-key.ts rename to libs/common/src/platform/services/cryptography/initializer-key.ts diff --git a/libs/common/src/services/cryptography/multithread-encrypt.service.implementation.ts b/libs/common/src/platform/services/cryptography/multithread-encrypt.service.implementation.ts similarity index 94% rename from libs/common/src/services/cryptography/multithread-encrypt.service.implementation.ts rename to libs/common/src/platform/services/cryptography/multithread-encrypt.service.implementation.ts index 4e7fa2ca48d..9db4709534e 100644 --- a/libs/common/src/services/cryptography/multithread-encrypt.service.implementation.ts +++ b/libs/common/src/platform/services/cryptography/multithread-encrypt.service.implementation.ts @@ -1,9 +1,9 @@ import { defaultIfEmpty, filter, firstValueFrom, fromEvent, map, Subject, takeUntil } from "rxjs"; import { Jsonify } from "type-fest"; +import { Utils } from "../../../platform/misc/utils"; import { Decryptable } from "../../interfaces/decryptable.interface"; import { InitializerMetadata } from "../../interfaces/initializer-metadata.interface"; -import { Utils } from "../../misc/utils"; import { SymmetricCryptoKey } from "../../models/domain/symmetric-crypto-key"; import { EncryptServiceImplementation } from "./encrypt.service.implementation"; @@ -35,7 +35,7 @@ export class MultithreadEncryptServiceImplementation extends EncryptServiceImple this.worker ??= new Worker( new URL( /* webpackChunkName: 'encrypt-worker' */ - "@bitwarden/common/services/cryptography/encrypt.worker.ts", + "@bitwarden/common/platform/services/cryptography/encrypt.worker.ts", import.meta.url ) ); diff --git a/libs/common/src/services/encrypt.service.spec.ts b/libs/common/src/platform/services/encrypt.service.spec.ts similarity index 95% rename from libs/common/src/services/encrypt.service.spec.ts rename to libs/common/src/platform/services/encrypt.service.spec.ts index 8df3c170bf6..4a69bb7edca 100644 --- a/libs/common/src/services/encrypt.service.spec.ts +++ b/libs/common/src/platform/services/encrypt.service.spec.ts @@ -1,15 +1,14 @@ import { mockReset, mock } from "jest-mock-extended"; -import { makeStaticByteArray } from "../../spec"; -import { CryptoFunctionService } from "../abstractions/cryptoFunction.service"; +import { makeStaticByteArray } from "../../../spec"; +import { EncryptionType } from "../../enums"; +import { CsprngArray } from "../../types/csprng"; +import { CryptoFunctionService } from "../abstractions/crypto-function.service"; import { LogService } from "../abstractions/log.service"; -import { EncryptionType } from "../enums"; import { EncArrayBuffer } from "../models/domain/enc-array-buffer"; import { EncString } from "../models/domain/enc-string"; import { SymmetricCryptoKey } from "../models/domain/symmetric-crypto-key"; -import { CsprngArray } from "../types/csprng"; - -import { EncryptServiceImplementation } from "./cryptography/encrypt.service.implementation"; +import { EncryptServiceImplementation } from "../services/cryptography/encrypt.service.implementation"; describe("EncryptService", () => { const cryptoFunctionService = mock(); diff --git a/libs/common/src/services/environment.service.ts b/libs/common/src/platform/services/environment.service.ts similarity index 98% rename from libs/common/src/services/environment.service.ts rename to libs/common/src/platform/services/environment.service.ts index 2c6df478ebe..5e228cf7327 100644 --- a/libs/common/src/services/environment.service.ts +++ b/libs/common/src/platform/services/environment.service.ts @@ -1,11 +1,11 @@ import { concatMap, Observable, Subject } from "rxjs"; +import { EnvironmentUrls } from "../../auth/models/domain/environment-urls"; import { EnvironmentService as EnvironmentServiceAbstraction, Urls, } from "../abstractions/environment.service"; import { StateService } from "../abstractions/state.service"; -import { EnvironmentUrls } from "../auth/models/domain/environment-urls"; export class EnvironmentService implements EnvironmentServiceAbstraction { private readonly urlsSubject = new Subject(); diff --git a/libs/common/src/services/azureFileUpload.service.ts b/libs/common/src/platform/services/file-upload/azure-file-upload.service.ts similarity index 97% rename from libs/common/src/services/azureFileUpload.service.ts rename to libs/common/src/platform/services/file-upload/azure-file-upload.service.ts index 95a6bd88093..b0a505b89f5 100644 --- a/libs/common/src/services/azureFileUpload.service.ts +++ b/libs/common/src/platform/services/file-upload/azure-file-upload.service.ts @@ -1,6 +1,6 @@ -import { LogService } from "../abstractions/log.service"; -import { Utils } from "../misc/utils"; -import { EncArrayBuffer } from "../models/domain/enc-array-buffer"; +import { LogService } from "../../abstractions/log.service"; +import { Utils } from "../../misc/utils"; +import { EncArrayBuffer } from "../../models/domain/enc-array-buffer"; const MAX_SINGLE_BLOB_UPLOAD_SIZE = 256 * 1024 * 1024; // 256 MiB const MAX_BLOCKS_PER_BLOB = 50000; diff --git a/libs/common/src/services/bitwardenFileUpload.service.ts b/libs/common/src/platform/services/file-upload/bitwarden-file-upload.service.ts similarity index 86% rename from libs/common/src/services/bitwardenFileUpload.service.ts rename to libs/common/src/platform/services/file-upload/bitwarden-file-upload.service.ts index ee6f97aae3d..ab2cb490af9 100644 --- a/libs/common/src/services/bitwardenFileUpload.service.ts +++ b/libs/common/src/platform/services/file-upload/bitwarden-file-upload.service.ts @@ -1,5 +1,5 @@ -import { Utils } from "../misc/utils"; -import { EncArrayBuffer } from "../models/domain/enc-array-buffer"; +import { Utils } from "../../misc/utils"; +import { EncArrayBuffer } from "../../models/domain/enc-array-buffer"; export class BitwardenFileUploadService { async upload( diff --git a/libs/common/src/services/file-upload/file-upload.service.ts b/libs/common/src/platform/services/file-upload/file-upload.service.ts similarity index 89% rename from libs/common/src/services/file-upload/file-upload.service.ts rename to libs/common/src/platform/services/file-upload/file-upload.service.ts index c7188181258..750259da980 100644 --- a/libs/common/src/services/file-upload/file-upload.service.ts +++ b/libs/common/src/platform/services/file-upload/file-upload.service.ts @@ -1,13 +1,14 @@ +import { FileUploadType } from "../../../enums"; import { FileUploadApiMethods, FileUploadService as FileUploadServiceAbstraction, } from "../../abstractions/file-upload/file-upload.service"; import { LogService } from "../../abstractions/log.service"; -import { FileUploadType } from "../../enums"; import { EncArrayBuffer } from "../../models/domain/enc-array-buffer"; import { EncString } from "../../models/domain/enc-string"; -import { AzureFileUploadService } from "../azureFileUpload.service"; -import { BitwardenFileUploadService } from "../bitwardenFileUpload.service"; + +import { AzureFileUploadService } from "./azure-file-upload.service"; +import { BitwardenFileUploadService } from "./bitwarden-file-upload.service"; export class FileUploadService implements FileUploadServiceAbstraction { private azureFileUploadService: AzureFileUploadService; diff --git a/libs/common/src/services/formValidationErrors.service.ts b/libs/common/src/platform/services/form-validation-errors.service.ts similarity index 94% rename from libs/common/src/services/formValidationErrors.service.ts rename to libs/common/src/platform/services/form-validation-errors.service.ts index a01d3e64295..674a5740c56 100644 --- a/libs/common/src/services/formValidationErrors.service.ts +++ b/libs/common/src/platform/services/form-validation-errors.service.ts @@ -4,7 +4,7 @@ import { FormGroupControls, FormValidationErrorsService as FormValidationErrorsAbstraction, AllValidationErrors, -} from "../abstractions/formValidationErrors.service"; +} from "../abstractions/form-validation-errors.service"; export class FormValidationErrorsService implements FormValidationErrorsAbstraction { getFormValidationErrors(controls: FormGroupControls): AllValidationErrors[] { diff --git a/libs/common/src/services/i18n.service.ts b/libs/common/src/platform/services/i18n.service.ts similarity index 100% rename from libs/common/src/services/i18n.service.ts rename to libs/common/src/platform/services/i18n.service.ts diff --git a/libs/common/src/services/memoryStorage.service.ts b/libs/common/src/platform/services/memory-storage.service.ts similarity index 100% rename from libs/common/src/services/memoryStorage.service.ts rename to libs/common/src/platform/services/memory-storage.service.ts diff --git a/libs/common/src/services/noopMessaging.service.ts b/libs/common/src/platform/services/noop-messaging.service.ts similarity index 100% rename from libs/common/src/services/noopMessaging.service.ts rename to libs/common/src/platform/services/noop-messaging.service.ts diff --git a/libs/common/src/services/state-migration.service.spec.ts b/libs/common/src/platform/services/state-migration.service.spec.ts similarity index 97% rename from libs/common/src/services/state-migration.service.spec.ts rename to libs/common/src/platform/services/state-migration.service.spec.ts index 13727c96dd6..7bbd19106d5 100644 --- a/libs/common/src/services/state-migration.service.spec.ts +++ b/libs/common/src/platform/services/state-migration.service.spec.ts @@ -2,13 +2,13 @@ import { Substitute, SubstituteOf } from "@fluffy-spoon/substitute"; import { MockProxy, any, mock } from "jest-mock-extended"; +import { StateVersion } from "../../enums"; import { AbstractStorageService } from "../abstractions/storage.service"; -import { StateVersion } from "../enums"; -import { StateFactory } from "../factories/stateFactory"; +import { StateFactory } from "../factories/state-factory"; import { Account } from "../models/domain/account"; import { GlobalState } from "../models/domain/global-state"; -import { StateMigrationService } from "./stateMigration.service"; +import { StateMigrationService } from "./state-migration.service"; const userId = "USER_ID"; diff --git a/libs/common/src/services/stateMigration.service.ts b/libs/common/src/platform/services/state-migration.service.ts similarity index 96% rename from libs/common/src/services/stateMigration.service.ts rename to libs/common/src/platform/services/state-migration.service.ts index 77c869a16ee..c6feb0aa64f 100644 --- a/libs/common/src/services/stateMigration.service.ts +++ b/libs/common/src/platform/services/state-migration.service.ts @@ -1,26 +1,26 @@ +import { CollectionData } from "../../admin-console/models/data/collection.data"; +import { OrganizationData } from "../../admin-console/models/data/organization.data"; +import { PolicyData } from "../../admin-console/models/data/policy.data"; +import { ProviderData } from "../../admin-console/models/data/provider.data"; +import { EnvironmentUrls } from "../../auth/models/domain/environment-urls"; +import { TokenService } from "../../auth/services/token.service"; +import { StateVersion, ThemeType, KdfType, HtmlStorageLocation } from "../../enums"; +import { EventData } from "../../models/data/event.data"; +import { GeneratedPasswordHistory } from "../../tools/generator/password"; +import { SendData } from "../../tools/send/models/data/send.data"; +import { CipherData } from "../../vault/models/data/cipher.data"; +import { FolderData } from "../../vault/models/data/folder.data"; import { AbstractStorageService } from "../abstractions/storage.service"; -import { CollectionData } from "../admin-console/models/data/collection.data"; -import { OrganizationData } from "../admin-console/models/data/organization.data"; -import { PolicyData } from "../admin-console/models/data/policy.data"; -import { ProviderData } from "../admin-console/models/data/provider.data"; -import { EnvironmentUrls } from "../auth/models/domain/environment-urls"; -import { TokenService } from "../auth/services/token.service"; -import { HtmlStorageLocation, KdfType, StateVersion, ThemeType } from "../enums"; -import { StateFactory } from "../factories/stateFactory"; -import { EventData } from "../models/data/event.data"; +import { StateFactory } from "../factories/state-factory"; import { Account, AccountSettings, - AccountSettingsSettings, EncryptionPair, + AccountSettingsSettings, } from "../models/domain/account"; import { EncString } from "../models/domain/enc-string"; import { GlobalState } from "../models/domain/global-state"; import { StorageOptions } from "../models/domain/storage-options"; -import { GeneratedPasswordHistory } from "../tools/generator/password"; -import { SendData } from "../tools/send/models/data/send.data"; -import { CipherData } from "../vault/models/data/cipher.data"; -import { FolderData } from "../vault/models/data/folder.data"; // Originally (before January 2022) storage was handled as a flat key/value pair store. // With the move to a typed object for state storage these keys should no longer be in use anywhere outside of this migration. diff --git a/libs/common/src/services/state.service.ts b/libs/common/src/platform/services/state.service.ts similarity index 98% rename from libs/common/src/services/state.service.ts rename to libs/common/src/platform/services/state.service.ts index dc32c688e30..b701ca40238 100644 --- a/libs/common/src/services/state.service.ts +++ b/libs/common/src/platform/services/state.service.ts @@ -1,29 +1,44 @@ import { BehaviorSubject, concatMap } from "rxjs"; import { Jsonify, JsonValue } from "type-fest"; +import { CollectionData } from "../../admin-console/models/data/collection.data"; +import { EncryptedOrganizationKeyData } from "../../admin-console/models/data/encrypted-organization-key.data"; +import { OrganizationData } from "../../admin-console/models/data/organization.data"; +import { PolicyData } from "../../admin-console/models/data/policy.data"; +import { ProviderData } from "../../admin-console/models/data/provider.data"; +import { Policy } from "../../admin-console/models/domain/policy"; +import { CollectionView } from "../../admin-console/models/view/collection.view"; +import { EnvironmentUrls } from "../../auth/models/domain/environment-urls"; +import { ForceResetPasswordReason } from "../../auth/models/domain/force-reset-password-reason"; +import { KdfConfig } from "../../auth/models/domain/kdf-config"; +import { BiometricKey } from "../../auth/types/biometric-key"; +import { + HtmlStorageLocation, + KdfType, + StorageLocation, + ThemeType, + UriMatchType, +} from "../../enums"; +import { VaultTimeoutAction } from "../../enums/vault-timeout-action.enum"; +import { EventData } from "../../models/data/event.data"; +import { WindowState } from "../../models/domain/window-state"; +import { GeneratedPasswordHistory } from "../../tools/generator/password"; +import { SendData } from "../../tools/send/models/data/send.data"; +import { SendView } from "../../tools/send/models/view/send.view"; +import { CipherData } from "../../vault/models/data/cipher.data"; +import { FolderData } from "../../vault/models/data/folder.data"; +import { LocalData } from "../../vault/models/data/local.data"; +import { CipherView } from "../../vault/models/view/cipher.view"; +import { AddEditCipherInfo } from "../../vault/types/add-edit-cipher-info"; import { LogService } from "../abstractions/log.service"; +import { StateMigrationService } from "../abstractions/state-migration.service"; import { StateService as StateServiceAbstraction } from "../abstractions/state.service"; -import { StateMigrationService } from "../abstractions/stateMigration.service"; import { AbstractMemoryStorageService, AbstractStorageService, } from "../abstractions/storage.service"; -import { CollectionData } from "../admin-console/models/data/collection.data"; -import { EncryptedOrganizationKeyData } from "../admin-console/models/data/encrypted-organization-key.data"; -import { OrganizationData } from "../admin-console/models/data/organization.data"; -import { PolicyData } from "../admin-console/models/data/policy.data"; -import { ProviderData } from "../admin-console/models/data/provider.data"; -import { Policy } from "../admin-console/models/domain/policy"; -import { CollectionView } from "../admin-console/models/view/collection.view"; -import { EnvironmentUrls } from "../auth/models/domain/environment-urls"; -import { ForceResetPasswordReason } from "../auth/models/domain/force-reset-password-reason"; -import { KdfConfig } from "../auth/models/domain/kdf-config"; -import { BiometricKey } from "../auth/types/biometric-key"; -import { HtmlStorageLocation, KdfType, StorageLocation, ThemeType, UriMatchType } from "../enums"; -import { VaultTimeoutAction } from "../enums/vault-timeout-action.enum"; -import { StateFactory } from "../factories/stateFactory"; +import { StateFactory } from "../factories/state-factory"; import { Utils } from "../misc/utils"; -import { EventData } from "../models/data/event.data"; import { ServerConfigData } from "../models/data/server-config.data"; import { Account, @@ -36,15 +51,6 @@ import { GlobalState } from "../models/domain/global-state"; import { State } from "../models/domain/state"; import { StorageOptions } from "../models/domain/storage-options"; import { DeviceKey, SymmetricCryptoKey } from "../models/domain/symmetric-crypto-key"; -import { WindowState } from "../models/domain/window-state"; -import { GeneratedPasswordHistory } from "../tools/generator/password"; -import { SendData } from "../tools/send/models/data/send.data"; -import { SendView } from "../tools/send/models/view/send.view"; -import { CipherData } from "../vault/models/data/cipher.data"; -import { FolderData } from "../vault/models/data/folder.data"; -import { LocalData } from "../vault/models/data/local.data"; -import { CipherView } from "../vault/models/view/cipher.view"; -import { AddEditCipherInfo } from "../vault/types/add-edit-cipher-info"; const keys = { state: "state", diff --git a/libs/common/src/services/system.service.ts b/libs/common/src/platform/services/system.service.ts similarity index 93% rename from libs/common/src/services/system.service.ts rename to libs/common/src/platform/services/system.service.ts index 4e1dad9af57..90a382e5abc 100644 --- a/libs/common/src/services/system.service.ts +++ b/libs/common/src/platform/services/system.service.ts @@ -1,11 +1,11 @@ import { firstValueFrom } from "rxjs"; +import { AuthService } from "../../auth/abstractions/auth.service"; +import { AuthenticationStatus } from "../../auth/enums/authentication-status"; import { MessagingService } from "../abstractions/messaging.service"; -import { PlatformUtilsService } from "../abstractions/platformUtils.service"; +import { PlatformUtilsService } from "../abstractions/platform-utils.service"; import { StateService } from "../abstractions/state.service"; import { SystemService as SystemServiceAbstraction } from "../abstractions/system.service"; -import { AuthService } from "../auth/abstractions/auth.service"; -import { AuthenticationStatus } from "../auth/enums/authentication-status"; import { Utils } from "../misc/utils"; export class SystemService implements SystemServiceAbstraction { diff --git a/libs/common/src/services/translation.service.ts b/libs/common/src/platform/services/translation.service.ts similarity index 100% rename from libs/common/src/services/translation.service.ts rename to libs/common/src/platform/services/translation.service.ts diff --git a/libs/common/src/services/validation.service.ts b/libs/common/src/platform/services/validation.service.ts similarity index 89% rename from libs/common/src/services/validation.service.ts rename to libs/common/src/platform/services/validation.service.ts index 8c0c94d9d46..e3f18bc9467 100644 --- a/libs/common/src/services/validation.service.ts +++ b/libs/common/src/platform/services/validation.service.ts @@ -1,7 +1,7 @@ +import { ErrorResponse } from "../../models/response/error.response"; import { I18nService } from "../abstractions/i18n.service"; -import { PlatformUtilsService } from "../abstractions/platformUtils.service"; +import { PlatformUtilsService } from "../abstractions/platform-utils.service"; import { ValidationService as ValidationServiceAbstraction } from "../abstractions/validation.service"; -import { ErrorResponse } from "../models/response/error.response"; export class ValidationService implements ValidationServiceAbstraction { constructor( diff --git a/libs/common/src/services/web-crypto-function.service.spec.ts b/libs/common/src/platform/services/web-crypto-function.service.spec.ts similarity index 99% rename from libs/common/src/services/web-crypto-function.service.spec.ts rename to libs/common/src/platform/services/web-crypto-function.service.spec.ts index 519ba2eddbd..fa3562cb50a 100644 --- a/libs/common/src/services/web-crypto-function.service.spec.ts +++ b/libs/common/src/platform/services/web-crypto-function.service.spec.ts @@ -1,11 +1,11 @@ // eslint-disable-next-line no-restricted-imports import { Substitute } from "@fluffy-spoon/substitute"; -import { PlatformUtilsService } from "../abstractions/platformUtils.service"; -import { Utils } from "../misc/utils"; +import { Utils } from "../../platform/misc/utils"; +import { PlatformUtilsService } from "../abstractions/platform-utils.service"; import { SymmetricCryptoKey } from "../models/domain/symmetric-crypto-key"; -import { WebCryptoFunctionService } from "./webCryptoFunction.service"; +import { WebCryptoFunctionService } from "./web-crypto-function.service"; const RsaPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAl0Vawl/toXzkEvB82FEtqHP" + diff --git a/libs/common/src/services/webCryptoFunction.service.ts b/libs/common/src/platform/services/web-crypto-function.service.ts similarity index 98% rename from libs/common/src/services/webCryptoFunction.service.ts rename to libs/common/src/platform/services/web-crypto-function.service.ts index 748adafedf0..18bec1a8f64 100644 --- a/libs/common/src/services/webCryptoFunction.service.ts +++ b/libs/common/src/platform/services/web-crypto-function.service.ts @@ -1,11 +1,11 @@ import * as argon2 from "argon2-browser"; import * as forge from "node-forge"; -import { CryptoFunctionService } from "../abstractions/cryptoFunction.service"; -import { Utils } from "../misc/utils"; +import { Utils } from "../../platform/misc/utils"; +import { CsprngArray } from "../../types/csprng"; +import { CryptoFunctionService } from "../abstractions/crypto-function.service"; import { DecryptParameters } from "../models/domain/decrypt-parameters"; import { SymmetricCryptoKey } from "../models/domain/symmetric-crypto-key"; -import { CsprngArray } from "../types/csprng"; export class WebCryptoFunctionService implements CryptoFunctionService { private crypto: Crypto; diff --git a/libs/common/src/services/account/avatar-update.service.ts b/libs/common/src/services/account/avatar-update.service.ts index 7687116682c..4457ee5457a 100644 --- a/libs/common/src/services/account/avatar-update.service.ts +++ b/libs/common/src/services/account/avatar-update.service.ts @@ -2,9 +2,9 @@ import { BehaviorSubject, Observable } from "rxjs"; import { AvatarUpdateService as AvatarUpdateServiceAbstraction } from "../../abstractions/account/avatar-update.service"; import { ApiService } from "../../abstractions/api.service"; -import { StateService } from "../../abstractions/state.service"; import { UpdateAvatarRequest } from "../../models/request/update-avatar.request"; import { ProfileResponse } from "../../models/response/profile.response"; +import { StateService } from "../../platform/abstractions/state.service"; export class AvatarUpdateService implements AvatarUpdateServiceAbstraction { private _avatarUpdate$ = new BehaviorSubject(null); diff --git a/libs/common/src/services/anonymousHub.service.ts b/libs/common/src/services/anonymousHub.service.ts index dc1db5c9305..32ea272cedd 100644 --- a/libs/common/src/services/anonymousHub.service.ts +++ b/libs/common/src/services/anonymousHub.service.ts @@ -8,9 +8,9 @@ import { import { MessagePackHubProtocol } from "@microsoft/signalr-protocol-msgpack"; import { AnonymousHubService as AnonymousHubServiceAbstraction } from "../abstractions/anonymousHub.service"; -import { EnvironmentService } from "../abstractions/environment.service"; -import { LogService } from "../abstractions/log.service"; import { AuthService } from "../auth/abstractions/auth.service"; +import { EnvironmentService } from "../platform/abstractions/environment.service"; +import { LogService } from "../platform/abstractions/log.service"; import { AuthRequestPushNotification, diff --git a/libs/common/src/services/api.service.ts b/libs/common/src/services/api.service.ts index 59e3755a04f..4df9b2cc603 100644 --- a/libs/common/src/services/api.service.ts +++ b/libs/common/src/services/api.service.ts @@ -1,7 +1,4 @@ import { ApiService as ApiServiceAbstraction } from "../abstractions/api.service"; -import { AppIdService } from "../abstractions/appId.service"; -import { EnvironmentService } from "../abstractions/environment.service"; -import { PlatformUtilsService } from "../abstractions/platformUtils.service"; import { OrganizationConnectionType } from "../admin-console/enums"; import { CollectionRequest } from "../admin-console/models/request/collection.request"; import { OrganizationSponsorshipCreateRequest } from "../admin-console/models/request/organization/organization-sponsorship-create.request"; @@ -112,7 +109,6 @@ import { SubscriptionResponse } from "../billing/models/response/subscription.re import { TaxInfoResponse } from "../billing/models/response/tax-info.response"; import { TaxRateResponse } from "../billing/models/response/tax-rate.response"; import { DeviceType } from "../enums"; -import { Utils } from "../misc/utils"; import { CollectionBulkDeleteRequest } from "../models/request/collection-bulk-delete.request"; import { DeleteRecoverRequest } from "../models/request/delete-recover.request"; import { EventRequest } from "../models/request/event.request"; @@ -135,6 +131,10 @@ import { EventResponse } from "../models/response/event.response"; import { ListResponse } from "../models/response/list.response"; import { ProfileResponse } from "../models/response/profile.response"; import { UserKeyResponse } from "../models/response/user-key.response"; +import { AppIdService } from "../platform/abstractions/app-id.service"; +import { EnvironmentService } from "../platform/abstractions/environment.service"; +import { PlatformUtilsService } from "../platform/abstractions/platform-utils.service"; +import { Utils } from "../platform/misc/utils"; import { AttachmentRequest } from "../vault/models/request/attachment.request"; import { CipherBulkDeleteRequest } from "../vault/models/request/cipher-bulk-delete.request"; import { CipherBulkMoveRequest } from "../vault/models/request/cipher-bulk-move.request"; diff --git a/libs/common/src/services/audit.service.ts b/libs/common/src/services/audit.service.ts index 8581026f64d..e282b09e627 100644 --- a/libs/common/src/services/audit.service.ts +++ b/libs/common/src/services/audit.service.ts @@ -1,10 +1,10 @@ import { ApiService } from "../abstractions/api.service"; import { AuditService as AuditServiceAbstraction } from "../abstractions/audit.service"; -import { CryptoFunctionService } from "../abstractions/cryptoFunction.service"; -import { throttle } from "../misc/throttle"; -import { Utils } from "../misc/utils"; import { BreachAccountResponse } from "../models/response/breach-account.response"; import { ErrorResponse } from "../models/response/error.response"; +import { CryptoFunctionService } from "../platform/abstractions/crypto-function.service"; +import { throttle } from "../platform/misc/throttle"; +import { Utils } from "../platform/misc/utils"; const PwnedPasswordsApi = "https://api.pwnedpasswords.com/range/"; diff --git a/libs/common/src/services/device-crypto.service.implementation.ts b/libs/common/src/services/device-crypto.service.implementation.ts index ba50e300b42..e2179e6e524 100644 --- a/libs/common/src/services/device-crypto.service.implementation.ts +++ b/libs/common/src/services/device-crypto.service.implementation.ts @@ -1,12 +1,12 @@ -import { AppIdService } from "../abstractions/appId.service"; -import { CryptoService } from "../abstractions/crypto.service"; -import { CryptoFunctionService } from "../abstractions/cryptoFunction.service"; import { DeviceCryptoServiceAbstraction } from "../abstractions/device-crypto.service.abstraction"; import { DevicesApiServiceAbstraction } from "../abstractions/devices/devices-api.service.abstraction"; import { DeviceResponse } from "../abstractions/devices/responses/device.response"; -import { EncryptService } from "../abstractions/encrypt.service"; -import { StateService } from "../abstractions/state.service"; -import { DeviceKey, SymmetricCryptoKey } from "../models/domain/symmetric-crypto-key"; +import { AppIdService } from "../platform/abstractions/app-id.service"; +import { CryptoFunctionService } from "../platform/abstractions/crypto-function.service"; +import { CryptoService } from "../platform/abstractions/crypto.service"; +import { EncryptService } from "../platform/abstractions/encrypt.service"; +import { StateService } from "../platform/abstractions/state.service"; +import { SymmetricCryptoKey, DeviceKey } from "../platform/models/domain/symmetric-crypto-key"; import { CsprngArray } from "../types/csprng"; export class DeviceCryptoService implements DeviceCryptoServiceAbstraction { diff --git a/libs/common/src/services/device-crypto.service.spec.ts b/libs/common/src/services/device-crypto.service.spec.ts index 7e14961cc2c..526e684c9b4 100644 --- a/libs/common/src/services/device-crypto.service.spec.ts +++ b/libs/common/src/services/device-crypto.service.spec.ts @@ -1,15 +1,15 @@ import { mock, mockReset } from "jest-mock-extended"; -import { AppIdService } from "../abstractions/appId.service"; -import { CryptoFunctionService } from "../abstractions/cryptoFunction.service"; import { DevicesApiServiceAbstraction } from "../abstractions/devices/devices-api.service.abstraction"; import { DeviceResponse } from "../abstractions/devices/responses/device.response"; -import { EncryptService } from "../abstractions/encrypt.service"; -import { StateService } from "../abstractions/state.service"; import { EncryptionType } from "../enums/encryption-type.enum"; -import { EncString } from "../models/domain/enc-string"; -import { DeviceKey, SymmetricCryptoKey } from "../models/domain/symmetric-crypto-key"; -import { CryptoService } from "../services/crypto.service"; +import { AppIdService } from "../platform/abstractions/app-id.service"; +import { CryptoFunctionService } from "../platform/abstractions/crypto-function.service"; +import { EncryptService } from "../platform/abstractions/encrypt.service"; +import { StateService } from "../platform/abstractions/state.service"; +import { EncString } from "../platform/models/domain/enc-string"; +import { SymmetricCryptoKey, DeviceKey } from "../platform/models/domain/symmetric-crypto-key"; +import { CryptoService } from "../platform/services/crypto.service"; import { CsprngArray } from "../types/csprng"; import { DeviceCryptoService } from "./device-crypto.service.implementation"; diff --git a/libs/common/src/services/devices/devices-api.service.implementation.ts b/libs/common/src/services/devices/devices-api.service.implementation.ts index aa0d0f0c297..3121ace6f89 100644 --- a/libs/common/src/services/devices/devices-api.service.implementation.ts +++ b/libs/common/src/services/devices/devices-api.service.implementation.ts @@ -1,6 +1,6 @@ import { DevicesApiServiceAbstraction } from "../../abstractions/devices/devices-api.service.abstraction"; import { DeviceResponse } from "../../abstractions/devices/responses/device.response"; -import { Utils } from "../../misc/utils"; +import { Utils } from "../../platform/misc/utils"; import { ApiService } from "../api.service"; import { TrustedDeviceKeysRequest } from "./requests/trusted-device-keys.request"; diff --git a/libs/common/src/services/event/event-collection.service.ts b/libs/common/src/services/event/event-collection.service.ts index 4f16b887788..d85d333be7f 100644 --- a/libs/common/src/services/event/event-collection.service.ts +++ b/libs/common/src/services/event/event-collection.service.ts @@ -1,9 +1,9 @@ import { EventCollectionService as EventCollectionServiceAbstraction } from "../../abstractions/event/event-collection.service"; import { EventUploadService } from "../../abstractions/event/event-upload.service"; -import { StateService } from "../../abstractions/state.service"; import { OrganizationService } from "../../admin-console/abstractions/organization/organization.service.abstraction"; import { EventType } from "../../enums"; import { EventData } from "../../models/data/event.data"; +import { StateService } from "../../platform/abstractions/state.service"; import { CipherService } from "../../vault/abstractions/cipher.service"; export class EventCollectionService implements EventCollectionServiceAbstraction { diff --git a/libs/common/src/services/event/event-upload.service.ts b/libs/common/src/services/event/event-upload.service.ts index ca118ea7e8f..99c7f394fdf 100644 --- a/libs/common/src/services/event/event-upload.service.ts +++ b/libs/common/src/services/event/event-upload.service.ts @@ -1,8 +1,8 @@ import { ApiService } from "../../abstractions/api.service"; import { EventUploadService as EventUploadServiceAbstraction } from "../../abstractions/event/event-upload.service"; -import { LogService } from "../../abstractions/log.service"; -import { StateService } from "../../abstractions/state.service"; import { EventRequest } from "../../models/request/event.request"; +import { LogService } from "../../platform/abstractions/log.service"; +import { StateService } from "../../platform/abstractions/state.service"; export class EventUploadService implements EventUploadServiceAbstraction { private inited = false; diff --git a/libs/common/src/services/notifications.service.ts b/libs/common/src/services/notifications.service.ts index 1f83b87fea9..79b120c737c 100644 --- a/libs/common/src/services/notifications.service.ts +++ b/libs/common/src/services/notifications.service.ts @@ -2,12 +2,7 @@ import * as signalR from "@microsoft/signalr"; import * as signalRMsgPack from "@microsoft/signalr-protocol-msgpack"; import { ApiService } from "../abstractions/api.service"; -import { AppIdService } from "../abstractions/appId.service"; -import { EnvironmentService } from "../abstractions/environment.service"; -import { LogService } from "../abstractions/log.service"; -import { MessagingService } from "../abstractions/messaging.service"; import { NotificationsService as NotificationsServiceAbstraction } from "../abstractions/notifications.service"; -import { StateService } from "../abstractions/state.service"; import { AuthService } from "../auth/abstractions/auth.service"; import { AuthenticationStatus } from "../auth/enums/authentication-status"; import { NotificationType } from "../enums"; @@ -17,6 +12,11 @@ import { SyncFolderNotification, SyncSendNotification, } from "../models/response/notification.response"; +import { AppIdService } from "../platform/abstractions/app-id.service"; +import { EnvironmentService } from "../platform/abstractions/environment.service"; +import { LogService } from "../platform/abstractions/log.service"; +import { MessagingService } from "../platform/abstractions/messaging.service"; +import { StateService } from "../platform/abstractions/state.service"; import { SyncService } from "../vault/abstractions/sync/sync.service.abstraction"; export class NotificationsService implements NotificationsServiceAbstraction { diff --git a/libs/common/src/services/organization-domain/org-domain-api.service.spec.ts b/libs/common/src/services/organization-domain/org-domain-api.service.spec.ts index 7fa6ed7855a..69cca7206f2 100644 --- a/libs/common/src/services/organization-domain/org-domain-api.service.spec.ts +++ b/libs/common/src/services/organization-domain/org-domain-api.service.spec.ts @@ -2,10 +2,10 @@ import { mock } from "jest-mock-extended"; import { lastValueFrom } from "rxjs"; import { ApiService } from "../../abstractions/api.service"; -import { I18nService } from "../../abstractions/i18n.service"; import { OrganizationDomainSsoDetailsResponse } from "../../abstractions/organization-domain/responses/organization-domain-sso-details.response"; import { OrganizationDomainResponse } from "../../abstractions/organization-domain/responses/organization-domain.response"; -import { PlatformUtilsService } from "../../abstractions/platformUtils.service"; +import { I18nService } from "../../platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service"; import { OrgDomainApiService } from "./org-domain-api.service"; import { OrgDomainService } from "./org-domain.service"; diff --git a/libs/common/src/services/organization-domain/org-domain.service.spec.ts b/libs/common/src/services/organization-domain/org-domain.service.spec.ts index 3bc8ae770f1..89e75267357 100644 --- a/libs/common/src/services/organization-domain/org-domain.service.spec.ts +++ b/libs/common/src/services/organization-domain/org-domain.service.spec.ts @@ -1,9 +1,9 @@ import { mock, mockReset } from "jest-mock-extended"; import { lastValueFrom } from "rxjs"; -import { I18nService } from "../../abstractions/i18n.service"; import { OrganizationDomainResponse } from "../../abstractions/organization-domain/responses/organization-domain.response"; -import { PlatformUtilsService } from "../../abstractions/platformUtils.service"; +import { I18nService } from "../../platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service"; import { OrgDomainService } from "./org-domain.service"; diff --git a/libs/common/src/services/organization-domain/org-domain.service.ts b/libs/common/src/services/organization-domain/org-domain.service.ts index 617bd3698d6..1e2112eec50 100644 --- a/libs/common/src/services/organization-domain/org-domain.service.ts +++ b/libs/common/src/services/organization-domain/org-domain.service.ts @@ -1,9 +1,9 @@ import { BehaviorSubject } from "rxjs"; -import { I18nService } from "../../abstractions/i18n.service"; import { OrgDomainInternalServiceAbstraction } from "../../abstractions/organization-domain/org-domain.service.abstraction"; import { OrganizationDomainResponse } from "../../abstractions/organization-domain/responses/organization-domain.response"; -import { PlatformUtilsService } from "../../abstractions/platformUtils.service"; +import { I18nService } from "../../platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service"; export class OrgDomainService implements OrgDomainInternalServiceAbstraction { protected _orgDomains$: BehaviorSubject = new BehaviorSubject([]); diff --git a/libs/common/src/services/policy.service.spec.ts b/libs/common/src/services/policy.service.spec.ts index b806a4502c4..83e8f18b349 100644 --- a/libs/common/src/services/policy.service.spec.ts +++ b/libs/common/src/services/policy.service.spec.ts @@ -2,8 +2,6 @@ import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute"; import { BehaviorSubject, firstValueFrom } from "rxjs"; -import { CryptoService } from "../abstractions/crypto.service"; -import { EncryptService } from "../abstractions/encrypt.service"; import { OrganizationService } from "../admin-console/abstractions/organization/organization.service.abstraction"; import { OrganizationUserStatusType, PolicyType } from "../admin-console/enums"; import { PermissionsApi } from "../admin-console/models/api/permissions.api"; @@ -16,9 +14,10 @@ import { ResetPasswordPolicyOptions } from "../admin-console/models/domain/reset import { PolicyResponse } from "../admin-console/models/response/policy.response"; import { PolicyService } from "../admin-console/services/policy/policy.service"; import { ListResponse } from "../models/response/list.response"; - -import { ContainerService } from "./container.service"; -import { StateService } from "./state.service"; +import { CryptoService } from "../platform/abstractions/crypto.service"; +import { EncryptService } from "../platform/abstractions/encrypt.service"; +import { ContainerService } from "../platform/services/container.service"; +import { StateService } from "../platform/services/state.service"; describe("PolicyService", () => { let policyService: PolicyService; diff --git a/libs/common/src/services/search.service.ts b/libs/common/src/services/search.service.ts index f7baabfbdd2..c1d9dc7fb75 100644 --- a/libs/common/src/services/search.service.ts +++ b/libs/common/src/services/search.service.ts @@ -1,9 +1,9 @@ import * as lunr from "lunr"; -import { I18nService } from "../abstractions/i18n.service"; -import { LogService } from "../abstractions/log.service"; import { SearchService as SearchServiceAbstraction } from "../abstractions/search.service"; import { FieldType, UriMatchType } from "../enums"; +import { I18nService } from "../platform/abstractions/i18n.service"; +import { LogService } from "../platform/abstractions/log.service"; import { SendView } from "../tools/send/models/view/send.view"; import { CipherType } from "../vault/enums/cipher-type"; import { CipherView } from "../vault/models/view/cipher.view"; diff --git a/libs/common/src/services/settings.service.spec.ts b/libs/common/src/services/settings.service.spec.ts index 1f23252e243..141022ca3c0 100644 --- a/libs/common/src/services/settings.service.spec.ts +++ b/libs/common/src/services/settings.service.spec.ts @@ -2,12 +2,12 @@ import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute"; import { BehaviorSubject, firstValueFrom } from "rxjs"; -import { CryptoService } from "../abstractions/crypto.service"; -import { EncryptService } from "../abstractions/encrypt.service"; +import { CryptoService } from "../platform/abstractions/crypto.service"; +import { EncryptService } from "../platform/abstractions/encrypt.service"; +import { ContainerService } from "../platform/services/container.service"; +import { StateService } from "../platform/services/state.service"; -import { ContainerService } from "./container.service"; import { SettingsService } from "./settings.service"; -import { StateService } from "./state.service"; describe("SettingsService", () => { let settingsService: SettingsService; diff --git a/libs/common/src/services/settings.service.ts b/libs/common/src/services/settings.service.ts index 5bd7d9c2fb9..f3002a7bfd0 100644 --- a/libs/common/src/services/settings.service.ts +++ b/libs/common/src/services/settings.service.ts @@ -1,9 +1,9 @@ import { BehaviorSubject, concatMap } from "rxjs"; import { SettingsService as SettingsServiceAbstraction } from "../abstractions/settings.service"; -import { StateService } from "../abstractions/state.service"; -import { Utils } from "../misc/utils"; -import { AccountSettingsSettings } from "../models/domain/account"; +import { StateService } from "../platform/abstractions/state.service"; +import { Utils } from "../platform/misc/utils"; +import { AccountSettingsSettings } from "../platform/models/domain/account"; export class SettingsService implements SettingsServiceAbstraction { protected _settings: BehaviorSubject = new BehaviorSubject({}); diff --git a/libs/common/src/services/totp.service.ts b/libs/common/src/services/totp.service.ts index 3264c598df1..54c583b5cd2 100644 --- a/libs/common/src/services/totp.service.ts +++ b/libs/common/src/services/totp.service.ts @@ -1,7 +1,7 @@ -import { CryptoFunctionService } from "../abstractions/cryptoFunction.service"; -import { LogService } from "../abstractions/log.service"; import { TotpService as TotpServiceAbstraction } from "../abstractions/totp.service"; -import { Utils } from "../misc/utils"; +import { CryptoFunctionService } from "../platform/abstractions/crypto-function.service"; +import { LogService } from "../platform/abstractions/log.service"; +import { Utils } from "../platform/misc/utils"; const B32Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; const SteamChars = "23456789BCDFGHJKMNPQRTVWXY"; diff --git a/libs/common/src/services/vaultTimeout/vaultTimeout.service.ts b/libs/common/src/services/vaultTimeout/vaultTimeout.service.ts index 313cd38566d..c46c8e52d04 100644 --- a/libs/common/src/services/vaultTimeout/vaultTimeout.service.ts +++ b/libs/common/src/services/vaultTimeout/vaultTimeout.service.ts @@ -1,10 +1,6 @@ import { firstValueFrom } from "rxjs"; -import { CryptoService } from "../../abstractions/crypto.service"; -import { MessagingService } from "../../abstractions/messaging.service"; -import { PlatformUtilsService } from "../../abstractions/platformUtils.service"; import { SearchService } from "../../abstractions/search.service"; -import { StateService } from "../../abstractions/state.service"; import { VaultTimeoutService as VaultTimeoutServiceAbstraction } from "../../abstractions/vaultTimeout/vaultTimeout.service"; import { VaultTimeoutSettingsService } from "../../abstractions/vaultTimeout/vaultTimeoutSettings.service"; import { CollectionService } from "../../admin-console/abstractions/collection.service"; @@ -12,6 +8,10 @@ import { AuthService } from "../../auth/abstractions/auth.service"; import { KeyConnectorService } from "../../auth/abstractions/key-connector.service"; import { AuthenticationStatus } from "../../auth/enums/authentication-status"; import { VaultTimeoutAction } from "../../enums/vault-timeout-action.enum"; +import { CryptoService } from "../../platform/abstractions/crypto.service"; +import { MessagingService } from "../../platform/abstractions/messaging.service"; +import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service"; +import { StateService } from "../../platform/abstractions/state.service"; import { CipherService } from "../../vault/abstractions/cipher.service"; import { FolderService } from "../../vault/abstractions/folder/folder.service.abstraction"; diff --git a/libs/common/src/services/vaultTimeout/vaultTimeoutSettings.service.ts b/libs/common/src/services/vaultTimeout/vaultTimeoutSettings.service.ts index 09bd311f934..ae3c16e5865 100644 --- a/libs/common/src/services/vaultTimeout/vaultTimeoutSettings.service.ts +++ b/libs/common/src/services/vaultTimeout/vaultTimeoutSettings.service.ts @@ -1,10 +1,10 @@ -import { CryptoService } from "../../abstractions/crypto.service"; -import { StateService } from "../../abstractions/state.service"; import { VaultTimeoutSettingsService as VaultTimeoutSettingsServiceAbstraction } from "../../abstractions/vaultTimeout/vaultTimeoutSettings.service"; import { PolicyService } from "../../admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "../../admin-console/enums"; import { TokenService } from "../../auth/abstractions/token.service"; import { VaultTimeoutAction } from "../../enums/vault-timeout-action.enum"; +import { CryptoService } from "../../platform/abstractions/crypto.service"; +import { StateService } from "../../platform/abstractions/state.service"; export class VaultTimeoutSettingsService implements VaultTimeoutSettingsServiceAbstraction { constructor( diff --git a/libs/common/src/tools/generator/password/password-generation.service.ts b/libs/common/src/tools/generator/password/password-generation.service.ts index 43c4a0f1491..8270e2d812e 100644 --- a/libs/common/src/tools/generator/password/password-generation.service.ts +++ b/libs/common/src/tools/generator/password/password-generation.service.ts @@ -1,12 +1,12 @@ import * as zxcvbn from "zxcvbn"; -import { CryptoService } from "../../../abstractions/crypto.service"; -import { StateService } from "../../../abstractions/state.service"; import { PolicyService } from "../../../admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "../../../admin-console/enums"; import { PasswordGeneratorPolicyOptions } from "../../../admin-console/models/domain/password-generator-policy-options"; -import { EFFLongWordList } from "../../../misc/wordlist"; -import { EncString } from "../../../models/domain/enc-string"; +import { CryptoService } from "../../../platform/abstractions/crypto.service"; +import { StateService } from "../../../platform/abstractions/state.service"; +import { EFFLongWordList } from "../../../platform/misc/wordlist"; +import { EncString } from "../../../platform/models/domain/enc-string"; import { GeneratedPasswordHistory } from "./generated-password-history"; import { PasswordGenerationServiceAbstraction } from "./password-generation.service.abstraction"; diff --git a/libs/common/src/tools/generator/username/username-generation.service.ts b/libs/common/src/tools/generator/username/username-generation.service.ts index 4ad305e8b2a..6f9af5cb354 100644 --- a/libs/common/src/tools/generator/username/username-generation.service.ts +++ b/libs/common/src/tools/generator/username/username-generation.service.ts @@ -1,7 +1,7 @@ import { ApiService } from "../../../abstractions/api.service"; -import { CryptoService } from "../../../abstractions/crypto.service"; -import { StateService } from "../../../abstractions/state.service"; -import { EFFLongWordList } from "../../../misc/wordlist"; +import { CryptoService } from "../../../platform/abstractions/crypto.service"; +import { StateService } from "../../../platform/abstractions/state.service"; +import { EFFLongWordList } from "../../../platform/misc/wordlist"; import { AnonAddyForwarder, diff --git a/libs/common/src/tools/send/models/domain/send-access.ts b/libs/common/src/tools/send/models/domain/send-access.ts index ae83784da42..98bd8864e72 100644 --- a/libs/common/src/tools/send/models/domain/send-access.ts +++ b/libs/common/src/tools/send/models/domain/send-access.ts @@ -1,6 +1,6 @@ -import Domain from "../../../../models/domain/domain-base"; -import { EncString } from "../../../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../../../models/domain/symmetric-crypto-key"; +import Domain from "../../../../platform/models/domain/domain-base"; +import { EncString } from "../../../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../../../platform/models/domain/symmetric-crypto-key"; import { SendType } from "../../enums/send-type"; import { SendAccessResponse } from "../response/send-access.response"; import { SendAccessView } from "../view/send-access.view"; diff --git a/libs/common/src/tools/send/models/domain/send-file.ts b/libs/common/src/tools/send/models/domain/send-file.ts index a99ba222dff..7c26fbb72ae 100644 --- a/libs/common/src/tools/send/models/domain/send-file.ts +++ b/libs/common/src/tools/send/models/domain/send-file.ts @@ -1,8 +1,8 @@ import { Jsonify } from "type-fest"; -import Domain from "../../../../models/domain/domain-base"; -import { EncString } from "../../../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../../../models/domain/symmetric-crypto-key"; +import Domain from "../../../../platform/models/domain/domain-base"; +import { EncString } from "../../../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../../../platform/models/domain/symmetric-crypto-key"; import { SendFileData } from "../data/send-file.data"; import { SendFileView } from "../view/send-file.view"; diff --git a/libs/common/src/tools/send/models/domain/send-text.ts b/libs/common/src/tools/send/models/domain/send-text.ts index a404dd7502b..e98e4bf2902 100644 --- a/libs/common/src/tools/send/models/domain/send-text.ts +++ b/libs/common/src/tools/send/models/domain/send-text.ts @@ -1,8 +1,8 @@ import { Jsonify } from "type-fest"; -import Domain from "../../../../models/domain/domain-base"; -import { EncString } from "../../../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../../../models/domain/symmetric-crypto-key"; +import Domain from "../../../../platform/models/domain/domain-base"; +import { EncString } from "../../../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../../../platform/models/domain/symmetric-crypto-key"; import { SendTextData } from "../data/send-text.data"; import { SendTextView } from "../view/send-text.view"; diff --git a/libs/common/src/tools/send/models/domain/send.spec.ts b/libs/common/src/tools/send/models/domain/send.spec.ts index 8bd832a501f..25a89b26893 100644 --- a/libs/common/src/tools/send/models/domain/send.spec.ts +++ b/libs/common/src/tools/send/models/domain/send.spec.ts @@ -2,10 +2,10 @@ import { Substitute, Arg, SubstituteOf } from "@fluffy-spoon/substitute"; import { makeStaticByteArray, mockEnc } from "../../../../../spec"; -import { CryptoService } from "../../../../abstractions/crypto.service"; -import { EncryptService } from "../../../../abstractions/encrypt.service"; -import { EncString } from "../../../../models/domain/enc-string"; -import { ContainerService } from "../../../../services/container.service"; +import { CryptoService } from "../../../../platform/abstractions/crypto.service"; +import { EncryptService } from "../../../../platform/abstractions/encrypt.service"; +import { EncString } from "../../../../platform/models/domain/enc-string"; +import { ContainerService } from "../../../../platform/services/container.service"; import { SendType } from "../../enums/send-type"; import { SendData } from "../data/send.data"; diff --git a/libs/common/src/tools/send/models/domain/send.ts b/libs/common/src/tools/send/models/domain/send.ts index a12952181aa..357af1c58f5 100644 --- a/libs/common/src/tools/send/models/domain/send.ts +++ b/libs/common/src/tools/send/models/domain/send.ts @@ -1,8 +1,8 @@ import { Jsonify } from "type-fest"; -import { Utils } from "../../../../misc/utils"; -import Domain from "../../../../models/domain/domain-base"; -import { EncString } from "../../../../models/domain/enc-string"; +import { Utils } from "../../../../platform/misc/utils"; +import Domain from "../../../../platform/models/domain/domain-base"; +import { EncString } from "../../../../platform/models/domain/enc-string"; import { SendType } from "../../enums/send-type"; import { SendData } from "../data/send.data"; import { SendView } from "../view/send.view"; diff --git a/libs/common/src/tools/send/models/view/send.view.ts b/libs/common/src/tools/send/models/view/send.view.ts index df802e562a8..9b85e945629 100644 --- a/libs/common/src/tools/send/models/view/send.view.ts +++ b/libs/common/src/tools/send/models/view/send.view.ts @@ -1,6 +1,6 @@ -import { Utils } from "../../../../misc/utils"; -import { SymmetricCryptoKey } from "../../../../models/domain/symmetric-crypto-key"; import { View } from "../../../../models/view/view"; +import { Utils } from "../../../../platform/misc/utils"; +import { SymmetricCryptoKey } from "../../../../platform/models/domain/symmetric-crypto-key"; import { DeepJsonify } from "../../../../types/deep-jsonify"; import { SendType } from "../../enums/send-type"; import { Send } from "../domain/send"; diff --git a/libs/common/src/tools/send/services/send-api.service.abstraction.ts b/libs/common/src/tools/send/services/send-api.service.abstraction.ts index 0fac99d6a0f..8d484c66595 100644 --- a/libs/common/src/tools/send/services/send-api.service.abstraction.ts +++ b/libs/common/src/tools/send/services/send-api.service.abstraction.ts @@ -1,5 +1,5 @@ -import { EncArrayBuffer } from "../../../models/domain/enc-array-buffer"; import { ListResponse } from "../../../models/response/list.response"; +import { EncArrayBuffer } from "../../../platform/models/domain/enc-array-buffer"; import { Send } from "../models/domain/send"; import { SendAccessRequest } from "../models/request/send-access.request"; import { SendRequest } from "../models/request/send.request"; diff --git a/libs/common/src/tools/send/services/send-api.service.ts b/libs/common/src/tools/send/services/send-api.service.ts index 924bea7472b..5572d992f5b 100644 --- a/libs/common/src/tools/send/services/send-api.service.ts +++ b/libs/common/src/tools/send/services/send-api.service.ts @@ -1,12 +1,12 @@ import { ApiService } from "../../../abstractions/api.service"; +import { ErrorResponse } from "../../../models/response/error.response"; +import { ListResponse } from "../../../models/response/list.response"; import { FileUploadApiMethods, FileUploadService, -} from "../../../abstractions/file-upload/file-upload.service"; -import { Utils } from "../../../misc/utils"; -import { EncArrayBuffer } from "../../../models/domain/enc-array-buffer"; -import { ErrorResponse } from "../../../models/response/error.response"; -import { ListResponse } from "../../../models/response/list.response"; +} from "../../../platform/abstractions/file-upload/file-upload.service"; +import { Utils } from "../../../platform/misc/utils"; +import { EncArrayBuffer } from "../../../platform/models/domain/enc-array-buffer"; import { SendType } from "../enums/send-type"; import { SendData } from "../models/data/send.data"; import { Send } from "../models/domain/send"; diff --git a/libs/common/src/tools/send/services/send.service.abstraction.ts b/libs/common/src/tools/send/services/send.service.abstraction.ts index 9624ce02715..d99a8973588 100644 --- a/libs/common/src/tools/send/services/send.service.abstraction.ts +++ b/libs/common/src/tools/send/services/send.service.abstraction.ts @@ -1,7 +1,7 @@ import { Observable } from "rxjs"; -import { EncArrayBuffer } from "../../../models/domain/enc-array-buffer"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; +import { EncArrayBuffer } from "../../../platform/models/domain/enc-array-buffer"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { SendData } from "../models/data/send.data"; import { Send } from "../models/domain/send"; import { SendView } from "../models/view/send.view"; diff --git a/libs/common/src/tools/send/services/send.service.spec.ts b/libs/common/src/tools/send/services/send.service.spec.ts index bd185e030ba..69971dc5487 100644 --- a/libs/common/src/tools/send/services/send.service.spec.ts +++ b/libs/common/src/tools/send/services/send.service.spec.ts @@ -1,13 +1,13 @@ import { any, mock, MockProxy } from "jest-mock-extended"; import { BehaviorSubject, firstValueFrom } from "rxjs"; -import { CryptoService } from "../../../abstractions/crypto.service"; -import { CryptoFunctionService } from "../../../abstractions/cryptoFunction.service"; -import { EncryptService } from "../../../abstractions/encrypt.service"; -import { I18nService } from "../../../abstractions/i18n.service"; -import { StateService } from "../../../abstractions/state.service"; -import { EncString } from "../../../models/domain/enc-string"; -import { ContainerService } from "../../../services/container.service"; +import { CryptoFunctionService } from "../../../platform/abstractions/crypto-function.service"; +import { CryptoService } from "../../../platform/abstractions/crypto.service"; +import { EncryptService } from "../../../platform/abstractions/encrypt.service"; +import { I18nService } from "../../../platform/abstractions/i18n.service"; +import { StateService } from "../../../platform/abstractions/state.service"; +import { EncString } from "../../../platform/models/domain/enc-string"; +import { ContainerService } from "../../../platform/services/container.service"; import { SendData } from "../models/data/send.data"; import { Send } from "../models/domain/send"; import { SendView } from "../models/view/send.view"; diff --git a/libs/common/src/tools/send/services/send.service.ts b/libs/common/src/tools/send/services/send.service.ts index 1f1e3da9182..eddc35ae795 100644 --- a/libs/common/src/tools/send/services/send.service.ts +++ b/libs/common/src/tools/send/services/send.service.ts @@ -1,14 +1,14 @@ import { BehaviorSubject, concatMap } from "rxjs"; -import { CryptoService } from "../../../abstractions/crypto.service"; -import { CryptoFunctionService } from "../../../abstractions/cryptoFunction.service"; -import { I18nService } from "../../../abstractions/i18n.service"; -import { StateService } from "../../../abstractions/state.service"; import { SEND_KDF_ITERATIONS } from "../../../enums"; -import { Utils } from "../../../misc/utils"; -import { EncArrayBuffer } from "../../../models/domain/enc-array-buffer"; -import { EncString } from "../../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; +import { CryptoFunctionService } from "../../../platform/abstractions/crypto-function.service"; +import { CryptoService } from "../../../platform/abstractions/crypto.service"; +import { I18nService } from "../../../platform/abstractions/i18n.service"; +import { StateService } from "../../../platform/abstractions/state.service"; +import { Utils } from "../../../platform/misc/utils"; +import { EncArrayBuffer } from "../../../platform/models/domain/enc-array-buffer"; +import { EncString } from "../../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { SendType } from "../enums/send-type"; import { SendData } from "../models/data/send.data"; import { Send } from "../models/domain/send"; diff --git a/libs/common/src/vault/abstractions/cipher.service.ts b/libs/common/src/vault/abstractions/cipher.service.ts index ffb2c43adce..574b96d9ece 100644 --- a/libs/common/src/vault/abstractions/cipher.service.ts +++ b/libs/common/src/vault/abstractions/cipher.service.ts @@ -1,5 +1,5 @@ import { UriMatchType } from "../../enums"; -import { SymmetricCryptoKey } from "../../models/domain/symmetric-crypto-key"; +import { SymmetricCryptoKey } from "../../platform/models/domain/symmetric-crypto-key"; import { CipherType } from "../enums/cipher-type"; import { CipherData } from "../models/data/cipher.data"; import { Cipher } from "../models/domain/cipher"; diff --git a/libs/common/src/vault/abstractions/file-upload/cipher-file-upload.service.ts b/libs/common/src/vault/abstractions/file-upload/cipher-file-upload.service.ts index a8bd35bb254..46026298475 100644 --- a/libs/common/src/vault/abstractions/file-upload/cipher-file-upload.service.ts +++ b/libs/common/src/vault/abstractions/file-upload/cipher-file-upload.service.ts @@ -1,6 +1,6 @@ -import { EncArrayBuffer } from "../../../models/domain/enc-array-buffer"; -import { EncString } from "../../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; +import { EncArrayBuffer } from "../../../platform/models/domain/enc-array-buffer"; +import { EncString } from "../../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { Cipher } from "../../models/domain/cipher"; import { CipherResponse } from "../../models/response/cipher.response"; diff --git a/libs/common/src/vault/abstractions/folder/folder.service.abstraction.ts b/libs/common/src/vault/abstractions/folder/folder.service.abstraction.ts index 96b9820dc71..6f809b0a074 100644 --- a/libs/common/src/vault/abstractions/folder/folder.service.abstraction.ts +++ b/libs/common/src/vault/abstractions/folder/folder.service.abstraction.ts @@ -1,6 +1,6 @@ import { Observable } from "rxjs"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { FolderData } from "../../models/data/folder.data"; import { Folder } from "../../models/domain/folder"; import { FolderView } from "../../models/view/folder.view"; diff --git a/libs/common/src/vault/models/domain/attachment.spec.ts b/libs/common/src/vault/models/domain/attachment.spec.ts index c1397ad3ca4..2d581189597 100644 --- a/libs/common/src/vault/models/domain/attachment.spec.ts +++ b/libs/common/src/vault/models/domain/attachment.spec.ts @@ -1,11 +1,11 @@ import { mock, MockProxy } from "jest-mock-extended"; import { makeStaticByteArray, mockEnc, mockFromJson } from "../../../../spec"; -import { CryptoService } from "../../../abstractions/crypto.service"; -import { EncryptService } from "../../../abstractions/encrypt.service"; -import { EncString } from "../../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; -import { ContainerService } from "../../../services/container.service"; +import { CryptoService } from "../../../platform/abstractions/crypto.service"; +import { EncryptService } from "../../../platform/abstractions/encrypt.service"; +import { EncString } from "../../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; +import { ContainerService } from "../../../platform/services/container.service"; import { AttachmentData } from "../../models/data/attachment.data"; import { Attachment } from "../../models/domain/attachment"; diff --git a/libs/common/src/vault/models/domain/attachment.ts b/libs/common/src/vault/models/domain/attachment.ts index 99d3d631fed..a5e0aa9d4ed 100644 --- a/libs/common/src/vault/models/domain/attachment.ts +++ b/libs/common/src/vault/models/domain/attachment.ts @@ -1,9 +1,9 @@ import { Jsonify } from "type-fest"; -import { Utils } from "../../../misc/utils"; -import Domain from "../../../models/domain/domain-base"; -import { EncString } from "../../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; +import { Utils } from "../../../platform/misc/utils"; +import Domain from "../../../platform/models/domain/domain-base"; +import { EncString } from "../../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { AttachmentData } from "../data/attachment.data"; import { AttachmentView } from "../view/attachment.view"; diff --git a/libs/common/src/vault/models/domain/card.spec.ts b/libs/common/src/vault/models/domain/card.spec.ts index a80d57a587f..b84e8683532 100644 --- a/libs/common/src/vault/models/domain/card.spec.ts +++ b/libs/common/src/vault/models/domain/card.spec.ts @@ -1,5 +1,5 @@ import { mockEnc, mockFromJson } from "../../../../spec"; -import { EncString } from "../../../models/domain/enc-string"; +import { EncString } from "../../../platform/models/domain/enc-string"; import { CardData } from "../../../vault/models/data/card.data"; import { Card } from "../../models/domain/card"; diff --git a/libs/common/src/vault/models/domain/card.ts b/libs/common/src/vault/models/domain/card.ts index ba8a53dbaf2..055b0c497cf 100644 --- a/libs/common/src/vault/models/domain/card.ts +++ b/libs/common/src/vault/models/domain/card.ts @@ -1,8 +1,8 @@ import { Jsonify } from "type-fest"; -import Domain from "../../../models/domain/domain-base"; -import { EncString } from "../../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; +import Domain from "../../../platform/models/domain/domain-base"; +import { EncString } from "../../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { CardData } from "../data/card.data"; import { CardView } from "../view/card.view"; diff --git a/libs/common/src/vault/models/domain/cipher.spec.ts b/libs/common/src/vault/models/domain/cipher.spec.ts index b23b15e3ef7..d5c141487a2 100644 --- a/libs/common/src/vault/models/domain/cipher.spec.ts +++ b/libs/common/src/vault/models/domain/cipher.spec.ts @@ -4,8 +4,8 @@ import { Jsonify } from "type-fest"; import { mockEnc, mockFromJson } from "../../../../spec"; import { FieldType, SecureNoteType, UriMatchType } from "../../../enums"; -import { EncString } from "../../../models/domain/enc-string"; -import { InitializerKey } from "../../../services/cryptography/initializer-key"; +import { EncString } from "../../../platform/models/domain/enc-string"; +import { InitializerKey } from "../../../platform/services/cryptography/initializer-key"; import { CipherRepromptType } from "../../enums/cipher-reprompt-type"; import { CipherType } from "../../enums/cipher-type"; import { CipherData } from "../../models/data/cipher.data"; diff --git a/libs/common/src/vault/models/domain/cipher.ts b/libs/common/src/vault/models/domain/cipher.ts index 55ef16914c4..f85b6cb45c9 100644 --- a/libs/common/src/vault/models/domain/cipher.ts +++ b/libs/common/src/vault/models/domain/cipher.ts @@ -1,10 +1,10 @@ import { Jsonify } from "type-fest"; -import { Decryptable } from "../../../interfaces/decryptable.interface"; -import Domain from "../../../models/domain/domain-base"; -import { EncString } from "../../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; -import { InitializerKey } from "../../../services/cryptography/initializer-key"; +import { Decryptable } from "../../../platform/interfaces/decryptable.interface"; +import Domain from "../../../platform/models/domain/domain-base"; +import { EncString } from "../../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; +import { InitializerKey } from "../../../platform/services/cryptography/initializer-key"; import { CipherRepromptType } from "../../enums/cipher-reprompt-type"; import { CipherType } from "../../enums/cipher-type"; import { CipherData } from "../data/cipher.data"; diff --git a/libs/common/src/vault/models/domain/field.spec.ts b/libs/common/src/vault/models/domain/field.spec.ts index 0754c0b3b68..aab8d933a3a 100644 --- a/libs/common/src/vault/models/domain/field.spec.ts +++ b/libs/common/src/vault/models/domain/field.spec.ts @@ -1,6 +1,6 @@ import { mockEnc, mockFromJson } from "../../../../spec"; import { FieldType } from "../../../enums"; -import { EncString } from "../../../models/domain/enc-string"; +import { EncString } from "../../../platform/models/domain/enc-string"; import { FieldData } from "../../models/data/field.data"; import { Field } from "../../models/domain/field"; diff --git a/libs/common/src/vault/models/domain/field.ts b/libs/common/src/vault/models/domain/field.ts index b66b78a6460..388f9f806c4 100644 --- a/libs/common/src/vault/models/domain/field.ts +++ b/libs/common/src/vault/models/domain/field.ts @@ -1,9 +1,9 @@ import { Jsonify } from "type-fest"; import { FieldType, LinkedIdType } from "../../../enums"; -import Domain from "../../../models/domain/domain-base"; -import { EncString } from "../../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; +import Domain from "../../../platform/models/domain/domain-base"; +import { EncString } from "../../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { FieldData } from "../data/field.data"; import { FieldView } from "../view/field.view"; diff --git a/libs/common/src/vault/models/domain/folder.spec.ts b/libs/common/src/vault/models/domain/folder.spec.ts index dc8b490e72a..686a8b886ef 100644 --- a/libs/common/src/vault/models/domain/folder.spec.ts +++ b/libs/common/src/vault/models/domain/folder.spec.ts @@ -1,5 +1,5 @@ import { mockEnc, mockFromJson } from "../../../../spec"; -import { EncString } from "../../../models/domain/enc-string"; +import { EncString } from "../../../platform/models/domain/enc-string"; import { FolderData } from "../../models/data/folder.data"; import { Folder } from "../../models/domain/folder"; @@ -40,7 +40,7 @@ describe("Folder", () => { }); describe("fromJSON", () => { - jest.mock("../../../models/domain/enc-string"); + jest.mock("../../../platform/models/domain/enc-string"); jest.spyOn(EncString, "fromJSON").mockImplementation(mockFromJson); it("initializes nested objects", () => { diff --git a/libs/common/src/vault/models/domain/folder.ts b/libs/common/src/vault/models/domain/folder.ts index 160d119e863..db999ee7d60 100644 --- a/libs/common/src/vault/models/domain/folder.ts +++ b/libs/common/src/vault/models/domain/folder.ts @@ -1,7 +1,7 @@ import { Jsonify } from "type-fest"; -import Domain from "../../../models/domain/domain-base"; -import { EncString } from "../../../models/domain/enc-string"; +import Domain from "../../../platform/models/domain/domain-base"; +import { EncString } from "../../../platform/models/domain/enc-string"; import { FolderData } from "../data/folder.data"; import { FolderView } from "../view/folder.view"; diff --git a/libs/common/src/vault/models/domain/identity.spec.ts b/libs/common/src/vault/models/domain/identity.spec.ts index a3fdbd580bb..929124fd875 100644 --- a/libs/common/src/vault/models/domain/identity.spec.ts +++ b/libs/common/src/vault/models/domain/identity.spec.ts @@ -1,5 +1,5 @@ import { mockEnc, mockFromJson } from "../../../../spec"; -import { EncString } from "../../../models/domain/enc-string"; +import { EncString } from "../../../platform/models/domain/enc-string"; import { IdentityData } from "../../models/data/identity.data"; import { Identity } from "../../models/domain/identity"; diff --git a/libs/common/src/vault/models/domain/identity.ts b/libs/common/src/vault/models/domain/identity.ts index 6a5fab7e341..cebaa405f6c 100644 --- a/libs/common/src/vault/models/domain/identity.ts +++ b/libs/common/src/vault/models/domain/identity.ts @@ -1,8 +1,8 @@ import { Jsonify } from "type-fest"; -import Domain from "../../../models/domain/domain-base"; -import { EncString } from "../../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; +import Domain from "../../../platform/models/domain/domain-base"; +import { EncString } from "../../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { IdentityData } from "../data/identity.data"; import { IdentityView } from "../view/identity.view"; diff --git a/libs/common/src/vault/models/domain/login-uri.spec.ts b/libs/common/src/vault/models/domain/login-uri.spec.ts index 28378e73c4a..7649739267d 100644 --- a/libs/common/src/vault/models/domain/login-uri.spec.ts +++ b/libs/common/src/vault/models/domain/login-uri.spec.ts @@ -2,7 +2,7 @@ import { Jsonify } from "type-fest"; import { mockEnc, mockFromJson } from "../../../../spec"; import { UriMatchType } from "../../../enums"; -import { EncString } from "../../../models/domain/enc-string"; +import { EncString } from "../../../platform/models/domain/enc-string"; import { LoginUriData } from "../data/login-uri.data"; import { LoginUri } from "./login-uri"; diff --git a/libs/common/src/vault/models/domain/login-uri.ts b/libs/common/src/vault/models/domain/login-uri.ts index 4d8d6c98562..5b599467588 100644 --- a/libs/common/src/vault/models/domain/login-uri.ts +++ b/libs/common/src/vault/models/domain/login-uri.ts @@ -1,9 +1,9 @@ import { Jsonify } from "type-fest"; import { UriMatchType } from "../../../enums"; -import Domain from "../../../models/domain/domain-base"; -import { EncString } from "../../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; +import Domain from "../../../platform/models/domain/domain-base"; +import { EncString } from "../../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { LoginUriData } from "../data/login-uri.data"; import { LoginUriView } from "../view/login-uri.view"; diff --git a/libs/common/src/vault/models/domain/login.spec.ts b/libs/common/src/vault/models/domain/login.spec.ts index 4cc774bdc3e..0ed847d596f 100644 --- a/libs/common/src/vault/models/domain/login.spec.ts +++ b/libs/common/src/vault/models/domain/login.spec.ts @@ -3,7 +3,7 @@ import { Substitute, Arg } from "@fluffy-spoon/substitute"; import { mockEnc, mockFromJson } from "../../../../spec"; import { UriMatchType } from "../../../enums"; -import { EncString } from "../../../models/domain/enc-string"; +import { EncString } from "../../../platform/models/domain/enc-string"; import { LoginData } from "../../models/data/login.data"; import { Login } from "../../models/domain/login"; import { LoginUri } from "../../models/domain/login-uri"; diff --git a/libs/common/src/vault/models/domain/login.ts b/libs/common/src/vault/models/domain/login.ts index 763fba212f0..bc046e784db 100644 --- a/libs/common/src/vault/models/domain/login.ts +++ b/libs/common/src/vault/models/domain/login.ts @@ -1,8 +1,8 @@ import { Jsonify } from "type-fest"; -import Domain from "../../../models/domain/domain-base"; -import { EncString } from "../../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; +import Domain from "../../../platform/models/domain/domain-base"; +import { EncString } from "../../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { LoginData } from "../data/login.data"; import { LoginView } from "../view/login.view"; diff --git a/libs/common/src/vault/models/domain/password.spec.ts b/libs/common/src/vault/models/domain/password.spec.ts index 4e42904ad96..ccd2e77576f 100644 --- a/libs/common/src/vault/models/domain/password.spec.ts +++ b/libs/common/src/vault/models/domain/password.spec.ts @@ -1,5 +1,5 @@ import { mockEnc, mockFromJson } from "../../../../spec"; -import { EncString } from "../../../models/domain/enc-string"; +import { EncString } from "../../../platform/models/domain/enc-string"; import { PasswordHistoryData } from "../../models/data/password-history.data"; import { Password } from "../../models/domain/password"; diff --git a/libs/common/src/vault/models/domain/password.ts b/libs/common/src/vault/models/domain/password.ts index 95b76e284f7..c2bb3df783f 100644 --- a/libs/common/src/vault/models/domain/password.ts +++ b/libs/common/src/vault/models/domain/password.ts @@ -1,8 +1,8 @@ import { Jsonify } from "type-fest"; -import Domain from "../../../models/domain/domain-base"; -import { EncString } from "../../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; +import Domain from "../../../platform/models/domain/domain-base"; +import { EncString } from "../../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { PasswordHistoryData } from "../data/password-history.data"; import { PasswordHistoryView } from "../view/password-history.view"; diff --git a/libs/common/src/vault/models/domain/secure-note.ts b/libs/common/src/vault/models/domain/secure-note.ts index 5f3ee673376..cc70c42abbb 100644 --- a/libs/common/src/vault/models/domain/secure-note.ts +++ b/libs/common/src/vault/models/domain/secure-note.ts @@ -1,8 +1,8 @@ import { Jsonify } from "type-fest"; import { SecureNoteType } from "../../../enums"; -import Domain from "../../../models/domain/domain-base"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; +import Domain from "../../../platform/models/domain/domain-base"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { SecureNoteData } from "../data/secure-note.data"; import { SecureNoteView } from "../view/secure-note.view"; diff --git a/libs/common/src/vault/models/view/attachment.view.spec.ts b/libs/common/src/vault/models/view/attachment.view.spec.ts index dc81fe3f78e..7cb291f2714 100644 --- a/libs/common/src/vault/models/view/attachment.view.spec.ts +++ b/libs/common/src/vault/models/view/attachment.view.spec.ts @@ -1,9 +1,9 @@ import { mockFromJson } from "../../../../spec"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { AttachmentView } from "./attachment.view"; -jest.mock("../../../models/domain/symmetric-crypto-key"); +jest.mock("../../../platform/models/domain/symmetric-crypto-key"); describe("AttachmentView", () => { it("fromJSON initializes nested objects", () => { diff --git a/libs/common/src/vault/models/view/attachment.view.ts b/libs/common/src/vault/models/view/attachment.view.ts index e0387f9f79f..0c6bd980b07 100644 --- a/libs/common/src/vault/models/view/attachment.view.ts +++ b/libs/common/src/vault/models/view/attachment.view.ts @@ -1,7 +1,7 @@ import { Jsonify } from "type-fest"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; import { View } from "../../../models/view/view"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { Attachment } from "../domain/attachment"; export class AttachmentView implements View { diff --git a/libs/common/src/vault/models/view/cipher.view.ts b/libs/common/src/vault/models/view/cipher.view.ts index 8284c94edf1..0667519be7e 100644 --- a/libs/common/src/vault/models/view/cipher.view.ts +++ b/libs/common/src/vault/models/view/cipher.view.ts @@ -1,9 +1,9 @@ import { Jsonify } from "type-fest"; import { LinkedIdType } from "../../../enums"; -import { InitializerMetadata } from "../../../interfaces/initializer-metadata.interface"; import { View } from "../../../models/view/view"; -import { InitializerKey } from "../../../services/cryptography/initializer-key"; +import { InitializerMetadata } from "../../../platform/interfaces/initializer-metadata.interface"; +import { InitializerKey } from "../../../platform/services/cryptography/initializer-key"; import { CipherRepromptType } from "../../enums/cipher-reprompt-type"; import { CipherType } from "../../enums/cipher-type"; import { LocalData } from "../data/local.data"; diff --git a/libs/common/src/vault/models/view/identity.view.ts b/libs/common/src/vault/models/view/identity.view.ts index 9ee3fe29340..9d14a554f76 100644 --- a/libs/common/src/vault/models/view/identity.view.ts +++ b/libs/common/src/vault/models/view/identity.view.ts @@ -2,7 +2,7 @@ import { Jsonify } from "type-fest"; import { IdentityLinkedId as LinkedId } from "../../../enums"; import { linkedFieldOption } from "../../../misc/linkedFieldOption.decorator"; -import { Utils } from "../../../misc/utils"; +import { Utils } from "../../../platform/misc/utils"; import { ItemView } from "./item.view"; diff --git a/libs/common/src/vault/models/view/login-uri-view.spec.ts b/libs/common/src/vault/models/view/login-uri-view.spec.ts index 974846a5708..b4a5e7288a4 100644 --- a/libs/common/src/vault/models/view/login-uri-view.spec.ts +++ b/libs/common/src/vault/models/view/login-uri-view.spec.ts @@ -1,5 +1,5 @@ import { UriMatchType } from "../../../enums"; -import { Utils } from "../../../misc/utils"; +import { Utils } from "../../../platform/misc/utils"; import { LoginUriView } from "./login-uri.view"; diff --git a/libs/common/src/vault/models/view/login-uri.view.ts b/libs/common/src/vault/models/view/login-uri.view.ts index 8b06366f803..be08f63d8b1 100644 --- a/libs/common/src/vault/models/view/login-uri.view.ts +++ b/libs/common/src/vault/models/view/login-uri.view.ts @@ -1,8 +1,8 @@ import { Jsonify } from "type-fest"; import { UriMatchType } from "../../../enums"; -import { Utils } from "../../../misc/utils"; import { View } from "../../../models/view/view"; +import { Utils } from "../../../platform/misc/utils"; import { LoginUri } from "../domain/login-uri"; const CanLaunchWhitelist = [ diff --git a/libs/common/src/vault/models/view/login.view.ts b/libs/common/src/vault/models/view/login.view.ts index e1685b1125c..954a14fe8e9 100644 --- a/libs/common/src/vault/models/view/login.view.ts +++ b/libs/common/src/vault/models/view/login.view.ts @@ -2,7 +2,7 @@ import { Jsonify } from "type-fest"; import { LoginLinkedId as LinkedId, UriMatchType } from "../../../enums"; import { linkedFieldOption } from "../../../misc/linkedFieldOption.decorator"; -import { Utils } from "../../../misc/utils"; +import { Utils } from "../../../platform/misc/utils"; import { Login } from "../domain/login"; import { ItemView } from "./item.view"; diff --git a/libs/common/src/vault/services/cipher.service.spec.ts b/libs/common/src/vault/services/cipher.service.spec.ts index 9fa70653cb6..b9fbfacbc87 100644 --- a/libs/common/src/vault/services/cipher.service.spec.ts +++ b/libs/common/src/vault/services/cipher.service.spec.ts @@ -2,15 +2,15 @@ import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute"; import { ApiService } from "../../abstractions/api.service"; -import { CryptoService } from "../../abstractions/crypto.service"; -import { EncryptService } from "../../abstractions/encrypt.service"; -import { I18nService } from "../../abstractions/i18n.service"; import { SearchService } from "../../abstractions/search.service"; import { SettingsService } from "../../abstractions/settings.service"; -import { StateService } from "../../abstractions/state.service"; -import { EncArrayBuffer } from "../../models/domain/enc-array-buffer"; -import { EncString } from "../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../models/domain/symmetric-crypto-key"; +import { CryptoService } from "../../platform/abstractions/crypto.service"; +import { EncryptService } from "../../platform/abstractions/encrypt.service"; +import { I18nService } from "../../platform/abstractions/i18n.service"; +import { StateService } from "../../platform/abstractions/state.service"; +import { EncArrayBuffer } from "../../platform/models/domain/enc-array-buffer"; +import { EncString } from "../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../platform/models/domain/symmetric-crypto-key"; import { CipherFileUploadService } from "../abstractions/file-upload/cipher-file-upload.service"; import { Cipher } from "../models/domain/cipher"; diff --git a/libs/common/src/vault/services/cipher.service.ts b/libs/common/src/vault/services/cipher.service.ts index c59319285a3..122eea4ee66 100644 --- a/libs/common/src/vault/services/cipher.service.ts +++ b/libs/common/src/vault/services/cipher.service.ts @@ -1,19 +1,19 @@ import { ApiService } from "../../abstractions/api.service"; -import { CryptoService } from "../../abstractions/crypto.service"; -import { EncryptService } from "../../abstractions/encrypt.service"; -import { I18nService } from "../../abstractions/i18n.service"; import { SearchService } from "../../abstractions/search.service"; import { SettingsService } from "../../abstractions/settings.service"; -import { StateService } from "../../abstractions/state.service"; import { FieldType, UriMatchType } from "../../enums"; -import { sequentialize } from "../../misc/sequentialize"; -import { Utils } from "../../misc/utils"; -import Domain from "../../models/domain/domain-base"; -import { EncArrayBuffer } from "../../models/domain/enc-array-buffer"; -import { EncString } from "../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../models/domain/symmetric-crypto-key"; import { ErrorResponse } from "../../models/response/error.response"; import { View } from "../../models/view/view"; +import { CryptoService } from "../../platform/abstractions/crypto.service"; +import { EncryptService } from "../../platform/abstractions/encrypt.service"; +import { I18nService } from "../../platform/abstractions/i18n.service"; +import { StateService } from "../../platform/abstractions/state.service"; +import { sequentialize } from "../../platform/misc/sequentialize"; +import { Utils } from "../../platform/misc/utils"; +import Domain from "../../platform/models/domain/domain-base"; +import { EncArrayBuffer } from "../../platform/models/domain/enc-array-buffer"; +import { EncString } from "../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../platform/models/domain/symmetric-crypto-key"; import { CipherService as CipherServiceAbstraction } from "../abstractions/cipher.service"; import { CipherFileUploadService } from "../abstractions/file-upload/cipher-file-upload.service"; import { CipherType } from "../enums/cipher-type"; diff --git a/libs/common/src/vault/services/file-upload/cipher-file-upload.service.ts b/libs/common/src/vault/services/file-upload/cipher-file-upload.service.ts index cbeaf988ef3..3af85018ad4 100644 --- a/libs/common/src/vault/services/file-upload/cipher-file-upload.service.ts +++ b/libs/common/src/vault/services/file-upload/cipher-file-upload.service.ts @@ -1,13 +1,13 @@ import { ApiService } from "../../../abstractions/api.service"; +import { ErrorResponse } from "../../../models/response/error.response"; import { FileUploadApiMethods, FileUploadService, -} from "../../../abstractions/file-upload/file-upload.service"; -import { Utils } from "../../../misc/utils"; -import { EncArrayBuffer } from "../../../models/domain/enc-array-buffer"; -import { EncString } from "../../../models/domain/enc-string"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; -import { ErrorResponse } from "../../../models/response/error.response"; +} from "../../../platform/abstractions/file-upload/file-upload.service"; +import { Utils } from "../../../platform/misc/utils"; +import { EncArrayBuffer } from "../../../platform/models/domain/enc-array-buffer"; +import { EncString } from "../../../platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { CipherFileUploadService as CipherFileUploadServiceAbstraction } from "../../abstractions/file-upload/cipher-file-upload.service"; import { Cipher } from "../../models/domain/cipher"; import { AttachmentRequest } from "../../models/request/attachment.request"; diff --git a/libs/common/src/vault/services/folder/folder.service.spec.ts b/libs/common/src/vault/services/folder/folder.service.spec.ts index 594a3ab1373..8dc158ed442 100644 --- a/libs/common/src/vault/services/folder/folder.service.spec.ts +++ b/libs/common/src/vault/services/folder/folder.service.spec.ts @@ -2,12 +2,12 @@ import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute"; import { BehaviorSubject, firstValueFrom } from "rxjs"; -import { CryptoService } from "../../../abstractions/crypto.service"; -import { EncryptService } from "../../../abstractions/encrypt.service"; -import { I18nService } from "../../../abstractions/i18n.service"; -import { EncString } from "../../../models/domain/enc-string"; -import { ContainerService } from "../../../services/container.service"; -import { StateService } from "../../../services/state.service"; +import { CryptoService } from "../../../platform/abstractions/crypto.service"; +import { EncryptService } from "../../../platform/abstractions/encrypt.service"; +import { I18nService } from "../../../platform/abstractions/i18n.service"; +import { EncString } from "../../../platform/models/domain/enc-string"; +import { ContainerService } from "../../../platform/services/container.service"; +import { StateService } from "../../../platform/services/state.service"; import { CipherService } from "../../abstractions/cipher.service"; import { FolderData } from "../../models/data/folder.data"; import { FolderView } from "../../models/view/folder.view"; diff --git a/libs/common/src/vault/services/folder/folder.service.ts b/libs/common/src/vault/services/folder/folder.service.ts index 89ccf67a99d..9f8645e87a6 100644 --- a/libs/common/src/vault/services/folder/folder.service.ts +++ b/libs/common/src/vault/services/folder/folder.service.ts @@ -1,10 +1,10 @@ import { BehaviorSubject, concatMap } from "rxjs"; -import { CryptoService } from "../../../abstractions/crypto.service"; -import { I18nService } from "../../../abstractions/i18n.service"; -import { StateService } from "../../../abstractions/state.service"; -import { Utils } from "../../../misc/utils"; -import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key"; +import { CryptoService } from "../../../platform/abstractions/crypto.service"; +import { I18nService } from "../../../platform/abstractions/i18n.service"; +import { StateService } from "../../../platform/abstractions/state.service"; +import { Utils } from "../../../platform/misc/utils"; +import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { CipherService } from "../../../vault/abstractions/cipher.service"; import { InternalFolderService as InternalFolderServiceAbstraction } from "../../../vault/abstractions/folder/folder.service.abstraction"; import { CipherData } from "../../../vault/models/data/cipher.data"; diff --git a/libs/common/src/vault/services/sync/sync.service.ts b/libs/common/src/vault/services/sync/sync.service.ts index 3cf75bcd079..ae4f50a39e7 100644 --- a/libs/common/src/vault/services/sync/sync.service.ts +++ b/libs/common/src/vault/services/sync/sync.service.ts @@ -1,9 +1,5 @@ import { ApiService } from "../../../abstractions/api.service"; -import { CryptoService } from "../../../abstractions/crypto.service"; -import { LogService } from "../../../abstractions/log.service"; -import { MessagingService } from "../../../abstractions/messaging.service"; import { SettingsService } from "../../../abstractions/settings.service"; -import { StateService } from "../../../abstractions/state.service"; import { CollectionService } from "../../../admin-console/abstractions/collection.service"; import { InternalOrganizationService } from "../../../admin-console/abstractions/organization/organization.service.abstraction"; import { InternalPolicyService } from "../../../admin-console/abstractions/policy/policy.service.abstraction"; @@ -16,7 +12,6 @@ import { CollectionDetailsResponse } from "../../../admin-console/models/respons import { PolicyResponse } from "../../../admin-console/models/response/policy.response"; import { KeyConnectorService } from "../../../auth/abstractions/key-connector.service"; import { ForceResetPasswordReason } from "../../../auth/models/domain/force-reset-password-reason"; -import { sequentialize } from "../../../misc/sequentialize"; import { DomainsResponse } from "../../../models/response/domains.response"; import { SyncCipherNotification, @@ -24,6 +19,11 @@ import { SyncSendNotification, } from "../../../models/response/notification.response"; import { ProfileResponse } from "../../../models/response/profile.response"; +import { CryptoService } from "../../../platform/abstractions/crypto.service"; +import { LogService } from "../../../platform/abstractions/log.service"; +import { MessagingService } from "../../../platform/abstractions/messaging.service"; +import { StateService } from "../../../platform/abstractions/state.service"; +import { sequentialize } from "../../../platform/misc/sequentialize"; import { SendData } from "../../../tools/send/models/data/send.data"; import { SendResponse } from "../../../tools/send/models/response/send.response"; import { SendApiService } from "../../../tools/send/services/send-api.service.abstraction"; diff --git a/libs/components/src/async-actions/bit-action.directive.ts b/libs/components/src/async-actions/bit-action.directive.ts index 640063971b5..1012cdf631d 100644 --- a/libs/components/src/async-actions/bit-action.directive.ts +++ b/libs/components/src/async-actions/bit-action.directive.ts @@ -1,8 +1,8 @@ import { Directive, HostListener, Input, OnDestroy, Optional } from "@angular/core"; import { BehaviorSubject, finalize, Subject, takeUntil, tap } from "rxjs"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { ButtonLikeAbstraction } from "../shared/button-like.abstraction"; import { FunctionReturningAwaitable, functionToObservable } from "../utils/function-to-observable"; diff --git a/libs/components/src/async-actions/bit-submit.directive.ts b/libs/components/src/async-actions/bit-submit.directive.ts index 23a8a9695af..90b9a1f4cd3 100644 --- a/libs/components/src/async-actions/bit-submit.directive.ts +++ b/libs/components/src/async-actions/bit-submit.directive.ts @@ -2,8 +2,8 @@ import { Directive, Input, OnDestroy, OnInit, Optional } from "@angular/core"; import { FormGroupDirective } from "@angular/forms"; import { BehaviorSubject, catchError, filter, of, Subject, switchMap, takeUntil } from "rxjs"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { FunctionReturningAwaitable, functionToObservable } from "../utils/function-to-observable"; diff --git a/libs/components/src/async-actions/in-forms.stories.ts b/libs/components/src/async-actions/in-forms.stories.ts index f72f1b64794..ff060c6a7de 100644 --- a/libs/components/src/async-actions/in-forms.stories.ts +++ b/libs/components/src/async-actions/in-forms.stories.ts @@ -4,8 +4,8 @@ import { action } from "@storybook/addon-actions"; import { Meta, moduleMetadata, StoryObj } from "@storybook/angular"; import { delay, of } from "rxjs"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; -import { I18nService } from "@bitwarden/common/src/abstractions/i18n.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; +import { I18nService } from "@bitwarden/common/src/platform/abstractions/i18n.service"; import { ButtonModule } from "../button"; import { FormFieldModule } from "../form-field"; diff --git a/libs/components/src/async-actions/standalone.stories.ts b/libs/components/src/async-actions/standalone.stories.ts index e4dec780e0b..5e15135dc5d 100644 --- a/libs/components/src/async-actions/standalone.stories.ts +++ b/libs/components/src/async-actions/standalone.stories.ts @@ -3,8 +3,8 @@ import { action } from "@storybook/addon-actions"; import { Meta, StoryObj, moduleMetadata } from "@storybook/angular"; import { delay, of } from "rxjs"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; -import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { ButtonModule } from "../button"; import { IconButtonModule } from "../icon-button"; diff --git a/libs/components/src/avatar/avatar.component.ts b/libs/components/src/avatar/avatar.component.ts index 8e67fd66ea9..32e92f8a95e 100644 --- a/libs/components/src/avatar/avatar.component.ts +++ b/libs/components/src/avatar/avatar.component.ts @@ -1,7 +1,7 @@ import { Component, Input, OnChanges } from "@angular/core"; import { DomSanitizer, SafeResourceUrl } from "@angular/platform-browser"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; type SizeTypes = "xlarge" | "large" | "default" | "small" | "xsmall"; diff --git a/libs/components/src/badge-list/badge-list.stories.ts b/libs/components/src/badge-list/badge-list.stories.ts index 4e580badb1a..1c4536c1f99 100644 --- a/libs/components/src/badge-list/badge-list.stories.ts +++ b/libs/components/src/badge-list/badge-list.stories.ts @@ -1,6 +1,6 @@ import { Meta, StoryObj, moduleMetadata } from "@storybook/angular"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { BadgeModule } from "../badge"; import { SharedModule } from "../shared"; diff --git a/libs/components/src/banner/banner.component.spec.ts b/libs/components/src/banner/banner.component.spec.ts index 0fe2391a5fc..29f10016a15 100644 --- a/libs/components/src/banner/banner.component.spec.ts +++ b/libs/components/src/banner/banner.component.spec.ts @@ -1,6 +1,6 @@ import { ComponentFixture, TestBed } from "@angular/core/testing"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { SharedModule } from "../shared/shared.module"; import { I18nMockService } from "../utils/i18n-mock.service"; diff --git a/libs/components/src/banner/banner.stories.ts b/libs/components/src/banner/banner.stories.ts index e2c8a0c82b2..eeab84b4ed5 100644 --- a/libs/components/src/banner/banner.stories.ts +++ b/libs/components/src/banner/banner.stories.ts @@ -1,6 +1,6 @@ import { Meta, moduleMetadata, StoryObj } from "@storybook/angular"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { IconButtonModule } from "../icon-button"; import { LinkModule } from "../link"; diff --git a/libs/components/src/callout/callout.component.spec.ts b/libs/components/src/callout/callout.component.spec.ts index cc54ff6dc23..36abae437d5 100644 --- a/libs/components/src/callout/callout.component.spec.ts +++ b/libs/components/src/callout/callout.component.spec.ts @@ -1,6 +1,6 @@ import { ComponentFixture, TestBed } from "@angular/core/testing"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { I18nMockService } from "../utils/i18n-mock.service"; diff --git a/libs/components/src/callout/callout.component.ts b/libs/components/src/callout/callout.component.ts index 33dc2414ef8..b62f830d448 100644 --- a/libs/components/src/callout/callout.component.ts +++ b/libs/components/src/callout/callout.component.ts @@ -1,6 +1,6 @@ import { Component, Input, OnInit } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; type CalloutTypes = "success" | "info" | "warning" | "danger"; diff --git a/libs/components/src/callout/callout.stories.ts b/libs/components/src/callout/callout.stories.ts index f8738e46b3a..cb51e96e8da 100644 --- a/libs/components/src/callout/callout.stories.ts +++ b/libs/components/src/callout/callout.stories.ts @@ -1,6 +1,6 @@ import { Meta, StoryObj, moduleMetadata } from "@storybook/angular"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { I18nMockService } from "../utils/i18n-mock.service"; diff --git a/libs/components/src/checkbox/checkbox.stories.ts b/libs/components/src/checkbox/checkbox.stories.ts index 246e4ada7b0..c2c924e2a33 100644 --- a/libs/components/src/checkbox/checkbox.stories.ts +++ b/libs/components/src/checkbox/checkbox.stories.ts @@ -2,7 +2,7 @@ import { Component, Input } from "@angular/core"; import { FormsModule, ReactiveFormsModule, FormBuilder, Validators } from "@angular/forms"; import { Meta, StoryObj, moduleMetadata } from "@storybook/angular"; -import { I18nService } from "@bitwarden/common/src/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/src/platform/abstractions/i18n.service"; import { FormControlModule } from "../form-control"; import { I18nMockService } from "../utils/i18n-mock.service"; diff --git a/libs/components/src/color-password/color-password.component.ts b/libs/components/src/color-password/color-password.component.ts index 04172bfa87d..4c32d0af0d1 100644 --- a/libs/components/src/color-password/color-password.component.ts +++ b/libs/components/src/color-password/color-password.component.ts @@ -1,6 +1,6 @@ import { Component, HostBinding, Input } from "@angular/core"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; enum CharacterType { Letter, diff --git a/libs/components/src/dialog/dialog.service.stories.ts b/libs/components/src/dialog/dialog.service.stories.ts index c189b28bc2a..021e36c6c7e 100644 --- a/libs/components/src/dialog/dialog.service.stories.ts +++ b/libs/components/src/dialog/dialog.service.stories.ts @@ -2,7 +2,7 @@ import { DIALOG_DATA, DialogModule, DialogRef } from "@angular/cdk/dialog"; import { Component, Inject } from "@angular/core"; import { Meta, StoryObj, moduleMetadata } from "@storybook/angular"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { ButtonModule } from "../button"; import { IconButtonModule } from "../icon-button"; diff --git a/libs/components/src/dialog/dialog/dialog.stories.ts b/libs/components/src/dialog/dialog/dialog.stories.ts index ce9dedc1288..35254bf1090 100644 --- a/libs/components/src/dialog/dialog/dialog.stories.ts +++ b/libs/components/src/dialog/dialog/dialog.stories.ts @@ -1,6 +1,6 @@ import { Meta, StoryObj, moduleMetadata } from "@storybook/angular"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { ButtonModule } from "../../button"; import { IconButtonModule } from "../../icon-button"; diff --git a/libs/components/src/dialog/simple-configurable-dialog/simple-configurable-dialog.component.ts b/libs/components/src/dialog/simple-configurable-dialog/simple-configurable-dialog.component.ts index 3a627970dda..6309a5a8c6a 100644 --- a/libs/components/src/dialog/simple-configurable-dialog/simple-configurable-dialog.component.ts +++ b/libs/components/src/dialog/simple-configurable-dialog/simple-configurable-dialog.component.ts @@ -7,7 +7,7 @@ import { Translation, } from "@bitwarden/angular/services/dialog"; import { SimpleDialogOptions } from "@bitwarden/angular/services/dialog/simple-dialog-options"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; const DEFAULT_ICON: Record = { [SimpleDialogType.PRIMARY]: "bwi-business", diff --git a/libs/components/src/dialog/simple-configurable-dialog/simple-configurable-dialog.service.stories.ts b/libs/components/src/dialog/simple-configurable-dialog/simple-configurable-dialog.service.stories.ts index 40cab5da4f4..998749da84f 100644 --- a/libs/components/src/dialog/simple-configurable-dialog/simple-configurable-dialog.service.stories.ts +++ b/libs/components/src/dialog/simple-configurable-dialog/simple-configurable-dialog.service.stories.ts @@ -6,7 +6,7 @@ import { SimpleDialogOptions, DialogServiceAbstraction, } from "@bitwarden/angular/services/dialog"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { ButtonModule } from "../../button"; import { CalloutModule } from "../../callout"; diff --git a/libs/components/src/dialog/simple-dialog.service.stories.ts b/libs/components/src/dialog/simple-dialog.service.stories.ts index e4d60c96de0..5050af35b6f 100644 --- a/libs/components/src/dialog/simple-dialog.service.stories.ts +++ b/libs/components/src/dialog/simple-dialog.service.stories.ts @@ -2,7 +2,7 @@ import { DialogModule, DialogRef, DIALOG_DATA } from "@angular/cdk/dialog"; import { Component, Inject } from "@angular/core"; import { Meta, StoryObj, moduleMetadata } from "@storybook/angular"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { ButtonModule } from "../button"; import { IconButtonModule } from "../icon-button"; diff --git a/libs/components/src/form-control/form-control.component.ts b/libs/components/src/form-control/form-control.component.ts index ac8971e61d6..934622a4a2a 100644 --- a/libs/components/src/form-control/form-control.component.ts +++ b/libs/components/src/form-control/form-control.component.ts @@ -1,7 +1,7 @@ import { coerceBooleanProperty } from "@angular/cdk/coercion"; import { Component, ContentChild, HostBinding, Input } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { BitFormControlAbstraction } from "./form-control.abstraction"; diff --git a/libs/components/src/form-field/bit-validators.stories.ts b/libs/components/src/form-field/bit-validators.stories.ts index 9af9aa096be..1007a56f5e4 100644 --- a/libs/components/src/form-field/bit-validators.stories.ts +++ b/libs/components/src/form-field/bit-validators.stories.ts @@ -1,7 +1,7 @@ import { FormsModule, ReactiveFormsModule, FormBuilder } from "@angular/forms"; import { StoryObj, Meta, moduleMetadata } from "@storybook/angular"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { ButtonModule } from "../button"; import { InputModule } from "../input/input.module"; diff --git a/libs/components/src/form-field/error-summary.stories.ts b/libs/components/src/form-field/error-summary.stories.ts index 16bfd99ac45..95061df81b6 100644 --- a/libs/components/src/form-field/error-summary.stories.ts +++ b/libs/components/src/form-field/error-summary.stories.ts @@ -1,7 +1,7 @@ import { UntypedFormBuilder, FormsModule, ReactiveFormsModule, Validators } from "@angular/forms"; import { Meta, StoryObj, moduleMetadata } from "@storybook/angular"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { ButtonModule } from "../button"; import { InputModule } from "../input/input.module"; diff --git a/libs/components/src/form-field/error.component.ts b/libs/components/src/form-field/error.component.ts index 24a23518871..39005903e6d 100644 --- a/libs/components/src/form-field/error.component.ts +++ b/libs/components/src/form-field/error.component.ts @@ -1,6 +1,6 @@ import { Component, HostBinding, Input } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; // Increments for each instance of this component let nextId = 0; diff --git a/libs/components/src/form-field/form-field.stories.ts b/libs/components/src/form-field/form-field.stories.ts index c8c520bb817..4c85a18607f 100644 --- a/libs/components/src/form-field/form-field.stories.ts +++ b/libs/components/src/form-field/form-field.stories.ts @@ -9,7 +9,7 @@ import { } from "@angular/forms"; import { Meta, StoryObj, moduleMetadata } from "@storybook/angular"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { AsyncActionsModule } from "../async-actions"; import { ButtonModule } from "../button"; diff --git a/libs/components/src/form-field/multi-select.stories.ts b/libs/components/src/form-field/multi-select.stories.ts index 123f6602aec..9248f7ab473 100644 --- a/libs/components/src/form-field/multi-select.stories.ts +++ b/libs/components/src/form-field/multi-select.stories.ts @@ -9,7 +9,7 @@ import { NgSelectModule } from "@ng-select/ng-select"; import { action } from "@storybook/addon-actions"; import { Meta, StoryObj, moduleMetadata } from "@storybook/angular"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { BadgeModule } from "../badge"; import { ButtonModule } from "../button"; diff --git a/libs/components/src/form-field/password-input-toggle.directive.ts b/libs/components/src/form-field/password-input-toggle.directive.ts index 3a3e3f116f6..bd029effcb8 100644 --- a/libs/components/src/form-field/password-input-toggle.directive.ts +++ b/libs/components/src/form-field/password-input-toggle.directive.ts @@ -10,7 +10,7 @@ import { Output, } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { BitIconButtonComponent } from "../icon-button/icon-button.component"; diff --git a/libs/components/src/form-field/password-input-toggle.spec.ts b/libs/components/src/form-field/password-input-toggle.spec.ts index 8c4976e8336..a3956e930ad 100644 --- a/libs/components/src/form-field/password-input-toggle.spec.ts +++ b/libs/components/src/form-field/password-input-toggle.spec.ts @@ -2,7 +2,7 @@ import { Component, DebugElement } from "@angular/core"; import { ComponentFixture, TestBed } from "@angular/core/testing"; import { By } from "@angular/platform-browser"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { IconButtonModule } from "../icon-button"; import { BitIconButtonComponent } from "../icon-button/icon-button.component"; diff --git a/libs/components/src/form-field/password-input-toggle.stories.ts b/libs/components/src/form-field/password-input-toggle.stories.ts index a1e916b5e10..412213110f8 100644 --- a/libs/components/src/form-field/password-input-toggle.stories.ts +++ b/libs/components/src/form-field/password-input-toggle.stories.ts @@ -1,7 +1,7 @@ import { FormsModule, ReactiveFormsModule } from "@angular/forms"; import { Meta, StoryObj, moduleMetadata } from "@storybook/angular"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { IconButtonModule } from "../icon-button"; import { InputModule } from "../input/input.module"; diff --git a/libs/components/src/form/form.stories.ts b/libs/components/src/form/form.stories.ts index 4c0b05a083a..cc4e9b62cf1 100644 --- a/libs/components/src/form/form.stories.ts +++ b/libs/components/src/form/form.stories.ts @@ -9,7 +9,7 @@ import { } from "@angular/forms"; import { Meta, StoryObj, moduleMetadata } from "@storybook/angular"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { ButtonModule } from "../button"; import { CheckboxModule } from "../checkbox"; diff --git a/libs/components/src/multi-select/multi-select.component.ts b/libs/components/src/multi-select/multi-select.component.ts index acc5cd15869..89f9e5cb91d 100644 --- a/libs/components/src/multi-select/multi-select.component.ts +++ b/libs/components/src/multi-select/multi-select.component.ts @@ -13,7 +13,7 @@ import { import { ControlValueAccessor, NgControl, Validators } from "@angular/forms"; import { NgSelectComponent } from "@ng-select/ng-select"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { BitFormFieldControl } from "../form-field/form-field-control"; diff --git a/libs/components/src/navigation/nav-group.stories.ts b/libs/components/src/navigation/nav-group.stories.ts index 5b6e5b807c1..9e99ccbd068 100644 --- a/libs/components/src/navigation/nav-group.stories.ts +++ b/libs/components/src/navigation/nav-group.stories.ts @@ -1,7 +1,7 @@ import { RouterTestingModule } from "@angular/router/testing"; import { StoryObj, Meta, moduleMetadata } from "@storybook/angular"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { SharedModule } from "../shared/shared.module"; import { I18nMockService } from "../utils/i18n-mock.service"; diff --git a/libs/components/src/radio-button/radio-button.component.spec.ts b/libs/components/src/radio-button/radio-button.component.spec.ts index 400b631d1ee..3b67b3e3bd1 100644 --- a/libs/components/src/radio-button/radio-button.component.spec.ts +++ b/libs/components/src/radio-button/radio-button.component.spec.ts @@ -2,7 +2,7 @@ import { Component } from "@angular/core"; import { ComponentFixture, TestBed, waitForAsync } from "@angular/core/testing"; import { By } from "@angular/platform-browser"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { I18nMockService } from "../utils/i18n-mock.service"; diff --git a/libs/components/src/radio-button/radio-button.stories.ts b/libs/components/src/radio-button/radio-button.stories.ts index d3c5716698f..da9d9d6b2ab 100644 --- a/libs/components/src/radio-button/radio-button.stories.ts +++ b/libs/components/src/radio-button/radio-button.stories.ts @@ -1,7 +1,7 @@ import { FormsModule, ReactiveFormsModule, FormControl, FormGroup } from "@angular/forms"; import { Meta, StoryObj, moduleMetadata } from "@storybook/angular"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { I18nMockService } from "../utils/i18n-mock.service"; diff --git a/libs/components/src/radio-button/radio-group.component.spec.ts b/libs/components/src/radio-button/radio-group.component.spec.ts index d9df8e2d706..fd0e612a5cf 100644 --- a/libs/components/src/radio-button/radio-group.component.spec.ts +++ b/libs/components/src/radio-button/radio-group.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed, waitForAsync } from "@angular/core/testing"; import { FormsModule } from "@angular/forms"; import { By } from "@angular/platform-browser"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { I18nMockService } from "../utils/i18n-mock.service"; diff --git a/libs/components/src/search/search.stories.ts b/libs/components/src/search/search.stories.ts index 3167c5c7d47..c68d6112809 100644 --- a/libs/components/src/search/search.stories.ts +++ b/libs/components/src/search/search.stories.ts @@ -2,7 +2,7 @@ import { FormsModule, ReactiveFormsModule } from "@angular/forms"; import { Meta, StoryObj, moduleMetadata } from "@storybook/angular"; import { JslibModule } from "@bitwarden/angular/jslib.module"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { InputModule } from "../input/input.module"; import { I18nMockService } from "../utils/i18n-mock.service"; diff --git a/libs/components/src/select/select.component.ts b/libs/components/src/select/select.component.ts index 5e59ea37646..ca8195151f5 100644 --- a/libs/components/src/select/select.component.ts +++ b/libs/components/src/select/select.component.ts @@ -11,7 +11,7 @@ import { import { ControlValueAccessor, NgControl, Validators } from "@angular/forms"; import { NgSelectComponent } from "@ng-select/ng-select"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { BitFormFieldControl } from "../form-field"; diff --git a/libs/components/src/select/select.stories.ts b/libs/components/src/select/select.stories.ts index 540279dab0c..a90d534d340 100644 --- a/libs/components/src/select/select.stories.ts +++ b/libs/components/src/select/select.stories.ts @@ -1,6 +1,6 @@ import { Meta, StoryObj, moduleMetadata } from "@storybook/angular"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { MultiSelectComponent } from "../multi-select/multi-select.component"; import { I18nMockService } from "../utils/i18n-mock.service"; diff --git a/libs/components/src/shared/i18n.pipe.ts b/libs/components/src/shared/i18n.pipe.ts index f1ec9a29cc4..f428d9297c0 100644 --- a/libs/components/src/shared/i18n.pipe.ts +++ b/libs/components/src/shared/i18n.pipe.ts @@ -1,6 +1,6 @@ import { Pipe, PipeTransform } from "@angular/core"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; /** * Temporarily duplicate this pipe diff --git a/libs/components/src/utils/function-to-observable.ts b/libs/components/src/utils/function-to-observable.ts index ab619ae75cf..06bf151fd43 100644 --- a/libs/components/src/utils/function-to-observable.ts +++ b/libs/components/src/utils/function-to-observable.ts @@ -1,6 +1,6 @@ import { from, Observable, of, throwError } from "rxjs"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; export type FunctionReturningAwaitable = | (() => unknown) diff --git a/libs/components/src/utils/i18n-mock.service.ts b/libs/components/src/utils/i18n-mock.service.ts index 67a73efc820..25e9a6db678 100644 --- a/libs/components/src/utils/i18n-mock.service.ts +++ b/libs/components/src/utils/i18n-mock.service.ts @@ -1,6 +1,6 @@ import { Observable } from "rxjs"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; export class I18nMockService implements I18nService { locale$: Observable; diff --git a/libs/exporter/src/vault-export/services/vault-export.service.spec.ts b/libs/exporter/src/vault-export/services/vault-export.service.spec.ts index 0649107a447..aa4a32805d5 100644 --- a/libs/exporter/src/vault-export/services/vault-export.service.spec.ts +++ b/libs/exporter/src/vault-export/services/vault-export.service.spec.ts @@ -2,14 +2,14 @@ import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; import { KdfConfig } from "@bitwarden/common/auth/models/domain/kdf-config"; import { KdfType, DEFAULT_PBKDF2_ITERATIONS } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; import { CipherWithIdExport } from "@bitwarden/common/models/export/cipher-with-ids.export"; -import { StateService } from "@bitwarden/common/services/state.service"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { StateService } from "@bitwarden/common/platform/services/state.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; diff --git a/libs/exporter/src/vault-export/services/vault-export.service.ts b/libs/exporter/src/vault-export/services/vault-export.service.ts index bfb8f4160f6..009e95e7a57 100644 --- a/libs/exporter/src/vault-export/services/vault-export.service.ts +++ b/libs/exporter/src/vault-export/services/vault-export.service.ts @@ -1,21 +1,21 @@ import * as papa from "papaparse"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { StateService } from "@bitwarden/common/abstractions/state.service"; import { CollectionData } from "@bitwarden/common/admin-console/models/data/collection.data"; import { Collection } from "@bitwarden/common/admin-console/models/domain/collection"; import { CollectionDetailsResponse } from "@bitwarden/common/admin-console/models/response/collection.response"; import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { KdfConfig } from "@bitwarden/common/auth/models/domain/kdf-config"; import { KdfType } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; import { CipherWithIdExport, CollectionWithIdExport, FolderWithIdExport, } from "@bitwarden/common/models/export"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; diff --git a/libs/importer/spec/bitwarden-password-protected-importer.spec.ts b/libs/importer/spec/bitwarden-password-protected-importer.spec.ts index 0b50560b937..0f8f6418628 100644 --- a/libs/importer/spec/bitwarden-password-protected-importer.spec.ts +++ b/libs/importer/spec/bitwarden-password-protected-importer.spec.ts @@ -1,9 +1,9 @@ import { mock, MockProxy } from "jest-mock-extended"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { KdfType } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { BitwardenPasswordProtectedImporter, diff --git a/libs/importer/spec/keeper-csv-importer.spec.ts b/libs/importer/spec/keeper-csv-importer.spec.ts index e3ca578de59..3e79ef1b8df 100644 --- a/libs/importer/spec/keeper-csv-importer.spec.ts +++ b/libs/importer/spec/keeper-csv-importer.spec.ts @@ -1,4 +1,4 @@ -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { KeeperCsvImporter } from "../src/importers"; diff --git a/libs/importer/spec/keeper-json-importer.spec.ts b/libs/importer/spec/keeper-json-importer.spec.ts index 2931de4ed03..c227f23720e 100644 --- a/libs/importer/spec/keeper-json-importer.spec.ts +++ b/libs/importer/spec/keeper-json-importer.spec.ts @@ -1,4 +1,4 @@ -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { KeeperJsonImporter } from "../src/importers"; diff --git a/libs/importer/spec/onepassword-1pux-importer.spec.ts b/libs/importer/spec/onepassword-1pux-importer.spec.ts index dd4b08ff126..a703f4aaa95 100644 --- a/libs/importer/spec/onepassword-1pux-importer.spec.ts +++ b/libs/importer/spec/onepassword-1pux-importer.spec.ts @@ -1,5 +1,5 @@ import { FieldType, SecureNoteType } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { FieldView } from "@bitwarden/common/vault/models/view/field.view"; diff --git a/libs/importer/src/importers/base-importer.ts b/libs/importer/src/importers/base-importer.ts index e416142abf3..d18f1d49e3c 100644 --- a/libs/importer/src/importers/base-importer.ts +++ b/libs/importer/src/importers/base-importer.ts @@ -1,10 +1,10 @@ import * as papa from "papaparse"; -import { LogService } from "@bitwarden/common/abstractions/log.service"; import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { FieldType, SecureNoteType } from "@bitwarden/common/enums"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { ConsoleLogService } from "@bitwarden/common/services/consoleLog.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { ConsoleLogService } from "@bitwarden/common/platform/services/console-log.service"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { FieldView } from "@bitwarden/common/vault/models/view/field.view"; diff --git a/libs/importer/src/importers/bitwarden/bitwarden-json-importer.ts b/libs/importer/src/importers/bitwarden/bitwarden-json-importer.ts index 816082f07f7..0789c7df2e4 100644 --- a/libs/importer/src/importers/bitwarden/bitwarden-json-importer.ts +++ b/libs/importer/src/importers/bitwarden/bitwarden-json-importer.ts @@ -1,11 +1,11 @@ -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; import { CipherWithIdExport, CollectionWithIdExport, FolderWithIdExport, } from "@bitwarden/common/models/export"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; import { ImportResult } from "../../models/import-result"; import { BaseImporter } from "../base-importer"; diff --git a/libs/importer/src/importers/bitwarden/bitwarden-password-protected-importer.ts b/libs/importer/src/importers/bitwarden/bitwarden-password-protected-importer.ts index 4b83aa3ea53..fb5530f3524 100644 --- a/libs/importer/src/importers/bitwarden/bitwarden-password-protected-importer.ts +++ b/libs/importer/src/importers/bitwarden/bitwarden-password-protected-importer.ts @@ -1,9 +1,9 @@ -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { KdfConfig } from "@bitwarden/common/auth/models/domain/kdf-config"; import { KdfType } from "@bitwarden/common/enums"; -import { EncString } from "@bitwarden/common/models/domain/enc-string"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { BitwardenPasswordProtectedFileFormat } from "@bitwarden/exporter/vault-export/bitwarden-password-protected-types"; import { ImportResult } from "../../models/import-result"; diff --git a/libs/importer/src/services/import.service.spec.ts b/libs/importer/src/services/import.service.spec.ts index 6dd6438b019..629df464002 100644 --- a/libs/importer/src/services/import.service.spec.ts +++ b/libs/importer/src/services/import.service.spec.ts @@ -1,9 +1,9 @@ import { mock, MockProxy } from "jest-mock-extended"; -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; -import { Utils } from "@bitwarden/common/misc/utils"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; diff --git a/libs/importer/src/services/import.service.ts b/libs/importer/src/services/import.service.ts index 94d3b50362e..100e5202ab6 100644 --- a/libs/importer/src/services/import.service.ts +++ b/libs/importer/src/services/import.service.ts @@ -1,12 +1,12 @@ -import { CryptoService } from "@bitwarden/common/abstractions/crypto.service"; -import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { CollectionWithIdRequest } from "@bitwarden/common/admin-console/models/request/collection-with-id.request"; -import { Utils } from "@bitwarden/common/misc/utils"; import { ImportCiphersRequest } from "@bitwarden/common/models/request/import-ciphers.request"; import { ImportOrganizationCiphersRequest } from "@bitwarden/common/models/request/import-organization-ciphers.request"; import { KvpRequest } from "@bitwarden/common/models/request/kvp.request"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; diff --git a/libs/node/src/services/node-crypto-function.service.spec.ts b/libs/node/src/services/node-crypto-function.service.spec.ts index 8e2aa768f9f..6e30ea307df 100644 --- a/libs/node/src/services/node-crypto-function.service.spec.ts +++ b/libs/node/src/services/node-crypto-function.service.spec.ts @@ -1,5 +1,5 @@ -import { Utils } from "@bitwarden/common/misc/utils"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { NodeCryptoFunctionService } from "./node-crypto-function.service"; diff --git a/libs/node/src/services/node-crypto-function.service.ts b/libs/node/src/services/node-crypto-function.service.ts index b670a465bdd..a127074dc63 100644 --- a/libs/node/src/services/node-crypto-function.service.ts +++ b/libs/node/src/services/node-crypto-function.service.ts @@ -3,10 +3,10 @@ import * as crypto from "crypto"; import * as argon2 from "argon2"; import * as forge from "node-forge"; -import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service"; -import { Utils } from "@bitwarden/common/misc/utils"; -import { DecryptParameters } from "@bitwarden/common/models/domain/decrypt-parameters"; -import { SymmetricCryptoKey } from "@bitwarden/common/models/domain/symmetric-crypto-key"; +import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { DecryptParameters } from "@bitwarden/common/platform/models/domain/decrypt-parameters"; +import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { CsprngArray } from "@bitwarden/common/types/csprng"; export class NodeCryptoFunctionService implements CryptoFunctionService { From ec936f883f440cf85e411d7a2b6f651a2bebe1e2 Mon Sep 17 00:00:00 2001 From: Ana Rute Mendes Date: Wed, 7 Jun 2023 01:20:36 +0200 Subject: [PATCH 02/22] Add collection name to title attribute of collection filters on desktop (#5131) If a collection name is long the name gets collapsed and the user cannot see the full name until they enter this collection. Adding the name to the title of the button displays the collection's full name on hover as a tooltip in most browsers. Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com> --- .../admin-console/vault-filters/collection-filter.component.html | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/desktop/src/admin-console/vault-filters/collection-filter.component.html b/apps/desktop/src/admin-console/vault-filters/collection-filter.component.html index bf4422a8a17..28c815d8371 100644 --- a/apps/desktop/src/admin-console/vault-filters/collection-filter.component.html +++ b/apps/desktop/src/admin-console/vault-filters/collection-filter.component.html @@ -51,6 +51,7 @@ class="filter-button" (click)="applyFilter(c.node)" [attr.aria-pressed]="c.node.id === activeFilter.selectedCollectionId" + [title]="c.node.name" > Date: Wed, 7 Jun 2023 17:47:30 -0400 Subject: [PATCH 03/22] Tech-Debt - [PM-2283] - Update ConfigApiService getServerConfig call to send access token if it exists (#5464) * PM-2283 - Update config api service get server config call to send authed when we have an access token so that LaunchDarkly on the server can properly acquire user context. * PM-2283- Replace token service with Auth service per PR feedback * PM-2283 - Refactor config api service get authed status based on PR feedback. * PM-2283 - Fix import issues due to platform folder creation and file moves --- libs/angular/src/services/jslib-services.module.ts | 2 +- .../platform/services/config/config-api.service.ts | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/libs/angular/src/services/jslib-services.module.ts b/libs/angular/src/services/jslib-services.module.ts index a170389efbe..9862ca90e84 100644 --- a/libs/angular/src/services/jslib-services.module.ts +++ b/libs/angular/src/services/jslib-services.module.ts @@ -631,7 +631,7 @@ import { AbstractThemingService } from "./theming/theming.service.abstraction"; { provide: ConfigApiServiceAbstraction, useClass: ConfigApiService, - deps: [ApiServiceAbstraction], + deps: [ApiServiceAbstraction, AuthServiceAbstraction], }, { provide: AnonymousHubServiceAbstraction, diff --git a/libs/common/src/platform/services/config/config-api.service.ts b/libs/common/src/platform/services/config/config-api.service.ts index 087b6094930..b874dbfd99b 100644 --- a/libs/common/src/platform/services/config/config-api.service.ts +++ b/libs/common/src/platform/services/config/config-api.service.ts @@ -1,12 +1,17 @@ import { ApiService } from "../../../abstractions/api.service"; -import { ConfigApiServiceAbstraction as ConfigApiServiceAbstraction } from "../../abstractions/config/config-api.service.abstraction"; +import { AuthService } from "../../../auth/abstractions/auth.service"; +import { AuthenticationStatus } from "../../../auth/enums/authentication-status"; +import { ConfigApiServiceAbstraction } from "../../abstractions/config/config-api.service.abstraction"; import { ServerConfigResponse } from "../../models/response/server-config.response"; export class ConfigApiService implements ConfigApiServiceAbstraction { - constructor(private apiService: ApiService) {} + constructor(private apiService: ApiService, private authService: AuthService) {} async get(): Promise { - const r = await this.apiService.send("GET", "/config", null, false, true); + const authed: boolean = + (await this.authService.getAuthStatus()) !== AuthenticationStatus.LoggedOut; + + const r = await this.apiService.send("GET", "/config", null, authed, true); return new ServerConfigResponse(r); } } From c6be3fa19ccb60cf01c58173ca31568fbc1599cd Mon Sep 17 00:00:00 2001 From: Shane Melton Date: Thu, 8 Jun 2023 09:12:52 -0700 Subject: [PATCH 04/22] [AC-1437] Introduce Feature Flag route guard (#5465) * Add feature flag route guard and tests * Add additional test for not showing error toast * Strengthen error toast test with message check * Cleanup leaking test state in platformService mock * Negate if statement to reduce nesting * Update return type to CanActivateFn * Use null check instead of undefined * Introduce interface to support different feature flag types - Switch to observable pattern to access serverConfig$ subject - Add catchError handler to allow navigation in case of unexpected exception - Add additional tests * Add additional test for missing feature flag * Remove subscription to the serverConfig observable Introduce type checking logic to determine the appropriately typed flag getter to use in configService * Update the feature flag to fallback to blocking the route on an unexpected exception * Trigger test action * Fix imports after merge with master --- .../src/guard/feature-flag.guard.spec.ts | 152 ++++++++++++++++++ libs/angular/src/guard/feature-flag.guard.ts | 58 +++++++ 2 files changed, 210 insertions(+) create mode 100644 libs/angular/src/guard/feature-flag.guard.spec.ts create mode 100644 libs/angular/src/guard/feature-flag.guard.ts diff --git a/libs/angular/src/guard/feature-flag.guard.spec.ts b/libs/angular/src/guard/feature-flag.guard.spec.ts new file mode 100644 index 00000000000..bba879278ff --- /dev/null +++ b/libs/angular/src/guard/feature-flag.guard.spec.ts @@ -0,0 +1,152 @@ +import { Component } from "@angular/core"; +import { TestBed } from "@angular/core/testing"; +import { CanActivateFn, Router } from "@angular/router"; +import { RouterTestingModule } from "@angular/router/testing"; +import { mock, MockProxy } from "jest-mock-extended"; + +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; +import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { I18nMockService } from "@bitwarden/components/src"; + +import { canAccessFeature } from "./feature-flag.guard"; + +@Component({ template: "" }) +export class EmptyComponent {} + +describe("canAccessFeature", () => { + const testFlag: FeatureFlag = "test-flag" as FeatureFlag; + const featureRoute = "enabled-feature"; + const redirectRoute = "redirect"; + + let mockConfigService: MockProxy; + let mockPlatformUtilsService: MockProxy; + + const setup = (featureGuard: CanActivateFn, flagValue: any) => { + mockConfigService = mock(); + mockPlatformUtilsService = mock(); + + // Mock the correct getter based on the type of flagValue; also mock default values if one is not provided + if (typeof flagValue === "boolean") { + mockConfigService.getFeatureFlagBool.mockImplementation((flag, defaultValue = false) => + flag == testFlag ? Promise.resolve(flagValue) : Promise.resolve(defaultValue) + ); + } else if (typeof flagValue === "string") { + mockConfigService.getFeatureFlagString.mockImplementation((flag, defaultValue = "") => + flag == testFlag ? Promise.resolve(flagValue) : Promise.resolve(defaultValue) + ); + } else if (typeof flagValue === "number") { + mockConfigService.getFeatureFlagNumber.mockImplementation((flag, defaultValue = 0) => + flag == testFlag ? Promise.resolve(flagValue) : Promise.resolve(defaultValue) + ); + } + + const testBed = TestBed.configureTestingModule({ + imports: [ + RouterTestingModule.withRoutes([ + { path: "", component: EmptyComponent }, + { + path: featureRoute, + component: EmptyComponent, + canActivate: [featureGuard], + }, + { path: redirectRoute, component: EmptyComponent }, + ]), + ], + providers: [ + { provide: ConfigServiceAbstraction, useValue: mockConfigService }, + { provide: PlatformUtilsService, useValue: mockPlatformUtilsService }, + { provide: LogService, useValue: mock() }, + { + provide: I18nService, + useValue: new I18nMockService({ + accessDenied: "Access Denied!", + }), + }, + ], + }); + return { + router: testBed.inject(Router), + }; + }; + + it("successfully navigates when the feature flag is enabled", async () => { + const { router } = setup(canAccessFeature(testFlag), true); + + await router.navigate([featureRoute]); + + expect(router.url).toBe(`/${featureRoute}`); + }); + + it("successfully navigates when the feature flag value matches the required value", async () => { + const { router } = setup(canAccessFeature(testFlag, "some-value"), "some-value"); + + await router.navigate([featureRoute]); + + expect(router.url).toBe(`/${featureRoute}`); + }); + + it("fails to navigate when the feature flag is disabled", async () => { + const { router } = setup(canAccessFeature(testFlag), false); + + await router.navigate([featureRoute]); + + expect(router.url).toBe("/"); + }); + + it("fails to navigate when the feature flag value does not match the required value", async () => { + const { router } = setup(canAccessFeature(testFlag, "some-value"), "some-wrong-value"); + + await router.navigate([featureRoute]); + + expect(router.url).toBe("/"); + }); + + it("fails to navigate when the feature flag does not exist", async () => { + const { router } = setup(canAccessFeature("missing-flag" as FeatureFlag), true); + + await router.navigate([featureRoute]); + + expect(router.url).toBe("/"); + }); + + it("shows an error toast when the feature flag is disabled", async () => { + const { router } = setup(canAccessFeature(testFlag), false); + + await router.navigate([featureRoute]); + + expect(mockPlatformUtilsService.showToast).toHaveBeenCalledWith( + "error", + null, + "Access Denied!" + ); + }); + + it("does not show an error toast when the feature flag is enabled", async () => { + const { router } = setup(canAccessFeature(testFlag), true); + + await router.navigate([featureRoute]); + + expect(mockPlatformUtilsService.showToast).not.toHaveBeenCalled(); + }); + + it("redirects to the specified redirect url when the feature flag is disabled", async () => { + const { router } = setup(canAccessFeature(testFlag, true, redirectRoute), false); + + await router.navigate([featureRoute]); + + expect(router.url).toBe(`/${redirectRoute}`); + }); + + it("fails to navigate when the config service throws an unexpected exception", async () => { + const { router } = setup(canAccessFeature(testFlag), true); + + mockConfigService.getFeatureFlagBool.mockImplementation(() => Promise.reject("Some error")); + + await router.navigate([featureRoute]); + + expect(router.url).toBe("/"); + }); +}); diff --git a/libs/angular/src/guard/feature-flag.guard.ts b/libs/angular/src/guard/feature-flag.guard.ts new file mode 100644 index 00000000000..f4596f3cf4b --- /dev/null +++ b/libs/angular/src/guard/feature-flag.guard.ts @@ -0,0 +1,58 @@ +import { inject } from "@angular/core"; +import { CanActivateFn, Router } from "@angular/router"; + +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; +import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; + +// Replace this with a type safe lookup of the feature flag values in PM-2282 +type FlagValue = boolean | number | string; + +/** + * Returns a CanActivateFn that checks if the feature flag is enabled. If not, it shows an "Access Denied!" + * toast and optionally redirects to the specified url. + * @param featureFlag - The feature flag to check + * @param requiredFlagValue - Optional value to the feature flag must be equal to, defaults to true + * @param redirectUrlOnDisabled - Optional url to redirect to if the feature flag is disabled + */ +export const canAccessFeature = ( + featureFlag: FeatureFlag, + requiredFlagValue: FlagValue = true, + redirectUrlOnDisabled?: string +): CanActivateFn => { + return async () => { + const configService = inject(ConfigServiceAbstraction); + const platformUtilsService = inject(PlatformUtilsService); + const router = inject(Router); + const i18nService = inject(I18nService); + const logService = inject(LogService); + + let flagValue: FlagValue; + + try { + if (typeof requiredFlagValue === "boolean") { + flagValue = await configService.getFeatureFlagBool(featureFlag); + } else if (typeof requiredFlagValue === "number") { + flagValue = await configService.getFeatureFlagNumber(featureFlag); + } else if (typeof requiredFlagValue === "string") { + flagValue = await configService.getFeatureFlagString(featureFlag); + } + + if (flagValue === requiredFlagValue) { + return true; + } + + platformUtilsService.showToast("error", null, i18nService.t("accessDenied")); + + if (redirectUrlOnDisabled != null) { + return router.createUrlTree([redirectUrlOnDisabled]); + } + return false; + } catch (e) { + logService.error(e); + return false; + } + }; +}; From 109b74051ef44e94d9c01471ad361d79d8893e87 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 9 Jun 2023 09:09:05 +0200 Subject: [PATCH 05/22] Autosync the updated translations (#5583) Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com> --- apps/browser/src/_locales/ar/messages.json | 12 ++--- apps/browser/src/_locales/pt_PT/messages.json | 50 +++++++++---------- apps/browser/store/locales/pt_PT/copy.resx | 2 +- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/apps/browser/src/_locales/ar/messages.json b/apps/browser/src/_locales/ar/messages.json index 71cd3d1a66b..519115d2a81 100644 --- a/apps/browser/src/_locales/ar/messages.json +++ b/apps/browser/src/_locales/ar/messages.json @@ -1412,13 +1412,13 @@ "message": "استنساخ" }, "passwordGeneratorPolicyInEffect": { - "message": "One or more organization policies are affecting your generator settings." + "message": "واحدة أو أكثر من سياسات المؤسسة تؤثر على إعدادات المولدات الخاصة بك." }, "vaultTimeoutAction": { - "message": "Vault timeout action" + "message": "إجراء مهلة المخزن" }, "lock": { - "message": "Lock", + "message": "قفل", "description": "Verb form: to make secure or inaccesible by" }, "trash": { @@ -1426,7 +1426,7 @@ "description": "Noun: a special folder to hold deleted items" }, "searchTrash": { - "message": "Search trash" + "message": "البحث عن سلة المهملات" }, "permanentlyDeleteItem": { "message": "حذف العنصر بشكل دائم" @@ -1435,13 +1435,13 @@ "message": "هل أنت متأكد من أنك تريد حذف هذا العنصر بشكل دائم؟" }, "permanentlyDeletedItem": { - "message": "Item permanently deleted" + "message": "تم حذف العنصر بشكل دائم" }, "restoreItem": { "message": "استعادة العنصر" }, "restoreItemConfirmation": { - "message": "Are you sure you want to restore this item?" + "message": "هل أنت متأكد من أنك تريد استعادة هذا العنصر؟" }, "restoredItem": { "message": "Item restored" diff --git a/apps/browser/src/_locales/pt_PT/messages.json b/apps/browser/src/_locales/pt_PT/messages.json index abb193ecbab..06474f83c48 100644 --- a/apps/browser/src/_locales/pt_PT/messages.json +++ b/apps/browser/src/_locales/pt_PT/messages.json @@ -98,7 +98,7 @@ "message": "Copiar nome do campo personalizado" }, "noMatchingLogins": { - "message": "Sem inícios de sessão correspondentes" + "message": "Sem credenciais correspondentes" }, "unlockVaultMenu": { "message": "Desbloqueie o seu cofre" @@ -107,10 +107,10 @@ "message": "Inicie sessão para abrir o seu cofre" }, "autoFillInfo": { - "message": "Não existem inícios de sessão disponíveis para preenchimento automático no separador atual do navegador." + "message": "Não existem credenciais disponíveis para preenchimento automático no separador atual do navegador." }, "addLogin": { - "message": "Adicionar um início de sessão" + "message": "Adicionar uma credencial" }, "addItem": { "message": "Adicionar item" @@ -221,7 +221,7 @@ "description": "Short for 'Password Generator'." }, "passGenInfo": { - "message": "Gera automaticamente palavras-passe fortes e únicas para os seus inícios de sessão." + "message": "Gera automaticamente palavras-passe fortes e únicas para as suas credenciais." }, "bitWebVault": { "message": "Cofre web Bitwarden" @@ -415,7 +415,7 @@ "message": "No bloqueio do sistema" }, "onRestart": { - "message": "Ao reiniciar o sistema" + "message": "Ao reiniciar o navegador" }, "never": { "message": "Nunca" @@ -583,7 +583,7 @@ "message": "Procurar no tipo" }, "noneFolder": { - "message": "Em nenhuma pasta", + "message": "Sem pasta", "description": "This is the folder for uncategorized items" }, "enableAddLoginNotification": { @@ -641,7 +641,7 @@ "description": "Default URI match detection for auto-fill." }, "defaultUriMatchDetectionDesc": { - "message": "Escolha a forma predefinida como a deteção de correspondência de URI é tratada para inícios de sessão ao executar ações como o preenchimento automático." + "message": "Escolha a forma predefinida como a deteção de correspondência de URI é tratada para credenciais ao executar ações como o preenchimento automático." }, "theme": { "message": "Tema" @@ -793,7 +793,7 @@ "message": "Higiene de palavras-passe, saúde da conta e relatórios de violação de dados para manter o seu cofre seguro." }, "ppremiumSignUpTotp": { - "message": "Gerador de código de verificação TOTP (2FA) para inícios de sessão no seu cofre." + "message": "Gerador de códigos de verificação TOTP (2FA) para credenciais no seu cofre." }, "ppremiumSignUpSupport": { "message": "Prioridade no apoio ao cliente." @@ -829,7 +829,7 @@ "message": "Copy TOTP automatically" }, "disableAutoTotpCopyDesc": { - "message": "Se um início de sessão tiver uma chave de autenticação, copie o código de verificação TOTP para a sua área de transferência quando preencher automaticamente o início de sessão." + "message": "Se uma credencial tiver uma chave de autenticação, copie o código de verificação TOTP para a sua área de transferência quando preencher automaticamente o início de sessão." }, "enableAutoBiometricsPrompt": { "message": "Ask for biometrics on launch" @@ -865,7 +865,7 @@ "message": "Memorizar-me" }, "sendVerificationCodeEmailAgain": { - "message": "Enviar código de verificação novamente" + "message": "Enviar e-mail com o código de verificação novamente" }, "useAnotherTwoStepMethod": { "message": "Utilizar outro método de verificação de dois passos" @@ -892,7 +892,7 @@ "message": "Esta conta tem a verificação de dois passos configurada, no entanto, nenhum dos fornecedores da verificação de dois passos configurada é suportado por este navegador web." }, "noTwoStepProviders2": { - "message": "Utilize um navegador web suportado (como o Chrome) e/ou adicione fornecedores adicionais que sejam mais bem suportados nos navegadores web (como uma aplicação de autenticação)." + "message": "Por favor, utilize um navegador web suportado (como o Chrome) e/ou adicione fornecedores adicionais que sejam mais bem suportados nos navegadores web (como uma aplicação de autenticação)." }, "twoStepOptions": { "message": "Opções de verificação de dois passos" @@ -1146,7 +1146,7 @@ "message": "Mx" }, "firstName": { - "message": "Primeiro nome" + "message": "Nome próprio" }, "middleName": { "message": "Segundo nome" @@ -1179,16 +1179,16 @@ "message": "Telefone" }, "address": { - "message": "Morada" + "message": "Endereço" }, "address1": { - "message": "1.ª morada" + "message": "Endereço 1" }, "address2": { - "message": "2.ª morada" + "message": "Endereço 2" }, "address3": { - "message": "3.ª morada" + "message": "Endereço 3" }, "cityTown": { "message": "Cidade / Localidade" @@ -1206,10 +1206,10 @@ "message": "Tipo" }, "typeLogin": { - "message": "Início de sessão" + "message": "Credencial" }, "typeLogins": { - "message": "Inícios de sessão" + "message": "Credenciais" }, "typeSecureNote": { "message": "Nota segura" @@ -1245,7 +1245,7 @@ "message": "Identidades" }, "logins": { - "message": "Inícios de sessão" + "message": "Credenciais" }, "secureNotes": { "message": "Notas seguras" @@ -1406,10 +1406,10 @@ "message": "Deve selecionar pelo menos uma coleção." }, "cloneItem": { - "message": "Clonar item" + "message": "Duplicar item" }, "clone": { - "message": "Clonar" + "message": "Duplicar" }, "passwordGeneratorPolicyInEffect": { "message": "Uma ou mais políticas da organização estão a afetar as suas definições do gerador." @@ -1432,7 +1432,7 @@ "message": "Eliminar item permanentemente" }, "permanentlyDeleteItemConfirmation": { - "message": "Tem a certeza de que pretende eliminar este item permanentemente?" + "message": "Tem a certeza de que pretende eliminar permanentemente este item?" }, "permanentlyDeletedItem": { "message": "Item eliminado permanentemente" @@ -1799,7 +1799,7 @@ "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "editedSend": { - "message": "Send saved", + "message": "Send editado", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "sendLinuxChromiumFileWarning": { @@ -1869,10 +1869,10 @@ "message": "Atualizar palavra-passe mestra" }, "updateMasterPasswordWarning": { - "message": "A sua palavra-passe mestra foi recentemente alterada por um administrador da sua organização. Para aceder ao cofre, tem de atualizar a sua palavra-passe mestra agora. Se prosseguir, sairá da sua sessão atual e terá de iniciar sessão novamente. As sessões ativas noutros dispositivos poderão continuar ativas até uma hora." + "message": "A sua palavra-passe mestra foi recentemente alterada por um administrador da sua organização. Para aceder ao cofre, tem de atualizar a sua palavra-passe mestra agora. Ao prosseguir, terminará a sua sessão atual e terá de iniciar sessão novamente. As sessões ativas noutros dispositivos poderão continuar ativas até uma hora." }, "updateWeakMasterPasswordWarning": { - "message": "A sua palavra-passe mestra não cumpre uma ou mais políticas da sua organização. Para aceder ao cofre, tem de atualizar a sua palavra-passe mestra agora. Se prosseguir, sairá da sua sessão atual e terá de iniciar sessão novamente. As sessões ativas noutros dispositivos poderão continuar ativas até uma hora." + "message": "A sua palavra-passe mestra não cumpre uma ou mais políticas da sua organização. Para aceder ao cofre, tem de atualizar a sua palavra-passe mestra agora. Ao prosseguir, terminará a sua sessão atual e terá de iniciar sessão novamente. As sessões ativas noutros dispositivos poderão continuar ativas até uma hora." }, "resetPasswordPolicyAutoEnroll": { "message": "Inscrição automática" diff --git a/apps/browser/store/locales/pt_PT/copy.resx b/apps/browser/store/locales/pt_PT/copy.resx index df8db70e3ee..199b5e9810a 100644 --- a/apps/browser/store/locales/pt_PT/copy.resx +++ b/apps/browser/store/locales/pt_PT/copy.resx @@ -158,7 +158,7 @@ Secure and share sensitive data within your Bitwarden Vault from any browser, mo Sincronize e aceda ao seu cofre através de vários dispositivos - Gira todos os seus inícios de sessão e palavras-passe a partir de um cofre seguro + Gira todas as suas credenciais e palavras-passe a partir de um cofre seguro Preencha rapidamente e de forma automática as suas credenciais de início de sessão em qualquer site que visite From 48128c8a2e3550980d960e0af37d4b327c0ddf67 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 9 Jun 2023 09:09:35 +0200 Subject: [PATCH 06/22] Autosync the updated translations (#5582) Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com> --- apps/desktop/src/locales/ar/messages.json | 8 +-- apps/desktop/src/locales/be/messages.json | 8 +-- apps/desktop/src/locales/pt_PT/messages.json | 52 ++++++++++---------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/apps/desktop/src/locales/ar/messages.json b/apps/desktop/src/locales/ar/messages.json index 7e558adc15e..e4ff6a202b2 100644 --- a/apps/desktop/src/locales/ar/messages.json +++ b/apps/desktop/src/locales/ar/messages.json @@ -2253,17 +2253,17 @@ "message": "تحديث الإعدادات الموصى بها" }, "region": { - "message": "Region" + "message": "المنطقة" }, "eu": { - "message": "EU", + "message": "الاتحاد الأوروبي", "description": "European Union" }, "us": { - "message": "US", + "message": "الولايات المتحدة", "description": "United States" }, "selfHosted": { - "message": "Self-hosted" + "message": "استضافة ذاتية" } } diff --git a/apps/desktop/src/locales/be/messages.json b/apps/desktop/src/locales/be/messages.json index efd52d6444f..3d4d8221684 100644 --- a/apps/desktop/src/locales/be/messages.json +++ b/apps/desktop/src/locales/be/messages.json @@ -2253,17 +2253,17 @@ "message": "Рэкамендаваныя налады абнаўлення" }, "region": { - "message": "Region" + "message": "Рэгіён" }, "eu": { - "message": "EU", + "message": "ЕС", "description": "European Union" }, "us": { - "message": "US", + "message": "ЗША", "description": "United States" }, "selfHosted": { - "message": "Self-hosted" + "message": "Уласнае размяшчэнне" } } diff --git a/apps/desktop/src/locales/pt_PT/messages.json b/apps/desktop/src/locales/pt_PT/messages.json index 13e57dda795..fde7d53d0fc 100644 --- a/apps/desktop/src/locales/pt_PT/messages.json +++ b/apps/desktop/src/locales/pt_PT/messages.json @@ -15,7 +15,7 @@ "message": "Tipos" }, "typeLogin": { - "message": "Início de sessão" + "message": "Credencial" }, "typeCard": { "message": "Cartão" @@ -61,7 +61,7 @@ } }, "moveToOrgDesc": { - "message": "Escolha uma organização para a qual pretende mover este item. Mover para uma organização transfere a propriedade do item para essa organização. Deixará de ser o proprietário directo deste item depois de este ter sido movido." + "message": "Escolha uma organização para a qual pretende mover este item. Mover para uma organização transfere a propriedade do item para essa organização. Deixará de ser o proprietário direto deste item depois de este ter sido movido." }, "attachments": { "message": "Anexos" @@ -172,7 +172,7 @@ "message": "Telefone" }, "address": { - "message": "Morada" + "message": "Endereço" }, "premiumRequired": { "message": "É necessária uma subscrição Premium" @@ -263,7 +263,7 @@ "message": "Tipo" }, "firstName": { - "message": "Primeiro nome" + "message": "Nome próprio" }, "middleName": { "message": "Segundo nome" @@ -275,13 +275,13 @@ "message": "Nome completo" }, "address1": { - "message": "1.ª morada" + "message": "Endereço 1" }, "address2": { - "message": "2.ª morada" + "message": "Endereço 2" }, "address3": { - "message": "3.ª morada" + "message": "Endereço 3" }, "cityTown": { "message": "Cidade / Localidade" @@ -379,7 +379,7 @@ "message": "Tem a certeza de que pretende substituir o nome de utilizador atual?" }, "noneFolder": { - "message": "Em nenhuma pasta", + "message": "Sem pasta", "description": "This is the folder for uncategorized items" }, "addFolder": { @@ -398,7 +398,7 @@ "message": "Copiar URI" }, "copyVerificationCodeTotp": { - "message": "Copy verification code (TOTP)" + "message": "Copiar código de verificação (TOTP)" }, "length": { "message": "Comprimento" @@ -618,7 +618,7 @@ "message": "Memorizar-me" }, "sendVerificationCodeEmailAgain": { - "message": "Enviar código de verificação novamente" + "message": "Enviar e-mail com o código de verificação novamente" }, "useAnotherTwoStepMethod": { "message": "Utilizar outro método de verificação de dois passos" @@ -744,7 +744,7 @@ "message": "Terminar sessão" }, "addNewLogin": { - "message": "Novo início de sessão" + "message": "Nova credencial" }, "addNewItem": { "message": "Novo item" @@ -771,7 +771,7 @@ "message": "Contacte-nos" }, "helpAndFeedback": { - "message": "Help and feedback" + "message": "Ajuda e feedback" }, "getHelp": { "message": "Obter ajuda" @@ -1423,19 +1423,19 @@ "message": "Bloquear com a palavra-passe mestra ao reiniciar" }, "deleteAccount": { - "message": "Delete account" + "message": "Eliminar conta" }, "deleteAccountDesc": { - "message": "Proceed below to delete your account and all vault data." + "message": "Proceda da seguinte forma para eliminar a sua conta e todos os dados do cofre." }, "deleteAccountWarning": { - "message": "Deleting your account is permanent. It cannot be undone." + "message": "A eliminação da sua conta é permanente. Não pode ser desfeita." }, "accountDeleted": { - "message": "Account deleted" + "message": "Conta eliminada" }, "accountDeletedDesc": { - "message": "Your account has been closed and all associated data has been deleted." + "message": "A sua conta foi encerrada e todos os dados associados foram eliminados." }, "preferences": { "message": "Preferências" @@ -1478,7 +1478,7 @@ "message": "Alterações por guardar" }, "clone": { - "message": "Clonar" + "message": "Duplicar" }, "passwordGeneratorPolicyInEffect": { "message": "Uma ou mais políticas da organização estão a afetar as suas definições do gerador." @@ -1507,7 +1507,7 @@ "message": "Eliminar item permanentemente" }, "permanentlyDeleteItemConfirmation": { - "message": "Tem a certeza de que pretende eliminar este item permanentemente?" + "message": "Tem a certeza de que pretende eliminar permanentemente este item?" }, "permanentlyDeletedItem": { "message": "Item eliminado permanentemente" @@ -1739,15 +1739,15 @@ "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "createdSend": { - "message": "Send added", + "message": "Send criado", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "editedSend": { - "message": "Send saved", + "message": "Send editado", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "deletedSend": { - "message": "Send deleted", + "message": "Send eliminado", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "newPassword": { @@ -1856,10 +1856,10 @@ "message": "Atualizar palavra-passe mestra" }, "updateMasterPasswordWarning": { - "message": "A sua palavra-passe mestra foi recentemente alterada por um administrador da sua organização. Para aceder ao cofre, tem de atualizar a sua palavra-passe mestra agora. Se prosseguir, sairá da sua sessão atual e terá de iniciar sessão novamente. As sessões ativas noutros dispositivos poderão continuar ativas até uma hora." + "message": "A sua palavra-passe mestra foi recentemente alterada por um administrador da sua organização. Para aceder ao cofre, tem de atualizar a sua palavra-passe mestra agora. Ao prosseguir, terminará a sua sessão atual e terá de iniciar sessão novamente. As sessões ativas noutros dispositivos poderão continuar ativas até uma hora." }, "updateWeakMasterPasswordWarning": { - "message": "A sua palavra-passe mestra não cumpre uma ou mais políticas da sua organização. Para aceder ao cofre, tem de atualizar a sua palavra-passe mestra agora. Se prosseguir, sairá da sua sessão atual e terá de iniciar sessão novamente. As sessões ativas noutros dispositivos poderão continuar ativas até uma hora." + "message": "A sua palavra-passe mestra não cumpre uma ou mais políticas da sua organização. Para aceder ao cofre, tem de atualizar a sua palavra-passe mestra agora. Ao prosseguir, terminará a sua sessão atual e terá de iniciar sessão novamente. As sessões ativas noutros dispositivos poderão continuar ativas até uma hora." }, "hours": { "message": "Horas" @@ -2040,7 +2040,7 @@ "message": "Random word" }, "websiteName": { - "message": "Website name" + "message": "Nome do site" }, "service": { "message": "Service" @@ -2153,7 +2153,7 @@ "message": "Device Type" }, "ipAddress": { - "message": "IP Address" + "message": "Endereço IP" }, "time": { "message": "Time" From 57cc3f4acd87707dacb4810369938694446f9df6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 9 Jun 2023 09:23:20 +0200 Subject: [PATCH 07/22] Autosync the updated translations (#5584) Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com> --- apps/web/src/locales/af/messages.json | 11 +- apps/web/src/locales/ar/messages.json | 11 +- apps/web/src/locales/az/messages.json | 11 +- apps/web/src/locales/be/messages.json | 41 +- apps/web/src/locales/bg/messages.json | 11 +- apps/web/src/locales/bn/messages.json | 11 +- apps/web/src/locales/bs/messages.json | 11 +- apps/web/src/locales/ca/messages.json | 11 +- apps/web/src/locales/cs/messages.json | 11 +- apps/web/src/locales/cy/messages.json | 11 +- apps/web/src/locales/da/messages.json | 11 +- apps/web/src/locales/de/messages.json | 11 +- apps/web/src/locales/el/messages.json | 11 +- apps/web/src/locales/en_GB/messages.json | 11 +- apps/web/src/locales/en_IN/messages.json | 11 +- apps/web/src/locales/eo/messages.json | 11 +- apps/web/src/locales/es/messages.json | 11 +- apps/web/src/locales/et/messages.json | 11 +- apps/web/src/locales/eu/messages.json | 11 +- apps/web/src/locales/fa/messages.json | 11 +- apps/web/src/locales/fi/messages.json | 11 +- apps/web/src/locales/fil/messages.json | 11 +- apps/web/src/locales/fr/messages.json | 11 +- apps/web/src/locales/gl/messages.json | 11 +- apps/web/src/locales/he/messages.json | 11 +- apps/web/src/locales/hi/messages.json | 11 +- apps/web/src/locales/hr/messages.json | 11 +- apps/web/src/locales/hu/messages.json | 11 +- apps/web/src/locales/id/messages.json | 11 +- apps/web/src/locales/it/messages.json | 37 +- apps/web/src/locales/ja/messages.json | 11 +- apps/web/src/locales/ka/messages.json | 11 +- apps/web/src/locales/km/messages.json | 11 +- apps/web/src/locales/kn/messages.json | 11 +- apps/web/src/locales/ko/messages.json | 11 +- apps/web/src/locales/lv/messages.json | 11 +- apps/web/src/locales/ml/messages.json | 11 +- apps/web/src/locales/my/messages.json | 11 +- apps/web/src/locales/nb/messages.json | 11 +- apps/web/src/locales/ne/messages.json | 11 +- apps/web/src/locales/nl/messages.json | 11 +- apps/web/src/locales/nn/messages.json | 11 +- apps/web/src/locales/or/messages.json | 11 +- apps/web/src/locales/pl/messages.json | 11 +- apps/web/src/locales/pt_BR/messages.json | 11 +- apps/web/src/locales/pt_PT/messages.json | 817 ++++++++++++----------- apps/web/src/locales/ro/messages.json | 11 +- apps/web/src/locales/ru/messages.json | 39 +- apps/web/src/locales/si/messages.json | 11 +- apps/web/src/locales/sk/messages.json | 11 +- apps/web/src/locales/sl/messages.json | 11 +- apps/web/src/locales/sr/messages.json | 11 +- apps/web/src/locales/sr_CS/messages.json | 11 +- apps/web/src/locales/sv/messages.json | 11 +- apps/web/src/locales/te/messages.json | 11 +- apps/web/src/locales/th/messages.json | 11 +- apps/web/src/locales/tr/messages.json | 11 +- apps/web/src/locales/uk/messages.json | 11 +- apps/web/src/locales/vi/messages.json | 11 +- apps/web/src/locales/zh_CN/messages.json | 11 +- apps/web/src/locales/zh_TW/messages.json | 11 +- 61 files changed, 1055 insertions(+), 506 deletions(-) diff --git a/apps/web/src/locales/af/messages.json b/apps/web/src/locales/af/messages.json index ff0c6b00573..23d2b02c024 100644 --- a/apps/web/src/locales/af/messages.json +++ b/apps/web/src/locales/af/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/ar/messages.json b/apps/web/src/locales/ar/messages.json index ac093d7a8ef..050c10195c1 100644 --- a/apps/web/src/locales/ar/messages.json +++ b/apps/web/src/locales/ar/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/az/messages.json b/apps/web/src/locales/az/messages.json index ebf1c08bec1..39faf0806a3 100644 --- a/apps/web/src/locales/az/messages.json +++ b/apps/web/src/locales/az/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "Bu seçim istifadə edildikdə avto-qeydiyyat ilə işə salınacaq.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ tapılmadı", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Hesabı bərpa et" diff --git a/apps/web/src/locales/be/messages.json b/apps/web/src/locales/be/messages.json index a7d5aa376e4..87b82e5ea69 100644 --- a/apps/web/src/locales/be/messages.json +++ b/apps/web/src/locales/be/messages.json @@ -4493,13 +4493,13 @@ "message": "Падказка для пароля не можа супадаць з паролем." }, "enrollAccountRecovery": { - "message": "Enroll in account recovery" + "message": "Зарэгістравацца на аднаўленне ўліковага запісу" }, "enrolledAccountRecovery": { - "message": "Enrolled in account recovery" + "message": "Зарэгістравацца на аднаўленне ўліковага запісу" }, "withdrawAccountRecovery": { - "message": "Withdraw from account recovery" + "message": "Адклікаць аднаўленне ўліковага запісу" }, "enrollPasswordResetSuccess": { "message": "Паспяховая рэгістрацыя!" @@ -4508,7 +4508,7 @@ "message": "Адмова паспяхова ўжыта!" }, "eventEnrollAccountRecovery": { - "message": "User $ID$ enrolled in account recovery.", + "message": "Карыстальнік $ID$ зарэгістраваўся на аднаўленне ўліковага запісу.", "placeholders": { "id": { "content": "$1", @@ -4517,7 +4517,7 @@ } }, "eventWithdrawAccountRecovery": { - "message": "User $ID$ withdrew from account recovery.", + "message": "Карыстальнік $ID$ адклікаў аднаўленне ўліковага запісу.", "placeholders": { "id": { "content": "$1", @@ -4577,10 +4577,10 @@ "message": "Рэгістрацыя дазволіць адміністратарам арганізацыі змяняць ваш асноўны пароль" }, "accountRecoveryPolicy": { - "message": "Account recovery administration" + "message": "Адміністраванне аднаўлення ўліковага запісу" }, "accountRecoveryPolicyDescription": { - "message": "Recover member accounts when master password or trusted devices are forgotten or lost. The recovery processes is based on the account encryption method." + "message": "Аднаўленне ўліковага запісу ўдзельніка, калі асноўны пароль забыты або давераная прылада страчана. Працэс аднаўлення заснаваны на метадзе шыфравання ўліковага запісу." }, "resetPasswordPolicyWarning": { "message": "Карыстальнікі арганізацыі павінны зарэгістравацца самастойна або быць зарэгістраванымі аўтаматычна, каб адміністратары маглі скінуць іх асноўны пароль." @@ -5231,11 +5231,11 @@ "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Connect login with SSO to your self-hosted decryption key server. Using this option, members won’t need to use their master passwords to decrypt vault data. The require SSO authentication and single organization policies are required to set up Key Connector decryption. Contact Bitwarden Support for set up assistance.'" }, "memberDecryptionKeyConnectorDescLink": { - "message": "Для наладжвання расшыфроўкі Key Connector патрабуецца аўтэнтыфікацыя SSO", + "message": "Патрабуецца аўтэнтыфікацыя SSO і палітыкі адзінай арганізацыі", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Connect login with SSO to your self-hosted decryption key server. Using this option, members won’t need to use their master passwords to decrypt vault data. The require SSO authentication and single organization policies are required to set up Key Connector decryption. Contact Bitwarden Support for set up assistance.'" }, "memberDecryptionKeyConnectorDescEnd": { - "message": "are required to set up Key Connector decryption. Contact Bitwarden Support for set up assistance.", + "message": "для наладжвання шыфравання з дапамогай Key Connector. Звярніцеся ў службу падтрымкі Bitwarden, каб атрымаць дапамогу пры наладжванні.", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Connect login with SSO to your self-hosted decryption key server. Using this option, members won’t need to use their master passwords to decrypt vault data. The require SSO authentication and single organization policies are required to set up Key Connector decryption. Contact Bitwarden Support for set up assistance.'" }, "keyConnectorPolicyRestriction": { @@ -6776,7 +6776,7 @@ } }, "inputTrimValidator": { - "message": "Input must not contain only whitespace.", + "message": "Уведзенае значэнне не павінна змяшчаць толькі прабелы.", "description": "Notification to inform the user that a form's input can't contain only whitespace." }, "dismiss": { @@ -6793,7 +6793,7 @@ "message": "Патрабаваць ад існуючых удзельнікаў змены пароляў" }, "region": { - "message": "Region" + "message": "Рэгіён" }, "eu": { "message": "ЕС", @@ -6822,17 +6822,26 @@ "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" }, "memberDecryptionTdeDescriptionLink": { - "message": "account recovery administration policy", + "message": "Палітыка адміністравання аднаўлення ўліковых запісаў", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" }, "memberDecryptionTdeDescriptionEnd": { - "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "message": "з аўтаматычнай рэгістрацыяй уключаецца пры выкарыстанні гэтага параметра.", + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ не знойдзены", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { - "message": "Recover account" + "message": "Аднавіць уліковы запіс" }, "updatedTempPassword": { - "message": "User updated a password issued through account recovery." + "message": "Карыстальнік абнавіў пароль пры аднаўленні ўліковага запісу." } } diff --git a/apps/web/src/locales/bg/messages.json b/apps/web/src/locales/bg/messages.json index ea8c19f598a..ad960a9915d 100644 --- a/apps/web/src/locales/bg/messages.json +++ b/apps/web/src/locales/bg/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "с автоматично включване ще бъде активирана при използването на тази настройка.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "Няма намерен $RESOURCE$", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Възстановяване на профила" diff --git a/apps/web/src/locales/bn/messages.json b/apps/web/src/locales/bn/messages.json index 65ad3e657dd..075c6717d5f 100644 --- a/apps/web/src/locales/bn/messages.json +++ b/apps/web/src/locales/bn/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/bs/messages.json b/apps/web/src/locales/bs/messages.json index 76f7d77f7e2..15caf7c5352 100644 --- a/apps/web/src/locales/bs/messages.json +++ b/apps/web/src/locales/bs/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/ca/messages.json b/apps/web/src/locales/ca/messages.json index 45d0419ce87..f1b140dd2c0 100644 --- a/apps/web/src/locales/ca/messages.json +++ b/apps/web/src/locales/ca/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "amb inscripció automàtica s'activarà quan s'utilitze aquesta opció.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "No s'ha trobat $RESOURCE$", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recupera el compte" diff --git a/apps/web/src/locales/cs/messages.json b/apps/web/src/locales/cs/messages.json index cf40e3aa982..7a2eee2c14f 100644 --- a/apps/web/src/locales/cs/messages.json +++ b/apps/web/src/locales/cs/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "budou použity zásady obnovení účtu s automatickým zápisem.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ nebyl nalezen", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Obnovit účet" diff --git a/apps/web/src/locales/cy/messages.json b/apps/web/src/locales/cy/messages.json index dd62b4d4a3b..7595e610b1a 100644 --- a/apps/web/src/locales/cy/messages.json +++ b/apps/web/src/locales/cy/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/da/messages.json b/apps/web/src/locales/da/messages.json index ca561401096..48432de1a73 100644 --- a/apps/web/src/locales/da/messages.json +++ b/apps/web/src/locales/da/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "med automatisk indrullering aktiveres ved brug af denne indstilling.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ ikke fundet", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Gendan konto" diff --git a/apps/web/src/locales/de/messages.json b/apps/web/src/locales/de/messages.json index 517e3471a9e..614a34b02e5 100644 --- a/apps/web/src/locales/de/messages.json +++ b/apps/web/src/locales/de/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "mit automatischer Registrierung wird aktiviert, wenn diese Option verwendet wird.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ nicht gefunden", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Konto wiederherstellen" diff --git a/apps/web/src/locales/el/messages.json b/apps/web/src/locales/el/messages.json index a80a770d666..f3066236705 100644 --- a/apps/web/src/locales/el/messages.json +++ b/apps/web/src/locales/el/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/en_GB/messages.json b/apps/web/src/locales/en_GB/messages.json index fceab3da98b..d83c8086090 100644 --- a/apps/web/src/locales/en_GB/messages.json +++ b/apps/web/src/locales/en_GB/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/en_IN/messages.json b/apps/web/src/locales/en_IN/messages.json index 252dbac7139..97d57c86b78 100644 --- a/apps/web/src/locales/en_IN/messages.json +++ b/apps/web/src/locales/en_IN/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/eo/messages.json b/apps/web/src/locales/eo/messages.json index d260b90c71b..6b33860e04f 100644 --- a/apps/web/src/locales/eo/messages.json +++ b/apps/web/src/locales/eo/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/es/messages.json b/apps/web/src/locales/es/messages.json index bf306eeac75..c265a165d43 100644 --- a/apps/web/src/locales/es/messages.json +++ b/apps/web/src/locales/es/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ no encontrado", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recuperar cuenta" diff --git a/apps/web/src/locales/et/messages.json b/apps/web/src/locales/et/messages.json index 844f0962eb4..a9d5dc71807 100644 --- a/apps/web/src/locales/et/messages.json +++ b/apps/web/src/locales/et/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/eu/messages.json b/apps/web/src/locales/eu/messages.json index d85626fb323..e9f83043ec6 100644 --- a/apps/web/src/locales/eu/messages.json +++ b/apps/web/src/locales/eu/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/fa/messages.json b/apps/web/src/locales/fa/messages.json index c9bf21478f8..a0788ccc87f 100644 --- a/apps/web/src/locales/fa/messages.json +++ b/apps/web/src/locales/fa/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/fi/messages.json b/apps/web/src/locales/fi/messages.json index cb33045e44d..861ed165129 100644 --- a/apps/web/src/locales/fi/messages.json +++ b/apps/web/src/locales/fi/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "automaattisella liitoksella otetaan tämän asetuksen yhteydessä käyttöön.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ ei löytynyt", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Palauta tili" diff --git a/apps/web/src/locales/fil/messages.json b/apps/web/src/locales/fil/messages.json index 590fc37578a..7dc03130dd0 100644 --- a/apps/web/src/locales/fil/messages.json +++ b/apps/web/src/locales/fil/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/fr/messages.json b/apps/web/src/locales/fr/messages.json index 54a9dd1b000..8696bdb08a5 100644 --- a/apps/web/src/locales/fr/messages.json +++ b/apps/web/src/locales/fr/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "par inscription automatique s'active lorsque cette option est utilisée.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ introuvable", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Récupérer le compte" diff --git a/apps/web/src/locales/gl/messages.json b/apps/web/src/locales/gl/messages.json index dd62b4d4a3b..7595e610b1a 100644 --- a/apps/web/src/locales/gl/messages.json +++ b/apps/web/src/locales/gl/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/he/messages.json b/apps/web/src/locales/he/messages.json index fbea7c75944..19696d8fe16 100644 --- a/apps/web/src/locales/he/messages.json +++ b/apps/web/src/locales/he/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/hi/messages.json b/apps/web/src/locales/hi/messages.json index 03d30612488..02913eecf51 100644 --- a/apps/web/src/locales/hi/messages.json +++ b/apps/web/src/locales/hi/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/hr/messages.json b/apps/web/src/locales/hr/messages.json index 403f7ba0e63..107ef8398a6 100644 --- a/apps/web/src/locales/hr/messages.json +++ b/apps/web/src/locales/hr/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/hu/messages.json b/apps/web/src/locales/hu/messages.json index 1a370bc0e17..eb326f55a29 100644 --- a/apps/web/src/locales/hu/messages.json +++ b/apps/web/src/locales/hu/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "automatikus regisztrációval bekapcsol, ha ez az opció van használatban.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ nem található.", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Fiók helyreállítás" diff --git a/apps/web/src/locales/id/messages.json b/apps/web/src/locales/id/messages.json index 85c7748b0ff..d1aadca4830 100644 --- a/apps/web/src/locales/id/messages.json +++ b/apps/web/src/locales/id/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/it/messages.json b/apps/web/src/locales/it/messages.json index bebe2370869..781acee518c 100644 --- a/apps/web/src/locales/it/messages.json +++ b/apps/web/src/locales/it/messages.json @@ -4493,13 +4493,13 @@ "message": "Il suggerimento per la password non può essere uguale alla tua password." }, "enrollAccountRecovery": { - "message": "Enroll in account recovery" + "message": "Iscriviti al recupero dell'account" }, "enrolledAccountRecovery": { - "message": "Enrolled in account recovery" + "message": "Iscritto al recupero dell'account" }, "withdrawAccountRecovery": { - "message": "Withdraw from account recovery" + "message": "Rifiuta il recupero dell'account" }, "enrollPasswordResetSuccess": { "message": "Iscrizione riuscita!" @@ -4508,7 +4508,7 @@ "message": "Rinuncia riuscita!" }, "eventEnrollAccountRecovery": { - "message": "User $ID$ enrolled in account recovery.", + "message": "Utente $ID$ si è iscritto al recupero dell'account.", "placeholders": { "id": { "content": "$1", @@ -4517,7 +4517,7 @@ } }, "eventWithdrawAccountRecovery": { - "message": "User $ID$ withdrew from account recovery.", + "message": "Utente $ID$ ha rifiutato il recupero dell'account.", "placeholders": { "id": { "content": "$1", @@ -4577,10 +4577,10 @@ "message": "Iscriversi consentirà agli amministratori dell'organizzazione di cambiare la tua password principale" }, "accountRecoveryPolicy": { - "message": "Account recovery administration" + "message": "Amministrazione del recupero dell'account" }, "accountRecoveryPolicyDescription": { - "message": "Recover member accounts when master password or trusted devices are forgotten or lost. The recovery processes is based on the account encryption method." + "message": "Recupera gli account dei membri quando la password principale o i dispositivi fidati sono dimenticati o persi. I processi di recupero sono basati sul metodo di criptografia dell'account." }, "resetPasswordPolicyWarning": { "message": "I membri dell'organizzazione dovranno iscriversi o essere iscritti automaticamente prima che gli amministratori possano ripristinare la loro password principale." @@ -6776,7 +6776,7 @@ } }, "inputTrimValidator": { - "message": "Input must not contain only whitespace.", + "message": "L'input non deve contenere solo spazi.", "description": "Notification to inform the user that a form's input can't contain only whitespace." }, "dismiss": { @@ -6818,21 +6818,30 @@ "message": "Criptografia dispositivo fidato" }, "memberDecryptionTdeDescriptionStart": { - "message": "Once authenticated, members will decrypt vault data using a key stored on their device. The", + "message": "Una volta autenticati, i membri decriptograferanno i dati della cassaforte usando una chiave memorizzata sul proprio dispositivo. La", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" }, "memberDecryptionTdeDescriptionLink": { - "message": "account recovery administration policy", + "message": "politica di amministrazione del recupero dell'account", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" }, "memberDecryptionTdeDescriptionEnd": { - "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "message": "con registrazione automatica si attiverà quando questa opzione è usata.", + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ non trovato", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { - "message": "Recover account" + "message": "Recupera account" }, "updatedTempPassword": { - "message": "User updated a password issued through account recovery." + "message": "L'utente ha aggiornato una password emessa tramite il recupero dell'account." } } diff --git a/apps/web/src/locales/ja/messages.json b/apps/web/src/locales/ja/messages.json index 245f98b9619..5ee525b8e28 100644 --- a/apps/web/src/locales/ja/messages.json +++ b/apps/web/src/locales/ja/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "このオプションを使用すると、自動登録が有効になります。", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ が見つかりません", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "アカウント回復" diff --git a/apps/web/src/locales/ka/messages.json b/apps/web/src/locales/ka/messages.json index 0a592ddc986..5e7369c3e0f 100644 --- a/apps/web/src/locales/ka/messages.json +++ b/apps/web/src/locales/ka/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/km/messages.json b/apps/web/src/locales/km/messages.json index dd62b4d4a3b..7595e610b1a 100644 --- a/apps/web/src/locales/km/messages.json +++ b/apps/web/src/locales/km/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/kn/messages.json b/apps/web/src/locales/kn/messages.json index 05aac870602..e330147c5c3 100644 --- a/apps/web/src/locales/kn/messages.json +++ b/apps/web/src/locales/kn/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/ko/messages.json b/apps/web/src/locales/ko/messages.json index 18ac87d7b03..3e0ce79be9b 100644 --- a/apps/web/src/locales/ko/messages.json +++ b/apps/web/src/locales/ko/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/lv/messages.json b/apps/web/src/locales/lv/messages.json index cdcb5457bfd..179fbc6c06d 100644 --- a/apps/web/src/locales/lv/messages.json +++ b/apps/web/src/locales/lv/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "ar automātisku ievietošanu sarakstā tiks ieslēgts, kad šī iespēja tiek izmantota.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ netika atrasts", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Atkopt kontu" diff --git a/apps/web/src/locales/ml/messages.json b/apps/web/src/locales/ml/messages.json index 8f6e77449bd..78817866d29 100644 --- a/apps/web/src/locales/ml/messages.json +++ b/apps/web/src/locales/ml/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/my/messages.json b/apps/web/src/locales/my/messages.json index dd62b4d4a3b..7595e610b1a 100644 --- a/apps/web/src/locales/my/messages.json +++ b/apps/web/src/locales/my/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/nb/messages.json b/apps/web/src/locales/nb/messages.json index 3643facf387..eb63814dc60 100644 --- a/apps/web/src/locales/nb/messages.json +++ b/apps/web/src/locales/nb/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/ne/messages.json b/apps/web/src/locales/ne/messages.json index 8dd7892f58a..00b22a5f77b 100644 --- a/apps/web/src/locales/ne/messages.json +++ b/apps/web/src/locales/ne/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/nl/messages.json b/apps/web/src/locales/nl/messages.json index 614f1921b69..9588f81390f 100644 --- a/apps/web/src/locales/nl/messages.json +++ b/apps/web/src/locales/nl/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "in met automatische inschrijving wanneer deze optie wordt gebruikt.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Account herstellen" diff --git a/apps/web/src/locales/nn/messages.json b/apps/web/src/locales/nn/messages.json index 3f849590eb5..34eb407911c 100644 --- a/apps/web/src/locales/nn/messages.json +++ b/apps/web/src/locales/nn/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/or/messages.json b/apps/web/src/locales/or/messages.json index dd62b4d4a3b..7595e610b1a 100644 --- a/apps/web/src/locales/or/messages.json +++ b/apps/web/src/locales/or/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/pl/messages.json b/apps/web/src/locales/pl/messages.json index 5618ee0a096..271175c1c20 100644 --- a/apps/web/src/locales/pl/messages.json +++ b/apps/web/src/locales/pl/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "z automatycznym zapisem włączy się, gdy ta opcja jest używana.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ nie znaleziony", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Odzyskaj konto" diff --git a/apps/web/src/locales/pt_BR/messages.json b/apps/web/src/locales/pt_BR/messages.json index 80bea39bbd1..6644a96c823 100644 --- a/apps/web/src/locales/pt_BR/messages.json +++ b/apps/web/src/locales/pt_BR/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ não encontrado", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/pt_PT/messages.json b/apps/web/src/locales/pt_PT/messages.json index 8d323419635..b127e71e201 100644 --- a/apps/web/src/locales/pt_PT/messages.json +++ b/apps/web/src/locales/pt_PT/messages.json @@ -50,7 +50,7 @@ "message": "Campos personalizados" }, "cardholderName": { - "message": "Titular do Cartão" + "message": "Titular do cartão" }, "number": { "message": "Número" @@ -140,13 +140,13 @@ "message": "Dr." }, "expirationMonth": { - "message": "Mês de expiração" + "message": "Mês de validade" }, "expirationYear": { - "message": "Ano de expiração" + "message": "Ano de validade" }, "authenticatorKeyTotp": { - "message": "Chave do autenticador (TOTP)" + "message": "Chave de autenticação (TOTP)" }, "folder": { "message": "Pasta" @@ -170,7 +170,7 @@ "message": "Booleano" }, "cfTypeLinked": { - "message": "Ligado", + "message": "Associado", "description": "This describes a field that is 'linked' (related) to another field." }, "remove": { @@ -180,7 +180,7 @@ "message": "Não atribuído" }, "noneFolder": { - "message": "Em nenhuma pasta", + "message": "Sem pasta", "description": "This is the folder for uncategorized items" }, "addFolder": { @@ -194,7 +194,7 @@ "description": "Domain name. Example: website.com" }, "domainName": { - "message": "Nome do Domínio", + "message": "Nome do domínio", "description": "Domain name. Example: website.com" }, "host": { @@ -272,10 +272,10 @@ "message": "Editar" }, "searchCollection": { - "message": "Pesquisar Coleção" + "message": "Procurar na coleção" }, "searchFolder": { - "message": "Pesquisar Pasta" + "message": "Procurar na pasta" }, "searchFavorites": { "message": "Procurar nos favoritos" @@ -321,7 +321,7 @@ "message": "Tipos" }, "typeLogin": { - "message": "Início de sessão" + "message": "Credencial" }, "typeCard": { "message": "Cartão" @@ -351,7 +351,7 @@ "message": "Coleções" }, "firstName": { - "message": "Nome Próprio" + "message": "Nome próprio" }, "middleName": { "message": "Segundo nome" @@ -363,13 +363,13 @@ "message": "Nome completo" }, "address1": { - "message": "1.ª morada" + "message": "Endereço 1" }, "address2": { - "message": "2.ª morada" + "message": "Endereço 2" }, "address3": { - "message": "3.ª morada" + "message": "Endereço 3" }, "cityTown": { "message": "Cidade / Localidade" @@ -422,7 +422,7 @@ "message": "Partilhar" }, "moveToOrganization": { - "message": "Mover para organização" + "message": "Mover para a organização" }, "valueCopied": { "message": "$VALUE$ copiado(a)", @@ -465,7 +465,7 @@ "message": "O meu cofre" }, "allVaults": { - "message": "Todos os Cofres" + "message": "Todos os cofres" }, "vault": { "message": "Cofre" @@ -474,7 +474,7 @@ "message": "Cofres" }, "vaultItems": { - "message": "Itens do Cofre" + "message": "Itens do cofre" }, "filter": { "message": "Filter" @@ -483,16 +483,16 @@ "message": "Mover selecionados para a organização" }, "deleteSelected": { - "message": "Eliminar seleção" + "message": "Eliminar selecionados" }, "moveSelected": { - "message": "Mover seleção" + "message": "Mover selecionados" }, "selectAll": { "message": "Selecionar tudo" }, "unselectAll": { - "message": "Desfazer seleção" + "message": "Desmarcar tudo" }, "launch": { "message": "Iniciar" @@ -507,7 +507,7 @@ "message": "Tem a certeza de que pretende eliminar este anexo?" }, "attachmentSaved": { - "message": "O anexo foi guardado." + "message": "Anexo guardado" }, "file": { "message": "Ficheiro" @@ -525,7 +525,7 @@ "message": "Item adicionado" }, "editedItem": { - "message": "Item alterado" + "message": "Item guardado" }, "movedItemToOrg": { "message": "$ITEMNAME$ movido para $ORGNAME$", @@ -565,7 +565,7 @@ "message": "Item movido para o lixo" }, "deletedItems": { - "message": "Item movido para o lixo" + "message": "Itens movidos para o lixo" }, "movedItems": { "message": "Itens movidos" @@ -574,7 +574,7 @@ "message": "Tem a certeza de que pretende substituir a palavra-passe atual?" }, "editedFolder": { - "message": "Pasta alterada" + "message": "Pasta guardada" }, "addedFolder": { "message": "Pasta adicionada" @@ -631,7 +631,7 @@ "message": "É novo por cá?" }, "startTrial": { - "message": "Iniciar avaliação" + "message": "Iniciar período experimental" }, "logIn": { "message": "Iniciar sessão" @@ -664,7 +664,7 @@ "message": "Uma dica da palavra-passe mestra pode ajudá-lo a lembrar-se da sua palavra-passe, caso se esqueça dela." }, "reTypeMasterPass": { - "message": "Reescreva a palavra-passe mestra" + "message": "Reintroduza a palavra-passe mestra" }, "masterPassHint": { "message": "Dica da palavra-passe mestra (opcional)" @@ -679,16 +679,16 @@ "message": "Dica da palavra-passe" }, "enterEmailToGetHint": { - "message": "Introduza o endereço de email da sua conta para receber a dica da sua palavra-passe mestra." + "message": "Introduza o endereço de e-mail da sua conta para receber a dica da sua palavra-passe mestra." }, "getMasterPasswordHint": { "message": "Obter dica da palavra-passe mestra" }, "emailRequired": { - "message": "O endereço de email é requerido." + "message": "É necessário o endereço de e-mail." }, "invalidEmail": { - "message": "Endereço de email inválido." + "message": "Endereço de e-mail inválido." }, "masterPasswordRequired": { "message": "É necessária a palavra-passe mestra." @@ -710,19 +710,19 @@ "message": "A confirmação da palavra-passe mestra não corresponde." }, "newAccountCreated": { - "message": "A sua nova conta foi criada! Agora pode iniciar sessão." + "message": "A sua nova conta foi criada! Pode agora iniciar sessão." }, "trialAccountCreated": { "message": "Conta criada com sucesso." }, "masterPassSent": { - "message": "Enviámos-lhe um email com a dica da sua palavra-passe mestra." + "message": "Enviámos-lhe um e-mail com a dica da sua palavra-passe mestra." }, "unexpectedError": { "message": "Ocorreu um erro inesperado." }, "emailAddress": { - "message": "Endereço de email" + "message": "Endereço de e-mail" }, "yourVaultIsLocked": { "message": "O seu cofre está bloqueado. Verifique a sua palavra-passe mestra para continuar." @@ -747,7 +747,7 @@ "message": "Palavra-passe mestra inválida" }, "invalidFilePassword": { - "message": "Senha do ficheiro inválida, por favor use a senha que definiu quando criou o arquivo de exportação." + "message": "Palavra-passe de ficheiro inválida, utilize a palavra-passe que introduziu quando criou o ficheiro de exportação." }, "lockNow": { "message": "Bloquear agora" @@ -792,10 +792,10 @@ } }, "enterVerificationCodeApp": { - "message": "Introduza o código de verificação de 6 dígitos da sua aplicação de autenticador." + "message": "Introduza o código de verificação de 6 dígitos da sua aplicação de autenticação." }, "enterVerificationCodeEmail": { - "message": "Introduza o código de verificação de 6 dígitos que foi enviado por email para $EMAIL$.", + "message": "Introduza o código de verificação de 6 dígitos que foi enviado por e-mail para $EMAIL$.", "placeholders": { "email": { "content": "$1", @@ -804,7 +804,7 @@ } }, "verificationCodeEmailSent": { - "message": "Email de verificação enviado para $EMAIL$.", + "message": "E-mail de verificação enviado para $EMAIL$.", "placeholders": { "email": { "content": "$1", @@ -816,7 +816,7 @@ "message": "Memorizar-me" }, "sendVerificationCodeEmailAgain": { - "message": "Enviar email com o código de confirmação novamente" + "message": "Enviar e-mail com o código de verificação novamente" }, "useAnotherTwoStepMethod": { "message": "Utilizar outro método de verificação de dois passos" @@ -834,22 +834,22 @@ "message": "Esta conta tem a verificação de dois passos configurada, no entanto, nenhum dos fornecedores da verificação de dois passos configurada é suportado por este navegador web." }, "noTwoStepProviders2": { - "message": "Por favor utilize um navegador web suportado (tal como o Chrome) e/ou adicione provedores adicionais que são melhor suportados entre navegadores web (tal como uma aplicação de autenticador)." + "message": "Por favor, utilize um navegador web suportado (como o Chrome) e/ou adicione fornecedores adicionais que sejam mais bem suportados nos navegadores web (como uma aplicação de autenticação)." }, "twoStepOptions": { "message": "Opções de verificação de dois passos" }, "recoveryCodeDesc": { - "message": "Perdeu o acesso a todos os seus provedores de dois passos? Utilize o seu código de recuperação para desativar todos os provedores de dois passos da sua conta." + "message": "Perdeu o acesso a todos os seus fornecedores de verificação de dois passos? Utilize o seu código de recuperação para desativar todos os fornecedores de verificação de dois passos da sua conta." }, "recoveryCodeTitle": { "message": "Código de recuperação" }, "authenticatorAppTitle": { - "message": "Aplicação de autenticador" + "message": "Aplicação de autenticação" }, "authenticatorAppDesc": { - "message": "Utilize uma aplicação de autenticador (tal como Authy ou Google Authenticator) para gerar códigos de verificação baseados na hora.", + "message": "Utilize uma aplicação de autenticação (como o Authy ou o Google Authenticator) para gerar códigos de verificação baseados no tempo.", "description": "'Authy' and 'Google Authenticator' are product names and should not be translated." }, "yubiKeyTitle": { @@ -867,7 +867,7 @@ "description": "'Duo Security' and 'Duo Mobile' are product names and should not be translated." }, "u2fDesc": { - "message": "Utilize qualquer chave de segurança ativada por FIDO U2F para aceder à sua conta." + "message": "Utilize qualquer chave de segurança compatível com o FIDO U2F para aceder à sua conta." }, "u2fTitle": { "message": "Chave de segurança FIDO U2F" @@ -876,13 +876,13 @@ "message": "FIDO2 WebAuthn" }, "webAuthnDesc": { - "message": "Utilize qualquer chave de segurança ativada pela WebAuthn para aceder à sua conta." + "message": "Utilize qualquer chave de segurança compatível com o WebAuthn para aceder à sua conta." }, "webAuthnMigrated": { - "message": "(Migrado de FIDO)" + "message": "(Migrado do FIDO)" }, "emailTitle": { - "message": "Email" + "message": "E-mail" }, "emailDesc": { "message": "Os códigos de verificação ser-lhe-ão enviados por e-mail." @@ -897,13 +897,13 @@ "message": "Organizações" }, "moveToOrgDesc": { - "message": "Escolha uma organização para a qual pretende mover este item. Mover para uma organização transfere a propriedade do item para essa organização. Deixará de ser o proprietário directo deste item depois de este ter sido movido." + "message": "Escolha uma organização para a qual pretende mover este item. Mover para uma organização transfere a propriedade do item para essa organização. Deixará de ser o proprietário direto deste item depois de este ter sido movido." }, "moveManyToOrgDesc": { - "message": "Escolha uma organização para a qual deseja mover este item. A mudança para uma organização transfere a propriedade do item para essa organização. Deixará de ser o proprietário directo deste item uma vez que tenha sido movido." + "message": "Escolha uma organização para a qual pretende mover estes itens. Mover para uma organização transfere a propriedade dos itens para essa organização. Deixará de ser o proprietário direto destes itens depois de terem sido movidos." }, "collectionsDesc": { - "message": "Edite as coleções em que este item está a ser partilhado. Apenas utilizadores da organização com acesso a estas coleções podem ver este item." + "message": "Edite as coleções com as quais este item está a ser partilhado. Apenas os utilizadores da organização com acesso a estas coleções poderão ver este item." }, "deleteSelectedItemsDesc": { "message": "Serão movidos $COUNT$ item(ns) para o lixo.", @@ -927,7 +927,7 @@ "message": "Are you sure you want to continue?" }, "moveSelectedItemsDesc": { - "message": "Escolha a pasta para onde que mover o(s) $COUNT$ item(s) selecionado(s).", + "message": "Escolha uma pasta para a qual pretende mover o(s) $COUNT$ item(ns) selecionado(s).", "placeholders": { "count": { "content": "$1", @@ -953,19 +953,19 @@ } }, "verificationCodeTotp": { - "message": "Código de Verificação (TOTP)" + "message": "Código de verificação (TOTP)" }, "copyVerificationCode": { - "message": "Copiar código de confirmação" + "message": "Copiar código de verificação" }, "warning": { "message": "Aviso" }, "confirmVaultExport": { - "message": "Confirmar exportação de cofre" + "message": "Confirmar a exportação do cofre" }, "exportWarningDesc": { - "message": "Esta exportação contém os seus dados do cofre num formato desencriptado. Não deve armazenar ou enviar o ficheiro exportado através de canais inseguros (como email). Elimine-o imediatamente após o utilizar." + "message": "Esta exportação contém os dados do seu cofre num formato não encriptado. Não deve armazenar ou enviar o ficheiro exportado através de canais não seguros (como o e-mail). Elimine-o imediatamente após terminar a sua utilização." }, "encExportKeyWarningDesc": { "message": "Esta exportação encripta os seus dados utilizando a chave de encriptação da sua conta. Se alguma vez mudar a chave de encriptação da sua conta, deve exportar novamente, uma vez que não conseguirá desencriptar este ficheiro de exportação." @@ -983,28 +983,28 @@ "message": "Formato do ficheiro" }, "fileEncryptedExportWarningDesc": { - "message": "Esta exportação de arquivo será protegida por senha e exigirá a senha do arquivo para descriptografar." + "message": "A exportação deste ficheiro será protegida por uma palavra-passe e exigirá a palavra-passe do ficheiro para ser desencriptada." }, "exportPasswordDescription": { - "message": "Esta senha será usada para exportar e importar este arquivo" + "message": "Esta palavra-passe será utilizada para exportar e importar este ficheiro" }, "confirmMasterPassword": { - "message": "Confirme a Senha Mestra" + "message": "Confirmar a palavra-passe mestra" }, "confirmFormat": { - "message": "Confirmar Formato" + "message": "Confirmar formato" }, "filePassword": { - "message": "Senha do Arquivo" + "message": "Palavra-passe do ficheiro" }, "confirmFilePassword": { - "message": "Confirmar senha do arquivo" + "message": "Confirmar a palavra-passe do ficheiro" }, "accountRestrictedOptionDescription": { "message": "Use your account encryption key, derived from your account's username and Master Password, to encrypt the export and restrict import to only the current Bitwarden account." }, "passwordProtectedOptionDescription": { - "message": "Crie uma senha gerada pelo utilizador para proteger a exportação. Use isto para criar uma exportação que pode ser usada em outras contas." + "message": "Defina uma palavra-passe do ficheiro para encriptar a exportação e importe-a para qualquer conta Bitwarden utilizando a palavra-passe de desencriptação." }, "exportTypeHeading": { "message": "Export type" @@ -1013,19 +1013,19 @@ "message": "Account restricted" }, "passwordProtected": { - "message": "Protegido por senha" + "message": "Protegido por palavra-passe" }, "filePasswordAndConfirmFilePasswordDoNotMatch": { - "message": "\"Senha do ficheiro\" e \"Confirmação da senha do ficheiro\" não correspondem." + "message": "\"Palavra-passe do ficheiro\" e \"Confirmar palavra-passe do ficheiro\" não correspondem." }, "confirmVaultImport": { - "message": "Confirmar Importação do Cofre" + "message": "Confirmar a importação do cofre" }, "confirmVaultImportDesc": { - "message": "Este ficheiro é protegido por senha. Por favor, digite a senha do ficheiro para importar os dados." + "message": "Este ficheiro está protegido por palavra-passe. Introduza a palavra-passe do ficheiro para importar os dados." }, "exportSuccess": { - "message": "Os dados do seu cofre foram exportados." + "message": "Dados do cofre exportados" }, "passwordGenerator": { "message": "Gerador de palavras-passe" @@ -1037,7 +1037,7 @@ "message": "Números mínimos" }, "minSpecial": { - "message": "Especiais mínimos", + "message": "Caracteres especiais minímos", "description": "Minimum special characters" }, "ambiguous": { @@ -1061,7 +1061,7 @@ "message": "Números (0-9)" }, "specialCharacters": { - "message": "Caracteres Especiais (!@#$%^&*)" + "message": "Caracteres especiais (!@#$%^&*)" }, "numWords": { "message": "Número de palavras" @@ -1087,22 +1087,22 @@ "description": "To clear something out. Example: To clear browser history." }, "accountUpdated": { - "message": "Conta atualizada" + "message": "Conta guardada" }, "changeEmail": { - "message": "Alterar email" + "message": "Alterar e-mail" }, "changeEmailTwoFactorWarning": { - "message": "O procedimento alterará o endereço de e-mail da sua conta. Não alterará o endereço de e-mail utilizado para autenticação de início de sessão em duas etapas. Pode alterar este endereço de e-mail nas definições de início de sessão em duas etapas." + "message": "Ao prosseguir, o endereço de e-mail da sua conta será alterado. Não alterará o endereço de e-mail utilizado para a autenticação da verificação de dois passos. Pode alterar este endereço de e-mail nas definições de verificação de dois passos." }, "newEmail": { - "message": "Novo email" + "message": "Novo e-mail" }, "code": { "message": "Código" }, "changeEmailDesc": { - "message": "Enviámos um código de verificação para $EMAIL$. Por favor verifique este código no seu email e introduza-o abaixo para finalizar a alteração de endereço de email.", + "message": "Enviámos um código de verificação para $EMAIL$. Verifique este código no seu e-mail e introduza-o abaixo para finalizar a alteração do endereço de e-mail.", "placeholders": { "email": { "content": "$1", @@ -1111,16 +1111,16 @@ } }, "loggedOutWarning": { - "message": "Proceder irá terminar a sua sessão atual, requerendo-lhe voltar a iniciar sessão. Sessões ativas noutros dispositivos podem continuar ativas por até uma hora." + "message": "Ao prosseguir, terminará a sua sessão atual e terá de iniciar sessão novamente. As sessões ativas noutros dispositivos poderão continuar ativas até uma hora." }, "emailChanged": { - "message": "Email alterado" + "message": "E-mail alterado" }, "logBackIn": { - "message": "Por favor volte a iniciar sessão." + "message": "Por favor, inicie sessão novamente." }, "logBackInOthersToo": { - "message": "Por favor volte a iniciar sessão. Se estiver a usar outras aplicações Bitwarden termine sessão e volte a iniciar sessão nessas também." + "message": "Por favor, inicie sessão novamente. Se estiver a utilizar outras aplicações Bitwarden, termine a sessão e volte a iniciar sessão nessas também." }, "changeMasterPassword": { "message": "Alterar palavra-passe mestra" @@ -1147,7 +1147,7 @@ "message": "Iterações KDF" }, "kdfIterationsDesc": { - "message": "Iterações KDF mais altas podem ajudar a proteger a sua palavra-passe mestra de ser forçada por um atacante. Nós recomendamos um valor de $VALUE$ ou mais.", + "message": "As iterações KDF mais elevadas podem ajudar a proteger a sua palavra-passe mestra de ser forçada por um atacante. Recomendamos um valor de $VALUE$ ou mais.", "placeholders": { "value": { "content": "$1", @@ -1156,7 +1156,7 @@ } }, "kdfIterationsWarning": { - "message": "Definir as suas iterações KDF muito altas pode resultar em desempenho fraco ao iniciar sessão (e desbloquear) o Bitwarden em dispositivos com CPUs mais lentos. Nós recomendamos que aumente o valor em incrementos de $INCREMENT$ e depois testar todos os seus dispositivos.", + "message": "Definir as suas iterações KDF muito altas pode resultar em desempenho fraco ao iniciar sessão (e desbloquear) o Bitwarden em dispositivos com CPUs mais lentos. Recomendamos que aumente o valor em incrementos de $INCREMENT$ e depois teste todos os seus dispositivos.", "placeholders": { "increment": { "content": "$1", @@ -1184,7 +1184,7 @@ "message": "Definições da chave de encriptação alteradas" }, "dangerZone": { - "message": "Zona perigosa" + "message": "Zona de perigo" }, "dangerZoneDesc": { "message": "Cuidado, estas ações não são reversíveis!" @@ -1193,10 +1193,10 @@ "message": "Desautorizar sessões" }, "deauthorizeSessionsDesc": { - "message": "Preocupado pela sua conta ter sessão iniciada noutro dispositivo? Proceda abaixo para desautorizar todos os computadores ou dispositivos que tenha utilizado previamente. Este passo de segurança é recomendado se utilizou um computador público previamente ou guardou acidentalmente a sua palavra-passe num dispositivo que não lhe pertence. Este passo também irá limpar todas as sessões de dois passos previamente memorizadas." + "message": "Preocupado com o facto de a sua conta ter iniciado sessão noutro dispositivo? Proceda abaixo para desautorizar todos os computadores ou dispositivos que utilizou anteriormente. Este passo de segurança é recomendado se tiver utilizado anteriormente um computador público ou se tiver guardado acidentalmente a sua palavra-passe num dispositivo que não é seu. Este passo também apagará todas as sessões de verificação de dois passos anteriormente recordadas." }, "deauthorizeSessionsWarning": { - "message": "Proceder também irá terminar a sua sessão atual, requerendo-lhe voltara a iniciar sessão. Irá ser-lhe solicitado o código de início de sessão de dois passos, se ativado. Sessões ativas noutros dispositivos podem continuar ativas por até uma hora." + "message": "Ao prosseguir, também terminará a sua sessão atual e terá de iniciar sessão novamente. Ser-lhe-á também pedido que volte efetuar a verificação de dois passos, se estiver configurada. As sessões ativas noutros dispositivos podem continuar ativas até uma hora." }, "sessionsDeauthorized": { "message": "Todas as sessões desautorizadas" @@ -1208,25 +1208,25 @@ "message": "Cofre da organização purgado." }, "vaultAccessedByProvider": { - "message": "Cofre acessado pelo provedor." + "message": "Cofre acedido pelo fornecedor." }, "purgeVaultDesc": { - "message": "Proceda abaixo para eliminar todos os itens e pastas do seu cofre. Itens que pertençam a uma organização que partilhe não serão eliminados." + "message": "Proceda da seguinte forma para eliminar todos os itens e pastas do seu cofre. Os itens que pertencem a uma organização com a qual partilha não serão eliminados." }, "purgeOrgVaultDesc": { - "message": "Proceda abaixo para eliminar todos os itens no cofre da organização." + "message": "Proceda da seguinte forma para eliminar todos os itens do cofre da organização." }, "purgeVaultWarning": { - "message": "Purgar o seu cofre é permanente. Não pode ser desfeito." + "message": "A purgação do seu cofre é permanente. Não pode ser desfeita." }, "vaultPurged": { - "message": "O seu cofre foi purgado." + "message": "Cofre purgado." }, "deleteAccount": { "message": "Eliminar conta" }, "deleteAccountDesc": { - "message": "Proceda abaixo para eliminar a sua conta e todos os seus dados associados." + "message": "Proceda da seguinte forma para eliminar a sua conta e todos os dados do cofre." }, "deleteAccountWarning": { "message": "A eliminação da sua conta é permanente. Não pode ser desfeita." @@ -1235,10 +1235,10 @@ "message": "Conta eliminada" }, "accountDeletedDesc": { - "message": "A sua conta foi encerrada e todos os dados associados eliminados." + "message": "A sua conta foi encerrada e todos os dados associados foram eliminados." }, "myAccount": { - "message": "Minha conta" + "message": "A minha conta" }, "tools": { "message": "Ferramentas" @@ -1247,13 +1247,13 @@ "message": "Importar dados" }, "importError": { - "message": "Erro de Importação" + "message": "Erro de importação" }, "importErrorDesc": { - "message": "Havia um problema com os dados que tentou importar. Por favor, resolva os erros listados abaixo no seu ficheiro-fonte e tente novamente." + "message": "Ocorreu um problema com os dados que tentou importar. Por favor, resolva os erros indicados abaixo no seu ficheiro de origem e tente novamente." }, "importSuccess": { - "message": "Os dados foram importados com sucesso para o seu cofre." + "message": "Dados importados com sucesso" }, "importSuccessNumberOfItems": { "message": "A total of $AMOUNT$ items were imported.", @@ -1277,13 +1277,13 @@ } }, "importFormatError": { - "message": "Os dados não estão formatados corretamente. Por favor verifique o ficheiro de importação e tente novamente." + "message": "Os dados não estão formatados corretamente. Por favor, verifique o seu ficheiro de importação e tente novamente." }, "importNothingError": { "message": "Nada foi importado." }, "importEncKeyError": { - "message": "Erro ao desencriptaro arquivo exportado. A sua chave de criptografia não corresponde à chave de criptografia usada para exportar os dados." + "message": "Erro ao desencriptar o ficheiro exportado. A sua chave de encriptação não corresponde à chave de encriptação utilizada para exportar os dados." }, "selectFormat": { "message": "Selecione o formato do ficheiro a importar" @@ -1332,10 +1332,10 @@ "message": "Mostrar ícones do site" }, "faviconDesc": { - "message": "Mostre uma imagem reconhecível ao lado de cada login." + "message": "Mostrar uma imagem reconhecível junto a cada credencial." }, "enableFullWidth": { - "message": "Ativar layout de largura total", + "message": "Apresentar o esquema de largura total", "description": "Allows scaling the web vault UI's width" }, "enableFullWidthDesc": { @@ -1348,7 +1348,7 @@ "message": "Regras de domínios" }, "domainRulesDesc": { - "message": "Se tiver o mesmo início de sessão em múltiplos websites de domínios diferentes, pode marcar o website como \"equivalente\". Domínios \"globais\" são aqueles já criados para si pelo Bitwarden." + "message": "Se tiver o mesmo início de sessão em vários domínios de sites diferentes, pode marcar o site como \"equivalente\". Os domínios \"globais\" são aqueles já criados para si pelo Bitwarden." }, "globalEqDomains": { "message": "Domínios equivalentes globais" @@ -1369,7 +1369,7 @@ "message": "Novo domínio personalizado" }, "newCustomDomainDesc": { - "message": "Introduza uma lista de domínios separados por vírgulas. Apenas são permitidos domínios \"base\". Por exemplo, introduza \"google.com\" em vez de \"www.google.com\". Pode também introduzir \"androidapp://package.name\" para associar uma aplicação android a outros domínios." + "message": "Introduza uma lista de domínios separados por vírgulas. Só são permitidos os domínios \"base\". Não introduza subdomínios. Por exemplo, introduza \"google.com\" em vez de \"www.google.com\". Também pode introduzir \"androidapp://package.name\" para associar uma aplicação android a outros domínios de sites." }, "customDomainX": { "message": "Domínio personalizado $INDEX$", @@ -1387,26 +1387,26 @@ "message": "Verificação de dois passos" }, "twoStepLoginEnforcement": { - "message": "Aplicação do Início de Sessão de Dois Passos" + "message": "Aplicação de verificação de dois passos" }, "twoStepLoginDesc": { - "message": "Reforce a segurança da sua conta ao requerer um passo adicional para iniciar sessão." + "message": "Proteja a sua conta exigindo um passo adicional ao iniciar sessão." }, "twoStepLoginOrganizationDescStart": { - "message": "Aplique as opções do Início de Sessão de Dois Passos do Bitwarden para membros ao utilizar as ", + "message": "Reforce as opções de verificação de dois passos do Bitwarden para os membros, utilizando as ", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Enforce Bitwarden Two-step Login options for members by using the Two-step Login Policy.'" }, "twoStepLoginPolicy": { - "message": "Políticas do Início de Sessão de Dois Passos" + "message": "Políticas da verificação de dois passos" }, "twoStepLoginOrganizationDuoDesc": { - "message": "Para aplicar o Início de Sessão de Dois Passos através do Duo, utilize as opções abaixo." + "message": "Para aplicar verificação de dois passos através do Duo, utilize as opções abaixo." }, "twoStepLoginOrganizationSsoDesc": { - "message": "Se tiver a configuração SSO, ou planeia tê-la, o Início de Sessão de Dois Passos já pode ser aplicado pelo seu Fornecedor de Identidade." + "message": "Se tiver a configuração SSO, ou planeia tê-la, a verificação de dois passos já pode ser aplicada pelo seu fornecedor de identidade." }, "twoStepLoginRecoveryWarning": { - "message": "Ativar o início de sessão de dois passos pode bloquear-lhe permanentemente o acesso à sua conta Bitwarden. Um código de recuperação permite-lhe aceder à sua conta caso já não possa utilizar o seu provedor normal de início de sessão de dois passos (ex. perde o seu dispositivo). O apoio do Bitwarden não o poderá ajudar se perder acesso à sua conta. Recomendamos que anote ou imprima o código de recuperação e mantenha-o em local seguro." + "message": "A configuração da verificação de dois passos pode bloquear permanentemente a sua conta Bitwarden. Um código de recuperação permite-lhe aceder à sua conta no caso de já não poder utilizar o seu fornecedor normal de verificação de dois passos (por exemplo, se perder o seu dispositivo). O suporte Bitwarden não poderá ajudá-lo se perder o acesso à sua conta. Recomendamos que anote ou imprima o código de recuperação e o guarde num local seguro." }, "viewRecoveryCode": { "message": "Ver código de recuperação" @@ -1422,23 +1422,23 @@ "message": "Ativado" }, "restoreAccess": { - "message": "Restaurar acesso" + "message": "Restaurar o acesso" }, "premium": { "message": "Premium", "description": "Premium membership" }, "premiumMembership": { - "message": "Adesão Premium" + "message": "Subscrição Premium" }, "premiumRequired": { - "message": "Premium requerido" + "message": "É necessária uma subscrição Premium" }, "premiumRequiredDesc": { - "message": "É requerida uma adesão premium para utilizar esta funcionalidade." + "message": "É necessária uma subscrição Premium para utilizar esta funcionalidade." }, "youHavePremiumAccess": { - "message": "Tem acesso premium" + "message": "Tem acesso Premium" }, "alreadyPremiumFromOrg": { "message": "Já tem acesso a funcionalidades Premium devido a uma organização de que é membro." @@ -1450,22 +1450,22 @@ "message": "Desativar" }, "revokeAccess": { - "message": "Revogar acesso" + "message": "Revogar o acesso" }, "twoStepLoginProviderEnabled": { - "message": "Este provedor de início de sessão de dois passos está ativado na sua conta." + "message": "Este fornecedor de verificação de dois passos está ativado na sua conta." }, "twoStepLoginAuthDesc": { - "message": "Introduza a sua palavra-passe mestra para modificar as definições do início de sessão de dois passos." + "message": "Introduza a sua palavra-passe mestra para modificar as definições da verificação de dois passos." }, "twoStepAuthenticatorDesc": { - "message": "Siga estes passos para ativar o início de sessão de dois passos com uma aplicação de autenticador:" + "message": "Siga estes passos para ativar a verificação de dois passos com uma aplicação de autenticação:" }, "twoStepAuthenticatorDownloadApp": { - "message": "Transfira uma aplicação de autenticador de dois passos" + "message": "Descarregue uma aplicação de autenticação de dois passos" }, "twoStepAuthenticatorNeedApp": { - "message": "Precisa de uma aplicação de autenticador de dois passos? Transfira uma das seguintes" + "message": "Precisa de uma aplicação de autenticação de dois passos? Descarregue uma das seguintes aplicações" }, "iosDevices": { "message": "Dispositivos iOS" @@ -1477,10 +1477,10 @@ "message": "Dispositivos Windows" }, "twoStepAuthenticatorAppsRecommended": { - "message": "Estas aplicações são recomendadas, todavia outras aplicações de autenticador também funcionarão." + "message": "Estas aplicações são recomendadas, no entanto, outras aplicações de autenticação também funcionam." }, "twoStepAuthenticatorScanCode": { - "message": "Digitalize este código QR com a sua aplicação de autenticador" + "message": "Digitalize este código QR com a sua aplicação de autenticação" }, "key": { "message": "Chave" @@ -1489,19 +1489,19 @@ "message": "Introduza o código de confirmação de 6 dígitos indicado pela aplicação" }, "twoStepAuthenticatorReaddDesc": { - "message": "No caso de precisar de adicioná-lo a outro dispositivo, abaixo está o código QR (ou chave) requerido pela sua aplicação de autenticador." + "message": "Caso necessite de o adicionar a outro dispositivo, segue-se o código QR (ou chave) exigido pela sua aplicação de autenticação." }, "twoStepDisableDesc": { - "message": "Tem certeza de que pretende desativar este provedor de início de sessão de dois passos?" + "message": "Tem a certeza de que pretende desativar este fornecedor de verificação de dois passos?" }, "twoStepDisabled": { - "message": "Provedor de início de sessão de dois passos desativado." + "message": "Fornecedor de verificação de dois passos desativado." }, "twoFactorYubikeyAdd": { "message": "Adicionar uma nova YubiKey à sua conta" }, "twoFactorYubikeyPlugIn": { - "message": "Ligue a YubiKey (NEO ou série 4) numa porta USB do seu computador." + "message": "Ligue a YubiKey à porta USB do seu computador." }, "twoFactorYubikeySelectKey": { "message": "Selecione o primeiro campo de entrada YubiKey vazio abaixo." @@ -1513,13 +1513,13 @@ "message": "Guarde o formulário." }, "twoFactorYubikeyWarning": { - "message": "Devido a limitações da plataforma, as YubiKeys não podem ser utilizadas em todas as aplicações Bitwarden. Deverá escolher outro método de início de sessão em dois passos quando as YubiKeys não puderem ser utilizadas. Plataformas suportadas:" + "message": "Devido a limitações da plataforma, as YubiKeys não podem ser utilizadas em todas as aplicações Bitwarden. Deverá configurar outro fornecedor de verificação de dois passos para que possa aceder à sua conta quando as YubiKeys não puderem ser utilizadas. Plataformas suportadas:" }, "twoFactorYubikeySupportUsb": { - "message": "Cofre web, aplicação para computador, CLI e todas as extensões de navegador num dispositivo com porta USB que pode aceitar a sua YubiKey." + "message": "Cofre web, aplicação para computador, CLI e todas as extensões do navegador num dispositivo com uma porta USB que possa aceitar a sua YubiKey." }, "twoFactorYubikeySupportMobile": { - "message": "Aplicações móveis num dispositivo com capacidades NFC ou porta de dados que possam aceitar a sua YubiKey." + "message": "Aplicações móveis num dispositivo com capacidades NFC ou uma porta de dados que possa aceitar a sua YubiKey." }, "yubikeyX": { "message": "YubiKey $INDEX$", @@ -1531,7 +1531,7 @@ } }, "u2fkeyX": { - "message": "Chave $INDEX$ U2F", + "message": "Chave U2F $INDEX$", "placeholders": { "index": { "content": "$1", @@ -1555,7 +1555,7 @@ "message": "Uma das minhas chaves suporta NFC." }, "twoFactorYubikeySupportsNfcDesc": { - "message": "Se uma das suas YubiKeys suporta NFC (como a YubiKey NEO), irá ser-lhe solicitado num dispositivo móvel sempre que a disponibilidade NFC seja detetada." + "message": "Se uma das suas YubiKeys suportar NFC (como, por exemplo, uma YubiKey NEO), ser-lhe-á solicitado nos dispositivos móveis sempre que for detetada a disponibilidade de NFC." }, "yubikeysUpdated": { "message": "YubiKeys atualizadas" @@ -1564,7 +1564,7 @@ "message": "Desativar todas as chaves" }, "twoFactorDuoDesc": { - "message": "Introduza a informação da aplicação Bitwarden do painel de administrador do seu Duo." + "message": "Introduza as informações da aplicação Bitwarden a partir do painel de administração do seu Duo." }, "twoFactorDuoIntegrationKey": { "message": "Chave de integração" @@ -1576,16 +1576,16 @@ "message": "Servidor API" }, "twoFactorEmailDesc": { - "message": "Siga estes passos para ativar o início de sessão de dois passos com o email:" + "message": "Siga estes passos para ativar a verificação de dois passos com o e-mail:" }, "twoFactorEmailEnterEmail": { - "message": "Introduza o email onde quer receber códigos de confirmação" + "message": "Introduza o e-mail para o qual pretende receber os códigos de verificação" }, "twoFactorEmailEnterCode": { - "message": "Introduza o código de confirmação de 6 dígitos indicado no email" + "message": "Introduza o código de verificação de 6 dígitos recebido por e-mail" }, "sendEmail": { - "message": "Enviar email" + "message": "Enviar e-mail" }, "twoFactorU2fAdd": { "message": "Adicione uma chave de segurança FIDO U2F à sua conta" @@ -1594,13 +1594,13 @@ "message": "Tem a certeza de que pretende remover esta chave de segurança?" }, "twoFactorWebAuthnAdd": { - "message": "Adicione uma chave de segurança FIDO U2F à sua conta" + "message": "Adicione uma chave de segurança WebAuthn à sua conta" }, "readKey": { "message": "Ler chave" }, "keyCompromised": { - "message": "A chave foi comprometida." + "message": "A chave está comprometida." }, "twoFactorU2fGiveName": { "message": "Dê à chave de segurança um nome amigável para a identificar." @@ -1615,31 +1615,31 @@ "message": "Guarde o formulário." }, "twoFactorU2fWarning": { - "message": "Devido a limitações da plataforma, as FIDO U2F não podem ser utilizadas em todas as aplicações Bitwarden. Deve ativar outro provedor de início de sessão de dois passos para que possa aceder à sua conta quando as FIDO U2F não puderem ser utilizadas. Plataformas suportadas:" + "message": "Devido a limitações da plataforma, o FIDO U2F não pode ser utilizado em todas as aplicações Bitwarden. Deve configurar outro fornecedor de verificação de dois passos para poder aceder à sua conta quando o FIDO U2F não puder ser utilizado. Plataformas suportadas:" }, "twoFactorU2fSupportWeb": { - "message": "Cofre web e extensões de navegador num computador/portátil com um navegador com U2F ativado (Chrome, Opera, Vivaldi ou Firefox com FIDO U2F ativado)." + "message": "Cofre web e extensões do navegador num computador de secretária/portátil com um navegador compatível com U2F (Chrome, Opera, Vivaldi ou Firefox com FIDO U2F ativado)." }, "twoFactorU2fWaiting": { "message": "A aguardar que toque no botão da sua chave de segurança" }, "twoFactorU2fClickSave": { - "message": "Clique no botão \"Guardar\" abaixo para ativar esta chave de segurança para o início de sessão em dois passos." + "message": "Clique no botão \"Guardar\" abaixo para ativar esta chave de segurança para a verificação de dois passos." }, "twoFactorU2fProblemReadingTryAgain": { "message": "Ocorreu um problema ao ler a chave de segurança. Tente novamente." }, "twoFactorWebAuthnWarning": { - "message": "Devido as limitações da plataforma, o WebAuthn não pode ser usado em todos os aplicativos do Bitwarden. Deve habilitar outro provedor de login de duas etapas para aceder à sua conta quando a WebAuthn não puder ser usada. Plataformas suportadas:" + "message": "Devido a limitações da plataforma, o WebAuthn não pode ser utilizado em todas as aplicações Bitwarden. Deve configurar outro fornecedor de verificação de dois passos para que possa aceder à sua conta quando o WebAuthn não puder ser utilizado. Plataformas suportadas:" }, "twoFactorWebAuthnSupportWeb": { - "message": "Cofre web e extensões de navegador em um desktop/laptop com um navegador habilitado para WebAuthn (Chrome, Opera, Vivaldi ou Firefox com o FIDO U2F ativado)." + "message": "Cofre web e extensões do navegador num computador de secretária/portátil com um navegador compatível com WebAuthn (Chrome, Opera, Vivaldi ou Firefox com FIDO U2F ativado)." }, "twoFactorRecoveryYourCode": { - "message": "O seu código Bitwarden de recuperação de início de sessão de dois passos" + "message": "O seu código Bitwarden de recuperação da verificação de dois passos" }, "twoFactorRecoveryNoCode": { - "message": "Ainda não ativou qualquer provedor de início de sessão de dois passos. Depois de ativar um provedor de início de sessão de dois passos pode voltar aqui para obter o seu código de recuperação." + "message": "Ainda não configurou nenhum fornecedor de verificação de dois passos. Depois de ter configurado um fornecedor de verificação de dois passos, pode voltar a consultar aqui o seu código de recuperação." }, "printCode": { "message": "Imprimir código", @@ -1649,7 +1649,7 @@ "message": "Relatórios" }, "reportsDesc": { - "message": "Identifique e feche lacunas de segurança nas suas contas online clicando nos relatórios abaixo.", + "message": "Identifique e elimine as lacunas de segurança nas suas contas online clicando nos relatórios abaixo.", "description": "Vault health reports can be used to evaluate the security of your Bitwarden individual or organization vault." }, "orgsReportsDesc": { @@ -1657,16 +1657,16 @@ "description": "Vault health reports can be used to evaluate the security of your Bitwarden individual or organization vault." }, "unsecuredWebsitesReport": { - "message": "Relatório de websites inseguros" + "message": "Sites inseguros" }, "unsecuredWebsitesReportDesc": { - "message": "Utilizar websites inseguros com o esquema http:// pode ser perigoso. Se o website permitir, deve sempre aceder-lo utilizando o esquema https:// para que a sua ligação seja encriptada." + "message": "Os URLs que começam por http:// não utilizam a melhor encriptação disponível. Altere os URIs das credenciais destas contas para https:// para uma navegação mais segura." }, "unsecuredWebsitesFound": { - "message": "Websites inseguros encontrados" + "message": "Sites inseguros encontrados" }, "unsecuredWebsitesFoundDesc": { - "message": "Encontrámos $COUNT$ itens no seu cofre com URIs inseguros. Deve alterar os seus esquemas de URI para https:// se o website permitir.", + "message": "Encontrámos $COUNT$ itens no seu cofre com URIs não seguros. Deve alterar o esquema de URI para https:// se o site o permitir.", "placeholders": { "count": { "content": "$1", @@ -1678,16 +1678,16 @@ "message": "Nenhum item no seu cofre tem URIs inseguros." }, "inactive2faReport": { - "message": "Relatório de 2FA inativo" + "message": "Verificação de dois passos inativa" }, "inactive2faReportDesc": { - "message": "Autenticação de dois fatores (2FA) é uma definição de segurança importante que ajuda a tornar a as suas contas seguras. Se o website a oferece, deve sempre ativar a autenticação de dois fatores." + "message": "A verificação de dois passos adiciona uma camada de proteção às suas contas. Configure a verificação de dois passos utilizando o autenticador Bitwarden para essas contas ou use um método alternativo." }, "inactive2faFound": { - "message": "Credenciais sem 2FA encontradas" + "message": "Credenciais sem verificação de dois passos encontrados" }, "inactive2faFoundDesc": { - "message": "We found $COUNT$ website(s) in your vault that may not be configured with two-step login (according to 2fa.directory). To further protect these accounts, you should set up two-step login.", + "message": "Encontrámos $COUNT$ site(s) no seu cofre que podem não ter a verificação de dois passos configurada (de acordo com 2fa.directory). Para proteger ainda mais essas contas, deve configurar a verificação de dois passos.", "placeholders": { "count": { "content": "$1", @@ -1696,13 +1696,13 @@ } }, "noInactive2fa": { - "message": "Nenhum website foi encontrado no seu cofre com uma configuração de autenticação de dois fatores em falta." + "message": "Não foram encontrados sites no seu cofre com uma configuração de verificação de dois passos em falta." }, "instructions": { "message": "Instruções" }, "exposedPasswordsReport": { - "message": "Relatório de palavras-passe expostas" + "message": "Palavras-passe expostas" }, "exposedPasswordsReportDesc": { "message": "Passwords exposed in a data breach are easy targets for attackers. Change these passwords to prevent potential break-ins." @@ -1711,7 +1711,7 @@ "message": "Palavras-passe expostas encontradas" }, "exposedPasswordsFoundDesc": { - "message": "Encontrámos $COUNT$ itens no seu cofre que têm palavras-passe que foram expostas em brechas de dados conhecidas. Deve alterá-las para utilizar uma nova palavra-passe.", + "message": "Encontrámos $COUNT$ itens no seu cofre que têm palavras-passe que foram expostas em violações de dados conhecidas. Deve alterá-los para utilizar uma nova palavra-passe.", "placeholders": { "count": { "content": "$1", @@ -1720,7 +1720,7 @@ } }, "noExposedPasswords": { - "message": "Nenhum item no seu cofre tem palavras-passe que foram expostas em brechas de dados conhecidas." + "message": "Nenhum item do seu cofre tem palavras-passe que tenham sido expostas em violações de dados conhecidas." }, "checkExposedPasswords": { "message": "Verificar palavras-passe expostas" @@ -1735,16 +1735,16 @@ } }, "weakPasswordsReport": { - "message": "Relatório de palavras-passe fracas" + "message": "Palavras-passe fracas" }, "weakPasswordsReportDesc": { - "message": "As palavras-passe fracas podem ser facilmente adivinhadas por hackers e ferramentas automáticas que são utilizadas para decifrar palavras-passe. O gerador de palavras-passe do Bitwarden pode ajudar-lhe a criar palavras-passe fortes." + "message": "As palavras-passe fracas podem ser facilmente adivinhadas pelos atacantes. Altere estas palavras-passe para palavras-passe fortes utilizando o gerador de palavras-passe." }, "weakPasswordsFound": { "message": "Palavras-passe fracas encontradas" }, "weakPasswordsFoundDesc": { - "message": "Encontrámos $COUNT$ itens no seu cofre com palavras-passe que não são fortes. Deve atualizá-los para utilizar palavras-passe mais fortes.", + "message": "Encontrámos $COUNT$ itens no seu cofre com palavras-passe que não são fortes. Deve atualizá-los para utilizarem palavras-passe mais fortes.", "placeholders": { "count": { "content": "$1", @@ -1753,13 +1753,13 @@ } }, "noWeakPasswords": { - "message": "Nenhum item no seu cofre tem palavras-passe fracas." + "message": "Nenhum item do seu cofre tem palavras-passe fracas." }, "reusedPasswordsReport": { - "message": "Relatório de palavras-passe reutilizadas" + "message": "Palavras-passe reutilizadas" }, "reusedPasswordsReportDesc": { - "message": "Se um serviço foi comprometido, reutilizar a mesma palavras-passe noutro lugar pode permitir ao hackers ganhar acesso facilmente a mais das suas contas online. Deve utilizar uma palavra-passe única para cada conta ou serviço." + "message": "A reutilização de palavras-passe facilita aos atacantes a invasão de várias contas. Altere estas palavras-passe de modo a que cada uma seja única." }, "reusedPasswordsFound": { "message": "Palavras-passe reutilizadas encontradas" @@ -1774,7 +1774,7 @@ } }, "noReusedPasswords": { - "message": "Nenhuma credencial no seu cofre tem palavras-passe que estão a ser reutilizadas." + "message": "Nenhuma credencial no seu cofre tem palavras-passe que estejam a ser reutilizadas." }, "reusedXTimes": { "message": "Reutilizada $COUNT$ vezes", @@ -1786,19 +1786,19 @@ } }, "dataBreachReport": { - "message": "Relatório de brecha de dados" + "message": "Violação de dados" }, "breachDesc": { - "message": "Uma \"brecha\" é um incidente em que os dados de um site foram ilegalmente acedidos e tornados públicos. Verifique o tipo de dados comprometidos (endereços de email, palavras-passe, cartões de crédito etc.) e tome as medidas apropriadas, como mudar as palavras-passe." + "message": "As contas violadas podem expor as suas informações pessoais. Proteja as contas violadas ativando a 2FA ou criando uma palavra-passe mais forte." }, "breachCheckUsernameEmail": { - "message": "Verifique quaisquer nomes de utilizador ou endereços de email que utilize." + "message": "Verifique os nomes de utilizador ou endereços de e-mail que utiliza." }, "checkBreaches": { - "message": "Verificar brechas" + "message": "Verificar violações" }, "breachUsernameNotFound": { - "message": "$USERNAME$ não encontrado em nenhuma brecha de dados conhecida.", + "message": "$USERNAME$ não encontrado em nenhuma violação de dados conhecida.", "placeholders": { "username": { "content": "$1", @@ -1811,7 +1811,7 @@ "description": "ex. Good News, No Breached Accounts Found!" }, "breachUsernameFound": { - "message": "$USERNAME$ foi encontrado em $COUNT$ diferentes brechas de dados online.", + "message": "$USERNAME$ foi encontrado em $COUNT$ diferentes violações de dados online.", "placeholders": { "username": { "content": "$1", @@ -1824,22 +1824,22 @@ } }, "breachFound": { - "message": "Encontradas contas alvo de brecha" + "message": "Contas violadas encontradas" }, "compromisedData": { "message": "Dados comprometidos" }, "website": { - "message": "Website" + "message": "Site" }, "affectedUsers": { "message": "Utilizadores afetados" }, "breachOccurred": { - "message": "Brecha ocorreu" + "message": "Ocorreu uma violação" }, "breachReported": { - "message": "Brecha relatada" + "message": "Violação comunicada" }, "reportError": { "message": "Ocorreu um erro ao tentar carregar o relatório. Tente novamente" @@ -1848,10 +1848,10 @@ "message": "Faturação" }, "billingPlanLabel": { - "message": "Plano de faturamento" + "message": "Plano de faturação" }, "paymentType": { - "message": "Tipo de Pagamento" + "message": "Método de pagamento" }, "accountCredit": { "message": "Crédito da conta", @@ -1870,23 +1870,23 @@ "description": "Dollar amount, or quantity." }, "creditDelayed": { - "message": "O crédito adicionado irá aparecer na sua conta após o pagamento ser totalmente processado. Alguns métodos de pagamento são mais atrasados e podem levar mais tempo a processar do que outros." + "message": "O crédito adicionado aparecerá na sua conta depois de o pagamento ter sido totalmente processado. Alguns métodos de pagamento têm atrasos e podem demorar mais tempo a ser processados do que outros." }, "makeSureEnoughCredit": { - "message": "Por favor certifique-se de que sua conta tem crédito suficiente disponível para esta compra. Se a sua conta não tem crédito suficiente disponível, o seu método de pagamento predefinido guardado irá ser utilizado para a diferença. Pode adicionar crédito à sua conta a partir da página de faturação." + "message": "Por favor, certifique-se de que a sua conta tem crédito suficiente disponível para esta compra. Se a sua conta não tiver crédito suficiente disponível, será utilizado o seu método de pagamento predefinido registado para cobrir a diferença. Pode adicionar crédito à sua conta a partir da página de faturação." }, "creditAppliedDesc": { - "message": "O crédito da sua conta pode ser utilizado para fazer compras. Qualquer crédito disponível irá ser automaticamente aplicado em faturas geradas para esta conta." + "message": "O crédito da sua conta pode ser utilizado para efetuar compras. Qualquer crédito disponível será automaticamente aplicado às faturas geradas para esta conta." }, "goPremium": { "message": "Tornar-se Premium", "description": "Another way of saying \"Get a Premium membership\"" }, "premiumUpdated": { - "message": "Atualizou para Premium." + "message": "Atualizou para o Premium." }, "premiumUpgradeUnlockFeatures": { - "message": "Atualize a sua conta para uma adesão premium e desbloqueie funcionalidades adicionais fantásticas." + "message": "Atualize a sua conta para uma subscrição Premium e desbloqueie algumas funcionalidades adicionais fantásticas." }, "premiumSignUpStorage": { "message": "1 GB de armazenamento encriptado para anexos de ficheiros." @@ -1898,16 +1898,16 @@ "message": "Acesso de emergência" }, "premiumSignUpReports": { - "message": "Higiene de palavras-passe, saúde das contas, e relatórios de brechas de dados para manter o seu cofre seguro." + "message": "Higiene de palavras-passe, saúde da conta e relatórios de violação de dados para manter o seu cofre seguro." }, "premiumSignUpTotp": { - "message": "Gerador de códigos de verificação TOTP (2FA) para aceder ao seu cofre." + "message": "Gerador de códigos de verificação TOTP (2FA) para credenciais no seu cofre." }, "premiumSignUpSupport": { "message": "Prioridade no apoio ao cliente." }, "premiumSignUpFuture": { - "message": "Todas as funcionalidades premium futuras. Mais a chegar brevemente!" + "message": "Todas as futuras funcionalidades Premium. Mais em breve!" }, "premiumPrice": { "message": "Tudo por apenas $PRICE$ /ano!", @@ -1935,13 +1935,13 @@ "message": "Bitwarden Families plan." }, "addons": { - "message": "Extras" + "message": "Addons" }, "premiumAccess": { "message": "Acesso Premium" }, "premiumAccessDesc": { - "message": "Pode adicionar acesso premium a todos os membros da sua organização por $PRICE$ /$INTERVAL$.", + "message": "Pode adicionar acesso Premium a todos os membros da sua organização por $PRICE$ /$INTERVAL$.", "placeholders": { "price": { "content": "$1", @@ -1960,7 +1960,7 @@ "message": "# de GB adicionais" }, "additionalStorageIntervalDesc": { - "message": "O seu plano vem com $SIZE$ de armazenamento encriptado de ficheiros. Pode adicionar armazenamento adicional por $PRICE$ por GB /$INTERVAL$.", + "message": "O seu plano vem com $SIZE$ de armazenamento de ficheiros encriptados. Pode adicionar armazenamento adicional por $PRICE$ por GB /$INTERVAL$.", "placeholders": { "size": { "content": "$1", @@ -2008,22 +2008,22 @@ } }, "paymentChargedWithTrial": { - "message": "O seu plano inclui um teste gratuito de 7 dias. O seu método de pagamento não irá ser cobrado até o período de teste acabar. A faturação irá ocorreu de forma recorrente a cada $INTERVAL$. Pode cancelar a qualquer momento." + "message": "O seu plano inclui um teste gratuito de 7 dias. O seu método de pagamento não será cobrado até ao fim do período de avaliação. Pode cancelar a qualquer momento." }, "paymentInformation": { - "message": "Informação de pagamento" + "message": "Informações de pagamento" }, "billingInformation": { - "message": "Informação de faturação" + "message": "Informações de faturação" }, "billingTrialSubLabel": { - "message": "O seu método de pagamento não será cobrado durante o teste gratuito de 7 dias." + "message": "O seu método de pagamento não será cobrado durante os 7 dias de teste gratuito." }, "creditCard": { "message": "Cartão de crédito" }, "paypalClickSubmit": { - "message": "Clique no botão PayPal para aceder à sua conta PayPal, depois clique no botão Submeter abaixo para continuar." + "message": "Selecione o botão PayPal para iniciar sessão na sua conta PayPal e, em seguida, clique no botão Submeter abaixo para continuar." }, "cancelSubscription": { "message": "Cancelar subscrição" @@ -2038,7 +2038,7 @@ "message": "Cancelamento pendente" }, "subscriptionPendingCanceled": { - "message": "A subscrição foi marcada para cancelamento no fim do atual período de faturação." + "message": "A subscrição foi marcada para cancelamento no final do período de faturação atual." }, "reinstateSubscription": { "message": "Restabelecer subscrição" @@ -2050,10 +2050,10 @@ "message": "A subscrição foi restabelecida." }, "cancelConfirmation": { - "message": "Tem a certeza de que pretende cancelar? Irá perder acesso a todas as funcionalidades desta subscrição no fim deste ciclo de faturação." + "message": "Tem a certeza de que pretende cancelar? Perderá o acesso a todas as funcionalidades desta subscrição no final deste ciclo de faturação." }, "canceledSubscription": { - "message": "A subscrição foi cancelada." + "message": "Subscrição cancelada" }, "neverExpires": { "message": "Nunca expira" @@ -2089,7 +2089,7 @@ "message": "Remover armazenamento" }, "subscriptionStorage": { - "message": "A sua subscrição tem um total de $MAX_STORAGE$ GB de armazenamento de ficheiros encriptado. Está a utilizar atualmente $USED_STORAGE$.", + "message": "A sua subscrição tem um total de $MAX_STORAGE$ GB de armazenamento de ficheiros encriptados. Atualmente, está a utilizar $USED_STORAGE$.", "placeholders": { "max_storage": { "content": "$1", @@ -2139,7 +2139,7 @@ "description": "Noun. A charge from a payment method." }, "refundNoun": { - "message": "Reembolsado", + "message": "Reembolso", "description": "Noun. A refunded payment that was charged." }, "chargesStatement": { @@ -2158,10 +2158,10 @@ "message": "GB de armazenamento a remover" }, "storageAddNote": { - "message": "Adicionar armazenamento irá resultar em ajustamentos aos seus totais a faturar e imediatamente cobrados no seu método de pagamento registado. A primeira cobrança será alocada pelo remanescente do atual ciclo de faturação." + "message": "A adição de armazenamento resultará em ajustes nos totais de faturação e cobrará imediatamente o método de pagamento registado. A primeira cobrança será proporcional ao remanescente do ciclo de faturação atual." }, "storageRemoveNote": { - "message": "Eliminar armazenamento irá resultar em ajustamentos nos totais a faturar que irão ser alocados como créditos na próxima cobrança de faturação." + "message": "Reduzir o armazenamento alterará o total a ser cobrado que será dividido proporcionalmente em créditos na próxima faturação." }, "adjustedStorage": { "message": "Ajustado $AMOUNT$ GB de armazenamento.", @@ -2173,19 +2173,19 @@ } }, "contactSupport": { - "message": "Contacte o apoio ao cliente" + "message": "Contactar o apoio ao cliente" }, "updatedPaymentMethod": { "message": "Método de pagamento atualizado." }, "purchasePremium": { - "message": "Comprar Premium" + "message": "Adquirir Premium" }, "licenseFile": { "message": "Ficheiro de licença" }, "licenseFileDesc": { - "message": "O seu ficheiro de licença irá ser chamado algo como $FILE_NAME$", + "message": "O nome do seu ficheiro de licença será algo como $FILE_NAME$", "placeholders": { "file_name": { "content": "$1", @@ -2194,19 +2194,19 @@ } }, "uploadLicenseFilePremium": { - "message": "Para atualizar a sua conta para uma adesão premium precisa de carregar um ficheiro de licença válido." + "message": "Para atualizar a sua conta para uma subscrição Premium, tem de carregar um ficheiro de licença válido." }, "uploadLicenseFileOrg": { - "message": "Para criar uma organização alojada nas suas premissas precisa de carregar um ficheiro de licença válido." + "message": "Para criar uma organização alojada no local, é necessário carregar um ficheiro de licença válido." }, "accountEmailMustBeVerified": { - "message": "O endereço de email da sua conta precisa de ser verificado." + "message": "O endereço de e-mail da sua conta deve ser verificado." }, "newOrganizationDesc": { - "message": "Organizações permitem-lhe partilhar partes do seu cofre com outros, bem como gerir utilizadores relacionados com uma entidade específica, como uma família, pequena equipa ou grande empresa." + "message": "As organizações permitem-lhe partilhar partes do seu cofre com outras pessoas, bem como gerir utilizadores relacionados para uma entidade específica, como uma família, uma pequena equipa ou uma grande empresa." }, "generalInformation": { - "message": "Informação geral" + "message": "Informações gerais" }, "organizationName": { "message": "Nome da organização" @@ -2215,7 +2215,7 @@ "message": "Esta conta é propriedade de uma empresa." }, "billingEmail": { - "message": "Email de faturação" + "message": "E-mail de faturação" }, "businessName": { "message": "Nome da empresa" @@ -2236,7 +2236,7 @@ "message": "# de lugares de utilizador" }, "userSeatsAdditionalDesc": { - "message": "O seu plano vem com $BASE_SEATS$ lugares de utilizador. Pode adicionar utilizadores adicionais por $SEAT_PRICE$ por utilizador /mês.", + "message": "O seu plano é fornecido com $BASE_SEATS$ lugares de utilizador. Pode adicionar utilizadores adicionais por $SEAT_PRICE$ por utilizador /mês.", "placeholders": { "base_seats": { "content": "$1", @@ -2249,14 +2249,14 @@ } }, "userSeatsHowManyDesc": { - "message": "De quantos lugares de utilizador precisa? Pode também adicionar lugares adicionais mais tarde se necessário." + "message": "De quantos lugares de utilizador precisa? Também pode adicionar lugares adicionais mais tarde, se necessário." }, "planNameFree": { "message": "Gratuito", "description": "Free as in 'free beer'." }, "planDescFree": { - "message": "Para teste ou utilizadores pessoais partilharem com $COUNT$ outro utilizador.", + "message": "Para utilizadores de teste ou pessoais partilharem com $COUNT$ outro(s) utilizador(es).", "placeholders": { "count": { "content": "$1", @@ -2274,7 +2274,7 @@ "message": "Equipas" }, "planDescTeams": { - "message": "Para empresas e outras equipas e organizações." + "message": "Para empresas e outras organizações de equipas." }, "planNameEnterprise": { "message": "Empresarial" @@ -2307,7 +2307,7 @@ } }, "limitedUsers": { - "message": "Limite de $COUNT$ utilizadores (incluindo o próprio)", + "message": "Limitado a $COUNT$ utilizadores (incluindo o próprio)", "placeholders": { "count": { "content": "$1", @@ -2325,7 +2325,7 @@ } }, "addShareLimitedUsers": { - "message": "Adicione e partilhe com até $COUNT$ utilizadores", + "message": "Adicione e partilhe com um máximo de $COUNT$ utilizadores", "placeholders": { "count": { "content": "$1", @@ -2334,13 +2334,13 @@ } }, "addShareUnlimitedUsers": { - "message": "Adicione e partilhe com utilizadores ilimitados" + "message": "Adicione e partilhe com um número ilimitado de utilizadores" }, "createUnlimitedCollections": { - "message": "Crie coleções ilimitadas" + "message": "Criar coleções ilimitadas" }, "gbEncryptedFileStorage": { - "message": "$SIZE$ de armazenamento de ficheiros encriptado", + "message": "$SIZE$ de armazenamento de ficheiros encriptados", "placeholders": { "size": { "content": "$1", @@ -2349,22 +2349,22 @@ } }, "onPremHostingOptional": { - "message": "Alojamento próprio (opcional)" + "message": "Alojamento local (opcional)" }, "usersGetPremium": { - "message": "Os utilizadores obtêm acesso a funcionalidades de adesão premium" + "message": "Os utilizadores obtêm acesso a funcionalidades Premium" }, "controlAccessWithGroups": { - "message": "Controle o acesso de utilizadores com grupos" + "message": "Controlar o acesso dos utilizadores com grupos" }, "syncUsersFromDirectory": { - "message": "Sincronize os seus utilizadores e grupos de um diretório" + "message": "Sincronizar os seus utilizadores e grupos a partir de um diretório" }, "trackAuditLogs": { - "message": "Siga as ações dos utilizadores com registos de auditoria" + "message": "Acompanhe as ações dos utilizadores com registos de auditoria" }, "enforce2faDuo": { - "message": "Impor 2FA com Duo" + "message": "Impor 2FA com a Duo" }, "priorityCustomerSupport": { "message": "Prioridade no apoio ao cliente" @@ -2388,7 +2388,7 @@ } }, "trialPaidInfoMessage": { - "message": "Seu período de teste gratuito de $PLAN$ por 7 dias será convertido em uma assinatura paga após 7 dias.", + "message": "O seu teste gratuito de 7 dias de $PLAN$ será convertido numa subscrição paga após 7 dias.", "placeholders": { "plan": { "content": "$1", @@ -2397,7 +2397,7 @@ } }, "trialConfirmationEmail": { - "message": "Enviámos um email de confirmação para o email de cobrança da sua equipe em " + "message": "Enviámos um e-mail de confirmação para o e-mail de faturação da sua equipa em " }, "monthly": { "message": "Mensalmente" @@ -2418,16 +2418,16 @@ "message": "A sua nova organização está pronta!" }, "organizationUpgraded": { - "message": "A sua organização foi atualizada." + "message": "Organização atualizada" }, "leave": { "message": "Sair" }, "leaveOrganizationConfirmation": { - "message": "Tem a certeza de que pretende sair desta organização?" + "message": "Tem a certeza de que pretende deixar esta organização?" }, "leftOrganization": { - "message": "Saiu da organização." + "message": "Saiu da organização" }, "defaultCollection": { "message": "Coleção predefinida" @@ -2466,10 +2466,10 @@ "message": "Adicionar grupo" }, "editGroup": { - "message": "Alterar grupo" + "message": "Editar grupo" }, "deleteGroupConfirmation": { - "message": "Tem certeza que pretende eliminar este grupo?" + "message": "Tem a certeza de que pretende eliminar este grupo?" }, "deleteMultipleGroupsConfirmation": { "message": "Are you sure you want to delete the following $QUANTITY$ group(s)?", @@ -2484,19 +2484,19 @@ "message": "Tem a certeza de que pretende remover este utilizador?" }, "removeOrgUserConfirmation": { - "message": "Quando um membro é removido, já não terá acesso aos dados da organização, e esta ação é irreversível. Para adicionar o membro de volta à organização, ele deve ser convidado e integrado novamente." + "message": "Quando um membro é removido, deixa de ter acesso aos dados da organização e esta ação é irreversível. Para adicionar o membro de volta à organização, o mesmo deve ser convidado e integrado novamente." }, "revokeUserConfirmation": { - "message": "Quando um membro é revogado, já não terá acesso aos dados da organização. Para restaurar rapidamente o acesso ao membro vá para a aba Revogada." + "message": "Quando um membro é revogado, deixa de ter acesso aos dados da organização. Para restaurar rapidamente o acesso do membro, vá para o separador Revogados." }, "removeUserConfirmationKeyConnector": { "message": "Atenção! Este utilizador necessita do Key Connector para gerir a sua encriptação. Ao remover este utilizador da sua organização desativará permanentemente a sua conta. Esta ação não pode ser desfeita. Deseja prosseguir?" }, "externalId": { - "message": "Id externa" + "message": "ID externa" }, "externalIdDesc": { - "message": "O id externo pode ser utilizado como uma referência ou para ligar este recurso a um sistema externo como um diretório de utilizadores." + "message": "A ID externa é uma referência não encriptada utilizada pelo Bitwarden Directory Connector e pela API." }, "nestCollectionUnder": { "message": "Nest collection under" @@ -2511,7 +2511,7 @@ "message": "Este grupo pode aceder apenas a coleções selecionadas." }, "readOnly": { - "message": "Apenas leitura" + "message": "Só de leitura" }, "newCollection": { "message": "Nova coleção" @@ -2520,7 +2520,7 @@ "message": "Adicionar coleção" }, "editCollection": { - "message": "Alterar coleção" + "message": "Editar coleção" }, "collectionInfo": { "message": "Collection info" @@ -2541,10 +2541,10 @@ } }, "inviteUserDesc": { - "message": "Convide um novo utilizador para a sua organização ao introduzir abaixo o endereço de email da sua conta Bitwarden. Se ainda não tiver uma conta Bitwarden, irá ser-lhe solicitado criar uma nova conta." + "message": "Convide um novo utilizador para a sua organização introduzindo o endereço de e-mail da sua conta Bitwarden abaixo. Se o utilizador ainda não tiver uma conta Bitwarden, ser-lhe-á pedido que crie uma nova conta." }, "inviteMultipleEmailDesc": { - "message": "Pode convidar até $COUNT$ utilizadores de cada vez separando os endereços de email com vírgulas.", + "message": "Introduza até $COUNT$ e-mails, separando-os com uma vírgula.", "placeholders": { "count": { "content": "$1", @@ -2553,7 +2553,7 @@ } }, "userUsingTwoStep": { - "message": "Este utilizador está a utilizar início de sessão de dois passos para proteger a sua conta." + "message": "Este utilizador está a utilizar a verificação de dois passos para proteger a sua conta." }, "userAccessAllItems": { "message": "Este utilizador pode aceder e modificar todos os itens." @@ -2562,7 +2562,7 @@ "message": "Este utilizador pode aceder apenas a coleções selecionadas." }, "search": { - "message": "Pesquisar" + "message": "Procurar" }, "invited": { "message": "Convidado" @@ -2574,34 +2574,34 @@ "message": "Confirmado" }, "clientOwnerEmail": { - "message": "Cliente proprietário do email" + "message": "E-mail do proprietário do cliente" }, "owner": { "message": "Proprietário" }, "ownerDesc": { - "message": "O utilizador com acesso mais elevado que pode gerir todos os aspetos da sua organização." + "message": "Gerir todos os aspetos da sua organização, incluindo a faturação e as subscrições" }, "clientOwnerDesc": { - "message": "Este utilizador deve ser independente do Provedor. Se o Provedor for desassociado da organização, este utilizador manterá a propriedade da organização." + "message": "Este utilizador deve ser independente do fornecedor. Se o fornecedor for desassociado da organização, este utilizador manterá a propriedade da organização." }, "admin": { "message": "Administrador" }, "adminDesc": { - "message": "Os administradores podem aceder e gerir todos os itens, coleções e utilizadores na sua organização." + "message": "Gerir o acesso à organização, todas as coleções, membros, relatórios e definições de segurança" }, "user": { "message": "Utilizador" }, "userDesc": { - "message": "Um utilizador normal com acesso às coleções atribuídas da sua organização." + "message": "Aceder e adicionar itens às coleções atribuídas" }, "manager": { "message": "Gestor" }, "managerDesc": { - "message": "Os gestores podem aceder e gerir coleções atribuídas na sua organização." + "message": "Criar, eliminar e gerir o acesso a coleções atribuídas" }, "all": { "message": "Todos" @@ -2634,37 +2634,37 @@ "description": "Desktop app" }, "webVault": { - "message": "Cofre Web" + "message": "Cofre web" }, "loggedIn": { - "message": "Sessão iniciada." + "message": "Sessão iniciada" }, "changedPassword": { - "message": "Palavra-passe da conta alterada." + "message": "Palavra-passe da conta alterada" }, "enabledUpdated2fa": { "message": "Verificação de dois passos guardada" }, "disabled2fa": { - "message": "Início de sessão de dois passos desativado." + "message": "Verificação de dois passos desativada" }, "recovered2fa": { - "message": "Conta recuperada de início de sessão de dois passos." + "message": "Conta recuperada da verificação de dois passos." }, "failedLogin": { - "message": "Tentativa de início de sessão falhado com palavra-passe incorreta." + "message": "Tentativa de início de sessão falhada com palavra-passe incorreta." }, "failedLogin2fa": { - "message": "Tentativa de início de sessão falhada com inicio de sessão de dois passos incorreto." + "message": "Tentativa de início de sessão falhada com verificação de dois passos incorreta." }, "exportedVault": { - "message": "Cofre exportado." + "message": "Cofre exportado" }, "exportedOrganizationVault": { "message": "Cofre da organização exportado." }, "editedOrgSettings": { - "message": "Definições de organização editadas." + "message": "Definições da organização editadas." }, "createdItemId": { "message": "Item $ID$ criado.", @@ -2715,7 +2715,7 @@ } }, "viewedPasswordItemId": { - "message": "Palavra-passe vista para o item $ID$.", + "message": "Palavra-passe do item $ID$ vista.", "placeholders": { "id": { "content": "$1", @@ -2724,7 +2724,7 @@ } }, "viewedHiddenFieldItemId": { - "message": "Campo oculto visto para o item $ID$.", + "message": "Campo oculto do item $ID$ visto.", "placeholders": { "id": { "content": "$1", @@ -2733,7 +2733,7 @@ } }, "viewedCardNumberItemId": { - "message": "Número do Cartão Visualizado para o item $ID$.", + "message": "Número do cartão do item $ID$ visualizado.", "placeholders": { "id": { "content": "$1", @@ -2742,7 +2742,7 @@ } }, "viewedSecurityCodeItemId": { - "message": "Código de segurança visto para o item $ID$.", + "message": "Código de segurança do item $ID$ visto.", "placeholders": { "id": { "content": "$1", @@ -2769,7 +2769,7 @@ } }, "copiedPasswordItemId": { - "message": "Palavra-passe copiada para o item $ID$.", + "message": "Palavra-passe do item $ID$ copiada.", "placeholders": { "id": { "content": "$1", @@ -2778,7 +2778,7 @@ } }, "copiedHiddenFieldItemId": { - "message": "Campo oculto copiado para o item $ID$.", + "message": "Campo oculto do item $ID$ copiado.", "placeholders": { "id": { "content": "$1", @@ -2787,7 +2787,7 @@ } }, "copiedSecurityCodeItemId": { - "message": "Código de segurança copiado para o item $ID$.", + "message": "Código de segurança do item $ID$ copiado.", "placeholders": { "id": { "content": "$1", @@ -2835,7 +2835,7 @@ } }, "editedPolicyId": { - "message": "Editou a política $ID$.", + "message": "Política $ID$ editada.", "placeholders": { "id": { "content": "$1", @@ -2889,7 +2889,7 @@ } }, "removeUserIdAccess": { - "message": "Remover acesso de $ID$", + "message": "Remover o acesso de $ID$", "placeholders": { "id": { "content": "$1", @@ -2898,7 +2898,7 @@ } }, "revokedUserId": { - "message": "Acesso revogado da organização para $ID$.", + "message": "Acesso à organização revogado para $ID$.", "placeholders": { "id": { "content": "$1", @@ -2907,7 +2907,7 @@ } }, "restoredUserId": { - "message": "Acesso da organização restaurado para $ID$.", + "message": "Acesso à organização restaurado para $ID$.", "placeholders": { "id": { "content": "$1", @@ -2916,7 +2916,7 @@ } }, "revokeUserId": { - "message": "Revogar acesso de $ID$", + "message": "Revogar o acesso de $ID$", "placeholders": { "id": { "content": "$1", @@ -2925,7 +2925,7 @@ } }, "createdAttachmentForItem": { - "message": "Anexo para o item $ID$ criado.", + "message": "Anexo do item $ID$ criado.", "placeholders": { "id": { "content": "$1", @@ -2934,7 +2934,7 @@ } }, "deletedAttachmentForItem": { - "message": "Anexo para o item $ID$ eliminado.", + "message": "Anexo do item $ID$ eliminado.", "placeholders": { "id": { "content": "$1", @@ -2943,7 +2943,7 @@ } }, "editedCollectionsForItem": { - "message": "Coleções para o item $ID$ editadas.", + "message": "Coleções do item $ID$ editadas.", "placeholders": { "id": { "content": "$1", @@ -2979,7 +2979,7 @@ } }, "editedGroupsForUser": { - "message": "Grupos para o utilizador $ID$ editados.", + "message": "Grupos do utilizador $ID$ editados.", "placeholders": { "id": { "content": "$1", @@ -2988,7 +2988,7 @@ } }, "unlinkedSsoUser": { - "message": "SSO desvinculado para o usuário $ID$.", + "message": "SSO desvinculado para o utilizador $ID$.", "placeholders": { "id": { "content": "$1", @@ -2997,7 +2997,7 @@ } }, "createdOrganizationId": { - "message": "$ID$ organização criada.", + "message": "Organização $ID$ criada.", "placeholders": { "id": { "content": "$1", @@ -3006,7 +3006,7 @@ } }, "addedOrganizationId": { - "message": "$ID$ organização adicionada.", + "message": "Organização $ID$ adicionada.", "placeholders": { "id": { "content": "$1", @@ -3015,7 +3015,7 @@ } }, "removedOrganizationId": { - "message": "$ID$ organização removida.", + "message": "Organização $ID$ removida.", "placeholders": { "id": { "content": "$1", @@ -3039,34 +3039,34 @@ "message": "Ver" }, "invalidDateRange": { - "message": "Período de data inválido." + "message": "Intervalo de datas inválido." }, "errorOccurred": { "message": "Ocorreu um erro." }, "userAccess": { - "message": "Acesso de utilizador" + "message": "Acesso do utilizador" }, "userType": { "message": "Tipo de utilizador" }, "groupAccess": { - "message": "Acesso de grupo" + "message": "Acesso do grupo" }, "groupAccessUserDesc": { - "message": "Edite os grupos a que este utilizador pertence." + "message": "Conceda aos membros acesso às coleções, adicionando-os a 1 ou mais grupos." }, "invitedUsers": { - "message": "Utilizador(es) inválido(s)." + "message": "Utilizador(es) convidado(s)" }, "resendInvitation": { "message": "Reenviar convite" }, "resendEmail": { - "message": "Reenviar Email" + "message": "Reenviar e-mail" }, "hasBeenReinvited": { - "message": "$USER$ foi novamente convidado.", + "message": "$USER$ convidado novamente", "placeholders": { "user": { "content": "$1", @@ -3081,7 +3081,7 @@ "message": "Confirmar utilizador" }, "hasBeenConfirmed": { - "message": "$USER$ foi confirmado.", + "message": "$USER$ confirmado.", "placeholders": { "user": { "content": "$1", @@ -3090,10 +3090,10 @@ } }, "confirmUsers": { - "message": "Confirmar utilizadores" + "message": "Confirmar membros" }, "usersNeedConfirmed": { - "message": "Tem utilizadores que aceitaram os seus convites, mas ainda precisam de ser confirmados. Os utilizadores não irão ter acesso à organização até serem confirmados." + "message": "Tem membros que aceitaram o seu convite, mas que ainda precisam de ser confirmados. Os membros não terão acesso à organização até serem confirmados." }, "startDate": { "message": "Data de início" @@ -3102,22 +3102,22 @@ "message": "Data de fim" }, "verifyEmail": { - "message": "Verificar email" + "message": "Verificar e-mail" }, "verifyEmailDesc": { - "message": "Verifique o endereço de email da sua conta para desbloquear o acesso a todas as funcionalidades." + "message": "Verifique o endereço de e-mail da sua conta para desbloquear o acesso a todas as funcionalidades." }, "verifyEmailFirst": { - "message": "O endereço de email da sua conta deve ser verificado primeiro." + "message": "O endereço de e-mail da sua conta deve ser verificado primeiro." }, "checkInboxForVerification": { - "message": "Verifique a caixa de entrada do seu email pela ligação de verificação." + "message": "Verifique a caixa de entrada do seu e-mail para obter uma ligação de verificação." }, "emailVerified": { - "message": "O seu email foi verificado." + "message": "E-mail da conta verificado" }, "emailVerifiedFailed": { - "message": "Não foi possível verificar o seu email. Tente enviar um novo email de verificação." + "message": "Não foi possível verificar o seu e-mail. Tente enviar um novo e-mail de verificação." }, "emailVerificationRequired": { "message": "Verificação de e-mail necessária" @@ -3132,22 +3132,22 @@ "message": "Está a utilizar um navegador web não suportado. O cofre web pode não funcionar corretamente." }, "joinOrganization": { - "message": "Aderir a organização" + "message": "Aderir à organização" }, "joinOrganizationDesc": { - "message": "Foi convidado para se juntar à organização listada acima. Para aceitar o convite, precisa de iniciar sessão ou criar uma nova conta Bitwarden." + "message": "Foi convidado a juntar-se à organização listada acima. Para aceitar o convite, é necessário iniciar sessão ou criar uma nova conta Bitwarden." }, "inviteAccepted": { "message": "Convite aceite" }, "inviteAcceptedDesc": { - "message": "Pode aceder a esta organização quanto um administrador confirmar a sua adesão. Enviaremos um email quando tal acontecer." + "message": "Pode aceder a esta organização quando um administrador confirmar a sua inscrição. Enviar-lhe-emos um e-mail quando tal acontecer." }, "inviteInitAcceptedDesc": { - "message": "Pode agora aceder a esta organização." + "message": "Já pode aceder a esta organização." }, "inviteAcceptFailed": { - "message": "Não foi possível aceitar o convite. Peça a um administrador da organização para enviar novo convite." + "message": "Não foi possível aceitar o convite. Peça a um administrador da organização para enviar um novo convite." }, "inviteAcceptFailedShort": { "message": "Não foi possível aceitar o convite. $DESCRIPTION$", @@ -3162,28 +3162,28 @@ "message": "Memorizar e-mail" }, "recoverAccountTwoStepDesc": { - "message": "Se não conseguir aceder à sua conta através dos seus métodos normais de início de sessão de dois passos, pode utilizar o seu código de recuperação de dois passos para desativar todos os provedores de início de sessão de dois passos da sua conta." + "message": "Se não conseguir aceder à sua conta através dos seus métodos normais de verificação de dois passos, pode utilizar o seu código de recuperação de verificação de dois passos para desativar todos os fornecedores deste método na sua conta." }, "recoverAccountTwoStep": { - "message": "Recuperar início de sessão de dois passos da conta" + "message": "Recuperar a verificação de dois passos da conta" }, "twoStepRecoverDisabled": { - "message": "O início de sessão de dois passos foi desativado na sua conta." + "message": "A verificação de dois passos foi desativada na sua conta." }, "learnMore": { "message": "Saber mais" }, "deleteRecoverDesc": { - "message": "Introduza o seu endereço de email abaixo para recuperar ou eliminar a sua conta." + "message": "Introduza o seu endereço de e-mail abaixo para recuperar e eliminar a sua conta." }, "deleteRecoverEmailSent": { - "message": "Se a sua conta existe, enviámos-lhe um email com mais instruções." + "message": "Se a sua conta existir, enviámos-lhe um e-mail com mais instruções." }, "deleteRecoverConfirmDesc": { "message": "Pediu para eliminar a sua conta Bitwarden. Clique no botão abaixo para confirmar." }, "myOrganization": { - "message": "Minha organização" + "message": "A minha organização" }, "organizationInfo": { "message": "Informações da organização" @@ -3201,7 +3201,7 @@ } }, "deletingOrganizationActiveUserAccountsWarning": { - "message": "As contas de utilizadores permanecerão ativas após a exclusão, mas não estarão mais associadas a essa organização." + "message": "As contas de utilizador permanecerão ativas após a eliminação, mas deixarão de estar associadas a esta organização." }, "deletingOrganizationIsPermanentWarning": { "message": "A eliminação de $ORGANIZATION$ é permanente e irreversível.", @@ -3222,10 +3222,10 @@ "message": "Organização atualizada" }, "taxInformation": { - "message": "Informação fiscal" + "message": "Informações fiscais" }, "taxInformationDesc": { - "message": "Para clientes dentro dos EUA, o código postal é requerido para satisfazer os requisitos fiscais das vendas, para outros países pode, opcionalmente, providenciar um número de identificação fiscal (IVA/GST) e/ou um endereço para aparecer nas suas faturas." + "message": "Para os clientes nos EUA, o código postal é necessário para satisfazer os requisitos do imposto sobre as vendas. Para os outros países, pode fornecer opcionalmente um número de identificação fiscal (IVA/GST) e/ou um endereço para constar nas suas faturas." }, "billingPlan": { "message": "Plano", @@ -3236,7 +3236,7 @@ "description": "A billing plan/package. For example: Families, Teams, Enterprise, etc." }, "changeBillingPlanUpgrade": { - "message": "Atualize a sua conta para outro plano fornecendo as informações abaixo. Por favor certifique-se de que tem um método de pagamento ativo adicionado na conta.", + "message": "Atualize a sua conta para outro plano, fornecendo as informações abaixo. Por favor, certifique-se de que tem um método de pagamento ativo adicionado à conta.", "description": "A billing plan/package. For example: Families, Teams, Enterprise, etc." }, "invoiceNumber": { @@ -3256,25 +3256,25 @@ "message": "Transferir fatura" }, "verifyBankAccount": { - "message": "Confirmar conta bancária" + "message": "Verificar a conta bancária" }, "verifyBankAccountDesc": { - "message": "Fizemos dois micro-depósitos na sua conta bancária (pode demorar 1-2 dias úteis a aparecer). Introduza estas quantias para verificar a conta bancária." + "message": "Efetuámos dois micro-depósitos na sua conta bancária (podem demorar 1-2 dias úteis a aparecer). Introduza estes montantes para verificar a conta bancária." }, "verifyBankAccountInitialDesc": { - "message": "O pagamento via conta bancária apenas está disponível para clientes nos Estados Unidos. Irá ser-lhe requerido verificar a sua conta bancária. Iremos fazer dois micro-depósitos nos próximos 1-2 dias úteis. Introduza estas quantias na página de faturação da organização para verificar a conta bancária." + "message": "O pagamento com uma conta bancária só está disponível para clientes nos Estados Unidos. Ser-lhe-á pedido que verifique a sua conta bancária. Efetuaremos dois micro-depósitos nos próximos 1-2 dias úteis. Introduza estes montantes na página de faturação da organização para verificar a conta bancária." }, "verifyBankAccountFailureWarning": { - "message": "Falha ao verificar a conta bancária irá resultar na falta de um pagamento e a sua subscrição ser desativada." + "message": "Se a conta bancária não for verificada, o pagamento não será efetuado e a subscrição será suspensa." }, "verifiedBankAccount": { - "message": "Conta bancária verificada." + "message": "Conta bancária verificada" }, "bankAccount": { "message": "Conta bancária" }, "amountX": { - "message": "Quantia $COUNT$", + "message": "Montante $COUNT$", "description": "Used in bank account verification of micro-deposits. Amount, as in a currency amount. Ex. Amount 1 is $2.00, Amount 2 is $1.50", "placeholders": { "count": { @@ -3297,23 +3297,23 @@ "message": "Tipo de conta" }, "bankAccountTypeCompany": { - "message": "Empresa (Empresarial)" + "message": "Empresa (empresarial)" }, "bankAccountTypeIndividual": { - "message": "Individual (Pessoal)" + "message": "Individual (pessoal)" }, "enterInstallationId": { - "message": "Introduza o id da sua instalação" + "message": "Introduza o seu ID de instalação" }, "limitSubscriptionDesc": { - "message": "Defina um limite de utilizadores para sua assinatura. Depois que este limite for atingido, não poderá convidar novos utilizadores." + "message": "Defina um limite de lugares para a sua subscrição. Quando este limite for atingido, não será possível convidar novos membros." }, "maxSeatLimit": { - "message": "Limite Máximo de Assentos (opcional)", + "message": "Limite de lugares (opcional)", "description": "Upper limit of seats to allow through autoscaling" }, "maxSeatCost": { - "message": "Custo máximo potencial de utilizadores" + "message": "Custo máximo potencial do lugar" }, "addSeats": { "message": "Adicionar lugares", @@ -3324,10 +3324,10 @@ "description": "Seat = User Seat" }, "subscriptionDesc": { - "message": "Os ajustes à sua assinatura resultarão em alterações repartidas nos totais de faturamento. Se os utilizadores recém-convidados excederem o número de utilizadores na sua assinatura, receberá imediatamente uma cobrança proporcional pelos utilizadores adicionais." + "message": "Os ajustes à sua subscrição resultarão em alterações proporcionais aos seus totais de faturação. Se os novos utilizadores convidados excederem os lugares da sua subscrição, receberá imediatamente uma cobrança proporcional pelos utilizadores adicionais." }, "subscriptionUserSeats": { - "message": "A sua subscrição permite um total de $COUNT$ utilizadores.", + "message": "A sua subscrição permite um total de $COUNT$ membros.", "placeholders": { "count": { "content": "$1", @@ -3336,25 +3336,25 @@ } }, "limitSubscription": { - "message": "Assinatura Limite (Opcional)" + "message": "Limitar a subscrição (opcional)" }, "subscriptionSeats": { - "message": "Assentos de Assinatura" + "message": "Lugares de subscrição" }, "subscriptionUpdated": { - "message": "Assinatura atualizada" + "message": "Subscrição atualizada" }, "additionalOptions": { "message": "Opções adicionais" }, "additionalOptionsDesc": { - "message": "Para ajuda adicional no gerenciamento da sua assinatura, entre em contato com o suporte ao cliente." + "message": "Para obter ajuda adicional na gestão da sua subscrição, contacte o serviço de apoio ao cliente." }, "subscriptionUserSeatsUnlimitedAutoscale": { - "message": "Os ajustes à sua assinatura resultarão em alterações repartidas nos totais de faturamento. Se os utilizadores recém-convidados excederem o número de utilizadores na sua assinatura, receberá imediatamente uma cobrança proporcional pelos utilizadores adicionais." + "message": "Os ajustes à sua subscrição resultarão em alterações proporcionais aos seus totais de faturação. Se os novos membros convidados excederem os lugares da sua subscrição, receberá imediatamente uma cobrança proporcional pelos membros adicionais." }, "subscriptionUserSeatsLimitedAutoscale": { - "message": "Os ajustes à sua assinatura resultarão em alterações repartidas nos totais de faturamento. Se os utilizadores recém-convidados excederem os seus assentos de assinatura, receberá imediatamente uma cobrança proporcional por utilizador adicional até que o seu limite de $MAX$ seja atingido.", + "message": "Os ajustes à sua subscrição resultarão em alterações proporcionais aos seus totais de faturação. Se os novos membros convidados excederem os lugares da sua subscrição, receberá imediatamente uma cobrança proporcional pelos membros adicionais até que o seu limite de $MAX$ lugares seja atingido.", "placeholders": { "max": { "content": "$1", @@ -3399,19 +3399,19 @@ } }, "seatsToAdd": { - "message": "Lugares a adicionar" + "message": "Lugares a acrescentar" }, "seatsToRemove": { "message": "Lugares a remover" }, "seatsAddNote": { - "message": "Adicionar lugares de utilizador irá resultar em ajustamentos aos seus totais a faturar e imediatamente cobrados no seu método de pagamento registado. A primeira cobrança será alocada pelo remanescente do atual ciclo de faturação." + "message": "A adição de lugares de utilizador resultará em ajustes nos totais de faturação e cobrará imediatamente o método de pagamento registado. A primeira cobrança será proporcional ao remanescente do ciclo de faturação atual." }, "seatsRemoveNote": { - "message": "Remover lugares de utilizador irá resultar em ajustamentos nos totais a faturar que irão ser alocados como créditos na próxima cobrança de faturação." + "message": "Reduzir o número de lugares de utilizador alterará o total a ser cobrado que será dividido proporcionalmente em créditos na próxima faturação." }, "adjustedSeats": { - "message": "Ajustado $AMOUNT$ lugares de utilizador.", + "message": "$AMOUNT$ lugares de utilizador ajustados.", "placeholders": { "amount": { "content": "$1", @@ -3432,10 +3432,10 @@ "message": "Está atualmente a utilizar um esquema de encriptação desatualizado." }, "updateEncryptionKeyDesc": { - "message": "Mudámos para chaves de encriptação maiores que providenciam maior segurança e acesso a funcionalidades mais recentes. Atualizar a sua chave de encriptação é rápido e fácil. Apenas escreva abaixo a sua palavra-passe mestra. Esta atualização eventualmente irá tornar-se obrigatória." + "message": "Passámos a utilizar chaves de encriptação maiores que proporcionam uma melhor segurança e acesso a novas funcionalidades. A atualização da sua chave de encriptação é rápida e fácil. Basta introduzir a sua palavra-passe mestra abaixo. Esta atualização acabará por se tornar obrigatória." }, "updateEncryptionKeyWarning": { - "message": "Depois de atualizar a sua chave de encriptação, é-lhe requerido terminar sessão e voltar a iniciá-la em todas as aplicações Bitwarden que esteja a utilizar (tais como a aplicação móvel ou extensões de navegador). Falha ao terminar sessão e voltar a iniciar (que transfere a sua nova chave de encriptação) pode resultar em corrupção de dados. Tentaremos terminar-lhe a sessão automaticamente, todavia, pode demorar." + "message": "Depois de atualizar a sua chave de encriptação, é necessário terminar sessão e voltar a iniciar em todas as aplicações Bitwarden que está a utilizar atualmente (como a aplicação móvel ou as extensões do navegador). A falha em terminar sessão e voltar a iniciar (que descarrega a sua nova chave de encriptação) pode resultar em corrupção de dados. Tentaremos terminar a sua sessão automaticamente, no entanto, pode demorar." }, "updateEncryptionKeyExportWarning": { "message": "Any encrypted exports that you have saved will also become invalid." @@ -3456,10 +3456,10 @@ "message": "Esta funcionalidade não está disponível para organizações gratuitas. Mude para um plano pago para desbloquear mais funcionalidades." }, "createOrganizationStep1": { - "message": "Criar organização: Passo 1" + "message": "Criar organização: 1.º passo" }, "createOrganizationCreatePersonalAccount": { - "message": "Antes de criar a sua organização, primeiro tem de criar uma conta pessoal gratuita." + "message": "Antes de criar a sua organização, tem primeiro de criar uma conta pessoal gratuita." }, "refunded": { "message": "Reembolsado" @@ -3468,7 +3468,7 @@ "message": "Não selecionou nada." }, "acceptPolicies": { - "message": "Ao marcar esta caixa concorda com o seguinte:" + "message": "Ao assinalar esta caixa, concorda com o seguinte:" }, "acceptPoliciesRequired": { "message": "Os Termos de utilização e a Política de privacidade não foram aceites." @@ -3486,7 +3486,7 @@ "message": "Expiração do cofre" }, "vaultTimeoutDesc": { - "message": "Escolha quando o seu cofre irá expirar e realizar a ação selecionada." + "message": "Escolha a que altura expira o seu cofre, realizando a ação de expiração do mesmo." }, "oneMinute": { "message": "1 minuto" @@ -3507,7 +3507,7 @@ "message": "4 horas" }, "onRefresh": { - "message": "Quando reiniciar o navegador" + "message": "Ao atualizar o navegador" }, "dateUpdated": { "message": "Atualizado", @@ -3518,17 +3518,17 @@ "description": "ex. Date this item was created" }, "datePasswordUpdated": { - "message": "Palavra-passe Atualizada", + "message": "Palavra-passe atualizada", "description": "ex. Date this password was updated" }, "organizationIsDisabled": { - "message": "A organização está desativada." + "message": "Organização suspensa" }, "disabledOrganizationFilterError": { - "message": "Itens em Organizações desativadas não podem ser acedidos. Entre em contato com o proprietário da sua Organização para obter assistência." + "message": "Não é possível aceder a itens em organizações suspensas. Contacte o proprietário da organização para obter assistência." }, "licenseIsExpired": { - "message": "A licença está expirada." + "message": "A licença expirou." }, "updatedUsers": { "message": "Utilizadores atualizados" @@ -3562,10 +3562,10 @@ "message": "Palavra-passe mestra fraca" }, "weakMasterPasswordDesc": { - "message": "A palavra-passe mestra que escolheu é fraca. Deve utilizar uma palavra-passe mestra forte (ou uma frase-passe) para proteger adequadamente a sua conta Bitwarden. Tem a certeza de que pretende utilizar esta palavra-passe mestra?" + "message": "Foi identificada uma palavra-passe fraca. Utilize uma palavra-passe forte para proteger a sua conta. Tem a certeza de que pretende utilizar uma palavra-passe fraca?" }, "rotateAccountEncKey": { - "message": "Também rodar a chave de encriptação da minha conta" + "message": "Rodar também a chave de encriptação da minha conta" }, "rotateEncKeyTitle": { "message": "Rodar chave de encriptação" @@ -3577,31 +3577,31 @@ "message": "Este item tem anexos de ficheiros antigos que precisam de ser corrigidos." }, "attachmentFixDesc": { - "message": "Este é um anexo de ficheiro que precisa de ser corrigido. Clique para saber mais." + "message": "Trata-se de um anexo de ficheiro antigos que precisa de ser corrigido. Clique para saber mais." }, "fix": { "message": "Corrigir", "description": "This is a verb. ex. 'Fix The Car'" }, "oldAttachmentsNeedFixDesc": { - "message": "Existem anexos de ficheiros antigos no seu cofre que precisam de ser corrigidos antes de poder rodar a chave de encriptação da sua conta." + "message": "Existem anexos de ficheiros antigos no seu cofre que têm de ser corrigidos antes de poder rodar a chave de encriptação da sua conta." }, "yourAccountsFingerprint": { - "message": "A frase de impressão digital da sua conta", + "message": "Frase da impressão digital da sua conta", "description": "A 'fingerprint phrase' is a unique word phrase (similar to a passphrase) that a user can use to authenticate their public key with another user, for the purposes of sharing." }, "fingerprintEnsureIntegrityVerify": { - "message": "Para assegurar a integridade das suas chaves de encriptação, por favor verifique a frase de impressão digital do utilizador antes de continuar.", + "message": "Para garantir a integridade das suas chaves de encriptação, verifique a frase da impressão digital do utilizador antes de continuar.", "description": "A 'fingerprint phrase' is a unique word phrase (similar to a passphrase) that a user can use to authenticate their public key with another user, for the purposes of sharing." }, "fingerprintMatchInfo": { - "message": "Por favor, certifique-se de que o seu cofre está desbloqueado e a frase de impressão digital corresponde ao outro dispositivo." + "message": "Por favor, certifique-se de que o cofre está desbloqueado e que a frase de impressão digital corresponde à do outro dispositivo." }, "fingerprintPhraseHeader": { - "message": "Frase biométrica" + "message": "Frase de impressão digital" }, "dontAskFingerprintAgain": { - "message": "Não perguntar para verificar frase de impressão digital novamente", + "message": "Nunca solicitar a verificação de frases de impressões digitais para utilizadores convidados (não recomendado)", "description": "A 'fingerprint phrase' is a unique word phrase (similar to a passphrase) that a user can use to authenticate their public key with another user, for the purposes of sharing." }, "free": { @@ -3612,13 +3612,13 @@ "message": "Chave da API" }, "apiKeyDesc": { - "message": "A sua chave da API pode ser utilizada para autenticar na API pública Bitwarden." + "message": "A sua chave da API pode ser utilizada para autenticar a API pública Bitwarden." }, "apiKeyRotateDesc": { - "message": "Rodar a chave da API irá invalidar a chave anterior. Pode rodar a sua chave da API se achar que a chave atual já não é segura para uso." + "message": "A rotação da chave da API invalidará a chave anterior. Pode rodar a sua chave API se considerar que a chave atual já não é segura para utilização." }, "apiKeyWarning": { - "message": "A sua chave da API tem acesso total à organização. Esta deve ser mantida secreta." + "message": "A sua chave API tem acesso total à organização. Deve ser mantida em segredo." }, "userApiKeyDesc": { "message": "Your API key can be used to authenticate in the Bitwarden CLI." @@ -3631,58 +3631,58 @@ "description": "'OAuth 2.0' is a programming protocol. It should probably not be translated." }, "viewApiKey": { - "message": "Ver chave da API" + "message": "Ver a chave da API" }, "rotateApiKey": { - "message": "Rodar chave da API" + "message": "Rodar a chave da API" }, "selectOneCollection": { - "message": "Tem de selecionar pelo menos uma coleção." + "message": "Deve selecionar pelo menos uma coleção." }, "couldNotChargeCardPayInvoice": { - "message": "Não foi possível cobrar o seu cartão. Por favor verifique e efetue o pagamento da fatura por pagar listada abaixo." + "message": "Não foi possível concluir a transação. Por favor, verifique e efetue o pagamento da fatura por pagar indicada abaixo." }, "inAppPurchase": { - "message": "Compra na aplicação" + "message": "Compras na aplicação" }, "cannotPerformInAppPurchase": { - "message": "Não pode realizar esta ação utilizando um método de pagamento dentro da aplicação." + "message": "Não é possível executar esta ação enquanto estiver a utilizar um método de pagamento dentro da aplicação." }, "manageSubscriptionFromStore": { - "message": "Terá de gerir a sua subscrição a partir da loja onde a sua compra na aplicação foi efetuada." + "message": "Deve gerir a sua subscrição a partir da loja onde foi efetuada a compra na aplicação." }, "minLength": { "message": "Comprimento mínimo" }, "clone": { - "message": "Clonar" + "message": "Duplicar" }, "masterPassPolicyTitle": { - "message": "Requisitos de palavra-passe mestra" + "message": "Requisitos da palavra-passe mestra" }, "masterPassPolicyDesc": { - "message": "Defina os requisitos mínimos para a força da palavra-passe mestra." + "message": "Definir requisitos para a força da palavra-passe mestra." }, "twoStepLoginPolicyTitle": { - "message": "Exigir login em duas etapas" + "message": "Exigir verificação de dois passos" }, "twoStepLoginPolicyDesc": { - "message": "Requer que os utilizadores definam a autenticação de dois passos nas suas contas pessoais." + "message": "Exigir que os membros configurem a verificação de dois passos." }, "twoStepLoginPolicyWarning": { - "message": "Os membros da organização que não tenham a autenticação de dois passos ativada para sua conta pessoal, serão removidos da organização e receberão um email notificando-os acerca da alteração." + "message": "Os membros da organização que não sejam proprietários ou administradores e que não tenham configurado a verificação de dois passos para a sua conta serão removidos da organização e receberão um e-mail a notificá-los da alteração." }, "twoStepLoginPolicyUserWarning": { - "message": "É membro de uma organização que requer início de sessão em duas etapas para ser configurada na sua conta de utilizador. Se desligar todos os fornecedores de início de sessão em duas etapas, será automaticamente removido destas organizações." + "message": "É membro de uma organização que exige que a verificação de dois passos seja configurada na sua conta de utilizador. Se desativar todos os fornecedores de verificação de dois passos, será automaticamente removido destas organizações." }, "passwordGeneratorPolicyDesc": { - "message": "Defina os requisitos mínimos para configuração do gerador de palavras-passe." + "message": "Definir requisitos para o gerador de palavras-passe." }, "passwordGeneratorPolicyInEffect": { "message": "Uma ou mais políticas da organização estão a afetar as suas definições do gerador." }, "masterPasswordPolicyInEffect": { - "message": "Uma ou mais políticas da organização requerem que a sua palavra-passe mestra cumpra aos seguintes requisitos:" + "message": "Uma ou mais políticas da organização exigem que a sua palavra-passe mestra cumpra os seguintes requisitos:" }, "policyInEffectMinComplexity": { "message": "Pontuação mínima de complexidade de $SCORE$", @@ -3750,7 +3750,7 @@ "description": "Noun: A special folder for holding deleted items that have not yet been permanently deleted" }, "searchTrash": { - "message": "Pesquisar lixo" + "message": "Procurar no lixo" }, "permanentlyDelete": { "message": "Eliminar permanentemente" @@ -3762,7 +3762,7 @@ "message": "Eliminar item permanentemente" }, "permanentlyDeleteItemConfirmation": { - "message": "Tem a certeza de que pretende eliminar este item permanentemente?" + "message": "Tem a certeza de que pretende eliminar permanentemente este item?" }, "permanentlyDeletedItem": { "message": "Item eliminado permanentemente" @@ -3771,7 +3771,7 @@ "message": "Itens eliminados permanentemente" }, "permanentlyDeleteSelectedItemsDesc": { - "message": "Selecionou $COUNT$ item(s) para eliminar permanentemente. Tem a certeza de que pretende eliminar permanentemente todos estes itens?", + "message": "Selecionou $COUNT$ item(ns) para eliminar permanentemente. Tem a certeza de que pretende eliminar permanentemente todos estes itens?", "placeholders": { "count": { "content": "$1", @@ -3780,7 +3780,7 @@ } }, "permanentlyDeletedItemId": { - "message": "Item $ID$ eliminado permanentemente.", + "message": "Item $ID$ eliminado permanentemente", "placeholders": { "id": { "content": "$1", @@ -3810,7 +3810,7 @@ "message": "Restaurar itens" }, "restoreSelectedItemsDesc": { - "message": "Selecionou $COUNT$ item(s) para restaurar. Tem a certeza de que pretende restaurar todos estes itens?", + "message": "Selecionou $COUNT$ item(ns) para restaurar. Tem a certeza de que pretende restaurar estes itens?", "placeholders": { "count": { "content": "$1", @@ -3819,7 +3819,7 @@ } }, "restoredItemId": { - "message": "Item $ID$ restaurado.", + "message": "Item $ID$ restaurado", "placeholders": { "id": { "content": "$1", @@ -3828,7 +3828,7 @@ } }, "vaultTimeoutLogOutConfirmation": { - "message": "Terminar sessão irá remover todos os acessos ao seu cofre e requer autenticação online após o período de expiração. Tem a certeza de que pretende utilizar esta definição?" + "message": "Ao terminar sessão removerá todo o acesso ao seu cofre e requer autenticação online após o período de tempo limite. Tem a certeza de que pretende utilizar esta definição?" }, "vaultTimeoutLogOutConfirmationTitle": { "message": "Confirmação de expiração do cofre" @@ -3837,7 +3837,7 @@ "message": "Ocultar palavras-passe" }, "countryPostalCodeRequiredDesc": { - "message": "Requeremos esta informação para calcular imposto sobre vendas e relatórios financeiros apenas." + "message": "Estas informações são necessárias apenas para o cálculo do imposto sobre as vendas e para a elaboração de relatórios financeiros." }, "includeVAT": { "message": "Incluir informações de IVA/GST (opcional)" @@ -3861,10 +3861,10 @@ "message": "Identificador da organização" }, "ssoLogInWithOrgIdentifier": { - "message": "Inicie sessão utilizando o portal de início de sessão único da sua organização. Por favor introduza o identificador da sua organização para começar." + "message": "Inicie sessão utilizando o portal de início de sessão único da sua organização. Por favor, introduza o identificador SSO da sua organização para começar." }, "enterpriseSingleSignOn": { - "message": "Início de Sessão Único da Empresa" + "message": "Início de sessão único para empresas" }, "ssoHandOff": { "message": "Pode fechar esta aba e continuar na extensão." @@ -3936,19 +3936,19 @@ "message": "Texto" }, "createSend": { - "message": "Criar Novo Envio", + "message": "Novo Send", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "editSend": { - "message": "Editar Envio", + "message": "Editar Send", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "createdSend": { - "message": "Envio criado", + "message": "Send criado", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "editedSend": { - "message": "Envio editado", + "message": "Send editado", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "deletedSend": { @@ -3975,7 +3975,7 @@ "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "expirationDate": { - "message": "Data de Expiração" + "message": "Data de validade" }, "expirationDateDesc": { "message": "Se definido, o acesso a este Send expirará na data e hora especificadas.", @@ -4000,27 +4000,27 @@ "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "disabled": { - "message": "Desabilitado" + "message": "Desativado" }, "revoked": { "message": "Revogado" }, "sendLink": { - "message": "Enviar ligação", + "message": "Link do Send", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "copySendLink": { - "message": "Copiar Link de Envio", + "message": "Copiar link do Send", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "removePassword": { "message": "Remover palavra-passe" }, "removedPassword": { - "message": "Senha removida" + "message": "Palavra-passe removida" }, "removePasswordConfirmation": { - "message": "Tem a certeza que pretende remover a senha?" + "message": "Tem a certeza de que pretende remover a palavras-passe?" }, "hideEmail": { "message": "Ocultar o meu endereço de e-mail dos destinatários." @@ -4030,7 +4030,7 @@ "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "allSends": { - "message": "Todos os Envios" + "message": "Todos os Sends" }, "maxAccessCountReached": { "message": "Número de acessos máximo atingido", @@ -4043,7 +4043,7 @@ "message": "Expirado" }, "searchSends": { - "message": "Pesquisar Envios", + "message": "Procurar Sends", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "sendProtectedPassword": { @@ -4059,7 +4059,7 @@ "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "downloadFile": { - "message": "Descarregar Ficheiro" + "message": "Transferir ficheiro" }, "sendAccessUnavailable": { "message": "O Envio que está tentando aceder não existe ou não está mais disponível.", @@ -4083,25 +4083,25 @@ "message": "You are an owner of one or more organizations. If you give takeover access to an emergency contact, they will be able to use all your permissions as owner after a takeover." }, "trustedEmergencyContacts": { - "message": "Contatos de emergência confiáveis" + "message": "Contactos de emergência de confiança" }, "noTrustedContacts": { "message": "You have not added any emergency contacts yet, invite a trusted contact to get started." }, "addEmergencyContact": { - "message": "Adicione um contacto de emergência" + "message": "Adicionar contacto de emergência" }, "designatedEmergencyContacts": { - "message": "Designado como contato de emergência" + "message": "Designado como contacto de emergência" }, "noGrantedAccess": { "message": "You have not been designated as an emergency contact for anyone yet." }, "inviteEmergencyContact": { - "message": "Convidar contato de emergência" + "message": "Convidar contacto de emergência" }, "editEmergencyContact": { - "message": "Editar contato de emergência" + "message": "Editar contacto de emergência" }, "inviteEmergencyContactDesc": { "message": "Invite a new emergency contact by entering their Bitwarden account email address below. If they do not have a Bitwarden account already, they will be prompted to create a new account." @@ -4289,7 +4289,7 @@ "message": "Grant customized permissions to members" }, "customDescNonEnterpriseStart": { - "message": "Os papéis personalizados são uma ", + "message": "As funções personalizadas são uma ", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Custom roles is an enterprise feature. Contact our support team to upgrade your subscription'" }, "customDescNonEnterpriseLink": { @@ -4825,13 +4825,13 @@ "message": "Atualizar palavra-passe mestra" }, "updateMasterPasswordWarning": { - "message": "A sua palavra-passe mestra foi recentemente alterada por um administrador da sua organização. Para aceder ao cofre, tem de atualizar a sua palavra-passe mestra agora. Se prosseguir, sairá da sua sessão atual e terá de iniciar sessão novamente. As sessões ativas noutros dispositivos poderão continuar ativas até uma hora." + "message": "A sua palavra-passe mestra foi recentemente alterada por um administrador da sua organização. Para aceder ao cofre, tem de atualizar a sua palavra-passe mestra agora. Ao prosseguir, terminará a sua sessão atual e terá de iniciar sessão novamente. As sessões ativas noutros dispositivos poderão continuar ativas até uma hora." }, "masterPasswordInvalidWarning": { - "message": "A sua palavra-passe mestra não cumpre os requisitos da política desta organização. Para se juntar à organização, tem de atualizar a sua palavra-passe mestra agora. Se prosseguir, sairá da sua sessão atual e terá de voltar a iniciar sessão. As sessões ativas noutros dispositivos poderão continuar ativas até uma hora." + "message": "A sua palavra-passe mestra não cumpre os requisitos da política desta organização. Para se juntar à organização, tem de atualizar a sua palavra-passe mestra agora. Ao prosseguir, terminará a sua sessão atual e terá de voltar a iniciar sessão. As sessões ativas noutros dispositivos poderão continuar ativas até uma hora." }, "updateWeakMasterPasswordWarning": { - "message": "A sua palavra-passe mestra não cumpre uma ou mais políticas da sua organização. Para aceder ao cofre, tem de atualizar a sua palavra-passe mestra agora. Se prosseguir, sairá da sua sessão atual e terá de iniciar sessão novamente. As sessões ativas noutros dispositivos poderão continuar ativas até uma hora." + "message": "A sua palavra-passe mestra não cumpre uma ou mais políticas da sua organização. Para aceder ao cofre, tem de atualizar a sua palavra-passe mestra agora. Ao prosseguir, terminará a sua sessão atual e terá de iniciar sessão novamente. As sessões ativas noutros dispositivos poderão continuar ativas até uma hora." }, "maximumVaultTimeout": { "message": "Expiração do cofre" @@ -5407,7 +5407,7 @@ "message": "A exportar o cofre pessoal" }, "exportingOrganizationVaultTitle": { - "message": "A exportar cofre da organização" + "message": "A exportar o cofre da organização" }, "exportingPersonalVaultDescription": { "message": "Apenas os itens do cofre pessoal associado a $EMAIL$ serão exportados. Os itens do cofre da organização não serão incluídos.", @@ -5584,7 +5584,7 @@ "message": "Verificação do dispositivo atualizada" }, "areYouSureYouWantToEnableDeviceVerificationTheVerificationCodeEmailsWillArriveAtX": { - "message": "Tem a certeza de que deseja ativar a Verificação do Dispositivo? Os e-mails com os códigos de verificação serão enviados para: $EMAIL$", + "message": "Tem a certeza de que pretende ativar a verificação do dispositivo? Os e-mails com o código de verificação serão enviados para: $EMAIL$", "placeholders": { "email": { "content": "$1", @@ -5650,7 +5650,7 @@ "description": "the text, 'SCIM', is an acronymn and should not be translated." }, "inputRequired": { - "message": "Entrada necessária." + "message": "Campo necessário." }, "inputEmail": { "message": "A entrada não é um endereço de e-mail." @@ -6607,7 +6607,7 @@ "message": "Update your encryption settings to meet new security recommendations and improve account protection." }, "changeKdfLoggedOutWarning": { - "message": "Proceeding will log you out of all active sessions. You will need to log back in and complete two-step login setup. We recommend exporting your vault before changing your encryption settings to prevent data loss." + "message": "Ao prosseguir, terminará todas as sessões ativas. Terá de iniciar sessão novamente e concluir a configuração da verificação de dois passos. Recomendamos que exporte o seu cofre antes de alterar as definições de encriptação para evitar a perda de dados." }, "secretsManagerBeta": { "message": "Secrets Manager Beta" @@ -6776,7 +6776,7 @@ } }, "inputTrimValidator": { - "message": "A entrada não deve conter apenas espaços em branco.", + "message": "O campo não deve conter apenas espaços em branco.", "description": "Notification to inform the user that a form's input can't contain only whitespace." }, "dismiss": { @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "com inscrição automática será ativada quando esta opção for utilizada.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ não encontrado(a)", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recuperar conta" diff --git a/apps/web/src/locales/ro/messages.json b/apps/web/src/locales/ro/messages.json index ac98ed7c69c..1da751ac934 100644 --- a/apps/web/src/locales/ro/messages.json +++ b/apps/web/src/locales/ro/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/ru/messages.json b/apps/web/src/locales/ru/messages.json index 5a75badfddf..ca7cf0c6e8e 100644 --- a/apps/web/src/locales/ru/messages.json +++ b/apps/web/src/locales/ru/messages.json @@ -4493,22 +4493,22 @@ "message": "Подсказка для пароля не может совпадать с паролем." }, "enrollAccountRecovery": { - "message": "Enroll in account recovery" + "message": "Зарегистрироваться на восстановление аккаунта" }, "enrolledAccountRecovery": { - "message": "Enrolled in account recovery" + "message": "Зарегистрирован на восстановление аккаунта" }, "withdrawAccountRecovery": { - "message": "Withdraw from account recovery" + "message": "Сняться с восстановления аккаунта" }, "enrollPasswordResetSuccess": { - "message": "Записано успешно!" + "message": "Регистрация успешна!" }, "withdrawPasswordResetSuccess": { "message": "Запись успешно отменена!" }, "eventEnrollAccountRecovery": { - "message": "User $ID$ enrolled in account recovery.", + "message": "Пользователь $ID$ зарегистрирован на восстановление аккаунта.", "placeholders": { "id": { "content": "$1", @@ -4517,7 +4517,7 @@ } }, "eventWithdrawAccountRecovery": { - "message": "User $ID$ withdrew from account recovery.", + "message": "Пользователь $ID$ снялся с восстановления аккаунта.", "placeholders": { "id": { "content": "$1", @@ -4577,10 +4577,10 @@ "message": "Регистрация позволит администраторам организации изменять ваш мастер-пароль" }, "accountRecoveryPolicy": { - "message": "Account recovery administration" + "message": "Управление восстановлением аккаунта" }, "accountRecoveryPolicyDescription": { - "message": "Recover member accounts when master password or trusted devices are forgotten or lost. The recovery processes is based on the account encryption method." + "message": "Восстановление аккаунтов пользователей при утере мастер-пароля или доверенных устройств. Восстановление осуществляется на основе метода шифрования аккаунта." }, "resetPasswordPolicyWarning": { "message": "Пользователи организации должны зарегистрироваться самостоятельно или быть зарегистрированными автоматически, чтобы администраторы могли сбросить их мастер-пароль." @@ -6776,7 +6776,7 @@ } }, "inputTrimValidator": { - "message": "Input must not contain only whitespace.", + "message": "Введенные данные не должны содержать только пробелы.", "description": "Notification to inform the user that a form's input can't contain only whitespace." }, "dismiss": { @@ -6818,21 +6818,30 @@ "message": "Шифрование доверенного устройства" }, "memberDecryptionTdeDescriptionStart": { - "message": "Once authenticated, members will decrypt vault data using a key stored on their device. The", + "message": "После аутентификации участники расшифровывают данные хранилища с помощью ключа, хранящегося на их устройстве.", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" }, "memberDecryptionTdeDescriptionLink": { - "message": "account recovery administration policy", + "message": "Политика администрирования восстановления аккаунтов", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" }, "memberDecryptionTdeDescriptionEnd": { - "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "message": "с автоматической регистрацией включается при использовании этой опции.", + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ не найден", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { - "message": "Recover account" + "message": "Восстановить аккаунт" }, "updatedTempPassword": { - "message": "User updated a password issued through account recovery." + "message": "Пользователь обновил пароль, выданный через восстановление аккаунта." } } diff --git a/apps/web/src/locales/si/messages.json b/apps/web/src/locales/si/messages.json index 15d32a60d9a..850022fd11b 100644 --- a/apps/web/src/locales/si/messages.json +++ b/apps/web/src/locales/si/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/sk/messages.json b/apps/web/src/locales/sk/messages.json index 69679f93212..00721d3762b 100644 --- a/apps/web/src/locales/sk/messages.json +++ b/apps/web/src/locales/sk/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ nenájdené", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Obnoviť účet" diff --git a/apps/web/src/locales/sl/messages.json b/apps/web/src/locales/sl/messages.json index 62b877e56f8..fcae99eb925 100644 --- a/apps/web/src/locales/sl/messages.json +++ b/apps/web/src/locales/sl/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/sr/messages.json b/apps/web/src/locales/sr/messages.json index f516da4463a..5ed3c6b1288 100644 --- a/apps/web/src/locales/sr/messages.json +++ b/apps/web/src/locales/sr/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/sr_CS/messages.json b/apps/web/src/locales/sr_CS/messages.json index 68ddac883a9..b55d9d59a8f 100644 --- a/apps/web/src/locales/sr_CS/messages.json +++ b/apps/web/src/locales/sr_CS/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/sv/messages.json b/apps/web/src/locales/sv/messages.json index ff2966844d0..fadf4585a5a 100644 --- a/apps/web/src/locales/sv/messages.json +++ b/apps/web/src/locales/sv/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/te/messages.json b/apps/web/src/locales/te/messages.json index dd62b4d4a3b..7595e610b1a 100644 --- a/apps/web/src/locales/te/messages.json +++ b/apps/web/src/locales/te/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/th/messages.json b/apps/web/src/locales/th/messages.json index 78d9c537809..4d2c52f734e 100644 --- a/apps/web/src/locales/th/messages.json +++ b/apps/web/src/locales/th/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/tr/messages.json b/apps/web/src/locales/tr/messages.json index 03159797e9a..10ec65016af 100644 --- a/apps/web/src/locales/tr/messages.json +++ b/apps/web/src/locales/tr/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "otomatik kayıtla birlikte açılacaktır.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ bulunamadı", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Hesabı kurtar" diff --git a/apps/web/src/locales/uk/messages.json b/apps/web/src/locales/uk/messages.json index 7cbe9b7bdcd..ace0b4878d7 100644 --- a/apps/web/src/locales/uk/messages.json +++ b/apps/web/src/locales/uk/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "з автоматичним розгортанням активується, якщо використовується ця опція.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Відновити обліковий запис" diff --git a/apps/web/src/locales/vi/messages.json b/apps/web/src/locales/vi/messages.json index 0d3611f06ba..7812b80ca9c 100644 --- a/apps/web/src/locales/vi/messages.json +++ b/apps/web/src/locales/vi/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" diff --git a/apps/web/src/locales/zh_CN/messages.json b/apps/web/src/locales/zh_CN/messages.json index 127ade016ef..e0983a1cdaf 100644 --- a/apps/web/src/locales/zh_CN/messages.json +++ b/apps/web/src/locales/zh_CN/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ 未找到", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "恢复账户" diff --git a/apps/web/src/locales/zh_TW/messages.json b/apps/web/src/locales/zh_TW/messages.json index 9e5951db064..00831af414d 100644 --- a/apps/web/src/locales/zh_TW/messages.json +++ b/apps/web/src/locales/zh_TW/messages.json @@ -6827,7 +6827,16 @@ }, "memberDecryptionTdeDescriptionEnd": { "message": "with automatic enrollment will turn on when this option is used.", - "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The account recovery administration policy with automatic enrollment will turn on when this option is used.'" + "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'" + }, + "notFound": { + "message": "$RESOURCE$ not found", + "placeholders": { + "resource": { + "content": "$1", + "example": "Service Account" + } + } }, "recoverAccount": { "message": "Recover account" From ba5e890e86e1edda1600ee5231f1e60547f3255d Mon Sep 17 00:00:00 2001 From: Daniel James Smith Date: Fri, 9 Jun 2023 09:50:42 +0200 Subject: [PATCH 08/22] Convert import select to the searchable CL select (#5573) --- .../tools/import-export/import.component.html | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/apps/web/src/app/tools/import-export/import.component.html b/apps/web/src/app/tools/import-export/import.component.html index 8911a63306f..447d52fefa7 100644 --- a/apps/web/src/app/tools/import-export/import.component.html +++ b/apps/web/src/app/tools/import-export/import.component.html @@ -5,27 +5,23 @@ {{ "personalOwnershipPolicyInEffectImports" | i18n }}
-
-
-
- - -
-
-
+ + 1. {{ "selectFormat" | i18n }} + + + + + + + + See detailed instructions on our help site at From d18b45a87ea07fc1daed74d3c54c3767fadc8746 Mon Sep 17 00:00:00 2001 From: titanism <101466223+titanism@users.noreply.github.com> Date: Fri, 9 Jun 2023 02:55:12 -0500 Subject: [PATCH 09/22] [PM-1060] Added new forwarder (Forward Email ) (#4809) * Added new forwarder (Forward Email ) * fix: fixed Basic authorization header * fix: fixed returned email value * feat: added verbose message for end-users (e.g. "Not Found" vs. "Domain does not exist on your account." (automatically localized with i18n for user) * fix: fixed Buffer.from to Utils.fromBufferToB64 * fix: fixed fromBufferToB64 to fromUtf8ToB64 * Remove try-catch to properly display api errors --------- Co-authored-by: Daniel James Smith --- .../popup/generator/generator.component.html | 22 +++++++++ .../src/app/tools/generator.component.html | 22 +++++++++ .../src/app/tools/generator.component.html | 22 +++++++++ apps/web/webpack.config.js | 1 + .../components/generator.component.ts | 1 + .../forward-email-forwarder.ts | 49 +++++++++++++++++++ .../email-forwarders/forwarder-options.ts | 5 ++ .../username/email-forwarders/index.ts | 1 + .../username/username-generation.service.ts | 6 +++ 9 files changed, 129 insertions(+) create mode 100644 libs/common/src/tools/generator/username/email-forwarders/forward-email-forwarder.ts diff --git a/apps/browser/src/tools/popup/generator/generator.component.html b/apps/browser/src/tools/popup/generator/generator.component.html index 3b07c3b2cea..83b2c6dee78 100644 --- a/apps/browser/src/tools/popup/generator/generator.component.html +++ b/apps/browser/src/tools/popup/generator/generator.component.html @@ -405,6 +405,28 @@ /> + +
+ + +
+
+ + +
+
diff --git a/apps/desktop/src/app/tools/generator.component.html b/apps/desktop/src/app/tools/generator.component.html index 423b47b3f75..adbe6df3120 100644 --- a/apps/desktop/src/app/tools/generator.component.html +++ b/apps/desktop/src/app/tools/generator.component.html @@ -432,6 +432,28 @@ />
+ +
+ + +
+
+ + +
+
diff --git a/apps/web/src/app/tools/generator.component.html b/apps/web/src/app/tools/generator.component.html index 369812bc979..e2da0333e43 100644 --- a/apps/web/src/app/tools/generator.component.html +++ b/apps/web/src/app/tools/generator.component.html @@ -343,6 +343,28 @@ />
+
+
+ + +
+
+ + +
+
diff --git a/apps/web/webpack.config.js b/apps/web/webpack.config.js index 54899dca7b1..0651603d56e 100644 --- a/apps/web/webpack.config.js +++ b/apps/web/webpack.config.js @@ -280,6 +280,7 @@ const devServer = https://quack.duckduckgo.com/api/email/addresses https://app.anonaddy.com/api/v1/aliases https://api.fastmail.com + https://api.forwardemail.net http://localhost:5000 ;object-src 'self' diff --git a/libs/angular/src/tools/generator/components/generator.component.ts b/libs/angular/src/tools/generator/components/generator.component.ts index af88ae24759..9ef73186583 100644 --- a/libs/angular/src/tools/generator/components/generator.component.ts +++ b/libs/angular/src/tools/generator/components/generator.component.ts @@ -242,6 +242,7 @@ export class GeneratorComponent implements OnInit { { name: "Fastmail", value: "fastmail", validForSelfHosted: true }, { name: "Firefox Relay", value: "firefoxrelay", validForSelfHosted: false }, { name: "SimpleLogin", value: "simplelogin", validForSelfHosted: true }, + { name: "Forward Email", value: "forwardemail", validForSelfHosted: true }, ]; this.usernameOptions = await this.usernameGenerationService.getOptions(); diff --git a/libs/common/src/tools/generator/username/email-forwarders/forward-email-forwarder.ts b/libs/common/src/tools/generator/username/email-forwarders/forward-email-forwarder.ts new file mode 100644 index 00000000000..a1b525f8f46 --- /dev/null +++ b/libs/common/src/tools/generator/username/email-forwarders/forward-email-forwarder.ts @@ -0,0 +1,49 @@ +import { ApiService } from "../../../../abstractions/api.service"; +import { Utils } from "../../../../misc/utils"; + +import { Forwarder } from "./forwarder"; +import { ForwarderOptions } from "./forwarder-options"; + +export class ForwardEmailForwarder implements Forwarder { + async generate(apiService: ApiService, options: ForwarderOptions): Promise { + if (options.apiKey == null || options.apiKey === "") { + throw "Invalid Forward Email API key."; + } + if (options.forwardemail?.domain == null || options.forwardemail.domain === "") { + throw "Invalid Forward Email domain."; + } + const requestInit: RequestInit = { + redirect: "manual", + cache: "no-store", + method: "POST", + headers: new Headers({ + Authorization: "Basic " + Utils.fromUtf8ToB64(options.apiKey + ":"), + "Content-Type": "application/json", + }), + }; + const url = `https://api.forwardemail.net/v1/domains/${options.forwardemail.domain}/aliases`; + requestInit.body = JSON.stringify({ + labels: options.website, + description: + (options.website != null ? "Website: " + options.website + ". " : "") + + "Generated by Bitwarden.", + }); + const request = new Request(url, requestInit); + const response = await apiService.nativeFetch(request); + if (response.status === 200 || response.status === 201) { + const json = await response.json(); + return json?.name + "@" + (json?.domain?.name || options.forwardemail.domain); + } + if (response.status === 401) { + throw "Invalid Forward Email API key."; + } + const json = await response.json(); + if (json?.message != null) { + throw "Forward Email error:\n" + json.message; + } + if (json?.error != null) { + throw "Forward Email error:\n" + json.error; + } + throw "Unknown Forward Email error occurred."; + } +} diff --git a/libs/common/src/tools/generator/username/email-forwarders/forwarder-options.ts b/libs/common/src/tools/generator/username/email-forwarders/forwarder-options.ts index ef5311f0d7d..0340eedca8f 100644 --- a/libs/common/src/tools/generator/username/email-forwarders/forwarder-options.ts +++ b/libs/common/src/tools/generator/username/email-forwarders/forwarder-options.ts @@ -3,6 +3,7 @@ export class ForwarderOptions { website: string; fastmail = new FastmailForwarderOptions(); anonaddy = new AnonAddyForwarderOptions(); + forwardemail = new ForwardEmailForwarderOptions(); } export class FastmailForwarderOptions { @@ -12,3 +13,7 @@ export class FastmailForwarderOptions { export class AnonAddyForwarderOptions { domain: string; } + +export class ForwardEmailForwarderOptions { + domain: string; +} diff --git a/libs/common/src/tools/generator/username/email-forwarders/index.ts b/libs/common/src/tools/generator/username/email-forwarders/index.ts index a9a437225ef..d102cc236ee 100644 --- a/libs/common/src/tools/generator/username/email-forwarders/index.ts +++ b/libs/common/src/tools/generator/username/email-forwarders/index.ts @@ -5,3 +5,4 @@ export { FirefoxRelayForwarder } from "./firefox-relay-forwarder"; export { Forwarder } from "./forwarder"; export { ForwarderOptions } from "./forwarder-options"; export { SimpleLoginForwarder } from "./simple-login-forwarder"; +export { ForwardEmailForwarder } from "./forward-email-forwarder"; diff --git a/libs/common/src/tools/generator/username/username-generation.service.ts b/libs/common/src/tools/generator/username/username-generation.service.ts index 6f9af5cb354..3ff9884331d 100644 --- a/libs/common/src/tools/generator/username/username-generation.service.ts +++ b/libs/common/src/tools/generator/username/username-generation.service.ts @@ -8,6 +8,7 @@ import { DuckDuckGoForwarder, FastmailForwarder, FirefoxRelayForwarder, + ForwardEmailForwarder, Forwarder, ForwarderOptions, SimpleLoginForwarder, @@ -22,6 +23,7 @@ const DefaultOptions = { catchallType: "random", forwardedService: "", forwardedAnonAddyDomain: "anonaddy.me", + forwardedForwardEmailDomain: "hideaddress.net", }; export class UsernameGenerationService implements UsernameGenerationServiceAbstraction { @@ -137,6 +139,10 @@ export class UsernameGenerationService implements UsernameGenerationServiceAbstr } else if (o.forwardedService === "duckduckgo") { forwarder = new DuckDuckGoForwarder(); forwarderOptions.apiKey = o.forwardedDuckDuckGoToken; + } else if (o.forwardedService === "forwardemail") { + forwarder = new ForwardEmailForwarder(); + forwarderOptions.apiKey = o.forwardedForwardEmailApiToken; + forwarderOptions.forwardemail.domain = o.forwardedForwardEmailDomain; } if (forwarder == null) { From ab260a3653afd68e617dc625d929756ba4b987c3 Mon Sep 17 00:00:00 2001 From: Daniel James Smith Date: Fri, 9 Jun 2023 11:12:20 +0200 Subject: [PATCH 10/22] Fix broken import of misc/utils (#5586) --- .../username/email-forwarders/forward-email-forwarder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/common/src/tools/generator/username/email-forwarders/forward-email-forwarder.ts b/libs/common/src/tools/generator/username/email-forwarders/forward-email-forwarder.ts index a1b525f8f46..98801c9e3da 100644 --- a/libs/common/src/tools/generator/username/email-forwarders/forward-email-forwarder.ts +++ b/libs/common/src/tools/generator/username/email-forwarders/forward-email-forwarder.ts @@ -1,5 +1,5 @@ import { ApiService } from "../../../../abstractions/api.service"; -import { Utils } from "../../../../misc/utils"; +import { Utils } from "../../../../platform/misc/utils"; import { Forwarder } from "./forwarder"; import { ForwarderOptions } from "./forwarder-options"; From c70d67bad3ccb9048d8dd4b55a56ede5810645d5 Mon Sep 17 00:00:00 2001 From: Thales Augusto Date: Fri, 9 Jun 2023 15:44:33 -0300 Subject: [PATCH 11/22] [PM-1823] Defining the card brand according to its number (#5204) * Defining the card brand according to its number * Moving cardBrandByPatterns function to Card View * Getting Card brand via cardBrandByPatterns function * Changing cardBrandByPatterns method to static. See: The reason being that someone wanting to use this outside of the onCardNumberChange would need to know to set the cc-number on the view-model before calling cardBrandByPatterns * Defining the card brand according to its number on Desktop * Defining the card brand according to its number on Web --- .../components/vault/add-edit.component.html | 1 + .../vault/app/vault/add-edit.component.html | 1 + .../individual-vault/add-edit.component.html | 1 + .../vault/components/add-edit.component.ts | 4 ++ .../common/src/vault/models/view/card.view.ts | 63 +++++++++++++++++++ .../importers/avast/avast-json-importer.ts | 3 +- libs/importer/src/importers/base-importer.ts | 63 ------------------- .../dashlane/dashlane-csv-importer.ts | 2 +- .../dashlane/dashlane-json-importer.ts | 2 +- .../src/importers/encryptr-csv-importer.ts | 2 +- .../importers/enpass/enpass-csv-importer.ts | 2 +- .../importers/enpass/enpass-json-importer.ts | 2 +- .../importers/fsecure/fsecure-fsk-importer.ts | 2 +- .../src/importers/lastpass-csv-importer.ts | 2 +- .../src/importers/myki-csv-importer.ts | 2 +- .../src/importers/nordpass-csv-importer.ts | 3 +- .../onepassword/onepassword-1pif-importer.ts | 2 +- .../onepassword/onepassword-1pux-importer.ts | 2 +- .../onepassword/onepassword-csv-importer.ts | 3 +- .../importers/passwordboss-json-importer.ts | 2 +- .../src/importers/remembear-csv-importer.ts | 2 +- .../src/importers/truekey-csv-importer.ts | 2 +- 22 files changed, 89 insertions(+), 79 deletions(-) diff --git a/apps/browser/src/vault/popup/components/vault/add-edit.component.html b/apps/browser/src/vault/popup/components/vault/add-edit.component.html index 9deda95d365..1373669ca17 100644 --- a/apps/browser/src/vault/popup/components/vault/add-edit.component.html +++ b/apps/browser/src/vault/popup/components/vault/add-edit.component.html @@ -163,6 +163,7 @@ class="monospaced" type="{{ showCardNumber ? 'text' : 'password' }}" name="Card.Number" + (input)="onCardNumberChange()" [(ngModel)]="cipher.card.number" appInputVerbatim [readonly]="!cipher.edit && editMode" diff --git a/apps/desktop/src/vault/app/vault/add-edit.component.html b/apps/desktop/src/vault/app/vault/add-edit.component.html index c8595c816ea..c26078394ad 100644 --- a/apps/desktop/src/vault/app/vault/add-edit.component.html +++ b/apps/desktop/src/vault/app/vault/add-edit.component.html @@ -148,6 +148,7 @@ class="monospaced" type="{{ showCardNumber ? 'text' : 'password' }}" name="Card.Number" + (input)="onCardNumberChange()" [(ngModel)]="cipher.card.number" appInputVerbatim [readonly]="!cipher.edit && editMode" diff --git a/apps/web/src/app/vault/individual-vault/add-edit.component.html b/apps/web/src/app/vault/individual-vault/add-edit.component.html index f551d8e752c..a23332a2f96 100644 --- a/apps/web/src/app/vault/individual-vault/add-edit.component.html +++ b/apps/web/src/app/vault/individual-vault/add-edit.component.html @@ -440,6 +440,7 @@ class="form-control text-monospace" type="{{ showCardNumber ? 'text' : 'password' }}" name="Card.Number" + (input)="onCardNumberChange()" [(ngModel)]="cipher.card.number" appInputVerbatim autocomplete="new-password" diff --git a/libs/angular/src/vault/components/add-edit.component.ts b/libs/angular/src/vault/components/add-edit.component.ts index 19896c20c14..83b8e3e0fda 100644 --- a/libs/angular/src/vault/components/add-edit.component.ts +++ b/libs/angular/src/vault/components/add-edit.component.ts @@ -368,6 +368,10 @@ export class AddEditComponent implements OnInit, OnDestroy { } } + onCardNumberChange(): void { + this.cipher.card.brand = CardView.getCardBrandByPatterns(this.cipher.card.number); + } + getCardExpMonthDisplay() { return this.cardExpMonthOptions.find((x) => x.value == this.cipher.card.expMonth)?.name; } diff --git a/libs/common/src/vault/models/view/card.view.ts b/libs/common/src/vault/models/view/card.view.ts index abeb381a7a6..25c70977076 100644 --- a/libs/common/src/vault/models/view/card.view.ts +++ b/libs/common/src/vault/models/view/card.view.ts @@ -81,4 +81,67 @@ export class CardView extends ItemView { static fromJSON(obj: Partial>): CardView { return Object.assign(new CardView(), obj); } + + // ref https://stackoverflow.com/a/5911300 + static getCardBrandByPatterns(cardNum: string): string { + if (cardNum == null || typeof cardNum !== "string" || cardNum.trim() === "") { + return null; + } + + // Visa + let re = new RegExp("^4"); + if (cardNum.match(re) != null) { + return "Visa"; + } + + // Mastercard + // Updated for Mastercard 2017 BINs expansion + if ( + /^(5[1-5][0-9]{14}|2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12}))$/.test( + cardNum + ) + ) { + return "Mastercard"; + } + + // AMEX + re = new RegExp("^3[47]"); + if (cardNum.match(re) != null) { + return "Amex"; + } + + // Discover + re = new RegExp( + "^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)" + ); + if (cardNum.match(re) != null) { + return "Discover"; + } + + // Diners + re = new RegExp("^36"); + if (cardNum.match(re) != null) { + return "Diners Club"; + } + + // Diners - Carte Blanche + re = new RegExp("^30[0-5]"); + if (cardNum.match(re) != null) { + return "Diners Club"; + } + + // JCB + re = new RegExp("^35(2[89]|[3-8][0-9])"); + if (cardNum.match(re) != null) { + return "JCB"; + } + + // Visa Electron + re = new RegExp("^(4026|417500|4508|4844|491(3|7))"); + if (cardNum.match(re) != null) { + return "Visa"; + } + + return null; + } } diff --git a/libs/importer/src/importers/avast/avast-json-importer.ts b/libs/importer/src/importers/avast/avast-json-importer.ts index 08596032307..92d407e9455 100644 --- a/libs/importer/src/importers/avast/avast-json-importer.ts +++ b/libs/importer/src/importers/avast/avast-json-importer.ts @@ -1,5 +1,6 @@ import { SecureNoteType } from "@bitwarden/common/enums"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; +import { CardView } from "@bitwarden/common/vault/models/view/card.view"; import { ImportResult } from "../../models/import-result"; import { BaseImporter } from "../base-importer"; @@ -48,7 +49,7 @@ export class AvastJsonImporter extends BaseImporter implements Importer { cipher.card.cardholderName = this.getValueOrDefault(value.holderName); cipher.card.number = this.getValueOrDefault(value.cardNumber); cipher.card.code = this.getValueOrDefault(value.cvv); - cipher.card.brand = this.getCardBrand(cipher.card.number); + cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number); if (value.expirationDate != null) { if (value.expirationDate.month != null) { cipher.card.expMonth = value.expirationDate.month + ""; diff --git a/libs/importer/src/importers/base-importer.ts b/libs/importer/src/importers/base-importer.ts index d18f1d49e3c..fed35a391a1 100644 --- a/libs/importer/src/importers/base-importer.ts +++ b/libs/importer/src/importers/base-importer.ts @@ -241,69 +241,6 @@ export abstract class BaseImporter { return str.split(this.newLineRegex); } - // ref https://stackoverflow.com/a/5911300 - protected getCardBrand(cardNum: string) { - if (this.isNullOrWhitespace(cardNum)) { - return null; - } - - // Visa - let re = new RegExp("^4"); - if (cardNum.match(re) != null) { - return "Visa"; - } - - // Mastercard - // Updated for Mastercard 2017 BINs expansion - if ( - /^(5[1-5][0-9]{14}|2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12}))$/.test( - cardNum - ) - ) { - return "Mastercard"; - } - - // AMEX - re = new RegExp("^3[47]"); - if (cardNum.match(re) != null) { - return "Amex"; - } - - // Discover - re = new RegExp( - "^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)" - ); - if (cardNum.match(re) != null) { - return "Discover"; - } - - // Diners - re = new RegExp("^36"); - if (cardNum.match(re) != null) { - return "Diners Club"; - } - - // Diners - Carte Blanche - re = new RegExp("^30[0-5]"); - if (cardNum.match(re) != null) { - return "Diners Club"; - } - - // JCB - re = new RegExp("^35(2[89]|[3-8][0-9])"); - if (cardNum.match(re) != null) { - return "JCB"; - } - - // Visa Electron - re = new RegExp("^(4026|417500|4508|4844|491(3|7))"); - if (cardNum.match(re) != null) { - return "Visa"; - } - - return null; - } - protected setCardExpiration(cipher: CipherView, expiration: string): boolean { if (this.isNullOrWhitespace(expiration)) { return false; diff --git a/libs/importer/src/importers/dashlane/dashlane-csv-importer.ts b/libs/importer/src/importers/dashlane/dashlane-csv-importer.ts index 4a16f9dc997..45aff447e30 100644 --- a/libs/importer/src/importers/dashlane/dashlane-csv-importer.ts +++ b/libs/importer/src/importers/dashlane/dashlane-csv-importer.ts @@ -136,7 +136,7 @@ export class DashlaneCsvImporter extends BaseImporter implements Importer { case "credit_card": cipher.card.cardholderName = row.account_name; cipher.card.number = row.cc_number; - cipher.card.brand = this.getCardBrand(cipher.card.number); + cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number); cipher.card.code = row.code; this.setCardExpiration(cipher, `${row.expiration_month}/${row.expiration_year}`); diff --git a/libs/importer/src/importers/dashlane/dashlane-json-importer.ts b/libs/importer/src/importers/dashlane/dashlane-json-importer.ts index 1037df096b9..2cfb29f21ad 100644 --- a/libs/importer/src/importers/dashlane/dashlane-json-importer.ts +++ b/libs/importer/src/importers/dashlane/dashlane-json-importer.ts @@ -134,7 +134,7 @@ export class DashlaneJsonImporter extends BaseImporter implements Importer { cipher.type = CipherType.Card; cipher.name = this.getValueOrDefault(obj.bank); cipher.card.number = this.getValueOrDefault(obj.cardNumber); - cipher.card.brand = this.getCardBrand(cipher.card.number); + cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number); cipher.card.cardholderName = this.getValueOrDefault(obj.owner); if (!this.isNullOrWhitespace(cipher.card.brand)) { if (this.isNullOrWhitespace(cipher.name)) { diff --git a/libs/importer/src/importers/encryptr-csv-importer.ts b/libs/importer/src/importers/encryptr-csv-importer.ts index 73796cf1e33..a925ad24395 100644 --- a/libs/importer/src/importers/encryptr-csv-importer.ts +++ b/libs/importer/src/importers/encryptr-csv-importer.ts @@ -38,7 +38,7 @@ export class EncryptrCsvImporter extends BaseImporter implements Importer { cipher.card = new CardView(); cipher.card.cardholderName = this.getValueOrDefault(value["Name on card"]); cipher.card.number = this.getValueOrDefault(value["Card Number"]); - cipher.card.brand = this.getCardBrand(cipher.card.number); + cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number); cipher.card.code = this.getValueOrDefault(value.CVV); const expiry = this.getValueOrDefault(value.Expiry); if (!this.isNullOrWhitespace(expiry)) { diff --git a/libs/importer/src/importers/enpass/enpass-csv-importer.ts b/libs/importer/src/importers/enpass/enpass-csv-importer.ts index 26611b182e4..546dd33b222 100644 --- a/libs/importer/src/importers/enpass/enpass-csv-importer.ts +++ b/libs/importer/src/importers/enpass/enpass-csv-importer.ts @@ -90,7 +90,7 @@ export class EnpassCsvImporter extends BaseImporter implements Importer { continue; } else if (fieldNameLower === "number" && this.isNullOrWhitespace(cipher.card.number)) { cipher.card.number = fieldValue; - cipher.card.brand = this.getCardBrand(fieldValue); + cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number); continue; } else if (fieldNameLower === "cvc" && this.isNullOrWhitespace(cipher.card.code)) { cipher.card.code = fieldValue; diff --git a/libs/importer/src/importers/enpass/enpass-json-importer.ts b/libs/importer/src/importers/enpass/enpass-json-importer.ts index 0af291e0ca8..76306721e54 100644 --- a/libs/importer/src/importers/enpass/enpass-json-importer.ts +++ b/libs/importer/src/importers/enpass/enpass-json-importer.ts @@ -126,7 +126,7 @@ export class EnpassJsonImporter extends BaseImporter implements Importer { cipher.card.cardholderName = field.value; } else if (field.type === "ccNumber" && this.isNullOrWhitespace(cipher.card.number)) { cipher.card.number = field.value; - cipher.card.brand = this.getCardBrand(cipher.card.number); + cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number); } else if (field.type === "ccCvc" && this.isNullOrWhitespace(cipher.card.code)) { cipher.card.code = field.value; } else if (field.type === "ccExpiry" && this.isNullOrWhitespace(cipher.card.expYear)) { diff --git a/libs/importer/src/importers/fsecure/fsecure-fsk-importer.ts b/libs/importer/src/importers/fsecure/fsecure-fsk-importer.ts index ba66aa8dad1..db431a64561 100644 --- a/libs/importer/src/importers/fsecure/fsecure-fsk-importer.ts +++ b/libs/importer/src/importers/fsecure/fsecure-fsk-importer.ts @@ -66,7 +66,7 @@ export class FSecureFskImporter extends BaseImporter implements Importer { cipher.card = new CardView(); cipher.card.cardholderName = this.getValueOrDefault(entry.username); cipher.card.number = this.getValueOrDefault(entry.creditNumber); - cipher.card.brand = this.getCardBrand(cipher.card.number); + cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number); cipher.card.code = this.getValueOrDefault(entry.creditCvv); if (!this.isNullOrWhitespace(entry.creditExpiry)) { if (!this.setCardExpiration(cipher, entry.creditExpiry)) { diff --git a/libs/importer/src/importers/lastpass-csv-importer.ts b/libs/importer/src/importers/lastpass-csv-importer.ts index 53d46b831f3..464b1d3429d 100644 --- a/libs/importer/src/importers/lastpass-csv-importer.ts +++ b/libs/importer/src/importers/lastpass-csv-importer.ts @@ -122,7 +122,7 @@ export class LastPassCsvImporter extends BaseImporter implements Importer { card.cardholderName = this.getValueOrDefault(value.ccname); card.number = this.getValueOrDefault(value.ccnum); card.code = this.getValueOrDefault(value.cccsc); - card.brand = this.getCardBrand(value.ccnum); + card.brand = CardView.getCardBrandByPatterns(card.number); if (!this.isNullOrWhitespace(value.ccexp) && value.ccexp.indexOf("-") > -1) { const ccexpParts = (value.ccexp as string).split("-"); diff --git a/libs/importer/src/importers/myki-csv-importer.ts b/libs/importer/src/importers/myki-csv-importer.ts index 1b6fd9afdbc..c75a409376d 100644 --- a/libs/importer/src/importers/myki-csv-importer.ts +++ b/libs/importer/src/importers/myki-csv-importer.ts @@ -72,7 +72,7 @@ export class MykiCsvImporter extends BaseImporter implements Importer { cipher.type = CipherType.Card; cipher.card.cardholderName = this.getValueOrDefault(value.cardName); cipher.card.number = this.getValueOrDefault(value.cardNumber); - cipher.card.brand = this.getCardBrand(cipher.card.number); + cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number); cipher.card.expMonth = this.getValueOrDefault(value.exp_month); cipher.card.expYear = this.getValueOrDefault(value.exp_year); cipher.card.code = this.getValueOrDefault(value.cvv); diff --git a/libs/importer/src/importers/nordpass-csv-importer.ts b/libs/importer/src/importers/nordpass-csv-importer.ts index 7eb445335aa..d17a9fbfdd5 100644 --- a/libs/importer/src/importers/nordpass-csv-importer.ts +++ b/libs/importer/src/importers/nordpass-csv-importer.ts @@ -1,5 +1,6 @@ import { SecureNoteType } from "@bitwarden/common/enums"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; +import { CardView } from "@bitwarden/common/vault/models/view/card.view"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { LoginView } from "@bitwarden/common/vault/models/view/login.view"; @@ -66,7 +67,7 @@ export class NordPassCsvImporter extends BaseImporter implements Importer { cipher.card.cardholderName = this.getValueOrDefault(record.cardholdername); cipher.card.number = this.getValueOrDefault(record.cardnumber); cipher.card.code = this.getValueOrDefault(record.cvc); - cipher.card.brand = this.getCardBrand(cipher.card.number); + cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number); this.setCardExpiration(cipher, record.expirydate); break; diff --git a/libs/importer/src/importers/onepassword/onepassword-1pif-importer.ts b/libs/importer/src/importers/onepassword/onepassword-1pif-importer.ts index 688adf3bd7a..a4f78d203ba 100644 --- a/libs/importer/src/importers/onepassword/onepassword-1pif-importer.ts +++ b/libs/importer/src/importers/onepassword/onepassword-1pif-importer.ts @@ -198,7 +198,7 @@ export class OnePassword1PifImporter extends BaseImporter implements Importer { } else if (cipher.type === CipherType.Card) { if (this.isNullOrWhitespace(cipher.card.number) && fieldDesignation === "ccnum") { cipher.card.number = fieldValue; - cipher.card.brand = this.getCardBrand(fieldValue); + cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number); return; } else if (this.isNullOrWhitespace(cipher.card.code) && fieldDesignation === "cvv") { cipher.card.code = fieldValue; diff --git a/libs/importer/src/importers/onepassword/onepassword-1pux-importer.ts b/libs/importer/src/importers/onepassword/onepassword-1pux-importer.ts index ebf596a72e9..b8329a5d449 100644 --- a/libs/importer/src/importers/onepassword/onepassword-1pux-importer.ts +++ b/libs/importer/src/importers/onepassword/onepassword-1pux-importer.ts @@ -407,7 +407,7 @@ export class OnePassword1PuxImporter extends BaseImporter implements Importer { private fillCreditCard(field: FieldsEntity, fieldValue: string, cipher: CipherView): boolean { if (this.isNullOrWhitespace(cipher.card.number) && field.id === "ccnum") { cipher.card.number = fieldValue; - cipher.card.brand = this.getCardBrand(fieldValue); + cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number); return true; } diff --git a/libs/importer/src/importers/onepassword/onepassword-csv-importer.ts b/libs/importer/src/importers/onepassword/onepassword-csv-importer.ts index f756d619417..3f920a7d4f1 100644 --- a/libs/importer/src/importers/onepassword/onepassword-csv-importer.ts +++ b/libs/importer/src/importers/onepassword/onepassword-csv-importer.ts @@ -1,5 +1,6 @@ import { FieldType } from "@bitwarden/common/enums"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; +import { CardView } from "@bitwarden/common/vault/models/view/card.view"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { ImportResult } from "../../models/import-result"; @@ -295,7 +296,7 @@ export abstract class OnePasswordCsvImporter extends BaseImporter implements Imp context.lowerProperty.includes("number") ) { context.cipher.card.number = context.importRecord[context.property]; - context.cipher.card.brand = this.getCardBrand(context.cipher.card.number); + context.cipher.card.brand = CardView.getCardBrandByPatterns(context.cipher.card.number); return true; } return false; diff --git a/libs/importer/src/importers/passwordboss-json-importer.ts b/libs/importer/src/importers/passwordboss-json-importer.ts index f819408d22b..8c426575068 100644 --- a/libs/importer/src/importers/passwordboss-json-importer.ts +++ b/libs/importer/src/importers/passwordboss-json-importer.ts @@ -75,7 +75,7 @@ export class PasswordBossJsonImporter extends BaseImporter implements Importer { if (cipher.type === CipherType.Card) { if (property === "cardNumber") { cipher.card.number = val; - cipher.card.brand = this.getCardBrand(val); + cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number); continue; } else if (property === "nameOnCard") { cipher.card.cardholderName = val; diff --git a/libs/importer/src/importers/remembear-csv-importer.ts b/libs/importer/src/importers/remembear-csv-importer.ts index 236245f2308..f23271892d4 100644 --- a/libs/importer/src/importers/remembear-csv-importer.ts +++ b/libs/importer/src/importers/remembear-csv-importer.ts @@ -31,7 +31,7 @@ export class RememBearCsvImporter extends BaseImporter implements Importer { cipher.card = new CardView(); cipher.card.cardholderName = this.getValueOrDefault(value.cardholder); cipher.card.number = this.getValueOrDefault(value.number); - cipher.card.brand = this.getCardBrand(cipher.card.number); + cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number); cipher.card.code = this.getValueOrDefault(value.verification); try { diff --git a/libs/importer/src/importers/truekey-csv-importer.ts b/libs/importer/src/importers/truekey-csv-importer.ts index f2352ac3a8b..3d52be1bd85 100644 --- a/libs/importer/src/importers/truekey-csv-importer.ts +++ b/libs/importer/src/importers/truekey-csv-importer.ts @@ -50,7 +50,7 @@ export class TrueKeyCsvImporter extends BaseImporter implements Importer { cipher.card = new CardView(); cipher.card.cardholderName = this.getValueOrDefault(value.cardholder); cipher.card.number = this.getValueOrDefault(value.number); - cipher.card.brand = this.getCardBrand(cipher.card.number); + cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number); if (!this.isNullOrWhitespace(value.expiryDate)) { try { const expDate = new Date(value.expiryDate); From f436e97c293d2315f4026b3d05491c10fdedb865 Mon Sep 17 00:00:00 2001 From: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com> Date: Sat, 10 Jun 2023 20:08:14 -0400 Subject: [PATCH 12/22] New Feature Flag Route Guard introduced in #5465 uses a translation which is missing from Desktop & Browser. Ported over the web translation. (#5588) --- apps/browser/src/_locales/en/messages.json | 3 +++ apps/desktop/src/locales/en/messages.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/apps/browser/src/_locales/en/messages.json b/apps/browser/src/_locales/en/messages.json index 69d26333a84..27c985453e9 100644 --- a/apps/browser/src/_locales/en/messages.json +++ b/apps/browser/src/_locales/en/messages.json @@ -2234,5 +2234,8 @@ "us": { "message": "US", "description": "United States" + }, + "accessDenied": { + "message": "Access denied. You do not have permission to view this page." } } diff --git a/apps/desktop/src/locales/en/messages.json b/apps/desktop/src/locales/en/messages.json index 2e166573fb8..9debdbc13fe 100644 --- a/apps/desktop/src/locales/en/messages.json +++ b/apps/desktop/src/locales/en/messages.json @@ -2265,5 +2265,8 @@ }, "selfHosted": { "message": "Self-hosted" + }, + "accessDenied": { + "message": "Access denied. You do not have permission to view this page." } } From 0ab982038cc62edc8532e19b4b52613078b1327b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rui=20Tom=C3=A9?= <108268980+r-tome@users.noreply.github.com> Date: Mon, 12 Jun 2023 10:56:03 +0100 Subject: [PATCH 13/22] [AC-1088] Truncating collection names on Groups table (#5236) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [AC-1088] Set no-wrap to 'select all' column on groups table * [AC-1088] Using EllipsisPipe on GroupsComponent to truncate group names * [AC-1088] Reverted using no-wrap on column header * [AC-1088] Removed truncateCollectionNames * [AC-1088] Added 'truncate' option to badge and badge-list components * [AC-1088] Truncating collection names on groups component * [AC-1088] Marked EllipsisPipe as deprecated * [AC-1088] Removed EllipsisPipe from GroupsComponent * [AC-1088] Added badge truncate to storybook stories * [AC-1088] Setting badge css requirements for truncate * [AC-1088] Added storybook stories for truncated badges * [AC-1088] Set badges truncate default value to true * [AC-1088] Set badges to use class tw-inline-block and tw-align-text-top * [AC-1088] Set title on each badge list item if truncated * [AC-1088] Set title on badge if truncated * [AC-1088] Removed duplicate truncate on badge-list component * [AC-1088] Swapped setting badge title from ngAfterContentInit to HostBinding * [AC-1088] Configured badge stories to have the truncate option * [AC-1088] Fixed badges tooltip to not include commas added for screen readers on badge lists * [AC-1088] Added lengthy text to single badge on storybook * [AC-1088] In badge-list moved the commas out from the badges * [AC-1088] Removed irrelevant comment and moved the text align class next to other font classes --- libs/angular/src/platform/pipes/ellipsis.pipe.ts | 3 +++ .../src/badge-list/badge-list.component.html | 8 +++++--- .../src/badge-list/badge-list.component.ts | 1 + .../src/badge-list/badge-list.stories.ts | 14 +++++++++++++- libs/components/src/badge/badge.directive.ts | 12 +++++++++--- libs/components/src/badge/badge.stories.ts | 14 +++++++++++--- 6 files changed, 42 insertions(+), 10 deletions(-) diff --git a/libs/angular/src/platform/pipes/ellipsis.pipe.ts b/libs/angular/src/platform/pipes/ellipsis.pipe.ts index 081dba11abe..dd271f94627 100644 --- a/libs/angular/src/platform/pipes/ellipsis.pipe.ts +++ b/libs/angular/src/platform/pipes/ellipsis.pipe.ts @@ -3,6 +3,9 @@ import { Pipe, PipeTransform } from "@angular/core"; @Pipe({ name: "ellipsis", }) +/** + * @deprecated Use the tailwind class 'tw-truncate' instead + */ export class EllipsisPipe implements PipeTransform { transform(value: string, limit = 25, completeWords = false, ellipsis = "...") { if (value.length <= limit) { diff --git a/libs/components/src/badge-list/badge-list.component.html b/libs/components/src/badge-list/badge-list.component.html index cd0310d889c..3e429b94301 100644 --- a/libs/components/src/badge-list/badge-list.component.html +++ b/libs/components/src/badge-list/badge-list.component.html @@ -1,8 +1,10 @@
- - {{ item }} + + + {{ item }} + , - + {{ "plusNMore" | i18n : (items.length - filteredItems.length).toString() }} diff --git a/libs/components/src/badge-list/badge-list.component.ts b/libs/components/src/badge-list/badge-list.component.ts index 09cbfb9d971..64deae21b9f 100644 --- a/libs/components/src/badge-list/badge-list.component.ts +++ b/libs/components/src/badge-list/badge-list.component.ts @@ -14,6 +14,7 @@ export class BadgeListComponent implements OnChanges { @Input() badgeType: BadgeTypes = "primary"; @Input() items: string[] = []; + @Input() truncate = true; @Input() get maxItems(): number | undefined { diff --git a/libs/components/src/badge-list/badge-list.stories.ts b/libs/components/src/badge-list/badge-list.stories.ts index 1c4536c1f99..92e9e148753 100644 --- a/libs/components/src/badge-list/badge-list.stories.ts +++ b/libs/components/src/badge-list/badge-list.stories.ts @@ -29,6 +29,7 @@ export default { ], args: { badgeType: "primary", + truncate: false, }, parameters: { design: { @@ -44,7 +45,7 @@ export const Default: Story = { render: (args) => ({ props: args, template: ` - + `, }), @@ -52,5 +53,16 @@ export const Default: Story = { badgeType: "info", maxItems: 3, items: ["Badge 1", "Badge 2", "Badge 3", "Badge 4", "Badge 5"], + truncate: false, + }, +}; + +export const Truncated: Story = { + ...Default, + args: { + badgeType: "info", + maxItems: 3, + items: ["Badge 1", "Badge 2 containing lengthy text", "Badge 3", "Badge 4", "Badge 5"], + truncate: true, }, }; diff --git a/libs/components/src/badge/badge.directive.ts b/libs/components/src/badge/badge.directive.ts index e8c771c48ca..14dc96edd53 100644 --- a/libs/components/src/badge/badge.directive.ts +++ b/libs/components/src/badge/badge.directive.ts @@ -26,11 +26,12 @@ const hoverStyles: Record = { export class BadgeDirective { @HostBinding("class") get classList() { return [ - "tw-inline", + "tw-inline-block", "tw-py-0.5", "tw-px-1.5", "tw-font-bold", "tw-text-center", + "tw-align-text-top", "!tw-text-contrast", "tw-rounded", "tw-border-none", @@ -44,14 +45,19 @@ export class BadgeDirective { "focus:tw-ring-primary-700", ] .concat(styles[this.badgeType]) - .concat(this.hasHoverEffects ? hoverStyles[this.badgeType] : []); + .concat(this.hasHoverEffects ? hoverStyles[this.badgeType] : []) + .concat(this.truncate ? ["tw-truncate", "tw-max-w-40"] : []); + } + @HostBinding("attr.title") get title() { + return this.truncate ? this.el.nativeElement.textContent.trim() : null; } @Input() badgeType: BadgeTypes = "primary"; + @Input() truncate = true; private hasHoverEffects = false; - constructor(el: ElementRef) { + constructor(private el: ElementRef) { this.hasHoverEffects = el?.nativeElement?.nodeName != "SPAN"; } } diff --git a/libs/components/src/badge/badge.stories.ts b/libs/components/src/badge/badge.stories.ts index 2efe5450d00..5912250e0e1 100644 --- a/libs/components/src/badge/badge.stories.ts +++ b/libs/components/src/badge/badge.stories.ts @@ -14,6 +14,7 @@ export default { ], args: { badgeType: "primary", + truncate: false, }, parameters: { design: { @@ -29,11 +30,11 @@ export const Primary: Story = { render: (args) => ({ props: args, template: ` - Span Badge + Span Badge containing lengthy text

- Link Badge + Link Badge

- Button + Button `, }), }; @@ -72,3 +73,10 @@ export const Info: Story = { badgeType: "info", }, }; + +export const Truncated: Story = { + ...Primary, + args: { + truncate: true, + }, +}; From cd85a4c03903c9e9aa92106d77a847e988a4fd2e Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Mon, 12 Jun 2023 20:59:59 +0200 Subject: [PATCH 14/22] Automatically load SIMD binary for argon2 (#4921) --- apps/desktop/webpack.main.js | 1 + package-lock.json | 211 ++++++++++++++++++++++++++-- package.json | 4 +- patches/argon2-browser+1.18.0.patch | 63 +++++++++ 4 files changed, 264 insertions(+), 15 deletions(-) create mode 100644 patches/argon2-browser+1.18.0.patch diff --git a/apps/desktop/webpack.main.js b/apps/desktop/webpack.main.js index 52240e84e3e..efd1de20d13 100644 --- a/apps/desktop/webpack.main.js +++ b/apps/desktop/webpack.main.js @@ -74,6 +74,7 @@ const main = { { from: "./src/images", to: "images" }, { from: "./src/locales", to: "locales" }, "../../node_modules/argon2-browser/dist/argon2.wasm", + "../../node_modules/argon2-browser/dist/argon2-simd.wasm", ], }), new EnvironmentPlugin({ diff --git a/package-lock.json b/package-lock.json index 51804298106..5a380576c99 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "@bitwarden/clients", "version": "0.0.0", + "hasInstallScript": true, "license": "GPL-3.0", "workspaces": [ "apps/*", @@ -58,6 +59,7 @@ "nord": "0.2.1", "open": "8.4.2", "papaparse": "5.4.1", + "patch-package": "6.5.1", "popper.js": "1.16.1", "proper-lockfile": "4.1.2", "qrious": "4.0.2", @@ -10793,8 +10795,7 @@ "node_modules/@yarnpkg/lockfile": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", - "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", - "dev": true + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==" }, "node_modules/@yarnpkg/parsers": { "version": "2.5.1", @@ -11869,7 +11870,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true, "engines": { "node": ">= 4.0.0" } @@ -12641,7 +12641,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "dependencies": { "fill-range": "^7.0.1" }, @@ -17761,7 +17760,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -17920,6 +17918,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/find-yarn-workspace-root": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", + "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", + "dependencies": { + "micromatch": "^4.0.2" + } + }, "node_modules/findup-sync": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", @@ -21341,7 +21347,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, "engines": { "node": ">=0.12.0" } @@ -21672,8 +21677,7 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "node_modules/isobject": { "version": "3.0.1", @@ -23098,7 +23102,6 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, "dependencies": { "universalify": "^2.0.0" }, @@ -23175,6 +23178,14 @@ "node": ">=0.10.0" } }, + "node_modules/klaw-sync": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", + "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", + "dependencies": { + "graceful-fs": "^4.1.11" + } + }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -25624,7 +25635,6 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -26331,6 +26341,11 @@ "dev": true, "optional": true }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + }, "node_modules/no-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", @@ -27650,6 +27665,178 @@ "node": ">=0.10.0" } }, + "node_modules/patch-package": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.5.1.tgz", + "integrity": "sha512-I/4Zsalfhc6bphmJTlrLoOcAF87jcxko4q0qsv4bGcurbr8IskEOtdnt9iCmsQVGL1B+iUhSQqweyTLJfCF9rA==", + "dependencies": { + "@yarnpkg/lockfile": "^1.1.0", + "chalk": "^4.1.2", + "cross-spawn": "^6.0.5", + "find-yarn-workspace-root": "^2.0.0", + "fs-extra": "^9.0.0", + "is-ci": "^2.0.0", + "klaw-sync": "^6.0.0", + "minimist": "^1.2.6", + "open": "^7.4.2", + "rimraf": "^2.6.3", + "semver": "^5.6.0", + "slash": "^2.0.0", + "tmp": "^0.0.33", + "yaml": "^1.10.2" + }, + "bin": { + "patch-package": "index.js" + }, + "engines": { + "node": ">=10", + "npm": ">5" + } + }, + "node_modules/patch-package/node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" + }, + "node_modules/patch-package/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/patch-package/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/patch-package/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/patch-package/node_modules/is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dependencies": { + "ci-info": "^2.0.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, + "node_modules/patch-package/node_modules/open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/patch-package/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/patch-package/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/patch-package/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/patch-package/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/patch-package/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/patch-package/node_modules/slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/patch-package/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", @@ -27835,7 +28022,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, "engines": { "node": ">=8.6" }, @@ -33601,7 +33787,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "dependencies": { "is-number": "^7.0.0" }, @@ -34441,7 +34626,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, "engines": { "node": ">= 10.0.0" } @@ -35818,7 +36002,6 @@ "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "dev": true, "engines": { "node": ">= 6" } diff --git a/package.json b/package.json index 9c298958b86..7ffeaaddc25 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,8 @@ "docs:json": "compodoc -p ./tsconfig.json -e json -d .", "storybook": "ng run components:storybook", "build-storybook": "ng run components:build-storybook", - "build-storybook:ci": "ng run components:build-storybook --webpack-stats-json" + "build-storybook:ci": "ng run components:build-storybook --webpack-stats-json", + "postinstall": "patch-package" }, "workspaces": [ "apps/*", @@ -189,6 +190,7 @@ "nord": "0.2.1", "open": "8.4.2", "papaparse": "5.4.1", + "patch-package": "6.5.1", "popper.js": "1.16.1", "proper-lockfile": "4.1.2", "qrious": "4.0.2", diff --git a/patches/argon2-browser+1.18.0.patch b/patches/argon2-browser+1.18.0.patch new file mode 100644 index 00000000000..7161e9aa6eb --- /dev/null +++ b/patches/argon2-browser+1.18.0.patch @@ -0,0 +1,63 @@ +diff --git a/node_modules/argon2-browser/lib/argon2.js b/node_modules/argon2-browser/lib/argon2.js +index ffa77a5..b498e2d 100644 +--- a/node_modules/argon2-browser/lib/argon2.js ++++ b/node_modules/argon2-browser/lib/argon2.js +@@ -78,16 +78,27 @@ + if (global.loadArgon2WasmBinary) { + return global.loadArgon2WasmBinary(); + } ++ ++ const simd = checkIfSIMDSupported(); ++ + if (typeof require === 'function') { +- return Promise.resolve(require('../dist/argon2.wasm')).then( +- (wasmModule) => { +- return decodeWasmBinary(wasmModule); +- } +- ); ++ if (simd) { ++ return Promise.resolve(require('../dist/argon2-simd.wasm')).then( ++ (wasmModule) => { ++ return decodeWasmBinary(wasmModule); ++ } ++ ); ++ } else { ++ return Promise.resolve(require('../dist/argon2.wasm')).then( ++ (wasmModule) => { ++ return decodeWasmBinary(wasmModule); ++ } ++ ); ++ } + } + const wasmPath = + global.argon2WasmPath || +- 'node_modules/argon2-browser/dist/argon2.wasm'; ++ 'node_modules/argon2-browser/dist/argon2' + (simd? "-simd" : "") + '.wasm'; + return fetch(wasmPath) + .then((response) => response.arrayBuffer()) + .then((ab) => new Uint8Array(ab)); +@@ -354,6 +365,24 @@ + } + } + ++ // ref: https://stackoverflow.com/a/47880734/1090359 ++ // ref: https://github.com/GoogleChromeLabs/wasm-feature-detect/blob/main/src/detectors/simd/module.wat (translated with wat2wasm) ++ function checkIfSIMDSupported() { ++ try { ++ if (typeof WebAssembly === "object" && typeof WebAssembly.instantiate === "function") { ++ const module = new WebAssembly.Module( ++ Uint8Array.of(0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x05, 0x01, 0x60, 0x00, 0x01, 0x7b, 0x03, 0x02, 0x01, 0x00, 0x0a, 0x0a, 0x01, 0x08, 0x00, 0x41, 0x00, 0xfd, 0x0f, 0xfd, 0x62, 0x0b) ++ ); ++ if (module instanceof WebAssembly.Module) { ++ return new WebAssembly.Instance(module) instanceof WebAssembly.Instance; ++ } ++ } ++ } catch { ++ return false; ++ } ++ return false; ++ } ++ + return { + ArgonType, + hash: argon2Hash, From 22caae116c33b7ecc545170b58a29414c685df3c Mon Sep 17 00:00:00 2001 From: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Date: Tue, 13 Jun 2023 10:03:32 +1000 Subject: [PATCH 15/22] Restrict angular imports (#5597) * Refactor restricted imports eslint rule, add angular deps * Move FormValidationErrorsService into libs/angular * Remove angular decorators from configService * Remove angular decorator from anonymousHubService --- .eslintrc.json | 27 +++++++++---------- .../browser/src/auth/popup/login.component.ts | 2 +- .../src/auth/popup/register.component.ts | 2 +- .../desktop/src/auth/login/login.component.ts | 2 +- apps/desktop/src/auth/register.component.ts | 2 +- .../web/src/app/auth/login/login.component.ts | 2 +- .../register-form/register-form.component.ts | 2 +- .../src/auth/components/login.component.ts | 9 ++++--- .../src/components/register.component.ts | 8 +++--- .../form-validation-errors.service.ts | 0 .../form-validation-errors.service.ts | 0 .../src/services/jslib-services.module.ts | 4 +-- .../validators/inputsFieldMatch.validator.ts | 2 +- .../services/config/config.service.ts | 14 +++------- .../src/services/anonymousHub.service.ts | 2 -- 15 files changed, 34 insertions(+), 44 deletions(-) rename libs/{common => angular}/src/platform/abstractions/form-validation-errors.service.ts (100%) rename libs/{common => angular}/src/platform/services/form-validation-errors.service.ts (100%) diff --git a/.eslintrc.json b/.eslintrc.json index 5b431ff2740..45a9d063a98 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -90,22 +90,21 @@ "error", { "zones": [ - // Do not allow angular/node code to be imported into common { + // avoid specific frameworks or large dependencies in common "target": "./libs/common/**/*", - "from": "./libs/angular/**/*" - }, - { - "target": "./libs/common/**/*", - "from": "./libs/node/**/*" - }, - { - "target": "./libs/common/**/*", - "from": "./libs/importer/**/*" - }, - { - "target": "./libs/common/**/*", - "from": "./libs/exporter/**/*" + "from": [ + // Angular + "./libs/angular/**/*", + "./node_modules/@angular*/**/*", + + // Node + "./libs/node/**/*", + + // Import/export + "./libs/importer/**/*", + "./libs/exporter/**/*" + ] } ] } diff --git a/apps/browser/src/auth/popup/login.component.ts b/apps/browser/src/auth/popup/login.component.ts index 496de2c54b5..776b792fa1d 100644 --- a/apps/browser/src/auth/popup/login.component.ts +++ b/apps/browser/src/auth/popup/login.component.ts @@ -3,13 +3,13 @@ import { FormBuilder } from "@angular/forms"; import { ActivatedRoute, Router } from "@angular/router"; import { LoginComponent as BaseLoginComponent } from "@bitwarden/angular/auth/components/login.component"; +import { FormValidationErrorsService } from "@bitwarden/angular/platform/abstractions/form-validation-errors.service"; import { DevicesApiServiceAbstraction } from "@bitwarden/common/abstractions/devices/devices-api.service.abstraction"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; -import { FormValidationErrorsService } from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; diff --git a/apps/browser/src/auth/popup/register.component.ts b/apps/browser/src/auth/popup/register.component.ts index b061e1faf6a..ad7a9e1cc68 100644 --- a/apps/browser/src/auth/popup/register.component.ts +++ b/apps/browser/src/auth/popup/register.component.ts @@ -3,13 +3,13 @@ import { UntypedFormBuilder } from "@angular/forms"; import { Router } from "@angular/router"; import { RegisterComponent as BaseRegisterComponent } from "@bitwarden/angular/components/register.component"; +import { FormValidationErrorsService } from "@bitwarden/angular/platform/abstractions/form-validation-errors.service"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; -import { FormValidationErrorsService } from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; diff --git a/apps/desktop/src/auth/login/login.component.ts b/apps/desktop/src/auth/login/login.component.ts index 77894b77f6f..de5ee51a7ae 100644 --- a/apps/desktop/src/auth/login/login.component.ts +++ b/apps/desktop/src/auth/login/login.component.ts @@ -5,6 +5,7 @@ import { Subject, takeUntil } from "rxjs"; import { EnvironmentSelectorComponent } from "@bitwarden/angular/auth/components/environment-selector.component"; import { LoginComponent as BaseLoginComponent } from "@bitwarden/angular/auth/components/login.component"; +import { FormValidationErrorsService } from "@bitwarden/angular/platform/abstractions/form-validation-errors.service"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { DevicesApiServiceAbstraction } from "@bitwarden/common/abstractions/devices/devices-api.service.abstraction"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; @@ -13,7 +14,6 @@ import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.ser import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; -import { FormValidationErrorsService } from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; diff --git a/apps/desktop/src/auth/register.component.ts b/apps/desktop/src/auth/register.component.ts index 6cf46de7c70..f4324f12379 100644 --- a/apps/desktop/src/auth/register.component.ts +++ b/apps/desktop/src/auth/register.component.ts @@ -3,6 +3,7 @@ import { UntypedFormBuilder } from "@angular/forms"; import { Router } from "@angular/router"; import { RegisterComponent as BaseRegisterComponent } from "@bitwarden/angular/components/register.component"; +import { FormValidationErrorsService } from "@bitwarden/angular/platform/abstractions/form-validation-errors.service"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; @@ -10,7 +11,6 @@ import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; -import { FormValidationErrorsService } from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; diff --git a/apps/web/src/app/auth/login/login.component.ts b/apps/web/src/app/auth/login/login.component.ts index 430e3cfb7d9..52ee5a89bdd 100644 --- a/apps/web/src/app/auth/login/login.component.ts +++ b/apps/web/src/app/auth/login/login.component.ts @@ -5,6 +5,7 @@ import { Subject, takeUntil } from "rxjs"; import { first } from "rxjs/operators"; import { LoginComponent as BaseLoginComponent } from "@bitwarden/angular/auth/components/login.component"; +import { FormValidationErrorsService } from "@bitwarden/angular/platform/abstractions/form-validation-errors.service"; import { DevicesApiServiceAbstraction } from "@bitwarden/common/abstractions/devices/devices-api.service.abstraction"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; import { InternalPolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; @@ -18,7 +19,6 @@ import { ListResponse } from "@bitwarden/common/models/response/list.response"; import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; -import { FormValidationErrorsService } from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; diff --git a/apps/web/src/app/auth/register-form/register-form.component.ts b/apps/web/src/app/auth/register-form/register-form.component.ts index 14071aba7c2..887f5562481 100644 --- a/apps/web/src/app/auth/register-form/register-form.component.ts +++ b/apps/web/src/app/auth/register-form/register-form.component.ts @@ -3,6 +3,7 @@ import { UntypedFormBuilder } from "@angular/forms"; import { Router } from "@angular/router"; import { RegisterComponent as BaseRegisterComponent } from "@bitwarden/angular/components/register.component"; +import { FormValidationErrorsService } from "@bitwarden/angular/platform/abstractions/form-validation-errors.service"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; @@ -12,7 +13,6 @@ import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { ReferenceEventRequest } from "@bitwarden/common/models/request/reference-event.request"; import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; -import { FormValidationErrorsService } from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; diff --git a/libs/angular/src/auth/components/login.component.ts b/libs/angular/src/auth/components/login.component.ts index cdb8f303699..f5a7a27af46 100644 --- a/libs/angular/src/auth/components/login.component.ts +++ b/libs/angular/src/auth/components/login.component.ts @@ -12,10 +12,6 @@ import { PasswordLogInCredentials } from "@bitwarden/common/auth/models/domain/l import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; -import { - AllValidationErrors, - FormValidationErrorsService, -} from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @@ -23,6 +19,11 @@ import { StateService } from "@bitwarden/common/platform/abstractions/state.serv import { Utils } from "@bitwarden/common/platform/misc/utils"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; +import { + AllValidationErrors, + FormValidationErrorsService, +} from "../../platform/abstractions/form-validation-errors.service"; + import { CaptchaProtectedComponent } from "./captcha-protected.component"; @Directive() diff --git a/libs/angular/src/components/register.component.ts b/libs/angular/src/components/register.component.ts index ac28dc6803b..510da6160a6 100644 --- a/libs/angular/src/components/register.component.ts +++ b/libs/angular/src/components/register.component.ts @@ -13,10 +13,6 @@ import { ReferenceEventRequest } from "@bitwarden/common/models/request/referenc import { RegisterRequest } from "@bitwarden/common/models/request/register.request"; import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; -import { - AllValidationErrors, - FormValidationErrorsService, -} from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @@ -25,6 +21,10 @@ import { Utils } from "@bitwarden/common/platform/misc/utils"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { CaptchaProtectedComponent } from "../auth/components/captcha-protected.component"; +import { + AllValidationErrors, + FormValidationErrorsService, +} from "../platform/abstractions/form-validation-errors.service"; import { DialogServiceAbstraction, SimpleDialogType } from "../services/dialog"; import { PasswordColorText } from "../shared/components/password-strength/password-strength.component"; import { InputsFieldMatch } from "../validators/inputsFieldMatch.validator"; diff --git a/libs/common/src/platform/abstractions/form-validation-errors.service.ts b/libs/angular/src/platform/abstractions/form-validation-errors.service.ts similarity index 100% rename from libs/common/src/platform/abstractions/form-validation-errors.service.ts rename to libs/angular/src/platform/abstractions/form-validation-errors.service.ts diff --git a/libs/common/src/platform/services/form-validation-errors.service.ts b/libs/angular/src/platform/services/form-validation-errors.service.ts similarity index 100% rename from libs/common/src/platform/services/form-validation-errors.service.ts rename to libs/angular/src/platform/services/form-validation-errors.service.ts diff --git a/libs/angular/src/services/jslib-services.module.ts b/libs/angular/src/services/jslib-services.module.ts index 9862ca90e84..51e3cdc3fc0 100644 --- a/libs/angular/src/services/jslib-services.module.ts +++ b/libs/angular/src/services/jslib-services.module.ts @@ -68,7 +68,6 @@ import { CryptoService as CryptoServiceAbstraction } from "@bitwarden/common/pla import { EncryptService } from "@bitwarden/common/platform/abstractions/encrypt.service"; import { EnvironmentService as EnvironmentServiceAbstraction } from "@bitwarden/common/platform/abstractions/environment.service"; import { FileUploadService as FileUploadServiceAbstraction } from "@bitwarden/common/platform/abstractions/file-upload/file-upload.service"; -import { FormValidationErrorsService as FormValidationErrorsServiceAbstraction } from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { MessagingService as MessagingServiceAbstraction } from "@bitwarden/common/platform/abstractions/messaging.service"; @@ -90,7 +89,6 @@ import { EncryptServiceImplementation } from "@bitwarden/common/platform/service import { MultithreadEncryptServiceImplementation } from "@bitwarden/common/platform/services/cryptography/multithread-encrypt.service.implementation"; import { EnvironmentService } from "@bitwarden/common/platform/services/environment.service"; import { FileUploadService } from "@bitwarden/common/platform/services/file-upload/file-upload.service"; -import { FormValidationErrorsService } from "@bitwarden/common/platform/services/form-validation-errors.service"; import { StateMigrationService } from "@bitwarden/common/platform/services/state-migration.service"; import { StateService } from "@bitwarden/common/platform/services/state.service"; import { ValidationService } from "@bitwarden/common/platform/services/validation.service"; @@ -148,7 +146,9 @@ import { import { AuthGuard } from "../auth/guards/auth.guard"; import { LockGuard } from "../auth/guards/lock.guard"; import { UnauthGuard } from "../auth/guards/unauth.guard"; +import { FormValidationErrorsService as FormValidationErrorsServiceAbstraction } from "../platform/abstractions/form-validation-errors.service"; import { BroadcasterService } from "../platform/services/broadcaster.service"; +import { FormValidationErrorsService } from "../platform/services/form-validation-errors.service"; import { PasswordRepromptService } from "../vault/services/password-reprompt.service"; import { diff --git a/libs/angular/src/validators/inputsFieldMatch.validator.ts b/libs/angular/src/validators/inputsFieldMatch.validator.ts index 7c7c876d0db..f360b5e5ee5 100644 --- a/libs/angular/src/validators/inputsFieldMatch.validator.ts +++ b/libs/angular/src/validators/inputsFieldMatch.validator.ts @@ -1,6 +1,6 @@ import { AbstractControl, UntypedFormGroup, ValidatorFn } from "@angular/forms"; -import { FormGroupControls } from "@bitwarden/common/platform/abstractions/form-validation-errors.service"; +import { FormGroupControls } from "../platform/abstractions/form-validation-errors.service"; export class InputsFieldMatch { //check to ensure two fields do not have the same value diff --git a/libs/common/src/platform/services/config/config.service.ts b/libs/common/src/platform/services/config/config.service.ts index 5149c4e4b7e..d1258c47a23 100644 --- a/libs/common/src/platform/services/config/config.service.ts +++ b/libs/common/src/platform/services/config/config.service.ts @@ -1,5 +1,4 @@ -import { Injectable, OnDestroy } from "@angular/core"; -import { BehaviorSubject, Subject, concatMap, from, takeUntil, timer } from "rxjs"; +import { BehaviorSubject, concatMap, from, timer } from "rxjs"; import { AuthService } from "../../../auth/abstractions/auth.service"; import { AuthenticationStatus } from "../../../auth/enums/authentication-status"; @@ -11,11 +10,9 @@ import { EnvironmentService } from "../../abstractions/environment.service"; import { StateService } from "../../abstractions/state.service"; import { ServerConfigData } from "../../models/data/server-config.data"; -@Injectable() -export class ConfigService implements ConfigServiceAbstraction, OnDestroy { +export class ConfigService implements ConfigServiceAbstraction { protected _serverConfig = new BehaviorSubject(null); serverConfig$ = this._serverConfig.asObservable(); - private destroy$ = new Subject(); constructor( private stateService: StateService, @@ -30,16 +27,11 @@ export class ConfigService implements ConfigServiceAbstraction, OnDestroy { this._serverConfig.next(serverConfig); }); - this.environmentService.urls.pipe(takeUntil(this.destroy$)).subscribe(() => { + this.environmentService.urls.subscribe(() => { this.fetchServerConfig(); }); } - ngOnDestroy(): void { - this.destroy$.next(); - this.destroy$.complete(); - } - async fetchServerConfig(): Promise { try { const response = await this.configApiService.get(); diff --git a/libs/common/src/services/anonymousHub.service.ts b/libs/common/src/services/anonymousHub.service.ts index 32ea272cedd..31b394ae587 100644 --- a/libs/common/src/services/anonymousHub.service.ts +++ b/libs/common/src/services/anonymousHub.service.ts @@ -1,4 +1,3 @@ -import { Injectable } from "@angular/core"; import { HttpTransportType, HubConnection, @@ -17,7 +16,6 @@ import { NotificationResponse, } from "./../models/response/notification.response"; -@Injectable() export class AnonymousHubService implements AnonymousHubServiceAbstraction { private anonHubConnection: HubConnection; private url: string; From 72a5ba455cc114c6d46602b5086c9063bc3c390e Mon Sep 17 00:00:00 2001 From: Daniel James Smith Date: Tue, 13 Jun 2023 23:22:25 +0200 Subject: [PATCH 16/22] [PM-2367] [BEEEP]: Extract password strength from password-generation-service (#5502) * Extract passwordStrength from passwordGenerationService Extract passwordStrength from password-generation.service.ts Create new password-strength.service.ts Create new password-strength.service.abstraction.ts Register new password-strength service Fix usages in libs * Fix usage in web * Fix usage in desktop * Fix usage in CLI * Fix usage in browser Move password-generation-factory to tools * Fix tests * Change dependency in jslib-services.module --- .../service-factories/auth-service.factory.ts | 12 ++--- apps/browser/src/auth/popup/lock.component.ts | 6 +-- .../browser/context-menu-clicked-handler.ts | 2 +- .../browser/src/background/main.background.ts | 10 +++- .../platform/listeners/on-command-listener.ts | 8 +-- .../src/popup/services/services.module.ts | 6 +++ .../password-generation-service.factory.ts | 46 ++++++++++++++++ .../password-strength-service.factory.ts | 23 ++++++++ apps/cli/src/auth/commands/login.command.ts | 4 +- apps/cli/src/bw.ts | 9 +++- apps/cli/src/program.ts | 1 + apps/desktop/src/auth/lock.component.ts | 6 +-- .../tools/weak-passwords-report.component.ts | 6 +-- apps/web/src/app/auth/lock.component.ts | 6 +-- .../web/src/app/auth/login/login.component.ts | 4 +- .../pages/weak-passwords-report.component.ts | 6 +-- .../src/auth/components/lock.component.ts | 6 +-- .../src/services/jslib-services.module.ts | 11 +++- .../password-strength.component.ts | 6 +-- .../login-strategies/login.strategy.spec.ts | 11 ++-- .../password-login.strategy.spec.ts | 17 +++--- .../password-login.strategy.ts | 6 +-- libs/common/src/auth/services/auth.service.ts | 6 +-- ...password-generation.service.abstraction.ts | 7 --- .../password/password-generation.service.ts | 50 ----------------- .../src/tools/password-strength/index.ts | 2 + .../password-strength.service.abstraction.ts | 5 ++ .../password-strength.service.ts | 53 +++++++++++++++++++ 28 files changed, 224 insertions(+), 111 deletions(-) create mode 100644 apps/browser/src/tools/background/service_factories/password-generation-service.factory.ts create mode 100644 apps/browser/src/tools/background/service_factories/password-strength-service.factory.ts create mode 100644 libs/common/src/tools/password-strength/index.ts create mode 100644 libs/common/src/tools/password-strength/password-strength.service.abstraction.ts create mode 100644 libs/common/src/tools/password-strength/password-strength.service.ts diff --git a/apps/browser/src/auth/background/service-factories/auth-service.factory.ts b/apps/browser/src/auth/background/service-factories/auth-service.factory.ts index eefbf8e27fb..5612cedb91c 100644 --- a/apps/browser/src/auth/background/service-factories/auth-service.factory.ts +++ b/apps/browser/src/auth/background/service-factories/auth-service.factory.ts @@ -5,10 +5,6 @@ import { policyServiceFactory, PolicyServiceInitOptions, } from "../../../admin-console/background/service-factories/policy-service.factory"; -import { - passwordGenerationServiceFactory, - PasswordGenerationServiceInitOptions, -} from "../../../background/service-factories/password-generation-service.factory"; import { apiServiceFactory, ApiServiceInitOptions, @@ -51,6 +47,10 @@ import { stateServiceFactory, StateServiceInitOptions, } from "../../../platform/background/service-factories/state-service.factory"; +import { + passwordStrengthServiceFactory, + PasswordStrengthServiceInitOptions, +} from "../../../tools/background/service_factories/password-strength-service.factory"; import { keyConnectorServiceFactory, @@ -75,7 +75,7 @@ export type AuthServiceInitOptions = AuthServiceFactoyOptions & I18nServiceInitOptions & EncryptServiceInitOptions & PolicyServiceInitOptions & - PasswordGenerationServiceInitOptions; + PasswordStrengthServiceInitOptions; export function authServiceFactory( cache: { authService?: AbstractAuthService } & CachedServices, @@ -100,7 +100,7 @@ export function authServiceFactory( await twoFactorServiceFactory(cache, opts), await i18nServiceFactory(cache, opts), await encryptServiceFactory(cache, opts), - await passwordGenerationServiceFactory(cache, opts), + await passwordStrengthServiceFactory(cache, opts), await policyServiceFactory(cache, opts) ) ); diff --git a/apps/browser/src/auth/popup/lock.component.ts b/apps/browser/src/auth/popup/lock.component.ts index d95ff79fc8f..d13609f61d4 100644 --- a/apps/browser/src/auth/popup/lock.component.ts +++ b/apps/browser/src/auth/popup/lock.component.ts @@ -18,7 +18,7 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service" import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; -import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; +import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength"; import { BiometricErrors, BiometricErrorTypes } from "../../models/biometricErrors"; @@ -48,7 +48,7 @@ export class LockComponent extends BaseLockComponent { ngZone: NgZone, policyApiService: PolicyApiServiceAbstraction, policyService: InternalPolicyService, - passwordGenerationService: PasswordGenerationServiceAbstraction, + passwordStrengthService: PasswordStrengthServiceAbstraction, private authService: AuthService, dialogService: DialogServiceAbstraction ) { @@ -68,7 +68,7 @@ export class LockComponent extends BaseLockComponent { ngZone, policyApiService, policyService, - passwordGenerationService, + passwordStrengthService, dialogService ); this.successRoute = "/tabs/current"; diff --git a/apps/browser/src/autofill/browser/context-menu-clicked-handler.ts b/apps/browser/src/autofill/browser/context-menu-clicked-handler.ts index be7dee80a07..a5cf1c70655 100644 --- a/apps/browser/src/autofill/browser/context-menu-clicked-handler.ts +++ b/apps/browser/src/autofill/browser/context-menu-clicked-handler.ts @@ -16,11 +16,11 @@ import { import { totpServiceFactory } from "../../auth/background/service-factories/totp-service.factory"; import LockedVaultPendingNotificationsItem from "../../background/models/lockedVaultPendingNotificationsItem"; import { eventCollectionServiceFactory } from "../../background/service-factories/event-collection-service.factory"; -import { passwordGenerationServiceFactory } from "../../background/service-factories/password-generation-service.factory"; import { Account } from "../../models/account"; import { CachedServices } from "../../platform/background/service-factories/factory-options"; import { stateServiceFactory } from "../../platform/background/service-factories/state-service.factory"; import { BrowserApi } from "../../platform/browser/browser-api"; +import { passwordGenerationServiceFactory } from "../../tools/background/service_factories/password-generation-service.factory"; import { cipherServiceFactory, CipherServiceInitOptions, diff --git a/apps/browser/src/background/main.background.ts b/apps/browser/src/background/main.background.ts index 1304f82de52..4091e807f97 100644 --- a/apps/browser/src/background/main.background.ts +++ b/apps/browser/src/background/main.background.ts @@ -75,6 +75,10 @@ import { UsernameGenerationService, UsernameGenerationServiceAbstraction, } from "@bitwarden/common/tools/generator/username"; +import { + PasswordStrengthService, + PasswordStrengthServiceAbstraction, +} from "@bitwarden/common/tools/password-strength"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service"; import { SendApiService as SendApiServiceAbstraction } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { InternalSendService as InternalSendServiceAbstraction } from "@bitwarden/common/tools/send/services/send.service.abstraction"; @@ -155,6 +159,7 @@ export default class MainBackground { vaultTimeoutSettingsService: VaultTimeoutSettingsServiceAbstraction; syncService: SyncServiceAbstraction; passwordGenerationService: PasswordGenerationServiceAbstraction; + passwordStrengthService: PasswordStrengthServiceAbstraction; totpService: TotpServiceAbstraction; autofillService: AutofillServiceAbstraction; containerService: ContainerService; @@ -360,6 +365,9 @@ export default class MainBackground { this.collectionService, this.policyService ); + + this.passwordStrengthService = new PasswordStrengthService(); + this.passwordGenerationService = new PasswordGenerationService( this.cryptoService, this.policyService, @@ -391,7 +399,7 @@ export default class MainBackground { this.twoFactorService, this.i18nService, this.encryptService, - this.passwordGenerationService, + this.passwordStrengthService, this.policyService ); diff --git a/apps/browser/src/platform/listeners/on-command-listener.ts b/apps/browser/src/platform/listeners/on-command-listener.ts index 1511e937813..65af31e173c 100644 --- a/apps/browser/src/platform/listeners/on-command-listener.ts +++ b/apps/browser/src/platform/listeners/on-command-listener.ts @@ -6,12 +6,12 @@ import { authServiceFactory } from "../../auth/background/service-factories/auth import { autofillServiceFactory } from "../../autofill/background/service_factories/autofill-service.factory"; import { GeneratePasswordToClipboardCommand } from "../../autofill/clipboard"; import { AutofillTabCommand } from "../../autofill/commands/autofill-tab-command"; -import { - PasswordGenerationServiceInitOptions, - passwordGenerationServiceFactory, -} from "../../background/service-factories/password-generation-service.factory"; import { Account } from "../../models/account"; import { stateServiceFactory } from "../../platform/background/service-factories/state-service.factory"; +import { + passwordGenerationServiceFactory, + PasswordGenerationServiceInitOptions, +} from "../../tools/background/service_factories/password-generation-service.factory"; import { CachedServices } from "../background/service-factories/factory-options"; import { logServiceFactory } from "../background/service-factories/log-service.factory"; import { BrowserApi } from "../browser/browser-api"; diff --git a/apps/browser/src/popup/services/services.module.ts b/apps/browser/src/popup/services/services.module.ts index 8a2a7f7a505..5a7ca533701 100644 --- a/apps/browser/src/popup/services/services.module.ts +++ b/apps/browser/src/popup/services/services.module.ts @@ -63,6 +63,7 @@ import { ContainerService } from "@bitwarden/common/platform/services/container. import { SearchService } from "@bitwarden/common/services/search.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { UsernameGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/username"; +import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service"; import { SendApiService as SendApiServiceAbstraction } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { @@ -287,6 +288,11 @@ function getBgService(service: keyof MainBackground) { useFactory: getBgService("platformUtilsService"), deps: [], }, + { + provide: PasswordStrengthServiceAbstraction, + useFactory: getBgService("passwordStrengthService"), + deps: [], + }, { provide: PasswordGenerationServiceAbstraction, useFactory: getBgService("passwordGenerationService"), diff --git a/apps/browser/src/tools/background/service_factories/password-generation-service.factory.ts b/apps/browser/src/tools/background/service_factories/password-generation-service.factory.ts new file mode 100644 index 00000000000..b5a56dc1184 --- /dev/null +++ b/apps/browser/src/tools/background/service_factories/password-generation-service.factory.ts @@ -0,0 +1,46 @@ +import { + PasswordGenerationService, + PasswordGenerationServiceAbstraction, +} from "@bitwarden/common/tools/generator/password"; + +import { + policyServiceFactory, + PolicyServiceInitOptions, +} from "../../../admin-console/background/service-factories/policy-service.factory"; +import { + CryptoServiceInitOptions, + cryptoServiceFactory, +} from "../../../platform/background/service-factories/crypto-service.factory"; +import { + CachedServices, + factory, + FactoryOptions, +} from "../../../platform/background/service-factories/factory-options"; +import { + stateServiceFactory, + StateServiceInitOptions, +} from "../../../platform/background/service-factories/state-service.factory"; + +type PasswordGenerationServiceFactoryOptions = FactoryOptions; + +export type PasswordGenerationServiceInitOptions = PasswordGenerationServiceFactoryOptions & + CryptoServiceInitOptions & + PolicyServiceInitOptions & + StateServiceInitOptions; + +export function passwordGenerationServiceFactory( + cache: { passwordGenerationService?: PasswordGenerationServiceAbstraction } & CachedServices, + opts: PasswordGenerationServiceInitOptions +): Promise { + return factory( + cache, + "passwordGenerationService", + opts, + async () => + new PasswordGenerationService( + await cryptoServiceFactory(cache, opts), + await policyServiceFactory(cache, opts), + await stateServiceFactory(cache, opts) + ) + ); +} diff --git a/apps/browser/src/tools/background/service_factories/password-strength-service.factory.ts b/apps/browser/src/tools/background/service_factories/password-strength-service.factory.ts new file mode 100644 index 00000000000..3ebd4636fe3 --- /dev/null +++ b/apps/browser/src/tools/background/service_factories/password-strength-service.factory.ts @@ -0,0 +1,23 @@ +import { + PasswordStrengthService, + PasswordStrengthServiceAbstraction, +} from "@bitwarden/common/tools/password-strength"; + +import { + CachedServices, + factory, + FactoryOptions, +} from "../../../platform/background/service-factories/factory-options"; + +type PasswordStrengthServiceFactoryOptions = FactoryOptions; + +export type PasswordStrengthServiceInitOptions = PasswordStrengthServiceFactoryOptions; + +export function passwordStrengthServiceFactory( + cache: { + passwordStrengthService?: PasswordStrengthServiceAbstraction; + } & CachedServices, + opts: PasswordStrengthServiceInitOptions +): Promise { + return factory(cache, "passwordStrengthService", opts, async () => new PasswordStrengthService()); +} diff --git a/apps/cli/src/auth/commands/login.command.ts b/apps/cli/src/auth/commands/login.command.ts index b8d8d1335fd..fe9284e2e80 100644 --- a/apps/cli/src/auth/commands/login.command.ts +++ b/apps/cli/src/auth/commands/login.command.ts @@ -35,6 +35,7 @@ import { Utils } from "@bitwarden/common/platform/misc/utils"; import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; +import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { Response } from "../../models/response"; @@ -54,6 +55,7 @@ export class LoginCommand { protected cryptoFunctionService: CryptoFunctionService, protected environmentService: EnvironmentService, protected passwordGenerationService: PasswordGenerationServiceAbstraction, + protected passwordStrengthService: PasswordStrengthServiceAbstraction, protected platformUtilsService: PlatformUtilsService, protected stateService: StateService, protected cryptoService: CryptoService, @@ -505,7 +507,7 @@ export class LoginCommand { } // Strength & Policy Validation - const strengthResult = this.passwordGenerationService.passwordStrength( + const strengthResult = this.passwordStrengthService.getPasswordStrength( masterPassword, this.email ); diff --git a/apps/cli/src/bw.ts b/apps/cli/src/bw.ts index 956ae23b008..70b19612348 100644 --- a/apps/cli/src/bw.ts +++ b/apps/cli/src/bw.ts @@ -45,6 +45,10 @@ import { PasswordGenerationService, PasswordGenerationServiceAbstraction, } from "@bitwarden/common/tools/generator/password"; +import { + PasswordStrengthService, + PasswordStrengthServiceAbstraction, +} from "@bitwarden/common/tools/password-strength"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service"; import { SendService } from "@bitwarden/common/tools/send/services/send.service"; import { InternalFolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; @@ -103,6 +107,7 @@ export class Main { vaultTimeoutSettingsService: VaultTimeoutSettingsService; syncService: SyncService; passwordGenerationService: PasswordGenerationServiceAbstraction; + passwordStrengthService: PasswordStrengthServiceAbstraction; totpService: TotpService; containerService: ContainerService; auditService: AuditService; @@ -302,6 +307,8 @@ export class Main { this.twoFactorService = new TwoFactorService(this.i18nService, this.platformUtilsService); + this.passwordStrengthService = new PasswordStrengthService(); + this.passwordGenerationService = new PasswordGenerationService( this.cryptoService, this.policyService, @@ -322,7 +329,7 @@ export class Main { this.twoFactorService, this.i18nService, this.encryptService, - this.passwordGenerationService, + this.passwordStrengthService, this.policyService ); diff --git a/apps/cli/src/program.ts b/apps/cli/src/program.ts index 122b70c7b49..700a31b3c66 100644 --- a/apps/cli/src/program.ts +++ b/apps/cli/src/program.ts @@ -145,6 +145,7 @@ export class Program { this.main.cryptoFunctionService, this.main.environmentService, this.main.passwordGenerationService, + this.main.passwordStrengthService, this.main.platformUtilsService, this.main.stateService, this.main.cryptoService, diff --git a/apps/desktop/src/auth/lock.component.ts b/apps/desktop/src/auth/lock.component.ts index ef8dbe967df..61f7b4bfe30 100644 --- a/apps/desktop/src/auth/lock.component.ts +++ b/apps/desktop/src/auth/lock.component.ts @@ -18,7 +18,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; -import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; +import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength"; import { ElectronStateService } from "../platform/services/electron-state.service.abstraction"; import { BiometricStorageAction, BiometricMessage } from "../types/biometric-message"; @@ -49,7 +49,7 @@ export class LockComponent extends BaseLockComponent { ngZone: NgZone, policyApiService: PolicyApiServiceAbstraction, policyService: InternalPolicyService, - passwordGenerationService: PasswordGenerationServiceAbstraction, + passwordStrengthService: PasswordStrengthServiceAbstraction, logService: LogService, keyConnectorService: KeyConnectorService, dialogService: DialogServiceAbstraction @@ -70,7 +70,7 @@ export class LockComponent extends BaseLockComponent { ngZone, policyApiService, policyService, - passwordGenerationService, + passwordStrengthService, dialogService ); } diff --git a/apps/web/src/app/admin-console/organizations/tools/weak-passwords-report.component.ts b/apps/web/src/app/admin-console/organizations/tools/weak-passwords-report.component.ts index 8f545beb38f..68619b27514 100644 --- a/apps/web/src/app/admin-console/organizations/tools/weak-passwords-report.component.ts +++ b/apps/web/src/app/admin-console/organizations/tools/weak-passwords-report.component.ts @@ -4,7 +4,7 @@ import { ActivatedRoute } from "@angular/router"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; -import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; +import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { Cipher } from "@bitwarden/common/vault/models/domain/cipher"; @@ -23,7 +23,7 @@ export class WeakPasswordsReportComponent extends BaseWeakPasswordsReportCompone constructor( cipherService: CipherService, - passwordGenerationService: PasswordGenerationServiceAbstraction, + passwordStrengthService: PasswordStrengthServiceAbstraction, modalService: ModalService, messagingService: MessagingService, private route: ActivatedRoute, @@ -32,7 +32,7 @@ export class WeakPasswordsReportComponent extends BaseWeakPasswordsReportCompone ) { super( cipherService, - passwordGenerationService, + passwordStrengthService, modalService, messagingService, passwordRepromptService diff --git a/apps/web/src/app/auth/lock.component.ts b/apps/web/src/app/auth/lock.component.ts index dbb6b118ca4..789ebc16955 100644 --- a/apps/web/src/app/auth/lock.component.ts +++ b/apps/web/src/app/auth/lock.component.ts @@ -16,7 +16,7 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service" import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; -import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; +import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength"; import { RouterService } from "../core"; @@ -42,7 +42,7 @@ export class LockComponent extends BaseLockComponent { ngZone: NgZone, policyApiService: PolicyApiServiceAbstraction, policyService: InternalPolicyService, - passwordGenerationService: PasswordGenerationServiceAbstraction, + passwordStrengthService: PasswordStrengthServiceAbstraction, dialogService: DialogServiceAbstraction ) { super( @@ -61,7 +61,7 @@ export class LockComponent extends BaseLockComponent { ngZone, policyApiService, policyService, - passwordGenerationService, + passwordStrengthService, dialogService ); } diff --git a/apps/web/src/app/auth/login/login.component.ts b/apps/web/src/app/auth/login/login.component.ts index 52ee5a89bdd..316b353c490 100644 --- a/apps/web/src/app/auth/login/login.component.ts +++ b/apps/web/src/app/auth/login/login.component.ts @@ -24,6 +24,7 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service" import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; +import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength"; import { flagEnabled } from "../../../utils/flags"; import { RouterService, StateService } from "../../core"; @@ -50,6 +51,7 @@ export class LoginComponent extends BaseLoginComponent implements OnInit, OnDest platformUtilsService: PlatformUtilsService, environmentService: EnvironmentService, passwordGenerationService: PasswordGenerationServiceAbstraction, + private passwordStrengthService: PasswordStrengthServiceAbstraction, cryptoFunctionService: CryptoFunctionService, private policyApiService: PolicyApiServiceAbstraction, private policyService: InternalPolicyService, @@ -153,7 +155,7 @@ export class LoginComponent extends BaseLoginComponent implements OnInit, OnDest // Check master password against policy if (this.enforcedPasswordPolicyOptions != null) { - const strengthResult = this.passwordGenerationService.passwordStrength( + const strengthResult = this.passwordStrengthService.getPasswordStrength( masterPassword, this.formGroup.value.email ); diff --git a/apps/web/src/app/reports/pages/weak-passwords-report.component.ts b/apps/web/src/app/reports/pages/weak-passwords-report.component.ts index 14d159deee3..ddea66a6a91 100644 --- a/apps/web/src/app/reports/pages/weak-passwords-report.component.ts +++ b/apps/web/src/app/reports/pages/weak-passwords-report.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from "@angular/core"; import { ModalService } from "@bitwarden/angular/services/modal.service"; import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; -import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; +import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; @@ -22,7 +22,7 @@ export class WeakPasswordsReportComponent extends CipherReportComponent implemen constructor( protected cipherService: CipherService, - protected passwordGenerationService: PasswordGenerationServiceAbstraction, + protected passwordStrengthService: PasswordStrengthServiceAbstraction, modalService: ModalService, messagingService: MessagingService, passwordRepromptService: PasswordRepromptService @@ -77,7 +77,7 @@ export class WeakPasswordsReportComponent extends CipherReportComponent implemen .filter((i) => i.length >= 3); } } - const result = this.passwordGenerationService.passwordStrength( + const result = this.passwordStrengthService.getPasswordStrength( c.login.password, null, userInput.length > 0 ? userInput : null diff --git a/libs/angular/src/auth/components/lock.component.ts b/libs/angular/src/auth/components/lock.component.ts index 9114539d7a8..01c083ee5a9 100644 --- a/libs/angular/src/auth/components/lock.component.ts +++ b/libs/angular/src/auth/components/lock.component.ts @@ -24,7 +24,7 @@ import { StateService } from "@bitwarden/common/platform/abstractions/state.serv import { Utils } from "@bitwarden/common/platform/misc/utils"; import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key"; -import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; +import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength"; import { DialogServiceAbstraction, SimpleDialogType } from "../../services/dialog"; @@ -69,7 +69,7 @@ export class LockComponent implements OnInit, OnDestroy { protected ngZone: NgZone, protected policyApiService: PolicyApiServiceAbstraction, protected policyService: InternalPolicyService, - protected passwordGenerationService: PasswordGenerationServiceAbstraction, + protected passwordStrengthService: PasswordStrengthServiceAbstraction, protected dialogService: DialogServiceAbstraction ) {} @@ -333,7 +333,7 @@ export class LockComponent implements OnInit, OnDestroy { return false; } - const passwordStrength = this.passwordGenerationService.passwordStrength( + const passwordStrength = this.passwordStrengthService.getPasswordStrength( this.masterPassword, this.email )?.score; diff --git a/libs/angular/src/services/jslib-services.module.ts b/libs/angular/src/services/jslib-services.module.ts index 51e3cdc3fc0..bf5cb5a09a1 100644 --- a/libs/angular/src/services/jslib-services.module.ts +++ b/libs/angular/src/services/jslib-services.module.ts @@ -118,6 +118,10 @@ import { UsernameGenerationService, UsernameGenerationServiceAbstraction, } from "@bitwarden/common/tools/generator/username"; +import { + PasswordStrengthService, + PasswordStrengthServiceAbstraction, +} from "@bitwarden/common/tools/password-strength"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service"; import { SendApiService as SendApiServiceAbstraction } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { SendService } from "@bitwarden/common/tools/send/services/send.service"; @@ -239,7 +243,7 @@ import { AbstractThemingService } from "./theming/theming.service.abstraction"; TwoFactorServiceAbstraction, I18nServiceAbstraction, EncryptService, - PasswordGenerationServiceAbstraction, + PasswordStrengthServiceAbstraction, PolicyServiceAbstraction, ], }, @@ -359,6 +363,11 @@ import { AbstractThemingService } from "./theming/theming.service.abstraction"; DevicesApiServiceAbstraction, ], }, + { + provide: PasswordStrengthServiceAbstraction, + useClass: PasswordStrengthService, + deps: [], + }, { provide: PasswordGenerationServiceAbstraction, useClass: PasswordGenerationService, diff --git a/libs/angular/src/shared/components/password-strength/password-strength.component.ts b/libs/angular/src/shared/components/password-strength/password-strength.component.ts index 91167ffc5c1..75dd687efe4 100644 --- a/libs/angular/src/shared/components/password-strength/password-strength.component.ts +++ b/libs/angular/src/shared/components/password-strength/password-strength.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnChanges, Output } from "@angular/core"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; -import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; +import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength"; export interface PasswordColorText { color: string; @@ -59,7 +59,7 @@ export class PasswordStrengthComponent implements OnChanges { constructor( private i18nService: I18nService, - private passwordGenerationService: PasswordGenerationServiceAbstraction + private passwordStrengthService: PasswordStrengthServiceAbstraction ) {} ngOnChanges(): void { @@ -96,7 +96,7 @@ export class PasswordStrengthComponent implements OnChanges { clearTimeout(this.masterPasswordStrengthTimeout); } - const strengthResult = this.passwordGenerationService.passwordStrength( + const strengthResult = this.passwordStrengthService.getPasswordStrength( masterPassword, this.email, this.name?.trim().toLowerCase().split(" ") diff --git a/libs/common/src/auth/login-strategies/login.strategy.spec.ts b/libs/common/src/auth/login-strategies/login.strategy.spec.ts index 09756fbd995..ed958af6c7d 100644 --- a/libs/common/src/auth/login-strategies/login.strategy.spec.ts +++ b/libs/common/src/auth/login-strategies/login.strategy.spec.ts @@ -11,7 +11,10 @@ import { StateService } from "../../platform/abstractions/state.service"; import { Utils } from "../../platform/misc/utils"; import { Account, AccountProfile, AccountTokens } from "../../platform/models/domain/account"; import { EncString } from "../../platform/models/domain/enc-string"; -import { PasswordGenerationService } from "../../tools/generator/password"; +import { + PasswordStrengthService, + PasswordStrengthServiceAbstraction, +} from "../../tools/password-strength"; import { AuthService } from "../abstractions/auth.service"; import { TokenService } from "../abstractions/token.service"; import { TwoFactorService } from "../abstractions/two-factor.service"; @@ -85,7 +88,7 @@ describe("LogInStrategy", () => { let twoFactorService: MockProxy; let authService: MockProxy; let policyService: MockProxy; - let passwordGenerationService: MockProxy; + let passwordStrengthService: MockProxy; let passwordLogInStrategy: PasswordLogInStrategy; let credentials: PasswordLogInCredentials; @@ -102,7 +105,7 @@ describe("LogInStrategy", () => { twoFactorService = mock(); authService = mock(); policyService = mock(); - passwordGenerationService = mock(); + passwordStrengthService = mock(); appIdService.getAppId.mockResolvedValue(deviceId); tokenService.decodeToken.calledWith(accessToken).mockResolvedValue(decodedToken); @@ -118,7 +121,7 @@ describe("LogInStrategy", () => { logService, stateService, twoFactorService, - passwordGenerationService, + passwordStrengthService, policyService, authService ); diff --git a/libs/common/src/auth/login-strategies/password-login.strategy.spec.ts b/libs/common/src/auth/login-strategies/password-login.strategy.spec.ts index 0c2d1e2d575..9e3ff7da686 100644 --- a/libs/common/src/auth/login-strategies/password-login.strategy.spec.ts +++ b/libs/common/src/auth/login-strategies/password-login.strategy.spec.ts @@ -11,7 +11,10 @@ import { PlatformUtilsService } from "../../platform/abstractions/platform-utils import { StateService } from "../../platform/abstractions/state.service"; import { Utils } from "../../platform/misc/utils"; import { SymmetricCryptoKey } from "../../platform/models/domain/symmetric-crypto-key"; -import { PasswordGenerationService } from "../../tools/generator/password"; +import { + PasswordStrengthService, + PasswordStrengthServiceAbstraction, +} from "../../tools/password-strength"; import { AuthService } from "../abstractions/auth.service"; import { TokenService } from "../abstractions/token.service"; import { TwoFactorService } from "../abstractions/two-factor.service"; @@ -51,7 +54,7 @@ describe("PasswordLogInStrategy", () => { let twoFactorService: MockProxy; let authService: MockProxy; let policyService: MockProxy; - let passwordGenerationService: MockProxy; + let passwordStrengthService: MockProxy; let passwordLogInStrategy: PasswordLogInStrategy; let credentials: PasswordLogInCredentials; @@ -68,7 +71,7 @@ describe("PasswordLogInStrategy", () => { twoFactorService = mock(); authService = mock(); policyService = mock(); - passwordGenerationService = mock(); + passwordStrengthService = mock(); appIdService.getAppId.mockResolvedValue(deviceId); tokenService.decodeToken.mockResolvedValue({}); @@ -94,7 +97,7 @@ describe("PasswordLogInStrategy", () => { logService, stateService, twoFactorService, - passwordGenerationService, + passwordStrengthService, policyService, authService ); @@ -141,7 +144,7 @@ describe("PasswordLogInStrategy", () => { }); it("does not force the user to update their master password when it meets requirements", async () => { - passwordGenerationService.passwordStrength.mockReturnValue({ score: 5 } as any); + passwordStrengthService.getPasswordStrength.mockReturnValue({ score: 5 } as any); policyService.evaluateMasterPassword.mockReturnValue(true); const result = await passwordLogInStrategy.logIn(credentials); @@ -151,7 +154,7 @@ describe("PasswordLogInStrategy", () => { }); it("forces the user to update their master password on successful login when it does not meet master password policy requirements", async () => { - passwordGenerationService.passwordStrength.mockReturnValue({ score: 0 } as any); + passwordStrengthService.getPasswordStrength.mockReturnValue({ score: 0 } as any); policyService.evaluateMasterPassword.mockReturnValue(false); const result = await passwordLogInStrategy.logIn(credentials); @@ -164,7 +167,7 @@ describe("PasswordLogInStrategy", () => { }); it("forces the user to update their master password on successful 2FA login when it does not meet master password policy requirements", async () => { - passwordGenerationService.passwordStrength.mockReturnValue({ score: 0 } as any); + passwordStrengthService.getPasswordStrength.mockReturnValue({ score: 0 } as any); policyService.evaluateMasterPassword.mockReturnValue(false); const token2FAResponse = new IdentityTwoFactorResponse({ diff --git a/libs/common/src/auth/login-strategies/password-login.strategy.ts b/libs/common/src/auth/login-strategies/password-login.strategy.ts index 200656a08ff..41f7c30ec7e 100644 --- a/libs/common/src/auth/login-strategies/password-login.strategy.ts +++ b/libs/common/src/auth/login-strategies/password-login.strategy.ts @@ -9,7 +9,7 @@ import { MessagingService } from "../../platform/abstractions/messaging.service" import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service"; import { StateService } from "../../platform/abstractions/state.service"; import { SymmetricCryptoKey } from "../../platform/models/domain/symmetric-crypto-key"; -import { PasswordGenerationServiceAbstraction } from "../../tools/generator/password"; +import { PasswordStrengthServiceAbstraction } from "../../tools/password-strength"; import { AuthService } from "../abstractions/auth.service"; import { TokenService } from "../abstractions/token.service"; import { TwoFactorService } from "../abstractions/two-factor.service"; @@ -54,7 +54,7 @@ export class PasswordLogInStrategy extends LogInStrategy { logService: LogService, protected stateService: StateService, twoFactorService: TwoFactorService, - private passwordGenerationService: PasswordGenerationServiceAbstraction, + private passwordStrengthService: PasswordStrengthServiceAbstraction, private policyService: PolicyService, private authService: AuthService ) { @@ -158,7 +158,7 @@ export class PasswordLogInStrategy extends LogInStrategy { { masterPassword, email }: PasswordLogInCredentials, options: MasterPasswordPolicyOptions ): boolean { - const passwordStrength = this.passwordGenerationService.passwordStrength( + const passwordStrength = this.passwordStrengthService.getPasswordStrength( masterPassword, email )?.score; diff --git a/libs/common/src/auth/services/auth.service.ts b/libs/common/src/auth/services/auth.service.ts index 6650ce798ea..56f601da56f 100644 --- a/libs/common/src/auth/services/auth.service.ts +++ b/libs/common/src/auth/services/auth.service.ts @@ -17,7 +17,7 @@ import { PlatformUtilsService } from "../../platform/abstractions/platform-utils import { StateService } from "../../platform/abstractions/state.service"; import { Utils } from "../../platform/misc/utils"; import { SymmetricCryptoKey } from "../../platform/models/domain/symmetric-crypto-key"; -import { PasswordGenerationServiceAbstraction } from "../../tools/generator/password"; +import { PasswordStrengthServiceAbstraction } from "../../tools/password-strength"; import { AuthService as AuthServiceAbstraction } from "../abstractions/auth.service"; import { KeyConnectorService } from "../abstractions/key-connector.service"; import { TokenService } from "../abstractions/token.service"; @@ -102,7 +102,7 @@ export class AuthService implements AuthServiceAbstraction { protected twoFactorService: TwoFactorService, protected i18nService: I18nService, protected encryptService: EncryptService, - protected passwordGenerationService: PasswordGenerationServiceAbstraction, + protected passwordStrengthService: PasswordStrengthServiceAbstraction, protected policyService: PolicyService ) {} @@ -133,7 +133,7 @@ export class AuthService implements AuthServiceAbstraction { this.logService, this.stateService, this.twoFactorService, - this.passwordGenerationService, + this.passwordStrengthService, this.policyService, this ); diff --git a/libs/common/src/tools/generator/password/password-generation.service.abstraction.ts b/libs/common/src/tools/generator/password/password-generation.service.abstraction.ts index 7de8c28ed72..3f2c8424ad0 100644 --- a/libs/common/src/tools/generator/password/password-generation.service.abstraction.ts +++ b/libs/common/src/tools/generator/password/password-generation.service.abstraction.ts @@ -1,5 +1,3 @@ -import * as zxcvbn from "zxcvbn"; - import { PasswordGeneratorPolicyOptions } from "../../../admin-console/models/domain/password-generator-policy-options"; import { GeneratedPasswordHistory } from "./generated-password-history"; @@ -17,11 +15,6 @@ export abstract class PasswordGenerationServiceAbstraction { getHistory: () => Promise; addHistory: (password: string) => Promise; clear: (userId?: string) => Promise; - passwordStrength: ( - password: string, - email?: string, - userInputs?: string[] - ) => zxcvbn.ZXCVBNResult; normalizeOptions: ( options: PasswordGeneratorOptions, enforcedPolicyOptions: PasswordGeneratorPolicyOptions diff --git a/libs/common/src/tools/generator/password/password-generation.service.ts b/libs/common/src/tools/generator/password/password-generation.service.ts index 8270e2d812e..079d455c46d 100644 --- a/libs/common/src/tools/generator/password/password-generation.service.ts +++ b/libs/common/src/tools/generator/password/password-generation.service.ts @@ -1,5 +1,3 @@ -import * as zxcvbn from "zxcvbn"; - import { PolicyService } from "../../../admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "../../../admin-console/enums"; import { PasswordGeneratorPolicyOptions } from "../../../admin-console/models/domain/password-generator-policy-options"; @@ -387,33 +385,6 @@ export class PasswordGenerationService implements PasswordGenerationServiceAbstr await this.stateService.setDecryptedPasswordGenerationHistory(null, { userId: userId }); } - /** - * Calculates a password strength score using zxcvbn. - * @param password The password to calculate the strength of. - * @param emailInput An unparsed email address to use as user input. - * @param userInputs An array of additional user inputs to use when calculating the strength. - */ - passwordStrength( - password: string, - emailInput: string = null, - userInputs: string[] = null - ): zxcvbn.ZXCVBNResult { - if (password == null || password.length === 0) { - return null; - } - const globalUserInputs = [ - "bitwarden", - "bit", - "warden", - ...(userInputs ?? []), - ...this.emailToUserInputs(emailInput), - ]; - // Use a hash set to get rid of any duplicate user inputs - const finalUserInputs = Array.from(new Set(globalUserInputs)); - const result = zxcvbn(password, finalUserInputs); - return result; - } - normalizeOptions( options: PasswordGeneratorOptions, enforcedPolicyOptions: PasswordGeneratorPolicyOptions @@ -476,27 +447,6 @@ export class PasswordGenerationService implements PasswordGenerationServiceAbstr this.sanitizePasswordLength(options, false); } - /** - * Convert an email address into a list of user inputs for zxcvbn by - * taking the local part of the email address and splitting it into words. - * @param email - * @private - */ - private emailToUserInputs(email: string): string[] { - if (email == null || email.length === 0) { - return []; - } - const atPosition = email.indexOf("@"); - if (atPosition < 0) { - return []; - } - return email - .substring(0, atPosition) - .trim() - .toLowerCase() - .split(/[^A-Za-z0-9]/); - } - private capitalize(str: string) { return str.charAt(0).toUpperCase() + str.slice(1); } diff --git a/libs/common/src/tools/password-strength/index.ts b/libs/common/src/tools/password-strength/index.ts new file mode 100644 index 00000000000..3e160fa8204 --- /dev/null +++ b/libs/common/src/tools/password-strength/index.ts @@ -0,0 +1,2 @@ +export { PasswordStrengthServiceAbstraction } from "./password-strength.service.abstraction"; +export { PasswordStrengthService } from "./password-strength.service"; diff --git a/libs/common/src/tools/password-strength/password-strength.service.abstraction.ts b/libs/common/src/tools/password-strength/password-strength.service.abstraction.ts new file mode 100644 index 00000000000..5708a4c7bd1 --- /dev/null +++ b/libs/common/src/tools/password-strength/password-strength.service.abstraction.ts @@ -0,0 +1,5 @@ +import { ZXCVBNResult } from "zxcvbn"; + +export abstract class PasswordStrengthServiceAbstraction { + getPasswordStrength: (password: string, email?: string, userInputs?: string[]) => ZXCVBNResult; +} diff --git a/libs/common/src/tools/password-strength/password-strength.service.ts b/libs/common/src/tools/password-strength/password-strength.service.ts new file mode 100644 index 00000000000..78a8f963991 --- /dev/null +++ b/libs/common/src/tools/password-strength/password-strength.service.ts @@ -0,0 +1,53 @@ +import * as zxcvbn from "zxcvbn"; + +import { PasswordStrengthServiceAbstraction } from "./password-strength.service.abstraction"; + +export class PasswordStrengthService implements PasswordStrengthServiceAbstraction { + /** + * Calculates a password strength score using zxcvbn. + * @param password The password to calculate the strength of. + * @param emailInput An unparsed email address to use as user input. + * @param userInputs An array of additional user inputs to use when calculating the strength. + */ + getPasswordStrength( + password: string, + emailInput: string = null, + userInputs: string[] = null + ): zxcvbn.ZXCVBNResult { + if (password == null || password.length === 0) { + return null; + } + const globalUserInputs = [ + "bitwarden", + "bit", + "warden", + ...(userInputs ?? []), + ...this.emailToUserInputs(emailInput), + ]; + // Use a hash set to get rid of any duplicate user inputs + const finalUserInputs = Array.from(new Set(globalUserInputs)); + const result = zxcvbn(password, finalUserInputs); + return result; + } + + /** + * Convert an email address into a list of user inputs for zxcvbn by + * taking the local part of the email address and splitting it into words. + * @param email + * @private + */ + private emailToUserInputs(email: string): string[] { + if (email == null || email.length === 0) { + return []; + } + const atPosition = email.indexOf("@"); + if (atPosition < 0) { + return []; + } + return email + .substring(0, atPosition) + .trim() + .toLowerCase() + .split(/[^A-Za-z0-9]/); + } +} From 3b708d93112f80db11fe8bbe999e7ff2eeff121d Mon Sep 17 00:00:00 2001 From: Daniel James Smith Date: Wed, 14 Jun 2023 11:28:32 +0200 Subject: [PATCH 17/22] Remove try-catch to display proper api-errors (#5570) --- .../email-forwarders/simple-login-forwarder.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/libs/common/src/tools/generator/username/email-forwarders/simple-login-forwarder.ts b/libs/common/src/tools/generator/username/email-forwarders/simple-login-forwarder.ts index bf3eea42326..7ecd72dc59c 100644 --- a/libs/common/src/tools/generator/username/email-forwarders/simple-login-forwarder.ts +++ b/libs/common/src/tools/generator/username/email-forwarders/simple-login-forwarder.ts @@ -35,13 +35,9 @@ export class SimpleLoginForwarder implements Forwarder { if (response.status === 401) { throw "Invalid SimpleLogin API key."; } - try { - const json = await response.json(); - if (json?.error != null) { - throw "SimpleLogin error:" + json.error; - } - } catch { - // Do nothing... + const json = await response.json(); + if (json?.error != null) { + throw "SimpleLogin error:" + json.error; } throw "Unknown SimpleLogin error occurred."; } From 37010a6414400230f38944bdcc5fc0ec0bbeebc2 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Wed, 14 Jun 2023 14:10:39 +0200 Subject: [PATCH 18/22] [PM-2642] Fix feature flags not working properly when urls load from storage (#5598) * fix: feature flags not working properly Due to race conditions the api url is not set during the first fetch och server config. This causes the config to be fetched from `api.bitwarden.com`. The config is then supposed to be re-fetched when the api url is set by the environment service, but due to a missing line this is not done when the urls are set from storage. * feat: change to `Observable` --- .../src/platform/abstractions/environment.service.ts | 2 +- libs/common/src/platform/services/environment.service.ts | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libs/common/src/platform/abstractions/environment.service.ts b/libs/common/src/platform/abstractions/environment.service.ts index 27e4125a29d..e4d6a550014 100644 --- a/libs/common/src/platform/abstractions/environment.service.ts +++ b/libs/common/src/platform/abstractions/environment.service.ts @@ -18,7 +18,7 @@ export type PayPalConfig = { }; export abstract class EnvironmentService { - urls: Observable; + urls: Observable; hasBaseUrl: () => boolean; getNotificationsUrl: () => string; diff --git a/libs/common/src/platform/services/environment.service.ts b/libs/common/src/platform/services/environment.service.ts index 5e228cf7327..02e0fcfab23 100644 --- a/libs/common/src/platform/services/environment.service.ts +++ b/libs/common/src/platform/services/environment.service.ts @@ -8,8 +8,8 @@ import { import { StateService } from "../abstractions/state.service"; export class EnvironmentService implements EnvironmentServiceAbstraction { - private readonly urlsSubject = new Subject(); - urls: Observable = this.urlsSubject; + private readonly urlsSubject = new Subject(); + urls: Observable = this.urlsSubject.asObservable(); protected baseUrl: string; protected webVaultUrl: string; @@ -139,6 +139,8 @@ export class EnvironmentService implements EnvironmentServiceAbstraction { this.eventsUrl = envUrls.events = urls.events; this.keyConnectorUrl = urls.keyConnector; // scimUrl is not saved to storage + + this.urlsSubject.next(); } async setUrls(urls: Urls): Promise { @@ -176,7 +178,7 @@ export class EnvironmentService implements EnvironmentServiceAbstraction { this.keyConnectorUrl = urls.keyConnector; this.scimUrl = urls.scim; - this.urlsSubject.next(urls); + this.urlsSubject.next(); return urls; } From 2b65b3f0f76e2e57080fd10b0fe15d710e386d91 Mon Sep 17 00:00:00 2001 From: Robyn MacCallum Date: Wed, 14 Jun 2023 08:38:24 -0400 Subject: [PATCH 19/22] [AC-1383] Move collections to Vault (#5424) * Move CollectionDialog to Vault * Fix CollectionDialogModule imports * Move CollectionAdminService and View to Vault * Move CollectionService to Vault * Split GroupService into internal and public facing classes * Move collection models to vault * lint spacing fix * Move collection spec file * Fix spec import * Update apps/web/src/app/core/core.module.ts Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com> * Remove CoreOrganizationModule from CollectionDialogModule --------- Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com> --- .../browser/src/background/main.background.ts | 4 +- .../vault-timeout-service.factory.ts | 8 +-- .../models/browserGroupingsComponentState.ts | 2 +- .../src/popup/services/services.module.ts | 2 +- .../collection-service.factory.ts | 4 +- .../components/vault/add-edit.component.ts | 2 +- .../components/vault/collections.component.ts | 2 +- .../popup/components/vault/share.component.ts | 2 +- .../vault/vault-filter.component.ts | 2 +- .../components/vault/vault-items.component.ts | 4 +- .../vault/services/vault-filter.service.ts | 2 +- .../organization-collection.response.ts | 5 +- apps/cli/src/bw.ts | 2 +- apps/cli/src/commands/edit.command.ts | 2 +- apps/cli/src/commands/get.command.ts | 6 +-- apps/cli/src/commands/list.command.ts | 16 +++--- apps/cli/src/utils.ts | 2 +- apps/cli/src/vault/create.command.ts | 2 +- .../models}/collection.response.ts | 4 +- apps/desktop/src/app/app.component.ts | 2 +- .../src/vault/app/vault/add-edit.component.ts | 2 +- .../vault/app/vault/collections.component.ts | 2 +- .../src/vault/app/vault/share.component.ts | 2 +- .../core/services/group/group.service.ts | 53 +++++++++++-------- .../organizations/core/services/index.ts | 1 - .../organizations/core/views/index.ts | 1 - .../manage/group-add-edit.component.ts | 10 ++-- .../organizations/manage/groups.component.ts | 18 +++---- .../member-dialog/member-dialog.component.ts | 4 +- .../organizations/members/people.component.ts | 8 +-- .../organizations/shared/index.ts | 1 - .../shared/shared-organization.module.ts | 5 +- .../import-export/org-import-export.module.ts | 2 +- apps/web/src/app/app.component.ts | 2 +- .../emergency-add-edit.component.ts | 2 +- apps/web/src/app/core/core.module.ts | 2 + apps/web/src/app/core/state/state.service.ts | 2 +- .../import-export/import-export.module.ts | 2 +- .../collection-dialog.component.html | 0 .../collection-dialog.component.ts | 21 ++++---- .../collection-dialog.module.ts | 5 +- .../components/collection-dialog/index.ts | 0 .../vault-items/vault-cipher-row.component.ts | 2 +- .../vault-collection-row.component.ts | 5 +- .../vault-items/vault-item-event.ts | 2 +- .../components/vault-items/vault-item.ts | 2 +- .../vault-items/vault-items.component.ts | 5 +- .../vault-items/vault-items.stories.ts | 2 +- .../core}/collection-admin.service.ts | 13 +++-- .../core/views/collection-admin.view.ts | 6 +-- .../individual-vault/add-edit.component.ts | 2 +- .../bulk-share-dialog.component.ts | 4 +- .../individual-vault/collections.component.ts | 4 +- .../pipes/get-collection-name.pipe.ts | 2 +- .../vault/individual-vault/share.component.ts | 4 +- .../abstractions/vault-filter.service.ts | 2 +- .../services/vault-filter.service.spec.ts | 2 +- .../services/vault-filter.service.ts | 4 +- .../shared/models/vault-filter.model.spec.ts | 2 +- .../shared/models/vault-filter.type.ts | 2 +- .../vault-header/vault-header.component.ts | 2 +- .../vault/individual-vault/vault.component.ts | 4 +- .../vault/individual-vault/vault.module.ts | 2 + .../app/vault/org-vault/add-edit.component.ts | 2 +- .../collection-name.badge.component.ts | 2 +- .../vault/org-vault/collections.component.ts | 2 +- .../vault-filter/vault-filter.service.ts | 6 +-- .../vault-header/vault-header.component.ts | 8 ++- .../app/vault/org-vault/vault.component.ts | 17 +++--- .../src/app/vault/org-vault/vault.module.ts | 2 + .../app/vault/utils/collection-utils.spec.ts | 2 +- .../src/app/vault/utils/collection-utils.ts | 8 +-- .../components/collections.component.ts | 4 +- .../angular/src/components/share.component.ts | 4 +- .../src/services/jslib-services.module.ts | 4 +- .../deprecated-vault-filter.service.ts | 2 +- .../vault/components/add-edit.component.ts | 4 +- .../components/collection-filter.component.ts | 2 +- .../components/vault-filter.component.ts | 2 +- .../services/vault-filter.service.ts | 4 +- libs/common/src/abstractions/api.service.ts | 10 ++-- .../response/organization-export.response.ts | 3 +- .../export/collection-with-id.export.ts | 4 +- .../src/models/export/collection.export.ts | 4 +- .../import-organization-ciphers.request.ts | 2 +- .../platform/abstractions/state.service.ts | 4 +- .../src/platform/models/domain/account.ts | 4 +- .../services/state-migration.service.ts | 2 +- .../src/platform/services/state.service.ts | 4 +- libs/common/src/services/api.service.ts | 10 ++-- .../vaultTimeout/vaultTimeout.service.ts | 2 +- .../abstractions/collection.service.ts | 0 .../models/data/collection.data.ts | 0 .../models/domain/collection.spec.ts | 0 .../models/domain/collection.ts | 0 .../request/collection-with-id.request.ts | 3 +- .../models/request/collection.request.ts | 3 +- .../models/response/collection.response.ts | 3 +- .../vault/models/response/sync.response.ts | 2 +- .../models/view/collection.view.ts | 0 .../services/collection.service.ts | 2 +- .../src/vault/services/sync/sync.service.ts | 6 +-- .../services/vault-export.service.ts | 8 +-- libs/importer/src/importers/base-importer.ts | 2 +- .../bitwarden/bitwarden-csv-importer.ts | 2 +- .../src/importers/padlock-csv-importer.ts | 2 +- .../src/importers/passpack-csv-importer.ts | 2 +- libs/importer/src/models/import-result.ts | 2 +- .../src/services/import.service.spec.ts | 2 +- libs/importer/src/services/import.service.ts | 4 +- 110 files changed, 229 insertions(+), 231 deletions(-) rename apps/browser/src/{admin-console/background/service-factories => vault/background/service_factories}/collection-service.factory.ts (88%) rename apps/cli/src/{admin-console/models/response => vault/models}/collection.response.ts (65%) rename apps/web/src/app/{admin-console/organizations/shared => vault}/components/collection-dialog/collection-dialog.component.html (100%) rename apps/web/src/app/{admin-console/organizations/shared => vault}/components/collection-dialog/collection-dialog.component.ts (94%) rename apps/web/src/app/{admin-console/organizations/shared => vault}/components/collection-dialog/collection-dialog.module.ts (65%) rename apps/web/src/app/{admin-console/organizations/shared => vault}/components/collection-dialog/index.ts (100%) rename apps/web/src/app/{admin-console/organizations/core/services => vault/core}/collection-admin.service.ts (91%) rename apps/web/src/app/{admin-console/organizations => vault}/core/views/collection-admin.view.ts (73%) rename libs/common/src/{admin-console => vault}/abstractions/collection.service.ts (100%) rename libs/common/src/{admin-console => vault}/models/data/collection.data.ts (100%) rename libs/common/src/{admin-console => vault}/models/domain/collection.spec.ts (100%) rename libs/common/src/{admin-console => vault}/models/domain/collection.ts (100%) rename libs/common/src/{admin-console => vault}/models/request/collection-with-id.request.ts (80%) rename libs/common/src/{admin-console => vault}/models/request/collection.request.ts (79%) rename libs/common/src/{admin-console => vault}/models/response/collection.response.ts (92%) rename libs/common/src/{admin-console => vault}/models/view/collection.view.ts (100%) rename libs/common/src/{admin-console => vault}/services/collection.service.ts (99%) diff --git a/apps/browser/src/background/main.background.ts b/apps/browser/src/background/main.background.ts index 4091e807f97..0437fa55e03 100644 --- a/apps/browser/src/background/main.background.ts +++ b/apps/browser/src/background/main.background.ts @@ -11,12 +11,10 @@ import { UserVerificationApiServiceAbstraction } from "@bitwarden/common/abstrac import { UserVerificationService as UserVerificationServiceAbstraction } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { VaultTimeoutService as VaultTimeoutServiceAbstraction } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; import { VaultTimeoutSettingsService as VaultTimeoutSettingsServiceAbstraction } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service"; -import { CollectionService as CollectionServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { InternalOrganizationService as InternalOrganizationServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; import { InternalPolicyService as InternalPolicyServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { ProviderService as ProviderServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/provider.service"; -import { CollectionService } from "@bitwarden/common/admin-console/services/collection.service"; import { PolicyApiService } from "@bitwarden/common/admin-console/services/policy/policy-api.service"; import { ProviderService } from "@bitwarden/common/admin-console/services/provider.service"; import { AuthService as AuthServiceAbstraction } from "@bitwarden/common/auth/abstractions/auth.service"; @@ -83,6 +81,7 @@ import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.s import { SendApiService as SendApiServiceAbstraction } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { InternalSendService as InternalSendServiceAbstraction } from "@bitwarden/common/tools/send/services/send.service.abstraction"; import { CipherService as CipherServiceAbstraction } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService as CollectionServiceAbstraction } from "@bitwarden/common/vault/abstractions/collection.service"; import { CipherFileUploadService as CipherFileUploadServiceAbstraction } from "@bitwarden/common/vault/abstractions/file-upload/cipher-file-upload.service"; import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction"; import { InternalFolderService as InternalFolderServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; @@ -90,6 +89,7 @@ import { SyncNotifierService as SyncNotifierServiceAbstraction } from "@bitwarde import { SyncService as SyncServiceAbstraction } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { CipherService } from "@bitwarden/common/vault/services/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/services/collection.service"; import { CipherFileUploadService } from "@bitwarden/common/vault/services/file-upload/cipher-file-upload.service"; import { FolderApiService } from "@bitwarden/common/vault/services/folder/folder-api.service"; import { SyncNotifierService } from "@bitwarden/common/vault/services/sync/sync-notifier.service"; diff --git a/apps/browser/src/background/service-factories/vault-timeout-service.factory.ts b/apps/browser/src/background/service-factories/vault-timeout-service.factory.ts index f3f97803d1e..601867ad385 100644 --- a/apps/browser/src/background/service-factories/vault-timeout-service.factory.ts +++ b/apps/browser/src/background/service-factories/vault-timeout-service.factory.ts @@ -1,9 +1,5 @@ import { VaultTimeoutService as AbstractVaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; -import { - collectionServiceFactory, - CollectionServiceInitOptions, -} from "../../admin-console/background/service-factories/collection-service.factory"; import { authServiceFactory, AuthServiceInitOptions, @@ -38,6 +34,10 @@ import { cipherServiceFactory, CipherServiceInitOptions, } from "../../vault/background/service_factories/cipher-service.factory"; +import { + collectionServiceFactory, + CollectionServiceInitOptions, +} from "../../vault/background/service_factories/collection-service.factory"; import { folderServiceFactory, FolderServiceInitOptions, diff --git a/apps/browser/src/models/browserGroupingsComponentState.ts b/apps/browser/src/models/browserGroupingsComponentState.ts index f47a9ff6ac6..57e80216c23 100644 --- a/apps/browser/src/models/browserGroupingsComponentState.ts +++ b/apps/browser/src/models/browserGroupingsComponentState.ts @@ -1,8 +1,8 @@ -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { Utils } from "@bitwarden/common/platform/misc/utils"; import { DeepJsonify } from "@bitwarden/common/types/deep-jsonify"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; import { BrowserComponentState } from "./browserComponentState"; diff --git a/apps/browser/src/popup/services/services.module.ts b/apps/browser/src/popup/services/services.module.ts index 5a7ca533701..1b3244064bf 100644 --- a/apps/browser/src/popup/services/services.module.ts +++ b/apps/browser/src/popup/services/services.module.ts @@ -18,7 +18,6 @@ import { TotpService } from "@bitwarden/common/abstractions/totp.service"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; import { @@ -71,6 +70,7 @@ import { SendService, } from "@bitwarden/common/tools/send/services/send.service.abstraction"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { CipherFileUploadService } from "@bitwarden/common/vault/abstractions/file-upload/cipher-file-upload.service"; import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction"; import { diff --git a/apps/browser/src/admin-console/background/service-factories/collection-service.factory.ts b/apps/browser/src/vault/background/service_factories/collection-service.factory.ts similarity index 88% rename from apps/browser/src/admin-console/background/service-factories/collection-service.factory.ts rename to apps/browser/src/vault/background/service_factories/collection-service.factory.ts index dcf48537b37..323eebe27d1 100644 --- a/apps/browser/src/admin-console/background/service-factories/collection-service.factory.ts +++ b/apps/browser/src/vault/background/service_factories/collection-service.factory.ts @@ -1,5 +1,5 @@ -import { CollectionService as AbstractCollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; -import { CollectionService } from "@bitwarden/common/admin-console/services/collection.service"; +import { CollectionService as AbstractCollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; +import { CollectionService } from "@bitwarden/common/vault/services/collection.service"; import { cryptoServiceFactory, diff --git a/apps/browser/src/vault/popup/components/vault/add-edit.component.ts b/apps/browser/src/vault/popup/components/vault/add-edit.component.ts index f6e8c1f03b6..68a63fb062d 100644 --- a/apps/browser/src/vault/popup/components/vault/add-edit.component.ts +++ b/apps/browser/src/vault/popup/components/vault/add-edit.component.ts @@ -7,7 +7,6 @@ import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/vault/components/add-edit.component"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @@ -17,6 +16,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; diff --git a/apps/browser/src/vault/popup/components/vault/collections.component.ts b/apps/browser/src/vault/popup/components/vault/collections.component.ts index 1b7570eaf6e..d4615e165b2 100644 --- a/apps/browser/src/vault/popup/components/vault/collections.component.ts +++ b/apps/browser/src/vault/popup/components/vault/collections.component.ts @@ -4,11 +4,11 @@ import { ActivatedRoute } from "@angular/router"; import { first } from "rxjs/operators"; import { CollectionsComponent as BaseCollectionsComponent } from "@bitwarden/angular/admin-console/components/collections.component"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; @Component({ selector: "app-vault-collections", diff --git a/apps/browser/src/vault/popup/components/vault/share.component.ts b/apps/browser/src/vault/popup/components/vault/share.component.ts index e6103b4f261..80188646baf 100644 --- a/apps/browser/src/vault/popup/components/vault/share.component.ts +++ b/apps/browser/src/vault/popup/components/vault/share.component.ts @@ -3,12 +3,12 @@ import { ActivatedRoute, Router } from "@angular/router"; import { first } from "rxjs/operators"; import { ShareComponent as BaseShareComponent } from "@bitwarden/angular/components/share.component"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; @Component({ selector: "app-vault-share", diff --git a/apps/browser/src/vault/popup/components/vault/vault-filter.component.ts b/apps/browser/src/vault/popup/components/vault/vault-filter.component.ts index 1b41a9d0a1b..4be0fe89fe1 100644 --- a/apps/browser/src/vault/popup/components/vault/vault-filter.component.ts +++ b/apps/browser/src/vault/popup/components/vault/vault-filter.component.ts @@ -6,7 +6,6 @@ import { first } from "rxjs/operators"; import { VaultFilter } from "@bitwarden/angular/vault/vault-filter/models/vault-filter.model"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @@ -15,6 +14,7 @@ import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.servi import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; import { BrowserGroupingsComponentState } from "../../../../models/browserGroupingsComponentState"; diff --git a/apps/browser/src/vault/popup/components/vault/vault-items.component.ts b/apps/browser/src/vault/popup/components/vault/vault-items.component.ts index 1ce8b3ab41b..59d7ae92c28 100644 --- a/apps/browser/src/vault/popup/components/vault/vault-items.component.ts +++ b/apps/browser/src/vault/popup/components/vault/vault-items.component.ts @@ -6,17 +6,17 @@ import { first } from "rxjs/operators"; import { VaultItemsComponent as BaseVaultItemsComponent } from "@bitwarden/angular/vault/components/vault-items.component"; import { VaultFilter } from "@bitwarden/angular/vault/vault-filter/models/vault-filter.model"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; import { BrowserComponentState } from "../../../../models/browserComponentState"; diff --git a/apps/browser/src/vault/services/vault-filter.service.ts b/apps/browser/src/vault/services/vault-filter.service.ts index 4b8b9de7085..1caf54fe55b 100644 --- a/apps/browser/src/vault/services/vault-filter.service.ts +++ b/apps/browser/src/vault/services/vault-filter.service.ts @@ -1,10 +1,10 @@ import { VaultFilter } from "@bitwarden/angular/vault/vault-filter/models/vault-filter.model"; import { VaultFilterService as BaseVaultFilterService } from "@bitwarden/angular/vault/vault-filter/services/vault-filter.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; diff --git a/apps/cli/src/admin-console/models/response/organization-collection.response.ts b/apps/cli/src/admin-console/models/response/organization-collection.response.ts index d58676ad4ea..ca47a4b0741 100644 --- a/apps/cli/src/admin-console/models/response/organization-collection.response.ts +++ b/apps/cli/src/admin-console/models/response/organization-collection.response.ts @@ -1,9 +1,8 @@ -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; +import { CollectionResponse } from "../../../vault/models/collection.response"; import { SelectionReadOnly } from "../selection-read-only"; -import { CollectionResponse } from "./collection.response"; - export class OrganizationCollectionResponse extends CollectionResponse { groups: SelectionReadOnly[]; diff --git a/apps/cli/src/bw.ts b/apps/cli/src/bw.ts index 70b19612348..29c1443a713 100644 --- a/apps/cli/src/bw.ts +++ b/apps/cli/src/bw.ts @@ -7,7 +7,6 @@ import * as jsdom from "jsdom"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; -import { CollectionService } from "@bitwarden/common/admin-console/services/collection.service"; import { OrganizationApiService } from "@bitwarden/common/admin-console/services/organization/organization-api.service"; import { OrganizationService } from "@bitwarden/common/admin-console/services/organization/organization.service"; import { PolicyApiService } from "@bitwarden/common/admin-console/services/policy/policy-api.service"; @@ -53,6 +52,7 @@ import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.s import { SendService } from "@bitwarden/common/tools/send/services/send.service"; import { InternalFolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { CipherService } from "@bitwarden/common/vault/services/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/services/collection.service"; import { CipherFileUploadService } from "@bitwarden/common/vault/services/file-upload/cipher-file-upload.service"; import { FolderApiService } from "@bitwarden/common/vault/services/folder/folder-api.service"; import { FolderService } from "@bitwarden/common/vault/services/folder/folder.service"; diff --git a/apps/cli/src/commands/edit.command.ts b/apps/cli/src/commands/edit.command.ts index e0b81e914ec..960b0999146 100644 --- a/apps/cli/src/commands/edit.command.ts +++ b/apps/cli/src/commands/edit.command.ts @@ -1,5 +1,4 @@ import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CollectionRequest } from "@bitwarden/common/admin-console/models/request/collection.request"; import { SelectionReadOnlyRequest } from "@bitwarden/common/admin-console/models/request/selection-read-only.request"; import { CipherExport } from "@bitwarden/common/models/export/cipher.export"; import { CollectionExport } from "@bitwarden/common/models/export/collection.export"; @@ -9,6 +8,7 @@ import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; +import { CollectionRequest } from "@bitwarden/common/vault/models/request/collection.request"; import { OrganizationCollectionRequest } from "../admin-console/models/request/organization-collection.request"; import { OrganizationCollectionResponse } from "../admin-console/models/response/organization-collection.response"; diff --git a/apps/cli/src/commands/get.command.ts b/apps/cli/src/commands/get.command.ts index 5ef7e1e17db..44a94fb430d 100644 --- a/apps/cli/src/commands/get.command.ts +++ b/apps/cli/src/commands/get.command.ts @@ -2,10 +2,8 @@ import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { CardExport } from "@bitwarden/common/models/export/card.export"; import { CipherExport } from "@bitwarden/common/models/export/cipher.export"; import { CollectionExport } from "@bitwarden/common/models/export/collection.export"; @@ -22,13 +20,14 @@ import { Utils } from "@bitwarden/common/platform/misc/utils"; import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; import { OrganizationCollectionRequest } from "../admin-console/models/request/organization-collection.request"; -import { CollectionResponse } from "../admin-console/models/response/collection.response"; import { OrganizationCollectionResponse } from "../admin-console/models/response/organization-collection.response"; import { OrganizationResponse } from "../admin-console/models/response/organization.response"; import { SelectionReadOnly } from "../admin-console/models/selection-read-only"; @@ -38,6 +37,7 @@ import { TemplateResponse } from "../models/response/template.response"; import { SendResponse } from "../tools/send/models/send.response"; import { CliUtils } from "../utils"; import { CipherResponse } from "../vault/models/cipher.response"; +import { CollectionResponse } from "../vault/models/collection.response"; import { FolderResponse } from "../vault/models/folder.response"; import { DownloadCommand } from "./download.command"; diff --git a/apps/cli/src/commands/list.command.ts b/apps/cli/src/commands/list.command.ts index 59c2b92e74f..8b94eb59822 100644 --- a/apps/cli/src/commands/list.command.ts +++ b/apps/cli/src/commands/list.command.ts @@ -1,27 +1,27 @@ import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; -import { CollectionData } from "@bitwarden/common/admin-console/models/data/collection.data"; -import { Collection } from "@bitwarden/common/admin-console/models/domain/collection"; -import { - CollectionDetailsResponse as ApiCollectionDetailsResponse, - CollectionResponse as ApiCollectionResponse, -} from "@bitwarden/common/admin-console/models/response/collection.response"; import { ListResponse as ApiListResponse } from "@bitwarden/common/models/response/list.response"; import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; +import { CollectionData } from "@bitwarden/common/vault/models/data/collection.data"; +import { Collection } from "@bitwarden/common/vault/models/domain/collection"; +import { + CollectionDetailsResponse as ApiCollectionDetailsResponse, + CollectionResponse as ApiCollectionResponse, +} from "@bitwarden/common/vault/models/response/collection.response"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; -import { CollectionResponse } from "../admin-console/models/response/collection.response"; import { OrganizationUserResponse } from "../admin-console/models/response/organization-user.response"; import { OrganizationResponse } from "../admin-console/models/response/organization.response"; import { Response } from "../models/response"; import { ListResponse } from "../models/response/list.response"; import { CliUtils } from "../utils"; import { CipherResponse } from "../vault/models/cipher.response"; +import { CollectionResponse } from "../vault/models/collection.response"; import { FolderResponse } from "../vault/models/folder.response"; export class ListCommand { diff --git a/apps/cli/src/utils.ts b/apps/cli/src/utils.ts index 42f1482b694..d5e442ded19 100644 --- a/apps/cli/src/utils.ts +++ b/apps/cli/src/utils.ts @@ -5,10 +5,10 @@ import * as inquirer from "inquirer"; import * as JSZip from "jszip"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { NodeUtils } from "@bitwarden/common/misc/nodeUtils"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; import { Response } from "./models/response"; diff --git a/apps/cli/src/vault/create.command.ts b/apps/cli/src/vault/create.command.ts index d98221dc39c..49a61e6e59d 100644 --- a/apps/cli/src/vault/create.command.ts +++ b/apps/cli/src/vault/create.command.ts @@ -2,7 +2,6 @@ import * as fs from "fs"; import * as path from "path"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CollectionRequest } from "@bitwarden/common/admin-console/models/request/collection.request"; import { SelectionReadOnlyRequest } from "@bitwarden/common/admin-console/models/request/selection-read-only.request"; import { CipherExport } from "@bitwarden/common/models/export/cipher.export"; import { CollectionExport } from "@bitwarden/common/models/export/collection.export"; @@ -13,6 +12,7 @@ import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; +import { CollectionRequest } from "@bitwarden/common/vault/models/request/collection.request"; import { OrganizationCollectionRequest } from "../admin-console/models/request/organization-collection.request"; import { OrganizationCollectionResponse } from "../admin-console/models/response/organization-collection.response"; diff --git a/apps/cli/src/admin-console/models/response/collection.response.ts b/apps/cli/src/vault/models/collection.response.ts similarity index 65% rename from apps/cli/src/admin-console/models/response/collection.response.ts rename to apps/cli/src/vault/models/collection.response.ts index 317249829fd..4cdb4bb59e6 100644 --- a/apps/cli/src/admin-console/models/response/collection.response.ts +++ b/apps/cli/src/vault/models/collection.response.ts @@ -1,7 +1,7 @@ -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { CollectionWithIdExport } from "@bitwarden/common/models/export/collection-with-id.export"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; -import { BaseResponse } from "../../../models/response/base.response"; +import { BaseResponse } from "../../models/response/base.response"; export class CollectionResponse extends CollectionWithIdExport implements BaseResponse { object: string; diff --git a/apps/desktop/src/app/app.component.ts b/apps/desktop/src/app/app.component.ts index 3ffd2277c4b..d3829d4e638 100644 --- a/apps/desktop/src/app/app.component.ts +++ b/apps/desktop/src/app/app.component.ts @@ -22,7 +22,6 @@ import { SearchService } from "@bitwarden/common/abstractions/search.service"; import { SettingsService } from "@bitwarden/common/abstractions/settings.service"; import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { InternalPolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; @@ -39,6 +38,7 @@ import { StateService } from "@bitwarden/common/platform/abstractions/state.serv import { SystemService } from "@bitwarden/common/platform/abstractions/system.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { InternalFolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; diff --git a/apps/desktop/src/vault/app/vault/add-edit.component.ts b/apps/desktop/src/vault/app/vault/add-edit.component.ts index d06f37dc08d..aa7eba32838 100644 --- a/apps/desktop/src/vault/app/vault/add-edit.component.ts +++ b/apps/desktop/src/vault/app/vault/add-edit.component.ts @@ -5,7 +5,6 @@ import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/vault/components/add-edit.component"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; @@ -16,6 +15,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; diff --git a/apps/desktop/src/vault/app/vault/collections.component.ts b/apps/desktop/src/vault/app/vault/collections.component.ts index 1b596c9c6a8..b9ad3ecfcf2 100644 --- a/apps/desktop/src/vault/app/vault/collections.component.ts +++ b/apps/desktop/src/vault/app/vault/collections.component.ts @@ -1,11 +1,11 @@ import { Component } from "@angular/core"; import { CollectionsComponent as BaseCollectionsComponent } from "@bitwarden/angular/admin-console/components/collections.component"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; @Component({ selector: "app-vault-collections", diff --git a/apps/desktop/src/vault/app/vault/share.component.ts b/apps/desktop/src/vault/app/vault/share.component.ts index e07a100d882..99d81f44a15 100644 --- a/apps/desktop/src/vault/app/vault/share.component.ts +++ b/apps/desktop/src/vault/app/vault/share.component.ts @@ -2,12 +2,12 @@ import { Component } from "@angular/core"; import { ModalRef } from "@bitwarden/angular/components/modal/modal.ref"; import { ShareComponent as BaseShareComponent } from "@bitwarden/angular/components/share.component"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; @Component({ selector: "app-vault-share", diff --git a/apps/web/src/app/admin-console/organizations/core/services/group/group.service.ts b/apps/web/src/app/admin-console/organizations/core/services/group/group.service.ts index 772fbd3cf48..680c358b1fb 100644 --- a/apps/web/src/app/admin-console/organizations/core/services/group/group.service.ts +++ b/apps/web/src/app/admin-console/organizations/core/services/group/group.service.ts @@ -11,29 +11,11 @@ import { GroupRequest } from "./requests/group.request"; import { OrganizationGroupBulkRequest } from "./requests/organization-group-bulk.request"; import { GroupDetailsResponse, GroupResponse } from "./responses/group.response"; -@Injectable({ providedIn: CoreOrganizationModule }) +@Injectable({ + providedIn: "root", +}) export class GroupService { - constructor(private apiService: ApiService) {} - - async delete(orgId: string, groupId: string): Promise { - await this.apiService.send( - "DELETE", - "/organizations/" + orgId + "/groups/" + groupId, - null, - true, - false - ); - } - - async deleteMany(orgId: string, groupIds: string[]): Promise { - await this.apiService.send( - "DELETE", - "/organizations/" + orgId + "/groups", - new OrganizationGroupBulkRequest(groupIds), - true, - true - ); - } + constructor(protected apiService: ApiService) {} async get(orgId: string, groupId: string): Promise { const r = await this.apiService.send( @@ -60,6 +42,33 @@ export class GroupService { return listResponse.data?.map((gr) => GroupView.fromResponse(gr)) ?? []; } +} + +@Injectable({ providedIn: CoreOrganizationModule }) +export class InternalGroupService extends GroupService { + constructor(protected apiService: ApiService) { + super(apiService); + } + + async delete(orgId: string, groupId: string): Promise { + await this.apiService.send( + "DELETE", + "/organizations/" + orgId + "/groups/" + groupId, + null, + true, + false + ); + } + + async deleteMany(orgId: string, groupIds: string[]): Promise { + await this.apiService.send( + "DELETE", + "/organizations/" + orgId + "/groups", + new OrganizationGroupBulkRequest(groupIds), + true, + true + ); + } async save(group: GroupView): Promise { const request = new GroupRequest(); diff --git a/apps/web/src/app/admin-console/organizations/core/services/index.ts b/apps/web/src/app/admin-console/organizations/core/services/index.ts index 1e670faccd6..627cb2416ae 100644 --- a/apps/web/src/app/admin-console/organizations/core/services/index.ts +++ b/apps/web/src/app/admin-console/organizations/core/services/index.ts @@ -1,3 +1,2 @@ export * from "./group/group.service"; -export * from "./collection-admin.service"; export * from "./user-admin.service"; diff --git a/apps/web/src/app/admin-console/organizations/core/views/index.ts b/apps/web/src/app/admin-console/organizations/core/views/index.ts index e7ba6859901..ef14753c48a 100644 --- a/apps/web/src/app/admin-console/organizations/core/views/index.ts +++ b/apps/web/src/app/admin-console/organizations/core/views/index.ts @@ -1,5 +1,4 @@ export * from "./collection-access-selection.view"; -export * from "./collection-admin.view"; export * from "./group.view"; export * from "./organization-user.view"; export * from "./organization-user-admin-view"; diff --git a/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.ts b/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.ts index 433c6049f6a..11b32f430be 100644 --- a/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.ts +++ b/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.ts @@ -6,16 +6,16 @@ import { catchError, combineLatest, from, map, of, Subject, switchMap, takeUntil import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; -import { CollectionData } from "@bitwarden/common/admin-console/models/data/collection.data"; -import { Collection } from "@bitwarden/common/admin-console/models/domain/collection"; -import { CollectionDetailsResponse } from "@bitwarden/common/admin-console/models/response/collection.response"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; +import { CollectionData } from "@bitwarden/common/vault/models/data/collection.data"; +import { Collection } from "@bitwarden/common/vault/models/domain/collection"; +import { CollectionDetailsResponse } from "@bitwarden/common/vault/models/response/collection.response"; -import { GroupService, GroupView } from "../core"; +import { InternalGroupService as GroupService, GroupView } from "../core"; import { AccessItemType, AccessItemValue, diff --git a/apps/web/src/app/admin-console/organizations/manage/groups.component.ts b/apps/web/src/app/admin-console/organizations/manage/groups.component.ts index 24eb9305858..82e5acba213 100644 --- a/apps/web/src/app/admin-console/organizations/manage/groups.component.ts +++ b/apps/web/src/app/admin-console/organizations/manage/groups.component.ts @@ -19,21 +19,21 @@ import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/s import { ModalService } from "@bitwarden/angular/services/modal.service"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; -import { CollectionData } from "@bitwarden/common/admin-console/models/data/collection.data"; -import { Collection } from "@bitwarden/common/admin-console/models/domain/collection"; -import { - CollectionDetailsResponse, - CollectionResponse, -} from "@bitwarden/common/admin-console/models/response/collection.response"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { ListResponse } from "@bitwarden/common/models/response/list.response"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; +import { CollectionData } from "@bitwarden/common/vault/models/data/collection.data"; +import { Collection } from "@bitwarden/common/vault/models/domain/collection"; +import { + CollectionDetailsResponse, + CollectionResponse, +} from "@bitwarden/common/vault/models/response/collection.response"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; -import { GroupService, GroupView } from "../core"; +import { InternalGroupService as GroupService, GroupView } from "../core"; import { GroupAddEditDialogResultType, diff --git a/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.ts b/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.ts index 72833a09719..5a707b795f5 100644 --- a/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.ts +++ b/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.ts @@ -12,14 +12,14 @@ import { } from "@bitwarden/common/admin-console/enums"; import { PermissionsApi } from "@bitwarden/common/admin-console/models/api/permissions.api"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { flagEnabled } from "../../../../../../utils/flags"; +import { CollectionAdminService } from "../../../../../vault/core/collection-admin.service"; import { CollectionAccessSelectionView, - CollectionAdminService, GroupService, GroupView, OrganizationUserAdminView, diff --git a/apps/web/src/app/admin-console/organizations/members/people.component.ts b/apps/web/src/app/admin-console/organizations/members/people.component.ts index 33241604976..e86b5a27ec4 100644 --- a/apps/web/src/app/admin-console/organizations/members/people.component.ts +++ b/apps/web/src/app/admin-console/organizations/members/people.component.ts @@ -30,7 +30,6 @@ import { OrganizationUserUserDetailsResponse, } from "@bitwarden/common/abstractions/organization-user/responses"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyApiServiceAbstraction as PolicyApiService } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction"; @@ -40,11 +39,8 @@ import { OrganizationUserType, PolicyType, } from "@bitwarden/common/admin-console/enums"; -import { CollectionData } from "@bitwarden/common/admin-console/models/data/collection.data"; -import { Collection } from "@bitwarden/common/admin-console/models/domain/collection"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { OrganizationKeysRequest } from "@bitwarden/common/admin-console/models/request/organization-keys.request"; -import { CollectionDetailsResponse } from "@bitwarden/common/admin-console/models/response/collection.response"; import { ProductType } from "@bitwarden/common/enums"; import { ListResponse } from "@bitwarden/common/models/response/list.response"; import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; @@ -53,7 +49,11 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service" import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; +import { CollectionData } from "@bitwarden/common/vault/models/data/collection.data"; +import { Collection } from "@bitwarden/common/vault/models/domain/collection"; +import { CollectionDetailsResponse } from "@bitwarden/common/vault/models/response/collection.response"; import { EntityEventsComponent } from "../../../admin-console/organizations/manage/entity-events.component"; import { BasePeopleComponent } from "../../../common/base.people.component"; diff --git a/apps/web/src/app/admin-console/organizations/shared/index.ts b/apps/web/src/app/admin-console/organizations/shared/index.ts index 24a7c9176b1..941a5ddd635 100644 --- a/apps/web/src/app/admin-console/organizations/shared/index.ts +++ b/apps/web/src/app/admin-console/organizations/shared/index.ts @@ -1,2 +1 @@ export * from "./shared-organization.module"; -export * from "./components/collection-dialog"; diff --git a/apps/web/src/app/admin-console/organizations/shared/shared-organization.module.ts b/apps/web/src/app/admin-console/organizations/shared/shared-organization.module.ts index 094a059099d..b749bdea499 100644 --- a/apps/web/src/app/admin-console/organizations/shared/shared-organization.module.ts +++ b/apps/web/src/app/admin-console/organizations/shared/shared-organization.module.ts @@ -5,11 +5,10 @@ import { SearchModule } from "@bitwarden/components"; import { SharedModule } from "../../../shared/shared.module"; import { AccessSelectorModule } from "./components/access-selector/access-selector.module"; -import { CollectionDialogModule } from "./components/collection-dialog"; @NgModule({ - imports: [SharedModule, CollectionDialogModule, AccessSelectorModule, SearchModule], + imports: [SharedModule, AccessSelectorModule, SearchModule], declarations: [], - exports: [SharedModule, CollectionDialogModule, AccessSelectorModule, SearchModule], + exports: [SharedModule, AccessSelectorModule, SearchModule], }) export class SharedOrganizationModule {} diff --git a/apps/web/src/app/admin-console/organizations/tools/import-export/org-import-export.module.ts b/apps/web/src/app/admin-console/organizations/tools/import-export/org-import-export.module.ts index 106b524caf6..e40e961ac98 100644 --- a/apps/web/src/app/admin-console/organizations/tools/import-export/org-import-export.module.ts +++ b/apps/web/src/app/admin-console/organizations/tools/import-export/org-import-export.module.ts @@ -1,10 +1,10 @@ import { NgModule } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { ImportService, diff --git a/apps/web/src/app/app.component.ts b/apps/web/src/app/app.component.ts index d7447c7a864..9a22ea20b41 100644 --- a/apps/web/src/app/app.component.ts +++ b/apps/web/src/app/app.component.ts @@ -13,7 +13,6 @@ import { NotificationsService } from "@bitwarden/common/abstractions/notificatio import { SearchService } from "@bitwarden/common/abstractions/search.service"; import { SettingsService } from "@bitwarden/common/abstractions/settings.service"; import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { InternalPolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; @@ -25,6 +24,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { InternalFolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; diff --git a/apps/web/src/app/auth/settings/emergency-access/emergency-add-edit.component.ts b/apps/web/src/app/auth/settings/emergency-access/emergency-add-edit.component.ts index e04175b890d..8c3269fbdb5 100644 --- a/apps/web/src/app/auth/settings/emergency-access/emergency-add-edit.component.ts +++ b/apps/web/src/app/auth/settings/emergency-access/emergency-add-edit.component.ts @@ -4,7 +4,6 @@ import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @@ -15,6 +14,7 @@ import { StateService } from "@bitwarden/common/platform/abstractions/state.serv import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password/"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { Cipher } from "@bitwarden/common/vault/models/domain/cipher"; diff --git a/apps/web/src/app/core/core.module.ts b/apps/web/src/app/core/core.module.ts index 69d08169f74..03f20ad2955 100644 --- a/apps/web/src/app/core/core.module.ts +++ b/apps/web/src/app/core/core.module.ts @@ -28,6 +28,7 @@ import { PolicyListService } from "../admin-console/core/policy-list.service"; import { HtmlStorageService } from "../core/html-storage.service"; import { I18nService } from "../core/i18n.service"; import { StateMigrationService } from "../core/state-migration.service"; +import { CollectionAdminService } from "../vault/core/collection-admin.service"; import { PasswordRepromptService } from "../vault/core/password-reprompt.service"; import { BroadcasterMessagingService } from "./broadcaster-messaging.service"; @@ -106,6 +107,7 @@ import { WebPlatformUtilsService } from "./web-platform-utils.service"; useClass: LoginService, deps: [StateService], }, + CollectionAdminService, ], }) export class CoreModule { diff --git a/apps/web/src/app/core/state/state.service.ts b/apps/web/src/app/core/state/state.service.ts index ca5d00a5e58..60f09ceae36 100644 --- a/apps/web/src/app/core/state/state.service.ts +++ b/apps/web/src/app/core/state/state.service.ts @@ -6,7 +6,6 @@ import { STATE_FACTORY, STATE_SERVICE_USE_CACHE, } from "@bitwarden/angular/services/injection-tokens"; -import { CollectionData } from "@bitwarden/common/admin-console/models/data/collection.data"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { StateMigrationService } from "@bitwarden/common/platform/abstractions/state-migration.service"; import { @@ -18,6 +17,7 @@ import { StorageOptions } from "@bitwarden/common/platform/models/domain/storage import { StateService as BaseStateService } from "@bitwarden/common/platform/services/state.service"; import { SendData } from "@bitwarden/common/tools/send/models/data/send.data"; import { CipherData } from "@bitwarden/common/vault/models/data/cipher.data"; +import { CollectionData } from "@bitwarden/common/vault/models/data/collection.data"; import { FolderData } from "@bitwarden/common/vault/models/data/folder.data"; import { Account } from "./account"; diff --git a/apps/web/src/app/tools/import-export/import-export.module.ts b/apps/web/src/app/tools/import-export/import-export.module.ts index 68338c23040..4d59f412367 100644 --- a/apps/web/src/app/tools/import-export/import-export.module.ts +++ b/apps/web/src/app/tools/import-export/import-export.module.ts @@ -1,10 +1,10 @@ import { NgModule } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { ImportService, diff --git a/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.html b/apps/web/src/app/vault/components/collection-dialog/collection-dialog.component.html similarity index 100% rename from apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.html rename to apps/web/src/app/vault/components/collection-dialog/collection-dialog.component.html diff --git a/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.ts b/apps/web/src/app/vault/components/collection-dialog/collection-dialog.component.ts similarity index 94% rename from apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.ts rename to apps/web/src/app/vault/components/collection-dialog/collection-dialog.component.ts index 2ac91bf0abd..ac3c62a5b80 100644 --- a/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.ts +++ b/apps/web/src/app/vault/components/collection-dialog/collection-dialog.component.ts @@ -8,25 +8,22 @@ import { OrganizationUserService } from "@bitwarden/common/abstractions/organiza import { OrganizationUserUserDetailsResponse } from "@bitwarden/common/abstractions/organization-user/responses"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { BitValidators } from "@bitwarden/components"; +import { GroupService, GroupView } from "../../../admin-console/organizations/core"; +import { PermissionMode } from "../../../admin-console/organizations/shared/components/access-selector/access-selector.component"; import { - CollectionAdminService, - CollectionAdminView, - GroupService, - GroupView, -} from "../../../core"; -import { - AccessItemType, - AccessItemValue, AccessItemView, - convertToPermission, + AccessItemValue, + AccessItemType, convertToSelectionView, - PermissionMode, -} from "../access-selector"; + convertToPermission, +} from "../../../admin-console/organizations/shared/components/access-selector/access-selector.models"; +import { CollectionAdminService } from "../../core/collection-admin.service"; +import { CollectionAdminView } from "../../core/views/collection-admin.view"; export enum CollectionDialogTabType { Info = 0, diff --git a/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.module.ts b/apps/web/src/app/vault/components/collection-dialog/collection-dialog.module.ts similarity index 65% rename from apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.module.ts rename to apps/web/src/app/vault/components/collection-dialog/collection-dialog.module.ts index 4f9b19e62ae..a8f284fb485 100644 --- a/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.module.ts +++ b/apps/web/src/app/vault/components/collection-dialog/collection-dialog.module.ts @@ -2,11 +2,10 @@ import { NgModule } from "@angular/core"; import { SelectModule } from "@bitwarden/components"; -import { AccessSelectorModule } from "../../../../../admin-console/organizations/shared/components/access-selector/access-selector.module"; -import { SharedModule } from "../../../../../shared"; +import { AccessSelectorModule } from "../../../admin-console/organizations/shared/components/access-selector/access-selector.module"; +import { SharedModule } from "../../../shared"; import { CollectionDialogComponent } from "./collection-dialog.component"; - @NgModule({ imports: [SharedModule, AccessSelectorModule, SelectModule], declarations: [CollectionDialogComponent], diff --git a/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/index.ts b/apps/web/src/app/vault/components/collection-dialog/index.ts similarity index 100% rename from apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/index.ts rename to apps/web/src/app/vault/components/collection-dialog/index.ts diff --git a/apps/web/src/app/vault/components/vault-items/vault-cipher-row.component.ts b/apps/web/src/app/vault/components/vault-items/vault-cipher-row.component.ts index abed3b320be..7bd9677c759 100644 --- a/apps/web/src/app/vault/components/vault-items/vault-cipher-row.component.ts +++ b/apps/web/src/app/vault/components/vault-items/vault-cipher-row.component.ts @@ -2,9 +2,9 @@ import { Component, EventEmitter, HostBinding, HostListener, Input, Output } fro import { ActivatedRoute, Router } from "@angular/router"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { VaultItemEvent } from "./vault-item-event"; import { RowHeightClass } from "./vault-items.component"; diff --git a/apps/web/src/app/vault/components/vault-items/vault-collection-row.component.ts b/apps/web/src/app/vault/components/vault-items/vault-collection-row.component.ts index 085d4653503..faee4e030b9 100644 --- a/apps/web/src/app/vault/components/vault-items/vault-collection-row.component.ts +++ b/apps/web/src/app/vault/components/vault-items/vault-collection-row.component.ts @@ -2,9 +2,10 @@ import { Component, EventEmitter, HostBinding, HostListener, Input, Output } fro import { ActivatedRoute, Router } from "@angular/router"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; -import { CollectionAdminView, GroupView } from "../../../admin-console/organizations/core"; +import { GroupView } from "../../../admin-console/organizations/core"; +import { CollectionAdminView } from "../../core/views/collection-admin.view"; import { VaultItemEvent } from "./vault-item-event"; import { RowHeightClass } from "./vault-items.component"; diff --git a/apps/web/src/app/vault/components/vault-items/vault-item-event.ts b/apps/web/src/app/vault/components/vault-items/vault-item-event.ts index 2643fcd7b13..cacd13829fb 100644 --- a/apps/web/src/app/vault/components/vault-items/vault-item-event.ts +++ b/apps/web/src/app/vault/components/vault-items/vault-item-event.ts @@ -1,4 +1,4 @@ -import { CollectionView } from "@bitwarden/common/src/admin-console/models/view/collection.view"; +import { CollectionView } from "@bitwarden/common/src/vault/models/view/collection.view"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { VaultItem } from "./vault-item"; diff --git a/apps/web/src/app/vault/components/vault-items/vault-item.ts b/apps/web/src/app/vault/components/vault-items/vault-item.ts index c8c91becdbe..642c707122a 100644 --- a/apps/web/src/app/vault/components/vault-items/vault-item.ts +++ b/apps/web/src/app/vault/components/vault-items/vault-item.ts @@ -1,5 +1,5 @@ -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; export interface VaultItem { collection?: CollectionView; diff --git a/apps/web/src/app/vault/components/vault-items/vault-items.component.ts b/apps/web/src/app/vault/components/vault-items/vault-items.component.ts index 4fcf0439920..8c9ad1ac065 100644 --- a/apps/web/src/app/vault/components/vault-items/vault-items.component.ts +++ b/apps/web/src/app/vault/components/vault-items/vault-items.component.ts @@ -2,11 +2,12 @@ import { SelectionModel } from "@angular/cdk/collections"; import { Component, EventEmitter, Input, Output } from "@angular/core"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { TableDataSource } from "@bitwarden/components"; -import { CollectionAdminView, GroupView } from "../../../admin-console/organizations/core"; +import { GroupView } from "../../../admin-console/organizations/core"; +import { CollectionAdminView } from "../../core/views/collection-admin.view"; import { Unassigned } from "../../individual-vault/vault-filter/shared/models/routed-vault-filter.model"; import { VaultItem } from "./vault-item"; diff --git a/apps/web/src/app/vault/components/vault-items/vault-items.stories.ts b/apps/web/src/app/vault/components/vault-items/vault-items.stories.ts index 99799436151..cfe5e41719a 100644 --- a/apps/web/src/app/vault/components/vault-items/vault-items.stories.ts +++ b/apps/web/src/app/vault/components/vault-items/vault-items.stories.ts @@ -19,10 +19,10 @@ import { LoginView } from "@bitwarden/common/vault/models/view/login.view"; import { CollectionAccessSelectionView, - CollectionAdminView, GroupView, } from "../../../admin-console/organizations/core"; import { PreloadedEnglishI18nModule } from "../../../core/tests"; +import { CollectionAdminView } from "../../core/views/collection-admin.view"; import { Unassigned } from "../../individual-vault/vault-filter/shared/models/routed-vault-filter.model"; import { VaultItemsComponent } from "./vault-items.component"; diff --git a/apps/web/src/app/admin-console/organizations/core/services/collection-admin.service.ts b/apps/web/src/app/vault/core/collection-admin.service.ts similarity index 91% rename from apps/web/src/app/admin-console/organizations/core/services/collection-admin.service.ts rename to apps/web/src/app/vault/core/collection-admin.service.ts index 85f3d9423f1..efeb3817eab 100644 --- a/apps/web/src/app/admin-console/organizations/core/services/collection-admin.service.ts +++ b/apps/web/src/app/vault/core/collection-admin.service.ts @@ -1,19 +1,18 @@ import { Injectable } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CollectionRequest } from "@bitwarden/common/admin-console/models/request/collection.request"; import { SelectionReadOnlyRequest } from "@bitwarden/common/admin-console/models/request/selection-read-only.request"; +import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; +import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +import { CollectionRequest } from "@bitwarden/common/vault/models/request/collection.request"; import { CollectionAccessDetailsResponse, CollectionResponse, -} from "@bitwarden/common/admin-console/models/response/collection.response"; -import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; -import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; +} from "@bitwarden/common/vault/models/response/collection.response"; -import { CoreOrganizationModule } from "../core-organization.module"; -import { CollectionAdminView } from "../views/collection-admin.view"; +import { CollectionAdminView } from "./views/collection-admin.view"; -@Injectable({ providedIn: CoreOrganizationModule }) +@Injectable() export class CollectionAdminService { constructor(private apiService: ApiService, private cryptoService: CryptoService) {} diff --git a/apps/web/src/app/admin-console/organizations/core/views/collection-admin.view.ts b/apps/web/src/app/vault/core/views/collection-admin.view.ts similarity index 73% rename from apps/web/src/app/admin-console/organizations/core/views/collection-admin.view.ts rename to apps/web/src/app/vault/core/views/collection-admin.view.ts index be38798379d..c97dab8422e 100644 --- a/apps/web/src/app/admin-console/organizations/core/views/collection-admin.view.ts +++ b/apps/web/src/app/vault/core/views/collection-admin.view.ts @@ -1,7 +1,7 @@ -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; -import { CollectionAccessDetailsResponse } from "@bitwarden/common/src/admin-console/models/response/collection.response"; +import { CollectionAccessDetailsResponse } from "@bitwarden/common/src/vault/models/response/collection.response"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; -import { CollectionAccessSelectionView } from "./collection-access-selection.view"; +import { CollectionAccessSelectionView } from "../../../admin-console/organizations/core/views/collection-access-selection.view"; export class CollectionAdminView extends CollectionView { groups: CollectionAccessSelectionView[] = []; diff --git a/apps/web/src/app/vault/individual-vault/add-edit.component.ts b/apps/web/src/app/vault/individual-vault/add-edit.component.ts index 548bddcd332..460942c3046 100644 --- a/apps/web/src/app/vault/individual-vault/add-edit.component.ts +++ b/apps/web/src/app/vault/individual-vault/add-edit.component.ts @@ -5,7 +5,6 @@ import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/vau import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { EventType, ProductType } from "@bitwarden/common/enums"; @@ -17,6 +16,7 @@ import { StateService } from "@bitwarden/common/platform/abstractions/state.serv import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; diff --git a/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-share-dialog/bulk-share-dialog.component.ts b/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-share-dialog/bulk-share-dialog.component.ts index 742f2bbef78..057ef71b338 100644 --- a/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-share-dialog/bulk-share-dialog.component.ts +++ b/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-share-dialog/bulk-share-dialog.component.ts @@ -2,16 +2,16 @@ import { DialogConfig, DialogRef, DIALOG_DATA } from "@angular/cdk/dialog"; import { Component, Inject, OnInit } from "@angular/core"; import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { Checkable, isChecked } from "@bitwarden/common/types/checkable"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; export interface BulkShareDialogParams { ciphers: CipherView[]; diff --git a/apps/web/src/app/vault/individual-vault/collections.component.ts b/apps/web/src/app/vault/individual-vault/collections.component.ts index 509833c7067..396e8760ec4 100644 --- a/apps/web/src/app/vault/individual-vault/collections.component.ts +++ b/apps/web/src/app/vault/individual-vault/collections.component.ts @@ -1,12 +1,12 @@ import { Component, OnDestroy } from "@angular/core"; import { CollectionsComponent as BaseCollectionsComponent } from "@bitwarden/angular/admin-console/components/collections.component"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; @Component({ selector: "app-vault-collections", diff --git a/apps/web/src/app/vault/individual-vault/pipes/get-collection-name.pipe.ts b/apps/web/src/app/vault/individual-vault/pipes/get-collection-name.pipe.ts index 45cadb4b039..e7e245a5340 100644 --- a/apps/web/src/app/vault/individual-vault/pipes/get-collection-name.pipe.ts +++ b/apps/web/src/app/vault/individual-vault/pipes/get-collection-name.pipe.ts @@ -1,6 +1,6 @@ import { Pipe, PipeTransform } from "@angular/core"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; @Pipe({ name: "collectionNameFromId", diff --git a/apps/web/src/app/vault/individual-vault/share.component.ts b/apps/web/src/app/vault/individual-vault/share.component.ts index f5c62644ff4..a85dd6cf4c1 100644 --- a/apps/web/src/app/vault/individual-vault/share.component.ts +++ b/apps/web/src/app/vault/individual-vault/share.component.ts @@ -1,13 +1,13 @@ import { Component, OnDestroy } from "@angular/core"; import { ShareComponent as BaseShareComponent } from "@bitwarden/angular/components/share.component"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; @Component({ selector: "app-vault-share", diff --git a/apps/web/src/app/vault/individual-vault/vault-filter/services/abstractions/vault-filter.service.ts b/apps/web/src/app/vault/individual-vault/vault-filter/services/abstractions/vault-filter.service.ts index 3a03a338e3a..0c8ced7df3a 100644 --- a/apps/web/src/app/vault/individual-vault/vault-filter/services/abstractions/vault-filter.service.ts +++ b/apps/web/src/app/vault/individual-vault/vault-filter/services/abstractions/vault-filter.service.ts @@ -1,8 +1,8 @@ import { Observable } from "rxjs"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/src/admin-console/models/view/collection.view"; import { TreeNode } from "@bitwarden/common/src/models/domain/tree-node"; +import { CollectionView } from "@bitwarden/common/src/vault/models/view/collection.view"; import { FolderView } from "@bitwarden/common/src/vault/models/view/folder.view"; import { diff --git a/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.spec.ts b/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.spec.ts index 42743f37f90..88f004262e5 100644 --- a/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.spec.ts +++ b/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.spec.ts @@ -5,12 +5,12 @@ import { OrganizationService } from "@bitwarden/common/admin-console/abstraction import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; import { VaultFilterService } from "./vault-filter.service"; diff --git a/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.ts b/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.ts index ddc2df61099..f7663ebc42c 100644 --- a/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.ts +++ b/apps/web/src/app/vault/individual-vault/vault-filter/services/vault-filter.service.ts @@ -18,7 +18,6 @@ import { import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { ServiceUtils } from "@bitwarden/common/misc/serviceUtils"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @@ -26,9 +25,10 @@ import { StateService } from "@bitwarden/common/platform/abstractions/state.serv import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; -import { CollectionAdminView } from "../../../../admin-console/organizations/core"; +import { CollectionAdminView } from "../../../core/views/collection-admin.view"; import { CipherTypeFilter, CollectionFilter, diff --git a/apps/web/src/app/vault/individual-vault/vault-filter/shared/models/vault-filter.model.spec.ts b/apps/web/src/app/vault/individual-vault/vault-filter/shared/models/vault-filter.model.spec.ts index 332b197669e..a754f0151bb 100644 --- a/apps/web/src/app/vault/individual-vault/vault-filter/shared/models/vault-filter.model.spec.ts +++ b/apps/web/src/app/vault/individual-vault/vault-filter/shared/models/vault-filter.model.spec.ts @@ -1,8 +1,8 @@ import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; import { VaultFilter } from "./vault-filter.model"; diff --git a/apps/web/src/app/vault/individual-vault/vault-filter/shared/models/vault-filter.type.ts b/apps/web/src/app/vault/individual-vault/vault-filter/shared/models/vault-filter.type.ts index ce3959fe059..8f459f8c8c2 100644 --- a/apps/web/src/app/vault/individual-vault/vault-filter/shared/models/vault-filter.type.ts +++ b/apps/web/src/app/vault/individual-vault/vault-filter/shared/models/vault-filter.type.ts @@ -3,7 +3,7 @@ import { ITreeNodeObject } from "@bitwarden/common/src/models/domain/tree-node"; import { FolderView } from "@bitwarden/common/src/vault/models/view/folder.view"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; -import { CollectionAdminView } from "../../../../../admin-console/organizations/core"; +import { CollectionAdminView } from "../../../../core/views/collection-admin.view"; export type CipherStatus = "all" | "favorites" | "trash" | CipherType; diff --git a/apps/web/src/app/vault/individual-vault/vault-header/vault-header.component.ts b/apps/web/src/app/vault/individual-vault/vault-header/vault-header.component.ts index f2a7b855321..092f9e76cd0 100644 --- a/apps/web/src/app/vault/individual-vault/vault-header/vault-header.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault-header/vault-header.component.ts @@ -1,9 +1,9 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from "@angular/core"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { All, diff --git a/apps/web/src/app/vault/individual-vault/vault.component.ts b/apps/web/src/app/vault/individual-vault/vault.component.ts index 168fb912147..176fb3fcb36 100644 --- a/apps/web/src/app/vault/individual-vault/vault.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault.component.ts @@ -34,10 +34,8 @@ import { ModalService } from "@bitwarden/angular/services/modal.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; import { SearchService } from "@bitwarden/common/abstractions/search.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { TokenService } from "@bitwarden/common/auth/abstractions/token.service"; import { DEFAULT_PBKDF2_ITERATIONS, EventType, KdfType } from "@bitwarden/common/enums"; import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; @@ -53,10 +51,12 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { CipherRepromptType } from "@bitwarden/common/vault/enums/cipher-reprompt-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { Icons } from "@bitwarden/components"; import { UpdateKeyComponent } from "../../settings/update-key.component"; diff --git a/apps/web/src/app/vault/individual-vault/vault.module.ts b/apps/web/src/app/vault/individual-vault/vault.module.ts index 5e3cc67bc06..e584cae701f 100644 --- a/apps/web/src/app/vault/individual-vault/vault.module.ts +++ b/apps/web/src/app/vault/individual-vault/vault.module.ts @@ -3,6 +3,7 @@ import { NgModule } from "@angular/core"; import { BreadcrumbsModule } from "@bitwarden/components"; import { LooseComponentsModule, SharedModule } from "../../shared"; +import { CollectionDialogModule } from "../components/collection-dialog"; import { VaultItemsModule } from "../components/vault-items/vault-items.module"; import { CollectionBadgeModule } from "../org-vault/collection-badge/collection-badge.module"; import { GroupBadgeModule } from "../org-vault/group-badge/group-badge.module"; @@ -28,6 +29,7 @@ import { VaultComponent } from "./vault.component"; BulkDialogsModule, BreadcrumbsModule, VaultItemsModule, + CollectionDialogModule, ], declarations: [VaultComponent, VaultHeaderComponent], exports: [VaultComponent], diff --git a/apps/web/src/app/vault/org-vault/add-edit.component.ts b/apps/web/src/app/vault/org-vault/add-edit.component.ts index 88d1ef7018d..53dc3b48df0 100644 --- a/apps/web/src/app/vault/org-vault/add-edit.component.ts +++ b/apps/web/src/app/vault/org-vault/add-edit.component.ts @@ -5,7 +5,6 @@ import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @@ -16,6 +15,7 @@ import { StateService } from "@bitwarden/common/platform/abstractions/state.serv import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { CipherData } from "@bitwarden/common/vault/models/data/cipher.data"; diff --git a/apps/web/src/app/vault/org-vault/collection-badge/collection-name.badge.component.ts b/apps/web/src/app/vault/org-vault/collection-badge/collection-name.badge.component.ts index fa4056983a3..4f4e9e269d5 100644 --- a/apps/web/src/app/vault/org-vault/collection-badge/collection-name.badge.component.ts +++ b/apps/web/src/app/vault/org-vault/collection-badge/collection-name.badge.component.ts @@ -1,6 +1,6 @@ import { Component, Input } from "@angular/core"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; @Component({ selector: "app-collection-badge", diff --git a/apps/web/src/app/vault/org-vault/collections.component.ts b/apps/web/src/app/vault/org-vault/collections.component.ts index e31ae408173..ea528401600 100644 --- a/apps/web/src/app/vault/org-vault/collections.component.ts +++ b/apps/web/src/app/vault/org-vault/collections.component.ts @@ -1,12 +1,12 @@ import { Component } from "@angular/core"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { CipherData } from "@bitwarden/common/vault/models/data/cipher.data"; import { Cipher } from "@bitwarden/common/vault/models/domain/cipher"; import { CipherCollectionsRequest } from "@bitwarden/common/vault/models/request/cipher-collections.request"; diff --git a/apps/web/src/app/vault/org-vault/vault-filter/vault-filter.service.ts b/apps/web/src/app/vault/org-vault/vault-filter/vault-filter.service.ts index 222537c4b1c..e38d66a5815 100644 --- a/apps/web/src/app/vault/org-vault/vault-filter/vault-filter.service.ts +++ b/apps/web/src/app/vault/org-vault/vault-filter/vault-filter.service.ts @@ -8,11 +8,9 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; -import { - CollectionAdminService, - CollectionAdminView, -} from "../../../admin-console/organizations/core"; import { StateService } from "../../../core"; +import { CollectionAdminView } from "../../../vault/core/views/collection-admin.view"; +import { CollectionAdminService } from "../../core/collection-admin.service"; import { VaultFilterService as BaseVaultFilterService } from "../../individual-vault/vault-filter/services/vault-filter.service"; import { CollectionFilter } from "../../individual-vault/vault-filter/shared/models/vault-filter.type"; diff --git a/apps/web/src/app/vault/org-vault/vault-header/vault-header.component.ts b/apps/web/src/app/vault/org-vault/vault-header/vault-header.component.ts index 6c614d229b4..49055e487d3 100644 --- a/apps/web/src/app/vault/org-vault/vault-header/vault-header.component.ts +++ b/apps/web/src/app/vault/org-vault/vault-header/vault-header.component.ts @@ -14,11 +14,9 @@ import { ProductType } from "@bitwarden/common/enums"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; -import { - CollectionAdminService, - CollectionAdminView, -} from "../../../admin-console/organizations/core"; -import { CollectionDialogTabType } from "../../../admin-console/organizations/shared"; +import { CollectionAdminView } from "../../../vault/core/views/collection-admin.view"; +import { CollectionDialogTabType } from "../../components/collection-dialog"; +import { CollectionAdminService } from "../../core/collection-admin.service"; import { All, RoutedVaultFilterModel, diff --git a/apps/web/src/app/vault/org-vault/vault.component.ts b/apps/web/src/app/vault/org-vault/vault.component.ts index 2cb7a8f14cf..8048ade1c70 100644 --- a/apps/web/src/app/vault/org-vault/vault.component.ts +++ b/apps/web/src/app/vault/org-vault/vault.component.ts @@ -38,7 +38,6 @@ import { SearchService } from "@bitwarden/common/abstractions/search.service"; import { TotpService } from "@bitwarden/common/abstractions/totp.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { EventType } from "@bitwarden/common/enums"; import { ServiceUtils } from "@bitwarden/common/misc/serviceUtils"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; @@ -53,23 +52,21 @@ import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/pa import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { CipherRepromptType } from "@bitwarden/common/vault/enums/cipher-reprompt-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { Icons } from "@bitwarden/components"; -import { - CollectionAdminService, - CollectionAdminView, - GroupService, - GroupView, -} from "../../admin-console/organizations/core"; +import { GroupService, GroupView } from "../../admin-console/organizations/core"; import { EntityEventsComponent } from "../../admin-console/organizations/manage/entity-events.component"; +import { VaultFilterService } from "../../vault/individual-vault/vault-filter/services/abstractions/vault-filter.service"; +import { VaultFilter } from "../../vault/individual-vault/vault-filter/shared/models/vault-filter.model"; import { CollectionDialogResult, CollectionDialogTabType, openCollectionDialog, -} from "../../admin-console/organizations/shared"; -import { VaultFilterService } from "../../vault/individual-vault/vault-filter/services/abstractions/vault-filter.service"; -import { VaultFilter } from "../../vault/individual-vault/vault-filter/shared/models/vault-filter.model"; +} from "../components/collection-dialog"; import { VaultItemEvent } from "../components/vault-items/vault-item-event"; +import { CollectionAdminService } from "../core/collection-admin.service"; +import { CollectionAdminView } from "../core/views/collection-admin.view"; import { BulkDeleteDialogResult, openBulkDeleteDialog, diff --git a/apps/web/src/app/vault/org-vault/vault.module.ts b/apps/web/src/app/vault/org-vault/vault.module.ts index 070898b06c1..1693f0cd3e4 100644 --- a/apps/web/src/app/vault/org-vault/vault.module.ts +++ b/apps/web/src/app/vault/org-vault/vault.module.ts @@ -6,6 +6,7 @@ import { LooseComponentsModule } from "../../shared/loose-components.module"; import { SharedModule } from "../../shared/shared.module"; import { OrganizationBadgeModule } from "../../vault/individual-vault/organization-badge/organization-badge.module"; import { PipesModule } from "../../vault/individual-vault/pipes/pipes.module"; +import { CollectionDialogModule } from "../components/collection-dialog"; import { VaultItemsModule } from "../components/vault-items/vault-items.module"; import { CollectionBadgeModule } from "./collection-badge/collection-badge.module"; @@ -27,6 +28,7 @@ import { VaultComponent } from "./vault.component"; PipesModule, BreadcrumbsModule, VaultItemsModule, + CollectionDialogModule, ], declarations: [VaultComponent, VaultHeaderComponent], exports: [VaultComponent], diff --git a/apps/web/src/app/vault/utils/collection-utils.spec.ts b/apps/web/src/app/vault/utils/collection-utils.spec.ts index 17c213e151e..bf84b3155b5 100644 --- a/apps/web/src/app/vault/utils/collection-utils.spec.ts +++ b/apps/web/src/app/vault/utils/collection-utils.spec.ts @@ -1,4 +1,4 @@ -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { getNestedCollectionTree } from "./collection-utils"; diff --git a/apps/web/src/app/vault/utils/collection-utils.ts b/apps/web/src/app/vault/utils/collection-utils.ts index bf018b52fc4..c25e5a37383 100644 --- a/apps/web/src/app/vault/utils/collection-utils.ts +++ b/apps/web/src/app/vault/utils/collection-utils.ts @@ -1,11 +1,11 @@ +import { ServiceUtils } from "@bitwarden/common/misc/serviceUtils"; +import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; import { CollectionView, NestingDelimiter, -} from "@bitwarden/common/admin-console/models/view/collection.view"; -import { ServiceUtils } from "@bitwarden/common/misc/serviceUtils"; -import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; +} from "@bitwarden/common/vault/models/view/collection.view"; -import { CollectionAdminView } from "../../admin-console/organizations/core"; +import { CollectionAdminView } from "../../vault/core/views/collection-admin.view"; export function getNestedCollectionTree( collections: CollectionAdminView[] diff --git a/libs/angular/src/admin-console/components/collections.component.ts b/libs/angular/src/admin-console/components/collections.component.ts index d56d111e071..2fa5b5d3d3a 100644 --- a/libs/angular/src/admin-console/components/collections.component.ts +++ b/libs/angular/src/admin-console/components/collections.component.ts @@ -1,13 +1,13 @@ import { Directive, EventEmitter, Input, OnInit, Output } from "@angular/core"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { Cipher } from "@bitwarden/common/vault/models/domain/cipher"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; @Directive() export class CollectionsComponent implements OnInit { diff --git a/libs/angular/src/components/share.component.ts b/libs/angular/src/components/share.component.ts index 5c8224eaddc..73792f91fef 100644 --- a/libs/angular/src/components/share.component.ts +++ b/libs/angular/src/components/share.component.ts @@ -1,18 +1,18 @@ import { Directive, EventEmitter, Input, OnDestroy, OnInit, Output } from "@angular/core"; import { firstValueFrom, map, Observable, Subject, takeUntil } from "rxjs"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { OrganizationUserStatusType } from "@bitwarden/common/admin-console/enums"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { Utils } from "@bitwarden/common/platform/misc/utils"; import { Checkable, isChecked } from "@bitwarden/common/types/checkable"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; @Directive() export class ShareComponent implements OnInit, OnDestroy { diff --git a/libs/angular/src/services/jslib-services.module.ts b/libs/angular/src/services/jslib-services.module.ts index bf5cb5a09a1..234359a5236 100644 --- a/libs/angular/src/services/jslib-services.module.ts +++ b/libs/angular/src/services/jslib-services.module.ts @@ -22,7 +22,6 @@ import { UserVerificationApiServiceAbstraction } from "@bitwarden/common/abstrac import { UserVerificationService as UserVerificationServiceAbstraction } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { VaultTimeoutService as VaultTimeoutServiceAbstraction } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service"; import { VaultTimeoutSettingsService as VaultTimeoutSettingsServiceAbstraction } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service"; -import { CollectionService as CollectionServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { InternalOrganizationService, @@ -34,7 +33,6 @@ import { PolicyService as PolicyServiceAbstraction, } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { ProviderService as ProviderServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/provider.service"; -import { CollectionService } from "@bitwarden/common/admin-console/services/collection.service"; import { OrganizationApiService } from "@bitwarden/common/admin-console/services/organization/organization-api.service"; import { OrganizationService } from "@bitwarden/common/admin-console/services/organization/organization.service"; import { PolicyApiService } from "@bitwarden/common/admin-console/services/policy/policy-api.service"; @@ -127,6 +125,7 @@ import { SendApiService as SendApiServiceAbstraction } from "@bitwarden/common/t import { SendService } from "@bitwarden/common/tools/send/services/send.service"; import { SendService as SendServiceAbstraction } from "@bitwarden/common/tools/send/services/send.service.abstraction"; import { CipherService as CipherServiceAbstraction } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService as CollectionServiceAbstraction } from "@bitwarden/common/vault/abstractions/collection.service"; import { CipherFileUploadService as CipherFileUploadServiceAbstraction } from "@bitwarden/common/vault/abstractions/file-upload/cipher-file-upload.service"; import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction"; import { @@ -137,6 +136,7 @@ import { PasswordRepromptService as PasswordRepromptServiceAbstraction } from "@ import { SyncNotifierService as SyncNotifierServiceAbstraction } from "@bitwarden/common/vault/abstractions/sync/sync-notifier.service.abstraction"; import { SyncService as SyncServiceAbstraction } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { CipherService } from "@bitwarden/common/vault/services/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/services/collection.service"; import { CipherFileUploadService } from "@bitwarden/common/vault/services/file-upload/cipher-file-upload.service"; import { FolderApiService } from "@bitwarden/common/vault/services/folder/folder-api.service"; import { FolderService } from "@bitwarden/common/vault/services/folder/folder.service"; diff --git a/libs/angular/src/vault/abstractions/deprecated-vault-filter.service.ts b/libs/angular/src/vault/abstractions/deprecated-vault-filter.service.ts index 74e34921259..6672c45138a 100644 --- a/libs/angular/src/vault/abstractions/deprecated-vault-filter.service.ts +++ b/libs/angular/src/vault/abstractions/deprecated-vault-filter.service.ts @@ -1,7 +1,7 @@ import { Observable } from "rxjs"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; import { DynamicTreeNode } from "../vault-filter/models/dynamic-tree-node.model"; diff --git a/libs/angular/src/vault/components/add-edit.component.ts b/libs/angular/src/vault/components/add-edit.component.ts index 83b8e3e0fda..08d6a23076b 100644 --- a/libs/angular/src/vault/components/add-edit.component.ts +++ b/libs/angular/src/vault/components/add-edit.component.ts @@ -3,7 +3,6 @@ import { Observable, Subject, takeUntil, concatMap } from "rxjs"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { isMember, OrganizationService, @@ -11,7 +10,6 @@ import { import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { OrganizationUserStatusType, PolicyType } from "@bitwarden/common/admin-console/enums"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { EventType, SecureNoteType, UriMatchType } from "@bitwarden/common/enums"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; @@ -21,6 +19,7 @@ import { StateService } from "@bitwarden/common/platform/abstractions/state.serv import { Utils } from "@bitwarden/common/platform/misc/utils"; import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { CipherRepromptType } from "@bitwarden/common/vault/enums/cipher-reprompt-type"; @@ -28,6 +27,7 @@ import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { Cipher } from "@bitwarden/common/vault/models/domain/cipher"; import { CardView } from "@bitwarden/common/vault/models/view/card.view"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; import { IdentityView } from "@bitwarden/common/vault/models/view/identity.view"; import { LoginUriView } from "@bitwarden/common/vault/models/view/login-uri.view"; diff --git a/libs/angular/src/vault/vault-filter/components/collection-filter.component.ts b/libs/angular/src/vault/vault-filter/components/collection-filter.component.ts index 1d90f43ba2d..f752f9a9a9a 100644 --- a/libs/angular/src/vault/vault-filter/components/collection-filter.component.ts +++ b/libs/angular/src/vault/vault-filter/components/collection-filter.component.ts @@ -1,7 +1,7 @@ import { Directive, EventEmitter, Input, Output } from "@angular/core"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { ITreeNodeObject } from "@bitwarden/common/models/domain/tree-node"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { DynamicTreeNode } from "../models/dynamic-tree-node.model"; import { TopLevelTreeNode } from "../models/top-level-tree-node.model"; diff --git a/libs/angular/src/vault/vault-filter/components/vault-filter.component.ts b/libs/angular/src/vault/vault-filter/components/vault-filter.component.ts index 1d4b5cf8bbb..7c37436492a 100644 --- a/libs/angular/src/vault/vault-filter/components/vault-filter.component.ts +++ b/libs/angular/src/vault/vault-filter/components/vault-filter.component.ts @@ -2,8 +2,8 @@ import { Directive, EventEmitter, Input, OnInit, Output } from "@angular/core"; import { firstValueFrom, Observable } from "rxjs"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { ITreeNodeObject } from "@bitwarden/common/models/domain/tree-node"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; import { DeprecatedVaultFilterService } from "../../abstractions/deprecated-vault-filter.service"; diff --git a/libs/angular/src/vault/vault-filter/services/vault-filter.service.ts b/libs/angular/src/vault/vault-filter/services/vault-filter.service.ts index 6464254e458..b4fb8f62e0e 100644 --- a/libs/angular/src/vault/vault-filter/services/vault-filter.service.ts +++ b/libs/angular/src/vault/vault-filter/services/vault-filter.service.ts @@ -1,7 +1,6 @@ import { Injectable } from "@angular/core"; import { firstValueFrom, from, mergeMap, Observable } from "rxjs"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { isMember, OrganizationService, @@ -9,12 +8,13 @@ import { import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { ServiceUtils } from "@bitwarden/common/misc/serviceUtils"; import { TreeNode } from "@bitwarden/common/models/domain/tree-node"; import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; import { DeprecatedVaultFilterService as DeprecatedVaultFilterServiceAbstraction } from "../../abstractions/deprecated-vault-filter.service"; diff --git a/libs/common/src/abstractions/api.service.ts b/libs/common/src/abstractions/api.service.ts index 2273b290191..d21de917186 100644 --- a/libs/common/src/abstractions/api.service.ts +++ b/libs/common/src/abstractions/api.service.ts @@ -1,5 +1,4 @@ import { OrganizationConnectionType } from "../admin-console/enums"; -import { CollectionRequest } from "../admin-console/models/request/collection.request"; import { OrganizationSponsorshipCreateRequest } from "../admin-console/models/request/organization/organization-sponsorship-create.request"; import { OrganizationSponsorshipRedeemRequest } from "../admin-console/models/request/organization/organization-sponsorship-redeem.request"; import { OrganizationConnectionRequest } from "../admin-console/models/request/organization-connection.request"; @@ -14,10 +13,6 @@ import { ProviderUserConfirmRequest } from "../admin-console/models/request/prov import { ProviderUserInviteRequest } from "../admin-console/models/request/provider/provider-user-invite.request"; import { ProviderUserUpdateRequest } from "../admin-console/models/request/provider/provider-user-update.request"; import { SelectionReadOnlyRequest } from "../admin-console/models/request/selection-read-only.request"; -import { - CollectionAccessDetailsResponse, - CollectionResponse, -} from "../admin-console/models/response/collection.response"; import { OrganizationConnectionConfigApis, OrganizationConnectionResponse, @@ -135,9 +130,14 @@ import { CipherCreateRequest } from "../vault/models/request/cipher-create.reque import { CipherPartialRequest } from "../vault/models/request/cipher-partial.request"; import { CipherShareRequest } from "../vault/models/request/cipher-share.request"; import { CipherRequest } from "../vault/models/request/cipher.request"; +import { CollectionRequest } from "../vault/models/request/collection.request"; import { AttachmentUploadDataResponse } from "../vault/models/response/attachment-upload-data.response"; import { AttachmentResponse } from "../vault/models/response/attachment.response"; import { CipherResponse } from "../vault/models/response/cipher.response"; +import { + CollectionAccessDetailsResponse, + CollectionResponse, +} from "../vault/models/response/collection.response"; import { SyncResponse } from "../vault/models/response/sync.response"; /** diff --git a/libs/common/src/admin-console/models/response/organization-export.response.ts b/libs/common/src/admin-console/models/response/organization-export.response.ts index 9be06074730..b25b3cbaaea 100644 --- a/libs/common/src/admin-console/models/response/organization-export.response.ts +++ b/libs/common/src/admin-console/models/response/organization-export.response.ts @@ -1,7 +1,6 @@ import { BaseResponse } from "../../../models/response/base.response"; import { CipherResponse } from "../../../vault/models/response/cipher.response"; - -import { CollectionResponse } from "./collection.response"; +import { CollectionResponse } from "../../../vault/models/response/collection.response"; export class OrganizationExportResponse extends BaseResponse { collections: CollectionResponse[]; diff --git a/libs/common/src/models/export/collection-with-id.export.ts b/libs/common/src/models/export/collection-with-id.export.ts index b97c8b7900e..be25eaa7ef6 100644 --- a/libs/common/src/models/export/collection-with-id.export.ts +++ b/libs/common/src/models/export/collection-with-id.export.ts @@ -1,5 +1,5 @@ -import { Collection as CollectionDomain } from "../../admin-console/models/domain/collection"; -import { CollectionView } from "../../admin-console/models/view/collection.view"; +import { Collection as CollectionDomain } from "../../vault/models/domain/collection"; +import { CollectionView } from "../../vault/models/view/collection.view"; import { CollectionExport } from "./collection.export"; diff --git a/libs/common/src/models/export/collection.export.ts b/libs/common/src/models/export/collection.export.ts index 1d454323a9c..48251d581f9 100644 --- a/libs/common/src/models/export/collection.export.ts +++ b/libs/common/src/models/export/collection.export.ts @@ -1,6 +1,6 @@ -import { Collection as CollectionDomain } from "../../admin-console/models/domain/collection"; -import { CollectionView } from "../../admin-console/models/view/collection.view"; import { EncString } from "../../platform/models/domain/enc-string"; +import { Collection as CollectionDomain } from "../../vault/models/domain/collection"; +import { CollectionView } from "../../vault/models/view/collection.view"; export class CollectionExport { static template(): CollectionExport { diff --git a/libs/common/src/models/request/import-organization-ciphers.request.ts b/libs/common/src/models/request/import-organization-ciphers.request.ts index 5f1a4ee4c37..0689762de32 100644 --- a/libs/common/src/models/request/import-organization-ciphers.request.ts +++ b/libs/common/src/models/request/import-organization-ciphers.request.ts @@ -1,5 +1,5 @@ -import { CollectionWithIdRequest } from "../../admin-console/models/request/collection-with-id.request"; import { CipherRequest } from "../../vault/models/request/cipher.request"; +import { CollectionWithIdRequest } from "../../vault/models/request/collection-with-id.request"; import { KvpRequest } from "./kvp.request"; diff --git a/libs/common/src/platform/abstractions/state.service.ts b/libs/common/src/platform/abstractions/state.service.ts index fffeb07909a..a36176395de 100644 --- a/libs/common/src/platform/abstractions/state.service.ts +++ b/libs/common/src/platform/abstractions/state.service.ts @@ -1,12 +1,10 @@ import { Observable } from "rxjs"; -import { CollectionData } from "../../admin-console/models/data/collection.data"; import { EncryptedOrganizationKeyData } from "../../admin-console/models/data/encrypted-organization-key.data"; import { OrganizationData } from "../../admin-console/models/data/organization.data"; import { PolicyData } from "../../admin-console/models/data/policy.data"; import { ProviderData } from "../../admin-console/models/data/provider.data"; import { Policy } from "../../admin-console/models/domain/policy"; -import { CollectionView } from "../../admin-console/models/view/collection.view"; import { EnvironmentUrls } from "../../auth/models/domain/environment-urls"; import { ForceResetPasswordReason } from "../../auth/models/domain/force-reset-password-reason"; import { KdfConfig } from "../../auth/models/domain/kdf-config"; @@ -18,9 +16,11 @@ import { GeneratedPasswordHistory } from "../../tools/generator/password"; import { SendData } from "../../tools/send/models/data/send.data"; import { SendView } from "../../tools/send/models/view/send.view"; import { CipherData } from "../../vault/models/data/cipher.data"; +import { CollectionData } from "../../vault/models/data/collection.data"; import { FolderData } from "../../vault/models/data/folder.data"; import { LocalData } from "../../vault/models/data/local.data"; import { CipherView } from "../../vault/models/view/cipher.view"; +import { CollectionView } from "../../vault/models/view/collection.view"; import { AddEditCipherInfo } from "../../vault/types/add-edit-cipher-info"; import { ServerConfigData } from "../models/data/server-config.data"; import { Account, AccountSettingsSettings } from "../models/domain/account"; diff --git a/libs/common/src/platform/models/domain/account.ts b/libs/common/src/platform/models/domain/account.ts index 39461d19851..4295ba91331 100644 --- a/libs/common/src/platform/models/domain/account.ts +++ b/libs/common/src/platform/models/domain/account.ts @@ -1,12 +1,10 @@ import { Jsonify } from "type-fest"; -import { CollectionData } from "../../../admin-console/models/data/collection.data"; import { EncryptedOrganizationKeyData } from "../../../admin-console/models/data/encrypted-organization-key.data"; import { OrganizationData } from "../../../admin-console/models/data/organization.data"; import { PolicyData } from "../../../admin-console/models/data/policy.data"; import { ProviderData } from "../../../admin-console/models/data/provider.data"; import { Policy } from "../../../admin-console/models/domain/policy"; -import { CollectionView } from "../../../admin-console/models/view/collection.view"; import { AuthenticationStatus } from "../../../auth/enums/authentication-status"; import { EnvironmentUrls } from "../../../auth/models/domain/environment-urls"; import { ForceResetPasswordReason } from "../../../auth/models/domain/force-reset-password-reason"; @@ -17,8 +15,10 @@ import { SendData } from "../../../tools/send/models/data/send.data"; import { SendView } from "../../../tools/send/models/view/send.view"; import { DeepJsonify } from "../../../types/deep-jsonify"; import { CipherData } from "../../../vault/models/data/cipher.data"; +import { CollectionData } from "../../../vault/models/data/collection.data"; import { FolderData } from "../../../vault/models/data/folder.data"; import { CipherView } from "../../../vault/models/view/cipher.view"; +import { CollectionView } from "../../../vault/models/view/collection.view"; import { Utils } from "../../misc/utils"; import { ServerConfigData } from "../../models/data/server-config.data"; diff --git a/libs/common/src/platform/services/state-migration.service.ts b/libs/common/src/platform/services/state-migration.service.ts index c6feb0aa64f..234d1b2bff8 100644 --- a/libs/common/src/platform/services/state-migration.service.ts +++ b/libs/common/src/platform/services/state-migration.service.ts @@ -1,4 +1,3 @@ -import { CollectionData } from "../../admin-console/models/data/collection.data"; import { OrganizationData } from "../../admin-console/models/data/organization.data"; import { PolicyData } from "../../admin-console/models/data/policy.data"; import { ProviderData } from "../../admin-console/models/data/provider.data"; @@ -9,6 +8,7 @@ import { EventData } from "../../models/data/event.data"; import { GeneratedPasswordHistory } from "../../tools/generator/password"; import { SendData } from "../../tools/send/models/data/send.data"; import { CipherData } from "../../vault/models/data/cipher.data"; +import { CollectionData } from "../../vault/models/data/collection.data"; import { FolderData } from "../../vault/models/data/folder.data"; import { AbstractStorageService } from "../abstractions/storage.service"; import { StateFactory } from "../factories/state-factory"; diff --git a/libs/common/src/platform/services/state.service.ts b/libs/common/src/platform/services/state.service.ts index b701ca40238..899bff14ba4 100644 --- a/libs/common/src/platform/services/state.service.ts +++ b/libs/common/src/platform/services/state.service.ts @@ -1,13 +1,11 @@ import { BehaviorSubject, concatMap } from "rxjs"; import { Jsonify, JsonValue } from "type-fest"; -import { CollectionData } from "../../admin-console/models/data/collection.data"; import { EncryptedOrganizationKeyData } from "../../admin-console/models/data/encrypted-organization-key.data"; import { OrganizationData } from "../../admin-console/models/data/organization.data"; import { PolicyData } from "../../admin-console/models/data/policy.data"; import { ProviderData } from "../../admin-console/models/data/provider.data"; import { Policy } from "../../admin-console/models/domain/policy"; -import { CollectionView } from "../../admin-console/models/view/collection.view"; import { EnvironmentUrls } from "../../auth/models/domain/environment-urls"; import { ForceResetPasswordReason } from "../../auth/models/domain/force-reset-password-reason"; import { KdfConfig } from "../../auth/models/domain/kdf-config"; @@ -26,9 +24,11 @@ import { GeneratedPasswordHistory } from "../../tools/generator/password"; import { SendData } from "../../tools/send/models/data/send.data"; import { SendView } from "../../tools/send/models/view/send.view"; import { CipherData } from "../../vault/models/data/cipher.data"; +import { CollectionData } from "../../vault/models/data/collection.data"; import { FolderData } from "../../vault/models/data/folder.data"; import { LocalData } from "../../vault/models/data/local.data"; import { CipherView } from "../../vault/models/view/cipher.view"; +import { CollectionView } from "../../vault/models/view/collection.view"; import { AddEditCipherInfo } from "../../vault/types/add-edit-cipher-info"; import { LogService } from "../abstractions/log.service"; import { StateMigrationService } from "../abstractions/state-migration.service"; diff --git a/libs/common/src/services/api.service.ts b/libs/common/src/services/api.service.ts index 4df9b2cc603..ad7c1348896 100644 --- a/libs/common/src/services/api.service.ts +++ b/libs/common/src/services/api.service.ts @@ -1,6 +1,5 @@ import { ApiService as ApiServiceAbstraction } from "../abstractions/api.service"; import { OrganizationConnectionType } from "../admin-console/enums"; -import { CollectionRequest } from "../admin-console/models/request/collection.request"; import { OrganizationSponsorshipCreateRequest } from "../admin-console/models/request/organization/organization-sponsorship-create.request"; import { OrganizationSponsorshipRedeemRequest } from "../admin-console/models/request/organization/organization-sponsorship-redeem.request"; import { OrganizationConnectionRequest } from "../admin-console/models/request/organization-connection.request"; @@ -15,10 +14,6 @@ import { ProviderUserConfirmRequest } from "../admin-console/models/request/prov import { ProviderUserInviteRequest } from "../admin-console/models/request/provider/provider-user-invite.request"; import { ProviderUserUpdateRequest } from "../admin-console/models/request/provider/provider-user-update.request"; import { SelectionReadOnlyRequest } from "../admin-console/models/request/selection-read-only.request"; -import { - CollectionAccessDetailsResponse, - CollectionResponse, -} from "../admin-console/models/response/collection.response"; import { OrganizationConnectionConfigApis, OrganizationConnectionResponse, @@ -144,9 +139,14 @@ import { CipherCreateRequest } from "../vault/models/request/cipher-create.reque import { CipherPartialRequest } from "../vault/models/request/cipher-partial.request"; import { CipherShareRequest } from "../vault/models/request/cipher-share.request"; import { CipherRequest } from "../vault/models/request/cipher.request"; +import { CollectionRequest } from "../vault/models/request/collection.request"; import { AttachmentUploadDataResponse } from "../vault/models/response/attachment-upload-data.response"; import { AttachmentResponse } from "../vault/models/response/attachment.response"; import { CipherResponse } from "../vault/models/response/cipher.response"; +import { + CollectionAccessDetailsResponse, + CollectionResponse, +} from "../vault/models/response/collection.response"; import { SyncResponse } from "../vault/models/response/sync.response"; /** diff --git a/libs/common/src/services/vaultTimeout/vaultTimeout.service.ts b/libs/common/src/services/vaultTimeout/vaultTimeout.service.ts index c46c8e52d04..169273bdfdb 100644 --- a/libs/common/src/services/vaultTimeout/vaultTimeout.service.ts +++ b/libs/common/src/services/vaultTimeout/vaultTimeout.service.ts @@ -3,7 +3,6 @@ import { firstValueFrom } from "rxjs"; import { SearchService } from "../../abstractions/search.service"; import { VaultTimeoutService as VaultTimeoutServiceAbstraction } from "../../abstractions/vaultTimeout/vaultTimeout.service"; import { VaultTimeoutSettingsService } from "../../abstractions/vaultTimeout/vaultTimeoutSettings.service"; -import { CollectionService } from "../../admin-console/abstractions/collection.service"; import { AuthService } from "../../auth/abstractions/auth.service"; import { KeyConnectorService } from "../../auth/abstractions/key-connector.service"; import { AuthenticationStatus } from "../../auth/enums/authentication-status"; @@ -13,6 +12,7 @@ import { MessagingService } from "../../platform/abstractions/messaging.service" import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service"; import { StateService } from "../../platform/abstractions/state.service"; import { CipherService } from "../../vault/abstractions/cipher.service"; +import { CollectionService } from "../../vault/abstractions/collection.service"; import { FolderService } from "../../vault/abstractions/folder/folder.service.abstraction"; export class VaultTimeoutService implements VaultTimeoutServiceAbstraction { diff --git a/libs/common/src/admin-console/abstractions/collection.service.ts b/libs/common/src/vault/abstractions/collection.service.ts similarity index 100% rename from libs/common/src/admin-console/abstractions/collection.service.ts rename to libs/common/src/vault/abstractions/collection.service.ts diff --git a/libs/common/src/admin-console/models/data/collection.data.ts b/libs/common/src/vault/models/data/collection.data.ts similarity index 100% rename from libs/common/src/admin-console/models/data/collection.data.ts rename to libs/common/src/vault/models/data/collection.data.ts diff --git a/libs/common/src/admin-console/models/domain/collection.spec.ts b/libs/common/src/vault/models/domain/collection.spec.ts similarity index 100% rename from libs/common/src/admin-console/models/domain/collection.spec.ts rename to libs/common/src/vault/models/domain/collection.spec.ts diff --git a/libs/common/src/admin-console/models/domain/collection.ts b/libs/common/src/vault/models/domain/collection.ts similarity index 100% rename from libs/common/src/admin-console/models/domain/collection.ts rename to libs/common/src/vault/models/domain/collection.ts diff --git a/libs/common/src/admin-console/models/request/collection-with-id.request.ts b/libs/common/src/vault/models/request/collection-with-id.request.ts similarity index 80% rename from libs/common/src/admin-console/models/request/collection-with-id.request.ts rename to libs/common/src/vault/models/request/collection-with-id.request.ts index ae48395a49d..4ff050b3919 100644 --- a/libs/common/src/admin-console/models/request/collection-with-id.request.ts +++ b/libs/common/src/vault/models/request/collection-with-id.request.ts @@ -1,5 +1,6 @@ import { Collection } from "../domain/collection"; -import { CollectionRequest } from "../request/collection.request"; + +import { CollectionRequest } from "./collection.request"; export class CollectionWithIdRequest extends CollectionRequest { id: string; diff --git a/libs/common/src/admin-console/models/request/collection.request.ts b/libs/common/src/vault/models/request/collection.request.ts similarity index 79% rename from libs/common/src/admin-console/models/request/collection.request.ts rename to libs/common/src/vault/models/request/collection.request.ts index d28a7d06fe6..173bb3c18c3 100644 --- a/libs/common/src/admin-console/models/request/collection.request.ts +++ b/libs/common/src/vault/models/request/collection.request.ts @@ -1,7 +1,6 @@ +import { SelectionReadOnlyRequest } from "../../../admin-console/models/request/selection-read-only.request"; import { Collection } from "../domain/collection"; -import { SelectionReadOnlyRequest } from "./selection-read-only.request"; - export class CollectionRequest { name: string; externalId: string; diff --git a/libs/common/src/admin-console/models/response/collection.response.ts b/libs/common/src/vault/models/response/collection.response.ts similarity index 92% rename from libs/common/src/admin-console/models/response/collection.response.ts rename to libs/common/src/vault/models/response/collection.response.ts index 5efc3b90ae1..ad01da2865d 100644 --- a/libs/common/src/admin-console/models/response/collection.response.ts +++ b/libs/common/src/vault/models/response/collection.response.ts @@ -1,7 +1,6 @@ +import { SelectionReadOnlyResponse } from "../../../admin-console/models/response/selection-read-only.response"; import { BaseResponse } from "../../../models/response/base.response"; -import { SelectionReadOnlyResponse } from "./selection-read-only.response"; - export class CollectionResponse extends BaseResponse { id: string; organizationId: string; diff --git a/libs/common/src/vault/models/response/sync.response.ts b/libs/common/src/vault/models/response/sync.response.ts index d042c4b5a76..42778a8cef9 100644 --- a/libs/common/src/vault/models/response/sync.response.ts +++ b/libs/common/src/vault/models/response/sync.response.ts @@ -1,4 +1,3 @@ -import { CollectionDetailsResponse } from "../../../admin-console/models/response/collection.response"; import { PolicyResponse } from "../../../admin-console/models/response/policy.response"; import { BaseResponse } from "../../../models/response/base.response"; import { DomainsResponse } from "../../../models/response/domains.response"; @@ -6,6 +5,7 @@ import { ProfileResponse } from "../../../models/response/profile.response"; import { SendResponse } from "../../../tools/send/models/response/send.response"; import { CipherResponse } from "./cipher.response"; +import { CollectionDetailsResponse } from "./collection.response"; import { FolderResponse } from "./folder.response"; export class SyncResponse extends BaseResponse { diff --git a/libs/common/src/admin-console/models/view/collection.view.ts b/libs/common/src/vault/models/view/collection.view.ts similarity index 100% rename from libs/common/src/admin-console/models/view/collection.view.ts rename to libs/common/src/vault/models/view/collection.view.ts diff --git a/libs/common/src/admin-console/services/collection.service.ts b/libs/common/src/vault/services/collection.service.ts similarity index 99% rename from libs/common/src/admin-console/services/collection.service.ts rename to libs/common/src/vault/services/collection.service.ts index 3c90fc50996..c0148bddd75 100644 --- a/libs/common/src/admin-console/services/collection.service.ts +++ b/libs/common/src/vault/services/collection.service.ts @@ -4,7 +4,7 @@ import { CryptoService } from "../../platform/abstractions/crypto.service"; import { I18nService } from "../../platform/abstractions/i18n.service"; import { StateService } from "../../platform/abstractions/state.service"; import { Utils } from "../../platform/misc/utils"; -import { CollectionService as CollectionServiceAbstraction } from "../abstractions/collection.service"; +import { CollectionService as CollectionServiceAbstraction } from "../../vault/abstractions/collection.service"; import { CollectionData } from "../models/data/collection.data"; import { Collection } from "../models/domain/collection"; import { CollectionView } from "../models/view/collection.view"; diff --git a/libs/common/src/vault/services/sync/sync.service.ts b/libs/common/src/vault/services/sync/sync.service.ts index ae4f50a39e7..a919f38020c 100644 --- a/libs/common/src/vault/services/sync/sync.service.ts +++ b/libs/common/src/vault/services/sync/sync.service.ts @@ -1,14 +1,11 @@ import { ApiService } from "../../../abstractions/api.service"; import { SettingsService } from "../../../abstractions/settings.service"; -import { CollectionService } from "../../../admin-console/abstractions/collection.service"; import { InternalOrganizationService } from "../../../admin-console/abstractions/organization/organization.service.abstraction"; import { InternalPolicyService } from "../../../admin-console/abstractions/policy/policy.service.abstraction"; import { ProviderService } from "../../../admin-console/abstractions/provider.service"; -import { CollectionData } from "../../../admin-console/models/data/collection.data"; import { OrganizationData } from "../../../admin-console/models/data/organization.data"; import { PolicyData } from "../../../admin-console/models/data/policy.data"; import { ProviderData } from "../../../admin-console/models/data/provider.data"; -import { CollectionDetailsResponse } from "../../../admin-console/models/response/collection.response"; import { PolicyResponse } from "../../../admin-console/models/response/policy.response"; import { KeyConnectorService } from "../../../auth/abstractions/key-connector.service"; import { ForceResetPasswordReason } from "../../../auth/models/domain/force-reset-password-reason"; @@ -36,6 +33,9 @@ import { CipherData } from "../../../vault/models/data/cipher.data"; import { FolderData } from "../../../vault/models/data/folder.data"; import { CipherResponse } from "../../../vault/models/response/cipher.response"; import { FolderResponse } from "../../../vault/models/response/folder.response"; +import { CollectionService } from "../../abstractions/collection.service"; +import { CollectionData } from "../../models/data/collection.data"; +import { CollectionDetailsResponse } from "../../models/response/collection.response"; export class SyncService implements SyncServiceAbstraction { syncInProgress = false; diff --git a/libs/exporter/src/vault-export/services/vault-export.service.ts b/libs/exporter/src/vault-export/services/vault-export.service.ts index 009e95e7a57..06a8b45f58a 100644 --- a/libs/exporter/src/vault-export/services/vault-export.service.ts +++ b/libs/exporter/src/vault-export/services/vault-export.service.ts @@ -1,10 +1,6 @@ import * as papa from "papaparse"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; -import { CollectionData } from "@bitwarden/common/admin-console/models/data/collection.data"; -import { Collection } from "@bitwarden/common/admin-console/models/domain/collection"; -import { CollectionDetailsResponse } from "@bitwarden/common/admin-console/models/response/collection.response"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { KdfConfig } from "@bitwarden/common/auth/models/domain/kdf-config"; import { KdfType } from "@bitwarden/common/enums"; import { @@ -20,9 +16,13 @@ import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.servi import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherData } from "@bitwarden/common/vault/models/data/cipher.data"; +import { CollectionData } from "@bitwarden/common/vault/models/data/collection.data"; import { Cipher } from "@bitwarden/common/vault/models/domain/cipher"; +import { Collection } from "@bitwarden/common/vault/models/domain/collection"; import { Folder } from "@bitwarden/common/vault/models/domain/folder"; +import { CollectionDetailsResponse } from "@bitwarden/common/vault/models/response/collection.response"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; import { ExportHelper } from "../../export-helper"; diff --git a/libs/importer/src/importers/base-importer.ts b/libs/importer/src/importers/base-importer.ts index fed35a391a1..7c3110ad232 100644 --- a/libs/importer/src/importers/base-importer.ts +++ b/libs/importer/src/importers/base-importer.ts @@ -1,12 +1,12 @@ import * as papa from "papaparse"; -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { FieldType, SecureNoteType } from "@bitwarden/common/enums"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { Utils } from "@bitwarden/common/platform/misc/utils"; import { ConsoleLogService } from "@bitwarden/common/platform/services/console-log.service"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { FieldView } from "@bitwarden/common/vault/models/view/field.view"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; import { LoginUriView } from "@bitwarden/common/vault/models/view/login-uri.view"; diff --git a/libs/importer/src/importers/bitwarden/bitwarden-csv-importer.ts b/libs/importer/src/importers/bitwarden/bitwarden-csv-importer.ts index 45bfc0f1275..9024f5fff63 100644 --- a/libs/importer/src/importers/bitwarden/bitwarden-csv-importer.ts +++ b/libs/importer/src/importers/bitwarden/bitwarden-csv-importer.ts @@ -1,8 +1,8 @@ -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { FieldType, SecureNoteType } from "@bitwarden/common/enums"; import { CipherRepromptType } from "@bitwarden/common/vault/enums/cipher-reprompt-type"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { FieldView } from "@bitwarden/common/vault/models/view/field.view"; import { LoginView } from "@bitwarden/common/vault/models/view/login.view"; import { SecureNoteView } from "@bitwarden/common/vault/models/view/secure-note.view"; diff --git a/libs/importer/src/importers/padlock-csv-importer.ts b/libs/importer/src/importers/padlock-csv-importer.ts index 7b81041f9f1..1d09fcdaacb 100644 --- a/libs/importer/src/importers/padlock-csv-importer.ts +++ b/libs/importer/src/importers/padlock-csv-importer.ts @@ -1,4 +1,4 @@ -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { ImportResult } from "../models/import-result"; diff --git a/libs/importer/src/importers/passpack-csv-importer.ts b/libs/importer/src/importers/passpack-csv-importer.ts index f08de898eb6..43c8b3dba9e 100644 --- a/libs/importer/src/importers/passpack-csv-importer.ts +++ b/libs/importer/src/importers/passpack-csv-importer.ts @@ -1,4 +1,4 @@ -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { ImportResult } from "../models/import-result"; diff --git a/libs/importer/src/models/import-result.ts b/libs/importer/src/models/import-result.ts index d6d6726b648..cc4c487d3d8 100644 --- a/libs/importer/src/models/import-result.ts +++ b/libs/importer/src/models/import-result.ts @@ -1,5 +1,5 @@ -import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; export class ImportResult { diff --git a/libs/importer/src/services/import.service.spec.ts b/libs/importer/src/services/import.service.spec.ts index 629df464002..e748c118443 100644 --- a/libs/importer/src/services/import.service.spec.ts +++ b/libs/importer/src/services/import.service.spec.ts @@ -1,10 +1,10 @@ import { mock, MockProxy } from "jest-mock-extended"; -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { BitwardenPasswordProtectedImporter } from "../importers/bitwarden/bitwarden-password-protected-importer"; diff --git a/libs/importer/src/services/import.service.ts b/libs/importer/src/services/import.service.ts index 100e5202ab6..8cfe40248cf 100644 --- a/libs/importer/src/services/import.service.ts +++ b/libs/importer/src/services/import.service.ts @@ -1,5 +1,3 @@ -import { CollectionService } from "@bitwarden/common/admin-console/abstractions/collection.service"; -import { CollectionWithIdRequest } from "@bitwarden/common/admin-console/models/request/collection-with-id.request"; import { ImportCiphersRequest } from "@bitwarden/common/models/request/import-ciphers.request"; import { ImportOrganizationCiphersRequest } from "@bitwarden/common/models/request/import-organization-ciphers.request"; import { KvpRequest } from "@bitwarden/common/models/request/kvp.request"; @@ -8,9 +6,11 @@ import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.se import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { Utils } from "@bitwarden/common/platform/misc/utils"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; +import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { CipherType } from "@bitwarden/common/vault/enums/cipher-type"; import { CipherRequest } from "@bitwarden/common/vault/models/request/cipher.request"; +import { CollectionWithIdRequest } from "@bitwarden/common/vault/models/request/collection-with-id.request"; import { FolderWithIdRequest } from "@bitwarden/common/vault/models/request/folder-with-id.request"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; From a7f9984ddd14f60da7ffa9ee75acb1c331c1b144 Mon Sep 17 00:00:00 2001 From: mimartin12 <77340197+mimartin12@users.noreply.github.com> Date: Wed, 14 Jun 2023 08:16:42 -0600 Subject: [PATCH 20/22] Update build-web.yml (#5606) --- .github/workflows/build-web.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-web.yml b/.github/workflows/build-web.yml index ee8d689c219..05c6b0f8b6e 100644 --- a/.github/workflows/build-web.yml +++ b/.github/workflows/build-web.yml @@ -84,7 +84,7 @@ jobs: npm_command: "build:bit:poc" - name: "ee" npm_command: "build:bit:ee" - - name: "eudevtest" + - name: "cloud-eudevtest" npm_command: "build:bit:eudevtest" steps: From ed0490730076298590421473f95b5391ff51d011 Mon Sep 17 00:00:00 2001 From: Shane Melton Date: Wed, 14 Jun 2023 13:09:56 -0700 Subject: [PATCH 21/22] [PM-2049] Update entity events dialog (#5417) * [AC-1145] Update entity-events.component.ts to a CL dialog - Add EntityEventsDialogParams - Add static helper method to open the dialog with the dialog service - Update existing usages of the entity-events.component.ts * [AC-1145] Update entity-events.component.ts to use CL components and form actions - Use bit-table and TableDataSource - Update to reactive form for date filter - Make dialog component standalone - Use bitAction in-place of component promises - Remove redundant try/catch that is now handled by bitAction and bitSubmit - Add new try/catch on first load to catch any errors during initial dialog open * [PM-2049] Make dataSource and filterFormGroup protected * [PM-2049] Remove bit-form-field container Remove the bit-form-field tags that wrapped the date inputs to avoid additional styling that is not applicable to inline form elements. Add back the missing `-` that was removed by mistake. * [PM-2049] Remove entity events dialog component selector --- .../manage/entity-events.component.html | 179 +++++++--------- .../manage/entity-events.component.ts | 191 +++++++++++------- .../members/people.component.html | 1 - .../organizations/members/people.component.ts | 20 +- .../src/app/shared/loose-components.module.ts | 3 - .../app/vault/org-vault/vault.component.html | 1 - .../app/vault/org-vault/vault.component.ts | 18 +- .../providers/manage/people.component.html | 1 - .../providers/manage/people.component.ts | 18 +- 9 files changed, 217 insertions(+), 215 deletions(-) diff --git a/apps/web/src/app/admin-console/organizations/manage/entity-events.component.html b/apps/web/src/app/admin-console/organizations/manage/entity-events.component.html index 85c9d474920..8d8cfad34e9 100644 --- a/apps/web/src/app/admin-console/organizations/manage/entity-events.component.html +++ b/apps/web/src/app/admin-console/organizations/manage/entity-events.component.html @@ -1,118 +1,89 @@ - diff --git a/apps/web/src/app/vault/org-vault/vault.component.ts b/apps/web/src/app/vault/org-vault/vault.component.ts index 8048ade1c70..7b6b926e494 100644 --- a/apps/web/src/app/vault/org-vault/vault.component.ts +++ b/apps/web/src/app/vault/org-vault/vault.component.ts @@ -56,7 +56,7 @@ import { CollectionView } from "@bitwarden/common/vault/models/view/collection.v import { Icons } from "@bitwarden/components"; import { GroupService, GroupView } from "../../admin-console/organizations/core"; -import { EntityEventsComponent } from "../../admin-console/organizations/manage/entity-events.component"; +import { openEntityEventsDialog } from "../../admin-console/organizations/manage/entity-events.component"; import { VaultFilterService } from "../../vault/individual-vault/vault-filter/services/abstractions/vault-filter.service"; import { VaultFilter } from "../../vault/individual-vault/vault-filter/shared/models/vault-filter.model"; import { @@ -109,8 +109,6 @@ export class VaultComponent implements OnInit, OnDestroy { cipherAddEditModalRef: ViewContainerRef; @ViewChild("collectionsModal", { read: ViewContainerRef, static: true }) collectionsModalRef: ViewContainerRef; - @ViewChild("eventsTemplate", { read: ViewContainerRef, static: true }) - eventsModalRef: ViewContainerRef; trashCleanupWarning: string = null; activeFilter: VaultFilter = new VaultFilter(); @@ -885,12 +883,14 @@ export class VaultComponent implements OnInit, OnDestroy { } async viewEvents(cipher: CipherView) { - await this.modalService.openViewRef(EntityEventsComponent, this.eventsModalRef, (comp) => { - comp.name = cipher.name; - comp.organizationId = this.organization.id; - comp.entityId = cipher.id; - comp.showUser = true; - comp.entity = "cipher"; + await openEntityEventsDialog(this.dialogService, { + data: { + name: cipher.name, + organizationId: this.organization.id, + entityId: cipher.id, + showUser: true, + entity: "cipher", + }, }); } diff --git a/bitwarden_license/bit-web/src/app/admin-console/providers/manage/people.component.html b/bitwarden_license/bit-web/src/app/admin-console/providers/manage/people.component.html index 00bf5eda261..152253fe4d1 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/providers/manage/people.component.html +++ b/bitwarden_license/bit-web/src/app/admin-console/providers/manage/people.component.html @@ -209,7 +209,6 @@ - diff --git a/bitwarden_license/bit-web/src/app/admin-console/providers/manage/people.component.ts b/bitwarden_license/bit-web/src/app/admin-console/providers/manage/people.component.ts index 7c787951d4d..304ab346f33 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/providers/manage/people.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/providers/manage/people.component.ts @@ -21,7 +21,7 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service" import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; -import { EntityEventsComponent } from "@bitwarden/web-vault/app/admin-console/organizations/manage/entity-events.component"; +import { openEntityEventsDialog } from "@bitwarden/web-vault/app/admin-console/organizations/manage/entity-events.component"; import { BulkStatusComponent } from "@bitwarden/web-vault/app/admin-console/organizations/members/components/bulk/bulk-status.component"; import { BasePeopleComponent } from "@bitwarden/web-vault/app/common/base.people.component"; @@ -41,8 +41,6 @@ export class PeopleComponent @ViewChild("addEdit", { read: ViewContainerRef, static: true }) addEditModalRef: ViewContainerRef; @ViewChild("groupsTemplate", { read: ViewContainerRef, static: true }) groupsModalRef: ViewContainerRef; - @ViewChild("eventsTemplate", { read: ViewContainerRef, static: true }) - eventsModalRef: ViewContainerRef; @ViewChild("bulkStatusTemplate", { read: ViewContainerRef, static: true }) bulkStatusModalRef: ViewContainerRef; @ViewChild("bulkConfirmTemplate", { read: ViewContainerRef, static: true }) @@ -167,12 +165,14 @@ export class PeopleComponent } async events(user: ProviderUserUserDetailsResponse) { - await this.modalService.openViewRef(EntityEventsComponent, this.eventsModalRef, (comp) => { - comp.name = this.userNamePipe.transform(user); - comp.providerId = this.providerId; - comp.entityId = user.id; - comp.showUser = false; - comp.entity = "user"; + await openEntityEventsDialog(this.dialogService, { + data: { + name: this.userNamePipe.transform(user), + providerId: this.providerId, + entityId: user.id, + showUser: false, + entity: "user", + }, }); } From 9ed59c6fa929d71291bdd3d954e6b6f3d87080f7 Mon Sep 17 00:00:00 2001 From: Daniel Chateau Date: Wed, 14 Jun 2023 16:59:29 -0400 Subject: [PATCH 22/22] Update request headers sent to AnonAddy API. (#5565) --- .../generator/username/email-forwarders/anon-addy-forwarder.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/common/src/tools/generator/username/email-forwarders/anon-addy-forwarder.ts b/libs/common/src/tools/generator/username/email-forwarders/anon-addy-forwarder.ts index 6b4bc423148..b20f22ecf82 100644 --- a/libs/common/src/tools/generator/username/email-forwarders/anon-addy-forwarder.ts +++ b/libs/common/src/tools/generator/username/email-forwarders/anon-addy-forwarder.ts @@ -18,6 +18,7 @@ export class AnonAddyForwarder implements Forwarder { headers: new Headers({ Authorization: "Bearer " + options.apiKey, "Content-Type": "application/json", + "X-Requested-With": "XMLHttpRequest", }), }; const url = "https://app.anonaddy.com/api/v1/aliases";