@salesforce/lds-adapters-industries-featurevalidation 1.134.6 → 1.134.8
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/industries-featurevalidation.js +4 -22
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +1 -7
- package/dist/es/es2018/types/src/generated/types/FeatureValidationFieldValuesRepresentation.d.ts +0 -1
- package/dist/es/es2018/types/src/generated/types/FeatureValidationInputDetailsRepresentation.d.ts +0 -1
- package/dist/es/es2018/types/src/generated/types/FeatureValidationInputRepresentation.d.ts +0 -1
- package/dist/es/es2018/types/src/generated/types/FeatureValidationOutputDetailsRepresentation.d.ts +0 -1
- package/dist/es/es2018/types/src/generated/types/FeatureValidationOutputRepresentation.d.ts +0 -1
- package/dist/es/es2018/types/src/generated/types/FeatureValidationWrapperInputRepresentation.d.ts +0 -1
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +1 -8
- package/package.json +1 -1
- package/sfdc/index.js +5 -23
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, StoreKeyMap } from '@luvio/engine';
|
|
7
|
+
import { serializeStructuredKey, StoreKeyMap, deepFreeze } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
|
-
const { keys: ObjectKeys
|
|
10
|
+
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
11
11
|
const { isArray: ArrayIsArray$1 } = Array;
|
|
12
12
|
/**
|
|
13
13
|
* Validates an adapter config is well-formed.
|
|
@@ -31,7 +31,7 @@ function validateConfig(config, adapter, oneOf) {
|
|
|
31
31
|
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
32
32
|
}
|
|
33
33
|
const supported = required.concat(optional);
|
|
34
|
-
if (ObjectKeys
|
|
34
|
+
if (ObjectKeys(config).some(key => !supported.includes(key))) {
|
|
35
35
|
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -43,7 +43,6 @@ function areRequiredParametersPresent(config, configPropertyNames) {
|
|
|
43
43
|
}
|
|
44
44
|
const keyPrefix = 'featurevalidation';
|
|
45
45
|
|
|
46
|
-
const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
47
46
|
const { isArray: ArrayIsArray } = Array;
|
|
48
47
|
function equalsArray(a, b, equalsItem) {
|
|
49
48
|
const aLength = a.length;
|
|
@@ -58,24 +57,6 @@ function equalsArray(a, b, equalsItem) {
|
|
|
58
57
|
}
|
|
59
58
|
return true;
|
|
60
59
|
}
|
|
61
|
-
function deepFreeze(value) {
|
|
62
|
-
// No need to freeze primitives
|
|
63
|
-
if (typeof value !== 'object' || value === null) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
if (ArrayIsArray(value)) {
|
|
67
|
-
for (let i = 0, len = value.length; i < len; i += 1) {
|
|
68
|
-
deepFreeze(value[i]);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
const keys = ObjectKeys(value);
|
|
73
|
-
for (let i = 0, len = keys.length; i < len; i += 1) {
|
|
74
|
-
deepFreeze(value[keys[i]]);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
ObjectFreeze(value);
|
|
78
|
-
}
|
|
79
60
|
function createLink(ref) {
|
|
80
61
|
return {
|
|
81
62
|
__ref: serializeStructuredKey(ref),
|
|
@@ -450,6 +431,7 @@ function ingestSuccess(luvio, resourceParams, response) {
|
|
|
450
431
|
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
451
432
|
}
|
|
452
433
|
}
|
|
434
|
+
deepFreeze(snapshot.data);
|
|
453
435
|
return snapshot;
|
|
454
436
|
}
|
|
455
437
|
function createResourceRequest(config) {
|
|
@@ -3,17 +3,11 @@ export declare const ObjectPrototypeHasOwnProperty: (v: PropertyKey) => boolean;
|
|
|
3
3
|
declare const ObjectKeys: {
|
|
4
4
|
(o: object): string[];
|
|
5
5
|
(o: {}): string[];
|
|
6
|
-
}, ObjectFreeze: {
|
|
7
|
-
<T extends Function>(f: T): T;
|
|
8
|
-
<T_1 extends {
|
|
9
|
-
[idx: string]: object | U | null | undefined;
|
|
10
|
-
}, U extends string | number | bigint | boolean | symbol>(o: T_1): Readonly<T_1>;
|
|
11
|
-
<T_2>(o: T_2): Readonly<T_2>;
|
|
12
6
|
}, ObjectCreate: {
|
|
13
7
|
(o: object | null): any;
|
|
14
8
|
(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
|
|
15
9
|
};
|
|
16
|
-
export {
|
|
10
|
+
export { ObjectCreate, ObjectKeys };
|
|
17
11
|
export declare const ArrayIsArray: (arg: any) => arg is any[];
|
|
18
12
|
export declare const ArrayPrototypePush: (...items: any[]) => number;
|
|
19
13
|
export interface AdapterValidationConfig {
|
package/dist/es/es2018/types/src/generated/types/FeatureValidationFieldValuesRepresentation.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
|
|
|
5
5
|
export declare function normalize(input: FeatureValidationFieldValuesRepresentation, existing: FeatureValidationFieldValuesRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FeatureValidationFieldValuesRepresentationNormalized;
|
|
6
6
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
7
|
export declare function equals(existing: FeatureValidationFieldValuesRepresentationNormalized, incoming: FeatureValidationFieldValuesRepresentationNormalized): boolean;
|
|
8
|
-
export declare function deepFreeze(input: FeatureValidationFieldValuesRepresentation): void;
|
|
9
8
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
10
9
|
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FeatureValidationFieldValuesRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
|
|
11
10
|
/**
|
package/dist/es/es2018/types/src/generated/types/FeatureValidationInputDetailsRepresentation.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
|
|
|
5
5
|
export declare function normalize(input: FeatureValidationInputDetailsRepresentation, existing: FeatureValidationInputDetailsRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FeatureValidationInputDetailsRepresentationNormalized;
|
|
6
6
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
7
|
export declare function equals(existing: FeatureValidationInputDetailsRepresentationNormalized, incoming: FeatureValidationInputDetailsRepresentationNormalized): boolean;
|
|
8
|
-
export declare function deepFreeze(input: FeatureValidationInputDetailsRepresentation): void;
|
|
9
8
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
10
9
|
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FeatureValidationInputDetailsRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
|
|
11
10
|
/**
|
|
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
|
|
|
5
5
|
export declare function normalize(input: FeatureValidationInputRepresentation, existing: FeatureValidationInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FeatureValidationInputRepresentationNormalized;
|
|
6
6
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
7
|
export declare function equals(existing: FeatureValidationInputRepresentationNormalized, incoming: FeatureValidationInputRepresentationNormalized): boolean;
|
|
8
|
-
export declare function deepFreeze(input: FeatureValidationInputRepresentation): void;
|
|
9
8
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
10
9
|
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FeatureValidationInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
|
|
11
10
|
/**
|
package/dist/es/es2018/types/src/generated/types/FeatureValidationOutputDetailsRepresentation.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ export declare const RepresentationType: string;
|
|
|
6
6
|
export declare function normalize(input: FeatureValidationOutputDetailsRepresentation, existing: FeatureValidationOutputDetailsRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FeatureValidationOutputDetailsRepresentationNormalized;
|
|
7
7
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
8
8
|
export declare function equals(existing: FeatureValidationOutputDetailsRepresentationNormalized, incoming: FeatureValidationOutputDetailsRepresentationNormalized): boolean;
|
|
9
|
-
export declare function deepFreeze(input: FeatureValidationOutputDetailsRepresentation): void;
|
|
10
9
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
11
10
|
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FeatureValidationOutputDetailsRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
|
|
12
11
|
/**
|
|
@@ -16,7 +16,6 @@ export declare function keyBuilderFromType_StructuredKey(luvio: $64$luvio_engine
|
|
|
16
16
|
export declare function normalize(input: FeatureValidationOutputRepresentation, existing: FeatureValidationOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FeatureValidationOutputRepresentationNormalized;
|
|
17
17
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
18
18
|
export declare function equals(existing: FeatureValidationOutputRepresentationNormalized, incoming: FeatureValidationOutputRepresentationNormalized): boolean;
|
|
19
|
-
export declare function deepFreeze(input: FeatureValidationOutputRepresentation): void;
|
|
20
19
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
21
20
|
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FeatureValidationOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
|
|
22
21
|
/**
|
package/dist/es/es2018/types/src/generated/types/FeatureValidationWrapperInputRepresentation.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ export declare const RepresentationType: string;
|
|
|
6
6
|
export declare function normalize(input: FeatureValidationWrapperInputRepresentation, existing: FeatureValidationWrapperInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FeatureValidationWrapperInputRepresentationNormalized;
|
|
7
7
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
8
8
|
export declare function equals(existing: FeatureValidationWrapperInputRepresentationNormalized, incoming: FeatureValidationWrapperInputRepresentationNormalized): boolean;
|
|
9
|
-
export declare function deepFreeze(input: FeatureValidationWrapperInputRepresentation): void;
|
|
10
9
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
11
10
|
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FeatureValidationWrapperInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
|
|
12
11
|
/**
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
2
|
-
export declare const
|
|
3
|
-
<T extends Function>(f: T): T;
|
|
4
|
-
<T_1 extends {
|
|
5
|
-
[idx: string]: object | U | null | undefined;
|
|
6
|
-
}, U extends string | number | bigint | boolean | symbol>(o: T_1): Readonly<T_1>;
|
|
7
|
-
<T_2>(o: T_2): Readonly<T_2>;
|
|
8
|
-
}, ObjectKeys: {
|
|
2
|
+
export declare const ObjectKeys: {
|
|
9
3
|
(o: object): string[];
|
|
10
4
|
(o: {}): string[];
|
|
11
5
|
}, ObjectCreate: {
|
|
@@ -31,7 +25,6 @@ export declare function equalsArray<U, V extends U[]>(a: V, b: V, equalsItem: (i
|
|
|
31
25
|
export declare function equalsObject<U, V extends {
|
|
32
26
|
[key: string]: U;
|
|
33
27
|
}>(a: V, b: V, equalsProp: (propA: U, propB: U) => boolean | void): boolean;
|
|
34
|
-
export declare function deepFreeze(value: any): void;
|
|
35
28
|
export declare function createLink(ref: string | $64$luvio_engine_NormalizedKeyMetadata): {
|
|
36
29
|
__ref: string;
|
|
37
30
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-industries-featurevalidation",
|
|
3
|
-
"version": "1.134.
|
|
3
|
+
"version": "1.134.8",
|
|
4
4
|
"description": "Feature validation tool to debug setup issues.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "dist/umd/es2018/industries-featurevalidation.js",
|
package/sfdc/index.js
CHANGED
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
*/
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
16
|
-
import { serializeStructuredKey, StoreKeyMap } from 'force/luvioEngine';
|
|
16
|
+
import { serializeStructuredKey, StoreKeyMap, deepFreeze } from 'force/luvioEngine';
|
|
17
17
|
|
|
18
18
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
19
|
-
const { keys: ObjectKeys
|
|
19
|
+
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
20
20
|
const { isArray: ArrayIsArray$1 } = Array;
|
|
21
21
|
/**
|
|
22
22
|
* Validates an adapter config is well-formed.
|
|
@@ -40,7 +40,7 @@ function validateConfig(config, adapter, oneOf) {
|
|
|
40
40
|
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
41
41
|
}
|
|
42
42
|
const supported = required.concat(optional);
|
|
43
|
-
if (ObjectKeys
|
|
43
|
+
if (ObjectKeys(config).some(key => !supported.includes(key))) {
|
|
44
44
|
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -52,7 +52,6 @@ function areRequiredParametersPresent(config, configPropertyNames) {
|
|
|
52
52
|
}
|
|
53
53
|
const keyPrefix = 'featurevalidation';
|
|
54
54
|
|
|
55
|
-
const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
56
55
|
const { isArray: ArrayIsArray } = Array;
|
|
57
56
|
function equalsArray(a, b, equalsItem) {
|
|
58
57
|
const aLength = a.length;
|
|
@@ -67,24 +66,6 @@ function equalsArray(a, b, equalsItem) {
|
|
|
67
66
|
}
|
|
68
67
|
return true;
|
|
69
68
|
}
|
|
70
|
-
function deepFreeze(value) {
|
|
71
|
-
// No need to freeze primitives
|
|
72
|
-
if (typeof value !== 'object' || value === null) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
if (ArrayIsArray(value)) {
|
|
76
|
-
for (let i = 0, len = value.length; i < len; i += 1) {
|
|
77
|
-
deepFreeze(value[i]);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
const keys = ObjectKeys(value);
|
|
82
|
-
for (let i = 0, len = keys.length; i < len; i += 1) {
|
|
83
|
-
deepFreeze(value[keys[i]]);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
ObjectFreeze(value);
|
|
87
|
-
}
|
|
88
69
|
function createLink(ref) {
|
|
89
70
|
return {
|
|
90
71
|
__ref: serializeStructuredKey(ref),
|
|
@@ -459,6 +440,7 @@ function ingestSuccess(luvio, resourceParams, response) {
|
|
|
459
440
|
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
460
441
|
}
|
|
461
442
|
}
|
|
443
|
+
deepFreeze(snapshot.data);
|
|
462
444
|
return snapshot;
|
|
463
445
|
}
|
|
464
446
|
function createResourceRequest(config) {
|
|
@@ -555,4 +537,4 @@ withDefaultLuvio((luvio) => {
|
|
|
555
537
|
});
|
|
556
538
|
|
|
557
539
|
export { featureValidation };
|
|
558
|
-
// version: 1.134.
|
|
540
|
+
// version: 1.134.8-c3d6d2cfc
|