@salesforce/lds-adapters-cms-type 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.
- package/dist/es/es2018/cms-type.js +9 -24
- package/package.json +1 -1
- package/sfdc/index.js +10 -25
|
@@ -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, typeCheckArrayOfScalars, StoreKeyMap } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -297,29 +297,14 @@ function keyBuilder(luvio, config) {
|
|
|
297
297
|
}
|
|
298
298
|
function typeCheckConfig(untrustedConfig) {
|
|
299
299
|
const config = {};
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
}
|
|
308
|
-
const untrustedConfig_language = untrustedConfig.language;
|
|
309
|
-
if (typeof untrustedConfig_language === 'string') {
|
|
310
|
-
config.language = untrustedConfig_language;
|
|
311
|
-
}
|
|
312
|
-
const untrustedConfig_viewMode = untrustedConfig.viewMode;
|
|
313
|
-
if (ArrayIsArray$1(untrustedConfig_viewMode)) {
|
|
314
|
-
const untrustedConfig_viewMode_array = [];
|
|
315
|
-
for (let i = 0, arrayLength = untrustedConfig_viewMode.length; i < arrayLength; i++) {
|
|
316
|
-
const untrustedConfig_viewMode_item = untrustedConfig_viewMode[i];
|
|
317
|
-
if (typeof untrustedConfig_viewMode_item === 'string') {
|
|
318
|
-
untrustedConfig_viewMode_array.push(untrustedConfig_viewMode_item);
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
config.viewMode = untrustedConfig_viewMode_array;
|
|
322
|
-
}
|
|
300
|
+
typeCheckScalars(untrustedConfig, config, {
|
|
301
|
+
contentTypeFQN: 0 /* String */,
|
|
302
|
+
includeSchemaDefinitions: 1 /* Boolean */,
|
|
303
|
+
language: 0 /* String */,
|
|
304
|
+
});
|
|
305
|
+
typeCheckArrayOfScalars(untrustedConfig, config, {
|
|
306
|
+
viewMode: 0 /* String */,
|
|
307
|
+
});
|
|
323
308
|
return config;
|
|
324
309
|
}
|
|
325
310
|
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, typeCheckArrayOfScalars, StoreKeyMap } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -307,29 +307,14 @@ function keyBuilder(luvio, config) {
|
|
|
307
307
|
}
|
|
308
308
|
function typeCheckConfig(untrustedConfig) {
|
|
309
309
|
const config = {};
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
}
|
|
318
|
-
const untrustedConfig_language = untrustedConfig.language;
|
|
319
|
-
if (typeof untrustedConfig_language === 'string') {
|
|
320
|
-
config.language = untrustedConfig_language;
|
|
321
|
-
}
|
|
322
|
-
const untrustedConfig_viewMode = untrustedConfig.viewMode;
|
|
323
|
-
if (ArrayIsArray$1(untrustedConfig_viewMode)) {
|
|
324
|
-
const untrustedConfig_viewMode_array = [];
|
|
325
|
-
for (let i = 0, arrayLength = untrustedConfig_viewMode.length; i < arrayLength; i++) {
|
|
326
|
-
const untrustedConfig_viewMode_item = untrustedConfig_viewMode[i];
|
|
327
|
-
if (typeof untrustedConfig_viewMode_item === 'string') {
|
|
328
|
-
untrustedConfig_viewMode_array.push(untrustedConfig_viewMode_item);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
config.viewMode = untrustedConfig_viewMode_array;
|
|
332
|
-
}
|
|
310
|
+
typeCheckScalars(untrustedConfig, config, {
|
|
311
|
+
contentTypeFQN: 0 /* String */,
|
|
312
|
+
includeSchemaDefinitions: 1 /* Boolean */,
|
|
313
|
+
language: 0 /* String */,
|
|
314
|
+
});
|
|
315
|
+
typeCheckArrayOfScalars(untrustedConfig, config, {
|
|
316
|
+
viewMode: 0 /* String */,
|
|
317
|
+
});
|
|
333
318
|
return config;
|
|
334
319
|
}
|
|
335
320
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -439,4 +424,4 @@ withDefaultLuvio((luvio) => {
|
|
|
439
424
|
});
|
|
440
425
|
|
|
441
426
|
export { getContentType, getContentType_imperative };
|
|
442
|
-
// version: 1.
|
|
427
|
+
// version: 1.208.0-027673bd6
|