Skip to content

Commit 86c46b9

Browse files
@W-20592392: Add Google Cloud API config to templates (#3523)
* @W-20592392: fix config Signed-off-by: d.phan <d.phan@salesforce.com> * @W-20592392: add changelog Signed-off-by: d.phan <d.phan@salesforce.com> * @W-20592392: add comments Signed-off-by: d.phan <d.phan@salesforce.com> --------- Signed-off-by: d.phan <d.phan@salesforce.com>
1 parent 015b5de commit 86c46b9

File tree

7 files changed

+35
-2
lines changed

7 files changed

+35
-2
lines changed

packages/pwa-kit-create-app/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
## v3.15.0-preview.0 (Dec 12, 2025)
3+
- Add new Google Cloud API configuration and Bonus Product configuration [#3523](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3523)
34

45
## v3.14.0 (Nov 04, 2025)
56
- Prompt text for Site ID should match actual validation: Site ID may contain uppercase or lowercase letters, numbers, hyphens, or underscores. - Updated Site ID validator regex to allow both uppercase and lowercase letters for improved compatibility, clarity. [#3410] (https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3410)

packages/pwa-kit-create-app/assets/bootstrap/js/config/default.js.hbs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,16 @@ module.exports = {
135135
dataCloudAPI: {
136136
appSourceId: '{{answers.project.dataCloud.appSourceId}}',
137137
tenantId: '{{answers.project.dataCloud.tenantId}}'
138+
},
139+
// Bonus product config
140+
pages: {
141+
cart: {
142+
groupBonusProductsWithQualifyingProduct: true
143+
}
144+
},
145+
// Google Cloud api config
146+
googleCloudAPI: {
147+
apiKey: process.env.GOOGLE_CLOUD_API_KEY
138148
}
139149
},
140150
// Experimental: The base path for the app. This is the path that will be prepended to all /mobify routes,

packages/pwa-kit-create-app/assets/bootstrap/js/overrides/app/ssr.js.hbs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,19 @@ const {handler} = runtime.createHandler(options, (app) => {
349349
],
350350
'script-src': [
351351
// Used by the service worker in /worker/main.js
352-
'storage.googleapis.com'
352+
'storage.googleapis.com',
353+
// Connect to Google Cloud APIs
354+
'maps.googleapis.com',
355+
'places.googleapis.com'
353356
],
354357
'connect-src': [
355358
// Connect to Einstein APIs
356359
'api.cquotient.com',
357360
// Connect to DataCloud APIs
358361
'*.c360a.salesforce.com',
362+
// Connect to Google Cloud APIs
363+
'maps.googleapis.com',
364+
'places.googleapis.com',
359365
// Connect to SCRT2 URLs
360366
'*.salesforce-scrt.com'
361367
],
5.02 KB
Loading

packages/pwa-kit-create-app/assets/templates/@salesforce/retail-react-app/app/ssr.js.hbs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,19 @@ const {handler} = runtime.createHandler(options, (app) => {
349349
],
350350
'script-src': [
351351
// Used by the service worker in /worker/main.js
352-
'storage.googleapis.com'
352+
'storage.googleapis.com',
353+
// Connect to Google Cloud APIs
354+
'maps.googleapis.com',
355+
'places.googleapis.com'
353356
],
354357
'connect-src': [
355358
// Connect to Einstein APIs
356359
'api.cquotient.com',
357360
// Connect to DataCloud APIs
358361
'*.c360a.salesforce.com',
362+
// Connect to Google Cloud APIs
363+
'maps.googleapis.com',
364+
'places.googleapis.com',
359365
// Connect to SCRT2 URLs
360366
'*.salesforce-scrt.com'
361367
],
5.02 KB
Loading

packages/pwa-kit-create-app/assets/templates/@salesforce/retail-react-app/config/default.js.hbs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,16 @@ module.exports = {
135135
dataCloudAPI: {
136136
appSourceId: '{{answers.project.dataCloud.appSourceId}}',
137137
tenantId: '{{answers.project.dataCloud.tenantId}}'
138+
},
139+
// Bonus product config
140+
pages: {
141+
cart: {
142+
groupBonusProductsWithQualifyingProduct: true
143+
}
144+
},
145+
// Google Cloud api config
146+
googleCloudAPI: {
147+
apiKey: process.env.GOOGLE_CLOUD_API_KEY
138148
}
139149
},
140150
// This list contains server-side only libraries that you don't want to be compiled by webpack

0 commit comments

Comments
 (0)