@salesforce/lds-adapters-commerce-store-pricing 1.207.0 → 1.208.0
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.
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, deepFreeze, StoreKeyMap } from '@luvio/engine';
|
|
7
|
+
import { serializeStructuredKey, deepFreeze, typeCheckScalars, StoreKeyMap } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -312,18 +312,11 @@ function keyBuilder(luvio, config) {
|
|
|
312
312
|
}
|
|
313
313
|
function typeCheckConfig(untrustedConfig) {
|
|
314
314
|
const config = {};
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
if (typeof untrustedConfig_webstoreId === 'string') {
|
|
321
|
-
config.webstoreId = untrustedConfig_webstoreId;
|
|
322
|
-
}
|
|
323
|
-
const untrustedConfig_effectiveAccountId = untrustedConfig.effectiveAccountId;
|
|
324
|
-
if (typeof untrustedConfig_effectiveAccountId === 'string') {
|
|
325
|
-
config.effectiveAccountId = untrustedConfig_effectiveAccountId;
|
|
326
|
-
}
|
|
315
|
+
typeCheckScalars(untrustedConfig, config, {
|
|
316
|
+
productId: 0 /* String */,
|
|
317
|
+
webstoreId: 0 /* String */,
|
|
318
|
+
effectiveAccountId: 0 /* String */,
|
|
319
|
+
});
|
|
327
320
|
return config;
|
|
328
321
|
}
|
|
329
322
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
package/package.json
CHANGED
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, deepFreeze, StoreKeyMap } from 'force/luvioEngine';
|
|
17
|
+
import { serializeStructuredKey, deepFreeze, typeCheckScalars, StoreKeyMap } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -322,18 +322,11 @@ function keyBuilder(luvio, config) {
|
|
|
322
322
|
}
|
|
323
323
|
function typeCheckConfig(untrustedConfig) {
|
|
324
324
|
const config = {};
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
if (typeof untrustedConfig_webstoreId === 'string') {
|
|
331
|
-
config.webstoreId = untrustedConfig_webstoreId;
|
|
332
|
-
}
|
|
333
|
-
const untrustedConfig_effectiveAccountId = untrustedConfig.effectiveAccountId;
|
|
334
|
-
if (typeof untrustedConfig_effectiveAccountId === 'string') {
|
|
335
|
-
config.effectiveAccountId = untrustedConfig_effectiveAccountId;
|
|
336
|
-
}
|
|
325
|
+
typeCheckScalars(untrustedConfig, config, {
|
|
326
|
+
productId: 0 /* String */,
|
|
327
|
+
webstoreId: 0 /* String */,
|
|
328
|
+
effectiveAccountId: 0 /* String */,
|
|
329
|
+
});
|
|
337
330
|
return config;
|
|
338
331
|
}
|
|
339
332
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -443,4 +436,4 @@ withDefaultLuvio((luvio) => {
|
|
|
443
436
|
});
|
|
444
437
|
|
|
445
438
|
export { getProductPrice, getProductPrice_imperative };
|
|
446
|
-
// version: 1.
|
|
439
|
+
// version: 1.208.0-027673bd6
|