@salesforce/lds-worker-api 1.450.0 → 1.451.0-dev10
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.
|
@@ -1373,4 +1373,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1373
1373
|
}
|
|
1374
1374
|
|
|
1375
1375
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, importLuvioAdapterModule, importOneStoreAdapterModule, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
1376
|
-
// version: 1.
|
|
1376
|
+
// version: 1.451.0-dev10-f221dcc990
|
|
@@ -4148,7 +4148,7 @@ function createResourceParamsImpl(config, configMetadata) {
|
|
|
4148
4148
|
}
|
|
4149
4149
|
return resourceParams;
|
|
4150
4150
|
}
|
|
4151
|
-
// engine version: 0.161.
|
|
4151
|
+
// engine version: 0.161.2-bd1bd38a
|
|
4152
4152
|
|
|
4153
4153
|
/**
|
|
4154
4154
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -4276,7 +4276,7 @@ function withDefaultLuvio(callback) {
|
|
|
4276
4276
|
}
|
|
4277
4277
|
callbacks.push(callback);
|
|
4278
4278
|
}
|
|
4279
|
-
// version: 1.
|
|
4279
|
+
// version: 1.451.0-dev10-f221dcc990
|
|
4280
4280
|
|
|
4281
4281
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4282
4282
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -5320,7 +5320,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
5320
5320
|
const { apiFamily, name } = metadata;
|
|
5321
5321
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
5322
5322
|
}
|
|
5323
|
-
// version: 1.
|
|
5323
|
+
// version: 1.451.0-dev10-f221dcc990
|
|
5324
5324
|
|
|
5325
5325
|
function isSupportedEntity(_objectApiName) {
|
|
5326
5326
|
return true;
|
|
@@ -5426,7 +5426,7 @@ var TypeCheckShapes;
|
|
|
5426
5426
|
TypeCheckShapes[TypeCheckShapes["Integer"] = 3] = "Integer";
|
|
5427
5427
|
TypeCheckShapes[TypeCheckShapes["Unsupported"] = 4] = "Unsupported";
|
|
5428
5428
|
})(TypeCheckShapes || (TypeCheckShapes = {}));
|
|
5429
|
-
// engine version: 0.161.
|
|
5429
|
+
// engine version: 0.161.2-bd1bd38a
|
|
5430
5430
|
|
|
5431
5431
|
const { keys: ObjectKeys$4, create: ObjectCreate$4 } = Object;
|
|
5432
5432
|
|
|
@@ -14373,7 +14373,7 @@ function coerceFormFactor$1(form) {
|
|
|
14373
14373
|
return undefined;
|
|
14374
14374
|
}
|
|
14375
14375
|
|
|
14376
|
-
const VERSION$10$2 = "
|
|
14376
|
+
const VERSION$10$2 = "3f49d751896cf66e6e29788d8880e2cc";
|
|
14377
14377
|
const RepresentationType$G = 'PlatformActionRepresentation';
|
|
14378
14378
|
function keyBuilder$1P$1(luvio, config) {
|
|
14379
14379
|
return keyPrefix$3 + '::' + RepresentationType$G + ':' + config.externalId + ':' + (config.relatedSourceObject === null ? '' : config.relatedSourceObject) + ':' + (config.relatedListRecordId === null ? '' : config.relatedListRecordId);
|
|
@@ -14433,10 +14433,6 @@ const select$1G$2 = function PlatformActionRepresentationSelect() {
|
|
|
14433
14433
|
name: 'lwcComponent',
|
|
14434
14434
|
kind: 'Scalar'
|
|
14435
14435
|
},
|
|
14436
|
-
{
|
|
14437
|
-
name: 'pageDeveloperName',
|
|
14438
|
-
kind: 'Scalar'
|
|
14439
|
-
},
|
|
14440
14436
|
{
|
|
14441
14437
|
name: 'primaryColor',
|
|
14442
14438
|
kind: 'Scalar'
|
|
@@ -14465,14 +14461,6 @@ const select$1G$2 = function PlatformActionRepresentationSelect() {
|
|
|
14465
14461
|
name: 'targetObject',
|
|
14466
14462
|
kind: 'Scalar'
|
|
14467
14463
|
},
|
|
14468
|
-
{
|
|
14469
|
-
name: 'targetParentField',
|
|
14470
|
-
kind: 'Scalar'
|
|
14471
|
-
},
|
|
14472
|
-
{
|
|
14473
|
-
name: 'targetRecordTypeId',
|
|
14474
|
-
kind: 'Scalar'
|
|
14475
|
-
},
|
|
14476
14464
|
{
|
|
14477
14465
|
name: 'targetUrl',
|
|
14478
14466
|
kind: 'Scalar'
|
|
@@ -14545,11 +14533,6 @@ function equals$S(existing, incoming) {
|
|
|
14545
14533
|
if (!(existing_lwcComponent === incoming_lwcComponent)) {
|
|
14546
14534
|
return false;
|
|
14547
14535
|
}
|
|
14548
|
-
const existing_pageDeveloperName = existing.pageDeveloperName;
|
|
14549
|
-
const incoming_pageDeveloperName = incoming.pageDeveloperName;
|
|
14550
|
-
if (!(existing_pageDeveloperName === incoming_pageDeveloperName)) {
|
|
14551
|
-
return false;
|
|
14552
|
-
}
|
|
14553
14536
|
const existing_primaryColor = existing.primaryColor;
|
|
14554
14537
|
const incoming_primaryColor = incoming.primaryColor;
|
|
14555
14538
|
if (!(existing_primaryColor === incoming_primaryColor)) {
|
|
@@ -14580,16 +14563,6 @@ function equals$S(existing, incoming) {
|
|
|
14580
14563
|
if (!(existing_targetObject === incoming_targetObject)) {
|
|
14581
14564
|
return false;
|
|
14582
14565
|
}
|
|
14583
|
-
const existing_targetParentField = existing.targetParentField;
|
|
14584
|
-
const incoming_targetParentField = incoming.targetParentField;
|
|
14585
|
-
if (!(existing_targetParentField === incoming_targetParentField)) {
|
|
14586
|
-
return false;
|
|
14587
|
-
}
|
|
14588
|
-
const existing_targetRecordTypeId = existing.targetRecordTypeId;
|
|
14589
|
-
const incoming_targetRecordTypeId = incoming.targetRecordTypeId;
|
|
14590
|
-
if (!(existing_targetRecordTypeId === incoming_targetRecordTypeId)) {
|
|
14591
|
-
return false;
|
|
14592
|
-
}
|
|
14593
14566
|
const existing_targetUrl = existing.targetUrl;
|
|
14594
14567
|
const incoming_targetUrl = incoming.targetUrl;
|
|
14595
14568
|
if (!(existing_targetUrl === incoming_targetUrl)) {
|
|
@@ -32574,7 +32547,7 @@ withDefaultLuvio((luvio) => {
|
|
|
32574
32547
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
32575
32548
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
32576
32549
|
});
|
|
32577
|
-
// version: 1.
|
|
32550
|
+
// version: 1.451.0-dev10-1dd3380fb3
|
|
32578
32551
|
|
|
32579
32552
|
var draftQueueMaxRetryAttemptsGate = {
|
|
32580
32553
|
isOpen: function (e) {
|
|
@@ -80520,19 +80493,32 @@ class AbstractResourceRequestActionHandler {
|
|
|
80520
80493
|
actionDataChanged = true;
|
|
80521
80494
|
}
|
|
80522
80495
|
else if (!this.isServerGeneratedError(response.body)) {
|
|
80523
|
-
// Killswitch CLOSED (default) —
|
|
80496
|
+
// Killswitch CLOSED (default) — an edge/gateway-injected 400 (no
|
|
80524
80497
|
// recognizable server error body) is retried with the SAME key, so the
|
|
80525
80498
|
// server can dedupe a write that may already have committed at the origin.
|
|
80526
|
-
//
|
|
80527
|
-
//
|
|
80528
|
-
// retrying it unchanged would only be rejected again, so the draft is
|
|
80529
|
-
// errored for the user to fix or discard — the same terminal outcome as
|
|
80530
|
-
// before this fix, minus the duplicating key rotation. The key is only ever
|
|
80531
|
-
// rotated by the recognized idempotency error codes above, by a backdating
|
|
80532
|
-
// collision (new body), or when the user edits an errored draft
|
|
80533
|
-
// (mergeActions/handleReplaceAction).
|
|
80499
|
+
// Rotating here is what duplicated the WOLI records (@W-23445154), so the
|
|
80500
|
+
// key is preserved.
|
|
80534
80501
|
shouldRetry = true;
|
|
80535
80502
|
}
|
|
80503
|
+
else {
|
|
80504
|
+
// Killswitch CLOSED — a REAL, server-generated 400 (UiApiError[] or an
|
|
80505
|
+
// enhancedErrorType body, e.g. a field-validation failure). The origin
|
|
80506
|
+
// understood the request and rejected it, so it definitively did NOT
|
|
80507
|
+
// commit — there is no already-written record to duplicate, which is what
|
|
80508
|
+
// makes rotation safe here (unlike the edge-injected case above).
|
|
80509
|
+
//
|
|
80510
|
+
// We still do NOT retry (shouldRetry stays false): the request as-is would
|
|
80511
|
+
// just be rejected again and wedge the queue. The draft errors for the user
|
|
80512
|
+
// to fix or discard. But we DO rotate the key: the server's idempotency
|
|
80513
|
+
// layer caches the 400 against the key, so if the same request is later
|
|
80514
|
+
// resubmitted unchanged after the server-side validation rule changes to
|
|
80515
|
+
// allow it, reusing the key would replay that cached 400 and the now-valid
|
|
80516
|
+
// write would never be applied. Rotating gives the retried request a fresh
|
|
80517
|
+
// key so the origin re-evaluates it. @W-23445154
|
|
80518
|
+
updatedAction.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
80519
|
+
reportIdempotencyKeyRotated(updatedAction.targetId, 'server-validation-400');
|
|
80520
|
+
actionDataChanged = true;
|
|
80521
|
+
}
|
|
80536
80522
|
}
|
|
80537
80523
|
if (response.status === HttpStatusCode$2.BadRequest &&
|
|
80538
80524
|
this.isBackdatingError(response.body, action)) {
|
|
@@ -81124,9 +81110,9 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
81124
81110
|
return super.getRedirectMappings(action);
|
|
81125
81111
|
}
|
|
81126
81112
|
async handleActionCompleted(completedAction, queueOperations) {
|
|
81127
|
-
|
|
81128
|
-
|
|
81129
|
-
|
|
81113
|
+
const { method } = completedAction.data;
|
|
81114
|
+
if (completedAction.response.status === 204 && (method === 'post' || method === 'patch')) {
|
|
81115
|
+
await this.recordService.removeSideEffectsForAction(completedAction);
|
|
81130
81116
|
await this.evictKey(completedAction.tag);
|
|
81131
81117
|
return;
|
|
81132
81118
|
}
|
|
@@ -96823,7 +96809,7 @@ function buildServiceDescriptor$b(luvio) {
|
|
|
96823
96809
|
},
|
|
96824
96810
|
};
|
|
96825
96811
|
}
|
|
96826
|
-
// version: 1.
|
|
96812
|
+
// version: 1.451.0-dev10-f221dcc990
|
|
96827
96813
|
|
|
96828
96814
|
/**
|
|
96829
96815
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -96849,7 +96835,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
96849
96835
|
},
|
|
96850
96836
|
};
|
|
96851
96837
|
}
|
|
96852
|
-
// version: 1.
|
|
96838
|
+
// version: 1.451.0-dev10-f221dcc990
|
|
96853
96839
|
|
|
96854
96840
|
function findExecutableOperation$1(input) {
|
|
96855
96841
|
const operations = input.query.definitions.filter(
|
|
@@ -99558,7 +99544,7 @@ register$1({
|
|
|
99558
99544
|
id: '@salesforce/lds-network-adapter',
|
|
99559
99545
|
instrument: instrument$2,
|
|
99560
99546
|
});
|
|
99561
|
-
// version: 1.
|
|
99547
|
+
// version: 1.451.0-dev10-f221dcc990
|
|
99562
99548
|
|
|
99563
99549
|
const { create: create$2, keys: keys$2 } = Object;
|
|
99564
99550
|
const { stringify, parse } = JSON;
|
|
@@ -107093,7 +107079,7 @@ function registerCallback(cb) {
|
|
|
107093
107079
|
cb(graphql_v1_import, graphql_imperative$1, graphql_imperative_legacy_v1_import, graphql_state_manager, useOneStoreGraphQL);
|
|
107094
107080
|
}
|
|
107095
107081
|
}
|
|
107096
|
-
// version: 1.
|
|
107082
|
+
// version: 1.451.0-dev10-1dd3380fb3
|
|
107097
107083
|
|
|
107098
107084
|
function createFragmentMap(documentNode) {
|
|
107099
107085
|
const fragments = {};
|
|
@@ -136336,7 +136322,7 @@ register$1({
|
|
|
136336
136322
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
136337
136323
|
instrument: instrument$1,
|
|
136338
136324
|
});
|
|
136339
|
-
// version: 1.
|
|
136325
|
+
// version: 1.451.0-dev10-1dd3380fb3
|
|
136340
136326
|
|
|
136341
136327
|
// On core the unstable adapters are re-exported with different names,
|
|
136342
136328
|
// we want to match them here.
|
|
@@ -136488,7 +136474,7 @@ withDefaultLuvio((luvio) => {
|
|
|
136488
136474
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
136489
136475
|
graphQLImperative = ldsAdapter;
|
|
136490
136476
|
});
|
|
136491
|
-
// version: 1.
|
|
136477
|
+
// version: 1.451.0-dev10-1dd3380fb3
|
|
136492
136478
|
|
|
136493
136479
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
136494
136480
|
__proto__: null,
|
|
@@ -137287,7 +137273,7 @@ const callbacks$1 = [];
|
|
|
137287
137273
|
function register(r) {
|
|
137288
137274
|
callbacks$1.forEach((callback) => callback(r));
|
|
137289
137275
|
}
|
|
137290
|
-
// version: 1.
|
|
137276
|
+
// version: 1.451.0-dev10-f221dcc990
|
|
137291
137277
|
|
|
137292
137278
|
/**
|
|
137293
137279
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -138576,4 +138562,4 @@ const { luvio } = getRuntime();
|
|
|
138576
138562
|
setDefaultLuvio({ luvio });
|
|
138577
138563
|
|
|
138578
138564
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, importLuvioAdapterModule, importOneStoreAdapterModule, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
138579
|
-
// version: 1.
|
|
138565
|
+
// version: 1.451.0-dev10-f221dcc990
|
|
@@ -4154,7 +4154,7 @@
|
|
|
4154
4154
|
}
|
|
4155
4155
|
return resourceParams;
|
|
4156
4156
|
}
|
|
4157
|
-
// engine version: 0.161.
|
|
4157
|
+
// engine version: 0.161.2-bd1bd38a
|
|
4158
4158
|
|
|
4159
4159
|
/**
|
|
4160
4160
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -4282,7 +4282,7 @@
|
|
|
4282
4282
|
}
|
|
4283
4283
|
callbacks.push(callback);
|
|
4284
4284
|
}
|
|
4285
|
-
// version: 1.
|
|
4285
|
+
// version: 1.451.0-dev10-f221dcc990
|
|
4286
4286
|
|
|
4287
4287
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4288
4288
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -5326,7 +5326,7 @@
|
|
|
5326
5326
|
const { apiFamily, name } = metadata;
|
|
5327
5327
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
5328
5328
|
}
|
|
5329
|
-
// version: 1.
|
|
5329
|
+
// version: 1.451.0-dev10-f221dcc990
|
|
5330
5330
|
|
|
5331
5331
|
function isSupportedEntity(_objectApiName) {
|
|
5332
5332
|
return true;
|
|
@@ -5432,7 +5432,7 @@
|
|
|
5432
5432
|
TypeCheckShapes[TypeCheckShapes["Integer"] = 3] = "Integer";
|
|
5433
5433
|
TypeCheckShapes[TypeCheckShapes["Unsupported"] = 4] = "Unsupported";
|
|
5434
5434
|
})(TypeCheckShapes || (TypeCheckShapes = {}));
|
|
5435
|
-
// engine version: 0.161.
|
|
5435
|
+
// engine version: 0.161.2-bd1bd38a
|
|
5436
5436
|
|
|
5437
5437
|
const { keys: ObjectKeys$4, create: ObjectCreate$4 } = Object;
|
|
5438
5438
|
|
|
@@ -14379,7 +14379,7 @@
|
|
|
14379
14379
|
return undefined;
|
|
14380
14380
|
}
|
|
14381
14381
|
|
|
14382
|
-
const VERSION$10$2 = "
|
|
14382
|
+
const VERSION$10$2 = "3f49d751896cf66e6e29788d8880e2cc";
|
|
14383
14383
|
const RepresentationType$G = 'PlatformActionRepresentation';
|
|
14384
14384
|
function keyBuilder$1P$1(luvio, config) {
|
|
14385
14385
|
return keyPrefix$3 + '::' + RepresentationType$G + ':' + config.externalId + ':' + (config.relatedSourceObject === null ? '' : config.relatedSourceObject) + ':' + (config.relatedListRecordId === null ? '' : config.relatedListRecordId);
|
|
@@ -14439,10 +14439,6 @@
|
|
|
14439
14439
|
name: 'lwcComponent',
|
|
14440
14440
|
kind: 'Scalar'
|
|
14441
14441
|
},
|
|
14442
|
-
{
|
|
14443
|
-
name: 'pageDeveloperName',
|
|
14444
|
-
kind: 'Scalar'
|
|
14445
|
-
},
|
|
14446
14442
|
{
|
|
14447
14443
|
name: 'primaryColor',
|
|
14448
14444
|
kind: 'Scalar'
|
|
@@ -14471,14 +14467,6 @@
|
|
|
14471
14467
|
name: 'targetObject',
|
|
14472
14468
|
kind: 'Scalar'
|
|
14473
14469
|
},
|
|
14474
|
-
{
|
|
14475
|
-
name: 'targetParentField',
|
|
14476
|
-
kind: 'Scalar'
|
|
14477
|
-
},
|
|
14478
|
-
{
|
|
14479
|
-
name: 'targetRecordTypeId',
|
|
14480
|
-
kind: 'Scalar'
|
|
14481
|
-
},
|
|
14482
14470
|
{
|
|
14483
14471
|
name: 'targetUrl',
|
|
14484
14472
|
kind: 'Scalar'
|
|
@@ -14551,11 +14539,6 @@
|
|
|
14551
14539
|
if (!(existing_lwcComponent === incoming_lwcComponent)) {
|
|
14552
14540
|
return false;
|
|
14553
14541
|
}
|
|
14554
|
-
const existing_pageDeveloperName = existing.pageDeveloperName;
|
|
14555
|
-
const incoming_pageDeveloperName = incoming.pageDeveloperName;
|
|
14556
|
-
if (!(existing_pageDeveloperName === incoming_pageDeveloperName)) {
|
|
14557
|
-
return false;
|
|
14558
|
-
}
|
|
14559
14542
|
const existing_primaryColor = existing.primaryColor;
|
|
14560
14543
|
const incoming_primaryColor = incoming.primaryColor;
|
|
14561
14544
|
if (!(existing_primaryColor === incoming_primaryColor)) {
|
|
@@ -14586,16 +14569,6 @@
|
|
|
14586
14569
|
if (!(existing_targetObject === incoming_targetObject)) {
|
|
14587
14570
|
return false;
|
|
14588
14571
|
}
|
|
14589
|
-
const existing_targetParentField = existing.targetParentField;
|
|
14590
|
-
const incoming_targetParentField = incoming.targetParentField;
|
|
14591
|
-
if (!(existing_targetParentField === incoming_targetParentField)) {
|
|
14592
|
-
return false;
|
|
14593
|
-
}
|
|
14594
|
-
const existing_targetRecordTypeId = existing.targetRecordTypeId;
|
|
14595
|
-
const incoming_targetRecordTypeId = incoming.targetRecordTypeId;
|
|
14596
|
-
if (!(existing_targetRecordTypeId === incoming_targetRecordTypeId)) {
|
|
14597
|
-
return false;
|
|
14598
|
-
}
|
|
14599
14572
|
const existing_targetUrl = existing.targetUrl;
|
|
14600
14573
|
const incoming_targetUrl = incoming.targetUrl;
|
|
14601
14574
|
if (!(existing_targetUrl === incoming_targetUrl)) {
|
|
@@ -32580,7 +32553,7 @@
|
|
|
32580
32553
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
32581
32554
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
32582
32555
|
});
|
|
32583
|
-
// version: 1.
|
|
32556
|
+
// version: 1.451.0-dev10-1dd3380fb3
|
|
32584
32557
|
|
|
32585
32558
|
var draftQueueMaxRetryAttemptsGate = {
|
|
32586
32559
|
isOpen: function (e) {
|
|
@@ -80526,19 +80499,32 @@
|
|
|
80526
80499
|
actionDataChanged = true;
|
|
80527
80500
|
}
|
|
80528
80501
|
else if (!this.isServerGeneratedError(response.body)) {
|
|
80529
|
-
// Killswitch CLOSED (default) —
|
|
80502
|
+
// Killswitch CLOSED (default) — an edge/gateway-injected 400 (no
|
|
80530
80503
|
// recognizable server error body) is retried with the SAME key, so the
|
|
80531
80504
|
// server can dedupe a write that may already have committed at the origin.
|
|
80532
|
-
//
|
|
80533
|
-
//
|
|
80534
|
-
// retrying it unchanged would only be rejected again, so the draft is
|
|
80535
|
-
// errored for the user to fix or discard — the same terminal outcome as
|
|
80536
|
-
// before this fix, minus the duplicating key rotation. The key is only ever
|
|
80537
|
-
// rotated by the recognized idempotency error codes above, by a backdating
|
|
80538
|
-
// collision (new body), or when the user edits an errored draft
|
|
80539
|
-
// (mergeActions/handleReplaceAction).
|
|
80505
|
+
// Rotating here is what duplicated the WOLI records (@W-23445154), so the
|
|
80506
|
+
// key is preserved.
|
|
80540
80507
|
shouldRetry = true;
|
|
80541
80508
|
}
|
|
80509
|
+
else {
|
|
80510
|
+
// Killswitch CLOSED — a REAL, server-generated 400 (UiApiError[] or an
|
|
80511
|
+
// enhancedErrorType body, e.g. a field-validation failure). The origin
|
|
80512
|
+
// understood the request and rejected it, so it definitively did NOT
|
|
80513
|
+
// commit — there is no already-written record to duplicate, which is what
|
|
80514
|
+
// makes rotation safe here (unlike the edge-injected case above).
|
|
80515
|
+
//
|
|
80516
|
+
// We still do NOT retry (shouldRetry stays false): the request as-is would
|
|
80517
|
+
// just be rejected again and wedge the queue. The draft errors for the user
|
|
80518
|
+
// to fix or discard. But we DO rotate the key: the server's idempotency
|
|
80519
|
+
// layer caches the 400 against the key, so if the same request is later
|
|
80520
|
+
// resubmitted unchanged after the server-side validation rule changes to
|
|
80521
|
+
// allow it, reusing the key would replay that cached 400 and the now-valid
|
|
80522
|
+
// write would never be applied. Rotating gives the retried request a fresh
|
|
80523
|
+
// key so the origin re-evaluates it. @W-23445154
|
|
80524
|
+
updatedAction.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
80525
|
+
reportIdempotencyKeyRotated(updatedAction.targetId, 'server-validation-400');
|
|
80526
|
+
actionDataChanged = true;
|
|
80527
|
+
}
|
|
80542
80528
|
}
|
|
80543
80529
|
if (response.status === HttpStatusCode$2.BadRequest &&
|
|
80544
80530
|
this.isBackdatingError(response.body, action)) {
|
|
@@ -81130,9 +81116,9 @@
|
|
|
81130
81116
|
return super.getRedirectMappings(action);
|
|
81131
81117
|
}
|
|
81132
81118
|
async handleActionCompleted(completedAction, queueOperations) {
|
|
81133
|
-
|
|
81134
|
-
|
|
81135
|
-
|
|
81119
|
+
const { method } = completedAction.data;
|
|
81120
|
+
if (completedAction.response.status === 204 && (method === 'post' || method === 'patch')) {
|
|
81121
|
+
await this.recordService.removeSideEffectsForAction(completedAction);
|
|
81136
81122
|
await this.evictKey(completedAction.tag);
|
|
81137
81123
|
return;
|
|
81138
81124
|
}
|
|
@@ -96829,7 +96815,7 @@
|
|
|
96829
96815
|
},
|
|
96830
96816
|
};
|
|
96831
96817
|
}
|
|
96832
|
-
// version: 1.
|
|
96818
|
+
// version: 1.451.0-dev10-f221dcc990
|
|
96833
96819
|
|
|
96834
96820
|
/**
|
|
96835
96821
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -96855,7 +96841,7 @@
|
|
|
96855
96841
|
},
|
|
96856
96842
|
};
|
|
96857
96843
|
}
|
|
96858
|
-
// version: 1.
|
|
96844
|
+
// version: 1.451.0-dev10-f221dcc990
|
|
96859
96845
|
|
|
96860
96846
|
function findExecutableOperation$1(input) {
|
|
96861
96847
|
const operations = input.query.definitions.filter(
|
|
@@ -99564,7 +99550,7 @@
|
|
|
99564
99550
|
id: '@salesforce/lds-network-adapter',
|
|
99565
99551
|
instrument: instrument$2,
|
|
99566
99552
|
});
|
|
99567
|
-
// version: 1.
|
|
99553
|
+
// version: 1.451.0-dev10-f221dcc990
|
|
99568
99554
|
|
|
99569
99555
|
const { create: create$2, keys: keys$2 } = Object;
|
|
99570
99556
|
const { stringify, parse } = JSON;
|
|
@@ -107099,7 +107085,7 @@
|
|
|
107099
107085
|
cb(graphql_v1_import, graphql_imperative$1, graphql_imperative_legacy_v1_import, graphql_state_manager, useOneStoreGraphQL);
|
|
107100
107086
|
}
|
|
107101
107087
|
}
|
|
107102
|
-
// version: 1.
|
|
107088
|
+
// version: 1.451.0-dev10-1dd3380fb3
|
|
107103
107089
|
|
|
107104
107090
|
function createFragmentMap(documentNode) {
|
|
107105
107091
|
const fragments = {};
|
|
@@ -136342,7 +136328,7 @@
|
|
|
136342
136328
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
136343
136329
|
instrument: instrument$1,
|
|
136344
136330
|
});
|
|
136345
|
-
// version: 1.
|
|
136331
|
+
// version: 1.451.0-dev10-1dd3380fb3
|
|
136346
136332
|
|
|
136347
136333
|
// On core the unstable adapters are re-exported with different names,
|
|
136348
136334
|
// we want to match them here.
|
|
@@ -136494,7 +136480,7 @@
|
|
|
136494
136480
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
136495
136481
|
graphQLImperative = ldsAdapter;
|
|
136496
136482
|
});
|
|
136497
|
-
// version: 1.
|
|
136483
|
+
// version: 1.451.0-dev10-1dd3380fb3
|
|
136498
136484
|
|
|
136499
136485
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
136500
136486
|
__proto__: null,
|
|
@@ -137293,7 +137279,7 @@
|
|
|
137293
137279
|
function register(r) {
|
|
137294
137280
|
callbacks$1.forEach((callback) => callback(r));
|
|
137295
137281
|
}
|
|
137296
|
-
// version: 1.
|
|
137282
|
+
// version: 1.451.0-dev10-f221dcc990
|
|
137297
137283
|
|
|
137298
137284
|
/**
|
|
137299
137285
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -138603,4 +138589,4 @@
|
|
|
138603
138589
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
138604
138590
|
|
|
138605
138591
|
}));
|
|
138606
|
-
// version: 1.
|
|
138592
|
+
// version: 1.451.0-dev10-f221dcc990
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-worker-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.451.0-dev10",
|
|
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.451.0-dev10",
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.451.0-dev10",
|
|
40
|
+
"@salesforce/lds-default-luvio": "^1.451.0-dev10",
|
|
41
|
+
"@salesforce/lds-drafts": "^1.451.0-dev10",
|
|
42
|
+
"@salesforce/lds-graphql-parser": "^1.451.0-dev10",
|
|
43
|
+
"@salesforce/lds-luvio-engine": "^1.451.0-dev10",
|
|
44
|
+
"@salesforce/lds-runtime-mobile": "^1.451.0-dev10",
|
|
45
|
+
"@salesforce/nimbus-plugin-lds": "^1.451.0-dev10",
|
|
46
46
|
"ajv": "^8.11.0",
|
|
47
47
|
"glob": "^7.1.5",
|
|
48
48
|
"nimbus-types": "^2.0.0-alpha1",
|