@salesforce/lds-adapters-community-seo 1.134.7 → 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/community-seo.js +4 -14
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +1 -7
- package/dist/es/es2018/types/src/generated/types/RecordSeoPropertiesRepresentation.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 -15
|
@@ -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$1,
|
|
10
|
+
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
11
11
|
const { isArray: ArrayIsArray$1 } = Array;
|
|
12
12
|
/**
|
|
13
13
|
* Validates an adapter config is well-formed.
|
|
@@ -50,7 +50,7 @@ const snapshotRefreshOptions = {
|
|
|
50
50
|
};
|
|
51
51
|
const keyPrefix = 'CommunitiesSeo';
|
|
52
52
|
|
|
53
|
-
const {
|
|
53
|
+
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
54
54
|
const { isArray: ArrayIsArray } = Array;
|
|
55
55
|
const { stringify: JSONStringify } = JSON;
|
|
56
56
|
function createLink(ref) {
|
|
@@ -116,16 +116,6 @@ function equals(existing, incoming) {
|
|
|
116
116
|
}
|
|
117
117
|
return true;
|
|
118
118
|
}
|
|
119
|
-
function deepFreeze(input) {
|
|
120
|
-
const input_fields = input.fields;
|
|
121
|
-
const input_fields_keys = Object.keys(input_fields);
|
|
122
|
-
const input_fields_length = input_fields_keys.length;
|
|
123
|
-
for (let i = 0; i < input_fields_length; i++) {
|
|
124
|
-
input_fields_keys[i];
|
|
125
|
-
}
|
|
126
|
-
ObjectFreeze(input_fields);
|
|
127
|
-
ObjectFreeze(input);
|
|
128
|
-
}
|
|
129
119
|
const ingest = function RecordSeoPropertiesRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
130
120
|
if (process.env.NODE_ENV !== 'production') {
|
|
131
121
|
const validateError = validate(input);
|
|
@@ -142,7 +132,6 @@ const ingest = function RecordSeoPropertiesRepresentationIngest(input, path, luv
|
|
|
142
132
|
propertyName: path.propertyName,
|
|
143
133
|
ttl: ttlToUse
|
|
144
134
|
});
|
|
145
|
-
deepFreeze(input);
|
|
146
135
|
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
147
136
|
luvio.storePublish(key, incomingRecord);
|
|
148
137
|
}
|
|
@@ -192,6 +181,7 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
192
181
|
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
193
182
|
}
|
|
194
183
|
}
|
|
184
|
+
deepFreeze(snapshot.data);
|
|
195
185
|
return snapshot;
|
|
196
186
|
}
|
|
197
187
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
@@ -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 {
|
|
@@ -6,7 +6,6 @@ export declare const RepresentationType: string;
|
|
|
6
6
|
export declare function normalize(input: RecordSeoPropertiesRepresentation, existing: RecordSeoPropertiesRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): RecordSeoPropertiesRepresentationNormalized;
|
|
7
7
|
export declare const select: () => $64$luvio_engine_BaseFragment;
|
|
8
8
|
export declare function equals(existing: RecordSeoPropertiesRepresentationNormalized, incoming: RecordSeoPropertiesRepresentationNormalized): boolean;
|
|
9
|
-
export declare function deepFreeze(input: RecordSeoPropertiesRepresentation): void;
|
|
10
9
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
11
10
|
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: RecordSeoPropertiesRepresentation, 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
package/sfdc/index.js
CHANGED
|
@@ -14,10 +14,10 @@
|
|
|
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, StoreKeyMap } from 'force/luvioEngine';
|
|
17
|
+
import { serializeStructuredKey, StoreKeyMap, deepFreeze } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
|
-
const { keys: ObjectKeys$1,
|
|
20
|
+
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
21
21
|
const { isArray: ArrayIsArray$1 } = Array;
|
|
22
22
|
/**
|
|
23
23
|
* Validates an adapter config is well-formed.
|
|
@@ -60,7 +60,7 @@ const snapshotRefreshOptions = {
|
|
|
60
60
|
};
|
|
61
61
|
const keyPrefix = 'CommunitiesSeo';
|
|
62
62
|
|
|
63
|
-
const {
|
|
63
|
+
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
64
64
|
const { isArray: ArrayIsArray } = Array;
|
|
65
65
|
const { stringify: JSONStringify } = JSON;
|
|
66
66
|
function createLink(ref) {
|
|
@@ -126,16 +126,6 @@ function equals(existing, incoming) {
|
|
|
126
126
|
}
|
|
127
127
|
return true;
|
|
128
128
|
}
|
|
129
|
-
function deepFreeze(input) {
|
|
130
|
-
const input_fields = input.fields;
|
|
131
|
-
const input_fields_keys = Object.keys(input_fields);
|
|
132
|
-
const input_fields_length = input_fields_keys.length;
|
|
133
|
-
for (let i = 0; i < input_fields_length; i++) {
|
|
134
|
-
input_fields_keys[i];
|
|
135
|
-
}
|
|
136
|
-
ObjectFreeze(input_fields);
|
|
137
|
-
ObjectFreeze(input);
|
|
138
|
-
}
|
|
139
129
|
const ingest = function RecordSeoPropertiesRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
140
130
|
if (process.env.NODE_ENV !== 'production') {
|
|
141
131
|
const validateError = validate(input);
|
|
@@ -152,7 +142,6 @@ const ingest = function RecordSeoPropertiesRepresentationIngest(input, path, luv
|
|
|
152
142
|
propertyName: path.propertyName,
|
|
153
143
|
ttl: ttlToUse
|
|
154
144
|
});
|
|
155
|
-
deepFreeze(input);
|
|
156
145
|
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
157
146
|
luvio.storePublish(key, incomingRecord);
|
|
158
147
|
}
|
|
@@ -202,6 +191,7 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
202
191
|
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
203
192
|
}
|
|
204
193
|
}
|
|
194
|
+
deepFreeze(snapshot.data);
|
|
205
195
|
return snapshot;
|
|
206
196
|
}
|
|
207
197
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
@@ -371,4 +361,4 @@ withDefaultLuvio((luvio) => {
|
|
|
371
361
|
});
|
|
372
362
|
|
|
373
363
|
export { getRecordSeoProperties, getRecordSeoProperties_imperative };
|
|
374
|
-
// version: 1.134.
|
|
364
|
+
// version: 1.134.8-c3d6d2cfc
|