48 Commits

Author SHA1 Message Date
Max
95f5897428 [SM-2108] Land the Secrets Manager CLI stack in main (#24684)
* [SM-2108] Move Secrets Manager services and models to bit-sm (#23925)

* [SM-2109] Return results from Secrets Manager service create, update and restore calls (#23926)

* [SM-2110] Add the feature-flagged bw sm command foundation (#23927)

* [SM-2112] Add bw sm secret and bw sm template commands (#23929)

* [SM-2113] Add bw sm trash commands (#23930)

* [SM-2114] Add bw sm machine-account and access token commands (#23931)

* [SM-2115] Add bw sm access and bw sm grantees commands (#23932)

* [SM-2116] Add Secrets Manager counts, events, import/export and bw serve endpoints (#23933)

---------

Co-authored-by: cd-bitwarden <106776772+cd-bitwarden@users.noreply.github.com>
2026-11-13 16:47:07 +00:00
Oscar Hinton
e20a6533ea [PAM-264] Move shared PAM code to bit-pam and bit-pam-components (#24417)
* [PAM-121] Move shared PAM code to bit-pam and bit-pam-components

Creates two licensed libs owned by team-pam-dev and moves the shared PAM
code into them from bit-web so other clients can consume it:

- bitwarden_license/bit-pam (@bitwarden/bit-pam): framework-free
  abstractions, helpers, date formatting and SDK services, usable from the
  browser background. ESLint keeps Angular and the UI libraries out of it.
- bitwarden_license/bit-pam-components (@bitwarden/bit-pam-components): the
  shared components, pipes, confirm dialogs and Angular-injected services.

Each lib exposes a single barrel. Split out of #22430 to reduce its size;
no behavioural changes.

* [PAM-121] Run Chromatic on bit-pam-components changes

* [PAM-121] Run prettier
2026-11-04 16:06:27 +01:00
Derek Nance
9f07c4b890 [PM-25909] Commercial desktop builds (#18094) 2026-09-24 17:34:15 -05:00
Daniel James Smith
b9233db5dd Create libs/tools/share using the nx lib generator plugin (#22926)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2026-09-04 14:05:26 +00:00
Bernd Schoolmann
8b610aa1fa feat(automation-driver): wire-in automation-driver (#21921) 2026-09-02 15:44:19 +02:00
Daniel James Smith
907324546d Create scaffold for libs/managed-settings lib (#22695)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2026-08-26 12:40:43 +00:00
cyprain-okeke
3040c92ca0 [PM-39926] feat(billing): client foundation for preview-driven cart — types, adapter, translation, facades, HTTP clients (#22173)
* feat(billing): add PM36631_PreviewDrivenCart feature flag

* feat(billing): add authoritative amount and label to Discount

* feat(billing): render per-line discounts as an array in cart summary

* feat(billing): add per-line discount cart summary stories

* feat(billing): add CartPreview types mirroring the server preview model

* feat(billing): add cart preview flow context and translation helpers

* feat(billing): add pure CartPreview to Cart adapter

* feat(billing): add cart and subscription preview response DTOs

* feat(billing): add cart and subscription preview clients and facades

* refactor(billing): rename CartPreview to InvoicePreview per updated PM-39926

* fix(billing): import Discount directly instead of through the pricing barrel

cart.ts imported Discount from the library's own index barrel, which is a
circular-import smell. Point the import at ./discount alongside ./credit.

* docs(billing): align cart-summary docs with the discounts array shape

The cart-summary MDX still described the singular `CartItem.discount` /
`Cart.discount` field this branch replaces, and the invoice-preview header
comment still said "cart preview record family" after the CartPreview to
InvoicePreview rename.

- Update the documented `Cart` type to `discounts?: Discount[]` and add the
  optional authoritative `total`.
- Convert the five cart-level `discount: {...}` example literals to
  `discounts: [{...}]` and pluralize the `cart` prop-table description.
- Correct the invoice-preview header comment and note that the type is
  unrelated to the screen-local `InvoicePreview` in premium-org-upgrade.service.ts,
  which it supersedes and which is removed at PM-40422.

* docs(billing): flag unverified discount member casing in invoice preview DTO

InvoicePreviewItemResponse assigns the `Discounts` array raw, which assumes the
server serializes discount members as camelCase even though every enclosing
field is PascalCase. The cart-level discount in cart.response.ts parses through
DiscountResponse, which is PascalCase-aware, so the two paths disagree.

No real PM-39925 response has been observed yet, and the existing spec fixture
hardcodes camelCase members, so it encodes the assumption rather than testing
it. If the server emits PascalCase, every discount field silently deserializes
to undefined with no throw.

Document the assumption with a TODO rather than guessing at the contract; the
casing gets confirmed with the server at the PM-39925 integration checkpoint.

* docs(billing): record camelCase discount-member contract as decided

* fix(billing): parse invoice preview discounts through DiscountResponse

Discount members are PascalCase per the PM-39925/PM-39926 preview contract,
so the raw passthrough would have deserialized every member to undefined.
DiscountResponse gains the amount and label fields the preview carries, and
drops its value import of the @bitwarden/pricing barrel (Angular components)
which libs/common, consumed by the non-Angular CLI, must not load.

* fix(billing): allow absent suspension details on past_due and unpaid previews

Verified against server main: GetSubscriptionSuspensionAsync has five null
paths for past_due/unpaid (e.g. no open overdue invoices), so those
statuses parse through with optional suspension/gracePeriod. Incomplete
statuses and canceled keep hard parse guards because the server always
emits their details. Also fixes the storage fixture to the real
StorageResponse shape and asserts the mapping.

* fix(billing): harden invoice preview money and date parsing

EstimatedTax, Total, and AmountDue now throw on absence instead of
silently becoming undefined on a type declared as number; a malformed
NextPaymentAttempt degrades to absent rather than an Invalid Date.

* fix(billing): map plan-change seat rows to the org plan-price label

OrganizationPlanChange previews rendered a blank seat label and logged an
error because the fan-out had no case for that context. Plan changes
always describe an existing org moving between org tiers, so they take
the same passwordManagerPlanPrice copy as the other org-scoped surfaces;
premium stays unmapped since it cannot be plan-changed into. The
translation-keys spec now asserts the exact documented key set.

* fix(billing): prefer authoritative discount amounts in cart-wide rows

A server-supplied amount now wins over the derived cascade in the
cart-wide loop, matching the per-line path — otherwise a preview cart's
percent-off row would be derived from the locally summed subtotal while
total uses the server figure, and the rows would not reconcile. Discount
rows are tracked by $index because derived labels are not unique (two
unlabeled discounts of the same type and value collide).

* refactor(billing): type preview request planTier as PlanTier

Narrows the placeholder string to the PlanTier union (type-only import)
so the per-screen tickets that finalize these request shapes inherit the
constraint; specs annotate their fixtures to exercise it.

* test: register libs/pricing in the root jest config

The project list never included libs/pricing, so its 200+ suites were
invisible to npm test and CI's libs run.

* Revert "test: register libs/pricing in the root jest config"

This reverts commit 7cfd9095a6.

* refactor(billing): compare subscription statuses as literals in the preview response

The value import of SubscriptionStatuses loaded the @bitwarden/subscription
barrel — and its Angular components — into libs/common at runtime, forcing the
spec to jest.mock the whole package with hand-maintained literals that could
silently drift. Literal constants checked with `satisfies` keep union drift a
compile error (mirroring discount.response.ts) and let the spec drop the mock,
the require, and its eslint suppression.

* test: register libs/pricing in the root jest config

The project list never included libs/pricing, so its 200+ suites were
invisible to npm test and CI's libs run.

* InvoicePreviewDiscount changes

* Remove some comments

* added design review fix

* Add additional review changes

* Address review nits: inline single-use fixture, type premium preview request, clarify service doc

* [PM-39926] Align SubscriptionPreview contract with server

Rename the response's Cart property/key to InvoicePreview to match the
server contract, and add a required nextCharge to the Billable arm of
SubscriptionPreview, populated in toDomain from the invoice preview's
nextPaymentAttempt (mirroring the legacy BitwardenSubscription).
Trialing/active responses now fail parsing when the next payment
attempt is absent, following the response's existing arm-invariant
guards.

* Make Secrets Manager seats optional on the invoice preview

The server can emit a Secrets Manager section without a recurring seat
line (a mid-cycle SM removal leaves only proration credits), so the
response no longer fabricates an empty seat item. The adapter maps the
seat line only when present and omits a group with no line items —
its prorations still feed the credit row — and the cart summary
renders each SM line behind its own guard.
2026-08-26 07:58:30 +00:00
Bernd Schoolmann
93a89af6b0 refactor(crypto): add legacy crypto module (#22254) 2026-08-10 16:52:15 +09:00
Will Martin
96c272a374 [CL-1285] create Storybook feature-flags addon in new @bitwarden/storybook lib (#21913)
* Add @bitwarden/storybook lib with feature-flags addon

Introduce a dedicated @bitwarden/storybook library housing Storybook
addons and utilities.

feature-flags addon:
- Manager-side "Feature Flags" panel listing every boolean flag from the
  FeatureFlag enum; toggles write to a Storybook global.
- Preview-side mock ConfigService whose getFeatureFlag$ values are driven
  by that global (reactive, so toggles update stories live).
- Flag catalog seeded into globals so the manager bundle never imports
  @bitwarden/* (esbuild can't resolve those aliases).
- featureFlagModes() helper for opt-in Chromatic on/off snapshot modes.
- Documentation/Feature Flags MDX page describing panel + modes usage.

Also:
- Move .storybook/format-args-for-code-snippet into the lib and repoint
  the 19 component stories to import from @bitwarden/storybook.
- Enable jsx ("react") in tsconfig.base.json for the manager panel (.tsx);
  the Storybook manager builder emits the classic runtime.
- .storybook wiring: preview registers the decorator + seeds globals,
  manager loads the panel by relative path.

package-lock.json also picks up npm's normalization of a few pre-existing
entries on main (readdirp dedupe, encoding removal) alongside the new
workspace registration.

* Add enabledFlags helper for per-story flag state

- enabledFlags(...flags) builds a story-level `globals` override so one
  story can render with a flag on and another with it off.
- featureFlagModes now reuses enabledFlags for a single source of truth.
- Document the per-story pattern in the Feature Flags MDX.

* Fix CI failures for the feature-flags addon

- Decorator: skip providing the mock ConfigService when a story already
  provides one at the application root (applicationConfig). Fixes the
  danger-zone story crash "Cannot mix multi providers and regular
  providers" — it registers ConfigService as `multi: true`.
- Lib jest: set isolatedModules in tsconfig.spec.json so ts-jest
  transpiles without type-checking; its node10 resolution can't read
  @storybook/angular's exports-based types (typecheck is covered by tsc).
- Reformat 5 component stories that were left prettier-dirty after the
  import repoint (pre-commit runs prettier before eslint's import sort).

* Remove comments from tsconfig.spec.json and manager.js
2026-07-20 15:36:00 +02:00
Oscar Hinton
c5449e6432 [PM-39048] Feat: scaffold @bitwarden/pam library (#21259)
Add a new libs/pam feature library for Privileged Access Management,
generated via the basic-lib Nx generator.

- Register the "pam" team in the basic-lib generator (schema enum,
  interactive prompt, and the @bitwarden/team-pam-dev CODEOWNERS handle)
- Generate libs/pam with standard structure and a placeholder spec
- Wire up tsconfig.base.json path, CODEOWNERS, and root jest.config.js
2026-06-16 09:55:07 +02:00
bmbitwarden
ec7a19c7fe PM-6796 implemented file reorg (#20648)
* PM-6796 implemented file reorg

* PM-6796 remaining jest files

* PM-6796 resolved failing tests

* PM-6796 resolved readme pr comment

* PM-6796 testEnvironment revert

* PM-6796 resolved project.json nesting

* PM-6796 restored unrelated cipher view files

* PM-6796 pushed test file

* PM-6796 resolved pr comment Type signature mismatch will fail TypeScript compilation.

* PM-6796 reverted unneeded send sdk changes

* PM-6796 resolved test issue

* PM-6796 removed revised service file
2026-06-10 17:29:01 -04:00
Bernd Schoolmann
7574d3859b [BEEEP] [PM-37492] Make jest tests faster 2026-06-01 14:34:04 -05:00
Brandon Treston
6d42bbfbe5 [PM-34775] Generate Invite Link Lib and API Service (#20301)
* Scaffold generate invite link lib, api service WIP

* add missing properties

* refresh lock file

* revert lockfile

* lock file

* clean up lock file (used wrong node version)

* fix lock file

* clean up

* more lockfile issues
2026-04-28 11:54:20 -04:00
Daniel García
dc888f9acc [PM-33315] Create @bitwarden/logging (#20197)
* [PM-33315] Create @bitwarden/logging

* Reorder tsconfig, fix tests
2026-04-21 11:48:03 +02:00
Addison Beck
02fe70eaeb refactor(scheduling): extract @bitwarden/scheduling Nx leaf library (#19771) 2026-03-27 11:23:22 +00:00
Bernd Schoolmann
666ff42d22 [PM-31763] Add unlock service & module (#18870)
* Add unlock service

* Move methods

* Prettier

* Fix type errors

* Prettier

* Fix test

* Fix module order

* Attempt to fix tests

* Cleanup CODEOWNERS

* Backport biometric unlock and legacy master-key logic

* Add tests for biometrics

* Prettier

* Add biometric unlock to abstract unlock service

* Fix build
2026-02-25 18:50:25 +01:00
Bernd Schoolmann
bb110122a5 [PM-30144] Implement client-side user-key-rotation-service (#18285)
* Implement client-side user-key-rotation-service

* Feature flag

* Add tests

* Fix flag name

* Fix build

* Prettier

* Small clean-up

* Codeowners order cleanup

* Fix eslint issue

* Update sdk to 550

* Cleanup & fix incompatibilities

* Prettier
2026-02-20 15:28:24 +01:00
Brandon Treston
bb318ee22e Ac/pm 26364 extension UI for auto confirm (#17258)
* create nav link for auto confirm in settings page

* wip

* WIP

* create auto confirm library

* migrate auto confirm files to lib

* update imports

* fix tests

* fix nudge

* cleanup, add documentation

* clean up

* cleanup

* fix import

* fix more imports

* add tests

* design changes

* fix tests

* fix tw issue

* fix typo, add tests

* CR feedback

* more clean up, fix race condition

* CR feedback, cache policies, refactor tests

* run prettier with updated version

* clean up duplicate logic

* clean up

* fix test

* add missing prop for test mock

* clean up
2026-01-07 15:27:41 -05:00
Alex Morask
a987494300 [PM-29607] Create @bitwarden/subscription (#17997)
* Create @bitwarden/subscription

* Fix changed import in tsconfig.base.json
2025-12-16 10:13:18 -06:00
Addison Beck
7ac75a6c52 refactor(libs): consolidate messaging-internal into messaging library (#16386)
This change eliminates the circular dependency between messaging and messaging-internal libraries by merging them into a single messaging library.

Previously, messaging-internal imported from @bitwarden/messaging while messaging tried to import from @bitwarden/messaging-internal, creating an unresolvable circular dependency. This also violated Nx best practices by using cross-library file includes in tsconfig.lib.json.

Changes made:
- Moved all messaging-internal code (SubjectMessageSender, helpers, tests) into libs/messaging/src/
- Updated all imports to use relative paths instead of @bitwarden/messaging imports
- Removed the entire messaging-internal library and its configuration files
- Updated external references in apps/browser to import from @bitwarden/messaging
- Fixed libs/messaging/tsconfig.lib.json to use standard src/**/*.ts pattern
- Updated libs/common internal.ts to re-export from messaging instead of messaging-internal

The messaging library now exports both public APIs and internal implementations, which is a cleaner architecture than maintaining two separate libraries with circular dependencies.

Fixes rootDir configuration issues identified in the Nx library systematic fix project.
2025-09-12 13:04:13 +02:00
Andreas Coroiu
b957a0c28f [PM-24646] Add licensed browser builds (#16252)
* feat: create separate bit licensed browser

* feat: refactor webpack config

* fix: mv2 build not working

* feat: add bit versions of all commands

* feat: add bit CI builds

* fix: scss missing from build
2025-09-04 08:21:50 +02:00
Addison Beck
5f7c0ae999 build: ensure new libraries are added to the root jest.config (#16166)
* Add missing libs to jest.config.js

Added 15 missing libraries to the jest projects array:
- libs/assets
- libs/client-type
- libs/core-test-utils
- libs/dirt/card
- libs/guid
- libs/logging
- libs/messaging-internal
- libs/messaging
- libs/serialization
- libs/state-test-utils
- libs/state
- libs/storage-core
- libs/storage-test-utils
- libs/tools/export/vault-export/vault-export-ui
- libs/user-core

This ensures all existing libraries with jest.config.js files are included in CI test runs.

* Update basic-lib generator to add new libs to jest.config.js

- Added updateJestConfig function that automatically adds new libraries to jest.config.js
- Function finds the appropriate alphabetical position for the new library
- Added comprehensive tests for the new functionality
- Ensures new libraries are included in CI test runs from creation

This prevents the issue where new libraries are created but their tests
are not run in CI because they are missing from the jest configuration.

* Fix import statements in state-definitions and deserialization-helpers tests

- Fixed ClientLocations import in state-definitions.spec.ts to use @bitwarden/storage-core instead of relative import
- Simplified deserialization-helpers.spec.ts import to use library root @bitwarden/serialization
2025-08-27 11:56:42 -04:00
Addison Beck
26caeb3083 Implement and extend tsconfig.base across projects (#14554)
* Implement and extend tsconfig.base across projects

* fixup! Merge remote-tracking branch 'origin/main' into rename-tsconfig

* fix: import tsconfig.base from components

* fix: skip typechecking node modules

* fixing tests

* fix the tests for real

* undo accidentally change
2025-06-02 20:38:17 +00:00
Andreas Coroiu
d7c46bb3a5 [PM-16231] Improved SDK referencing (#12475)
* feat: implement Rc

* feat: use Rc in sdk service

* docs: add an example to `take()`

* fix: clarify function doc

* Add custom eslint rule package with enforced `using` rule (#13009)

* feat: add custom eslint rule

* feat: check for `UsingRequired` instead of hardcoding `Rc`

* chore: move package to libs

* wip: add tests. Tests work when run from same folder but not from root

* fix: add dependencies to renovate

* fix: add empty ts file to avoid typechecking throwing errors

* fix: tests not running from root

* chore: remove unecessary config

* fix: linting

* docs: add readme

* chore: add platform ownership

* chore: clean up comment

* Add support for flat config to "Improved sdk referencing" (#13054)

* WIP flat config for eslint

* Add rxjs

* Configure vscode to use flat config

* Fix some new linting errors

* Remove directory overrides of .eslintrc

* Remove explicit dependencies on typescript-eslint/ and @angular-eslint/

* Add missing rules

* Add rxjs recommended rules

* Add storybook and enabled rxjs-angular rule

* Add buildNoRestrictedImports helper

* Ignore platform import restrictions

* Remove unused ignores

* feat: migrate rules over to .mjs and flat config

* feat: implement support for .mjs tests

* chore: remove old package approach

* chore: update package-lock

* fix: add empty TS file to stop errors

* chore: clean up comments

---------

Co-authored-by: Hinton <hinton@users.noreply.github.com>

* fix: update CODEOWNERS to match folder name

* fix: renovate.json after merge

* fix: package.json, pin versions, sort order

* fix: update package-lock.json

---------

Co-authored-by: Hinton <hinton@users.noreply.github.com>
2025-02-03 15:09:25 +01:00
Oscar Hinton
f8bdd66fbb [PM-17629] Split up KM lib to km and km-ui (#13093) 2025-01-30 11:20:17 +01:00
Thomas Avery
e206fc1819 [PM-14478] Add libs/key-management to jest.config (#11854) 2024-11-05 10:03:43 -06:00
✨ Audrey ✨
8c4b8d71ea [PM-5609] passphrase settings component & services (#10535) 2024-08-28 09:26:17 -04:00
Daniel James Smith
1320d96cb4 [PM-9869] Create SendFormContainer (#10147)
* Move SendV2component into send-v2 subFolder

* Create SendFormContainer and related services

* Add initial SendFormComponent which uses the SendFormContainer

* Remove AdditionalOptionsSectionComponent which will be added with a future PR

* Add libs/tools/send to root tsconfig

* Register libs/tools/send/send-ui with root jest.config.js

* Register libs/tools/send/send-ui with root tailwind.config.js

* Fix service injection on DefaultSendFormService

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-07-19 21:17:52 +02:00
✨ Audrey ✨
639debe91b [PM-9008] factor generator-extensions into separate libraries (#9724) 2024-06-20 10:49:23 -04:00
Daniel James Smith
de92720d7e [PM-7289] Create generator libraries (#9432)
* Create and register @bitwarden/generator-core

- Create libs/tools/generator/core
- Register new library within tsconfigs
- Register new library within eslint.configs

* Create and register @bitwarden/generator-extensions

- Create libs/tools/generator/extensions
- Register new library within tsconfigs
- Register new library within eslint.configs

* Create and register @bitwarden/generator-components

- Create libs/tools/generator/components
- Register new library within tsconfigs
- Register new library within eslint.configs

* Update libs/tools/generator/components/package.json

Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com>

* Update libs/tools/generator/extensions/package.json

Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com>

* Add empty barrel files for new libs

* Fix extension of test.environment

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com>
2024-05-30 15:38:31 -04:00
Rui Tomé
adf7a38f87 [AC-2302] Extract device approve/deny logic into a service (#8818)
* [AC-2302] Move organization-auth-request.service to bit-common folder

* [AC-2302] Rename organization-auth-request.service to organization-auth-request-api.service

* [AC-2302] Move logic from component to organization-auth-request.service

* [AC-2302] Fix import path in OrganizationAuthRequestService

* [AC-2302] Move imports to OrganizationsModule and delete unused CoreOrganizationModule

* [AC-2302] Move the call to get userResetPasswordDetails into OrganizationAuthRequestService

* [AC-2302] Remove @Injectable() and manually configure dependencies

* [AC-2302] Add OrganizationAuthRequestService unit tests first draft

* [AC-2302] Refactor device-approvals.component.ts to remove unused imports

* [AC-2302] Set up jest on bit-common and add unit tests for OrganizationAuthRequestService

* [AC-2302] Add bit-common to jest.config.js

* [AC-2302] Update organizations.module.ts to include safeProviders declared in variable

* [AC-2302] Remove services and views folders from bit-common

* [AC-2302] Define path mapping

* Adjust an import path

The import path of `PendingAuthRequestView` in
`OrganizationAuthRequestApiService` was pointing to the wrong place. I
think this file was just recently moved, and the import didn't get
updated.

* Get paths working

* Fix import

* Update jest config to use ts-jest adn jsdom

* Copy-paste path mappings from bit-web

* Remove unnecessary test setup file

* Undo unnecessary change

* Fix remaining path mappings

* Remove Bitwarden License mapping from OSS code

* Fix bit-web so it uses its own tsconfig

* Fix import path

* Remove web-bit entrypoint from OSS tsconfig

* Make DeviceApprovalsComponent standalone

* Remove organization-auth-request-api.service export

* Remove OrganizationsRoutingModule from DeviceApprovalsComponent imports

* Remove CoreOrganizationModule from OrganizationsModule imports

* Remove NoItemsModule from OrganizationsModule imports

* Use ApiService from JslibServicesModule

* Update providers in device-approvals.component.ts

---------

Co-authored-by: Addison Beck <hello@addisonbeck.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2024-05-20 11:18:23 +01:00
Thomas Rittson
b14bb92d78 [AC-2579] Set up bit-cli folder (#9092)
* Create bit-cli folder with configs

* Add bit-cli to workspace

* Refactor CLI app structure
  * services are managed by the ServiceContainer
  * programs are registered by register(Oss|Bit)Program
  * the app is bootstrapped by Main

* Reapply changes from #9099

* Reapply changes from #8604

* Reapply changes from #9115
2024-05-15 10:09:24 -04:00
Oscar Hinton
25282f3e80 Configure coverage to count everything under src (#8012) 2024-02-20 16:18:04 +01:00
Daniel James Smith
9980c3feb9 [PM-5459] Move libs/exporter to libs/tools/ (#7380)
* Move libs/exporter into libs/tools/*

Migrating all files from libs/exporter over to libs/tools/export/vault-export/vault-export-core
Rename package to vault-export-core
Fix all file paths

* Update libs and tsconfig imports

* Fix client imports

* Fix eslint, jest and package-lock.json

* Update CODEOWNERS

* Add README.md to whitelist-capital-letters

* Fix vault-export-service tests not running

* Update libs/tools/export/vault-export/README.md

Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>

* Fix types imports

* Export types from vault-export-core

* Fixed content of README

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
2024-02-13 14:22:37 -05:00
Will Martin
b73d73b508 create team owned libs for billing, admin-console, platform (#7233)
* add admin-console lib files

* add billing lib files

* add platform lib files

* update lib references in config files

* update package-lock
2023-12-15 09:02:21 -05:00
Will Martin
5c576fd19e [PM-3587] create @bitwarden/vault lib (#6083)
* add libs/vault

* update configs

* update package lock

* fix typo
2023-08-22 10:02:48 -04:00
Will Martin
f43272f243 [PM-3172] create @bitwarden/auth lib (#5906)
* scaffold new lib

* update jest config

* update tsconfig

* add readme

* update tailwind config

* update package-lock

* update tsconfigs

* update jest displayName

* update tsconfig.libs.json

* fix alias glob

* update package lock

* add readme to whitelist-capital-letters

* update CODEOWNERS

* remove test utils

* update eslint rules

* alphabetize eslint and tsconfig

* sort jest config

---------

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2023-08-08 09:37:25 -04:00
Oscar Hinton
62591a8bc8 [PM-2328] Fix jest deprecations (#5483) 2023-05-22 20:19:16 +02:00
Daniel James Smith
192bb5a7b3 [PM-328] Move exporter to tools (#5070)
* Create and register new libs/exporter

Create package.json
Create tsconfig
Create jest.config
Extend shared and root tsconfig and jest.configs
Register with eslint

* Migrate exportService to libs/exporter

Move exportService (abstraction and impl) into libs/exporter
Refactored exportService to be split into vault-export and event-export
Created barrel-files for both exports
Moved export.service.spec.ts into vault-export
Created an export-helper, which helps build the filename (extract method refactor from ExportService)

* Move components in libs/angular into tools-subfolder

Moved components
Updated imports in jslib-services.module and jslib.module

* Register libs/exporter with browser and fix imports

Move export.component into tools-subfolder

* Register libs/exporter with cli and fix imports

Move export.command into tools-subfolder

* Register libs/exporter with desktop and fix imports

Move export.component into tools-subfolder

* Move export models to libs/exporter

* Update web imports

* Update package-lock.json

* Move export models back as it would create circular dependency

Reponse models in common rely on export models which are in libs/exporter, which relies on common

* Fix up web for event-export

* Update CODEOWNERS

* Add export-models to team-tools-dev

* Simplify domain import

* Moving EventExport into web
2023-04-19 11:30:46 +02:00
Daniel James Smith
a5a12a6723 [PM-328] Move common/importer to libs/importer (tools-migration) (#5060)
* Create and register new libs/importer

Create package.json
Create tsconfig
Create jest.config
Extend shared and root tsconfig and jest.configs
Register with eslint

* Move importer-related files to libs/importer

* Move importer-spec-related files to libs/importer

Move import.service.spec

* Update package-lock.json

* Set CODEOWNERS for new libs/importer

* Register libs/importer with cli and fix imports

* Register libs/importer with web and fix imports

* Move importOption into models

Rename importOptions to import-options

* Fix linting issues after updating prettier

* Only expose necessary files from libs/importer

Fix tsconfig files
- Removes the trailing /index on imports in web/cli

As the spec-files no longer can access the internals via @bitwarden/importer they import by path (../src/importers)

* Add barrel files to vendors with more than one importer
2023-03-23 11:43:27 +01:00
Matt Bishop
4be2989fec Upload and process test results as an artifact and report (#4435) 2023-01-11 09:01:02 -05:00
Oscar Hinton
0a73290714 [SM-329] Merge libs/electron into desktop (#3989) 2022-12-02 12:45:09 +01:00
Robyn MacCallum
ed78f7e7cb [SG-397] Configure jest for Desktop and add simple tests (#3467)
* Configure jest for Desktop and add simple tests

* Remove Jest from tsconfig types
2022-09-15 12:31:15 -04:00
Thomas Rittson
05ebca2c4c [EC-497] Fix memory leaks in tests (#3421)
* Add isolatedModules:true

* Add manual typechecking in CI for libs/ tests
2022-09-08 08:05:30 +10:00
Thomas Rittson
d30701ada7 [EC-416] Refactor organization permission checks (#3252)
* Replace Permissions enum and helper methods with callbacks

* Remove scim feature flag

* Check if org has feature enabled as part of canManage checks

* Pin jest-mock-extended at v2.0.6 to fix compilation error
2022-08-15 07:08:06 -07:00
Thomas Rittson
4a1c3eb1ec [EC-423] Fix unit tests (#3265)
* Create base jest.config file

* Fix various tests that were broken

* Add maxWorkers to jest config

* Undo change to testEnvironment

* Enable tsconfig.spec.json
2022-08-11 11:35:08 +10:00
Vincent Salucci
07c7357825 [Component Library] Text/Button Links (#3126)
* Initial commit

* Updated stories / Fixed issues with dark theme constrast color

* Force colors so bootstrap doesn't override

* Fixed text colors / Added initial tests

* Added jest debugging ability to components package

* Removed spec file

* Fixed anchor layout

* revert base font-size

* [CL-28] fixed indentation, used focus-visible, adjusted disabled colors

* [CL-28] Reduced ring thickness to better match figma

* [CL-28] Updated story link

* [CL-44] [CL-28] Updated tabs disabled color / Converted to rgb format with helper
2022-08-08 11:21:46 -05:00
Oscar Hinton
bc639688e8 Use NPM workspace (#2874) 2022-06-14 17:10:53 +02:00