Because:
* Cart needs eligibility status of current cart.
This commit:
* Add new field, eligibilityStatus, to cart db as Enum
* Add CartEligibilityStatus enum to kysely types
Closes #FXA-9472
Because:
* Need a server action to handle errors returned from Stripe elements
submit function.
This commit:
* Creates handleStripeError action and related Nextjs Action Service
* Adds checkoutErrorCart to Cart Service
* Add cart.utils
* Add tests for cart.utils and checkoutErrorCart
Closes #FXA-8851
Because:
* Call CartService.setupCart from payments-next via server action.
This commit:
* Extracts fxa-geodb into libs/* library
* Updates CartService to include GeodbManager
* Call setupCart from payments-next
Closes #FXA-8892
Because:
* We need validation for the input to our actions. We also use
class-validator and class-transformer elsewhere, and although I'm not
the most fond of this syntax/setup vs something like zod, we don't
have zod as a dependency at the moment.
This commit:
* Adds class-validator and class-transformer as well as validations for
each for the getCart and updateCart actions
Because:
* On cart setup, add stripe customer id, if it exists, to the cart.
This commit:
* Adds method to AccountCustomerManager to get stripe customer id or
return null.
* Adds AccountCustomerManager to CartService and fetches stripe customer
id.
* Splits unit and integration tests for the payments-cart library
Closes #FXA-8898
Because:
* We want to be able to interact with the paypalCustomer table from the
new libs structure
This commit:
* Adds a paypalCustomer repository
Closes FXA-8888
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
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 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:
* 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:
- 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:
* 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:
- 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:
* The circular dependency between account and core was causing
problems with the build.
This commit:
* Moves the setup function from core to account.
Because:
* Need a library to handle the cart db table and related functions
This commit:
* Add cart DB model
* Initializes the Cart library and creates factories and types
* Adds CartManager library
* Adds Cart related resolvers with basic Cart DB queries
Closes: #FXA-7508 #FXA-7505