@salesforce/lds-worker-api 1.453.0 → 1.454.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.
|
@@ -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.454.0-4223ab4365
|
|
@@ -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.454.0-4223ab4365
|
|
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.454.0-4223ab4365
|
|
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
|
|
|
@@ -32547,7 +32547,7 @@ withDefaultLuvio((luvio) => {
|
|
|
32547
32547
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
32548
32548
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
32549
32549
|
});
|
|
32550
|
-
// version: 1.
|
|
32550
|
+
// version: 1.454.0-761808c4e9
|
|
32551
32551
|
|
|
32552
32552
|
var draftQueueMaxRetryAttemptsGate = {
|
|
32553
32553
|
isOpen: function (e) {
|
|
@@ -80603,19 +80603,32 @@ class AbstractResourceRequestActionHandler {
|
|
|
80603
80603
|
actionDataChanged = true;
|
|
80604
80604
|
}
|
|
80605
80605
|
else if (!this.isServerGeneratedError(response.body)) {
|
|
80606
|
-
// Killswitch CLOSED (default) —
|
|
80606
|
+
// Killswitch CLOSED (default) — an edge/gateway-injected 400 (no
|
|
80607
80607
|
// recognizable server error body) is retried with the SAME key, so the
|
|
80608
80608
|
// server can dedupe a write that may already have committed at the origin.
|
|
80609
|
-
//
|
|
80610
|
-
//
|
|
80611
|
-
// retrying it unchanged would only be rejected again, so the draft is
|
|
80612
|
-
// errored for the user to fix or discard — the same terminal outcome as
|
|
80613
|
-
// before this fix, minus the duplicating key rotation. The key is only ever
|
|
80614
|
-
// rotated by the recognized idempotency error codes above, by a backdating
|
|
80615
|
-
// collision (new body), or when the user edits an errored draft
|
|
80616
|
-
// (mergeActions/handleReplaceAction).
|
|
80609
|
+
// Rotating here is what duplicated the WOLI records (@W-23445154), so the
|
|
80610
|
+
// key is preserved.
|
|
80617
80611
|
shouldRetry = true;
|
|
80618
80612
|
}
|
|
80613
|
+
else {
|
|
80614
|
+
// Killswitch CLOSED — a REAL, server-generated 400 (UiApiError[] or an
|
|
80615
|
+
// enhancedErrorType body, e.g. a field-validation failure). The origin
|
|
80616
|
+
// understood the request and rejected it, so it definitively did NOT
|
|
80617
|
+
// commit — there is no already-written record to duplicate, which is what
|
|
80618
|
+
// makes rotation safe here (unlike the edge-injected case above).
|
|
80619
|
+
//
|
|
80620
|
+
// We still do NOT retry (shouldRetry stays false): the request as-is would
|
|
80621
|
+
// just be rejected again and wedge the queue. The draft errors for the user
|
|
80622
|
+
// to fix or discard. But we DO rotate the key: the server's idempotency
|
|
80623
|
+
// layer caches the 400 against the key, so if the same request is later
|
|
80624
|
+
// resubmitted unchanged after the server-side validation rule changes to
|
|
80625
|
+
// allow it, reusing the key would replay that cached 400 and the now-valid
|
|
80626
|
+
// write would never be applied. Rotating gives the retried request a fresh
|
|
80627
|
+
// key so the origin re-evaluates it. @W-23445154
|
|
80628
|
+
updatedAction.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
80629
|
+
reportIdempotencyKeyRotated(updatedAction.targetId, 'server-validation-400');
|
|
80630
|
+
actionDataChanged = true;
|
|
80631
|
+
}
|
|
80619
80632
|
}
|
|
80620
80633
|
if (response.status === HttpStatusCode$2.BadRequest &&
|
|
80621
80634
|
this.isBackdatingError(response.body, action)) {
|
|
@@ -97001,7 +97014,7 @@ function buildServiceDescriptor$b(luvio) {
|
|
|
97001
97014
|
},
|
|
97002
97015
|
};
|
|
97003
97016
|
}
|
|
97004
|
-
// version: 1.
|
|
97017
|
+
// version: 1.454.0-4223ab4365
|
|
97005
97018
|
|
|
97006
97019
|
/**
|
|
97007
97020
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -97027,7 +97040,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
97027
97040
|
},
|
|
97028
97041
|
};
|
|
97029
97042
|
}
|
|
97030
|
-
// version: 1.
|
|
97043
|
+
// version: 1.454.0-4223ab4365
|
|
97031
97044
|
|
|
97032
97045
|
function findExecutableOperation$1(input) {
|
|
97033
97046
|
const operations = input.query.definitions.filter(
|
|
@@ -99736,7 +99749,7 @@ register$1({
|
|
|
99736
99749
|
id: '@salesforce/lds-network-adapter',
|
|
99737
99750
|
instrument: instrument$2,
|
|
99738
99751
|
});
|
|
99739
|
-
// version: 1.
|
|
99752
|
+
// version: 1.454.0-4223ab4365
|
|
99740
99753
|
|
|
99741
99754
|
const { create: create$2, keys: keys$2 } = Object;
|
|
99742
99755
|
const { stringify, parse } = JSON;
|
|
@@ -107271,7 +107284,7 @@ function registerCallback(cb) {
|
|
|
107271
107284
|
cb(graphql_v1_import, graphql_imperative$1, graphql_imperative_legacy_v1_import, graphql_state_manager, useOneStoreGraphQL);
|
|
107272
107285
|
}
|
|
107273
107286
|
}
|
|
107274
|
-
// version: 1.
|
|
107287
|
+
// version: 1.454.0-761808c4e9
|
|
107275
107288
|
|
|
107276
107289
|
function createFragmentMap(documentNode) {
|
|
107277
107290
|
const fragments = {};
|
|
@@ -136514,7 +136527,7 @@ register$1({
|
|
|
136514
136527
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
136515
136528
|
instrument: instrument$1,
|
|
136516
136529
|
});
|
|
136517
|
-
// version: 1.
|
|
136530
|
+
// version: 1.454.0-761808c4e9
|
|
136518
136531
|
|
|
136519
136532
|
// On core the unstable adapters are re-exported with different names,
|
|
136520
136533
|
// we want to match them here.
|
|
@@ -136666,7 +136679,7 @@ withDefaultLuvio((luvio) => {
|
|
|
136666
136679
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
136667
136680
|
graphQLImperative = ldsAdapter;
|
|
136668
136681
|
});
|
|
136669
|
-
// version: 1.
|
|
136682
|
+
// version: 1.454.0-761808c4e9
|
|
136670
136683
|
|
|
136671
136684
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
136672
136685
|
__proto__: null,
|
|
@@ -137465,7 +137478,7 @@ const callbacks$1 = [];
|
|
|
137465
137478
|
function register(r) {
|
|
137466
137479
|
callbacks$1.forEach((callback) => callback(r));
|
|
137467
137480
|
}
|
|
137468
|
-
// version: 1.
|
|
137481
|
+
// version: 1.454.0-4223ab4365
|
|
137469
137482
|
|
|
137470
137483
|
/**
|
|
137471
137484
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -138754,4 +138767,4 @@ const { luvio } = getRuntime();
|
|
|
138754
138767
|
setDefaultLuvio({ luvio });
|
|
138755
138768
|
|
|
138756
138769
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, importLuvioAdapterModule, importOneStoreAdapterModule, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
138757
|
-
// version: 1.
|
|
138770
|
+
// version: 1.454.0-4223ab4365
|
|
@@ -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.454.0-4223ab4365
|
|
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.454.0-4223ab4365
|
|
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
|
|
|
@@ -32553,7 +32553,7 @@
|
|
|
32553
32553
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
32554
32554
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
32555
32555
|
});
|
|
32556
|
-
// version: 1.
|
|
32556
|
+
// version: 1.454.0-761808c4e9
|
|
32557
32557
|
|
|
32558
32558
|
var draftQueueMaxRetryAttemptsGate = {
|
|
32559
32559
|
isOpen: function (e) {
|
|
@@ -80609,19 +80609,32 @@
|
|
|
80609
80609
|
actionDataChanged = true;
|
|
80610
80610
|
}
|
|
80611
80611
|
else if (!this.isServerGeneratedError(response.body)) {
|
|
80612
|
-
// Killswitch CLOSED (default) —
|
|
80612
|
+
// Killswitch CLOSED (default) — an edge/gateway-injected 400 (no
|
|
80613
80613
|
// recognizable server error body) is retried with the SAME key, so the
|
|
80614
80614
|
// server can dedupe a write that may already have committed at the origin.
|
|
80615
|
-
//
|
|
80616
|
-
//
|
|
80617
|
-
// retrying it unchanged would only be rejected again, so the draft is
|
|
80618
|
-
// errored for the user to fix or discard — the same terminal outcome as
|
|
80619
|
-
// before this fix, minus the duplicating key rotation. The key is only ever
|
|
80620
|
-
// rotated by the recognized idempotency error codes above, by a backdating
|
|
80621
|
-
// collision (new body), or when the user edits an errored draft
|
|
80622
|
-
// (mergeActions/handleReplaceAction).
|
|
80615
|
+
// Rotating here is what duplicated the WOLI records (@W-23445154), so the
|
|
80616
|
+
// key is preserved.
|
|
80623
80617
|
shouldRetry = true;
|
|
80624
80618
|
}
|
|
80619
|
+
else {
|
|
80620
|
+
// Killswitch CLOSED — a REAL, server-generated 400 (UiApiError[] or an
|
|
80621
|
+
// enhancedErrorType body, e.g. a field-validation failure). The origin
|
|
80622
|
+
// understood the request and rejected it, so it definitively did NOT
|
|
80623
|
+
// commit — there is no already-written record to duplicate, which is what
|
|
80624
|
+
// makes rotation safe here (unlike the edge-injected case above).
|
|
80625
|
+
//
|
|
80626
|
+
// We still do NOT retry (shouldRetry stays false): the request as-is would
|
|
80627
|
+
// just be rejected again and wedge the queue. The draft errors for the user
|
|
80628
|
+
// to fix or discard. But we DO rotate the key: the server's idempotency
|
|
80629
|
+
// layer caches the 400 against the key, so if the same request is later
|
|
80630
|
+
// resubmitted unchanged after the server-side validation rule changes to
|
|
80631
|
+
// allow it, reusing the key would replay that cached 400 and the now-valid
|
|
80632
|
+
// write would never be applied. Rotating gives the retried request a fresh
|
|
80633
|
+
// key so the origin re-evaluates it. @W-23445154
|
|
80634
|
+
updatedAction.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
80635
|
+
reportIdempotencyKeyRotated(updatedAction.targetId, 'server-validation-400');
|
|
80636
|
+
actionDataChanged = true;
|
|
80637
|
+
}
|
|
80625
80638
|
}
|
|
80626
80639
|
if (response.status === HttpStatusCode$2.BadRequest &&
|
|
80627
80640
|
this.isBackdatingError(response.body, action)) {
|
|
@@ -97007,7 +97020,7 @@
|
|
|
97007
97020
|
},
|
|
97008
97021
|
};
|
|
97009
97022
|
}
|
|
97010
|
-
// version: 1.
|
|
97023
|
+
// version: 1.454.0-4223ab4365
|
|
97011
97024
|
|
|
97012
97025
|
/**
|
|
97013
97026
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -97033,7 +97046,7 @@
|
|
|
97033
97046
|
},
|
|
97034
97047
|
};
|
|
97035
97048
|
}
|
|
97036
|
-
// version: 1.
|
|
97049
|
+
// version: 1.454.0-4223ab4365
|
|
97037
97050
|
|
|
97038
97051
|
function findExecutableOperation$1(input) {
|
|
97039
97052
|
const operations = input.query.definitions.filter(
|
|
@@ -99742,7 +99755,7 @@
|
|
|
99742
99755
|
id: '@salesforce/lds-network-adapter',
|
|
99743
99756
|
instrument: instrument$2,
|
|
99744
99757
|
});
|
|
99745
|
-
// version: 1.
|
|
99758
|
+
// version: 1.454.0-4223ab4365
|
|
99746
99759
|
|
|
99747
99760
|
const { create: create$2, keys: keys$2 } = Object;
|
|
99748
99761
|
const { stringify, parse } = JSON;
|
|
@@ -107277,7 +107290,7 @@
|
|
|
107277
107290
|
cb(graphql_v1_import, graphql_imperative$1, graphql_imperative_legacy_v1_import, graphql_state_manager, useOneStoreGraphQL);
|
|
107278
107291
|
}
|
|
107279
107292
|
}
|
|
107280
|
-
// version: 1.
|
|
107293
|
+
// version: 1.454.0-761808c4e9
|
|
107281
107294
|
|
|
107282
107295
|
function createFragmentMap(documentNode) {
|
|
107283
107296
|
const fragments = {};
|
|
@@ -136520,7 +136533,7 @@
|
|
|
136520
136533
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
136521
136534
|
instrument: instrument$1,
|
|
136522
136535
|
});
|
|
136523
|
-
// version: 1.
|
|
136536
|
+
// version: 1.454.0-761808c4e9
|
|
136524
136537
|
|
|
136525
136538
|
// On core the unstable adapters are re-exported with different names,
|
|
136526
136539
|
// we want to match them here.
|
|
@@ -136672,7 +136685,7 @@
|
|
|
136672
136685
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
136673
136686
|
graphQLImperative = ldsAdapter;
|
|
136674
136687
|
});
|
|
136675
|
-
// version: 1.
|
|
136688
|
+
// version: 1.454.0-761808c4e9
|
|
136676
136689
|
|
|
136677
136690
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
136678
136691
|
__proto__: null,
|
|
@@ -137471,7 +137484,7 @@
|
|
|
137471
137484
|
function register(r) {
|
|
137472
137485
|
callbacks$1.forEach((callback) => callback(r));
|
|
137473
137486
|
}
|
|
137474
|
-
// version: 1.
|
|
137487
|
+
// version: 1.454.0-4223ab4365
|
|
137475
137488
|
|
|
137476
137489
|
/**
|
|
137477
137490
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -138781,4 +138794,4 @@
|
|
|
138781
138794
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
138782
138795
|
|
|
138783
138796
|
}));
|
|
138784
|
-
// version: 1.
|
|
138797
|
+
// version: 1.454.0-4223ab4365
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-worker-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.454.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.454.0",
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.454.0",
|
|
40
|
+
"@salesforce/lds-default-luvio": "^1.454.0",
|
|
41
|
+
"@salesforce/lds-drafts": "^1.454.0",
|
|
42
|
+
"@salesforce/lds-graphql-parser": "^1.454.0",
|
|
43
|
+
"@salesforce/lds-luvio-engine": "^1.454.0",
|
|
44
|
+
"@salesforce/lds-runtime-mobile": "^1.454.0",
|
|
45
|
+
"@salesforce/nimbus-plugin-lds": "^1.454.0",
|
|
46
46
|
"ajv": "^8.11.0",
|
|
47
47
|
"glob": "^7.1.5",
|
|
48
48
|
"nimbus-types": "^2.0.0-alpha1",
|