@graphcommerce/next-config 9.0.4-canary.9 → 9.1.0-canary.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/__tests__/config/utils/mergeEnvIntoConfig.ts +12 -1
- package/__tests__/config/utils/replaceConfigInString.ts +0 -1
- package/__tests__/interceptors/findPlugins.ts +301 -254
- package/__tests__/utils/resolveDependenciesSync.ts +44 -44
- package/dist/generated/config.js +109 -120
- package/dist/index.js +3359 -26
- package/package.json +33 -8
- package/src/config/commands/generateConfig.ts +16 -4
- package/src/config/demoConfig.ts +0 -1
- package/src/config/loadConfig.ts +3 -9
- package/src/config/utils/mergeEnvIntoConfig.ts +8 -6
- package/src/generated/config.ts +11 -5
- package/src/interceptors/generateInterceptor.ts +0 -2
- package/src/interceptors/parseStructure.ts +3 -3
- package/src/utils/resolveDependenciesSync.ts +43 -6
- package/src/withGraphCommerce.ts +30 -42
- package/tsconfig.json +1 -1
- package/__tests__/config/utils/rewriteLegancyEnv.ts +0 -79
- package/dist/commands/codegen.js +0 -18
- package/dist/commands/copyFiles.js +0 -297
- package/dist/config/commands/exportConfig.js +0 -16
- package/dist/config/commands/generateConfig.js +0 -56
- package/dist/config/demoConfig.js +0 -52
- package/dist/config/index.js +0 -19
- package/dist/config/loadConfig.js +0 -62
- package/dist/config/utils/configToImportMeta.js +0 -39
- package/dist/config/utils/diff.js +0 -33
- package/dist/config/utils/exportConfigToEnv.js +0 -31
- package/dist/config/utils/mergeEnvIntoConfig.js +0 -182
- package/dist/config/utils/replaceConfigInString.js +0 -12
- package/dist/config/utils/rewriteLegacyEnv.js +0 -115
- package/dist/interceptors/InterceptorPlugin.js +0 -108
- package/dist/interceptors/RenameVisitor.js +0 -19
- package/dist/interceptors/Visitor.js +0 -1414
- package/dist/interceptors/commands/codegenInterceptors.js +0 -22
- package/dist/interceptors/extractExports.js +0 -159
- package/dist/interceptors/findOriginalSource.js +0 -103
- package/dist/interceptors/findPlugins.js +0 -68
- package/dist/interceptors/generateInterceptor.js +0 -219
- package/dist/interceptors/generateInterceptors.js +0 -56
- package/dist/interceptors/parseStructure.js +0 -84
- package/dist/interceptors/swc.js +0 -15
- package/dist/interceptors/writeInterceptors.js +0 -44
- package/dist/utils/PackagesSort.js +0 -7
- package/dist/utils/TopologicalSort.js +0 -87
- package/dist/utils/isMonorepo.js +0 -47
- package/dist/utils/packageRoots.js +0 -31
- package/dist/utils/resolveDependenciesSync.js +0 -78
- package/dist/utils/resolveDependency.js +0 -70
- package/dist/utils/sig.js +0 -34
- package/dist/withGraphCommerce.js +0 -162
- package/src/config/utils/rewriteLegacyEnv.ts +0 -125
|
@@ -1,74 +1,74 @@
|
|
|
1
1
|
import { resolveDependenciesSync, sortDependencies } from '../../src/utils/resolveDependenciesSync'
|
|
2
2
|
|
|
3
3
|
const projectRoot = `${process.cwd()}/examples/magento-graphcms`
|
|
4
|
-
it('resolves
|
|
4
|
+
it('It resolves and sorts dependencies beginning with the root example package and ending with the the packages used everywhere.', () => {
|
|
5
5
|
const dependencies = resolveDependenciesSync(projectRoot)
|
|
6
6
|
expect(dependencies).toMatchInlineSnapshot(
|
|
7
7
|
`
|
|
8
8
|
Map {
|
|
9
9
|
"." => "examples/magento-graphcms",
|
|
10
|
-
"@graphcommerce/
|
|
11
|
-
"@graphcommerce/hygraph-cli" => "packages/hygraph-cli",
|
|
12
|
-
"@graphcommerce/demo-magento-graphcommerce" => "packages/demo-magento-graphcommerce",
|
|
13
|
-
"@graphcommerce/magento-recently-viewed-products" => "packages/magento-recently-viewed-products",
|
|
14
|
-
"@graphcommerce/google-playstore" => "packages/google-playstore",
|
|
15
|
-
"@graphcommerce/googleanalytics" => "packages/googleanalytics",
|
|
16
|
-
"@graphcommerce/googlerecaptcha" => "packages/googlerecaptcha",
|
|
17
|
-
"@graphcommerce/googletagmanager" => "packages/googletagmanager",
|
|
18
|
-
"@graphcommerce/hygraph-dynamic-rows" => "packages/hygraph-dynamic-rows",
|
|
19
|
-
"@graphcommerce/hygraph-ui" => "packages/hygraph-ui",
|
|
20
|
-
"@graphcommerce/magento-cart-billing-address" => "packages/magento-cart-billing-address",
|
|
21
|
-
"@graphcommerce/magento-cart-checkout" => "packages/magento-cart-checkout",
|
|
22
|
-
"@graphcommerce/magento-cart-coupon" => "packages/magento-cart-coupon",
|
|
23
|
-
"@graphcommerce/magento-cart-email" => "packages/magento-cart-email",
|
|
24
|
-
"@graphcommerce/magento-cms" => "packages/magento-cms",
|
|
25
|
-
"@graphcommerce/magento-compare" => "packages/magento-compare",
|
|
26
|
-
"@graphcommerce/magento-graphql-rest" => "packages/magento-graphql-rest",
|
|
27
|
-
"@graphcommerce/magento-newsletter" => "packages/magento-newsletter",
|
|
28
|
-
"@graphcommerce/magento-payment-included" => "packages/magento-payment-included",
|
|
29
|
-
"@graphcommerce/magento-product-bundle" => "packages/magento-product-bundle",
|
|
30
|
-
"@graphcommerce/magento-product-downloadable" => "packages/magento-product-downloadable",
|
|
31
|
-
"@graphcommerce/magento-product-grouped" => "packages/magento-product-grouped",
|
|
32
|
-
"@graphcommerce/magento-product-virtual" => "packages/magento-product-virtual",
|
|
33
|
-
"@graphcommerce/magento-review" => "packages/magento-review",
|
|
34
|
-
"@graphcommerce/magento-wishlist" => "packages/magento-wishlist",
|
|
35
|
-
"@graphcommerce/service-worker" => "packages/service-worker",
|
|
36
|
-
"@graphcommerce/magento-cart-pickup" => "packages/magento-cart-pickup",
|
|
37
|
-
"@graphcommerce/magento-payment-braintree" => "packages/magento-payment-braintree",
|
|
38
|
-
"@graphcommerce/mollie-magento-payment" => "packages/mollie-magento-payment",
|
|
39
|
-
"@graphcommerce/magento-product-configurable" => "packages/magento-product-configurable",
|
|
40
|
-
"@graphcommerce/magento-product-simple" => "packages/magento-product-simple",
|
|
41
|
-
"@graphcommerce/magento-category" => "packages/magento-category",
|
|
42
|
-
"@graphcommerce/magento-cart-items" => "packages/magento-cart-items",
|
|
43
|
-
"@graphcommerce/lingui-next" => "packages/lingui-next",
|
|
44
|
-
"@graphcommerce/magento-payment-paypal" => "packages/magento-payment-paypal",
|
|
45
|
-
"@graphcommerce/algolia-categories" => "packages/algolia-categories",
|
|
10
|
+
"@graphcommerce/algolia-recommend" => "packages/algolia-recommend",
|
|
46
11
|
"@graphcommerce/algolia-personalization" => "packages/algolia-personalization",
|
|
47
12
|
"@graphcommerce/algolia-insights" => "packages/algolia-insights",
|
|
48
|
-
"@graphcommerce/algolia-
|
|
13
|
+
"@graphcommerce/algolia-categories" => "packages/algolia-categories",
|
|
49
14
|
"@graphcommerce/algolia-products" => "packages/algolia-products",
|
|
50
|
-
"@graphcommerce/
|
|
15
|
+
"@graphcommerce/magento-payment-paypal" => "packages/magento-payment-paypal",
|
|
16
|
+
"@graphcommerce/mollie-magento-payment" => "packages/mollie-magento-payment",
|
|
17
|
+
"@graphcommerce/magento-payment-braintree" => "packages/magento-payment-braintree",
|
|
18
|
+
"@graphcommerce/magento-cart-pickup" => "packages/magento-cart-pickup",
|
|
19
|
+
"@graphcommerce/service-worker" => "packages/service-worker",
|
|
20
|
+
"@graphcommerce/magento-wishlist" => "packages/magento-wishlist",
|
|
21
|
+
"@graphcommerce/magento-review" => "packages/magento-review",
|
|
22
|
+
"@graphcommerce/magento-product-grouped" => "packages/magento-product-grouped",
|
|
23
|
+
"@graphcommerce/magento-product-downloadable" => "packages/magento-product-downloadable",
|
|
24
|
+
"@graphcommerce/magento-product-bundle" => "packages/magento-product-bundle",
|
|
25
|
+
"@graphcommerce/magento-product-virtual" => "packages/magento-product-virtual",
|
|
26
|
+
"@graphcommerce/magento-payment-included" => "packages/magento-payment-included",
|
|
27
|
+
"@graphcommerce/magento-newsletter" => "packages/magento-newsletter",
|
|
28
|
+
"@graphcommerce/magento-graphql-rest" => "packages/magento-graphql-rest",
|
|
51
29
|
"@graphcommerce/magento-search" => "packages/magento-search",
|
|
30
|
+
"@graphcommerce/magento-compare" => "packages/magento-compare",
|
|
31
|
+
"@graphcommerce/magento-cms" => "packages/magento-cms",
|
|
32
|
+
"@graphcommerce/magento-cart-email" => "packages/magento-cart-email",
|
|
33
|
+
"@graphcommerce/magento-cart-checkout" => "packages/magento-cart-checkout",
|
|
34
|
+
"@graphcommerce/magento-cart-coupon" => "packages/magento-cart-coupon",
|
|
35
|
+
"@graphcommerce/magento-cart-billing-address" => "packages/magento-cart-billing-address",
|
|
36
|
+
"@graphcommerce/hygraph-dynamic-rows" => "packages/hygraph-dynamic-rows",
|
|
37
|
+
"@graphcommerce/hygraph-ui" => "packages/hygraph-ui",
|
|
38
|
+
"@graphcommerce/googletagmanager" => "packages/googletagmanager",
|
|
39
|
+
"@graphcommerce/googlerecaptcha" => "packages/googlerecaptcha",
|
|
40
|
+
"@graphcommerce/googleanalytics" => "packages/googleanalytics",
|
|
41
|
+
"@graphcommerce/google-playstore" => "packages/google-playstore",
|
|
52
42
|
"@graphcommerce/google-datalayer" => "packages/google-datalayer",
|
|
53
|
-
"@graphcommerce/magento-product" => "packages/magento-product",
|
|
54
43
|
"@graphcommerce/magento-cart-shipping-method" => "packages/magento-cart-shipping-method",
|
|
55
44
|
"@graphcommerce/magento-cart-payment-method" => "packages/magento-cart-payment-method",
|
|
56
45
|
"@graphcommerce/magento-cart-shipping-address" => "packages/magento-cart-shipping-address",
|
|
46
|
+
"@graphcommerce/demo-magento-graphcommerce" => "packages/demo-magento-graphcommerce",
|
|
47
|
+
"@graphcommerce/magento-recently-viewed-products" => "packages/magento-recently-viewed-products",
|
|
48
|
+
"@graphcommerce/magento-product-configurable" => "packages/magento-product-configurable",
|
|
49
|
+
"@graphcommerce/magento-product-simple" => "packages/magento-product-simple",
|
|
50
|
+
"@graphcommerce/magento-category" => "packages/magento-category",
|
|
51
|
+
"@graphcommerce/magento-cart-items" => "packages/magento-cart-items",
|
|
52
|
+
"@graphcommerce/lingui-next" => "packages/lingui-next",
|
|
53
|
+
"@graphcommerce/magento-product" => "packages/magento-product",
|
|
57
54
|
"@graphcommerce/magento-cart" => "packages/magento-cart",
|
|
58
55
|
"@graphcommerce/magento-customer" => "packages/magento-customer",
|
|
59
56
|
"@graphcommerce/magento-store" => "packages/magento-store",
|
|
60
57
|
"@graphcommerce/magento-graphql" => "packages/magento-graphql",
|
|
61
|
-
"@graphcommerce/graphql-mesh" => "packages/graphql-mesh",
|
|
62
58
|
"@graphcommerce/ecommerce-ui" => "packages/ecommerce-ui",
|
|
63
59
|
"@graphcommerce/react-hook-form" => "packages/react-hook-form",
|
|
64
60
|
"@graphcommerce/next-ui" => "packages/next-ui",
|
|
65
|
-
"@graphcommerce/framer-scroller" => "packages/framer-scroller",
|
|
66
|
-
"@graphcommerce/image" => "packages/image",
|
|
67
61
|
"@graphcommerce/framer-next-pages" => "packages/framer-next-pages",
|
|
68
|
-
"@graphcommerce/framer-utils" => "packages/framer-utils",
|
|
69
62
|
"@graphcommerce/graphql" => "packages/graphql",
|
|
70
63
|
"@graphcommerce/graphql-codegen-relay-optimizer-plugin" => "packagesDev/graphql-codegen-relay-optimizer-plugin",
|
|
71
64
|
"@graphcommerce/graphql-codegen-near-operation-file" => "packagesDev/graphql-codegen-near-operation-file",
|
|
65
|
+
"@graphcommerce/framer-scroller" => "packages/framer-scroller",
|
|
66
|
+
"@graphcommerce/image" => "packages/image",
|
|
67
|
+
"@graphcommerce/framer-utils" => "packages/framer-utils",
|
|
68
|
+
"@graphcommerce/cli" => "packages/cli",
|
|
69
|
+
"@graphcommerce/hygraph-cli" => "packages/hygraph-cli",
|
|
70
|
+
"@graphcommerce/next-config" => "packagesDev/next-config",
|
|
71
|
+
"@graphcommerce/graphql-mesh" => "packages/graphql-mesh",
|
|
72
72
|
"@graphcommerce/prettier-config-pwa" => "packagesDev/prettier-config",
|
|
73
73
|
"@graphcommerce/eslint-config-pwa" => "packagesDev/eslint-config",
|
|
74
74
|
"@graphcommerce/typescript-config-pwa" => "packagesDev/typescript-config",
|
package/dist/generated/config.js
CHANGED
|
@@ -1,140 +1,129 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.WebsitePermissionsSchema = exports.SidebarGalleryPaginationVariantSchema = exports.ProductFiltersLayoutSchema = exports.PaginationVariantSchema = exports.CustomerAccountPermissionsSchema = exports.ContainerSizingSchema = exports.CompareVariantSchema = exports.CartPermissionsSchema = exports.definedNonNullAnySchema = exports.isDefinedNonNullAny = void 0;
|
|
4
|
-
exports.DatalayerConfigSchema = DatalayerConfigSchema;
|
|
5
|
-
exports.GraphCommerceConfigSchema = GraphCommerceConfigSchema;
|
|
6
|
-
exports.GraphCommerceDebugConfigSchema = GraphCommerceDebugConfigSchema;
|
|
7
|
-
exports.GraphCommerceGooglePlaystoreConfigSchema = GraphCommerceGooglePlaystoreConfigSchema;
|
|
8
|
-
exports.GraphCommercePermissionsSchema = GraphCommercePermissionsSchema;
|
|
9
|
-
exports.GraphCommerceStorefrontConfigSchema = GraphCommerceStorefrontConfigSchema;
|
|
10
|
-
exports.MagentoConfigurableVariantValuesSchema = MagentoConfigurableVariantValuesSchema;
|
|
11
|
-
exports.RecentlyViewedProductsConfigSchema = RecentlyViewedProductsConfigSchema;
|
|
12
|
-
exports.SidebarGalleryConfigSchema = SidebarGalleryConfigSchema;
|
|
13
|
-
/* eslint-disable */
|
|
14
|
-
const zod_1 = require("zod");
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
15
3
|
const isDefinedNonNullAny = (v) => v !== undefined && v !== null;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
'ENABLED',
|
|
4
|
+
const definedNonNullAnySchema = z.any().refine((v) => isDefinedNonNullAny(v));
|
|
5
|
+
const CartPermissionsSchema = z.enum(["CUSTOMER_ONLY", "DISABLED", "ENABLED"]);
|
|
6
|
+
const CompareVariantSchema = z.enum(["CHECKBOX", "ICON"]);
|
|
7
|
+
const ContainerSizingSchema = z.enum(["BREAKPOINT", "FULL_WIDTH"]);
|
|
8
|
+
const CustomerAccountPermissionsSchema = z.enum([
|
|
9
|
+
"DISABLED",
|
|
10
|
+
"DISABLE_REGISTRATION",
|
|
11
|
+
"ENABLED"
|
|
25
12
|
]);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
const PaginationVariantSchema = z.enum(["COMPACT", "EXTENDED"]);
|
|
14
|
+
const ProductFiltersLayoutSchema = z.enum(["DEFAULT", "SIDEBAR"]);
|
|
15
|
+
const SidebarGalleryPaginationVariantSchema = z.enum(["DOTS", "THUMBNAILS_BOTTOM"]);
|
|
16
|
+
const WebsitePermissionsSchema = z.enum(["ENABLED"]);
|
|
30
17
|
function DatalayerConfigSchema() {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
return z.object({
|
|
19
|
+
coreWebVitals: z.boolean().nullish()
|
|
20
|
+
});
|
|
34
21
|
}
|
|
35
22
|
function GraphCommerceConfigSchema() {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
23
|
+
return z.object({
|
|
24
|
+
breadcrumbs: z.boolean().default(false).nullish(),
|
|
25
|
+
canonicalBaseUrl: z.string().min(1),
|
|
26
|
+
cartDisplayPricesInclTax: z.boolean().nullish(),
|
|
27
|
+
compare: z.boolean().nullish(),
|
|
28
|
+
compareVariant: CompareVariantSchema.default("ICON").nullish(),
|
|
29
|
+
configurableVariantForSimple: z.boolean().default(false).nullish(),
|
|
30
|
+
configurableVariantValues: MagentoConfigurableVariantValuesSchema().nullish(),
|
|
31
|
+
containerSizingContent: ContainerSizingSchema.default("FULL_WIDTH").nullish(),
|
|
32
|
+
containerSizingShell: ContainerSizingSchema.default("FULL_WIDTH").nullish(),
|
|
33
|
+
crossSellsHideCartItems: z.boolean().default(false).nullish(),
|
|
34
|
+
crossSellsRedirectItems: z.boolean().default(false).nullish(),
|
|
35
|
+
customerAddressNoteEnable: z.boolean().nullish(),
|
|
36
|
+
customerCompanyFieldsEnable: z.boolean().nullish(),
|
|
37
|
+
customerDeleteEnabled: z.boolean().nullish(),
|
|
38
|
+
customerXMagentoCacheIdDisable: z.boolean().nullish(),
|
|
39
|
+
dataLayer: DatalayerConfigSchema().nullish(),
|
|
40
|
+
debug: GraphCommerceDebugConfigSchema().nullish(),
|
|
41
|
+
demoMode: z.boolean().default(true).nullish(),
|
|
42
|
+
enableGuestCheckoutLogin: z.boolean().nullish(),
|
|
43
|
+
googleAnalyticsId: z.string().nullish(),
|
|
44
|
+
googlePlaystore: GraphCommerceGooglePlaystoreConfigSchema().nullish(),
|
|
45
|
+
googleRecaptchaKey: z.string().nullish(),
|
|
46
|
+
googleTagmanagerId: z.string().nullish(),
|
|
47
|
+
graphqlMeshEditMode: z.boolean().default(false).nullish(),
|
|
48
|
+
hygraphEndpoint: z.string().min(1),
|
|
49
|
+
hygraphManagementApi: z.string().nullish(),
|
|
50
|
+
hygraphProjectId: z.string().nullish(),
|
|
51
|
+
hygraphWriteAccessToken: z.string().nullish(),
|
|
52
|
+
limitSsg: z.boolean().nullish(),
|
|
53
|
+
magentoEndpoint: z.string().min(1),
|
|
54
|
+
magentoVersion: z.number(),
|
|
55
|
+
permissions: GraphCommercePermissionsSchema().nullish(),
|
|
56
|
+
previewSecret: z.string().nullish(),
|
|
57
|
+
productFiltersLayout: ProductFiltersLayoutSchema.default("DEFAULT").nullish(),
|
|
58
|
+
productFiltersPro: z.boolean().nullish(),
|
|
59
|
+
productListPaginationVariant: PaginationVariantSchema.default("COMPACT").nullish(),
|
|
60
|
+
productRoute: z.string().nullish(),
|
|
61
|
+
recentlyViewedProducts: RecentlyViewedProductsConfigSchema().nullish(),
|
|
62
|
+
robotsAllow: z.boolean().nullish(),
|
|
63
|
+
sidebarGallery: SidebarGalleryConfigSchema().nullish(),
|
|
64
|
+
storefront: z.array(GraphCommerceStorefrontConfigSchema()),
|
|
65
|
+
wishlistHideForGuests: z.boolean().nullish(),
|
|
66
|
+
wishlistShowFeedbackMessage: z.boolean().nullish()
|
|
67
|
+
});
|
|
81
68
|
}
|
|
82
69
|
function GraphCommerceDebugConfigSchema() {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
70
|
+
return z.object({
|
|
71
|
+
cart: z.boolean().nullish(),
|
|
72
|
+
pluginStatus: z.boolean().nullish(),
|
|
73
|
+
sessions: z.boolean().nullish(),
|
|
74
|
+
webpackCircularDependencyPlugin: z.boolean().nullish(),
|
|
75
|
+
webpackDuplicatesPlugin: z.boolean().nullish()
|
|
76
|
+
});
|
|
90
77
|
}
|
|
91
78
|
function GraphCommerceGooglePlaystoreConfigSchema() {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
79
|
+
return z.object({
|
|
80
|
+
packageName: z.string().min(1),
|
|
81
|
+
sha256CertificateFingerprint: z.string().min(1)
|
|
82
|
+
});
|
|
96
83
|
}
|
|
97
84
|
function GraphCommercePermissionsSchema() {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
85
|
+
return z.object({
|
|
86
|
+
cart: CartPermissionsSchema.nullish(),
|
|
87
|
+
checkout: CartPermissionsSchema.nullish(),
|
|
88
|
+
customerAccount: CustomerAccountPermissionsSchema.nullish(),
|
|
89
|
+
website: WebsitePermissionsSchema.nullish()
|
|
90
|
+
});
|
|
104
91
|
}
|
|
105
92
|
function GraphCommerceStorefrontConfigSchema() {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
93
|
+
return z.object({
|
|
94
|
+
canonicalBaseUrl: z.string().nullish(),
|
|
95
|
+
cartDisplayPricesInclTax: z.boolean().nullish(),
|
|
96
|
+
customerCompanyFieldsEnable: z.boolean().nullish(),
|
|
97
|
+
defaultLocale: z.boolean().nullish(),
|
|
98
|
+
domain: z.string().nullish(),
|
|
99
|
+
googleAnalyticsId: z.string().nullish(),
|
|
100
|
+
googleRecaptchaKey: z.string().nullish(),
|
|
101
|
+
googleTagmanagerId: z.string().nullish(),
|
|
102
|
+
hygraphLocales: z.array(z.string().min(1)).nullish(),
|
|
103
|
+
linguiLocale: z.string().nullish(),
|
|
104
|
+
locale: z.string().min(1),
|
|
105
|
+
magentoStoreCode: z.string().min(1),
|
|
106
|
+
permissions: GraphCommercePermissionsSchema().nullish(),
|
|
107
|
+
robotsAllow: z.boolean().nullish()
|
|
108
|
+
});
|
|
122
109
|
}
|
|
123
110
|
function MagentoConfigurableVariantValuesSchema() {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
111
|
+
return z.object({
|
|
112
|
+
content: z.boolean().nullish(),
|
|
113
|
+
gallery: z.boolean().nullish(),
|
|
114
|
+
url: z.boolean().nullish()
|
|
115
|
+
});
|
|
129
116
|
}
|
|
130
117
|
function RecentlyViewedProductsConfigSchema() {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
118
|
+
return z.object({
|
|
119
|
+
enabled: z.boolean().nullish(),
|
|
120
|
+
maxCount: z.number().nullish()
|
|
121
|
+
});
|
|
135
122
|
}
|
|
136
123
|
function SidebarGalleryConfigSchema() {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
124
|
+
return z.object({
|
|
125
|
+
paginationVariant: SidebarGalleryPaginationVariantSchema.nullish()
|
|
126
|
+
});
|
|
140
127
|
}
|
|
128
|
+
|
|
129
|
+
export { CartPermissionsSchema, CompareVariantSchema, ContainerSizingSchema, CustomerAccountPermissionsSchema, DatalayerConfigSchema, GraphCommerceConfigSchema, GraphCommerceDebugConfigSchema, GraphCommerceGooglePlaystoreConfigSchema, GraphCommercePermissionsSchema, GraphCommerceStorefrontConfigSchema, MagentoConfigurableVariantValuesSchema, PaginationVariantSchema, ProductFiltersLayoutSchema, RecentlyViewedProductsConfigSchema, SidebarGalleryConfigSchema, SidebarGalleryPaginationVariantSchema, WebsitePermissionsSchema, definedNonNullAnySchema, isDefinedNonNullAny };
|