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 #
Because:
* We want to determine whether a customer is eligible for a plan
offering, and if so, which offering they are eligible for.
This commit:
* Adds the getOfferingOverlap method to the eligibility manager.
Closes FXA-8241
Because:
* Nest app config loader needs to support uppercase env vars
This commit:
* Adds support for uppercase env vars to Nest app config loader
* Update MySQLConfig to handle normalization
* Fixes issue loading l10n ftl files
Closes #
Co-authored-by: Ben Bangert <ben@groovie.org>
Because:
* Need to determine a valid locale configured in Contentful.
This commit:
* Add getLocale method to ContentfulClient to determine locale using
locales available in Contentful and defaulting to 'en' as a fallback.
Closes #FXA-8225
Because:
* We want to use functions from fxa-shared/l10n in new libs/* libraries
including libs/shared/contentful.
This commit:
* Moves fxa-shared/l10n to libs/shared/l10n
* Updates all references in packages/*
Closes #FXA-8228
Because:
* We want to easily expose complete type-safe query methods to callers
of the contentful client.
This commit:
* Adds a contentful manager class that exposes an eleigibility helper
method along with appropriate types.
Closes FXA-8405
Co-authored-by: Julian Poyourow <7751154+julianpoy@users.noreply.github.com>
Because:
* Plan eligibility depends on a number of factors, including what plans the user is already subscribed to (in Stripe, Google IAP or Apple IAP) and available upgrade paths for those plans per product-specific config (in Stripe metadata currently but soon to live in Contentful).
* We want to break out eligibility checks and types into a separate library from the auth server's `CapabilityService.getPlanEligibility`, since it's not really capability-oriented.
This commit:
* Generates a new nx library in lib/payments/eligibility
Closes #FXA-7582
Because:
* We will be using the Contentful hCMS (specifically their GraphQL Content API) to replace Stripe metadata for RP-provided content in SubPlat 3.0.
This commit:
* Updates `CONTENTFUL_API_KEY` to `CONTENTFUL_GRAPHQL_API_KEY`.
* Adds additional properties — `CONTENTFUL_GRAPHQL_SPACE_ID` and `CONTENTFUL_GRAPHQL_ENVIRONMENT`.
* Updates `ContentfulClientConfig` to include `spaceId` and `environment` properties.
* Updates `ContentfulClient` to build the Contentful GraphQL URL from those properties.
* Updates GraphQL codegen after addition (2) and update (1) of aforementioned properties.
Closes FXA-8211
Because:
* With components split into libraries, we don't want to include styles
in components that are defined/provided by the application consuming
the components
* Split common JSX into smaller components where it makes sense
* Continue down the div reduction path
This commit:
* Removes non-global CSS files
* Where applicable, replace divs with landmarks that add more value
for example lists and sections.
* Added <ListLabelItem> to PurchaseDetails component
* Remove unused styles
* Replace non-reused tailwind utility classes with inline declerations
Closes #
Because:
* We want to load/cache the NestJS services on the first request to the
app, so that the first request is not slow.
* We should use proper NextJS project organization.
This commit:
* Adds a new route to the app that the loadbalancers utilize, to ensure
that the NestJS services are loaded before the first request to the
app.
* Moves internal implementation that shouldn't be routed to, behind the
underscore directory prefix.
Because:
* We want to be able to call server-side logic with our business classes
directly from the nextJS app before rendering on the server.
This pull request:
* Adds a NestJS application context to the NextJS app that can be used
to load services and call methods on them.
Because:
* Purchase was previously only queriable via `linkedFrom`, which
increased query complexity and was a little cumbersome.
This commit:
* Updates the Contentful typings for the schema change
* Uses the offering directly from the Purchase
* Renames a few things for standardization
Closes FXA-8314
Because:
* We need a starter for a cart service as described in FXA-8130
This commit:
* Adds a skeleton for a cart service with the methods described in
FXA-8130
Closes FXA-8130
Co-authored-by: Ben Bangert <100193+bbangert@users.noreply.github.com>
Because:
* Create the initial work for the Checkout page as a starting point and
example for the rest of the SP3 components and pages.
This commit:
* Adds the payments/next/ui Next.js library.
* Move Header JSX into layout.tsx and remove ExampleHeader component.
* Add RSC PurchaseDetails, using JSX from SP2.5 PlanDetails component.
* Add RSC TermsAndPrivacy component
* Add various stubs functions for illustration purposes. These will be
replaced with actual implementations in future tickets.
* Cart fetch
* Contentful fetch
* Translation using @fluent/bundle
Closes FXA-8133
Because:
* We need to be able to fetch a list of capability slugs and client IDs
based on a list of priceIds.
This commit:
* Adds a query to fetch that information from Contentful via a GraphQL
query, along with updated typings.
Closes FXA-8178
Because:
* We need to fetch purchase details with many other joined fields from
contentful.
This commit:
* Adds a query that joins in all dependent data.
Closes FXA-8179
Co-authored-by: Meghan Sardesai <104124653+sardesam@users.noreply.github.com>
Because:
* We want to include Storybook in 3.0.
This commit:
* Ensures Storybook component loads as expected.
* Ensures shared Tailwind styles can be used in payments-next and works with hot-reloading.
* Ensures the build script executes without any errors.
Closes FXA-7503
Because:
* We'd like to be able to use Nest-Typed-Config with a structured config file that can be validated at runtime if desired.
This commit:
* Adds a typed config class for the Contentful client.
* Reference PR: https://github.com/mozilla/fxa/pull/15724
Closes #No ticket
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
Because:
* The paypal client config is a basic interface, and we'd like to be
able to use Nest-Typed-Config with a structured config file.
This commit:
* Adds a typed config class for the paypal client.
Because:
* We want to easily be able to consume library classes within NestJS.
Adding the injectable decorator to all library classes means we can do
so with ease, but also doesn't prevent us from using the class outside
of the NestJS DI system.
* We want all dependencies (such as nest) centralized to the main
package.json
This commit:
* Adds the injectable decorator to every library class.
* Centralizes the NestJS dependency to the root package.json.
Closes: no relevant issue - polish PR.
Because:
* We want to have a single place to manage account related operations in
the database layer.
This commit:
* Adds a new AccountManager class and account package.
Closes #FXA-6623
Because
- We need a reusable client for accessing contentful
This Commit
- Adds a contentful client with automated codegen
- Creates a reusable query system
Closes FXA-7501
Because:
- Refactor the Cart Manager to serve as higher level logic for the
cart db model.
This commit:
- Removes service level logic.
- Adds common methods to be used by Cart Manager consumers.
- Adds checks for valid state by action and valid state transitions.
- Reverts playwright tests back to xlarge instance size
Closes FXA-8128
Because:
- Allow for optimistic locking for the carts table
This commit:
- Adds migrations to add version field to carts table.
- Updates patchById with version logic
- Updates cart model and test scripts
Closes FXA-8132
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
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
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
Because:
* We had some last minute tweaks to the error arrangement.
This commit:
* Moves the error class to the library using it and inherits from a
shared base error.