@salesforce/lds-worker-api 1.451.0-dev3 → 1.451.0-dev5

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.451.0-dev3-debcd48191
1376
+ // version: 1.451.0-dev5-24c4844020
@@ -4148,7 +4148,7 @@ function createResourceParamsImpl(config, configMetadata) {
4148
4148
  }
4149
4149
  return resourceParams;
4150
4150
  }
4151
- // engine version: 0.161.0-fe06f180
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.451.0-dev3-debcd48191
4279
+ // version: 1.451.0-dev5-24c4844020
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.451.0-dev3-debcd48191
5323
+ // version: 1.451.0-dev5-24c4844020
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.0-fe06f180
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.451.0-dev3-5cd7743c69
32550
+ // version: 1.451.0-dev5-0eda94ec17
32551
32551
 
32552
32552
  var draftQueueMaxRetryAttemptsGate = {
32553
32553
  isOpen: function (e) {
@@ -80493,19 +80493,32 @@ class AbstractResourceRequestActionHandler {
80493
80493
  actionDataChanged = true;
80494
80494
  }
80495
80495
  else if (!this.isServerGeneratedError(response.body)) {
80496
- // Killswitch CLOSED (default) — only an edge/gateway-injected 400 (no
80496
+ // Killswitch CLOSED (default) — an edge/gateway-injected 400 (no
80497
80497
  // recognizable server error body) is retried with the SAME key, so the
80498
80498
  // server can dedupe a write that may already have committed at the origin.
80499
- // A real, server-generated 400 (UiApiError[] or an enhancedErrorType body,
80500
- // e.g. a field-validation failure) falls through to the error path below:
80501
- // retrying it unchanged would only be rejected again, so the draft is
80502
- // errored for the user to fix or discard — the same terminal outcome as
80503
- // before this fix, minus the duplicating key rotation. The key is only ever
80504
- // rotated by the recognized idempotency error codes above, by a backdating
80505
- // collision (new body), or when the user edits an errored draft
80506
- // (mergeActions/handleReplaceAction).
80499
+ // Rotating here is what duplicated the WOLI records (@W-23445154), so the
80500
+ // key is preserved.
80507
80501
  shouldRetry = true;
80508
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
+ }
80509
80522
  }
80510
80523
  if (response.status === HttpStatusCode$2.BadRequest &&
80511
80524
  this.isBackdatingError(response.body, action)) {
@@ -96796,7 +96809,7 @@ function buildServiceDescriptor$b(luvio) {
96796
96809
  },
96797
96810
  };
96798
96811
  }
96799
- // version: 1.451.0-dev3-debcd48191
96812
+ // version: 1.451.0-dev5-24c4844020
96800
96813
 
96801
96814
  /**
96802
96815
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -96822,7 +96835,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
96822
96835
  },
96823
96836
  };
96824
96837
  }
96825
- // version: 1.451.0-dev3-debcd48191
96838
+ // version: 1.451.0-dev5-24c4844020
96826
96839
 
96827
96840
  function findExecutableOperation$1(input) {
96828
96841
  const operations = input.query.definitions.filter(
@@ -99531,7 +99544,7 @@ register$1({
99531
99544
  id: '@salesforce/lds-network-adapter',
99532
99545
  instrument: instrument$2,
99533
99546
  });
99534
- // version: 1.451.0-dev3-debcd48191
99547
+ // version: 1.451.0-dev5-24c4844020
99535
99548
 
99536
99549
  const { create: create$2, keys: keys$2 } = Object;
99537
99550
  const { stringify, parse } = JSON;
@@ -107066,7 +107079,7 @@ function registerCallback(cb) {
107066
107079
  cb(graphql_v1_import, graphql_imperative$1, graphql_imperative_legacy_v1_import, graphql_state_manager, useOneStoreGraphQL);
107067
107080
  }
107068
107081
  }
107069
- // version: 1.451.0-dev3-5cd7743c69
107082
+ // version: 1.451.0-dev5-0eda94ec17
107070
107083
 
107071
107084
  function createFragmentMap(documentNode) {
107072
107085
  const fragments = {};
@@ -136309,7 +136322,7 @@ register$1({
136309
136322
  configuration: { ...configurationForGraphQLAdapters$1 },
136310
136323
  instrument: instrument$1,
136311
136324
  });
136312
- // version: 1.451.0-dev3-5cd7743c69
136325
+ // version: 1.451.0-dev5-0eda94ec17
136313
136326
 
136314
136327
  // On core the unstable adapters are re-exported with different names,
136315
136328
  // we want to match them here.
@@ -136461,7 +136474,7 @@ withDefaultLuvio((luvio) => {
136461
136474
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
136462
136475
  graphQLImperative = ldsAdapter;
136463
136476
  });
136464
- // version: 1.451.0-dev3-5cd7743c69
136477
+ // version: 1.451.0-dev5-0eda94ec17
136465
136478
 
136466
136479
  var gqlApi = /*#__PURE__*/Object.freeze({
136467
136480
  __proto__: null,
@@ -137260,7 +137273,7 @@ const callbacks$1 = [];
137260
137273
  function register(r) {
137261
137274
  callbacks$1.forEach((callback) => callback(r));
137262
137275
  }
137263
- // version: 1.451.0-dev3-debcd48191
137276
+ // version: 1.451.0-dev5-24c4844020
137264
137277
 
137265
137278
  /**
137266
137279
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -138549,4 +138562,4 @@ const { luvio } = getRuntime();
138549
138562
  setDefaultLuvio({ luvio });
138550
138563
 
138551
138564
  export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, importLuvioAdapterModule, importOneStoreAdapterModule, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
138552
- // version: 1.451.0-dev3-debcd48191
138565
+ // version: 1.451.0-dev5-24c4844020
@@ -4154,7 +4154,7 @@
4154
4154
  }
4155
4155
  return resourceParams;
4156
4156
  }
4157
- // engine version: 0.161.0-fe06f180
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.451.0-dev3-debcd48191
4285
+ // version: 1.451.0-dev5-24c4844020
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.451.0-dev3-debcd48191
5329
+ // version: 1.451.0-dev5-24c4844020
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.0-fe06f180
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.451.0-dev3-5cd7743c69
32556
+ // version: 1.451.0-dev5-0eda94ec17
32557
32557
 
32558
32558
  var draftQueueMaxRetryAttemptsGate = {
32559
32559
  isOpen: function (e) {
@@ -80499,19 +80499,32 @@
80499
80499
  actionDataChanged = true;
80500
80500
  }
80501
80501
  else if (!this.isServerGeneratedError(response.body)) {
80502
- // Killswitch CLOSED (default) — only an edge/gateway-injected 400 (no
80502
+ // Killswitch CLOSED (default) — an edge/gateway-injected 400 (no
80503
80503
  // recognizable server error body) is retried with the SAME key, so the
80504
80504
  // server can dedupe a write that may already have committed at the origin.
80505
- // A real, server-generated 400 (UiApiError[] or an enhancedErrorType body,
80506
- // e.g. a field-validation failure) falls through to the error path below:
80507
- // retrying it unchanged would only be rejected again, so the draft is
80508
- // errored for the user to fix or discard — the same terminal outcome as
80509
- // before this fix, minus the duplicating key rotation. The key is only ever
80510
- // rotated by the recognized idempotency error codes above, by a backdating
80511
- // collision (new body), or when the user edits an errored draft
80512
- // (mergeActions/handleReplaceAction).
80505
+ // Rotating here is what duplicated the WOLI records (@W-23445154), so the
80506
+ // key is preserved.
80513
80507
  shouldRetry = true;
80514
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
+ }
80515
80528
  }
80516
80529
  if (response.status === HttpStatusCode$2.BadRequest &&
80517
80530
  this.isBackdatingError(response.body, action)) {
@@ -96802,7 +96815,7 @@
96802
96815
  },
96803
96816
  };
96804
96817
  }
96805
- // version: 1.451.0-dev3-debcd48191
96818
+ // version: 1.451.0-dev5-24c4844020
96806
96819
 
96807
96820
  /**
96808
96821
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -96828,7 +96841,7 @@
96828
96841
  },
96829
96842
  };
96830
96843
  }
96831
- // version: 1.451.0-dev3-debcd48191
96844
+ // version: 1.451.0-dev5-24c4844020
96832
96845
 
96833
96846
  function findExecutableOperation$1(input) {
96834
96847
  const operations = input.query.definitions.filter(
@@ -99537,7 +99550,7 @@
99537
99550
  id: '@salesforce/lds-network-adapter',
99538
99551
  instrument: instrument$2,
99539
99552
  });
99540
- // version: 1.451.0-dev3-debcd48191
99553
+ // version: 1.451.0-dev5-24c4844020
99541
99554
 
99542
99555
  const { create: create$2, keys: keys$2 } = Object;
99543
99556
  const { stringify, parse } = JSON;
@@ -107072,7 +107085,7 @@
107072
107085
  cb(graphql_v1_import, graphql_imperative$1, graphql_imperative_legacy_v1_import, graphql_state_manager, useOneStoreGraphQL);
107073
107086
  }
107074
107087
  }
107075
- // version: 1.451.0-dev3-5cd7743c69
107088
+ // version: 1.451.0-dev5-0eda94ec17
107076
107089
 
107077
107090
  function createFragmentMap(documentNode) {
107078
107091
  const fragments = {};
@@ -136315,7 +136328,7 @@
136315
136328
  configuration: { ...configurationForGraphQLAdapters$1 },
136316
136329
  instrument: instrument$1,
136317
136330
  });
136318
- // version: 1.451.0-dev3-5cd7743c69
136331
+ // version: 1.451.0-dev5-0eda94ec17
136319
136332
 
136320
136333
  // On core the unstable adapters are re-exported with different names,
136321
136334
  // we want to match them here.
@@ -136467,7 +136480,7 @@
136467
136480
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
136468
136481
  graphQLImperative = ldsAdapter;
136469
136482
  });
136470
- // version: 1.451.0-dev3-5cd7743c69
136483
+ // version: 1.451.0-dev5-0eda94ec17
136471
136484
 
136472
136485
  var gqlApi = /*#__PURE__*/Object.freeze({
136473
136486
  __proto__: null,
@@ -137266,7 +137279,7 @@
137266
137279
  function register(r) {
137267
137280
  callbacks$1.forEach((callback) => callback(r));
137268
137281
  }
137269
- // version: 1.451.0-dev3-debcd48191
137282
+ // version: 1.451.0-dev5-24c4844020
137270
137283
 
137271
137284
  /**
137272
137285
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -138576,4 +138589,4 @@
138576
138589
  exports.subscribeToAdapter = subscribeToAdapter;
138577
138590
 
138578
138591
  }));
138579
- // version: 1.451.0-dev3-debcd48191
138592
+ // version: 1.451.0-dev5-24c4844020
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-worker-api",
3
- "version": "1.451.0-dev3",
3
+ "version": "1.451.0-dev5",
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.451.0-dev3",
39
- "@salesforce/lds-adapters-uiapi": "^1.451.0-dev3",
40
- "@salesforce/lds-default-luvio": "^1.451.0-dev3",
41
- "@salesforce/lds-drafts": "^1.451.0-dev3",
42
- "@salesforce/lds-graphql-parser": "^1.451.0-dev3",
43
- "@salesforce/lds-luvio-engine": "^1.451.0-dev3",
44
- "@salesforce/lds-runtime-mobile": "^1.451.0-dev3",
45
- "@salesforce/nimbus-plugin-lds": "^1.451.0-dev3",
38
+ "@salesforce/lds-adapters-graphql": "^1.451.0-dev5",
39
+ "@salesforce/lds-adapters-uiapi": "^1.451.0-dev5",
40
+ "@salesforce/lds-default-luvio": "^1.451.0-dev5",
41
+ "@salesforce/lds-drafts": "^1.451.0-dev5",
42
+ "@salesforce/lds-graphql-parser": "^1.451.0-dev5",
43
+ "@salesforce/lds-luvio-engine": "^1.451.0-dev5",
44
+ "@salesforce/lds-runtime-mobile": "^1.451.0-dev5",
45
+ "@salesforce/nimbus-plugin-lds": "^1.451.0-dev5",
46
46
  "ajv": "^8.11.0",
47
47
  "glob": "^7.1.5",
48
48
  "nimbus-types": "^2.0.0-alpha1",