-
Notifications
You must be signed in to change notification settings - Fork 212
Expand file tree
/
Copy pathdefault.js
More file actions
134 lines (133 loc) · 5.2 KB
/
default.js
File metadata and controls
134 lines (133 loc) · 5.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/*
* Copyright (c) 2021, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
/* eslint-disable @typescript-eslint/no-var-requires */
const sites = require('./sites.js')
const {parseSettings, validateOtpTokenLength} = require('./utils.js')
module.exports = {
app: {
commerceAgent: parseSettings(process.env.COMMERCE_AGENT_SETTINGS) || {
enabled: 'false',
askAgentOnSearch: 'false',
embeddedServiceName: '',
embeddedServiceEndpoint: '',
scriptSourceUrl: '',
scrt2Url: '',
salesforceOrgId: '',
commerceOrgId: '',
siteId: '',
enableConversationContext: 'false',
conversationContext: []
},
url: {
site: 'path',
locale: 'path',
showDefaults: true,
interpretPlusSignAsSpace: false
},
login: {
// The length of the token for OTP authentication. Used by passwordless login and reset password.
// If the env var `OTP_TOKEN_LENGTH` is set, it will override the config value. Valid values are 6 or 8. Defaults to: 8
tokenLength: validateOtpTokenLength(process.env.OTP_TOKEN_LENGTH),
passwordless: {
enabled: false,
mode: 'email',
landingPath: '/passwordless-login-landing'
},
social: {
enabled: false,
idps: ['google', 'apple'],
redirectURI: process.env.SOCIAL_LOGIN_REDIRECT_URI || '/social-callback'
},
resetPassword: {
mode: 'email',
landingPath: '/reset-password-landing'
}
},
defaultSite: 'RefArchGlobal',
siteAliases: {
RefArch: 'us',
RefArchGlobal: 'global'
},
sites,
commerceAPI: {
proxyPath: `/mobify/proxy/api`,
parameters: {
clientId: 'c9c45bfd-0ed3-4aa2-9971-40f88962b836',
organizationId: 'f_ecom_zzrf_001',
shortCode: '8o7m175y',
siteId: 'RefArchGlobal'
}
},
einsteinAPI: {
host: 'https://api.cquotient.com',
einsteinId: '1ea06c6e-c936-4324-bcf0-fada93f83bb1',
// This differs from the siteId in commerceAPIConfig for testing purposes
siteId: 'aaij-MobileFirst',
isProduction: false
},
dataCloudAPI: {
appSourceId: '7ae070a6-f4ec-4def-a383-d9cacc3f20a1',
tenantId: 'g82wgnrvm-ywk9dggrrw8mtggy.pc-rnd'
},
// One Click Checkout: When enabled, shoppers using passwordless OTP login can save shipping
// and payment information for faster checkout in the future. To use, enable the flag and
// configure private SLAS client. Security safeguards required:
// 1. Captcha - Protects the passwordless login from bots (e.g., Cloudflare Turnstile).
// 2. OTP for Email Changes - Verifies identity before an email update, prevents accidental
// account lockouts from typos, and prevents unauthorized access to saved payment methods.
oneClickCheckout: {
enabled: false
},
partialHydrationEnabled: false,
pages: {
cart: {
groupBonusProductsWithQualifyingProduct: true
}
},
storeLocatorEnabled: true,
multishipEnabled: true,
// Salesforce Payments configuration
// Set enabled to true to enable Salesforce Payments (requires the Salesforce Payments feature toggle to be enabled on the Commerce Cloud instance).
// Set enabled to false to disable Salesforce Payments on the storefront (the Commerce Cloud feature toggle is unaffected).
// Set the sdkUrl and metadataUrl values to point to your Commerce Cloud instance host by replacing the [bm_or_vanity_host] placeholder with your Business Manager or vanity URL host name.
// sdkUrl: 'https://[bm_or_vanity_host]/on/demandware.static/Sites-Site/-/-/internal/jscript/sfp/v1/sfp.js'
// metadataUrl: 'https://[bm_or_vanity_host]/on/demandware.static/Sites-Site/-/-/internal/metadata/v1.json'
sfPayments: {
enabled: false,
sdkUrl: '',
metadataUrl: ''
},
googleCloudAPI: {
apiKey: process.env.GOOGLE_CLOUD_API_KEY
}
},
envBasePath: '/',
externals: [],
pageNotFoundURL: '/page-not-found',
ssrEnabled: true,
ssrOnly: ['ssr.js', 'ssr.js.map', 'node_modules/**/*.*'],
ssrShared: [
'static/ico/favicon.ico',
'static/robots.txt',
'**/*.js',
'**/*.js.map',
'**/*.json'
],
ssrParameters: {
ssrFunctionNodeVersion: '24.x',
proxyConfigs: [
{
host: 'kv7kzm78.api.commercecloud.salesforce.com',
path: 'api'
},
{
host: 'zzrf-001.dx.commercecloud.salesforce.com',
path: 'ocapi'
}
]
}
}