Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions libs/google/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@
"tags": [],
"targets": {
"build": {
"executor": "@nx/esbuild:esbuild",
"dependsOn": ["build-ts"],
"executor": "nx:run-commands",
"options": {
"command": "echo Build complete"
}
},
"build-ts": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"main": "libs/google/src/index.ts",
"outputPath": "dist/libs/google",
"outputFileName": "main.js",
"tsConfig": "libs/google/tsconfig.lib.json",
"assets": ["libs/google/*.md"],
"declaration": true
"assets": ["libs/google/*.md"]
}
},
"lint": {
Expand Down
20 changes: 16 additions & 4 deletions libs/payments/auth/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,26 @@
"tags": [],
"targets": {
"build": {
"executor": "@nx/esbuild:esbuild",
"dependsOn": ["build-ts"],
"executor": "nx:run-commands",
"options": {
"command": "echo Build complete"
}
},
"build-ts": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/libs/payments/auth",
"main": "libs/payments/auth/src/index.ts",
"outputPath": "dist/libs/payments/auth",
"tsConfig": "libs/payments/auth/tsconfig.lib.json",
"assets": ["libs/payments/auth/*.md"],
"format": ["cjs"]
"assets": [
{
"glob": "libs/payments/auth/*.md",
"input": ".",
"output": "."
}
]
}
},
"test-unit": {
Expand Down
23 changes: 9 additions & 14 deletions libs/payments/capability/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,26 @@
"tags": ["scope:shared:lib:payments"],
"targets": {
"build": {
"executor": "@nx/esbuild:esbuild",
"dependsOn": ["build-ts"],
"executor": "nx:run-commands",
"options": {
"command": "echo Build complete"
}
},
"build-ts": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"main": "libs/payments/capability/src/index.ts",
"outputPath": "dist/libs/payments/capability",
"outputFileName": "main.js",
"tsConfig": "libs/payments/capability/tsconfig.lib.json",
"declaration": true,
"assets": [
{
"glob": "libs/payments/capability/README.md",
"input": ".",
"output": "."
}
],
"platform": "node"
},
"configurations": {
"development": {
"minify": false
},
"production": {
"minify": true
}
]
}
},
"lint": {
Expand Down
22 changes: 9 additions & 13 deletions libs/payments/cart/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,26 @@
"tags": ["scope:shared:lib:payments"],
"targets": {
"build": {
"executor": "@nx/esbuild:esbuild",
"dependsOn": ["build-ts"],
"executor": "nx:run-commands",
"options": {
"command": "echo Build complete"
}
},
"build-ts": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"main": "libs/payments/cart/src/index.ts",
"outputPath": "dist/libs/payments/cart",
"outputFileName": "main.js",
"tsConfig": "libs/payments/cart/tsconfig.lib.json",
"assets": [
{
"glob": "libs/payments/cart/README.md",
"input": ".",
"output": "."
}
],
"platform": "node"
},
"configurations": {
"development": {
"minify": false
},
"production": {
"minify": true
}
]
}
},
"lint": {
Expand Down
2 changes: 1 addition & 1 deletion libs/payments/cart/src/lib/cart.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ import {
MockPaymentsGleanFactory,
PaymentsGleanManager,
PaymentsGleanService,
} from '@fxa/payments/metrics';
} from '@fxa/payments/metrics'; // Circular!
import {
MockNimbusManagerConfigProvider,
NimbusManager,
Expand Down
23 changes: 11 additions & 12 deletions libs/payments/cart/src/lib/cart.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ import { isPaymentIntentId } from './util/isPaymentIntentId';
import { isPaymentIntent } from './util/isPaymentIntent';
import { throwIntentFailedError } from './util/throwIntentFailedError';
import type { SubscriptionAttributionParams } from './checkout.types';
import { handleException } from 'libs/shared/error/src/lib/sanitizeExceptionsDecorator';
import { handleException } from '@fxa/shared/error';
import type { AsyncLocalStorage } from 'async_hooks';
import { AsyncLocalStorageCart } from './cart-als.provider';
import type { CartStore } from './cart-als.types';
Expand Down Expand Up @@ -843,17 +843,16 @@ export class CartService {
effectiveUid &&
oldCart.eligibilityStatus === CartEligibilityStatus.CREATE
) {
const freeTrial =
await this.checkoutService.getFreeTrialEligibility({
uid: effectiveUid,
offeringConfigId: oldCart.offeringConfigId,
countryCode:
cartDetailsInput.taxAddress?.countryCode ??
oldCart.taxAddress?.countryCode ??
'',
interval: oldCart.interval as SubplatInterval,
eligibilityStatus: EligibilityStatus.CREATE,
});
const freeTrial = await this.checkoutService.getFreeTrialEligibility({
uid: effectiveUid,
offeringConfigId: oldCart.offeringConfigId,
countryCode:
cartDetailsInput.taxAddress?.countryCode ??
oldCart.taxAddress?.countryCode ??
'',
interval: oldCart.interval as SubplatInterval,
eligibilityStatus: EligibilityStatus.CREATE,
});
cartDetails.isFreeTrial = !!freeTrial;
} else {
cartDetails.isFreeTrial = false;
Expand Down
22 changes: 9 additions & 13 deletions libs/payments/content-server/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,26 @@
"tags": ["scope:shared:lib:payments"],
"targets": {
"build": {
"executor": "@nx/esbuild:esbuild",
"dependsOn": ["build-ts"],
"executor": "nx:run-commands",
"options": {
"command": "echo Build complete"
}
},
"build-ts": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"main": "libs/payments/content-server/src/index.ts",
"outputPath": "dist/libs/payments/content-server",
"outputFileName": "main.js",
"tsConfig": "libs/payments/content-server/tsconfig.lib.json",
"assets": [
{
"glob": "libs/payments/content-server/README.md",
"input": ".",
"output": "."
}
],
"platform": "node"
},
"configurations": {
"development": {
"minify": false
},
"production": {
"minify": true
}
]
}
},
"lint": {
Expand Down
23 changes: 9 additions & 14 deletions libs/payments/currency/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,26 @@
"tags": ["scope:shared:lib:payments"],
"targets": {
"build": {
"executor": "@nx/esbuild:esbuild",
"dependsOn": ["build-ts"],
"executor": "nx:run-commands",
"options": {
"command": "echo Build complete"
}
},
"build-ts": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"main": "libs/payments/currency/src/index.ts",
"outputPath": "dist/libs/payments/currency",
"outputFileName": "main.js",
"tsConfig": "libs/payments/currency/tsconfig.lib.json",
"declaration": true,
"assets": [
{
"glob": "libs/payments/currency/README.md",
"input": ".",
"output": "."
}
],
"platform": "node"
},
"configurations": {
"development": {
"minify": false
},
"production": {
"minify": true
}
]
}
},
"lint": {
Expand Down
2 changes: 1 addition & 1 deletion libs/payments/customer/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "payments/customer",
"name": "@fxa/payments/customer",
"version": "0.0.0"
}
23 changes: 9 additions & 14 deletions libs/payments/customer/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,26 @@
"tags": ["scope:shared:lib:payments"],
"targets": {
"build": {
"executor": "@nx/esbuild:esbuild",
"dependsOn": ["build-ts"],
"executor": "nx:run-commands",
"options": {
"command": "echo Build complete"
}
},
"build-ts": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"main": "libs/payments/customer/src/index.ts",
"outputPath": "dist/libs/payments/customer",
"outputFileName": "main.js",
"tsConfig": "libs/payments/customer/tsconfig.lib.json",
"declaration": true,
"assets": [
{
"glob": "libs/payments/customer/README.md",
"input": ".",
"output": "."
}
],
"platform": "node"
},
"configurations": {
"development": {
"minify": false
},
"production": {
"minify": true
}
]
}
},
"lint": {
Expand Down
1 change: 1 addition & 0 deletions libs/payments/customer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ export * from './lib/util/getSubplatInterval';
export * from './lib/util/getSubplatIntervalFromSubscription';
export * from './lib/util/hasOpenInvoiceWithPaymentAttempts';
export * from './lib/util/retrieveSubscriptionItem';
export * from './lib/util/getPriceFromSubscription';
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
BannerVariant,
PaymentMethodErrorType,
SubPlatPaymentMethodType,
} from '@fxa/payments/customer';
} from '../..';

export function getPaymentMethodErrorContent(
error: PaymentMethodErrorType,
Expand Down
23 changes: 9 additions & 14 deletions libs/payments/eligibility/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,26 @@
"tags": ["scope:shared:lib:payments"],
"targets": {
"build": {
"executor": "@nx/esbuild:esbuild",
"dependsOn": ["build-ts"],
"executor": "nx:run-commands",
"options": {
"command": "echo Build complete"
}
},
"build-ts": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"main": "libs/payments/eligibility/src/index.ts",
"outputPath": "dist/libs/payments/eligibility",
"outputFileName": "main.js",
"tsConfig": "libs/payments/eligibility/tsconfig.lib.json",
"declaration": true,
"assets": [
{
"glob": "libs/payments/eligibility/README.md",
"input": ".",
"output": "."
}
],
"platform": "node"
},
"configurations": {
"development": {
"minify": false
},
"production": {
"minify": true
}
]
}
},
"lint": {
Expand Down
6 changes: 1 addition & 5 deletions libs/payments/events/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"name": "@fxa/payments/events",
"version": "0.0.1",
"dependencies": {},
"type": "commonjs",
"main": "./index.cjs",
"private": true
"version": "0.0.1"
}
Loading
Loading