@salesforce/lds-worker-api 1.155.0 → 1.156.1

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.
@@ -770,4 +770,4 @@ if (process.env.NODE_ENV !== 'production') {
770
770
  }
771
771
 
772
772
  export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
773
- // version: 1.155.0-96e212d1e
773
+ // version: 1.156.1-7842b5df6
@@ -3799,7 +3799,7 @@ function withDefaultLuvio(callback) {
3799
3799
  }
3800
3800
  callbacks.push(callback);
3801
3801
  }
3802
- // version: 1.155.0-96e212d1e
3802
+ // version: 1.156.1-7842b5df6
3803
3803
 
3804
3804
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
3805
3805
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -15232,7 +15232,7 @@ function parseAndVisit(source) {
15232
15232
  updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
15233
15233
  return luvioDocumentNode;
15234
15234
  }
15235
- // version: 1.155.0-96e212d1e
15235
+ // version: 1.156.1-7842b5df6
15236
15236
 
15237
15237
  function unwrap(data) {
15238
15238
  // The lwc-luvio bindings import a function from lwc called "unwrap".
@@ -16145,7 +16145,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
16145
16145
  const { apiFamily, name } = metadata;
16146
16146
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
16147
16147
  }
16148
- // version: 1.155.0-96e212d1e
16148
+ // version: 1.156.1-7842b5df6
16149
16149
 
16150
16150
  /**
16151
16151
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -44016,7 +44016,7 @@ withDefaultLuvio((luvio) => {
44016
44016
  dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
44017
44017
  });
44018
44018
  });
44019
- // version: 1.155.0-42bd074c3
44019
+ // version: 1.156.1-323bf98b0
44020
44020
 
44021
44021
  var caseSensitiveUserId = '005B0000000GR4OIAW';
44022
44022
 
@@ -48132,38 +48132,32 @@ function recordQuery(selection, apiName, alias, predicates, input) {
48132
48132
  const draftsField = { type: FieldType.Scalar, extract, path: 'node._drafts' };
48133
48133
  const idExtract = { type: ValueType.Extract, jsonAlias: alias, field: 'Id' };
48134
48134
  const idField = { type: FieldType.Scalar, extract: idExtract, path: 'node.Id' };
48135
- // When the exclude stale records gate is open, inject an additional predicate
48136
- // to limit the search to records that either have drafts associated to them or
48137
- // were ingested at least as recently as the query.
48138
- if (excludeStaleRecordsGate.isOpen({ fallback: false })) {
48139
- const key = input.connectionKeyBuilder(selection, input.config.variables);
48140
- const queryMetadata = input.metadata[key];
48141
- // If there is no metadata for this query or it somehow lacks a timestamp
48142
- // skip adding the additional predicates
48143
- if (queryMetadata !== undefined && queryMetadata.ingestionTimestamp !== undefined) {
48144
- const timestamp = queryMetadata.ingestionTimestamp;
48145
- const timestampCheck = {
48146
- type: PredicateType$1.comparison,
48147
- left: {
48148
- type: ValueType.Extract,
48149
- jsonAlias: alias,
48150
- field: 'ingestionTimestamp',
48151
- metadata: true,
48152
- },
48153
- operator: ComparisonOperator.gte,
48154
- right: { type: ValueType.IntLiteral, value: timestamp },
48155
- };
48156
- const isDraft = {
48157
- type: PredicateType$1.nullComparison,
48158
- left: { type: ValueType.Extract, jsonAlias: alias, field: 'drafts' },
48159
- operator: NullComparisonOperator.isNot,
48160
- };
48161
- predicates.push({
48162
- type: PredicateType$1.compound,
48163
- operator: CompoundOperator.or,
48164
- children: [timestampCheck, isDraft],
48165
- });
48166
- }
48135
+ // When the exclude stale records gate is open and there is a root timestamp
48136
+ // in the parser input, inject an additional predicate to limit the search
48137
+ // to records that either have drafts associated to them or were ingested at
48138
+ // least as recently as the query.
48139
+ if (excludeStaleRecordsGate.isOpen({ fallback: false }) && input.rootTimestamp !== undefined) {
48140
+ const timestampCheck = {
48141
+ type: PredicateType$1.comparison,
48142
+ left: {
48143
+ type: ValueType.Extract,
48144
+ jsonAlias: alias,
48145
+ field: 'ingestionTimestamp',
48146
+ metadata: true,
48147
+ },
48148
+ operator: ComparisonOperator.gte,
48149
+ right: { type: ValueType.IntLiteral, value: input.rootTimestamp },
48150
+ };
48151
+ const isDraft = {
48152
+ type: PredicateType$1.nullComparison,
48153
+ left: { type: ValueType.Extract, jsonAlias: alias, field: 'drafts' },
48154
+ operator: NullComparisonOperator.isNot,
48155
+ };
48156
+ predicates.push({
48157
+ type: PredicateType$1.compound,
48158
+ operator: CompoundOperator.or,
48159
+ children: [timestampCheck, isDraft],
48160
+ });
48167
48161
  }
48168
48162
  return queryContainer(internalFields, alias, apiName, predicates).map((result) => {
48169
48163
  const { fields, predicates } = result;
@@ -48213,6 +48207,20 @@ function rootRecordQuery(selection, input) {
48213
48207
  if (input.objectInfoMap[alias] === undefined) {
48214
48208
  return failure([missingObjectInfo(apiName)]);
48215
48209
  }
48210
+ // When the exclude stale records gate is open and the query has an
48211
+ // ingestion timestamp in its cache metadata, associate that with the input
48212
+ // so it can later be used to limit the search to records were ingested at
48213
+ // least as recently as the query.
48214
+ if (excludeStaleRecordsGate.isOpen({ fallback: false })) {
48215
+ const key = input.connectionKeyBuilder(selection, input.config.variables);
48216
+ const queryMetadata = input.metadata[key];
48217
+ // If there is no metadata for this query or it somehow lacks a timestamp
48218
+ // skip setting the root timestamp
48219
+ if (queryMetadata !== undefined && queryMetadata.ingestionTimestamp !== undefined) {
48220
+ // subtract 10ms from timestamp to account for ingestion processing time
48221
+ input.rootTimestamp = queryMetadata.ingestionTimestamp - 10;
48222
+ }
48223
+ }
48216
48224
  return recordQuery(selection, alias, apiName, [], input);
48217
48225
  }
48218
48226
  function rootQuery(recordNodes, input) {
@@ -59907,7 +59915,7 @@ register({
59907
59915
  id: '@salesforce/lds-network-adapter',
59908
59916
  instrument: instrument$1,
59909
59917
  });
59910
- // version: 1.155.0-96e212d1e
59918
+ // version: 1.156.1-7842b5df6
59911
59919
 
59912
59920
  const { create: create$2, keys: keys$2 } = Object;
59913
59921
  const { stringify: stringify$1, parse: parse$1 } = JSON;
@@ -80752,7 +80760,7 @@ register({
80752
80760
  configuration: { ...configurationForGraphQLAdapters },
80753
80761
  instrument,
80754
80762
  });
80755
- // version: 1.155.0-42bd074c3
80763
+ // version: 1.156.1-323bf98b0
80756
80764
 
80757
80765
  // On core the unstable adapters are re-exported with different names,
80758
80766
 
@@ -82999,7 +83007,7 @@ withDefaultLuvio((luvio) => {
82999
83007
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
83000
83008
  graphQLImperative = ldsAdapter;
83001
83009
  });
83002
- // version: 1.155.0-42bd074c3
83010
+ // version: 1.156.1-323bf98b0
83003
83011
 
83004
83012
  var gqlApi = /*#__PURE__*/Object.freeze({
83005
83013
  __proto__: null,
@@ -83688,4 +83696,4 @@ const { luvio } = getRuntime();
83688
83696
  setDefaultLuvio({ luvio });
83689
83697
 
83690
83698
  export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
83691
- // version: 1.155.0-96e212d1e
83699
+ // version: 1.156.1-7842b5df6
@@ -3805,7 +3805,7 @@
3805
3805
  }
3806
3806
  callbacks.push(callback);
3807
3807
  }
3808
- // version: 1.155.0-96e212d1e
3808
+ // version: 1.156.1-7842b5df6
3809
3809
 
3810
3810
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
3811
3811
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -15238,7 +15238,7 @@
15238
15238
  updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
15239
15239
  return luvioDocumentNode;
15240
15240
  }
15241
- // version: 1.155.0-96e212d1e
15241
+ // version: 1.156.1-7842b5df6
15242
15242
 
15243
15243
  function unwrap(data) {
15244
15244
  // The lwc-luvio bindings import a function from lwc called "unwrap".
@@ -16151,7 +16151,7 @@
16151
16151
  const { apiFamily, name } = metadata;
16152
16152
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
16153
16153
  }
16154
- // version: 1.155.0-96e212d1e
16154
+ // version: 1.156.1-7842b5df6
16155
16155
 
16156
16156
  /**
16157
16157
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -44022,7 +44022,7 @@
44022
44022
  dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
44023
44023
  });
44024
44024
  });
44025
- // version: 1.155.0-42bd074c3
44025
+ // version: 1.156.1-323bf98b0
44026
44026
 
44027
44027
  var caseSensitiveUserId = '005B0000000GR4OIAW';
44028
44028
 
@@ -48138,38 +48138,32 @@
48138
48138
  const draftsField = { type: FieldType.Scalar, extract, path: 'node._drafts' };
48139
48139
  const idExtract = { type: ValueType.Extract, jsonAlias: alias, field: 'Id' };
48140
48140
  const idField = { type: FieldType.Scalar, extract: idExtract, path: 'node.Id' };
48141
- // When the exclude stale records gate is open, inject an additional predicate
48142
- // to limit the search to records that either have drafts associated to them or
48143
- // were ingested at least as recently as the query.
48144
- if (excludeStaleRecordsGate.isOpen({ fallback: false })) {
48145
- const key = input.connectionKeyBuilder(selection, input.config.variables);
48146
- const queryMetadata = input.metadata[key];
48147
- // If there is no metadata for this query or it somehow lacks a timestamp
48148
- // skip adding the additional predicates
48149
- if (queryMetadata !== undefined && queryMetadata.ingestionTimestamp !== undefined) {
48150
- const timestamp = queryMetadata.ingestionTimestamp;
48151
- const timestampCheck = {
48152
- type: PredicateType$1.comparison,
48153
- left: {
48154
- type: ValueType.Extract,
48155
- jsonAlias: alias,
48156
- field: 'ingestionTimestamp',
48157
- metadata: true,
48158
- },
48159
- operator: ComparisonOperator.gte,
48160
- right: { type: ValueType.IntLiteral, value: timestamp },
48161
- };
48162
- const isDraft = {
48163
- type: PredicateType$1.nullComparison,
48164
- left: { type: ValueType.Extract, jsonAlias: alias, field: 'drafts' },
48165
- operator: NullComparisonOperator.isNot,
48166
- };
48167
- predicates.push({
48168
- type: PredicateType$1.compound,
48169
- operator: CompoundOperator.or,
48170
- children: [timestampCheck, isDraft],
48171
- });
48172
- }
48141
+ // When the exclude stale records gate is open and there is a root timestamp
48142
+ // in the parser input, inject an additional predicate to limit the search
48143
+ // to records that either have drafts associated to them or were ingested at
48144
+ // least as recently as the query.
48145
+ if (excludeStaleRecordsGate.isOpen({ fallback: false }) && input.rootTimestamp !== undefined) {
48146
+ const timestampCheck = {
48147
+ type: PredicateType$1.comparison,
48148
+ left: {
48149
+ type: ValueType.Extract,
48150
+ jsonAlias: alias,
48151
+ field: 'ingestionTimestamp',
48152
+ metadata: true,
48153
+ },
48154
+ operator: ComparisonOperator.gte,
48155
+ right: { type: ValueType.IntLiteral, value: input.rootTimestamp },
48156
+ };
48157
+ const isDraft = {
48158
+ type: PredicateType$1.nullComparison,
48159
+ left: { type: ValueType.Extract, jsonAlias: alias, field: 'drafts' },
48160
+ operator: NullComparisonOperator.isNot,
48161
+ };
48162
+ predicates.push({
48163
+ type: PredicateType$1.compound,
48164
+ operator: CompoundOperator.or,
48165
+ children: [timestampCheck, isDraft],
48166
+ });
48173
48167
  }
48174
48168
  return queryContainer(internalFields, alias, apiName, predicates).map((result) => {
48175
48169
  const { fields, predicates } = result;
@@ -48219,6 +48213,20 @@
48219
48213
  if (input.objectInfoMap[alias] === undefined) {
48220
48214
  return failure([missingObjectInfo(apiName)]);
48221
48215
  }
48216
+ // When the exclude stale records gate is open and the query has an
48217
+ // ingestion timestamp in its cache metadata, associate that with the input
48218
+ // so it can later be used to limit the search to records were ingested at
48219
+ // least as recently as the query.
48220
+ if (excludeStaleRecordsGate.isOpen({ fallback: false })) {
48221
+ const key = input.connectionKeyBuilder(selection, input.config.variables);
48222
+ const queryMetadata = input.metadata[key];
48223
+ // If there is no metadata for this query or it somehow lacks a timestamp
48224
+ // skip setting the root timestamp
48225
+ if (queryMetadata !== undefined && queryMetadata.ingestionTimestamp !== undefined) {
48226
+ // subtract 10ms from timestamp to account for ingestion processing time
48227
+ input.rootTimestamp = queryMetadata.ingestionTimestamp - 10;
48228
+ }
48229
+ }
48222
48230
  return recordQuery(selection, alias, apiName, [], input);
48223
48231
  }
48224
48232
  function rootQuery(recordNodes, input) {
@@ -59913,7 +59921,7 @@
59913
59921
  id: '@salesforce/lds-network-adapter',
59914
59922
  instrument: instrument$1,
59915
59923
  });
59916
- // version: 1.155.0-96e212d1e
59924
+ // version: 1.156.1-7842b5df6
59917
59925
 
59918
59926
  const { create: create$2, keys: keys$2 } = Object;
59919
59927
  const { stringify: stringify$1, parse: parse$1 } = JSON;
@@ -80758,7 +80766,7 @@
80758
80766
  configuration: { ...configurationForGraphQLAdapters },
80759
80767
  instrument,
80760
80768
  });
80761
- // version: 1.155.0-42bd074c3
80769
+ // version: 1.156.1-323bf98b0
80762
80770
 
80763
80771
  // On core the unstable adapters are re-exported with different names,
80764
80772
 
@@ -83005,7 +83013,7 @@
83005
83013
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
83006
83014
  graphQLImperative = ldsAdapter;
83007
83015
  });
83008
- // version: 1.155.0-42bd074c3
83016
+ // version: 1.156.1-323bf98b0
83009
83017
 
83010
83018
  var gqlApi = /*#__PURE__*/Object.freeze({
83011
83019
  __proto__: null,
@@ -83711,4 +83719,4 @@
83711
83719
  Object.defineProperty(exports, '__esModule', { value: true });
83712
83720
 
83713
83721
  }));
83714
- // version: 1.155.0-96e212d1e
83722
+ // version: 1.156.1-7842b5df6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-worker-api",
3
- "version": "1.155.0",
3
+ "version": "1.156.1",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "",
6
6
  "main": "dist/standalone/es/lds-worker-api.js",