@salesforce/lds-runtime-mobile 1.433.0 → 1.434.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/main.js +76 -72
- package/dist/types/adapters/util/records.d.ts +0 -1
- package/dist/types/drafts/quickActions/AbstractQuickActionHandler.d.ts +5 -5
- package/dist/types/drafts/quickActions/QuickActionExecutionRepresentationHandler.d.ts +2 -3
- package/dist/types/drafts/records/draftAwareAdapters/updateRecord.d.ts +1 -1
- package/dist/types/onestore/index.d.ts +2 -2
- package/dist/types/onestore/nimbusDurableCacheInclusionPolicy.d.ts +1 -1
- package/dist/types/onestore/nimbusNetworkDescriptor.d.ts +1 -1
- package/dist/types/sfs/ProductConsumedSideEffects.d.ts +2 -2
- package/dist/types/sfs/sfsCustomSideEffects.d.ts +1 -1
- package/package.json +34 -34
- package/sfdc/main.js +76 -72
- package/sfdc/types/adapters/util/records.d.ts +0 -1
- package/sfdc/types/drafts/quickActions/AbstractQuickActionHandler.d.ts +5 -5
- package/sfdc/types/drafts/quickActions/QuickActionExecutionRepresentationHandler.d.ts +2 -3
- package/sfdc/types/drafts/records/draftAwareAdapters/updateRecord.d.ts +1 -1
- package/sfdc/types/onestore/index.d.ts +2 -2
- package/sfdc/types/onestore/nimbusDurableCacheInclusionPolicy.d.ts +1 -1
- package/sfdc/types/onestore/nimbusNetworkDescriptor.d.ts +1 -1
- package/sfdc/types/sfs/ProductConsumedSideEffects.d.ts +2 -2
- package/sfdc/types/sfs/sfsCustomSideEffects.d.ts +1 -1
package/dist/main.js
CHANGED
|
@@ -46,7 +46,7 @@ import graphqlL2AdapterGate from '@salesforce/gate/lmr.graphqlL2Adapter';
|
|
|
46
46
|
import useOneStore from '@salesforce/gate/lmr.useOneStore';
|
|
47
47
|
import { setServices } from '@conduit-client/service-provisioner/v1';
|
|
48
48
|
import '@conduit-client/type-normalization/v1';
|
|
49
|
-
import { Kind as Kind$2, visit as visit$2, print as print$1, resolveAndValidateGraphQLConfig } from '@conduit-client/onestore-graphql-parser/v1';
|
|
49
|
+
import { Kind as Kind$2, visit as visit$2, print as print$1, resolveAndValidateGraphQLConfig, toGraphQLErrorResponse } from '@conduit-client/onestore-graphql-parser/v1';
|
|
50
50
|
import productConsumedSideEffects from '@salesforce/gate/com.salesforce.fieldservice.vanStockLDSBypass256';
|
|
51
51
|
import reviveOnlyRequestedFields from '@salesforce/gate/lmr.reviveOnlyRequestedFields';
|
|
52
52
|
|
|
@@ -7729,7 +7729,6 @@ function prepareRequest$5(luvio, config) {
|
|
|
7729
7729
|
const key = keyBuilder$1M(luvio, createResourceParams$g(config));
|
|
7730
7730
|
const allTrackedFields = getTrackedFields(key, luvio.getNode(key), {
|
|
7731
7731
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
7732
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
7733
7732
|
}, config.optionalFields);
|
|
7734
7733
|
const optionalFields = fields === undefined ? allTrackedFields : difference(allTrackedFields, fields);
|
|
7735
7734
|
const resourceParams = createResourceParams$g({
|
|
@@ -7856,7 +7855,6 @@ function ingestSuccessChildResourceParams$2(luvio, childResourceParamsArray, chi
|
|
|
7856
7855
|
};
|
|
7857
7856
|
const childTrackedFields = getTrackedFields(childKey, luvio.getNode(childKey), {
|
|
7858
7857
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
7859
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
7860
7858
|
}, childResourceParams.queryParams.optionalFields);
|
|
7861
7859
|
const childSnapshot = ingestSuccess$8(luvio, {
|
|
7862
7860
|
recordId: childResourceParams.urlParams.recordId,
|
|
@@ -16191,7 +16189,6 @@ function buildNetworkSnapshot$c(luvio, config, options) {
|
|
|
16191
16189
|
const key = keyBuilder$1w(luvio, config);
|
|
16192
16190
|
const trackedFieldsConfig = {
|
|
16193
16191
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
16194
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
16195
16192
|
};
|
|
16196
16193
|
const optionalFieldsTrie = convertFieldsToTrie(getTrackedFields(key, luvio.getNode(key), trackedFieldsConfig, config.optionalFields));
|
|
16197
16194
|
const fieldsTrie = BLANK_RECORD_FIELDS_TRIE;
|
|
@@ -22521,7 +22518,6 @@ const buildNetworkSnapshot$3 = (luvio, context, config, options) => {
|
|
|
22521
22518
|
...resourceRequest.queryParams,
|
|
22522
22519
|
optionalFields: getTrackedFields(templateRecordKey, luvio.getNode(templateRecordKey), {
|
|
22523
22520
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
22524
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
22525
22521
|
}, config.optionalFields),
|
|
22526
22522
|
},
|
|
22527
22523
|
});
|
|
@@ -23221,7 +23217,6 @@ function prepareRequest(luvio, context, config) {
|
|
|
23221
23217
|
...resourceRequest.queryParams,
|
|
23222
23218
|
optionalFields: getTrackedFields(recordTemplateKey, luvio.getNode(recordTemplateKey), {
|
|
23223
23219
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
23224
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
23225
23220
|
}, config.optionalFields),
|
|
23226
23221
|
},
|
|
23227
23222
|
});
|
|
@@ -23241,7 +23236,6 @@ function onFetchResponseSuccess$2(luvio, context, config, request, response, res
|
|
|
23241
23236
|
});
|
|
23242
23237
|
const allTrackedFields = getTrackedFields(templateRecordKey, luvio.getNode(templateRecordKey), {
|
|
23243
23238
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
23244
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
23245
23239
|
}, optionalFields);
|
|
23246
23240
|
const allTrackedFieldsTrie = convertFieldsToTrie(allTrackedFields, true);
|
|
23247
23241
|
const ingest = createFieldsIngestSuccess({
|
|
@@ -43083,6 +43077,7 @@ class AbstractQuickActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
43083
43077
|
}
|
|
43084
43078
|
async buildPendingAction(request, queue) {
|
|
43085
43079
|
this.resolveResourceRequestBody(request.body);
|
|
43080
|
+
// eslint-disable-next-line no-return-await
|
|
43086
43081
|
return await super.buildPendingAction(request, queue);
|
|
43087
43082
|
}
|
|
43088
43083
|
resolveResourceRequestBody(body) {
|
|
@@ -43517,8 +43512,6 @@ function isCreateContentDocumentAndVersionDraftAdapterEvent(customEvent) {
|
|
|
43517
43512
|
return customEvent.namespace === CONTENT_DOCUMENT_AND_VERSION_NAMESPACE;
|
|
43518
43513
|
}
|
|
43519
43514
|
|
|
43520
|
-
// so eslint doesn't complain about nimbus
|
|
43521
|
-
/* global __nimbus */
|
|
43522
43515
|
function chunkToBase64(chunk) {
|
|
43523
43516
|
const bytes = new Uint8Array(chunk);
|
|
43524
43517
|
const CHUNK_SIZE = 64 * 1024; // 64kb, any bigger and fromCharCode() can error out with an overflow.
|
|
@@ -49603,6 +49596,7 @@ function isPolymorphicFieldPath(path, pathToObjectApiNamesMap, objectInfos) {
|
|
|
49603
49596
|
const parentObjectInfo = objectInfos[parentObjectApiNames[0]];
|
|
49604
49597
|
// this should not be undefined, but lets catch it if we do end up in that state.
|
|
49605
49598
|
if (parentObjectInfo === undefined) {
|
|
49599
|
+
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
49606
49600
|
throw new Error(`ObjectInfo is missing for ${parentObjectApiNames[0]} for ${parentApiPath}`);
|
|
49607
49601
|
}
|
|
49608
49602
|
const relationshipField = referenceIdFieldForRelationship(lastSegment);
|
|
@@ -50975,6 +50969,7 @@ function checkForEmptyData(gqlResult) {
|
|
|
50975
50969
|
}
|
|
50976
50970
|
const query = data.uiapi.query;
|
|
50977
50971
|
// Check all entity types in the query for edges - using for...in to avoid array allocation
|
|
50972
|
+
// eslint-disable-next-line guard-for-in
|
|
50978
50973
|
for (const entityType in query) {
|
|
50979
50974
|
const entity = query[entityType];
|
|
50980
50975
|
if (entity && entity.edges && isArray$3(entity.edges) && entity.edges.length > 0) {
|
|
@@ -52486,6 +52481,7 @@ function extractApiNameFromConfig(adapterName, config, completedNetworkRequests)
|
|
|
52486
52481
|
case 'getRecord':
|
|
52487
52482
|
// getRecord config has fields/optionalFields like "Account.Name"
|
|
52488
52483
|
// Extract apiName from first field in config
|
|
52484
|
+
// eslint-disable-next-line no-case-declarations
|
|
52489
52485
|
const objectName = extractObjectNameFromFields(parsedConfig);
|
|
52490
52486
|
if (objectName) {
|
|
52491
52487
|
apiName = objectName;
|
|
@@ -53023,7 +53019,9 @@ class NimbusSqliteStore {
|
|
|
53023
53019
|
}
|
|
53024
53020
|
instrumentation$2.trackValue(GRAPHQL_QUERY_ROOT_METRIC_NAME, row[1].length);
|
|
53025
53021
|
}
|
|
53026
|
-
catch {
|
|
53022
|
+
catch {
|
|
53023
|
+
// intentionally do nothing
|
|
53024
|
+
}
|
|
53027
53025
|
}
|
|
53028
53026
|
}
|
|
53029
53027
|
|
|
@@ -53732,6 +53730,7 @@ class PrimingSession extends EventEmitter {
|
|
|
53732
53730
|
const userData = {
|
|
53733
53731
|
...stats,
|
|
53734
53732
|
};
|
|
53733
|
+
// eslint-disable-next-line guard-for-in
|
|
53735
53734
|
for (const error in errors) {
|
|
53736
53735
|
activity.error(error);
|
|
53737
53736
|
}
|
|
@@ -53912,6 +53911,7 @@ class PrimingSession extends EventEmitter {
|
|
|
53912
53911
|
let limitedResult = this.applyRetryLimits(result.additionalWork);
|
|
53913
53912
|
this.enqueue(limitedResult.additionalWork);
|
|
53914
53913
|
if (limitedResult.recordsNeedingRefetch.size > 0) {
|
|
53914
|
+
// eslint-disable-next-line guard-for-in
|
|
53915
53915
|
for (const key in keys$3(limitedResult.recordsNeedingRefetch)) {
|
|
53916
53916
|
const value = limitedResult.recordsNeedingRefetch.get(key);
|
|
53917
53917
|
if (result.recordsNeedingRefetch.has(key)) {
|
|
@@ -56198,6 +56198,7 @@ class DurableRecordStore {
|
|
|
56198
56198
|
async exists(key) {
|
|
56199
56199
|
const result = await this.durableStore.query('SELECT EXISTS(SELECT 1 FROM lds_data WHERE key = ?)', [key]);
|
|
56200
56200
|
const exists = result.rows[0][0];
|
|
56201
|
+
// eslint-disable-next-line eqeqeq
|
|
56201
56202
|
return exists == true;
|
|
56202
56203
|
}
|
|
56203
56204
|
async getRecord(key) {
|
|
@@ -56412,7 +56413,7 @@ var CounterResult;
|
|
|
56412
56413
|
CounterResult["Error"] = "Error";
|
|
56413
56414
|
})(CounterResult || (CounterResult = {}));
|
|
56414
56415
|
function incrementCounter(name, result) {
|
|
56415
|
-
instrumentation.incrementCounter('SFSSideEffect', 1, result
|
|
56416
|
+
instrumentation.incrementCounter('SFSSideEffect', 1, result === CounterResult.Error, {
|
|
56416
56417
|
Name: name,
|
|
56417
56418
|
Result: result,
|
|
56418
56419
|
});
|
|
@@ -59000,7 +59001,7 @@ function buildServiceDescriptor$b(luvio) {
|
|
|
59000
59001
|
},
|
|
59001
59002
|
};
|
|
59002
59003
|
}
|
|
59003
|
-
// version: 1.
|
|
59004
|
+
// version: 1.434.0-6aa2dd15e3
|
|
59004
59005
|
|
|
59005
59006
|
/**
|
|
59006
59007
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -59026,7 +59027,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
59026
59027
|
},
|
|
59027
59028
|
};
|
|
59028
59029
|
}
|
|
59029
|
-
// version: 1.
|
|
59030
|
+
// version: 1.434.0-6aa2dd15e3
|
|
59030
59031
|
|
|
59031
59032
|
/*!
|
|
59032
59033
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -60042,13 +60043,7 @@ class GraphQLImperativeBindingsService {
|
|
|
60042
60043
|
}
|
|
60043
60044
|
return await buildBaseImperativeInvoker(getCommand, (result) => this.transformResult(result, exposeRefresh))(...params);
|
|
60044
60045
|
} catch (error) {
|
|
60045
|
-
|
|
60046
|
-
return {
|
|
60047
|
-
data: void 0,
|
|
60048
|
-
errors: [
|
|
60049
|
-
{ message: "Internal error in GraphQL adapter occurred", locations: [] }
|
|
60050
|
-
]
|
|
60051
|
-
};
|
|
60046
|
+
return toGraphQLErrorResponse(error);
|
|
60052
60047
|
}
|
|
60053
60048
|
};
|
|
60054
60049
|
}
|
|
@@ -60142,8 +60137,8 @@ class GraphQLLegacyImperativeBindingsService {
|
|
|
60142
60137
|
config = result.value;
|
|
60143
60138
|
}
|
|
60144
60139
|
}
|
|
60145
|
-
const command = getCommand({ config, assertIsValid });
|
|
60146
60140
|
try {
|
|
60141
|
+
const command = getCommand({ config, assertIsValid });
|
|
60147
60142
|
const overrides = getOverridesForLegacyRequestContext(requestContext);
|
|
60148
60143
|
const result = await command.execute(overrides);
|
|
60149
60144
|
const consumerEmittedData = {
|
|
@@ -60160,13 +60155,7 @@ class GraphQLLegacyImperativeBindingsService {
|
|
|
60160
60155
|
}
|
|
60161
60156
|
callback(consumerEmittedData);
|
|
60162
60157
|
} catch (error) {
|
|
60163
|
-
|
|
60164
|
-
callback({
|
|
60165
|
-
data: void 0,
|
|
60166
|
-
errors: [
|
|
60167
|
-
{ message: "Internal error in GraphQL adapter occurred", locations: [] }
|
|
60168
|
-
]
|
|
60169
|
-
});
|
|
60158
|
+
callback(toGraphQLErrorResponse(error));
|
|
60170
60159
|
}
|
|
60171
60160
|
};
|
|
60172
60161
|
const subscribe = (config, requestContext, callback) => {
|
|
@@ -60184,35 +60173,41 @@ class GraphQLLegacyImperativeBindingsService {
|
|
|
60184
60173
|
config = result.value;
|
|
60185
60174
|
}
|
|
60186
60175
|
}
|
|
60187
|
-
const command = getCommand({ config, assertIsValid });
|
|
60188
60176
|
let unsubscribe = () => {
|
|
60189
60177
|
};
|
|
60190
|
-
|
|
60191
|
-
|
|
60192
|
-
const
|
|
60193
|
-
|
|
60194
|
-
|
|
60195
|
-
|
|
60196
|
-
|
|
60197
|
-
|
|
60198
|
-
|
|
60199
|
-
|
|
60200
|
-
|
|
60201
|
-
|
|
60202
|
-
|
|
60203
|
-
|
|
60204
|
-
|
|
60205
|
-
|
|
60206
|
-
|
|
60207
|
-
|
|
60208
|
-
|
|
60209
|
-
|
|
60210
|
-
|
|
60211
|
-
|
|
60212
|
-
|
|
60213
|
-
|
|
60214
|
-
|
|
60215
|
-
|
|
60178
|
+
try {
|
|
60179
|
+
const command = getCommand({ config, assertIsValid });
|
|
60180
|
+
const overrides = getOverridesForLegacyRequestContext(requestContext);
|
|
60181
|
+
command.execute(overrides).then((result) => {
|
|
60182
|
+
const consumerEmittedData = {
|
|
60183
|
+
data: void 0,
|
|
60184
|
+
errors: void 0
|
|
60185
|
+
};
|
|
60186
|
+
if (result.isOk()) {
|
|
60187
|
+
deepFreeze(result.value);
|
|
60188
|
+
consumerEmittedData.data = result.value.data.data;
|
|
60189
|
+
unsubscribe = result.value.subscribe(
|
|
60190
|
+
(res) => {
|
|
60191
|
+
handleEmit(res, callback);
|
|
60192
|
+
}
|
|
60193
|
+
);
|
|
60194
|
+
} else {
|
|
60195
|
+
const { data, errors } = toGraphQLResponseFromFailure$1(
|
|
60196
|
+
result.error.failure
|
|
60197
|
+
);
|
|
60198
|
+
consumerEmittedData.data = data;
|
|
60199
|
+
consumerEmittedData.errors = errors;
|
|
60200
|
+
unsubscribe = result.error.subscribe(
|
|
60201
|
+
(res) => {
|
|
60202
|
+
handleEmit(res, callback);
|
|
60203
|
+
}
|
|
60204
|
+
);
|
|
60205
|
+
}
|
|
60206
|
+
callback(consumerEmittedData);
|
|
60207
|
+
});
|
|
60208
|
+
} catch (error) {
|
|
60209
|
+
callback(toGraphQLErrorResponse(error));
|
|
60210
|
+
}
|
|
60216
60211
|
return () => {
|
|
60217
60212
|
unsubscribe();
|
|
60218
60213
|
};
|
|
@@ -60255,13 +60250,7 @@ class GraphQLMutationBindingsService {
|
|
|
60255
60250
|
return toGraphQLResponseFromFailure$1(result.error.failure);
|
|
60256
60251
|
}
|
|
60257
60252
|
} catch (error) {
|
|
60258
|
-
|
|
60259
|
-
return {
|
|
60260
|
-
data: void 0,
|
|
60261
|
-
errors: [
|
|
60262
|
-
{ message: "Internal error in GraphQL adapter occurred", locations: [] }
|
|
60263
|
-
]
|
|
60264
|
-
};
|
|
60253
|
+
return toGraphQLErrorResponse(error);
|
|
60265
60254
|
}
|
|
60266
60255
|
};
|
|
60267
60256
|
}
|
|
@@ -60421,6 +60410,10 @@ class CommandWireAdapterConstructor {
|
|
|
60421
60410
|
if (isIncompleteConfigError(err)) {
|
|
60422
60411
|
return;
|
|
60423
60412
|
}
|
|
60413
|
+
if (err instanceof JsonSchemaViolationError) {
|
|
60414
|
+
this.handleConfigSchemaViolation(err);
|
|
60415
|
+
return;
|
|
60416
|
+
}
|
|
60424
60417
|
throw err;
|
|
60425
60418
|
}
|
|
60426
60419
|
}
|
|
@@ -60473,6 +60466,16 @@ class CommandWireAdapterConstructor {
|
|
|
60473
60466
|
handleExecutionThrow(error) {
|
|
60474
60467
|
emitError(this.callback, error);
|
|
60475
60468
|
}
|
|
60469
|
+
/**
|
|
60470
|
+
* Hook for subclasses to handle a JsonSchemaViolationError from the config
|
|
60471
|
+
* schema assertion. The default re-throws so legacy non-GraphQL wire
|
|
60472
|
+
* adapters keep their existing throw behavior. Overrides are expected to
|
|
60473
|
+
* either emit an error result or re-throw — silently returning will
|
|
60474
|
+
* swallow the error.
|
|
60475
|
+
*/
|
|
60476
|
+
handleConfigSchemaViolation(error) {
|
|
60477
|
+
throw error;
|
|
60478
|
+
}
|
|
60476
60479
|
unsubscribe() {
|
|
60477
60480
|
if (this.unsubscriber) {
|
|
60478
60481
|
this.unsubscriber();
|
|
@@ -60565,16 +60568,14 @@ class GraphQLCommandWireAdapterConstructor extends CommandWireAdapterConstructor
|
|
|
60565
60568
|
this.callback(consumerEmittedData);
|
|
60566
60569
|
}
|
|
60567
60570
|
} catch (e) {
|
|
60568
|
-
logError$1(e);
|
|
60569
60571
|
this.handleExecutionThrow(e);
|
|
60570
60572
|
}
|
|
60571
60573
|
}
|
|
60572
|
-
handleExecutionThrow(
|
|
60573
|
-
|
|
60574
|
-
|
|
60575
|
-
|
|
60576
|
-
|
|
60577
|
-
});
|
|
60574
|
+
handleExecutionThrow(error) {
|
|
60575
|
+
this.callback(toGraphQLErrorResponse(error));
|
|
60576
|
+
}
|
|
60577
|
+
handleConfigSchemaViolation(error) {
|
|
60578
|
+
this.handleExecutionThrow(error);
|
|
60578
60579
|
}
|
|
60579
60580
|
update(config, _context) {
|
|
60580
60581
|
this.unsubscribe();
|
|
@@ -61226,9 +61227,11 @@ class NimbusDurableCacheInclusionPolicy extends DurableCacheInclusionPolicy {
|
|
|
61226
61227
|
return entries.length > 0 ? this.store.setEntries(entries) : Promise.resolve();
|
|
61227
61228
|
}
|
|
61228
61229
|
find(_query) {
|
|
61230
|
+
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
61229
61231
|
throw new Error('find not supported on the NimbusDurableCacheInclusionPolicy');
|
|
61230
61232
|
}
|
|
61231
61233
|
findAndModify(_query, _cacheUpdate) {
|
|
61234
|
+
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
61232
61235
|
throw new Error('findAndModify not supported on the NimbusDurableCacheInclusionPolicy');
|
|
61233
61236
|
}
|
|
61234
61237
|
registerListener() {
|
|
@@ -61254,7 +61257,7 @@ class NimbusDurableCacheInclusionPolicy extends DurableCacheInclusionPolicy {
|
|
|
61254
61257
|
});
|
|
61255
61258
|
});
|
|
61256
61259
|
}
|
|
61257
|
-
// TODO: onestore doesnt support cache eviction yet
|
|
61260
|
+
// TODO [W-19368859]: onestore doesnt support cache eviction yet
|
|
61258
61261
|
// if (evictKeys.size > 0) {
|
|
61259
61262
|
// evictKeys.forEach((key) => {
|
|
61260
61263
|
// this.services.cache.evict(key);
|
|
@@ -61349,6 +61352,7 @@ class NimbusSqliteOneStoreCache {
|
|
|
61349
61352
|
batchQuery(operations) {
|
|
61350
61353
|
return new Promise((resolve, reject) => {
|
|
61351
61354
|
this.sqlStore.batchOperations(operations, (error) => {
|
|
61355
|
+
// eslint-disable-next-line no-unused-expressions
|
|
61352
61356
|
error ? reject(error) : resolve();
|
|
61353
61357
|
});
|
|
61354
61358
|
});
|
|
@@ -61424,7 +61428,7 @@ function initializeOneStore(sqliteStore, luvio) {
|
|
|
61424
61428
|
buildServiceDescriptor$7(),
|
|
61425
61429
|
buildServiceDescriptor$1$1(),
|
|
61426
61430
|
buildServiceDescriptor$2(),
|
|
61427
|
-
// TODO[
|
|
61431
|
+
// TODO [W-18753648]: See note above.
|
|
61428
61432
|
// buildStreamingCommandServiceDescriptor(),
|
|
61429
61433
|
// buildNdJsonServiceDescriptor(),
|
|
61430
61434
|
// buildSseCommandServiceDescriptor(),
|
|
@@ -61686,4 +61690,4 @@ register({
|
|
|
61686
61690
|
});
|
|
61687
61691
|
|
|
61688
61692
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
|
|
61689
|
-
// version: 1.
|
|
61693
|
+
// version: 1.434.0-d8deb0d4ea
|
|
@@ -31,7 +31,6 @@ export interface RecordFieldTrie {
|
|
|
31
31
|
}
|
|
32
32
|
export interface TrackedFieldsConfig {
|
|
33
33
|
maxDepth: number;
|
|
34
|
-
onlyFetchLeafNodeIdAndName: boolean;
|
|
35
34
|
}
|
|
36
35
|
export declare function isGraphNode(node: ProxyGraphNode<unknown>): node is GraphNode<unknown>;
|
|
37
36
|
export declare function extractTrackedFieldsToTrie(recordId: string | NormalizedKeyMetadata, node: ProxyGraphNode<FieldMapRepresentationNormalized, FieldMapRepresentation>, root: RecordFieldTrie): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AbstractResourceRequestActionHandler } from '../AbstractResourceRequestActionHandler';
|
|
2
|
-
import { QuickActionExecutionRepresentation } from '@salesforce/lds-adapters-uiapi';
|
|
3
|
-
import { NetworkAdapter, ResourceRequest } from '@luvio/engine';
|
|
4
|
-
import { DraftAction, DraftQueue, PendingDraftAction } from '@salesforce/lds-drafts';
|
|
5
|
-
import { Luvio } from '@luvio/engine';
|
|
6
|
-
import { UiApiDraftRecordService } from '../UiApiDraftRecordService';
|
|
2
|
+
import type { QuickActionExecutionRepresentation } from '@salesforce/lds-adapters-uiapi';
|
|
3
|
+
import type { NetworkAdapter, ResourceRequest } from '@luvio/engine';
|
|
4
|
+
import type { DraftAction, DraftQueue, PendingDraftAction } from '@salesforce/lds-drafts';
|
|
5
|
+
import type { Luvio } from '@luvio/engine';
|
|
6
|
+
import type { UiApiDraftRecordService } from '../UiApiDraftRecordService';
|
|
7
7
|
export declare abstract class AbstractQuickActionHandler extends AbstractResourceRequestActionHandler<QuickActionExecutionRepresentation> {
|
|
8
8
|
constructor(draftQueue: DraftQueue, networkAdapter: NetworkAdapter, getLuvio: () => Luvio, recordService: UiApiDraftRecordService);
|
|
9
9
|
buildPendingAction(request: ResourceRequest, queue: DraftAction<unknown, unknown>[]): Promise<PendingDraftAction<ResourceRequest>>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { CompletedDraftAction, QueueOperation, DraftAction, DraftQueue } from '@salesforce/lds-drafts';
|
|
2
2
|
import { AbstractQuickActionHandler } from './AbstractQuickActionHandler';
|
|
3
|
-
import type { PerformActionInputRepresentation, QuickActionExecutionRepresentation, RecordRepresentation } from '@salesforce/lds-adapters-uiapi';
|
|
4
|
-
import { GetRecordConfig } from '@salesforce/lds-adapters-uiapi';
|
|
3
|
+
import type { PerformActionInputRepresentation, QuickActionExecutionRepresentation, RecordRepresentation, GetRecordConfig } from '@salesforce/lds-adapters-uiapi';
|
|
5
4
|
import type { DurableStoreKeyMetadataMap, Luvio, NetworkAdapter, ResourceRequest, Adapter } from '@luvio/engine';
|
|
6
5
|
import type { UiApiDraftRecordService } from '../UiApiDraftRecordService';
|
|
7
6
|
import type { RecordEffectingHandler } from '../records/actionHandlers/RecordEffectingHandler';
|
|
8
7
|
import { type SideEffectService } from '../sideEffects/SideEffectService';
|
|
9
8
|
import { type SideEffect } from '../sideEffects';
|
|
10
|
-
import { ObjectInfoService } from './../../utils/ObjectInfoService';
|
|
9
|
+
import type { ObjectInfoService } from './../../utils/ObjectInfoService';
|
|
11
10
|
export declare const QUICK_ACTION_HANDLER = "QUICK_ACTION_HANDLER";
|
|
12
11
|
interface PerformQuickActionResourceRequest extends Omit<ResourceRequest, 'body' | 'method'> {
|
|
13
12
|
body: PerformActionInputRepresentation;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DraftAwareUpdateRecordAdapter } from '@salesforce/lds-adapters-uiapi';
|
|
2
2
|
import type { UiApiActionHandler } from '../actionHandlers/UiApiRecordActionHandler';
|
|
3
3
|
import type { DurableRecordStore } from 'src/durableStore/DurableRecordStore';
|
|
4
|
-
import { ObjectInfoService } from '../../../utils/ObjectInfoService';
|
|
4
|
+
import type { ObjectInfoService } from '../../../utils/ObjectInfoService';
|
|
5
5
|
/**
|
|
6
6
|
* @param luvio The runtime's luvio instance
|
|
7
7
|
* @param actionHandler The UIAPI Record action handler. NOTE: this adapter doesn't
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SqliteStorePlugin } from '@salesforce/nimbus-plugin-lds';
|
|
2
|
-
import { Luvio } from '@luvio/engine';
|
|
1
|
+
import type { SqliteStorePlugin } from '@salesforce/nimbus-plugin-lds';
|
|
2
|
+
import type { Luvio } from '@luvio/engine';
|
|
3
3
|
export declare function initializeOneStore(sqliteStore: SqliteStorePlugin, luvio: Luvio): void;
|
|
4
4
|
/**
|
|
5
5
|
* Manually purges the OneStore cache by days.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type CacheInclusionPolicyServiceDescriptor, type CacheQuery, type CacheUpdate, DurableCacheInclusionPolicy } from '@conduit-client/service-cache-inclusion-policy/v1';
|
|
2
2
|
import type { Cache, CacheEntry, Key, NamedCacheService } from '@conduit-client/service-cache/v1';
|
|
3
3
|
import { type DeepReadonly, type SyncOrAsync } from '@conduit-client/utils';
|
|
4
|
-
import { NimbusSqliteOneStoreCache } from './nimbusSqliteStoreCache';
|
|
4
|
+
import type { NimbusSqliteOneStoreCache } from './nimbusSqliteStoreCache';
|
|
5
5
|
export declare class NimbusDurableCacheInclusionPolicy extends DurableCacheInclusionPolicy {
|
|
6
6
|
private readonly services;
|
|
7
7
|
private readonly store;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IFetchService } from '@conduit-client/service-fetch-network/v1';
|
|
1
|
+
import type { IFetchService } from '@conduit-client/service-fetch-network/v1';
|
|
2
2
|
import { type ServiceDescriptor } from '@conduit-client/utils';
|
|
3
3
|
export declare function buildNimbusFetchServiceDescriptor(): ServiceDescriptor<IFetchService, 'fetch', '1.0'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SideEffect } from '../drafts/sideEffects';
|
|
1
|
+
import type { SideEffect } from '../drafts/sideEffects';
|
|
2
2
|
import type { CreateSideEffectHook, DeleteSideEffectHook, UpdateSideEffectHook } from '../drafts/records/actionHandlers/SideEffectHook';
|
|
3
|
-
import { DurableRecordStore } from '../durableStore/DurableRecordStore';
|
|
3
|
+
import type { DurableRecordStore } from '../durableStore/DurableRecordStore';
|
|
4
4
|
export declare const instrumentation: any;
|
|
5
5
|
export declare class ProductConsumedCreatedHook implements CreateSideEffectHook {
|
|
6
6
|
on: 'post';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DurableRecordStore } from '../durableStore/DurableRecordStore';
|
|
1
|
+
import type { DurableRecordStore } from '../durableStore/DurableRecordStore';
|
|
2
2
|
import type { SideEffectHook } from '../drafts/records/actionHandlers/SideEffectHook';
|
|
3
3
|
export declare function createSfsSideEffectHooks(durableRecordStore: DurableRecordStore): SideEffectHook[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-mobile",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.434.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS runtime for mobile/hybrid environments.",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -32,44 +32,44 @@
|
|
|
32
32
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-mobile"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@conduit-client/service-bindings-imperative": "3.19.
|
|
36
|
-
"@conduit-client/service-bindings-lwc": "3.19.
|
|
37
|
-
"@conduit-client/service-provisioner": "3.19.
|
|
38
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
39
|
-
"@salesforce/lds-bindings": "^1.
|
|
40
|
-
"@salesforce/lds-instrumentation": "^1.
|
|
41
|
-
"@salesforce/lds-luvio-service": "^1.
|
|
42
|
-
"@salesforce/lds-luvio-uiapi-records-service": "^1.
|
|
35
|
+
"@conduit-client/service-bindings-imperative": "3.19.4",
|
|
36
|
+
"@conduit-client/service-bindings-lwc": "3.19.4",
|
|
37
|
+
"@conduit-client/service-provisioner": "3.19.4",
|
|
38
|
+
"@salesforce/lds-adapters-uiapi": "^1.434.0",
|
|
39
|
+
"@salesforce/lds-bindings": "^1.434.0",
|
|
40
|
+
"@salesforce/lds-instrumentation": "^1.434.0",
|
|
41
|
+
"@salesforce/lds-luvio-service": "^1.434.0",
|
|
42
|
+
"@salesforce/lds-luvio-uiapi-records-service": "^1.434.0",
|
|
43
43
|
"@salesforce/user": "0.0.21",
|
|
44
44
|
"o11y": "250.7.0",
|
|
45
45
|
"o11y_schema": "256.126.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@conduit-client/command-aura-network": "3.19.
|
|
49
|
-
"@conduit-client/command-aura-normalized-cache-control": "3.19.
|
|
50
|
-
"@conduit-client/command-aura-resource-cache-control": "3.19.
|
|
51
|
-
"@conduit-client/command-fetch-network": "3.19.
|
|
52
|
-
"@conduit-client/command-http-normalized-cache-control": "3.19.
|
|
53
|
-
"@conduit-client/command-network": "3.19.
|
|
54
|
-
"@conduit-client/service-cache": "3.19.
|
|
55
|
-
"@conduit-client/service-cache-control": "3.19.
|
|
56
|
-
"@conduit-client/service-cache-inclusion-policy": "3.19.
|
|
57
|
-
"@conduit-client/service-fetch-network": "3.19.
|
|
58
|
-
"@conduit-client/service-instrument-command": "3.19.
|
|
59
|
-
"@conduit-client/service-instrumentation": "3.19.
|
|
60
|
-
"@conduit-client/service-pubsub": "3.19.
|
|
61
|
-
"@conduit-client/service-store": "3.19.
|
|
62
|
-
"@conduit-client/utils": "3.19.
|
|
63
|
-
"@salesforce/lds-adapters-graphql": "^1.
|
|
64
|
-
"@salesforce/lds-drafts": "^1.
|
|
65
|
-
"@salesforce/lds-durable-records": "^1.
|
|
66
|
-
"@salesforce/lds-network-adapter": "^1.
|
|
67
|
-
"@salesforce/lds-network-nimbus": "^1.
|
|
68
|
-
"@salesforce/lds-store-binary": "^1.
|
|
69
|
-
"@salesforce/lds-store-nimbus": "^1.
|
|
70
|
-
"@salesforce/lds-store-sql": "^1.
|
|
71
|
-
"@salesforce/lds-utils-adapters": "^1.
|
|
72
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
48
|
+
"@conduit-client/command-aura-network": "3.19.4",
|
|
49
|
+
"@conduit-client/command-aura-normalized-cache-control": "3.19.4",
|
|
50
|
+
"@conduit-client/command-aura-resource-cache-control": "3.19.4",
|
|
51
|
+
"@conduit-client/command-fetch-network": "3.19.4",
|
|
52
|
+
"@conduit-client/command-http-normalized-cache-control": "3.19.4",
|
|
53
|
+
"@conduit-client/command-network": "3.19.4",
|
|
54
|
+
"@conduit-client/service-cache": "3.19.4",
|
|
55
|
+
"@conduit-client/service-cache-control": "3.19.4",
|
|
56
|
+
"@conduit-client/service-cache-inclusion-policy": "3.19.4",
|
|
57
|
+
"@conduit-client/service-fetch-network": "3.19.4",
|
|
58
|
+
"@conduit-client/service-instrument-command": "3.19.4",
|
|
59
|
+
"@conduit-client/service-instrumentation": "3.19.4",
|
|
60
|
+
"@conduit-client/service-pubsub": "3.19.4",
|
|
61
|
+
"@conduit-client/service-store": "3.19.4",
|
|
62
|
+
"@conduit-client/utils": "3.19.4",
|
|
63
|
+
"@salesforce/lds-adapters-graphql": "^1.434.0",
|
|
64
|
+
"@salesforce/lds-drafts": "^1.434.0",
|
|
65
|
+
"@salesforce/lds-durable-records": "^1.434.0",
|
|
66
|
+
"@salesforce/lds-network-adapter": "^1.434.0",
|
|
67
|
+
"@salesforce/lds-network-nimbus": "^1.434.0",
|
|
68
|
+
"@salesforce/lds-store-binary": "^1.434.0",
|
|
69
|
+
"@salesforce/lds-store-nimbus": "^1.434.0",
|
|
70
|
+
"@salesforce/lds-store-sql": "^1.434.0",
|
|
71
|
+
"@salesforce/lds-utils-adapters": "^1.434.0",
|
|
72
|
+
"@salesforce/nimbus-plugin-lds": "^1.434.0",
|
|
73
73
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
74
74
|
"wait-for-expect": "^3.0.2"
|
|
75
75
|
},
|
package/sfdc/main.js
CHANGED
|
@@ -46,7 +46,7 @@ import graphqlL2AdapterGate from '@salesforce/gate/lmr.graphqlL2Adapter';
|
|
|
46
46
|
import useOneStore from '@salesforce/gate/lmr.useOneStore';
|
|
47
47
|
import { setServices } from 'force/luvioServiceProvisioner1';
|
|
48
48
|
import 'force/luvioTypeNormalization1';
|
|
49
|
-
import { Kind as Kind$2, visit as visit$2, print as print$1, resolveAndValidateGraphQLConfig } from 'force/luvioOnestoreGraphqlParser';
|
|
49
|
+
import { Kind as Kind$2, visit as visit$2, print as print$1, resolveAndValidateGraphQLConfig, toGraphQLErrorResponse } from 'force/luvioOnestoreGraphqlParser';
|
|
50
50
|
import productConsumedSideEffects from '@salesforce/gate/com.salesforce.fieldservice.vanStockLDSBypass256';
|
|
51
51
|
import reviveOnlyRequestedFields from '@salesforce/gate/lmr.reviveOnlyRequestedFields';
|
|
52
52
|
|
|
@@ -7729,7 +7729,6 @@ function prepareRequest$5(luvio, config) {
|
|
|
7729
7729
|
const key = keyBuilder$1M(luvio, createResourceParams$g(config));
|
|
7730
7730
|
const allTrackedFields = getTrackedFields(key, luvio.getNode(key), {
|
|
7731
7731
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
7732
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
7733
7732
|
}, config.optionalFields);
|
|
7734
7733
|
const optionalFields = fields === undefined ? allTrackedFields : difference(allTrackedFields, fields);
|
|
7735
7734
|
const resourceParams = createResourceParams$g({
|
|
@@ -7856,7 +7855,6 @@ function ingestSuccessChildResourceParams$2(luvio, childResourceParamsArray, chi
|
|
|
7856
7855
|
};
|
|
7857
7856
|
const childTrackedFields = getTrackedFields(childKey, luvio.getNode(childKey), {
|
|
7858
7857
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
7859
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
7860
7858
|
}, childResourceParams.queryParams.optionalFields);
|
|
7861
7859
|
const childSnapshot = ingestSuccess$8(luvio, {
|
|
7862
7860
|
recordId: childResourceParams.urlParams.recordId,
|
|
@@ -16191,7 +16189,6 @@ function buildNetworkSnapshot$c(luvio, config, options) {
|
|
|
16191
16189
|
const key = keyBuilder$1w(luvio, config);
|
|
16192
16190
|
const trackedFieldsConfig = {
|
|
16193
16191
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
16194
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
16195
16192
|
};
|
|
16196
16193
|
const optionalFieldsTrie = convertFieldsToTrie(getTrackedFields(key, luvio.getNode(key), trackedFieldsConfig, config.optionalFields));
|
|
16197
16194
|
const fieldsTrie = BLANK_RECORD_FIELDS_TRIE;
|
|
@@ -22521,7 +22518,6 @@ const buildNetworkSnapshot$3 = (luvio, context, config, options) => {
|
|
|
22521
22518
|
...resourceRequest.queryParams,
|
|
22522
22519
|
optionalFields: getTrackedFields(templateRecordKey, luvio.getNode(templateRecordKey), {
|
|
22523
22520
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
22524
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
22525
22521
|
}, config.optionalFields),
|
|
22526
22522
|
},
|
|
22527
22523
|
});
|
|
@@ -23221,7 +23217,6 @@ function prepareRequest(luvio, context, config) {
|
|
|
23221
23217
|
...resourceRequest.queryParams,
|
|
23222
23218
|
optionalFields: getTrackedFields(recordTemplateKey, luvio.getNode(recordTemplateKey), {
|
|
23223
23219
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
23224
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
23225
23220
|
}, config.optionalFields),
|
|
23226
23221
|
},
|
|
23227
23222
|
});
|
|
@@ -23241,7 +23236,6 @@ function onFetchResponseSuccess$2(luvio, context, config, request, response, res
|
|
|
23241
23236
|
});
|
|
23242
23237
|
const allTrackedFields = getTrackedFields(templateRecordKey, luvio.getNode(templateRecordKey), {
|
|
23243
23238
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
23244
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
23245
23239
|
}, optionalFields);
|
|
23246
23240
|
const allTrackedFieldsTrie = convertFieldsToTrie(allTrackedFields, true);
|
|
23247
23241
|
const ingest = createFieldsIngestSuccess({
|
|
@@ -43083,6 +43077,7 @@ class AbstractQuickActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
43083
43077
|
}
|
|
43084
43078
|
async buildPendingAction(request, queue) {
|
|
43085
43079
|
this.resolveResourceRequestBody(request.body);
|
|
43080
|
+
// eslint-disable-next-line no-return-await
|
|
43086
43081
|
return await super.buildPendingAction(request, queue);
|
|
43087
43082
|
}
|
|
43088
43083
|
resolveResourceRequestBody(body) {
|
|
@@ -43517,8 +43512,6 @@ function isCreateContentDocumentAndVersionDraftAdapterEvent(customEvent) {
|
|
|
43517
43512
|
return customEvent.namespace === CONTENT_DOCUMENT_AND_VERSION_NAMESPACE;
|
|
43518
43513
|
}
|
|
43519
43514
|
|
|
43520
|
-
// so eslint doesn't complain about nimbus
|
|
43521
|
-
/* global __nimbus */
|
|
43522
43515
|
function chunkToBase64(chunk) {
|
|
43523
43516
|
const bytes = new Uint8Array(chunk);
|
|
43524
43517
|
const CHUNK_SIZE = 64 * 1024; // 64kb, any bigger and fromCharCode() can error out with an overflow.
|
|
@@ -49603,6 +49596,7 @@ function isPolymorphicFieldPath(path, pathToObjectApiNamesMap, objectInfos) {
|
|
|
49603
49596
|
const parentObjectInfo = objectInfos[parentObjectApiNames[0]];
|
|
49604
49597
|
// this should not be undefined, but lets catch it if we do end up in that state.
|
|
49605
49598
|
if (parentObjectInfo === undefined) {
|
|
49599
|
+
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
49606
49600
|
throw new Error(`ObjectInfo is missing for ${parentObjectApiNames[0]} for ${parentApiPath}`);
|
|
49607
49601
|
}
|
|
49608
49602
|
const relationshipField = referenceIdFieldForRelationship(lastSegment);
|
|
@@ -50975,6 +50969,7 @@ function checkForEmptyData(gqlResult) {
|
|
|
50975
50969
|
}
|
|
50976
50970
|
const query = data.uiapi.query;
|
|
50977
50971
|
// Check all entity types in the query for edges - using for...in to avoid array allocation
|
|
50972
|
+
// eslint-disable-next-line guard-for-in
|
|
50978
50973
|
for (const entityType in query) {
|
|
50979
50974
|
const entity = query[entityType];
|
|
50980
50975
|
if (entity && entity.edges && isArray$3(entity.edges) && entity.edges.length > 0) {
|
|
@@ -52486,6 +52481,7 @@ function extractApiNameFromConfig(adapterName, config, completedNetworkRequests)
|
|
|
52486
52481
|
case 'getRecord':
|
|
52487
52482
|
// getRecord config has fields/optionalFields like "Account.Name"
|
|
52488
52483
|
// Extract apiName from first field in config
|
|
52484
|
+
// eslint-disable-next-line no-case-declarations
|
|
52489
52485
|
const objectName = extractObjectNameFromFields(parsedConfig);
|
|
52490
52486
|
if (objectName) {
|
|
52491
52487
|
apiName = objectName;
|
|
@@ -53023,7 +53019,9 @@ class NimbusSqliteStore {
|
|
|
53023
53019
|
}
|
|
53024
53020
|
instrumentation$2.trackValue(GRAPHQL_QUERY_ROOT_METRIC_NAME, row[1].length);
|
|
53025
53021
|
}
|
|
53026
|
-
catch {
|
|
53022
|
+
catch {
|
|
53023
|
+
// intentionally do nothing
|
|
53024
|
+
}
|
|
53027
53025
|
}
|
|
53028
53026
|
}
|
|
53029
53027
|
|
|
@@ -53732,6 +53730,7 @@ class PrimingSession extends EventEmitter {
|
|
|
53732
53730
|
const userData = {
|
|
53733
53731
|
...stats,
|
|
53734
53732
|
};
|
|
53733
|
+
// eslint-disable-next-line guard-for-in
|
|
53735
53734
|
for (const error in errors) {
|
|
53736
53735
|
activity.error(error);
|
|
53737
53736
|
}
|
|
@@ -53912,6 +53911,7 @@ class PrimingSession extends EventEmitter {
|
|
|
53912
53911
|
let limitedResult = this.applyRetryLimits(result.additionalWork);
|
|
53913
53912
|
this.enqueue(limitedResult.additionalWork);
|
|
53914
53913
|
if (limitedResult.recordsNeedingRefetch.size > 0) {
|
|
53914
|
+
// eslint-disable-next-line guard-for-in
|
|
53915
53915
|
for (const key in keys$3(limitedResult.recordsNeedingRefetch)) {
|
|
53916
53916
|
const value = limitedResult.recordsNeedingRefetch.get(key);
|
|
53917
53917
|
if (result.recordsNeedingRefetch.has(key)) {
|
|
@@ -56198,6 +56198,7 @@ class DurableRecordStore {
|
|
|
56198
56198
|
async exists(key) {
|
|
56199
56199
|
const result = await this.durableStore.query('SELECT EXISTS(SELECT 1 FROM lds_data WHERE key = ?)', [key]);
|
|
56200
56200
|
const exists = result.rows[0][0];
|
|
56201
|
+
// eslint-disable-next-line eqeqeq
|
|
56201
56202
|
return exists == true;
|
|
56202
56203
|
}
|
|
56203
56204
|
async getRecord(key) {
|
|
@@ -56412,7 +56413,7 @@ var CounterResult;
|
|
|
56412
56413
|
CounterResult["Error"] = "Error";
|
|
56413
56414
|
})(CounterResult || (CounterResult = {}));
|
|
56414
56415
|
function incrementCounter(name, result) {
|
|
56415
|
-
instrumentation.incrementCounter('SFSSideEffect', 1, result
|
|
56416
|
+
instrumentation.incrementCounter('SFSSideEffect', 1, result === CounterResult.Error, {
|
|
56416
56417
|
Name: name,
|
|
56417
56418
|
Result: result,
|
|
56418
56419
|
});
|
|
@@ -59000,7 +59001,7 @@ function buildServiceDescriptor$b(luvio) {
|
|
|
59000
59001
|
},
|
|
59001
59002
|
};
|
|
59002
59003
|
}
|
|
59003
|
-
// version: 1.
|
|
59004
|
+
// version: 1.434.0-6aa2dd15e3
|
|
59004
59005
|
|
|
59005
59006
|
/**
|
|
59006
59007
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -59026,7 +59027,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
59026
59027
|
},
|
|
59027
59028
|
};
|
|
59028
59029
|
}
|
|
59029
|
-
// version: 1.
|
|
59030
|
+
// version: 1.434.0-6aa2dd15e3
|
|
59030
59031
|
|
|
59031
59032
|
/*!
|
|
59032
59033
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -60042,13 +60043,7 @@ class GraphQLImperativeBindingsService {
|
|
|
60042
60043
|
}
|
|
60043
60044
|
return await buildBaseImperativeInvoker(getCommand, (result) => this.transformResult(result, exposeRefresh))(...params);
|
|
60044
60045
|
} catch (error) {
|
|
60045
|
-
|
|
60046
|
-
return {
|
|
60047
|
-
data: void 0,
|
|
60048
|
-
errors: [
|
|
60049
|
-
{ message: "Internal error in GraphQL adapter occurred", locations: [] }
|
|
60050
|
-
]
|
|
60051
|
-
};
|
|
60046
|
+
return toGraphQLErrorResponse(error);
|
|
60052
60047
|
}
|
|
60053
60048
|
};
|
|
60054
60049
|
}
|
|
@@ -60142,8 +60137,8 @@ class GraphQLLegacyImperativeBindingsService {
|
|
|
60142
60137
|
config = result.value;
|
|
60143
60138
|
}
|
|
60144
60139
|
}
|
|
60145
|
-
const command = getCommand({ config, assertIsValid });
|
|
60146
60140
|
try {
|
|
60141
|
+
const command = getCommand({ config, assertIsValid });
|
|
60147
60142
|
const overrides = getOverridesForLegacyRequestContext(requestContext);
|
|
60148
60143
|
const result = await command.execute(overrides);
|
|
60149
60144
|
const consumerEmittedData = {
|
|
@@ -60160,13 +60155,7 @@ class GraphQLLegacyImperativeBindingsService {
|
|
|
60160
60155
|
}
|
|
60161
60156
|
callback(consumerEmittedData);
|
|
60162
60157
|
} catch (error) {
|
|
60163
|
-
|
|
60164
|
-
callback({
|
|
60165
|
-
data: void 0,
|
|
60166
|
-
errors: [
|
|
60167
|
-
{ message: "Internal error in GraphQL adapter occurred", locations: [] }
|
|
60168
|
-
]
|
|
60169
|
-
});
|
|
60158
|
+
callback(toGraphQLErrorResponse(error));
|
|
60170
60159
|
}
|
|
60171
60160
|
};
|
|
60172
60161
|
const subscribe = (config, requestContext, callback) => {
|
|
@@ -60184,35 +60173,41 @@ class GraphQLLegacyImperativeBindingsService {
|
|
|
60184
60173
|
config = result.value;
|
|
60185
60174
|
}
|
|
60186
60175
|
}
|
|
60187
|
-
const command = getCommand({ config, assertIsValid });
|
|
60188
60176
|
let unsubscribe = () => {
|
|
60189
60177
|
};
|
|
60190
|
-
|
|
60191
|
-
|
|
60192
|
-
const
|
|
60193
|
-
|
|
60194
|
-
|
|
60195
|
-
|
|
60196
|
-
|
|
60197
|
-
|
|
60198
|
-
|
|
60199
|
-
|
|
60200
|
-
|
|
60201
|
-
|
|
60202
|
-
|
|
60203
|
-
|
|
60204
|
-
|
|
60205
|
-
|
|
60206
|
-
|
|
60207
|
-
|
|
60208
|
-
|
|
60209
|
-
|
|
60210
|
-
|
|
60211
|
-
|
|
60212
|
-
|
|
60213
|
-
|
|
60214
|
-
|
|
60215
|
-
|
|
60178
|
+
try {
|
|
60179
|
+
const command = getCommand({ config, assertIsValid });
|
|
60180
|
+
const overrides = getOverridesForLegacyRequestContext(requestContext);
|
|
60181
|
+
command.execute(overrides).then((result) => {
|
|
60182
|
+
const consumerEmittedData = {
|
|
60183
|
+
data: void 0,
|
|
60184
|
+
errors: void 0
|
|
60185
|
+
};
|
|
60186
|
+
if (result.isOk()) {
|
|
60187
|
+
deepFreeze(result.value);
|
|
60188
|
+
consumerEmittedData.data = result.value.data.data;
|
|
60189
|
+
unsubscribe = result.value.subscribe(
|
|
60190
|
+
(res) => {
|
|
60191
|
+
handleEmit(res, callback);
|
|
60192
|
+
}
|
|
60193
|
+
);
|
|
60194
|
+
} else {
|
|
60195
|
+
const { data, errors } = toGraphQLResponseFromFailure$1(
|
|
60196
|
+
result.error.failure
|
|
60197
|
+
);
|
|
60198
|
+
consumerEmittedData.data = data;
|
|
60199
|
+
consumerEmittedData.errors = errors;
|
|
60200
|
+
unsubscribe = result.error.subscribe(
|
|
60201
|
+
(res) => {
|
|
60202
|
+
handleEmit(res, callback);
|
|
60203
|
+
}
|
|
60204
|
+
);
|
|
60205
|
+
}
|
|
60206
|
+
callback(consumerEmittedData);
|
|
60207
|
+
});
|
|
60208
|
+
} catch (error) {
|
|
60209
|
+
callback(toGraphQLErrorResponse(error));
|
|
60210
|
+
}
|
|
60216
60211
|
return () => {
|
|
60217
60212
|
unsubscribe();
|
|
60218
60213
|
};
|
|
@@ -60255,13 +60250,7 @@ class GraphQLMutationBindingsService {
|
|
|
60255
60250
|
return toGraphQLResponseFromFailure$1(result.error.failure);
|
|
60256
60251
|
}
|
|
60257
60252
|
} catch (error) {
|
|
60258
|
-
|
|
60259
|
-
return {
|
|
60260
|
-
data: void 0,
|
|
60261
|
-
errors: [
|
|
60262
|
-
{ message: "Internal error in GraphQL adapter occurred", locations: [] }
|
|
60263
|
-
]
|
|
60264
|
-
};
|
|
60253
|
+
return toGraphQLErrorResponse(error);
|
|
60265
60254
|
}
|
|
60266
60255
|
};
|
|
60267
60256
|
}
|
|
@@ -60421,6 +60410,10 @@ class CommandWireAdapterConstructor {
|
|
|
60421
60410
|
if (isIncompleteConfigError(err)) {
|
|
60422
60411
|
return;
|
|
60423
60412
|
}
|
|
60413
|
+
if (err instanceof JsonSchemaViolationError) {
|
|
60414
|
+
this.handleConfigSchemaViolation(err);
|
|
60415
|
+
return;
|
|
60416
|
+
}
|
|
60424
60417
|
throw err;
|
|
60425
60418
|
}
|
|
60426
60419
|
}
|
|
@@ -60473,6 +60466,16 @@ class CommandWireAdapterConstructor {
|
|
|
60473
60466
|
handleExecutionThrow(error) {
|
|
60474
60467
|
emitError(this.callback, error);
|
|
60475
60468
|
}
|
|
60469
|
+
/**
|
|
60470
|
+
* Hook for subclasses to handle a JsonSchemaViolationError from the config
|
|
60471
|
+
* schema assertion. The default re-throws so legacy non-GraphQL wire
|
|
60472
|
+
* adapters keep their existing throw behavior. Overrides are expected to
|
|
60473
|
+
* either emit an error result or re-throw — silently returning will
|
|
60474
|
+
* swallow the error.
|
|
60475
|
+
*/
|
|
60476
|
+
handleConfigSchemaViolation(error) {
|
|
60477
|
+
throw error;
|
|
60478
|
+
}
|
|
60476
60479
|
unsubscribe() {
|
|
60477
60480
|
if (this.unsubscriber) {
|
|
60478
60481
|
this.unsubscriber();
|
|
@@ -60565,16 +60568,14 @@ class GraphQLCommandWireAdapterConstructor extends CommandWireAdapterConstructor
|
|
|
60565
60568
|
this.callback(consumerEmittedData);
|
|
60566
60569
|
}
|
|
60567
60570
|
} catch (e) {
|
|
60568
|
-
logError$1(e);
|
|
60569
60571
|
this.handleExecutionThrow(e);
|
|
60570
60572
|
}
|
|
60571
60573
|
}
|
|
60572
|
-
handleExecutionThrow(
|
|
60573
|
-
|
|
60574
|
-
|
|
60575
|
-
|
|
60576
|
-
|
|
60577
|
-
});
|
|
60574
|
+
handleExecutionThrow(error) {
|
|
60575
|
+
this.callback(toGraphQLErrorResponse(error));
|
|
60576
|
+
}
|
|
60577
|
+
handleConfigSchemaViolation(error) {
|
|
60578
|
+
this.handleExecutionThrow(error);
|
|
60578
60579
|
}
|
|
60579
60580
|
update(config, _context) {
|
|
60580
60581
|
this.unsubscribe();
|
|
@@ -61226,9 +61227,11 @@ class NimbusDurableCacheInclusionPolicy extends DurableCacheInclusionPolicy {
|
|
|
61226
61227
|
return entries.length > 0 ? this.store.setEntries(entries) : Promise.resolve();
|
|
61227
61228
|
}
|
|
61228
61229
|
find(_query) {
|
|
61230
|
+
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
61229
61231
|
throw new Error('find not supported on the NimbusDurableCacheInclusionPolicy');
|
|
61230
61232
|
}
|
|
61231
61233
|
findAndModify(_query, _cacheUpdate) {
|
|
61234
|
+
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
61232
61235
|
throw new Error('findAndModify not supported on the NimbusDurableCacheInclusionPolicy');
|
|
61233
61236
|
}
|
|
61234
61237
|
registerListener() {
|
|
@@ -61254,7 +61257,7 @@ class NimbusDurableCacheInclusionPolicy extends DurableCacheInclusionPolicy {
|
|
|
61254
61257
|
});
|
|
61255
61258
|
});
|
|
61256
61259
|
}
|
|
61257
|
-
// TODO: onestore doesnt support cache eviction yet
|
|
61260
|
+
// TODO [W-19368859]: onestore doesnt support cache eviction yet
|
|
61258
61261
|
// if (evictKeys.size > 0) {
|
|
61259
61262
|
// evictKeys.forEach((key) => {
|
|
61260
61263
|
// this.services.cache.evict(key);
|
|
@@ -61349,6 +61352,7 @@ class NimbusSqliteOneStoreCache {
|
|
|
61349
61352
|
batchQuery(operations) {
|
|
61350
61353
|
return new Promise((resolve, reject) => {
|
|
61351
61354
|
this.sqlStore.batchOperations(operations, (error) => {
|
|
61355
|
+
// eslint-disable-next-line no-unused-expressions
|
|
61352
61356
|
error ? reject(error) : resolve();
|
|
61353
61357
|
});
|
|
61354
61358
|
});
|
|
@@ -61424,7 +61428,7 @@ function initializeOneStore(sqliteStore, luvio) {
|
|
|
61424
61428
|
buildServiceDescriptor$7(),
|
|
61425
61429
|
buildServiceDescriptor$1$1(),
|
|
61426
61430
|
buildServiceDescriptor$2(),
|
|
61427
|
-
// TODO[
|
|
61431
|
+
// TODO [W-18753648]: See note above.
|
|
61428
61432
|
// buildStreamingCommandServiceDescriptor(),
|
|
61429
61433
|
// buildNdJsonServiceDescriptor(),
|
|
61430
61434
|
// buildSseCommandServiceDescriptor(),
|
|
@@ -61686,4 +61690,4 @@ register({
|
|
|
61686
61690
|
});
|
|
61687
61691
|
|
|
61688
61692
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
|
|
61689
|
-
// version: 1.
|
|
61693
|
+
// version: 1.434.0-d8deb0d4ea
|
|
@@ -31,7 +31,6 @@ export interface RecordFieldTrie {
|
|
|
31
31
|
}
|
|
32
32
|
export interface TrackedFieldsConfig {
|
|
33
33
|
maxDepth: number;
|
|
34
|
-
onlyFetchLeafNodeIdAndName: boolean;
|
|
35
34
|
}
|
|
36
35
|
export declare function isGraphNode(node: ProxyGraphNode<unknown>): node is GraphNode<unknown>;
|
|
37
36
|
export declare function extractTrackedFieldsToTrie(recordId: string | NormalizedKeyMetadata, node: ProxyGraphNode<FieldMapRepresentationNormalized, FieldMapRepresentation>, root: RecordFieldTrie): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AbstractResourceRequestActionHandler } from '../AbstractResourceRequestActionHandler';
|
|
2
|
-
import { QuickActionExecutionRepresentation } from '@salesforce/lds-adapters-uiapi';
|
|
3
|
-
import { NetworkAdapter, ResourceRequest } from '@luvio/engine';
|
|
4
|
-
import { DraftAction, DraftQueue, PendingDraftAction } from '@salesforce/lds-drafts';
|
|
5
|
-
import { Luvio } from '@luvio/engine';
|
|
6
|
-
import { UiApiDraftRecordService } from '../UiApiDraftRecordService';
|
|
2
|
+
import type { QuickActionExecutionRepresentation } from '@salesforce/lds-adapters-uiapi';
|
|
3
|
+
import type { NetworkAdapter, ResourceRequest } from '@luvio/engine';
|
|
4
|
+
import type { DraftAction, DraftQueue, PendingDraftAction } from '@salesforce/lds-drafts';
|
|
5
|
+
import type { Luvio } from '@luvio/engine';
|
|
6
|
+
import type { UiApiDraftRecordService } from '../UiApiDraftRecordService';
|
|
7
7
|
export declare abstract class AbstractQuickActionHandler extends AbstractResourceRequestActionHandler<QuickActionExecutionRepresentation> {
|
|
8
8
|
constructor(draftQueue: DraftQueue, networkAdapter: NetworkAdapter, getLuvio: () => Luvio, recordService: UiApiDraftRecordService);
|
|
9
9
|
buildPendingAction(request: ResourceRequest, queue: DraftAction<unknown, unknown>[]): Promise<PendingDraftAction<ResourceRequest>>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { CompletedDraftAction, QueueOperation, DraftAction, DraftQueue } from '@salesforce/lds-drafts';
|
|
2
2
|
import { AbstractQuickActionHandler } from './AbstractQuickActionHandler';
|
|
3
|
-
import type { PerformActionInputRepresentation, QuickActionExecutionRepresentation, RecordRepresentation } from '@salesforce/lds-adapters-uiapi';
|
|
4
|
-
import { GetRecordConfig } from '@salesforce/lds-adapters-uiapi';
|
|
3
|
+
import type { PerformActionInputRepresentation, QuickActionExecutionRepresentation, RecordRepresentation, GetRecordConfig } from '@salesforce/lds-adapters-uiapi';
|
|
5
4
|
import type { DurableStoreKeyMetadataMap, Luvio, NetworkAdapter, ResourceRequest, Adapter } from '@luvio/engine';
|
|
6
5
|
import type { UiApiDraftRecordService } from '../UiApiDraftRecordService';
|
|
7
6
|
import type { RecordEffectingHandler } from '../records/actionHandlers/RecordEffectingHandler';
|
|
8
7
|
import { type SideEffectService } from '../sideEffects/SideEffectService';
|
|
9
8
|
import { type SideEffect } from '../sideEffects';
|
|
10
|
-
import { ObjectInfoService } from './../../utils/ObjectInfoService';
|
|
9
|
+
import type { ObjectInfoService } from './../../utils/ObjectInfoService';
|
|
11
10
|
export declare const QUICK_ACTION_HANDLER = "QUICK_ACTION_HANDLER";
|
|
12
11
|
interface PerformQuickActionResourceRequest extends Omit<ResourceRequest, 'body' | 'method'> {
|
|
13
12
|
body: PerformActionInputRepresentation;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DraftAwareUpdateRecordAdapter } from '@salesforce/lds-adapters-uiapi';
|
|
2
2
|
import type { UiApiActionHandler } from '../actionHandlers/UiApiRecordActionHandler';
|
|
3
3
|
import type { DurableRecordStore } from 'src/durableStore/DurableRecordStore';
|
|
4
|
-
import { ObjectInfoService } from '../../../utils/ObjectInfoService';
|
|
4
|
+
import type { ObjectInfoService } from '../../../utils/ObjectInfoService';
|
|
5
5
|
/**
|
|
6
6
|
* @param luvio The runtime's luvio instance
|
|
7
7
|
* @param actionHandler The UIAPI Record action handler. NOTE: this adapter doesn't
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SqliteStorePlugin } from '@salesforce/nimbus-plugin-lds';
|
|
2
|
-
import { Luvio } from '@luvio/engine';
|
|
1
|
+
import type { SqliteStorePlugin } from '@salesforce/nimbus-plugin-lds';
|
|
2
|
+
import type { Luvio } from '@luvio/engine';
|
|
3
3
|
export declare function initializeOneStore(sqliteStore: SqliteStorePlugin, luvio: Luvio): void;
|
|
4
4
|
/**
|
|
5
5
|
* Manually purges the OneStore cache by days.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type CacheInclusionPolicyServiceDescriptor, type CacheQuery, type CacheUpdate, DurableCacheInclusionPolicy } from '@conduit-client/service-cache-inclusion-policy/v1';
|
|
2
2
|
import type { Cache, CacheEntry, Key, NamedCacheService } from '@conduit-client/service-cache/v1';
|
|
3
3
|
import { type DeepReadonly, type SyncOrAsync } from '@conduit-client/utils';
|
|
4
|
-
import { NimbusSqliteOneStoreCache } from './nimbusSqliteStoreCache';
|
|
4
|
+
import type { NimbusSqliteOneStoreCache } from './nimbusSqliteStoreCache';
|
|
5
5
|
export declare class NimbusDurableCacheInclusionPolicy extends DurableCacheInclusionPolicy {
|
|
6
6
|
private readonly services;
|
|
7
7
|
private readonly store;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IFetchService } from '@conduit-client/service-fetch-network/v1';
|
|
1
|
+
import type { IFetchService } from '@conduit-client/service-fetch-network/v1';
|
|
2
2
|
import { type ServiceDescriptor } from '@conduit-client/utils';
|
|
3
3
|
export declare function buildNimbusFetchServiceDescriptor(): ServiceDescriptor<IFetchService, 'fetch', '1.0'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SideEffect } from '../drafts/sideEffects';
|
|
1
|
+
import type { SideEffect } from '../drafts/sideEffects';
|
|
2
2
|
import type { CreateSideEffectHook, DeleteSideEffectHook, UpdateSideEffectHook } from '../drafts/records/actionHandlers/SideEffectHook';
|
|
3
|
-
import { DurableRecordStore } from '../durableStore/DurableRecordStore';
|
|
3
|
+
import type { DurableRecordStore } from '../durableStore/DurableRecordStore';
|
|
4
4
|
export declare const instrumentation: any;
|
|
5
5
|
export declare class ProductConsumedCreatedHook implements CreateSideEffectHook {
|
|
6
6
|
on: 'post';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DurableRecordStore } from '../durableStore/DurableRecordStore';
|
|
1
|
+
import type { DurableRecordStore } from '../durableStore/DurableRecordStore';
|
|
2
2
|
import type { SideEffectHook } from '../drafts/records/actionHandlers/SideEffectHook';
|
|
3
3
|
export declare function createSfsSideEffectHooks(durableRecordStore: DurableRecordStore): SideEffectHook[];
|