Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed error in demo #2

Open
wants to merge 62 commits into
base: fix/demo/in-mem-driver-not-loaded
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
8b278ae
feat(eslint-config): restrict `window` global access (#3053)
griest024 Sep 9, 2024
aa5ec26
feat(design): create `DaffBreadcrumbComponent` (#3028)
xelaint Sep 10, 2024
ccf41f6
feat(dgeni): render subpackages under root package (#3063)
griest024 Sep 13, 2024
9a513e5
docs(design): add host-directive documentation for core directives (#…
xelaint Sep 16, 2024
b911d12
chore: release 0.76.0 (#2959)
gray-bot Sep 16, 2024
04e1f4f
feat(design): add deep tree example (#3067)
griest024 Sep 16, 2024
7d07b8a
fix(core): allow shuffle to return first element in first index (#3070)
gracetxgao Sep 17, 2024
cb114f1
fix(design): tree item descendants are not hidden on ancestor collaps…
griest024 Sep 17, 2024
d4df739
fix(demo): in-memory driver never gets loaded (#3051)
griest024 Sep 17, 2024
8c58188
feat(all)!: upgrade Angular to v18 (#3052)
griest024 Sep 17, 2024
caead1a
style(all): fix lint (#3052)
griest024 Sep 17, 2024
57d215b
fix(all): in-memory not overriding http client (#3052)
griest024 Sep 17, 2024
ef55e1d
fix(daffio): index file cannot be found in SSR (#3052)
griest024 Sep 17, 2024
e129127
docs(cart-customer): add installation instructions to overview docs (…
xelaint Sep 17, 2024
6179657
docs(cart-store-credit): add yarn installation instructions to overvi…
xelaint Sep 17, 2024
3f1a93d
feat(daffio): redirect `api` and `packages` to new route (#3076)
griest024 Sep 17, 2024
61efd37
docs(content): add installation docs (#3077)
xelaint Sep 18, 2024
05ba94a
docs(analytics): update installation docs (#3078)
xelaint Sep 18, 2024
4d4af50
docs(customer-auth): add installation docs to overview (#3079)
xelaint Sep 18, 2024
63e43fe
docs(customer-payment-authorizenet): update installation docs in over…
xelaint Sep 18, 2024
843cae1
docs(customer-order): update installation docs in overview (#3080)
xelaint Sep 18, 2024
b5a39df
docs(customer-payment): update installation docs in overview (#3082)
xelaint Sep 18, 2024
64e9ce3
fix(driver): allow undefined extensions key in Magento graphql respon…
damienwebdev Sep 18, 2024
0aba4a0
fix(cart): adjust Magento error handling for v2.4.6 removal of extens…
damienwebdev Sep 18, 2024
1c1bd55
chore: release 0.77.0 (#3071)
gray-bot Sep 18, 2024
21156fa
docs(customer-store-credit): update installation docs in overview (#3…
xelaint Sep 18, 2024
303bb42
docs(customer): update installation docs in overview (#3084)
xelaint Sep 18, 2024
a0b989c
docs(forms): clean up overview docs (#3085)
xelaint Sep 18, 2024
0a74a63
docs(order): clean up overview docs (#3086)
xelaint Sep 18, 2024
fd42854
docs(payment): clean up overview docs (#3090)
xelaint Sep 18, 2024
f5fd825
docs(paypal): clean up formatting and verbiage of existing documentat…
xelaint Sep 18, 2024
81ac902
docs(product-composite): clean up formatting and verbiage of existing…
xelaint Sep 18, 2024
92b0c42
docs(product-configurable): clean up formatting and verbiage of exist…
xelaint Sep 19, 2024
4427fe1
feat(daffio): render subpackages on package page (#3094)
griest024 Sep 19, 2024
0e0ca5b
feat(docs-utils,dgeni): generate breadcrumbs from doc path (#3047)
griest024 Sep 19, 2024
18161f2
docs(product): clean up formatting and verbiage of existing documenta…
xelaint Sep 19, 2024
45cdf1f
docs(related-products): clean up formatting and verbiage of existing …
xelaint Sep 19, 2024
c7e8ced
docs(reviews): clean up formatting and verbiage of existing documenta…
xelaint Sep 19, 2024
e39d98d
docs(router): clean up formatting and verbiage of existing documentat…
xelaint Sep 19, 2024
399ee75
docs(search-category): clean up formatting and verbiage of existing d…
xelaint Sep 19, 2024
e133f87
docs(search-product-composite): clean up formatting and verbiage of e…
xelaint Sep 19, 2024
e2a014d
docs(search-product-configurable): clean up formatting and verbiage o…
xelaint Sep 19, 2024
2822f03
docs(search-product): clean up formatting and verbiage of existing do…
xelaint Sep 19, 2024
0e92c31
docs(newsletter): clean up formatting and verbiage of existing docume…
xelaint Sep 20, 2024
87fe43b
docs(search): clean up formatting and verbiage of existing documentat…
xelaint Sep 20, 2024
41048e2
docs(seo): clean up formatting and verbiage of existing documentation…
xelaint Sep 20, 2024
1c0dd34
docs(upsell-products): clean up formatting and verbiage of existing d…
xelaint Sep 20, 2024
8743e69
docs(analytics-provider-data-layer): clean up formatting and verbiage…
xelaint Sep 20, 2024
5cb84f3
fix(dgeni): type alias symbols don't get link tag added (#3110)
griest024 Sep 23, 2024
56628da
feat(design, daffio): move sidebar content pad and nav pad code to css
xelaint Sep 23, 2024
1f474f8
test(design): remove commented out test in sidebar content shift test…
xelaint Sep 23, 2024
e062198
docs: add information about versioning practices (#3104)
gracetxgao Sep 24, 2024
7d7a2c8
feat: autogenerate package list in README (#3109)
griest024 Sep 24, 2024
2ce62f1
ci: fix release please step (#3115)
griest024 Sep 24, 2024
1b9a7df
ci: fix release please step (#3116)
griest024 Sep 24, 2024
839afbd
fix(design): update the property used to set a default alignment on c…
xelaint Sep 24, 2024
4f6f045
refactor(design): remove unused sidebarViewportHeight code in the sid…
xelaint Sep 24, 2024
9990481
ci: add package-lock.json to nx inputs (#3120)
gracetxgao Sep 25, 2024
7896859
ci: use the correct ci user in release-please
damienwebdev Sep 25, 2024
5dc55dc
refactor(design): remove leading combinator from sidebar viewport sty…
xelaint Sep 25, 2024
d33ae96
ci: amend github username and email for release
damienwebdev Sep 25, 2024
2137247
feat(eslint): add linting rules for testing
gracetxgao Sep 11, 2024
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
Prev Previous commit
Next Next commit
fix(demo): in-memory driver never gets loaded (graycoreio#3051)
  • Loading branch information
griest024 authored Sep 17, 2024
commit d4df739f904b8de770e5e10bba77cc40b8cdf994
12 changes: 12 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
{
"replace": "apps/demo/src/environments/environment.ts",
"with": "apps/demo/src/environments/environment.prod.ts"
},
{
"replace": "apps/demo/src/app/drivers/driver.module.ts",
"with": "apps/demo/src/app/drivers/in-memory.module.ts"
}
]
},
Expand All @@ -86,6 +90,10 @@
{
"replace": "apps/demo/src/environments/environment.ts",
"with": "apps/demo/src/environments/environment.magento.ts"
},
{
"replace": "apps/demo/src/app/drivers/driver.module.ts",
"with": "apps/demo/src/app/drivers/magento.module.ts"
}
]
},
Expand All @@ -94,6 +102,10 @@
{
"replace": "apps/demo/src/environments/environment.ts",
"with": "apps/demo/src/environments/environment.venia.ts"
},
{
"replace": "apps/demo/src/app/drivers/driver.module.ts",
"with": "apps/demo/src/app/drivers/magento.module.ts"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions apps/demo/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { DemoCartRootModule } from './cart/cart-root.module';
import { CategoryModule } from './category/category.module';
import { DemoCheckoutStepActionTypes } from './checkout/actions/checkout-step.actions';
import { TemplateModule } from './core/template/template/template.module';
import { DemoDriverMap } from './drivers/map';
import { DemoDriverModule } from './drivers/driver.module';
import { NotFoundModule } from './misc/not-found/not-found.module';
import { ProductModule } from './product/product.module';
import { DemoRoutingComponentModule } from './routing/routing-component.module';
Expand All @@ -36,7 +36,7 @@ import { environment } from '../environments/environment';

HttpClientModule,

DemoDriverMap[environment.driver.variant],
DemoDriverModule,

StoreModule.forRoot({}),
EffectsModule.forRoot([]),
Expand Down
4 changes: 4 additions & 0 deletions apps/demo/src/app/drivers/driver.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { NgModule } from '@angular/core';

@NgModule()
export class DemoDriverModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api';

import { DaffAuthInMemoryDriverModule } from '@daffodil/auth/driver/in-memory';
import { DaffAuthorizeNetInMemoryDriverModule } from '@daffodil/authorizenet/driver/in-memory';
import { DaffCartInMemoryDriverModule } from '@daffodil/cart/driver/in-memory';
import { DaffCategoryInMemoryDriverModule } from '@daffodil/category/driver/in-memory';
import { DaffInMemoryBackendCategoryService } from '@daffodil/category/driver/in-memory';
Expand All @@ -19,13 +20,13 @@ import { DaffProductInMemoryDriverModule } from '@daffodil/product/driver/in-mem
import { DaffCompositeProductInMemoryDriverModule } from '@daffodil/product-composite/driver/in-memory';
import { DaffConfigurableProductInMemoryDriverModule } from '@daffodil/product-configurable/driver/in-memory';

import { DemoInMemoryBackendService } from './backend/backend.service';
import { DEMO_EXTERNAL_ROUTER_DRIVER_IN_MEMORY_CONFIG } from './external-router.config.token';

import { DemoInMemoryBackendService } from './in-memory/backend/backend.service';
import { DEMO_EXTERNAL_ROUTER_DRIVER_IN_MEMORY_CONFIG } from './in-memory/external-router.config.token';

@NgModule({
imports: [
HttpClientInMemoryWebApiModule.forRoot(DemoInMemoryBackendService),
DaffAuthorizeNetInMemoryDriverModule.forRoot(),
DaffAuthInMemoryDriverModule.forRoot(),
DaffProductInMemoryDriverModule.forRoot(),
DaffCompositeProductInMemoryDriverModule.forRoot(),
Expand All @@ -47,4 +48,4 @@ import { DEMO_EXTERNAL_ROUTER_DRIVER_IN_MEMORY_CONFIG } from './external-router.
},
],
})
export class DemoInMemoryDriverModule { }
export class DemoDriverModule { }
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import { DaffNavigationMagentoDriverModule } from '@daffodil/navigation/driver/m
import { DaffNewsletterInMemoryDriverModule } from '@daffodil/newsletter/driver/in-memory';
import { DaffProductMagentoDriverModule } from '@daffodil/product/driver/magento';

import { demoMagentoApolloOptions } from './apollo-options.factory';
import { environment } from '../../../environments/environment';
import { MagentoEnvironmentDriverConfiguration } from '../../../environments/environment.interface';
import { demoMagentoApolloOptions } from './magento/apollo-options.factory';
import { environment } from '../../environments/environment';
import { MagentoEnvironmentDriverConfiguration } from '../../environments/environment.interface';

@NgModule({
imports: [
Expand Down Expand Up @@ -47,4 +47,4 @@ import { MagentoEnvironmentDriverConfiguration } from '../../../environments/env
},
],
})
export class DemoMagentoDriverModule {}
export class DemoDriverModule {}
22 changes: 0 additions & 22 deletions apps/demo/src/app/drivers/map.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { DaffCartInMemoryDriverModule } from '@daffodil/cart/driver/in-memory';
import { DaffNewsletterInMemoryDriverModule } from '@daffodil/newsletter/driver/in-memory';
import { DaffProductShopifyDriverModule } from '@daffodil/product/driver/shopify';

import { environment } from '../../../environments/environment';
import { ShopifyEnviromentDriverConfiguration } from '../../../environments/environment.interface';
import { environment } from '../../environments/environment';
import { ShopifyEnviromentDriverConfiguration } from '../../environments/environment.interface';

const cache = new InMemoryCache();

Expand All @@ -25,7 +25,7 @@ const cache = new InMemoryCache();
DaffNewsletterInMemoryDriverModule.forRoot(),
],
})
export class DemoShopifyDriverModule {
export class DemoDriverModule {
driver: ShopifyEnviromentDriverConfiguration = (<ShopifyEnviromentDriverConfiguration>environment.driver);

// Shopify
Expand Down
14 changes: 7 additions & 7 deletions apps/demo/src/environments/environment.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@

import { DaffAuthorizeNetConfig } from '@daffodil/authorizenet/driver';

export const DemoDriverVariantEnum = {
IN_MEMORY: 0,
MAGENTO: 1,
SHOPIFY: 2,
export enum DemoDriverVariantEnum {
IN_MEMORY = 'IN_MEMORY',
MAGENTO = 'MAGENTO',
SHOPIFY = 'SHOPIFY',
};

export interface InMemoryEnviromentDriverConfiguration {
variant: typeof DemoDriverVariantEnum.IN_MEMORY;
variant: DemoDriverVariantEnum.IN_MEMORY;
}

export interface MagentoEnvironmentDriverConfiguration {
variant: typeof DemoDriverVariantEnum.MAGENTO;
variant: DemoDriverVariantEnum.MAGENTO;
domain: string;
anetConfig: DaffAuthorizeNetConfig;
}

export interface ShopifyEnviromentDriverConfiguration {
variant: typeof DemoDriverVariantEnum.SHOPIFY;
variant: DemoDriverVariantEnum.SHOPIFY;
domain: string;
publicAccessToken: string;
}
Expand Down