@salesforce/lds-worker-api 1.327.0 → 1.328.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.
|
@@ -446,34 +446,42 @@ function invokeAdapterWithMetadata(adapterId, config, metadata, onResponse, nati
|
|
|
446
446
|
invokeAdapterWithMetadataDeleteRecord(adapter, config, metadata, onResponse, nativeAdapterRequestContext);
|
|
447
447
|
}
|
|
448
448
|
else {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
449
|
+
draftManager.stopQueueWhileRunning(() => {
|
|
450
|
+
return new Promise((resolve) => {
|
|
451
|
+
invokeDmlAdapter(adapter, parse(config), async (responseValue) => {
|
|
452
|
+
const draftIds = draftIdsForResponseValue(responseValue);
|
|
453
|
+
if (responseValue.error === undefined &&
|
|
454
|
+
draftIds !== undefined &&
|
|
455
|
+
draftIds.length > 0) {
|
|
456
|
+
const draftId = draftIds[draftIds.length - 1];
|
|
457
|
+
const managerState = await draftManager.getQueue();
|
|
458
|
+
const draftItem = managerState.items.find((x) => x.id === draftId);
|
|
459
|
+
if (draftItem === undefined) {
|
|
460
|
+
// draftItem no longer exists, might have already been uploaded
|
|
461
|
+
ldsMobileInstrumentation$1.log('tried to set metadata on draft item that no longer exists');
|
|
462
|
+
resolve(responseValue);
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
draftManager
|
|
466
|
+
.setMetadata(draftId, { ...draftItem.metadata, ...metadata })
|
|
467
|
+
.then(() => {
|
|
468
|
+
resolve(responseValue);
|
|
469
|
+
})
|
|
470
|
+
.catch((error) => {
|
|
471
|
+
resolve(convertErrorIntoNativeFetchError(error, 'Unknown error setting metadata'));
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
else {
|
|
475
|
+
let response = responseValue;
|
|
476
|
+
response.error =
|
|
477
|
+
createNativeFetchErrorResponse(NO_DRAFT_CREATED_MESSAGE);
|
|
478
|
+
resolve(response);
|
|
479
|
+
}
|
|
480
|
+
}, nativeAdapterRequestContext);
|
|
481
|
+
}).then((callbackValue) => {
|
|
482
|
+
onResponse(callbackValue);
|
|
483
|
+
});
|
|
484
|
+
});
|
|
477
485
|
}
|
|
478
486
|
}
|
|
479
487
|
/*
|
|
@@ -1098,4 +1106,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1098
1106
|
}
|
|
1099
1107
|
|
|
1100
1108
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
1101
|
-
// version: 1.
|
|
1109
|
+
// version: 1.328.0-f3d79bc783
|
|
@@ -71,7 +71,7 @@ function isUnfulfilledSnapshot$6(snapshot) {
|
|
|
71
71
|
function isPendingSnapshot$1(snapshot) {
|
|
72
72
|
return snapshot.state === SnapshotState$3.Pending;
|
|
73
73
|
}
|
|
74
|
-
function createErrorSnapshot
|
|
74
|
+
function createErrorSnapshot(error, refresh) {
|
|
75
75
|
deepFreeze(error);
|
|
76
76
|
const snap = {
|
|
77
77
|
error,
|
|
@@ -2099,7 +2099,7 @@ const onlyIfCachedImplementation = function (args) {
|
|
|
2099
2099
|
return snapshot;
|
|
2100
2100
|
}
|
|
2101
2101
|
const refresh = snapshot !== undefined ? snapshot.refresh : undefined;
|
|
2102
|
-
return createErrorSnapshot
|
|
2102
|
+
return createErrorSnapshot({
|
|
2103
2103
|
body: undefined,
|
|
2104
2104
|
headers: {},
|
|
2105
2105
|
ok: false,
|
|
@@ -3753,7 +3753,7 @@ class Luvio {
|
|
|
3753
3753
|
return this.environment.createSnapshot(selector, refresh);
|
|
3754
3754
|
}
|
|
3755
3755
|
errorSnapshot(error, refresh) {
|
|
3756
|
-
return createErrorSnapshot
|
|
3756
|
+
return createErrorSnapshot(error, refresh);
|
|
3757
3757
|
}
|
|
3758
3758
|
dispatchResourceRequest(resourceRequest, context) {
|
|
3759
3759
|
let mergedResourceRequest = resourceRequest;
|
|
@@ -4265,7 +4265,7 @@ function withDefaultLuvio(callback) {
|
|
|
4265
4265
|
}
|
|
4266
4266
|
callbacks.push(callback);
|
|
4267
4267
|
}
|
|
4268
|
-
// version: 1.
|
|
4268
|
+
// version: 1.328.0-f3d79bc783
|
|
4269
4269
|
|
|
4270
4270
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4271
4271
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -5213,7 +5213,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
5213
5213
|
const { apiFamily, name } = metadata;
|
|
5214
5214
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
5215
5215
|
}
|
|
5216
|
-
// version: 1.
|
|
5216
|
+
// version: 1.328.0-f3d79bc783
|
|
5217
5217
|
|
|
5218
5218
|
/**
|
|
5219
5219
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -33851,7 +33851,7 @@ withDefaultLuvio((luvio) => {
|
|
|
33851
33851
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
33852
33852
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
33853
33853
|
});
|
|
33854
|
-
// version: 1.
|
|
33854
|
+
// version: 1.328.0-e51e28f7fc
|
|
33855
33855
|
|
|
33856
33856
|
/**
|
|
33857
33857
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -47523,6 +47523,12 @@ class DurableDraftQueue {
|
|
|
47523
47523
|
draftCount: this.draftStore.getCount(),
|
|
47524
47524
|
});
|
|
47525
47525
|
}
|
|
47526
|
+
stopQueueWhileRunning(action) {
|
|
47527
|
+
this.stopQueueManually(true);
|
|
47528
|
+
return action().finally(() => {
|
|
47529
|
+
this.startQueueSafe();
|
|
47530
|
+
});
|
|
47531
|
+
}
|
|
47526
47532
|
/**
|
|
47527
47533
|
* Used to stop the queue within DraftQueue without user interaction
|
|
47528
47534
|
*/
|
|
@@ -48299,6 +48305,14 @@ class DraftManager {
|
|
|
48299
48305
|
stopQueue() {
|
|
48300
48306
|
return this.draftQueue.stopQueue();
|
|
48301
48307
|
}
|
|
48308
|
+
/**
|
|
48309
|
+
* Stops the draft queue manually without notifying the user and then runs the passed action.
|
|
48310
|
+
* After the action is completed it will safely start the queue if the user had set it to be
|
|
48311
|
+
* started.
|
|
48312
|
+
*/
|
|
48313
|
+
stopQueueWhileRunning(action) {
|
|
48314
|
+
return this.draftQueue.stopQueueWhileRunning(action);
|
|
48315
|
+
}
|
|
48302
48316
|
/**
|
|
48303
48317
|
* Subscribes the listener to changes to the draft queue.
|
|
48304
48318
|
*
|
|
@@ -86680,18 +86694,6 @@ function createSeenRecords(ids, currentSnapshot) {
|
|
|
86680
86694
|
}
|
|
86681
86695
|
return seenRecords;
|
|
86682
86696
|
}
|
|
86683
|
-
function createErrorSnapshot(result, snapshot) {
|
|
86684
|
-
return {
|
|
86685
|
-
...snapshot,
|
|
86686
|
-
data: undefined,
|
|
86687
|
-
state: 'Error',
|
|
86688
|
-
error: {
|
|
86689
|
-
body: {
|
|
86690
|
-
message: result.errors,
|
|
86691
|
-
},
|
|
86692
|
-
},
|
|
86693
|
-
};
|
|
86694
|
-
}
|
|
86695
86697
|
function createLocalEvalSnapshot(data, seenRecords, recordId, rebuildWithLocalEval, refresh) {
|
|
86696
86698
|
return {
|
|
86697
86699
|
refresh,
|
|
@@ -87209,7 +87211,18 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
|
|
|
87209
87211
|
// currently by design if there are any graphql errors we return an ErrorSnapshot
|
|
87210
87212
|
// partial results are not supported at this time
|
|
87211
87213
|
if (gqlResult.errors !== undefined && gqlResult.errors.length > 0) {
|
|
87212
|
-
|
|
87214
|
+
const errors = gqlResult.errors || [];
|
|
87215
|
+
let responseErrors = errors.map((e) => {
|
|
87216
|
+
return { message: e instanceof Error ? e.message : String(e) };
|
|
87217
|
+
});
|
|
87218
|
+
return {
|
|
87219
|
+
data: undefined,
|
|
87220
|
+
state: 'Error',
|
|
87221
|
+
error: {
|
|
87222
|
+
errorType: 'adapterError',
|
|
87223
|
+
error: responseErrors,
|
|
87224
|
+
},
|
|
87225
|
+
};
|
|
87213
87226
|
}
|
|
87214
87227
|
// if the non-eval'ed snapshot was an error then we return a synthetic
|
|
87215
87228
|
// Fulfilled snapshot (this only happens in this code path if
|
|
@@ -88384,6 +88397,9 @@ class NimbusDraftQueue {
|
|
|
88384
88397
|
stopQueue() {
|
|
88385
88398
|
return Promise.reject(new Error('Cannot call stopQueue from the NimbusDraftQueue'));
|
|
88386
88399
|
}
|
|
88400
|
+
stopQueueWhileRunning(_action) {
|
|
88401
|
+
return Promise.reject(new Error('Cannot call stopQueueWhileRunning from the NimbusDraftQueue'));
|
|
88402
|
+
}
|
|
88387
88403
|
replaceAction(_actionId, _withActionId) {
|
|
88388
88404
|
return Promise.reject(new Error('Cannot call replaceAction from the NimbusDraftQueue'));
|
|
88389
88405
|
}
|
|
@@ -92649,7 +92665,7 @@ register$1({
|
|
|
92649
92665
|
id: '@salesforce/lds-network-adapter',
|
|
92650
92666
|
instrument: instrument$2,
|
|
92651
92667
|
});
|
|
92652
|
-
// version: 1.
|
|
92668
|
+
// version: 1.328.0-f3d79bc783
|
|
92653
92669
|
|
|
92654
92670
|
const { create: create$2, keys: keys$2 } = Object;
|
|
92655
92671
|
const { stringify, parse } = JSON;
|
|
@@ -115216,7 +115232,7 @@ register$1({
|
|
|
115216
115232
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
115217
115233
|
instrument: instrument$1,
|
|
115218
115234
|
});
|
|
115219
|
-
// version: 1.
|
|
115235
|
+
// version: 1.328.0-e51e28f7fc
|
|
115220
115236
|
|
|
115221
115237
|
// On core the unstable adapters are re-exported with different names,
|
|
115222
115238
|
// we want to match them here.
|
|
@@ -115368,7 +115384,7 @@ withDefaultLuvio((luvio) => {
|
|
|
115368
115384
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
115369
115385
|
graphQLImperative = ldsAdapter;
|
|
115370
115386
|
});
|
|
115371
|
-
// version: 1.
|
|
115387
|
+
// version: 1.328.0-e51e28f7fc
|
|
115372
115388
|
|
|
115373
115389
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
115374
115390
|
__proto__: null,
|
|
@@ -115778,34 +115794,42 @@ function invokeAdapterWithMetadata(adapterId, config, metadata, onResponse, nati
|
|
|
115778
115794
|
invokeAdapterWithMetadataDeleteRecord(adapter, config, metadata, onResponse, nativeAdapterRequestContext);
|
|
115779
115795
|
}
|
|
115780
115796
|
else {
|
|
115781
|
-
|
|
115782
|
-
|
|
115783
|
-
|
|
115784
|
-
|
|
115785
|
-
|
|
115786
|
-
|
|
115787
|
-
|
|
115788
|
-
|
|
115789
|
-
|
|
115790
|
-
|
|
115791
|
-
|
|
115792
|
-
|
|
115793
|
-
|
|
115794
|
-
|
|
115795
|
-
|
|
115796
|
-
|
|
115797
|
-
|
|
115798
|
-
|
|
115799
|
-
|
|
115800
|
-
|
|
115801
|
-
|
|
115802
|
-
|
|
115803
|
-
|
|
115804
|
-
|
|
115805
|
-
|
|
115806
|
-
|
|
115807
|
-
|
|
115808
|
-
|
|
115797
|
+
draftManager.stopQueueWhileRunning(() => {
|
|
115798
|
+
return new Promise((resolve) => {
|
|
115799
|
+
invokeDmlAdapter(adapter, parse(config), async (responseValue) => {
|
|
115800
|
+
const draftIds = draftIdsForResponseValue(responseValue);
|
|
115801
|
+
if (responseValue.error === undefined &&
|
|
115802
|
+
draftIds !== undefined &&
|
|
115803
|
+
draftIds.length > 0) {
|
|
115804
|
+
const draftId = draftIds[draftIds.length - 1];
|
|
115805
|
+
const managerState = await draftManager.getQueue();
|
|
115806
|
+
const draftItem = managerState.items.find((x) => x.id === draftId);
|
|
115807
|
+
if (draftItem === undefined) {
|
|
115808
|
+
// draftItem no longer exists, might have already been uploaded
|
|
115809
|
+
ldsMobileInstrumentation$1.log('tried to set metadata on draft item that no longer exists');
|
|
115810
|
+
resolve(responseValue);
|
|
115811
|
+
return;
|
|
115812
|
+
}
|
|
115813
|
+
draftManager
|
|
115814
|
+
.setMetadata(draftId, { ...draftItem.metadata, ...metadata })
|
|
115815
|
+
.then(() => {
|
|
115816
|
+
resolve(responseValue);
|
|
115817
|
+
})
|
|
115818
|
+
.catch((error) => {
|
|
115819
|
+
resolve(convertErrorIntoNativeFetchError(error, 'Unknown error setting metadata'));
|
|
115820
|
+
});
|
|
115821
|
+
}
|
|
115822
|
+
else {
|
|
115823
|
+
let response = responseValue;
|
|
115824
|
+
response.error =
|
|
115825
|
+
createNativeFetchErrorResponse(NO_DRAFT_CREATED_MESSAGE);
|
|
115826
|
+
resolve(response);
|
|
115827
|
+
}
|
|
115828
|
+
}, nativeAdapterRequestContext);
|
|
115829
|
+
}).then((callbackValue) => {
|
|
115830
|
+
onResponse(callbackValue);
|
|
115831
|
+
});
|
|
115832
|
+
});
|
|
115809
115833
|
}
|
|
115810
115834
|
}
|
|
115811
115835
|
/*
|
|
@@ -116130,7 +116154,7 @@ const callbacks$1 = [];
|
|
|
116130
116154
|
function register(r) {
|
|
116131
116155
|
callbacks$1.forEach((callback) => callback(r));
|
|
116132
116156
|
}
|
|
116133
|
-
// version: 1.
|
|
116157
|
+
// version: 1.328.0-f3d79bc783
|
|
116134
116158
|
|
|
116135
116159
|
/**
|
|
116136
116160
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -117193,4 +117217,4 @@ const { luvio } = getRuntime();
|
|
|
117193
117217
|
setDefaultLuvio({ luvio });
|
|
117194
117218
|
|
|
117195
117219
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
117196
|
-
// version: 1.
|
|
117220
|
+
// version: 1.328.0-f3d79bc783
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
function isPendingSnapshot$1(snapshot) {
|
|
78
78
|
return snapshot.state === SnapshotState$3.Pending;
|
|
79
79
|
}
|
|
80
|
-
function createErrorSnapshot
|
|
80
|
+
function createErrorSnapshot(error, refresh) {
|
|
81
81
|
deepFreeze(error);
|
|
82
82
|
const snap = {
|
|
83
83
|
error,
|
|
@@ -2105,7 +2105,7 @@
|
|
|
2105
2105
|
return snapshot;
|
|
2106
2106
|
}
|
|
2107
2107
|
const refresh = snapshot !== undefined ? snapshot.refresh : undefined;
|
|
2108
|
-
return createErrorSnapshot
|
|
2108
|
+
return createErrorSnapshot({
|
|
2109
2109
|
body: undefined,
|
|
2110
2110
|
headers: {},
|
|
2111
2111
|
ok: false,
|
|
@@ -3759,7 +3759,7 @@
|
|
|
3759
3759
|
return this.environment.createSnapshot(selector, refresh);
|
|
3760
3760
|
}
|
|
3761
3761
|
errorSnapshot(error, refresh) {
|
|
3762
|
-
return createErrorSnapshot
|
|
3762
|
+
return createErrorSnapshot(error, refresh);
|
|
3763
3763
|
}
|
|
3764
3764
|
dispatchResourceRequest(resourceRequest, context) {
|
|
3765
3765
|
let mergedResourceRequest = resourceRequest;
|
|
@@ -4271,7 +4271,7 @@
|
|
|
4271
4271
|
}
|
|
4272
4272
|
callbacks.push(callback);
|
|
4273
4273
|
}
|
|
4274
|
-
// version: 1.
|
|
4274
|
+
// version: 1.328.0-f3d79bc783
|
|
4275
4275
|
|
|
4276
4276
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4277
4277
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -5219,7 +5219,7 @@
|
|
|
5219
5219
|
const { apiFamily, name } = metadata;
|
|
5220
5220
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
5221
5221
|
}
|
|
5222
|
-
// version: 1.
|
|
5222
|
+
// version: 1.328.0-f3d79bc783
|
|
5223
5223
|
|
|
5224
5224
|
/**
|
|
5225
5225
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -33857,7 +33857,7 @@
|
|
|
33857
33857
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
33858
33858
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
33859
33859
|
});
|
|
33860
|
-
// version: 1.
|
|
33860
|
+
// version: 1.328.0-e51e28f7fc
|
|
33861
33861
|
|
|
33862
33862
|
/**
|
|
33863
33863
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -47529,6 +47529,12 @@
|
|
|
47529
47529
|
draftCount: this.draftStore.getCount(),
|
|
47530
47530
|
});
|
|
47531
47531
|
}
|
|
47532
|
+
stopQueueWhileRunning(action) {
|
|
47533
|
+
this.stopQueueManually(true);
|
|
47534
|
+
return action().finally(() => {
|
|
47535
|
+
this.startQueueSafe();
|
|
47536
|
+
});
|
|
47537
|
+
}
|
|
47532
47538
|
/**
|
|
47533
47539
|
* Used to stop the queue within DraftQueue without user interaction
|
|
47534
47540
|
*/
|
|
@@ -48305,6 +48311,14 @@
|
|
|
48305
48311
|
stopQueue() {
|
|
48306
48312
|
return this.draftQueue.stopQueue();
|
|
48307
48313
|
}
|
|
48314
|
+
/**
|
|
48315
|
+
* Stops the draft queue manually without notifying the user and then runs the passed action.
|
|
48316
|
+
* After the action is completed it will safely start the queue if the user had set it to be
|
|
48317
|
+
* started.
|
|
48318
|
+
*/
|
|
48319
|
+
stopQueueWhileRunning(action) {
|
|
48320
|
+
return this.draftQueue.stopQueueWhileRunning(action);
|
|
48321
|
+
}
|
|
48308
48322
|
/**
|
|
48309
48323
|
* Subscribes the listener to changes to the draft queue.
|
|
48310
48324
|
*
|
|
@@ -86686,18 +86700,6 @@
|
|
|
86686
86700
|
}
|
|
86687
86701
|
return seenRecords;
|
|
86688
86702
|
}
|
|
86689
|
-
function createErrorSnapshot(result, snapshot) {
|
|
86690
|
-
return {
|
|
86691
|
-
...snapshot,
|
|
86692
|
-
data: undefined,
|
|
86693
|
-
state: 'Error',
|
|
86694
|
-
error: {
|
|
86695
|
-
body: {
|
|
86696
|
-
message: result.errors,
|
|
86697
|
-
},
|
|
86698
|
-
},
|
|
86699
|
-
};
|
|
86700
|
-
}
|
|
86701
86703
|
function createLocalEvalSnapshot(data, seenRecords, recordId, rebuildWithLocalEval, refresh) {
|
|
86702
86704
|
return {
|
|
86703
86705
|
refresh,
|
|
@@ -87215,7 +87217,18 @@
|
|
|
87215
87217
|
// currently by design if there are any graphql errors we return an ErrorSnapshot
|
|
87216
87218
|
// partial results are not supported at this time
|
|
87217
87219
|
if (gqlResult.errors !== undefined && gqlResult.errors.length > 0) {
|
|
87218
|
-
|
|
87220
|
+
const errors = gqlResult.errors || [];
|
|
87221
|
+
let responseErrors = errors.map((e) => {
|
|
87222
|
+
return { message: e instanceof Error ? e.message : String(e) };
|
|
87223
|
+
});
|
|
87224
|
+
return {
|
|
87225
|
+
data: undefined,
|
|
87226
|
+
state: 'Error',
|
|
87227
|
+
error: {
|
|
87228
|
+
errorType: 'adapterError',
|
|
87229
|
+
error: responseErrors,
|
|
87230
|
+
},
|
|
87231
|
+
};
|
|
87219
87232
|
}
|
|
87220
87233
|
// if the non-eval'ed snapshot was an error then we return a synthetic
|
|
87221
87234
|
// Fulfilled snapshot (this only happens in this code path if
|
|
@@ -88390,6 +88403,9 @@
|
|
|
88390
88403
|
stopQueue() {
|
|
88391
88404
|
return Promise.reject(new Error('Cannot call stopQueue from the NimbusDraftQueue'));
|
|
88392
88405
|
}
|
|
88406
|
+
stopQueueWhileRunning(_action) {
|
|
88407
|
+
return Promise.reject(new Error('Cannot call stopQueueWhileRunning from the NimbusDraftQueue'));
|
|
88408
|
+
}
|
|
88393
88409
|
replaceAction(_actionId, _withActionId) {
|
|
88394
88410
|
return Promise.reject(new Error('Cannot call replaceAction from the NimbusDraftQueue'));
|
|
88395
88411
|
}
|
|
@@ -92655,7 +92671,7 @@
|
|
|
92655
92671
|
id: '@salesforce/lds-network-adapter',
|
|
92656
92672
|
instrument: instrument$2,
|
|
92657
92673
|
});
|
|
92658
|
-
// version: 1.
|
|
92674
|
+
// version: 1.328.0-f3d79bc783
|
|
92659
92675
|
|
|
92660
92676
|
const { create: create$2, keys: keys$2 } = Object;
|
|
92661
92677
|
const { stringify, parse } = JSON;
|
|
@@ -115222,7 +115238,7 @@
|
|
|
115222
115238
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
115223
115239
|
instrument: instrument$1,
|
|
115224
115240
|
});
|
|
115225
|
-
// version: 1.
|
|
115241
|
+
// version: 1.328.0-e51e28f7fc
|
|
115226
115242
|
|
|
115227
115243
|
// On core the unstable adapters are re-exported with different names,
|
|
115228
115244
|
// we want to match them here.
|
|
@@ -115374,7 +115390,7 @@
|
|
|
115374
115390
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
115375
115391
|
graphQLImperative = ldsAdapter;
|
|
115376
115392
|
});
|
|
115377
|
-
// version: 1.
|
|
115393
|
+
// version: 1.328.0-e51e28f7fc
|
|
115378
115394
|
|
|
115379
115395
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
115380
115396
|
__proto__: null,
|
|
@@ -115784,34 +115800,42 @@
|
|
|
115784
115800
|
invokeAdapterWithMetadataDeleteRecord(adapter, config, metadata, onResponse, nativeAdapterRequestContext);
|
|
115785
115801
|
}
|
|
115786
115802
|
else {
|
|
115787
|
-
|
|
115788
|
-
|
|
115789
|
-
|
|
115790
|
-
|
|
115791
|
-
|
|
115792
|
-
|
|
115793
|
-
|
|
115794
|
-
|
|
115795
|
-
|
|
115796
|
-
|
|
115797
|
-
|
|
115798
|
-
|
|
115799
|
-
|
|
115800
|
-
|
|
115801
|
-
|
|
115802
|
-
|
|
115803
|
-
|
|
115804
|
-
|
|
115805
|
-
|
|
115806
|
-
|
|
115807
|
-
|
|
115808
|
-
|
|
115809
|
-
|
|
115810
|
-
|
|
115811
|
-
|
|
115812
|
-
|
|
115813
|
-
|
|
115814
|
-
|
|
115803
|
+
draftManager.stopQueueWhileRunning(() => {
|
|
115804
|
+
return new Promise((resolve) => {
|
|
115805
|
+
invokeDmlAdapter(adapter, parse(config), async (responseValue) => {
|
|
115806
|
+
const draftIds = draftIdsForResponseValue(responseValue);
|
|
115807
|
+
if (responseValue.error === undefined &&
|
|
115808
|
+
draftIds !== undefined &&
|
|
115809
|
+
draftIds.length > 0) {
|
|
115810
|
+
const draftId = draftIds[draftIds.length - 1];
|
|
115811
|
+
const managerState = await draftManager.getQueue();
|
|
115812
|
+
const draftItem = managerState.items.find((x) => x.id === draftId);
|
|
115813
|
+
if (draftItem === undefined) {
|
|
115814
|
+
// draftItem no longer exists, might have already been uploaded
|
|
115815
|
+
ldsMobileInstrumentation$1.log('tried to set metadata on draft item that no longer exists');
|
|
115816
|
+
resolve(responseValue);
|
|
115817
|
+
return;
|
|
115818
|
+
}
|
|
115819
|
+
draftManager
|
|
115820
|
+
.setMetadata(draftId, { ...draftItem.metadata, ...metadata })
|
|
115821
|
+
.then(() => {
|
|
115822
|
+
resolve(responseValue);
|
|
115823
|
+
})
|
|
115824
|
+
.catch((error) => {
|
|
115825
|
+
resolve(convertErrorIntoNativeFetchError(error, 'Unknown error setting metadata'));
|
|
115826
|
+
});
|
|
115827
|
+
}
|
|
115828
|
+
else {
|
|
115829
|
+
let response = responseValue;
|
|
115830
|
+
response.error =
|
|
115831
|
+
createNativeFetchErrorResponse(NO_DRAFT_CREATED_MESSAGE);
|
|
115832
|
+
resolve(response);
|
|
115833
|
+
}
|
|
115834
|
+
}, nativeAdapterRequestContext);
|
|
115835
|
+
}).then((callbackValue) => {
|
|
115836
|
+
onResponse(callbackValue);
|
|
115837
|
+
});
|
|
115838
|
+
});
|
|
115815
115839
|
}
|
|
115816
115840
|
}
|
|
115817
115841
|
/*
|
|
@@ -116136,7 +116160,7 @@
|
|
|
116136
116160
|
function register(r) {
|
|
116137
116161
|
callbacks$1.forEach((callback) => callback(r));
|
|
116138
116162
|
}
|
|
116139
|
-
// version: 1.
|
|
116163
|
+
// version: 1.328.0-f3d79bc783
|
|
116140
116164
|
|
|
116141
116165
|
/**
|
|
116142
116166
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -117218,4 +117242,4 @@
|
|
|
117218
117242
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
117219
117243
|
|
|
117220
117244
|
}));
|
|
117221
|
-
// version: 1.
|
|
117245
|
+
// version: 1.328.0-f3d79bc783
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-worker-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.328.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "dist/standalone/es/lds-worker-api.js",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@oat-sa/rollup-plugin-wildcard-external": "^1.0.0",
|
|
38
|
-
"@salesforce/lds-adapters-graphql": "^1.
|
|
39
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
40
|
-
"@salesforce/lds-default-luvio": "^1.
|
|
41
|
-
"@salesforce/lds-drafts": "^1.
|
|
42
|
-
"@salesforce/lds-graphql-parser": "^1.
|
|
43
|
-
"@salesforce/lds-luvio-engine": "^1.
|
|
44
|
-
"@salesforce/lds-runtime-mobile": "^1.
|
|
45
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
38
|
+
"@salesforce/lds-adapters-graphql": "^1.328.0",
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.328.0",
|
|
40
|
+
"@salesforce/lds-default-luvio": "^1.328.0",
|
|
41
|
+
"@salesforce/lds-drafts": "^1.328.0",
|
|
42
|
+
"@salesforce/lds-graphql-parser": "^1.328.0",
|
|
43
|
+
"@salesforce/lds-luvio-engine": "^1.328.0",
|
|
44
|
+
"@salesforce/lds-runtime-mobile": "^1.328.0",
|
|
45
|
+
"@salesforce/nimbus-plugin-lds": "^1.328.0",
|
|
46
46
|
"ajv": "^8.11.0",
|
|
47
47
|
"glob": "^7.1.5",
|
|
48
48
|
"nimbus-types": "^2.0.0-alpha1",
|