@salesforce/lds-worker-api 1.329.0 → 1.330.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.
|
@@ -401,7 +401,13 @@ function invokeAdapterWithDraftToMerge(adapterId, config, targetDraftId, onRespo
|
|
|
401
401
|
draftManager
|
|
402
402
|
.mergeActions(targetDraftId, draftId)
|
|
403
403
|
.then(() => {
|
|
404
|
-
|
|
404
|
+
if (responseValue.data === undefined ||
|
|
405
|
+
responseValue.data.drafts === undefined) {
|
|
406
|
+
onResponse(responseValue);
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
const newResponse = removeDraftNodeActionId(draftId, responseValue);
|
|
410
|
+
onResponse(newResponse);
|
|
405
411
|
})
|
|
406
412
|
.catch((error) => {
|
|
407
413
|
onResponse(convertErrorIntoNativeFetchError(error, `Unknown error merging draft`));
|
|
@@ -586,6 +592,15 @@ function invokeAdapterWithDraftToMergeDeleteRecord(adapter, config, draftIdToRep
|
|
|
586
592
|
}, nativeAdapterRequestContext);
|
|
587
593
|
});
|
|
588
594
|
}
|
|
595
|
+
function removeDraftNodeActionId(targetDraftId, responseValue) {
|
|
596
|
+
const recordDraftsNode = {
|
|
597
|
+
...responseValue.data.drafts,
|
|
598
|
+
draftActionIds: responseValue.data.drafts.draftActionIds.filter((x) => x !== targetDraftId),
|
|
599
|
+
};
|
|
600
|
+
return Object.assign(responseValue, {
|
|
601
|
+
data: { drafts: recordDraftsNode },
|
|
602
|
+
});
|
|
603
|
+
}
|
|
589
604
|
function convertErrorIntoNativeFetchError(error, defaultMessage) {
|
|
590
605
|
let message = defaultMessage;
|
|
591
606
|
if (error instanceof Error) {
|
|
@@ -1106,4 +1121,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1106
1121
|
}
|
|
1107
1122
|
|
|
1108
1123
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
1109
|
-
// version: 1.
|
|
1124
|
+
// version: 1.330.0-29e6947dcf
|
|
@@ -4265,7 +4265,7 @@ function withDefaultLuvio(callback) {
|
|
|
4265
4265
|
}
|
|
4266
4266
|
callbacks.push(callback);
|
|
4267
4267
|
}
|
|
4268
|
-
// version: 1.
|
|
4268
|
+
// version: 1.330.0-29e6947dcf
|
|
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.330.0-29e6947dcf
|
|
5217
5217
|
|
|
5218
5218
|
/**
|
|
5219
5219
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -33850,7 +33850,7 @@ withDefaultLuvio((luvio) => {
|
|
|
33850
33850
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
33851
33851
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
33852
33852
|
});
|
|
33853
|
-
// version: 1.
|
|
33853
|
+
// version: 1.330.0-8c4e36b1fc
|
|
33854
33854
|
|
|
33855
33855
|
/**
|
|
33856
33856
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -79422,8 +79422,8 @@ class AbstractResourceRequestActionHandler {
|
|
|
79422
79422
|
// to be updated
|
|
79423
79423
|
for (const { draftId, draftKey, canonicalId, canonicalKey } of redirects) {
|
|
79424
79424
|
if (basePath.search(draftId) >= 0 || stringifiedBody.search(draftId) >= 0) {
|
|
79425
|
-
basePath = basePath.replace(draftId, canonicalId);
|
|
79426
|
-
stringifiedBody = stringifiedBody.replace(draftId, canonicalId);
|
|
79425
|
+
basePath = basePath.replace(new RegExp(draftId, 'g'), canonicalId);
|
|
79426
|
+
stringifiedBody = stringifiedBody.replace(new RegExp(draftId, 'g'), canonicalId);
|
|
79427
79427
|
queueOperationMutated = true;
|
|
79428
79428
|
}
|
|
79429
79429
|
// if the action is performed on a previous draft id, we need to replace the action
|
|
@@ -92679,7 +92679,7 @@ register$1({
|
|
|
92679
92679
|
id: '@salesforce/lds-network-adapter',
|
|
92680
92680
|
instrument: instrument$2,
|
|
92681
92681
|
});
|
|
92682
|
-
// version: 1.
|
|
92682
|
+
// version: 1.330.0-29e6947dcf
|
|
92683
92683
|
|
|
92684
92684
|
const { create: create$2, keys: keys$2 } = Object;
|
|
92685
92685
|
const { stringify, parse } = JSON;
|
|
@@ -115246,7 +115246,7 @@ register$1({
|
|
|
115246
115246
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
115247
115247
|
instrument: instrument$1,
|
|
115248
115248
|
});
|
|
115249
|
-
// version: 1.
|
|
115249
|
+
// version: 1.330.0-8c4e36b1fc
|
|
115250
115250
|
|
|
115251
115251
|
// On core the unstable adapters are re-exported with different names,
|
|
115252
115252
|
// we want to match them here.
|
|
@@ -115398,7 +115398,7 @@ withDefaultLuvio((luvio) => {
|
|
|
115398
115398
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
115399
115399
|
graphQLImperative = ldsAdapter;
|
|
115400
115400
|
});
|
|
115401
|
-
// version: 1.
|
|
115401
|
+
// version: 1.330.0-8c4e36b1fc
|
|
115402
115402
|
|
|
115403
115403
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
115404
115404
|
__proto__: null,
|
|
@@ -115763,7 +115763,13 @@ function invokeAdapterWithDraftToMerge(adapterId, config, targetDraftId, onRespo
|
|
|
115763
115763
|
draftManager
|
|
115764
115764
|
.mergeActions(targetDraftId, draftId)
|
|
115765
115765
|
.then(() => {
|
|
115766
|
-
|
|
115766
|
+
if (responseValue.data === undefined ||
|
|
115767
|
+
responseValue.data.drafts === undefined) {
|
|
115768
|
+
onResponse(responseValue);
|
|
115769
|
+
return;
|
|
115770
|
+
}
|
|
115771
|
+
const newResponse = removeDraftNodeActionId(draftId, responseValue);
|
|
115772
|
+
onResponse(newResponse);
|
|
115767
115773
|
})
|
|
115768
115774
|
.catch((error) => {
|
|
115769
115775
|
onResponse(convertErrorIntoNativeFetchError(error, `Unknown error merging draft`));
|
|
@@ -115948,6 +115954,15 @@ function invokeAdapterWithDraftToMergeDeleteRecord(adapter, config, draftIdToRep
|
|
|
115948
115954
|
}, nativeAdapterRequestContext);
|
|
115949
115955
|
});
|
|
115950
115956
|
}
|
|
115957
|
+
function removeDraftNodeActionId(targetDraftId, responseValue) {
|
|
115958
|
+
const recordDraftsNode = {
|
|
115959
|
+
...responseValue.data.drafts,
|
|
115960
|
+
draftActionIds: responseValue.data.drafts.draftActionIds.filter((x) => x !== targetDraftId),
|
|
115961
|
+
};
|
|
115962
|
+
return Object.assign(responseValue, {
|
|
115963
|
+
data: { drafts: recordDraftsNode },
|
|
115964
|
+
});
|
|
115965
|
+
}
|
|
115951
115966
|
function convertErrorIntoNativeFetchError(error, defaultMessage) {
|
|
115952
115967
|
let message = defaultMessage;
|
|
115953
115968
|
if (error instanceof Error) {
|
|
@@ -116168,7 +116183,7 @@ const callbacks$1 = [];
|
|
|
116168
116183
|
function register(r) {
|
|
116169
116184
|
callbacks$1.forEach((callback) => callback(r));
|
|
116170
116185
|
}
|
|
116171
|
-
// version: 1.
|
|
116186
|
+
// version: 1.330.0-29e6947dcf
|
|
116172
116187
|
|
|
116173
116188
|
/**
|
|
116174
116189
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -117231,4 +117246,4 @@ const { luvio } = getRuntime();
|
|
|
117231
117246
|
setDefaultLuvio({ luvio });
|
|
117232
117247
|
|
|
117233
117248
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
117234
|
-
// version: 1.
|
|
117249
|
+
// version: 1.330.0-29e6947dcf
|
|
@@ -4271,7 +4271,7 @@
|
|
|
4271
4271
|
}
|
|
4272
4272
|
callbacks.push(callback);
|
|
4273
4273
|
}
|
|
4274
|
-
// version: 1.
|
|
4274
|
+
// version: 1.330.0-29e6947dcf
|
|
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.330.0-29e6947dcf
|
|
5223
5223
|
|
|
5224
5224
|
/**
|
|
5225
5225
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -33856,7 +33856,7 @@
|
|
|
33856
33856
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
33857
33857
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
33858
33858
|
});
|
|
33859
|
-
// version: 1.
|
|
33859
|
+
// version: 1.330.0-8c4e36b1fc
|
|
33860
33860
|
|
|
33861
33861
|
/**
|
|
33862
33862
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -79428,8 +79428,8 @@
|
|
|
79428
79428
|
// to be updated
|
|
79429
79429
|
for (const { draftId, draftKey, canonicalId, canonicalKey } of redirects) {
|
|
79430
79430
|
if (basePath.search(draftId) >= 0 || stringifiedBody.search(draftId) >= 0) {
|
|
79431
|
-
basePath = basePath.replace(draftId, canonicalId);
|
|
79432
|
-
stringifiedBody = stringifiedBody.replace(draftId, canonicalId);
|
|
79431
|
+
basePath = basePath.replace(new RegExp(draftId, 'g'), canonicalId);
|
|
79432
|
+
stringifiedBody = stringifiedBody.replace(new RegExp(draftId, 'g'), canonicalId);
|
|
79433
79433
|
queueOperationMutated = true;
|
|
79434
79434
|
}
|
|
79435
79435
|
// if the action is performed on a previous draft id, we need to replace the action
|
|
@@ -92685,7 +92685,7 @@
|
|
|
92685
92685
|
id: '@salesforce/lds-network-adapter',
|
|
92686
92686
|
instrument: instrument$2,
|
|
92687
92687
|
});
|
|
92688
|
-
// version: 1.
|
|
92688
|
+
// version: 1.330.0-29e6947dcf
|
|
92689
92689
|
|
|
92690
92690
|
const { create: create$2, keys: keys$2 } = Object;
|
|
92691
92691
|
const { stringify, parse } = JSON;
|
|
@@ -115252,7 +115252,7 @@
|
|
|
115252
115252
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
115253
115253
|
instrument: instrument$1,
|
|
115254
115254
|
});
|
|
115255
|
-
// version: 1.
|
|
115255
|
+
// version: 1.330.0-8c4e36b1fc
|
|
115256
115256
|
|
|
115257
115257
|
// On core the unstable adapters are re-exported with different names,
|
|
115258
115258
|
// we want to match them here.
|
|
@@ -115404,7 +115404,7 @@
|
|
|
115404
115404
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
115405
115405
|
graphQLImperative = ldsAdapter;
|
|
115406
115406
|
});
|
|
115407
|
-
// version: 1.
|
|
115407
|
+
// version: 1.330.0-8c4e36b1fc
|
|
115408
115408
|
|
|
115409
115409
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
115410
115410
|
__proto__: null,
|
|
@@ -115769,7 +115769,13 @@
|
|
|
115769
115769
|
draftManager
|
|
115770
115770
|
.mergeActions(targetDraftId, draftId)
|
|
115771
115771
|
.then(() => {
|
|
115772
|
-
|
|
115772
|
+
if (responseValue.data === undefined ||
|
|
115773
|
+
responseValue.data.drafts === undefined) {
|
|
115774
|
+
onResponse(responseValue);
|
|
115775
|
+
return;
|
|
115776
|
+
}
|
|
115777
|
+
const newResponse = removeDraftNodeActionId(draftId, responseValue);
|
|
115778
|
+
onResponse(newResponse);
|
|
115773
115779
|
})
|
|
115774
115780
|
.catch((error) => {
|
|
115775
115781
|
onResponse(convertErrorIntoNativeFetchError(error, `Unknown error merging draft`));
|
|
@@ -115954,6 +115960,15 @@
|
|
|
115954
115960
|
}, nativeAdapterRequestContext);
|
|
115955
115961
|
});
|
|
115956
115962
|
}
|
|
115963
|
+
function removeDraftNodeActionId(targetDraftId, responseValue) {
|
|
115964
|
+
const recordDraftsNode = {
|
|
115965
|
+
...responseValue.data.drafts,
|
|
115966
|
+
draftActionIds: responseValue.data.drafts.draftActionIds.filter((x) => x !== targetDraftId),
|
|
115967
|
+
};
|
|
115968
|
+
return Object.assign(responseValue, {
|
|
115969
|
+
data: { drafts: recordDraftsNode },
|
|
115970
|
+
});
|
|
115971
|
+
}
|
|
115957
115972
|
function convertErrorIntoNativeFetchError(error, defaultMessage) {
|
|
115958
115973
|
let message = defaultMessage;
|
|
115959
115974
|
if (error instanceof Error) {
|
|
@@ -116174,7 +116189,7 @@
|
|
|
116174
116189
|
function register(r) {
|
|
116175
116190
|
callbacks$1.forEach((callback) => callback(r));
|
|
116176
116191
|
}
|
|
116177
|
-
// version: 1.
|
|
116192
|
+
// version: 1.330.0-29e6947dcf
|
|
116178
116193
|
|
|
116179
116194
|
/**
|
|
116180
116195
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -117256,4 +117271,4 @@
|
|
|
117256
117271
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
117257
117272
|
|
|
117258
117273
|
}));
|
|
117259
|
-
// version: 1.
|
|
117274
|
+
// version: 1.330.0-29e6947dcf
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-worker-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.330.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.330.0",
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.330.0",
|
|
40
|
+
"@salesforce/lds-default-luvio": "^1.330.0",
|
|
41
|
+
"@salesforce/lds-drafts": "^1.330.0",
|
|
42
|
+
"@salesforce/lds-graphql-parser": "^1.330.0",
|
|
43
|
+
"@salesforce/lds-luvio-engine": "^1.330.0",
|
|
44
|
+
"@salesforce/lds-runtime-mobile": "^1.330.0",
|
|
45
|
+
"@salesforce/nimbus-plugin-lds": "^1.330.0",
|
|
46
46
|
"ajv": "^8.11.0",
|
|
47
47
|
"glob": "^7.1.5",
|
|
48
48
|
"nimbus-types": "^2.0.0-alpha1",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
{
|
|
55
55
|
"path": "./dist/sfdc/es/ldsWorkerApi.js",
|
|
56
56
|
"maxSize": {
|
|
57
|
-
"none": "
|
|
57
|
+
"none": "46 kB",
|
|
58
58
|
"min": "19.0 kB",
|
|
59
59
|
"compressed": "8 kB"
|
|
60
60
|
}
|