Skip to content

Commit

Permalink
feat(all)!: rename provider functions to provideDaff... (#3270)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Elain T. <[email protected]>
  • Loading branch information
griest024 and xelaint authored Oct 15, 2024
1 parent 2b16c62 commit c098de0
Show file tree
Hide file tree
Showing 237 changed files with 383 additions and 383 deletions.
4 changes: 2 additions & 2 deletions apps/design-land/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { DaffButtonModule } from '@daffodil/design/button';
import { DaffLinkSetModule } from '@daffodil/design/link-set';
import { DaffNavbarModule } from '@daffodil/design/navbar';
import { DaffSidebarModule } from '@daffodil/design/sidebar';
import { daffProvideToast } from '@daffodil/design/toast';
import { provideDaffToast } from '@daffodil/design/toast';
import { DaffThemeSwitchButtonModule } from '@daffodil/theme-switch';

import { DesignLandAppRoutingModule } from './app-routing.module';
Expand Down Expand Up @@ -45,7 +45,7 @@ import { DesignLandTemplateModule } from './core/template/template.module';
providers: [
DAFF_THEME_INITIALIZER,
provideHttpClient(withInterceptorsFromDi()),
daffProvideToast(),
provideDaffToast(),
],
})
export class AppModule { }
2 changes: 1 addition & 1 deletion libs/analytics/src/lib/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const {
* Allows you to provide configuration to the `@daffodil/analytics` package.
*/
token: DaffAnalyticsConfig,
provider: daffProvideAnalyticsConfig,
provider: provideDaffAnalyticsConfig,
} = createConfigInjectionToken(
defaultConfig,
'DaffAnalyticsConfig',
Expand Down
2 changes: 1 addition & 1 deletion libs/auth/driver/src/interfaces/auth-service.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export interface DaffAuthServiceInterface {

export const {
token: DaffAuthDriver,
provider: daffProvideAuthDriver,
provider: provideDaffAuthDriver,
} = createSingletonInjectionToken<DaffAuthServiceInterface>('DaffAuthDriver');
2 changes: 1 addition & 1 deletion libs/auth/driver/src/interfaces/login-service.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ export interface DaffLoginServiceInterface<

export const {
token: DaffLoginDriver,
provider: daffProvideLoginDriver,
provider: provideDaffLoginDriver,
} = createSingletonInjectionToken<DaffLoginServiceInterface>('DaffLoginDriver');
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ export interface DaffRegisterServiceInterface<

export const {
token: DaffRegisterDriver,
provider: daffProvideRegisterDriver,
provider: provideDaffRegisterDriver,
} = createSingletonInjectionToken<DaffRegisterServiceInterface>('DaffRegisterDriver');
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ export interface DaffResetPasswordServiceInterface<

export const {
token: DaffResetPasswordDriver,
provider: daffProvideResetPasswordDriver,
provider: provideDaffResetPasswordDriver,
} = createSingletonInjectionToken<DaffResetPasswordServiceInterface>('DaffResetPasswordDriver');
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createSingleInjectionToken } from '@daffodil/core';

export const {
token: DaffAuthGuestOnlyGuardRedirectUrl,
provider: daffProvideAuthGuestOnlyGuardRedirectUrl,
provider: provideDaffAuthGuestOnlyGuardRedirectUrl,
} = createSingleInjectionToken<string>(
'DaffAuthGuestOnlyGuardRedirectUrl',
{ factory: () => '/' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createSingleInjectionToken } from '@daffodil/core';

export const {
token: DaffAuthMemberOnlyGuardRedirectUrl,
provider: daffProvideAuthMemberOnlyGuardRedirectUrl,
provider: provideDaffAuthMemberOnlyGuardRedirectUrl,
} = createSingleInjectionToken<string>(
'DaffAuthMemberOnlyGuardRedirectUrl',
{ factory: () => '/' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const {
* Can be used to further refine Daffodil errors into more specific app errors.
*/
token: DAFF_AUTH_ERROR_MATCHER,
provider: daffProvideAuthErrorMatcher,
provider: provideDaffAuthErrorMatcher,
} = createSingleInjectionToken<typeof daffTransformErrorToStateError>(
'DAFF_AUTH_ERROR_MATCHER',
{ factory: () => daffTransformErrorToStateError },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const {
* @docs-private
*/
token: DAFF_AUTH_UNAUTHENTICATED_HOOK,
provider: daffProvideAuthUnauthenticatedHook,
provider: provideDaffAuthUnauthenticatedHook,
} = createSingleInjectionToken<DaffAuthUnauthenticatedHook>(
'DAFF_AUTH_UNAUTHENTICATED_HOOK',
{
Expand Down
2 changes: 1 addition & 1 deletion libs/auth/state/src/reducers/token/reducers.token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const {
* @docs-private
*/
token: DAFF_AUTH_REDUCERS,
provider: daffProvideAuthReducers,
provider: provideDaffAuthReducers,
} = createSingleInjectionToken<ActionReducer<DaffAuthFeatureState>>(
'DAFF_AUTH_REDUCERS',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createSingleInjectionToken } from '@daffodil/core';

export const {
token: DaffAuthorizeNetConfigToken,
provider: daffProvideAuthorizeNetConfigToken,
provider: provideDaffAuthorizeNetConfigToken,
} = createSingleInjectionToken<DaffAuthorizeNetConfig>('DaffAuthorizeNetConfigToken');

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { createSingleInjectionToken } from '@daffodil/core';

export const {
token: DaffAuthorizeNetPaymentId,
provider: daffProvideAuthorizeNetPaymentId,
provider: provideDaffAuthorizeNetPaymentId,
} = createSingleInjectionToken<string>('DaffAuthorizeNetPaymentId');
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createSingletonInjectionToken } from '@daffodil/core';

export const {
token: DaffAuthorizeNetDriver,
provider: daffProvideAuthorizeNetDriver,
provider: provideDaffAuthorizeNetDriver,
} = createSingletonInjectionToken<DaffAuthorizeNetService>('DaffAuthorizeNetDriver');

export interface DaffAuthorizeNetService<T extends DaffAuthorizeNetTokenRequest = DaffAuthorizeNetTokenRequest> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const {
* An injection token for the authorize.net payment driver.
*/
token: DaffAuthorizeNetPaymentDriver,
provider: daffProvideAuthorizeNetPaymentDriver,
provider: provideDaffAuthorizeNetPaymentDriver,
} = createSingletonInjectionToken<DaffAuthorizeNetPaymentDriverInterface>('DaffAuthorizeNetPaymentDriver');

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const {
* By default, we assume you're using the sandbox (false).
*/
token: DAFF_AUTHORIZENET_ACCEPT_JS_PRODUCTION,
provider: daffProvideAuthorizenetAcceptJsProduction,
provider: provideDaffAuthorizenetAcceptJsProduction,
} = createSingleInjectionToken<boolean>(
'DAFF_AUTHORIZENET_ACCEPT_JS_PRODUCTION',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { daffTransformErrorToStateError } from '@daffodil/core/state';
*/
export const {
token: DAFF_AUTHORIZENET_ERROR_MATCHER,
provider: daffProvideAuthorizenetErrorMatcher,
provider: provideDaffAuthorizenetErrorMatcher,
} = createSingleInjectionToken<typeof daffTransformErrorToStateError>(
'DAFF_AUTHORIZENET_ERROR_MATCHER',
{ factory: () => daffTransformErrorToStateError },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const {
* @docs-private
*/
token: DAFF_AUTHORIZE_NET_REDUCERS,
provider: daffProvideAuthorizeNetReducers,
provider: provideDaffAuthorizeNetReducers,
} = createSingleInjectionToken<ActionReducer<DaffAuthorizeNetReducersState>>(
'DAFF_AUTHORIZE_NET_REDUCERS',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const {
* Can be used to further refine Daffodil errors into more specific app errors.
*/
token: DAFF_CART_CUSTOMER_ERROR_MATCHER,
provider: daffProvideCartCustomerErrorMatcher,
provider: provideDaffCartCustomerErrorMatcher,
} = createSingleInjectionToken<typeof daffTransformErrorToStateError>(
'DAFF_CART_CUSTOMER_ERROR_MATCHER',
{ factory: () => daffTransformErrorToStateError },
Expand Down
4 changes: 2 additions & 2 deletions libs/cart-store-credit/driver/magento/src/driver.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from '@angular/core';

import {
daffProvideCartMagentoCartTransforms,
provideDaffCartMagentoCartTransforms,
DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS,
} from '@daffodil/cart/driver/magento';
import { DaffCartStoreCreditDriver } from '@daffodil/cart-store-credit/driver';
Expand Down Expand Up @@ -33,7 +33,7 @@ export class DaffCartStoreCreditMagentoDriverModule {
useValue: magentoCartStoreCreditFragment,
multi: true,
},
daffProvideCartMagentoCartTransforms(
provideDaffCartMagentoCartTransforms(
magentoCartWithStoreCreditTransform,
),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { GraphQLError } from 'graphql';
import { catchError } from 'rxjs/operators';

import { daffProvideCartMagentoCartTransforms } from '@daffodil/cart/driver/magento';
import { provideDaffCartMagentoCartTransforms } from '@daffodil/cart/driver/magento';
import {
MagentoCartWithStoreCredit,
MagentoApplyStoreCreditResponse,
Expand Down Expand Up @@ -50,7 +50,7 @@ describe('@daffodil/cart-store-credit/driver/magento | DaffCartStoreCreditMagent
possibleTypes: schema.possibleTypes,
}),
},
daffProvideCartMagentoCartTransforms(
provideDaffCartMagentoCartTransforms(
magentoCartWithStoreCreditTransform,
),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { createSingletonInjectionToken } from '@daffodil/core';
*/
export const {
token: DaffCartStoreCreditDriver,
provider: daffProvideCartStoreCreditDriver,
provider: provideDaffCartStoreCreditDriver,
} = createSingletonInjectionToken<DaffCartStoreCreditDriverInterface>('DaffCartStoreCreditDriver');

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const {
* Can be used to further refine Daffodil errors into more specific app errors.
*/
token: DAFF_CART_STORE_CREDIT_ERROR_MATCHER,
provider: daffProvideCartStoreCreditErrorMatcher,
provider: provideDaffCartStoreCreditErrorMatcher,
} = createSingleInjectionToken<typeof daffTransformErrorToStateError>(
'DAFF_CART_STORE_CREDIT_ERROR_MATCHER',
{ factory: () => daffTransformErrorToStateError },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const {
* @docs-private
*/
token: DAFF_CART_STORE_CREDIT_REDUCERS,
provider: daffProvideCartStoreCreditReducers,
provider: provideDaffCartStoreCreditReducers,
} = createSingleInjectionToken<ActionReducer<DaffCartStoreCreditReducersState>>(
'DAFF_CART_STORE_CREDIT_REDUCERS',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const {
* and should be used with care.
*/
token: DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,
provider: daffProvideCartInMemoryExtraAttributesHook,
provider: provideDaffCartInMemoryExtraAttributesHook,
} = createSingleInjectionToken<DaffCartInMemoryExtraAttributesHook>(
'DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK',
{ factory: () => (reqInfo, cart) => ({}) },
Expand Down
4 changes: 2 additions & 2 deletions libs/cart/driver/magento/src/cart-item.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import {
MagentoAddCartItemResponse,
addCartItem,
DaffCartMagentoCartItemTransform,
daffProvideCartMagentoCartItemTransforms,
provideDaffCartMagentoCartItemTransforms,
MagentoCartUserInputErrorType,
MagentoCartUserInputError,
} from '@daffodil/cart/driver/magento';
Expand Down Expand Up @@ -109,7 +109,7 @@ describe('@daffodil/cart/driver/magento | CartItemService', () => {
],
providers: [
DaffMagentoCartItemService,
...daffProvideCartMagentoCartItemTransforms(transform),
...provideDaffCartMagentoCartItemTransforms(transform),
{
provide: APOLLO_TESTING_CACHE,
useValue: new InMemoryCache({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { DaffQueuedApollo } from '@daffodil/core/graphql';

export const {
token: DAFF_MAGENTO_CART_MUTATION_QUEUE,
provider: daffProvideCartMagentoMutationQueue,
provider: provideDaffCartMagentoMutationQueue,
} = createSingleInjectionToken<DaffQueuedApollo>(
'DAFF_MAGENTO_CART_MUTATION_QUEUE', {
providedIn: 'root',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export const {
* to accommodate the extra complexity contributed by the provided fragments.
*/
token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS,
provider: daffProvideCartMagentoExtraCartFragments,
provider: provideDaffCartMagentoExtraCartFragments,
} = createMultiInjectionToken<DocumentNode>('DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS');
4 changes: 2 additions & 2 deletions libs/cart/driver/magento/src/injection-tokens/public_api.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export { DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS } from './fragments/cart';
export {
daffProvideCartMagentoCartItemTransforms,
provideDaffCartMagentoCartItemTransforms,
DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS,
} from './transforms/cart-item/token';
export {
daffProvideCartMagentoCartTransforms,
provideDaffCartMagentoCartTransforms,
DAFF_CART_MAGENTO_CART_TRANSFORMS,
} from './transforms/cart/token';
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { TestBed } from '@angular/core/testing';
import { DaffCartMagentoCartItemTransform } from '@daffodil/cart/driver/magento';

import {
daffProvideCartMagentoCartItemTransforms,
provideDaffCartMagentoCartItemTransforms,
DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS,
} from './token';

describe('daffProvideCartMagentoCartItemTransforms', () => {
describe('provideDaffCartMagentoCartItemTransforms', () => {
let transforms: DaffCartMagentoCartItemTransform[];
let result: DaffCartMagentoCartItemTransform[];

Expand All @@ -19,7 +19,7 @@ describe('daffProvideCartMagentoCartItemTransforms', () => {

TestBed.configureTestingModule({
providers: [
...daffProvideCartMagentoCartItemTransforms(...transforms),
...provideDaffCartMagentoCartItemTransforms(...transforms),
],
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export const {
*
* ```ts
* providers: [
* ...daffProvideCartMagentoCartItemTransforms(
* ...provideDaffCartMagentoCartItemTransforms(
* myCartItemTransform
* )
* ]
* ```
*/
provider: daffProvideCartMagentoCartItemTransforms,
provider: provideDaffCartMagentoCartItemTransforms,
} = createMultiInjectionToken<DaffCartMagentoCartItemTransform>('DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS');
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { TestBed } from '@angular/core/testing';
import { DaffCartMagentoCartTransform } from '@daffodil/cart/driver/magento';

import {
daffProvideCartMagentoCartTransforms,
provideDaffCartMagentoCartTransforms,
DAFF_CART_MAGENTO_CART_TRANSFORMS,
} from './token';

describe('daffProvideCartMagentoCartTransforms', () => {
describe('provideDaffCartMagentoCartTransforms', () => {
let transforms: DaffCartMagentoCartTransform[];
let result: DaffCartMagentoCartTransform[];

Expand All @@ -19,7 +19,7 @@ describe('daffProvideCartMagentoCartTransforms', () => {

TestBed.configureTestingModule({
providers: [
...daffProvideCartMagentoCartTransforms(...transforms),
...provideDaffCartMagentoCartTransforms(...transforms),
],
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ export const {
*
* ```ts
* providers: [
* ...daffProvideCartMagentoCartTransforms(
* ...provideDaffCartMagentoCartTransforms(
* myCartTransform
* )
* ]
* ```
*/
provider: daffProvideCartMagentoCartTransforms,
provider: provideDaffCartMagentoCartTransforms,
} = createMultiInjectionToken<DaffCartMagentoCartTransform>('DAFF_CART_MAGENTO_CART_TRANSFORMS');
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
MagentoCart,
MagentoCartCoupon,
DaffCartMagentoCartItemTransform,
daffProvideCartMagentoCartItemTransforms,
provideDaffCartMagentoCartItemTransforms,
} from '@daffodil/cart/driver/magento';
import {
MagentoCartFactory,
Expand Down Expand Up @@ -42,7 +42,7 @@ describe('@daffodil/cart/driver/magento | CartCouponResponse', () => {
TestBed.configureTestingModule({
providers: [
DaffMagentoCartTransformer,
...daffProvideCartMagentoCartItemTransforms(transform),
...provideDaffCartMagentoCartItemTransforms(transform),
],
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
DaffMagentoCartShippingRateTransformer,
DaffMagentoShippingAddressTransformer,
DaffCartMagentoCartItemTransform,
daffProvideCartMagentoCartItemTransforms,
provideDaffCartMagentoCartItemTransforms,
} from '@daffodil/cart/driver/magento';
import {
MagentoCartFactory,
Expand Down Expand Up @@ -85,7 +85,7 @@ describe('@daffodil/cart/driver/magento | MagentoCart', () => {
provide: DaffMagentoShippingAddressTransformer,
useValue: shippingAddressTransformerSpy,
},
...daffProvideCartMagentoCartItemTransforms(transform),
...provideDaffCartMagentoCartItemTransforms(transform),
],
});

Expand Down
Loading

0 comments on commit c098de0

Please sign in to comment.