-
Notifications
You must be signed in to change notification settings - Fork 212
Expand file tree
/
Copy pathdefault.js.hbs
More file actions
115 lines (115 loc) · 5.74 KB
/
default.js.hbs
File metadata and controls
115 lines (115 loc) · 5.74 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
/*
* Copyright (c) 2023, Salesforce, 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')
module.exports = {
app: {
// Customize settings for your url
url: {
// Determine where the siteRef is located. Valid values include 'path|query_param|none'. Defaults to: 'none'
// site: 'none',
// Determine where the localeRef is located. Valid values include 'path|query_param|none'. Defaults to: 'none'
locale: 'none',
// This boolean value dictates whether default site or locale values are shown in the url. Defaults to: false
// showDefaults: true,
// This boolean value dictates whether the plus sign (+) is interpreted as space for query param string. Defaults to: false
interpretPlusSignAsSpace: false
},
login: {
passwordless: {
// Enables or disables passwordless login for the site. Defaults to: false
enabled: false,
// The callback URI, which can be an absolute URL (including third-party URIs) or a relative path set up by the developer.
// Required in 'callback' mode; if missing, passwordless login defaults to 'sms' mode, which requires Marketing Cloud configuration.
// If the env var `PASSWORDLESS_LOGIN_CALLBACK_URI` is set, it will override the config value.
callbackURI:
process.env.PASSWORDLESS_LOGIN_CALLBACK_URI || '/passwordless-login-callback'
},
social: {
// Enables or disables social login for the site. Defaults to: false
enabled: false,
// The third-party identity providers supported by your app. The PWA Kit supports Google and Apple by default.
// Additional IDPs will also need to be added to the IDP_CONFIG in the SocialLogin component.
idps: ['google', 'apple'],
// The redirect URI used after a successful social login authentication.
// This should be a relative path set up by the developer.
// If the env var `SOCIAL_LOGIN_REDIRECT_URI` is set, it will override the config value.
redirectURI: process.env.SOCIAL_LOGIN_REDIRECT_URI || '/social-callback'
},
resetPassword: {
// The callback URI, which can be an absolute URL (including third-party URIs) or a relative path set up by the developer.
// If the env var `RESET_PASSWORD_CALLBACK_URI` is set, it will override the config value.
callbackURI: process.env.RESET_PASSWORD_CALLBACK_URI || '/reset-password-callback'
}
},
// The default site for your app. This value will be used when a siteRef could not be determined from the url
defaultSite: '{{answers.project.commerce.siteId}}',
// Provide aliases for your sites. These will be used in place of your site id when generating paths throughout the application.
// siteAliases: {
// RefArch: 'us'
// },
// The sites for your app, which is imported from sites.js
sites,
// Commerce api config
commerceAPI: {
proxyPath: '/mobify/proxy/api',
parameters: {
clientId: '{{answers.project.commerce.clientId}}',
organizationId: '{{answers.project.commerce.organizationId}}',
shortCode: '{{answers.project.commerce.shortCode}}',
siteId: '{{answers.project.commerce.siteId}}'
}
},
// Einstein api config
einsteinAPI: {
host: 'https://api.cquotient.com',
einsteinId: '{{answers.project.einstein.clientId}}',
siteId: '{{answers.project.einstein.siteId}}',
// Flag Einstein activities as coming from a production environment.
// By setting this to true, the Einstein activities generated by the environment will appear
// in production environment reports
isProduction: false
},
// Datacloud api config
dataCloudAPI: {
appSourceId: '{{answers.project.dataCloud.appSourceId}}',
tenantId: '{{answers.project.dataCloud.tenantId}}'
}
},
// This list contains server-side only libraries that you don't want to be compiled by webpack
externals: [],
// Page not found url for your app
pageNotFoundURL: '/page-not-found',
// Enables or disables building the files necessary for server-side rendering.
ssrEnabled: true,
// This list determines which files are available exclusively to the server-side rendering system
// and are not available through the /mobify/bundle/ path.
ssrOnly: ['ssr.js', 'ssr.js.map', 'node_modules/**/*.*'],
// This list determines which files are available to the server-side rendering system
// and available through the /mobify/bundle/ path.
ssrShared: [
'static/ico/favicon.ico',
'static/robots.txt',
'**/*.js',
'**/*.js.map',
'**/*.json'
],
// Additional parameters that configure Express app behavior.
ssrParameters: {
ssrFunctionNodeVersion: '22.x',
proxyConfigs: [
{
host: '{{answers.project.commerce.shortCode}}.api.commercecloud.salesforce.com',
path: 'api'
}{{~#if answers.project.commerce.instanceUrl}},
{
host: '{{answers.project.commerce.instanceUrl}}',
path: 'ocapi'
}{{/if}}
]
}
}