Граф коммитов

16 Коммитов

Автор SHA1 Сообщение Дата
Reino Muhl d5526d8b05
feat(next): add subplat glean server yaml
Because:

- Define glean events and metrics for subplat backend events

This commit:

- Adds metrics and events to subplat backend metrics yaml

Closes #FXA-10086
2024-09-04 14:05:01 -04:00
Lisa Chan 31234efc75
feat(payments-cart): Increment statsd counters 2024-08-26 10:46:21 -04:00
Reino Muhl e15e7e718b
feat(next): add glean-generate script
Because:

- Have project target to generate glean code.

This commit:

- Adds glean metrics library.
- Adds blank subplat-backend-metrics.yaml
- Add glean-generate target to project.

Closes #FXA-9996
2024-08-09 15:05:16 -04:00
Reino Muhl f47d120d71
feat(libs): convert libs/* to esbuild and swc/jest
Because:

- ts-jest is consuming too much memory during unit test execution

This commit:

- Replace ts-jest with @swc/jest, which has better memory utilization
- Replace Nx TSC build executor with Nx esbuild build executor, for better performance.
- Reduce size of unit-test job instance size from large back to medium+

Closes #FXA-9879
2024-06-27 15:28:55 -04:00
Reino Muhl 2fb70a6886
feat(next): add payment element and submit
Because:

* Add the Stripe Payment Element to the checkout page
* Be able to checkout and successfully add a new payment method and
  new subscription.

This commit:

* Adds the PaymentElement to the StripeWrapper
* Adds the Subscribe Now button
* Adds the Full Name field
* Updates the NestApp with Firestore and StatsD provider factories

Closes #FXA-8850 and #FXA-7810
2024-05-08 10:37:14 -04:00
Julian Poyourow dbd5c2756f
chore(libs): restructure tests
Because:

* Many of the tests did not use NestJS test harness
* Many of the tests had poor structure
* Many of the tests did not use jest.spyOn and were not typesafe in
  their mocks

This commit:

* Restructures tests within libs

Closes FXA-9540
2024-05-06 14:16:19 -07:00
dschom 8b9051f881
task(graphql): Send notifications when users opt in/out of metrics collection
Because:
- We want to let RPs know when users opt out of metrics collection
- We want to let RPs know when users opt in to metrics collection

This Commit:
- Ports the notifier code over to nx libs from auth server
- Ports other supporting libraries from fxa-shared to nx libs
  - MozLoggerService
  - Sentry
  - Metrics (ie statsd)
- Updates graphql to emit a 'metricsChange' event when users toggle their 'Help improve Mozilla accounts' option in settings.
- Adds support for the metricsChanged event to the fxa-event-broker
2024-04-24 08:10:14 -07:00
Reino Muhl 2df7ca494a
chore(nx): upgrade to nx 18
Because:

* Want to migrate Nx to latest

This commit:

* Migrate nx to 18 using nx cli migrate latest
* Readd a few dev dependancies back into packages/**/package.json
  * Behavior of `npx nx...` commands seems to have changed, resulting in
    multiple "command not found: <library>" errors, where <library>
    refers to libaries used in packages/**/package.json scripts, such as
    tailwindcss, tsc-alias, nx, etc.
* Updates nx cache location for Circle CI

Closes #FXA-8880
2024-02-12 09:01:00 -05:00
Reino Muhl 70ebacc772
fix(nx): remove nx prject rootDir and main changes
Because:

* Manual changes were needed to all nx libraries to ensure expected
  TypeScript build and development intellisense behavior.

This commit:

* Removes the "rootDir" build option added to all libraries, to allow
  for relative paths. This is no longer necessary since issues using
  TypeScript path aliases have been resolved.
* Removes changes to "main" build option, which ensured the built
  version of package.json had the correct path to the main index.js.

Closes #
2023-10-16 13:32:53 -04:00
dschom d96797ae6a
task(CI): Improve nx caching for CI pipelines
Because:
- Not all CI operations where taking advantage of NX caches

This Commit:
- Adjusts nx.json config to ensure correct caching behavior
- Adjusts nx.json config to ensure proper target chains. ie build is dependent on pre-build
- Uses nx to directly run integration tests
- Uses nx to directly run unit tests
- Phases out dependency on generated .list files
- Ensures 'start up' for services for functional tests is done with nx and uses nx caches.
- Creates nx tags to facilitate test commands
- Fixes linter errors encountered
- Updates docker images to nx for builds
- Updates nx ignore files
2023-08-29 11:19:54 -07:00
Reino Muhl e2ecdbd46b
Merge pull request #15662 from mozilla/fxa-8119-ts-paths-alias-imports
feat(libs): allow packagename-based imports
2023-08-08 16:52:30 -04:00
Reino Muhl 26537a484e
feat(libs): allow packagename-based imports
Because:
- we want to be able to use packagename based imports, defined in
  tsconfig.base.json paths, throughout the repo.

This commit:
- Adds a workaround fix to libs/**/project.json > main properties to
  ensure that the built dist/libs/**/.package.json has the correct
  main property.
- Upgrades esbuild-register to latest version, which includes
  tsconfig path resolution.
- Adds tsconfig-paths to auth-server mocha based tests.
- Adds various workarounds to fxa-graphql-api including the following
  - Adds paths from `tsconfig.base.json` to `tsconfig.build.json`
    excluding the extension.
  - Add pathToModuleNameMapper to all jest*.config.js
  - Add build step before tests are run
2023-08-07 14:01:05 -04:00
Dan Schomburg 5571e80284
Merge pull request #15656 from mozilla/change-test-target-for-nx-projects
task(many): Switch nx test target to be test-unit
2023-08-04 10:00:20 -07:00
dschom 535498214a
task(many): Switch nx test target to be test-unit
Because:
- The CI already targets test-unit
- We want to draw a distinction between unit and integration tests.

This Commit:
- Renames "test" to "test-unit" in lib packages.
- Sets up CI to run integration tests on 'libs' folder packages
- Adds tags to nx projects in libs folder
2023-08-03 15:38:16 -07:00
Reino Muhl 1b9cbff619
feat(payments): cart manager cleanup
Because:

* Some items were identified not to meet code organization standards
  the team is implementing with Nx.
* Nx identified some circular dependencies that need resolving.

This commit:

* Resolves circular dependencies.
* More to do
2023-08-03 16:28:48 -04:00
Ben Bangert 9e1670ab30
feat: add foundational db classes
Because:

 * We want to use clean and well tested code for our new integrated
   account database layer.
 * We don't want to use stored procedures for new code.

This commit:

 * Adds a new library that contains core mysql connection functionality.
 * Duplicates core objection classes and setup from fxa-shared without
   stored procedure functionality.

Closes FXA-6622
2023-07-24 14:44:12 -04:00