@salesforce/commerce-sdk-react 1.4.1 → 1.5.0-nightly-20240418080142
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 +7 -0
- package/auth/index.js +3 -3
- package/package.json +4 -4
- package/provider.d.ts +1 -1
- package/provider.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## v1.5.0-nightly-20240418080142 (Apr 18, 2024)
|
|
2
|
+
## v1.5.0-dev (Apr 18, 2024)
|
|
3
|
+
## v3.6.0-nightly-20240418080142 (Apr 18, 2024)
|
|
4
|
+
## v1.5.0-dev (Apr 17, 2024)
|
|
5
|
+
## v1.4.2 (Apr 17, 2024)
|
|
6
|
+
- Update SLAS private proxy path [#1752](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1752)
|
|
7
|
+
|
|
1
8
|
## v1.4.1 (Apr 16, 2024)
|
|
2
9
|
- Add missing params keys `allVariationProperties` and `perPricebook` for Shopper Search [#1750](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1750)
|
|
3
10
|
|
package/auth/index.js
CHANGED
|
@@ -122,7 +122,7 @@ class Auth {
|
|
|
122
122
|
constructor(config) {
|
|
123
123
|
// Special endpoint for injecting SLAS private client secret
|
|
124
124
|
const baseUrl = config.proxy.split(`/mobify/proxy/api`)[0];
|
|
125
|
-
const privateClientEndpoint = `${baseUrl}/mobify/
|
|
125
|
+
const privateClientEndpoint = `${baseUrl}/mobify/slas/private`;
|
|
126
126
|
this.client = new _commerceSdkIsomorphic.ShopperLogin({
|
|
127
127
|
proxy: config.enablePWAKitPrivateClient ? privateClientEndpoint : config.proxy,
|
|
128
128
|
parameters: {
|
|
@@ -161,12 +161,12 @@ class Auth {
|
|
|
161
161
|
|
|
162
162
|
/*
|
|
163
163
|
* There are 2 ways to enable SLAS private client mode.
|
|
164
|
-
* If enablePWAKitPrivateClient=true, we route SLAS calls to /mobify/
|
|
164
|
+
* If enablePWAKitPrivateClient=true, we route SLAS calls to /mobify/slas/private
|
|
165
165
|
* and set an internal placeholder as the client secret. The proxy will override the placeholder
|
|
166
166
|
* with the actual client secret so any truthy value as the placeholder works here.
|
|
167
167
|
*
|
|
168
168
|
* If enablePWAKitPrivateClient=false and clientSecret is provided as a non-empty string,
|
|
169
|
-
* private client mode is enabled but we don't route calls to /mobify/
|
|
169
|
+
* private client mode is enabled but we don't route calls to /mobify/slas/private
|
|
170
170
|
* This is how non-PWA Kit consumers of commerce-sdk-react can enable private client and set a secret
|
|
171
171
|
*
|
|
172
172
|
* If both enablePWAKitPrivateClient and clientSecret are truthy, enablePWAKitPrivateClient takes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/commerce-sdk-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0-nightly-20240418080142",
|
|
4
4
|
"description": "A library that provides react hooks for fetching data from Commerce Cloud",
|
|
5
5
|
"homepage": "https://github.com/SalesforceCommerceCloud/pwa-kit/tree/develop/packages/ecom-react-hooks#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"jwt-decode": "^4.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@salesforce/pwa-kit-dev": "3.
|
|
48
|
+
"@salesforce/pwa-kit-dev": "3.6.0-nightly-20240418080142",
|
|
49
49
|
"@tanstack/react-query": "^4.28.0",
|
|
50
50
|
"@testing-library/jest-dom": "^5.16.5",
|
|
51
51
|
"@testing-library/react": "^14.0.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@types/react-helmet": "~6.1.6",
|
|
60
60
|
"@types/react-router-dom": "~5.3.3",
|
|
61
61
|
"cross-env": "^5.2.1",
|
|
62
|
-
"internal-lib-build": "3.
|
|
62
|
+
"internal-lib-build": "3.6.0-nightly-20240418080142",
|
|
63
63
|
"jsonwebtoken": "^9.0.0",
|
|
64
64
|
"nock": "^13.3.0",
|
|
65
65
|
"nodemon": "^2.0.22",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"publishConfig": {
|
|
90
90
|
"directory": "dist"
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "d2b88a9c0b9f47ea5efc0bd57c4170572a748f44"
|
|
93
93
|
}
|
package/provider.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export declare const AuthContext: React.Context<Auth>;
|
|
|
60
60
|
* ```
|
|
61
61
|
* Note: The provider can enable SLAS Private Client mode in 2 ways.
|
|
62
62
|
* `enablePWAKitPrivateClient` sets commerce-sdk-react to work with the PWA proxy
|
|
63
|
-
* `/mobify/
|
|
63
|
+
* `/mobify/slas/private` to set the private client secret. PWA users should use
|
|
64
64
|
* this option.
|
|
65
65
|
*
|
|
66
66
|
* Non-PWA Kit users can enable private client mode by passing in a client secret
|
package/provider.js
CHANGED
|
@@ -64,7 +64,7 @@ const AuthContext = exports.AuthContext = /*#__PURE__*/_react.default.createCont
|
|
|
64
64
|
* ```
|
|
65
65
|
* Note: The provider can enable SLAS Private Client mode in 2 ways.
|
|
66
66
|
* `enablePWAKitPrivateClient` sets commerce-sdk-react to work with the PWA proxy
|
|
67
|
-
* `/mobify/
|
|
67
|
+
* `/mobify/slas/private` to set the private client secret. PWA users should use
|
|
68
68
|
* this option.
|
|
69
69
|
*
|
|
70
70
|
* Non-PWA Kit users can enable private client mode by passing in a client secret
|