@salesforce/lds-worker-api 1.237.0 → 1.239.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.
@@ -796,4 +796,4 @@ if (process.env.NODE_ENV !== 'production') {
796
796
  }
797
797
 
798
798
  export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
799
- // version: 1.237.0-5cc894ce9
799
+ // version: 1.239.0-6c531185a
@@ -3982,7 +3982,7 @@ function withDefaultLuvio(callback) {
3982
3982
  }
3983
3983
  callbacks.push(callback);
3984
3984
  }
3985
- // version: 1.237.0-5cc894ce9
3985
+ // version: 1.239.0-6c531185a
3986
3986
 
3987
3987
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
3988
3988
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -15443,7 +15443,7 @@ function gql(literals, ...subs) {
15443
15443
  }
15444
15444
  return superResult;
15445
15445
  }
15446
- // version: 1.237.0-5cc894ce9
15446
+ // version: 1.239.0-6c531185a
15447
15447
 
15448
15448
  function unwrap(data) {
15449
15449
  // The lwc-luvio bindings import a function from lwc called "unwrap".
@@ -16368,7 +16368,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
16368
16368
  const { apiFamily, name } = metadata;
16369
16369
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
16370
16370
  }
16371
- // version: 1.237.0-5cc894ce9
16371
+ // version: 1.239.0-6c531185a
16372
16372
 
16373
16373
  /**
16374
16374
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -41538,7 +41538,7 @@ withDefaultLuvio((luvio) => {
41538
41538
  throttle(60, 60000, createLDSAdapter(luvio, 'notifyListInfoUpdateAvailable', notifyUpdateAvailableFactory$1));
41539
41539
  throttle(60, 60000, createLDSAdapter(luvio, 'notifyQuickActionDefaultsUpdateAvailable', notifyUpdateAvailableFactory));
41540
41540
  });
41541
- // version: 1.237.0-7b19a35c5
41541
+ // version: 1.239.0-7d2be7b39
41542
41542
 
41543
41543
  var caseSensitiveUserId = '005B0000000GR4OIAW';
41544
41544
 
@@ -46004,8 +46004,8 @@ function rootRecordQuery(selection, input) {
46004
46004
  // If there is no metadata for this query or it somehow lacks a timestamp
46005
46005
  // skip setting the root timestamp
46006
46006
  if (queryMetadata !== undefined && queryMetadata.ingestionTimestamp !== undefined) {
46007
- // subtract 10ms from timestamp to account for ingestion processing time
46008
- input.rootTimestamp = queryMetadata.ingestionTimestamp - 10;
46007
+ // subtract 1000ms from timestamp to account for ingestion processing time
46008
+ input.rootTimestamp = queryMetadata.ingestionTimestamp - 1000;
46009
46009
  }
46010
46010
  }
46011
46011
  return recordQuery(selection, alias, apiName, [], input);
@@ -50832,8 +50832,8 @@ async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
50832
50832
  const results = await query(sql, [key]);
50833
50833
  const [timestamp] = results.rows.map((row) => row[0]);
50834
50834
  if (timestamp !== null && typeof timestamp === 'number') {
50835
- //go back 10 ms to adjust for margin of error when top level query is stored and when raml objects are stored
50836
- ingestionTimestamp = timestamp - 10;
50835
+ //go back 1000 ms to adjust for margin of error when top level query is stored and when raml objects are stored
50836
+ ingestionTimestamp = timestamp - 1000;
50837
50837
  }
50838
50838
  }
50839
50839
  return ingestionTimestamp;
@@ -56927,10 +56927,17 @@ class NimbusSqliteStore {
56927
56927
  }
56928
56928
  setMetadata(entries, segment) {
56929
56929
  const table = this.getTable(segment);
56930
- const operation = this.plugin.supportsBatchUpdates === undefined ||
56931
- this.plugin.supportsBatchUpdates() === false
56932
- ? table.entriesToUpsertOperations(entries, segment)
56933
- : table.metadataToUpdateOperations(entries, segment);
56930
+ let operation;
56931
+ if (this.plugin.supportsBatchUpdates === undefined ||
56932
+ this.plugin.supportsBatchUpdates() === false) {
56933
+ operation = table.entriesToUpsertOperations(entries, segment);
56934
+ // manually set the context type on the upsert so notifications do not notify rebuilds without
56935
+ // plugin updates
56936
+ operation.context.type = 'setMetadata';
56937
+ }
56938
+ else {
56939
+ operation = table.metadataToUpdateOperations(entries, segment);
56940
+ }
56934
56941
  return this.batchOperationAsPromise([operation]);
56935
56942
  }
56936
56943
  batchOperations(operations) {
@@ -56943,7 +56950,11 @@ class NimbusSqliteStore {
56943
56950
  const table = this.getTable(cur.segment);
56944
56951
  if (this.plugin.supportsBatchUpdates === undefined ||
56945
56952
  this.plugin.supportsBatchUpdates() === false) {
56946
- acc.push(table.entriesToUpsertOperations(cur.entries, cur.segment));
56953
+ const upsert = table.entriesToUpsertOperations(cur.entries, cur.segment);
56954
+ // manually set the context type on the upsert so notifications do not notify rebuilds without
56955
+ // plugin updates
56956
+ upsert.context.type = 'setMetadata';
56957
+ acc.push(upsert);
56947
56958
  }
56948
56959
  else {
56949
56960
  acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
@@ -56969,7 +56980,8 @@ class NimbusSqliteStore {
56969
56980
  // if our context contains a type then set that as our main level type
56970
56981
  // allows us in the future of updates to specify the segment change happening
56971
56982
  // example being update call on metadata only or updating data
56972
- if (c.type === 'update' && c.context.type !== undefined) {
56983
+ if ((c.type === 'update' || c.type === 'upsert') &&
56984
+ c.context.type !== undefined) {
56973
56985
  type = c.context.type;
56974
56986
  }
56975
56987
  return {
@@ -58513,7 +58525,7 @@ register({
58513
58525
  id: '@salesforce/lds-network-adapter',
58514
58526
  instrument: instrument$1,
58515
58527
  });
58516
- // version: 1.237.0-5cc894ce9
58528
+ // version: 1.239.0-6c531185a
58517
58529
 
58518
58530
  const { create: create$2, keys: keys$2 } = Object;
58519
58531
  const { stringify: stringify$1, parse: parse$1 } = JSON;
@@ -76984,7 +76996,7 @@ register({
76984
76996
  configuration: { ...configurationForGraphQLAdapters },
76985
76997
  instrument,
76986
76998
  });
76987
- // version: 1.237.0-7b19a35c5
76999
+ // version: 1.239.0-7d2be7b39
76988
77000
 
76989
77001
  // On core the unstable adapters are re-exported with different names,
76990
77002
  // we want to match them here.
@@ -79233,7 +79245,7 @@ withDefaultLuvio((luvio) => {
79233
79245
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
79234
79246
  graphQLImperative = ldsAdapter;
79235
79247
  });
79236
- // version: 1.237.0-7b19a35c5
79248
+ // version: 1.239.0-7d2be7b39
79237
79249
 
79238
79250
  var gqlApi = /*#__PURE__*/Object.freeze({
79239
79251
  __proto__: null,
@@ -79950,4 +79962,4 @@ const { luvio } = getRuntime();
79950
79962
  setDefaultLuvio({ luvio });
79951
79963
 
79952
79964
  export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
79953
- // version: 1.237.0-5cc894ce9
79965
+ // version: 1.239.0-6c531185a
@@ -3988,7 +3988,7 @@
3988
3988
  }
3989
3989
  callbacks.push(callback);
3990
3990
  }
3991
- // version: 1.237.0-5cc894ce9
3991
+ // version: 1.239.0-6c531185a
3992
3992
 
3993
3993
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
3994
3994
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -15449,7 +15449,7 @@
15449
15449
  }
15450
15450
  return superResult;
15451
15451
  }
15452
- // version: 1.237.0-5cc894ce9
15452
+ // version: 1.239.0-6c531185a
15453
15453
 
15454
15454
  function unwrap(data) {
15455
15455
  // The lwc-luvio bindings import a function from lwc called "unwrap".
@@ -16374,7 +16374,7 @@
16374
16374
  const { apiFamily, name } = metadata;
16375
16375
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
16376
16376
  }
16377
- // version: 1.237.0-5cc894ce9
16377
+ // version: 1.239.0-6c531185a
16378
16378
 
16379
16379
  /**
16380
16380
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -41544,7 +41544,7 @@
41544
41544
  throttle(60, 60000, createLDSAdapter(luvio, 'notifyListInfoUpdateAvailable', notifyUpdateAvailableFactory$1));
41545
41545
  throttle(60, 60000, createLDSAdapter(luvio, 'notifyQuickActionDefaultsUpdateAvailable', notifyUpdateAvailableFactory));
41546
41546
  });
41547
- // version: 1.237.0-7b19a35c5
41547
+ // version: 1.239.0-7d2be7b39
41548
41548
 
41549
41549
  var caseSensitiveUserId = '005B0000000GR4OIAW';
41550
41550
 
@@ -46010,8 +46010,8 @@
46010
46010
  // If there is no metadata for this query or it somehow lacks a timestamp
46011
46011
  // skip setting the root timestamp
46012
46012
  if (queryMetadata !== undefined && queryMetadata.ingestionTimestamp !== undefined) {
46013
- // subtract 10ms from timestamp to account for ingestion processing time
46014
- input.rootTimestamp = queryMetadata.ingestionTimestamp - 10;
46013
+ // subtract 1000ms from timestamp to account for ingestion processing time
46014
+ input.rootTimestamp = queryMetadata.ingestionTimestamp - 1000;
46015
46015
  }
46016
46016
  }
46017
46017
  return recordQuery(selection, alias, apiName, [], input);
@@ -50838,8 +50838,8 @@
50838
50838
  const results = await query(sql, [key]);
50839
50839
  const [timestamp] = results.rows.map((row) => row[0]);
50840
50840
  if (timestamp !== null && typeof timestamp === 'number') {
50841
- //go back 10 ms to adjust for margin of error when top level query is stored and when raml objects are stored
50842
- ingestionTimestamp = timestamp - 10;
50841
+ //go back 1000 ms to adjust for margin of error when top level query is stored and when raml objects are stored
50842
+ ingestionTimestamp = timestamp - 1000;
50843
50843
  }
50844
50844
  }
50845
50845
  return ingestionTimestamp;
@@ -56933,10 +56933,17 @@
56933
56933
  }
56934
56934
  setMetadata(entries, segment) {
56935
56935
  const table = this.getTable(segment);
56936
- const operation = this.plugin.supportsBatchUpdates === undefined ||
56937
- this.plugin.supportsBatchUpdates() === false
56938
- ? table.entriesToUpsertOperations(entries, segment)
56939
- : table.metadataToUpdateOperations(entries, segment);
56936
+ let operation;
56937
+ if (this.plugin.supportsBatchUpdates === undefined ||
56938
+ this.plugin.supportsBatchUpdates() === false) {
56939
+ operation = table.entriesToUpsertOperations(entries, segment);
56940
+ // manually set the context type on the upsert so notifications do not notify rebuilds without
56941
+ // plugin updates
56942
+ operation.context.type = 'setMetadata';
56943
+ }
56944
+ else {
56945
+ operation = table.metadataToUpdateOperations(entries, segment);
56946
+ }
56940
56947
  return this.batchOperationAsPromise([operation]);
56941
56948
  }
56942
56949
  batchOperations(operations) {
@@ -56949,7 +56956,11 @@
56949
56956
  const table = this.getTable(cur.segment);
56950
56957
  if (this.plugin.supportsBatchUpdates === undefined ||
56951
56958
  this.plugin.supportsBatchUpdates() === false) {
56952
- acc.push(table.entriesToUpsertOperations(cur.entries, cur.segment));
56959
+ const upsert = table.entriesToUpsertOperations(cur.entries, cur.segment);
56960
+ // manually set the context type on the upsert so notifications do not notify rebuilds without
56961
+ // plugin updates
56962
+ upsert.context.type = 'setMetadata';
56963
+ acc.push(upsert);
56953
56964
  }
56954
56965
  else {
56955
56966
  acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
@@ -56975,7 +56986,8 @@
56975
56986
  // if our context contains a type then set that as our main level type
56976
56987
  // allows us in the future of updates to specify the segment change happening
56977
56988
  // example being update call on metadata only or updating data
56978
- if (c.type === 'update' && c.context.type !== undefined) {
56989
+ if ((c.type === 'update' || c.type === 'upsert') &&
56990
+ c.context.type !== undefined) {
56979
56991
  type = c.context.type;
56980
56992
  }
56981
56993
  return {
@@ -58519,7 +58531,7 @@
58519
58531
  id: '@salesforce/lds-network-adapter',
58520
58532
  instrument: instrument$1,
58521
58533
  });
58522
- // version: 1.237.0-5cc894ce9
58534
+ // version: 1.239.0-6c531185a
58523
58535
 
58524
58536
  const { create: create$2, keys: keys$2 } = Object;
58525
58537
  const { stringify: stringify$1, parse: parse$1 } = JSON;
@@ -76990,7 +77002,7 @@
76990
77002
  configuration: { ...configurationForGraphQLAdapters },
76991
77003
  instrument,
76992
77004
  });
76993
- // version: 1.237.0-7b19a35c5
77005
+ // version: 1.239.0-7d2be7b39
76994
77006
 
76995
77007
  // On core the unstable adapters are re-exported with different names,
76996
77008
  // we want to match them here.
@@ -79239,7 +79251,7 @@
79239
79251
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
79240
79252
  graphQLImperative = ldsAdapter;
79241
79253
  });
79242
- // version: 1.237.0-7b19a35c5
79254
+ // version: 1.239.0-7d2be7b39
79243
79255
 
79244
79256
  var gqlApi = /*#__PURE__*/Object.freeze({
79245
79257
  __proto__: null,
@@ -79971,4 +79983,4 @@
79971
79983
  exports.subscribeToAdapter = subscribeToAdapter;
79972
79984
 
79973
79985
  }));
79974
- // version: 1.237.0-5cc894ce9
79986
+ // version: 1.239.0-6c531185a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-worker-api",
3
- "version": "1.237.0",
3
+ "version": "1.239.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "",
6
6
  "main": "dist/standalone/es/lds-worker-api.js",