@salesforce/lds-worker-api 1.114.2 → 1.114.5
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.
|
@@ -747,4 +747,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
747
747
|
}
|
|
748
748
|
|
|
749
749
|
export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
|
|
750
|
-
// version: 1.114.
|
|
750
|
+
// version: 1.114.5-f719a4bce
|
|
@@ -3776,7 +3776,7 @@ function withDefaultLuvio(callback) {
|
|
|
3776
3776
|
}
|
|
3777
3777
|
callbacks.push(callback);
|
|
3778
3778
|
}
|
|
3779
|
-
// version: 1.114.
|
|
3779
|
+
// version: 1.114.5-f719a4bce
|
|
3780
3780
|
|
|
3781
3781
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
3782
3782
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15200,7 +15200,7 @@ function parseAndVisit(source) {
|
|
|
15200
15200
|
updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
|
|
15201
15201
|
return luvioDocumentNode;
|
|
15202
15202
|
}
|
|
15203
|
-
// version: 1.114.
|
|
15203
|
+
// version: 1.114.5-f719a4bce
|
|
15204
15204
|
|
|
15205
15205
|
function unwrap(data) {
|
|
15206
15206
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16113,7 +16113,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
16113
16113
|
const { apiFamily, name } = metadata;
|
|
16114
16114
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16115
16115
|
}
|
|
16116
|
-
// version: 1.114.
|
|
16116
|
+
// version: 1.114.5-f719a4bce
|
|
16117
16117
|
|
|
16118
16118
|
/**
|
|
16119
16119
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -19977,15 +19977,24 @@ function createFieldsIngestSuccess$3(params) {
|
|
|
19977
19977
|
|
|
19978
19978
|
function fulfill(existing, incoming) {
|
|
19979
19979
|
// early out if incoming isn't a request only for fields and optionalFields
|
|
19980
|
-
const { queryParams, headers, basePath, baseUri } = incoming;
|
|
19981
|
-
const { basePath: existingBasePath, baseUri: existingBaseUri, headers: existingHeaders, } = existing;
|
|
19980
|
+
const { queryParams, headers, basePath, baseUri, urlParams } = incoming;
|
|
19981
|
+
const { basePath: existingBasePath, baseUri: existingBaseUri, headers: existingHeaders, urlParams: existingUrlParams, } = existing;
|
|
19982
19982
|
const path = `${baseUri}${basePath}`;
|
|
19983
|
-
const existingPath = `${
|
|
19983
|
+
const existingPath = `${existingBaseUri}${existingBasePath}`;
|
|
19984
19984
|
if (queryParams.layoutTypes !== undefined) {
|
|
19985
19985
|
return false;
|
|
19986
19986
|
}
|
|
19987
19987
|
if (existingPath !== path) {
|
|
19988
|
-
|
|
19988
|
+
// W-11964675 - Correlate an incoming single record request to an existing batch record
|
|
19989
|
+
// request requesting the same single record
|
|
19990
|
+
const incomingUrlRecords = getRecordIdsFromUrlParams(urlParams);
|
|
19991
|
+
const existingUrlRecords = getRecordIdsFromUrlParams(existingUrlParams);
|
|
19992
|
+
const batchRequestWithSingleRequest = isSingleBatchRecordRequest(existingUrlParams) &&
|
|
19993
|
+
isSingleRecordRequest(urlParams) &&
|
|
19994
|
+
incomingUrlRecords[0] === existingUrlRecords[0];
|
|
19995
|
+
if (!batchRequestWithSingleRequest) {
|
|
19996
|
+
return false;
|
|
19997
|
+
}
|
|
19989
19998
|
}
|
|
19990
19999
|
const headersKeys = keys$8(headers);
|
|
19991
20000
|
const headersKeyLength = headersKeys.length;
|
|
@@ -20009,6 +20018,22 @@ function unionFields(fields, optionalFields) {
|
|
|
20009
20018
|
const fieldsArray = isArray$8(fields) ? fields : [];
|
|
20010
20019
|
const optionalFieldsArray = isArray$8(optionalFields) ? optionalFields : [];
|
|
20011
20020
|
return [...fieldsArray, ...optionalFieldsArray];
|
|
20021
|
+
}
|
|
20022
|
+
function getRecordIdsFromUrlParams(urlParams) {
|
|
20023
|
+
if (hasOwnProperty$1.call(urlParams, 'recordId')) {
|
|
20024
|
+
return [urlParams.recordId];
|
|
20025
|
+
}
|
|
20026
|
+
else if (hasOwnProperty$1.call(urlParams, 'recordIds')) {
|
|
20027
|
+
return urlParams.recordIds;
|
|
20028
|
+
}
|
|
20029
|
+
return [];
|
|
20030
|
+
}
|
|
20031
|
+
function isSingleBatchRecordRequest(urlParams) {
|
|
20032
|
+
return (hasOwnProperty$1.call(urlParams, 'recordIds') &&
|
|
20033
|
+
urlParams.recordIds.length === 1);
|
|
20034
|
+
}
|
|
20035
|
+
function isSingleRecordRequest(urlParams) {
|
|
20036
|
+
return hasOwnProperty$1.call(urlParams, 'recordId');
|
|
20012
20037
|
}
|
|
20013
20038
|
|
|
20014
20039
|
const createResourceRequest$10 = function getUiApiRecordsByRecordIdCreateResourceRequest(config) {
|
|
@@ -20315,7 +20340,19 @@ function onResourceError(luvio, config, key, err) {
|
|
|
20315
20340
|
function buildNetworkSnapshot$W(luvio, config, serverRequestCount = 0, options) {
|
|
20316
20341
|
const { request, key, allTrackedFields, resourceParams } = prepareRequest$6(luvio, config);
|
|
20317
20342
|
return luvio.dispatchResourceRequest(request, options).then((response) => {
|
|
20318
|
-
return luvio.handleSuccessResponse(() =>
|
|
20343
|
+
return luvio.handleSuccessResponse(() => {
|
|
20344
|
+
// W-11964675 - Condition to dedupe a very specific set of requests for
|
|
20345
|
+
// Komaci - a batch record request with a single record followed by a single
|
|
20346
|
+
// record request. The fulfill logic sends the same network response, so
|
|
20347
|
+
// there is some TypeScript massaging to extract the RecordRepresentation
|
|
20348
|
+
if (isSingleBatchRecordResponse(response.body)) {
|
|
20349
|
+
let recordResponse = response;
|
|
20350
|
+
recordResponse.body = response.body.results[0]
|
|
20351
|
+
.result;
|
|
20352
|
+
return onResourceSuccess(luvio, config, key, allTrackedFields, recordResponse, serverRequestCount + 1);
|
|
20353
|
+
}
|
|
20354
|
+
return onResourceSuccess(luvio, config, key, allTrackedFields, response, serverRequestCount + 1);
|
|
20355
|
+
}, () => getResponseCacheKeys$S(luvio, resourceParams, response.body));
|
|
20319
20356
|
}, (err) => {
|
|
20320
20357
|
return luvio.handleErrorResponse(() => {
|
|
20321
20358
|
return onResourceError(luvio, config, key, err);
|
|
@@ -20354,6 +20391,10 @@ function buildNetworkSnapshotCachePolicy$K(context, coercedAdapterRequestContext
|
|
|
20354
20391
|
}
|
|
20355
20392
|
function getRecordByFields(luvio, config, requestContext) {
|
|
20356
20393
|
return luvio.applyCachePolicy(requestContext || {}, { config, luvio }, buildCachedSnapshotCachePolicy$J, buildNetworkSnapshotCachePolicy$K);
|
|
20394
|
+
}
|
|
20395
|
+
function isSingleBatchRecordResponse(response) {
|
|
20396
|
+
return (isArray$8(response.results) &&
|
|
20397
|
+
response.results.length === 1);
|
|
20357
20398
|
}
|
|
20358
20399
|
|
|
20359
20400
|
const VERSION$13 = "98cce53b8d13b1883d001bbdaab24383";
|
|
@@ -44306,7 +44347,7 @@ withDefaultLuvio((luvio) => {
|
|
|
44306
44347
|
dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
|
|
44307
44348
|
});
|
|
44308
44349
|
});
|
|
44309
|
-
// version: 1.114.
|
|
44350
|
+
// version: 1.114.5-f7ec91a8d
|
|
44310
44351
|
|
|
44311
44352
|
var caseSensitiveUserId = '005B0000000GR4OIAW';
|
|
44312
44353
|
|
|
@@ -49527,11 +49568,11 @@ class DurableDraftQueue {
|
|
|
49527
49568
|
mergeActions(targetActionId, sourceActionId) {
|
|
49528
49569
|
// ids must be unique
|
|
49529
49570
|
if (targetActionId === sourceActionId) {
|
|
49530
|
-
return Promise.reject(new Error('
|
|
49571
|
+
return Promise.reject(new Error('targetActionId and sourceActionId cannot be the same.'));
|
|
49531
49572
|
}
|
|
49532
49573
|
// cannot have a replace action already in progress
|
|
49533
49574
|
if (this.replacingAction !== undefined) {
|
|
49534
|
-
return Promise.reject(new Error('Cannot
|
|
49575
|
+
return Promise.reject(new Error('Cannot merge actions while a replace/merge action operation is in progress.'));
|
|
49535
49576
|
}
|
|
49536
49577
|
this.stopQueueManually();
|
|
49537
49578
|
const promise = this.getQueueActions().then(async (actions) => {
|
|
@@ -49539,13 +49580,13 @@ class DurableDraftQueue {
|
|
|
49539
49580
|
if (target === undefined) {
|
|
49540
49581
|
this.replacingAction = undefined;
|
|
49541
49582
|
await this.startQueueSafe();
|
|
49542
|
-
throw Error('
|
|
49583
|
+
throw Error('targetActionId not found in the draft queue.');
|
|
49543
49584
|
}
|
|
49544
49585
|
const source = actions.find((action) => action.id === sourceActionId);
|
|
49545
49586
|
if (source === undefined) {
|
|
49546
49587
|
this.replacingAction = undefined;
|
|
49547
49588
|
await this.startQueueSafe();
|
|
49548
|
-
throw Error('
|
|
49589
|
+
throw Error('sourceActionId not found in the draft queue.');
|
|
49549
49590
|
}
|
|
49550
49591
|
// put in a try/finally block so we don't leave this.replacingAction
|
|
49551
49592
|
// indefinitely set
|
|
@@ -55893,28 +55934,28 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
55893
55934
|
const { method: sourceMethod, body: sourceBody } = sourceData;
|
|
55894
55935
|
// pre-requisites
|
|
55895
55936
|
if (targetCacheKey !== sourceCacheKey) {
|
|
55896
|
-
throw Error('Cannot merge actions for different targetIds');
|
|
55937
|
+
throw Error('Cannot merge actions for different targetIds.');
|
|
55897
55938
|
}
|
|
55898
55939
|
if (targetTag !== sourceTag) {
|
|
55899
|
-
throw Error('Cannot merge actions for different tags');
|
|
55940
|
+
throw Error('Cannot merge actions for different tags.');
|
|
55900
55941
|
}
|
|
55901
55942
|
if (targetStatus === DraftActionStatus.Completed ||
|
|
55902
55943
|
targetStatus === DraftActionStatus.Uploading) {
|
|
55903
|
-
throw Error(`
|
|
55944
|
+
throw Error(`Cannot merge actions when targetAction is in ${targetStatus} status.`);
|
|
55904
55945
|
}
|
|
55905
55946
|
if (sourceStatus === DraftActionStatus.Completed ||
|
|
55906
55947
|
sourceStatus === DraftActionStatus.Uploading) {
|
|
55907
|
-
throw Error(`
|
|
55948
|
+
throw Error(`Cannot merge actions when sourceAction is in ${sourceStatus} status.`);
|
|
55908
55949
|
}
|
|
55909
55950
|
if (targetMethod.toLowerCase() === 'delete' || sourceMethod.toLowerCase() === 'delete') {
|
|
55910
|
-
throw Error('
|
|
55951
|
+
throw Error('Cannot merge DELETE actions.');
|
|
55911
55952
|
}
|
|
55912
55953
|
if (targetMethod.toLowerCase() === 'patch' && sourceMethod.toLowerCase() === 'post') {
|
|
55913
55954
|
// overlaying a POST over a PATCH is not supported
|
|
55914
|
-
throw Error('
|
|
55955
|
+
throw Error('Cannot merge a POST action over top of a PATCH action.');
|
|
55915
55956
|
}
|
|
55916
55957
|
if (targetVersion !== sourceVersion) {
|
|
55917
|
-
throw Error('
|
|
55958
|
+
throw Error('Cannot merge actions with different versions.');
|
|
55918
55959
|
}
|
|
55919
55960
|
// overlay top-level properties, maintain target's timestamp and id
|
|
55920
55961
|
const merged = {
|
|
@@ -59798,7 +59839,7 @@ register({
|
|
|
59798
59839
|
id: '@salesforce/lds-network-adapter',
|
|
59799
59840
|
instrument: instrument$1,
|
|
59800
59841
|
});
|
|
59801
|
-
// version: 1.114.
|
|
59842
|
+
// version: 1.114.5-f719a4bce
|
|
59802
59843
|
|
|
59803
59844
|
const { create: create$2, keys: keys$2 } = Object;
|
|
59804
59845
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -77524,7 +77565,7 @@ register({
|
|
|
77524
77565
|
configuration: { ...configurationForGraphQLAdapters },
|
|
77525
77566
|
instrument,
|
|
77526
77567
|
});
|
|
77527
|
-
// version: 1.114.
|
|
77568
|
+
// version: 1.114.5-f7ec91a8d
|
|
77528
77569
|
|
|
77529
77570
|
// On core the unstable adapters are re-exported with different names,
|
|
77530
77571
|
|
|
@@ -79653,7 +79694,7 @@ withDefaultLuvio((luvio) => {
|
|
|
79653
79694
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
79654
79695
|
graphQLImperative = ldsAdapter;
|
|
79655
79696
|
});
|
|
79656
|
-
// version: 1.114.
|
|
79697
|
+
// version: 1.114.5-f7ec91a8d
|
|
79657
79698
|
|
|
79658
79699
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
79659
79700
|
__proto__: null,
|
|
@@ -80331,4 +80372,4 @@ const { luvio } = getRuntime();
|
|
|
80331
80372
|
setDefaultLuvio({ luvio });
|
|
80332
80373
|
|
|
80333
80374
|
export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
|
|
80334
|
-
// version: 1.114.
|
|
80375
|
+
// version: 1.114.5-f719a4bce
|
|
@@ -3782,7 +3782,7 @@
|
|
|
3782
3782
|
}
|
|
3783
3783
|
callbacks.push(callback);
|
|
3784
3784
|
}
|
|
3785
|
-
// version: 1.114.
|
|
3785
|
+
// version: 1.114.5-f719a4bce
|
|
3786
3786
|
|
|
3787
3787
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
3788
3788
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15206,7 +15206,7 @@
|
|
|
15206
15206
|
updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
|
|
15207
15207
|
return luvioDocumentNode;
|
|
15208
15208
|
}
|
|
15209
|
-
// version: 1.114.
|
|
15209
|
+
// version: 1.114.5-f719a4bce
|
|
15210
15210
|
|
|
15211
15211
|
function unwrap(data) {
|
|
15212
15212
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16119,7 +16119,7 @@
|
|
|
16119
16119
|
const { apiFamily, name } = metadata;
|
|
16120
16120
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16121
16121
|
}
|
|
16122
|
-
// version: 1.114.
|
|
16122
|
+
// version: 1.114.5-f719a4bce
|
|
16123
16123
|
|
|
16124
16124
|
/**
|
|
16125
16125
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -19983,15 +19983,24 @@
|
|
|
19983
19983
|
|
|
19984
19984
|
function fulfill(existing, incoming) {
|
|
19985
19985
|
// early out if incoming isn't a request only for fields and optionalFields
|
|
19986
|
-
const { queryParams, headers, basePath, baseUri } = incoming;
|
|
19987
|
-
const { basePath: existingBasePath, baseUri: existingBaseUri, headers: existingHeaders, } = existing;
|
|
19986
|
+
const { queryParams, headers, basePath, baseUri, urlParams } = incoming;
|
|
19987
|
+
const { basePath: existingBasePath, baseUri: existingBaseUri, headers: existingHeaders, urlParams: existingUrlParams, } = existing;
|
|
19988
19988
|
const path = `${baseUri}${basePath}`;
|
|
19989
|
-
const existingPath = `${
|
|
19989
|
+
const existingPath = `${existingBaseUri}${existingBasePath}`;
|
|
19990
19990
|
if (queryParams.layoutTypes !== undefined) {
|
|
19991
19991
|
return false;
|
|
19992
19992
|
}
|
|
19993
19993
|
if (existingPath !== path) {
|
|
19994
|
-
|
|
19994
|
+
// W-11964675 - Correlate an incoming single record request to an existing batch record
|
|
19995
|
+
// request requesting the same single record
|
|
19996
|
+
const incomingUrlRecords = getRecordIdsFromUrlParams(urlParams);
|
|
19997
|
+
const existingUrlRecords = getRecordIdsFromUrlParams(existingUrlParams);
|
|
19998
|
+
const batchRequestWithSingleRequest = isSingleBatchRecordRequest(existingUrlParams) &&
|
|
19999
|
+
isSingleRecordRequest(urlParams) &&
|
|
20000
|
+
incomingUrlRecords[0] === existingUrlRecords[0];
|
|
20001
|
+
if (!batchRequestWithSingleRequest) {
|
|
20002
|
+
return false;
|
|
20003
|
+
}
|
|
19995
20004
|
}
|
|
19996
20005
|
const headersKeys = keys$8(headers);
|
|
19997
20006
|
const headersKeyLength = headersKeys.length;
|
|
@@ -20015,6 +20024,22 @@
|
|
|
20015
20024
|
const fieldsArray = isArray$8(fields) ? fields : [];
|
|
20016
20025
|
const optionalFieldsArray = isArray$8(optionalFields) ? optionalFields : [];
|
|
20017
20026
|
return [...fieldsArray, ...optionalFieldsArray];
|
|
20027
|
+
}
|
|
20028
|
+
function getRecordIdsFromUrlParams(urlParams) {
|
|
20029
|
+
if (hasOwnProperty$1.call(urlParams, 'recordId')) {
|
|
20030
|
+
return [urlParams.recordId];
|
|
20031
|
+
}
|
|
20032
|
+
else if (hasOwnProperty$1.call(urlParams, 'recordIds')) {
|
|
20033
|
+
return urlParams.recordIds;
|
|
20034
|
+
}
|
|
20035
|
+
return [];
|
|
20036
|
+
}
|
|
20037
|
+
function isSingleBatchRecordRequest(urlParams) {
|
|
20038
|
+
return (hasOwnProperty$1.call(urlParams, 'recordIds') &&
|
|
20039
|
+
urlParams.recordIds.length === 1);
|
|
20040
|
+
}
|
|
20041
|
+
function isSingleRecordRequest(urlParams) {
|
|
20042
|
+
return hasOwnProperty$1.call(urlParams, 'recordId');
|
|
20018
20043
|
}
|
|
20019
20044
|
|
|
20020
20045
|
const createResourceRequest$10 = function getUiApiRecordsByRecordIdCreateResourceRequest(config) {
|
|
@@ -20321,7 +20346,19 @@
|
|
|
20321
20346
|
function buildNetworkSnapshot$W(luvio, config, serverRequestCount = 0, options) {
|
|
20322
20347
|
const { request, key, allTrackedFields, resourceParams } = prepareRequest$6(luvio, config);
|
|
20323
20348
|
return luvio.dispatchResourceRequest(request, options).then((response) => {
|
|
20324
|
-
return luvio.handleSuccessResponse(() =>
|
|
20349
|
+
return luvio.handleSuccessResponse(() => {
|
|
20350
|
+
// W-11964675 - Condition to dedupe a very specific set of requests for
|
|
20351
|
+
// Komaci - a batch record request with a single record followed by a single
|
|
20352
|
+
// record request. The fulfill logic sends the same network response, so
|
|
20353
|
+
// there is some TypeScript massaging to extract the RecordRepresentation
|
|
20354
|
+
if (isSingleBatchRecordResponse(response.body)) {
|
|
20355
|
+
let recordResponse = response;
|
|
20356
|
+
recordResponse.body = response.body.results[0]
|
|
20357
|
+
.result;
|
|
20358
|
+
return onResourceSuccess(luvio, config, key, allTrackedFields, recordResponse, serverRequestCount + 1);
|
|
20359
|
+
}
|
|
20360
|
+
return onResourceSuccess(luvio, config, key, allTrackedFields, response, serverRequestCount + 1);
|
|
20361
|
+
}, () => getResponseCacheKeys$S(luvio, resourceParams, response.body));
|
|
20325
20362
|
}, (err) => {
|
|
20326
20363
|
return luvio.handleErrorResponse(() => {
|
|
20327
20364
|
return onResourceError(luvio, config, key, err);
|
|
@@ -20360,6 +20397,10 @@
|
|
|
20360
20397
|
}
|
|
20361
20398
|
function getRecordByFields(luvio, config, requestContext) {
|
|
20362
20399
|
return luvio.applyCachePolicy(requestContext || {}, { config, luvio }, buildCachedSnapshotCachePolicy$J, buildNetworkSnapshotCachePolicy$K);
|
|
20400
|
+
}
|
|
20401
|
+
function isSingleBatchRecordResponse(response) {
|
|
20402
|
+
return (isArray$8(response.results) &&
|
|
20403
|
+
response.results.length === 1);
|
|
20363
20404
|
}
|
|
20364
20405
|
|
|
20365
20406
|
const VERSION$13 = "98cce53b8d13b1883d001bbdaab24383";
|
|
@@ -44312,7 +44353,7 @@
|
|
|
44312
44353
|
dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
|
|
44313
44354
|
});
|
|
44314
44355
|
});
|
|
44315
|
-
// version: 1.114.
|
|
44356
|
+
// version: 1.114.5-f7ec91a8d
|
|
44316
44357
|
|
|
44317
44358
|
var caseSensitiveUserId = '005B0000000GR4OIAW';
|
|
44318
44359
|
|
|
@@ -49533,11 +49574,11 @@
|
|
|
49533
49574
|
mergeActions(targetActionId, sourceActionId) {
|
|
49534
49575
|
// ids must be unique
|
|
49535
49576
|
if (targetActionId === sourceActionId) {
|
|
49536
|
-
return Promise.reject(new Error('
|
|
49577
|
+
return Promise.reject(new Error('targetActionId and sourceActionId cannot be the same.'));
|
|
49537
49578
|
}
|
|
49538
49579
|
// cannot have a replace action already in progress
|
|
49539
49580
|
if (this.replacingAction !== undefined) {
|
|
49540
|
-
return Promise.reject(new Error('Cannot
|
|
49581
|
+
return Promise.reject(new Error('Cannot merge actions while a replace/merge action operation is in progress.'));
|
|
49541
49582
|
}
|
|
49542
49583
|
this.stopQueueManually();
|
|
49543
49584
|
const promise = this.getQueueActions().then(async (actions) => {
|
|
@@ -49545,13 +49586,13 @@
|
|
|
49545
49586
|
if (target === undefined) {
|
|
49546
49587
|
this.replacingAction = undefined;
|
|
49547
49588
|
await this.startQueueSafe();
|
|
49548
|
-
throw Error('
|
|
49589
|
+
throw Error('targetActionId not found in the draft queue.');
|
|
49549
49590
|
}
|
|
49550
49591
|
const source = actions.find((action) => action.id === sourceActionId);
|
|
49551
49592
|
if (source === undefined) {
|
|
49552
49593
|
this.replacingAction = undefined;
|
|
49553
49594
|
await this.startQueueSafe();
|
|
49554
|
-
throw Error('
|
|
49595
|
+
throw Error('sourceActionId not found in the draft queue.');
|
|
49555
49596
|
}
|
|
49556
49597
|
// put in a try/finally block so we don't leave this.replacingAction
|
|
49557
49598
|
// indefinitely set
|
|
@@ -55899,28 +55940,28 @@
|
|
|
55899
55940
|
const { method: sourceMethod, body: sourceBody } = sourceData;
|
|
55900
55941
|
// pre-requisites
|
|
55901
55942
|
if (targetCacheKey !== sourceCacheKey) {
|
|
55902
|
-
throw Error('Cannot merge actions for different targetIds');
|
|
55943
|
+
throw Error('Cannot merge actions for different targetIds.');
|
|
55903
55944
|
}
|
|
55904
55945
|
if (targetTag !== sourceTag) {
|
|
55905
|
-
throw Error('Cannot merge actions for different tags');
|
|
55946
|
+
throw Error('Cannot merge actions for different tags.');
|
|
55906
55947
|
}
|
|
55907
55948
|
if (targetStatus === DraftActionStatus.Completed ||
|
|
55908
55949
|
targetStatus === DraftActionStatus.Uploading) {
|
|
55909
|
-
throw Error(`
|
|
55950
|
+
throw Error(`Cannot merge actions when targetAction is in ${targetStatus} status.`);
|
|
55910
55951
|
}
|
|
55911
55952
|
if (sourceStatus === DraftActionStatus.Completed ||
|
|
55912
55953
|
sourceStatus === DraftActionStatus.Uploading) {
|
|
55913
|
-
throw Error(`
|
|
55954
|
+
throw Error(`Cannot merge actions when sourceAction is in ${sourceStatus} status.`);
|
|
55914
55955
|
}
|
|
55915
55956
|
if (targetMethod.toLowerCase() === 'delete' || sourceMethod.toLowerCase() === 'delete') {
|
|
55916
|
-
throw Error('
|
|
55957
|
+
throw Error('Cannot merge DELETE actions.');
|
|
55917
55958
|
}
|
|
55918
55959
|
if (targetMethod.toLowerCase() === 'patch' && sourceMethod.toLowerCase() === 'post') {
|
|
55919
55960
|
// overlaying a POST over a PATCH is not supported
|
|
55920
|
-
throw Error('
|
|
55961
|
+
throw Error('Cannot merge a POST action over top of a PATCH action.');
|
|
55921
55962
|
}
|
|
55922
55963
|
if (targetVersion !== sourceVersion) {
|
|
55923
|
-
throw Error('
|
|
55964
|
+
throw Error('Cannot merge actions with different versions.');
|
|
55924
55965
|
}
|
|
55925
55966
|
// overlay top-level properties, maintain target's timestamp and id
|
|
55926
55967
|
const merged = {
|
|
@@ -59804,7 +59845,7 @@
|
|
|
59804
59845
|
id: '@salesforce/lds-network-adapter',
|
|
59805
59846
|
instrument: instrument$1,
|
|
59806
59847
|
});
|
|
59807
|
-
// version: 1.114.
|
|
59848
|
+
// version: 1.114.5-f719a4bce
|
|
59808
59849
|
|
|
59809
59850
|
const { create: create$2, keys: keys$2 } = Object;
|
|
59810
59851
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -77530,7 +77571,7 @@
|
|
|
77530
77571
|
configuration: { ...configurationForGraphQLAdapters },
|
|
77531
77572
|
instrument,
|
|
77532
77573
|
});
|
|
77533
|
-
// version: 1.114.
|
|
77574
|
+
// version: 1.114.5-f7ec91a8d
|
|
77534
77575
|
|
|
77535
77576
|
// On core the unstable adapters are re-exported with different names,
|
|
77536
77577
|
|
|
@@ -79659,7 +79700,7 @@
|
|
|
79659
79700
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
79660
79701
|
graphQLImperative = ldsAdapter;
|
|
79661
79702
|
});
|
|
79662
|
-
// version: 1.114.
|
|
79703
|
+
// version: 1.114.5-f7ec91a8d
|
|
79663
79704
|
|
|
79664
79705
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
79665
79706
|
__proto__: null,
|
|
@@ -80354,4 +80395,4 @@
|
|
|
80354
80395
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
80355
80396
|
|
|
80356
80397
|
}));
|
|
80357
|
-
// version: 1.114.
|
|
80398
|
+
// version: 1.114.5-f719a4bce
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-worker-api",
|
|
3
|
-
"version": "1.114.
|
|
3
|
+
"version": "1.114.5",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "dist/standalone/umd/lds-worker-api.js",
|
|
@@ -33,19 +33,16 @@
|
|
|
33
33
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-worker-api"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@luvio/adapter-test-library": "0.137.1",
|
|
37
|
-
"@luvio/engine": "0.137.1",
|
|
38
|
-
"@luvio/environments": "0.137.1",
|
|
39
36
|
"@oat-sa/rollup-plugin-wildcard-external": "^0.1.0",
|
|
40
|
-
"@salesforce/lds-adapters-graphql": "
|
|
41
|
-
"@salesforce/lds-adapters-uiapi": "
|
|
42
|
-
"@salesforce/lds-default-luvio": "
|
|
43
|
-
"@salesforce/lds-drafts": "
|
|
44
|
-
"@salesforce/lds-graphql-parser": "
|
|
45
|
-
"@salesforce/lds-luvio-engine": "
|
|
46
|
-
"@salesforce/lds-priming": "
|
|
47
|
-
"@salesforce/lds-runtime-mobile": "
|
|
48
|
-
"@salesforce/nimbus-plugin-lds": "
|
|
37
|
+
"@salesforce/lds-adapters-graphql": "*",
|
|
38
|
+
"@salesforce/lds-adapters-uiapi": "*",
|
|
39
|
+
"@salesforce/lds-default-luvio": "*",
|
|
40
|
+
"@salesforce/lds-drafts": "*",
|
|
41
|
+
"@salesforce/lds-graphql-parser": "*",
|
|
42
|
+
"@salesforce/lds-luvio-engine": "*",
|
|
43
|
+
"@salesforce/lds-priming": "*",
|
|
44
|
+
"@salesforce/lds-runtime-mobile": "*",
|
|
45
|
+
"@salesforce/nimbus-plugin-lds": "*",
|
|
49
46
|
"ajv": "^8.11.0",
|
|
50
47
|
"glob": "^7.1.5",
|
|
51
48
|
"nimbus-types": "^2.0.0-alpha1",
|