@salesforce/lds-adapters-platform-flow 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.
@@ -4,31 +4,13 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { StoreKeyMap } from '@luvio/engine';
7
+ import { StoreKeyMap, deepFreeze } from '@luvio/engine';
8
8
 
9
- const { freeze: ObjectFreeze$1, keys: ObjectKeys$1, create: ObjectCreate$1, assign: ObjectAssign } = Object;
9
+ const { keys: ObjectKeys$1, create: ObjectCreate$1, assign: ObjectAssign } = Object;
10
10
  const { isArray: ArrayIsArray$1 } = Array;
11
- function deepFreeze$2(value) {
12
- // No need to freeze primitives
13
- if (typeof value !== 'object' || value === null) {
14
- return;
15
- }
16
- if (ArrayIsArray$1(value)) {
17
- for (let i = 0, len = value.length; i < len; i += 1) {
18
- deepFreeze$2(value[i]);
19
- }
20
- }
21
- else {
22
- const keys = ObjectKeys$1(value);
23
- for (let i = 0, len = keys.length; i < len; i += 1) {
24
- deepFreeze$2(value[keys[i]]);
25
- }
26
- }
27
- ObjectFreeze$1(value);
28
- }
29
11
 
30
12
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
31
- const { keys: ObjectKeys, freeze: ObjectFreeze, create: ObjectCreate } = Object;
13
+ const { keys: ObjectKeys, create: ObjectCreate } = Object;
32
14
  const { stringify: JSONStringify } = JSON;
33
15
  const { isArray: ArrayIsArray } = Array;
34
16
  /**
@@ -120,31 +102,7 @@ function stableJSONStringify(node) {
120
102
  }
121
103
  const keyPrefix = 'FlowRuntime';
122
104
 
123
- function deepFreeze$1(input) {
124
- const input_keys = Object.keys(input);
125
- const input_length = input_keys.length;
126
- for (let i = 0; i < input_length; i++) {
127
- const key = input_keys[i];
128
- const input_prop = input[key];
129
- deepFreeze$2(input_prop);
130
- }
131
- ObjectFreeze$1(input);
132
- }
133
-
134
105
  const RepresentationType = 'FlowRuntimeResponseRepresentation';
135
- function deepFreeze(input) {
136
- const input_error = input.error;
137
- if (input_error !== undefined) {
138
- deepFreeze$2(input_error);
139
- }
140
- const input_response = input.response;
141
- if (input_response !== undefined) {
142
- if (input_response !== null && typeof input_response === 'object') {
143
- deepFreeze$1(input_response);
144
- }
145
- }
146
- ObjectFreeze$1(input);
147
- }
148
106
  function getTypeCacheKeys(luvio, input, fullPathFactory) {
149
107
  const rootKeySet = new StoreKeyMap();
150
108
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
@@ -279,7 +237,7 @@ const startFlowAdapterFactory = (luvio) => function flowRuntime__startFlow(untru
279
237
  };
280
238
 
281
239
  function keyBuilder$1(luvio, params) {
282
- return keyPrefix + '::FlowRuntimeResponseRepresentation:(' + 'request.action:' + params.body.request.action + '::' + 'request.serializedState:' + params.body.request.serializedState + '::' + (params.body.request.fields === undefined ? 'request.fields' : 'request.fields:' + params.body.request.fields) + '::' + (params.body.request.uiElementVisited === undefined ? 'request.uiElementVisited' : 'request.uiElementVisited:' + params.body.request.uiElementVisited) + '::' + (params.body.request.enableTrace === undefined ? 'request.enableTrace' : 'request.enableTrace:' + params.body.request.enableTrace) + '::' + stableJSONStringify(params.body.request.lcErrors) + ')';
240
+ return keyPrefix + '::FlowRuntimeResponseRepresentation:(' + 'request.action:' + params.body.request.action + '::' + 'request.serializedState:' + params.body.request.serializedState + '::' + (params.body.request.fields === undefined ? undefined : ('[' + params.body.request.fields.map(element => 'request.fields.field:' + element.field + '::' + (element.isVisible === undefined ? 'request.fields.isVisible' : 'request.fields.isVisible:' + element.isVisible) + '::' + (element.value === undefined ? 'request.fields.value' : 'request.fields.value:' + element.value)).join(',') + ']')) + '::' + (params.body.request.uiElementVisited === undefined ? 'request.uiElementVisited' : 'request.uiElementVisited:' + params.body.request.uiElementVisited) + '::' + (params.body.request.enableTrace === undefined ? 'request.enableTrace' : 'request.enableTrace:' + params.body.request.enableTrace) + '::' + stableJSONStringify(params.body.request.lcErrors) + ')';
283
241
  }
284
242
  function getResponseCacheKeys$1(luvio, resourceParams, response) {
285
243
  return getTypeCacheKeys(luvio, response, () => keyBuilder$1(luvio, resourceParams));
@@ -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 { ObjectFreeze, ObjectCreate, ObjectKeys };
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 {
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: FlowRuntimeHashbagRepresentation, existing: FlowRuntimeHashbagRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FlowRuntimeHashbagRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: FlowRuntimeHashbagRepresentationNormalized, incoming: FlowRuntimeHashbagRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: FlowRuntimeHashbagRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FlowRuntimeHashbagRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -7,7 +7,6 @@ export declare const RepresentationType: string;
7
7
  export declare function normalize(input: FlowRuntimeNavigateFlowRepresentation, existing: FlowRuntimeNavigateFlowRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FlowRuntimeNavigateFlowRepresentationNormalized;
8
8
  export declare const select: () => $64$luvio_engine_FragmentSelection;
9
9
  export declare function equals(existing: FlowRuntimeNavigateFlowRepresentationNormalized, incoming: FlowRuntimeNavigateFlowRepresentationNormalized): boolean;
10
- export declare function deepFreeze(input: FlowRuntimeNavigateFlowRepresentation): void;
11
10
  export declare const ingest: $64$luvio_engine_ResourceIngest;
12
11
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FlowRuntimeNavigateFlowRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
13
12
  /**
@@ -6,7 +6,6 @@ export declare const RepresentationType: string;
6
6
  export declare function normalize(input: FlowRuntimeNavigateFlowWrapperRepresentation, existing: FlowRuntimeNavigateFlowWrapperRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FlowRuntimeNavigateFlowWrapperRepresentationNormalized;
7
7
  export declare const select: () => $64$luvio_engine_FragmentSelection;
8
8
  export declare function equals(existing: FlowRuntimeNavigateFlowWrapperRepresentationNormalized, incoming: FlowRuntimeNavigateFlowWrapperRepresentationNormalized): boolean;
9
- export declare function deepFreeze(input: FlowRuntimeNavigateFlowWrapperRepresentation): void;
10
9
  export declare const ingest: $64$luvio_engine_ResourceIngest;
11
10
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FlowRuntimeNavigateFlowWrapperRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
12
11
  /**
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: FlowRuntimeNavigationFieldValue, existing: FlowRuntimeNavigationFieldValueNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FlowRuntimeNavigationFieldValueNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: FlowRuntimeNavigationFieldValueNormalized, incoming: FlowRuntimeNavigationFieldValueNormalized): boolean;
8
- export declare function deepFreeze(input: FlowRuntimeNavigationFieldValue): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FlowRuntimeNavigationFieldValue, 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: FlowRuntimeNavigationResult, existing: FlowRuntimeNavigationResultNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FlowRuntimeNavigationResultNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: FlowRuntimeNavigationResultNormalized, incoming: FlowRuntimeNavigationResultNormalized): boolean;
8
- export declare function deepFreeze(input: FlowRuntimeNavigationResult): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FlowRuntimeNavigationResult, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -6,7 +6,6 @@ export declare const RepresentationType: string;
6
6
  export declare function normalize(input: FlowRuntimeResponseRepresentation, existing: FlowRuntimeResponseRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FlowRuntimeResponseRepresentationNormalized;
7
7
  export declare const select: () => $64$luvio_engine_BaseFragment;
8
8
  export declare function equals(existing: FlowRuntimeResponseRepresentationNormalized, incoming: FlowRuntimeResponseRepresentationNormalized): boolean;
9
- export declare function deepFreeze(input: FlowRuntimeResponseRepresentation): void;
10
9
  export declare const ingest: $64$luvio_engine_ResourceIngest;
11
10
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FlowRuntimeResponseRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
12
11
  /**
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: FlowRuntimeResumeFlowRepresentation, existing: FlowRuntimeResumeFlowRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FlowRuntimeResumeFlowRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: FlowRuntimeResumeFlowRepresentationNormalized, incoming: FlowRuntimeResumeFlowRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: FlowRuntimeResumeFlowRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FlowRuntimeResumeFlowRepresentation, 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: FlowRuntimeRunFlowRepresentation, existing: FlowRuntimeRunFlowRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FlowRuntimeRunFlowRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: FlowRuntimeRunFlowRepresentationNormalized, incoming: FlowRuntimeRunFlowRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: FlowRuntimeRunFlowRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FlowRuntimeRunFlowRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -1,11 +1,5 @@
1
1
  import { NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
- export declare const ObjectFreeze: {
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-platform-flow",
3
- "version": "1.134.7",
3
+ "version": "1.134.8",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "Flow Runtime APIs",
6
6
  "main": "dist/es/es2018/platform-flow.js",
package/sfdc/index.js CHANGED
@@ -14,31 +14,13 @@
14
14
  /* proxy-compat-disable */
15
15
  import { createLDSAdapter } from 'force/ldsBindings';
16
16
  import { withDefaultLuvio } from 'force/ldsEngine';
17
- import { StoreKeyMap } from 'force/luvioEngine';
17
+ import { StoreKeyMap, deepFreeze } from 'force/luvioEngine';
18
18
 
19
- const { freeze: ObjectFreeze$1, keys: ObjectKeys$1, create: ObjectCreate$1, assign: ObjectAssign } = Object;
19
+ const { keys: ObjectKeys$1, create: ObjectCreate$1, assign: ObjectAssign } = Object;
20
20
  const { isArray: ArrayIsArray$1 } = Array;
21
- function deepFreeze$2(value) {
22
- // No need to freeze primitives
23
- if (typeof value !== 'object' || value === null) {
24
- return;
25
- }
26
- if (ArrayIsArray$1(value)) {
27
- for (let i = 0, len = value.length; i < len; i += 1) {
28
- deepFreeze$2(value[i]);
29
- }
30
- }
31
- else {
32
- const keys = ObjectKeys$1(value);
33
- for (let i = 0, len = keys.length; i < len; i += 1) {
34
- deepFreeze$2(value[keys[i]]);
35
- }
36
- }
37
- ObjectFreeze$1(value);
38
- }
39
21
 
40
22
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
41
- const { keys: ObjectKeys, freeze: ObjectFreeze, create: ObjectCreate } = Object;
23
+ const { keys: ObjectKeys, create: ObjectCreate } = Object;
42
24
  const { stringify: JSONStringify } = JSON;
43
25
  const { isArray: ArrayIsArray } = Array;
44
26
  /**
@@ -130,31 +112,7 @@ function stableJSONStringify(node) {
130
112
  }
131
113
  const keyPrefix = 'FlowRuntime';
132
114
 
133
- function deepFreeze$1(input) {
134
- const input_keys = Object.keys(input);
135
- const input_length = input_keys.length;
136
- for (let i = 0; i < input_length; i++) {
137
- const key = input_keys[i];
138
- const input_prop = input[key];
139
- deepFreeze$2(input_prop);
140
- }
141
- ObjectFreeze$1(input);
142
- }
143
-
144
115
  const RepresentationType = 'FlowRuntimeResponseRepresentation';
145
- function deepFreeze(input) {
146
- const input_error = input.error;
147
- if (input_error !== undefined) {
148
- deepFreeze$2(input_error);
149
- }
150
- const input_response = input.response;
151
- if (input_response !== undefined) {
152
- if (input_response !== null && typeof input_response === 'object') {
153
- deepFreeze$1(input_response);
154
- }
155
- }
156
- ObjectFreeze$1(input);
157
- }
158
116
  function getTypeCacheKeys(luvio, input, fullPathFactory) {
159
117
  const rootKeySet = new StoreKeyMap();
160
118
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
@@ -168,7 +126,7 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
168
126
  }
169
127
 
170
128
  function keyBuilder$2(luvio, params) {
171
- return keyPrefix + '::FlowRuntimeResponseRepresentation:(' + 'request.action:' + params.body.request.action + '::' + 'request.serializedState:' + params.body.request.serializedState + '::' + (params.body.request.fields === undefined ? 'request.fields' : 'request.fields:' + params.body.request.fields) + '::' + (params.body.request.uiElementVisited === undefined ? 'request.uiElementVisited' : 'request.uiElementVisited:' + params.body.request.uiElementVisited) + '::' + (params.body.request.enableTrace === undefined ? 'request.enableTrace' : 'request.enableTrace:' + params.body.request.enableTrace) + '::' + stableJSONStringify(params.body.request.lcErrors) + ')';
129
+ return keyPrefix + '::FlowRuntimeResponseRepresentation:(' + 'request.action:' + params.body.request.action + '::' + 'request.serializedState:' + params.body.request.serializedState + '::' + (params.body.request.fields === undefined ? undefined : ('[' + params.body.request.fields.map(element => 'request.fields.field:' + element.field + '::' + (element.isVisible === undefined ? 'request.fields.isVisible' : 'request.fields.isVisible:' + element.isVisible) + '::' + (element.value === undefined ? 'request.fields.value' : 'request.fields.value:' + element.value)).join(',') + ']')) + '::' + (params.body.request.uiElementVisited === undefined ? 'request.uiElementVisited' : 'request.uiElementVisited:' + params.body.request.uiElementVisited) + '::' + (params.body.request.enableTrace === undefined ? 'request.enableTrace' : 'request.enableTrace:' + params.body.request.enableTrace) + '::' + stableJSONStringify(params.body.request.lcErrors) + ')';
172
130
  }
173
131
  function getResponseCacheKeys$2(luvio, resourceParams, response) {
174
132
  return getTypeCacheKeys(luvio, response, () => keyBuilder$2(luvio, resourceParams));
@@ -606,4 +564,4 @@ withDefaultLuvio((luvio) => {
606
564
  });
607
565
 
608
566
  export { navigateFlow, resumeFlow, startFlow };
609
- // version: 1.134.7-ed0df45ef
567
+ // version: 1.134.8-c3d6d2cfc