@salesforce/lds-runtime-aura 1.377.0 → 1.377.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.
@@ -23,7 +23,7 @@ import applyPredictionRequestLimit from '@salesforce/gate/lds.pdl.applyRequestLi
23
23
  import useLocalStorage from '@salesforce/gate/lds.pdl.useLocalStorage';
24
24
  import useOneStoreGraphql from '@salesforce/gate/lds.oneStoreGraphqlEnabled.ltng';
25
25
  import { GetApexWireAdapterFactory, registerPrefetcher as registerPrefetcher$1 } from 'force/ldsAdaptersApex';
26
- import { getRecordAvatarsAdapterFactory, getRecordAdapterFactory, coerceFieldIdArray, getRecordsAdapterFactory, getRecordActionsAdapterFactory, getObjectInfosAdapterFactory, coerceObjectIdArray, getObjectInfoAdapterFactory, coerceObjectId, getRelatedListsActionsAdapterFactory, getRelatedListInfoBatchAdapterFactory, getRelatedListInfoAdapterFactory, getRelatedListRecordsBatchAdapterFactory, getRelatedListRecordsAdapterFactory, getListInfoByNameAdapterFactory, getListInfosByObjectNameAdapterFactory, getListRecordsByNameAdapterFactory, getListObjectInfoAdapterFactory, getRelatedListsInfoAdapterFactory, getRelatedListActionsAdapterFactory, getRecordId18Array, instrument, configuration, InMemoryRecordRepresentationQueryEvaluator, UiApiNamespace, RecordRepresentationRepresentationType, registerPrefetcher } from 'force/ldsAdaptersUiapi';
26
+ import { getRecordAvatarsAdapterFactory, getRecordAdapterFactory, coerceFieldIdArray, getRecordsAdapterFactory, getRecordActionsAdapterFactory, getObjectInfosAdapterFactory, coerceObjectIdArray, getObjectInfoAdapterFactory, coerceObjectId, getRelatedListsActionsAdapterFactory, getRelatedListInfoBatchAdapterFactory, getRelatedListInfoAdapterFactory, getRelatedListRecordsBatchAdapterFactory, getRelatedListRecordsAdapterFactory, getListInfoByNameAdapterFactory, getListInfosByObjectNameAdapterFactory, getListRecordsByNameAdapterFactory, getListObjectInfoAdapterFactory, getRelatedListsInfoAdapterFactory, getRelatedListActionsAdapterFactory, getRecordId18Array, instrument, buildRecordRepKeyFromId, configuration, InMemoryRecordRepresentationQueryEvaluator, UiApiNamespace, RecordRepresentationRepresentationType, registerPrefetcher, RecordRepresentationVersion } from 'force/ldsAdaptersUiapi';
27
27
  import { getInstrumentation } from 'o11y/client';
28
28
  import { buildGraphQLInputExtension } from 'force/luvioGraphqlNormalization';
29
29
  import { print } from 'force/luvioOnestoreGraphqlParser';
@@ -286,7 +286,7 @@ let NetworkCommand$1 = class NetworkCommand extends BaseCommand {
286
286
  async afterRequestHooks(_options) {
287
287
  }
288
288
  };
289
- function buildServiceDescriptor$i() {
289
+ function buildServiceDescriptor$j() {
290
290
  return {
291
291
  type: "networkCommandBaseClass",
292
292
  version: "1.0",
@@ -388,7 +388,7 @@ class AuraNetworkCommand extends NetworkCommand$1 {
388
388
  return resolvedPromiseLike$3(err$1(toError("Aura/Fetch network services not found")));
389
389
  }
390
390
  }
391
- function buildServiceDescriptor$h() {
391
+ function buildServiceDescriptor$i() {
392
392
  return {
393
393
  type: "auraNetworkCommandBaseClass",
394
394
  version: "1.0",
@@ -895,7 +895,7 @@ class AuraResourceCacheControlCommand extends AuraCacheControlCommand$1 {
895
895
  return `{"endpoint":${this.endpoint},"params":${stableJSONStringify$2(this.auraParams)}}`;
896
896
  }
897
897
  }
898
- function buildServiceDescriptor$g() {
898
+ function buildServiceDescriptor$h() {
899
899
  return {
900
900
  type: "auraResourceCacheControlCommand",
901
901
  version: "1.0",
@@ -1034,7 +1034,7 @@ class AuraNormalizedCacheControlCommand extends AuraCacheControlCommand {
1034
1034
  return resolvedPromiseLike$3(void 0);
1035
1035
  }
1036
1036
  }
1037
- function buildServiceDescriptor$f() {
1037
+ function buildServiceDescriptor$g() {
1038
1038
  return {
1039
1039
  type: "auraNormalizedCacheControlCommand",
1040
1040
  version: "1.0",
@@ -1123,7 +1123,7 @@ class HttpNormalizedCacheControlCommand extends HttpCacheControlCommand {
1123
1123
  return resolvedPromiseLike$3(void 0);
1124
1124
  }
1125
1125
  }
1126
- function buildServiceDescriptor$e() {
1126
+ function buildServiceDescriptor$f() {
1127
1127
  return {
1128
1128
  type: "httpNormalizedCacheControlCommand",
1129
1129
  version: "1.0",
@@ -1230,7 +1230,7 @@ class FetchNetworkCommand extends NetworkCommand {
1230
1230
  );
1231
1231
  }
1232
1232
  }
1233
- function buildServiceDescriptor$d() {
1233
+ function buildServiceDescriptor$e() {
1234
1234
  return {
1235
1235
  type: "fetchNetworkCommandBaseClass",
1236
1236
  version: "1.0",
@@ -1266,7 +1266,7 @@ class StreamingCommand extends BaseCommand {
1266
1266
  );
1267
1267
  }
1268
1268
  }
1269
- function buildServiceDescriptor$c() {
1269
+ function buildServiceDescriptor$d() {
1270
1270
  return {
1271
1271
  type: "streamingCommandBaseClass",
1272
1272
  version: "1.0",
@@ -1349,7 +1349,7 @@ class SSEParsingStream extends TransformStream {
1349
1349
  });
1350
1350
  }
1351
1351
  }
1352
- function buildServiceDescriptor$b() {
1352
+ function buildServiceDescriptor$c() {
1353
1353
  return {
1354
1354
  type: "SSECommandBaseClass",
1355
1355
  version: "1.0",
@@ -1395,7 +1395,7 @@ function buildInstrumentCommand(services) {
1395
1395
  };
1396
1396
  };
1397
1397
  }
1398
- function buildServiceDescriptor$a(instrumentation) {
1398
+ function buildServiceDescriptor$b(instrumentation) {
1399
1399
  return {
1400
1400
  type: "instrumentCommand",
1401
1401
  version: "1.0",
@@ -1665,7 +1665,7 @@ class O11yInstrumentation {
1665
1665
  this.metrics = new O11yOTelMetricsAPI(this.services);
1666
1666
  }
1667
1667
  }
1668
- function buildServiceDescriptor$9(logger) {
1668
+ function buildServiceDescriptor$a(logger) {
1669
1669
  return {
1670
1670
  type: "instrumentation",
1671
1671
  version: "1.0",
@@ -1918,7 +1918,7 @@ class DefaultCache {
1918
1918
  return new FixedTimeWritableCache(this, generatedTime);
1919
1919
  }
1920
1920
  }
1921
- function buildServiceDescriptor$8() {
1921
+ function buildServiceDescriptor$9() {
1922
1922
  return {
1923
1923
  type: "cache",
1924
1924
  version: "1.0",
@@ -2086,7 +2086,7 @@ class CacheController {
2086
2086
  yield* this.services.cacheInclusionPolicy.findAndModify(query, cacheUpdate);
2087
2087
  }
2088
2088
  }
2089
- function buildServiceDescriptor$7(cache, cacheInclusionPolicy) {
2089
+ function buildServiceDescriptor$8(cache, cacheInclusionPolicy) {
2090
2090
  return {
2091
2091
  type: "cacheController",
2092
2092
  version: "1.0",
@@ -2196,7 +2196,7 @@ class DefaultPubSubService {
2196
2196
  return matchingSubscriptions;
2197
2197
  }
2198
2198
  }
2199
- function buildServiceDescriptor$6() {
2199
+ function buildServiceDescriptor$7() {
2200
2200
  return {
2201
2201
  type: "pubSub",
2202
2202
  version: "1.0",
@@ -2259,7 +2259,7 @@ class NDJSONParsingStream extends TransformStream {
2259
2259
  });
2260
2260
  }
2261
2261
  }
2262
- function buildServiceDescriptor$5() {
2262
+ function buildServiceDescriptor$6() {
2263
2263
  return {
2264
2264
  type: "NDJSONCommandBaseClass",
2265
2265
  version: "1.0",
@@ -2300,7 +2300,7 @@ function buildServiceDescriptor$5() {
2300
2300
  * };
2301
2301
  * ```
2302
2302
  */
2303
- function buildServiceDescriptor$4(luvio) {
2303
+ function buildServiceDescriptor$5(luvio) {
2304
2304
  return {
2305
2305
  type: 'luvio',
2306
2306
  version: '1.0',
@@ -2309,7 +2309,7 @@ function buildServiceDescriptor$4(luvio) {
2309
2309
  },
2310
2310
  };
2311
2311
  }
2312
- // version: 1.377.0-b0d5c49e07
2312
+ // version: 1.377.1-db77d3f339
2313
2313
 
2314
2314
  /*!
2315
2315
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -2462,7 +2462,7 @@ class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheContro
2462
2462
  });
2463
2463
  }
2464
2464
  }
2465
- function buildServiceDescriptor$3() {
2465
+ function buildServiceDescriptor$4() {
2466
2466
  return {
2467
2467
  type: "auraGraphQLNormalizedCacheControlCommand",
2468
2468
  version: "1.0",
@@ -2572,7 +2572,7 @@ class HttpGraphQLNormalizedCacheControlCommand extends HttpNormalizedCacheContro
2572
2572
  });
2573
2573
  }
2574
2574
  }
2575
- function buildServiceDescriptor$2() {
2575
+ function buildServiceDescriptor$3() {
2576
2576
  return {
2577
2577
  type: "httpGraphQLNormalizedCacheControlCommand",
2578
2578
  version: "1.0",
@@ -2596,7 +2596,7 @@ class FeatureFlagsService {
2596
2596
  return this.flags.get(flagName) || defaultValue;
2597
2597
  }
2598
2598
  }
2599
- function buildServiceDescriptor$1() {
2599
+ function buildServiceDescriptor$2() {
2600
2600
  return {
2601
2601
  version: "1.0",
2602
2602
  service: new FeatureFlagsService(),
@@ -2604,6 +2604,32 @@ function buildServiceDescriptor$1() {
2604
2604
  };
2605
2605
  }
2606
2606
 
2607
+ /**
2608
+ * Copyright (c) 2022, Salesforce, Inc.,
2609
+ * All rights reserved.
2610
+ * For full license text, see the LICENSE.txt file
2611
+ */
2612
+
2613
+ /*
2614
+ * ATTENTION!
2615
+ * THIS IS A GENERATED FILE FROM https://github.com/salesforce-experience-platform-emu/lds-lightning-platform
2616
+ * If you would like to contribute to LDS, please follow the steps outlined in the git repo.
2617
+ * Any changes made to this file in p4 will be automatically overwritten.
2618
+ * *******************************************************************************************
2619
+ */
2620
+ /* proxy-compat-disable */
2621
+ function buildServiceDescriptor$1(notifyRecordUpdateAvailable, getNormalizedLuvioRecord) {
2622
+ return {
2623
+ type: 'luvioUiapiRecords',
2624
+ version: '1.0',
2625
+ service: {
2626
+ notifyRecordUpdateAvailable,
2627
+ getNormalizedLuvioRecord,
2628
+ },
2629
+ };
2630
+ }
2631
+ // version: 1.377.1-db77d3f339
2632
+
2607
2633
  /*!
2608
2634
  * Copyright (c) 2022, Salesforce, Inc.,
2609
2635
  * All rights reserved.
@@ -6097,7 +6123,7 @@ function getEnvironmentSetting(name) {
6097
6123
  }
6098
6124
  return undefined;
6099
6125
  }
6100
- // version: 1.377.0-b0d5c49e07
6126
+ // version: 1.377.1-db77d3f339
6101
6127
 
6102
6128
  const forceRecordTransactionsDisabled = getEnvironmentSetting(EnvironmentSettings.ForceRecordTransactionsDisabled);
6103
6129
  //TODO: Some duplication here that can be most likely moved to a util class
@@ -6871,6 +6897,21 @@ function saveRequestAsPrediction(request) {
6871
6897
  __lexPrefetcher.saveRequest(request);
6872
6898
  }
6873
6899
  }
6900
+ // This is copied from lds-adapters-uiapi because the exports are totally messed up
6901
+ const notifyUpdateAvailableFactory = (luvio) => {
6902
+ return function notifyRecordUpdateAvailable(configs) {
6903
+ if (process.env.NODE_ENV !== 'production') {
6904
+ const requiredKeyParams = ['recordId'];
6905
+ configs.forEach((config) => {
6906
+ if (false === requiredKeyParams.every((req) => req in config)) {
6907
+ throw new Error(`one of the configs did not contain all required parameters`);
6908
+ }
6909
+ });
6910
+ }
6911
+ const keys = configs.map((c) => buildRecordRepKeyFromId(c.recordId));
6912
+ return luvio.notifyStoreUpdateAvailable(keys);
6913
+ };
6914
+ };
6874
6915
  /**
6875
6916
  * @typedef {Object} RecordHomePageContext
6876
6917
  * @property {string} objectApiName - The API name of the object.
@@ -6980,11 +7021,32 @@ function initializeLDS() {
6980
7021
  // Initializes OneStore in LEX
6981
7022
  function initializeOneStore(luvio) {
6982
7023
  const loggerService = new ConsoleLogger$1('ERROR');
6983
- const cacheServiceDescriptor = buildServiceDescriptor$8();
6984
- const instrumentationServiceDescriptor = buildServiceDescriptor$9(loggerService);
7024
+ const cacheServiceDescriptor = buildServiceDescriptor$9();
7025
+ const instrumentationServiceDescriptor = buildServiceDescriptor$a(loggerService);
6985
7026
  const inMemoryCacheInclusionPolicyServiceDescriptor = buildInMemoryCacheInclusionPolicyService(cacheServiceDescriptor.service);
6986
- const featureFlagsServiceDescriptor = buildServiceDescriptor$1();
7027
+ const featureFlagsServiceDescriptor = buildServiceDescriptor$2();
6987
7028
  const featureFlagsService = featureFlagsServiceDescriptor.service;
7029
+ const luvioUiapiRecordsServiceDescriptor = buildServiceDescriptor$1((configs) => {
7030
+ return notifyUpdateAvailableFactory(luvio)(configs);
7031
+ }, (recordId, reader) => {
7032
+ const recordKey = buildRecordRepKeyFromId(recordId);
7033
+ reader.markSeenId(recordKey);
7034
+ const linkedData = reader.read({
7035
+ recordId: recordKey,
7036
+ node: {
7037
+ kind: 'Fragment',
7038
+ private: [],
7039
+ opaque: true,
7040
+ version: RecordRepresentationVersion,
7041
+ },
7042
+ variables: {},
7043
+ });
7044
+ if (linkedData.data === undefined) {
7045
+ reader.markMissingLink(recordKey);
7046
+ return undefined;
7047
+ }
7048
+ return linkedData.data;
7049
+ });
6988
7050
  // set flags based on gates
6989
7051
  featureFlagsService.set('useOneStoreGraphQL', useOneStoreGraphql.isOpen({ fallback: false }));
6990
7052
  const services = [
@@ -6993,22 +7055,23 @@ function initializeOneStore(luvio) {
6993
7055
  buildJwtAuthorizedSfapFetchServiceDescriptor(loggerService),
6994
7056
  buildCopilotFetchServiceDescriptor(loggerService),
6995
7057
  buildAuraNetworkService(),
6996
- buildServiceDescriptor$a(instrumentationServiceDescriptor.service),
6997
- buildServiceDescriptor$7(cacheServiceDescriptor.service, inMemoryCacheInclusionPolicyServiceDescriptor.service),
6998
- buildServiceDescriptor$h(),
6999
- buildServiceDescriptor$5(),
7000
- buildServiceDescriptor$d(),
7058
+ buildServiceDescriptor$b(instrumentationServiceDescriptor.service),
7059
+ buildServiceDescriptor$8(cacheServiceDescriptor.service, inMemoryCacheInclusionPolicyServiceDescriptor.service),
7001
7060
  buildServiceDescriptor$i(),
7061
+ buildServiceDescriptor$6(),
7062
+ buildServiceDescriptor$e(),
7063
+ buildServiceDescriptor$j(),
7064
+ buildServiceDescriptor$d(),
7002
7065
  buildServiceDescriptor$c(),
7003
- buildServiceDescriptor$b(),
7066
+ buildServiceDescriptor$h(),
7004
7067
  buildServiceDescriptor$g(),
7005
7068
  buildServiceDescriptor$f(),
7006
- buildServiceDescriptor$e(),
7007
- buildServiceDescriptor$6(),
7069
+ buildServiceDescriptor$7(),
7008
7070
  buildLexRuntimeFetchServiceDescriptor(loggerService),
7009
- buildServiceDescriptor$4(luvio),
7071
+ buildServiceDescriptor$5(luvio),
7072
+ luvioUiapiRecordsServiceDescriptor,
7073
+ buildServiceDescriptor$4(),
7010
7074
  buildServiceDescriptor$3(),
7011
- buildServiceDescriptor$2(),
7012
7075
  featureFlagsServiceDescriptor,
7013
7076
  ];
7014
7077
  setServices(services);
@@ -7028,5 +7091,5 @@ function ldsEngineCreator() {
7028
7091
  return { name: 'ldsEngineCreator' };
7029
7092
  }
7030
7093
 
7031
- export { LexRequestStrategy, PdlRequestPriority, buildPredictorForContext, ldsEngineCreator as default, initializeLDS, initializeOneStore, registerRequestStrategy, saveRequestAsPrediction, unregisterRequestStrategy, whenPredictionsReady };
7032
- // version: 1.377.0-3c95caf11c
7094
+ export { LexRequestStrategy, PdlRequestPriority, buildPredictorForContext, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, unregisterRequestStrategy, whenPredictionsReady };
7095
+ // version: 1.377.1-dadb6358f3
@@ -1,4 +1,5 @@
1
1
  import { Luvio } from '@luvio/engine';
2
+ import { KeyParamsRecord } from '@salesforce/lds-adapters-uiapi';
2
3
  import { ObjectHomePageContext, type RecordHomePageContext } from './predictive-loading';
3
4
  import type { LexRequestStrategy } from './predictive-loading/request-strategy/lex-request-strategy';
4
5
  import { type LexRequest } from './predictive-loading/lex';
@@ -18,6 +19,7 @@ export declare function registerRequestStrategy(...requestStrategy: LexRequestSt
18
19
  export declare function unregisterRequestStrategy(...requestStrategy: LexRequestStrategy[]): boolean | boolean[];
19
20
  export declare function whenPredictionsReady(callback: () => void): void;
20
21
  export declare function saveRequestAsPrediction(request: LexRequest): void;
22
+ export declare const notifyUpdateAvailableFactory: (luvio: Luvio) => (configs: Partial<KeyParamsRecord>[]) => Promise<void>;
21
23
  /**
22
24
  * @typedef {Object} RecordHomePageContext
23
25
  * @property {string} objectApiName - The API name of the object.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-aura",
3
- "version": "1.377.0",
3
+ "version": "1.377.1",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for Aura runtime",
6
6
  "main": "dist/ldsEngineCreator.js",
@@ -36,15 +36,15 @@
36
36
  "devDependencies": {
37
37
  "@luvio/service-provisioner": "5.54.0",
38
38
  "@luvio/tools-core": "5.54.0",
39
- "@salesforce/lds-adapters-apex": "^1.377.0",
40
- "@salesforce/lds-adapters-uiapi": "^1.377.0",
39
+ "@salesforce/lds-adapters-apex": "^1.377.1",
40
+ "@salesforce/lds-adapters-uiapi": "^1.377.1",
41
41
  "@salesforce/lds-adapters-uiapi-lex": "^1.371.0",
42
- "@salesforce/lds-ads-bridge": "^1.377.0",
43
- "@salesforce/lds-aura-storage": "^1.377.0",
44
- "@salesforce/lds-bindings": "^1.377.0",
45
- "@salesforce/lds-instrumentation": "^1.377.0",
46
- "@salesforce/lds-network-aura": "^1.377.0",
47
- "@salesforce/lds-network-fetch": "^1.377.0",
42
+ "@salesforce/lds-ads-bridge": "^1.377.1",
43
+ "@salesforce/lds-aura-storage": "^1.377.1",
44
+ "@salesforce/lds-bindings": "^1.377.1",
45
+ "@salesforce/lds-instrumentation": "^1.377.1",
46
+ "@salesforce/lds-network-aura": "^1.377.1",
47
+ "@salesforce/lds-network-fetch": "^1.377.1",
48
48
  "jwt-encode": "1.0.1"
49
49
  },
50
50
  "dependencies": {
@@ -71,9 +71,10 @@
71
71
  "@luvio/service-pubsub": "5.54.0",
72
72
  "@luvio/service-store": "5.54.0",
73
73
  "@luvio/utils": "5.54.0",
74
- "@salesforce/lds-adapters-onestore-graphql": "^1.377.0",
75
- "@salesforce/lds-adapters-uiapi-lex": "^1.377.0",
76
- "@salesforce/lds-luvio-service": "^1.377.0"
74
+ "@salesforce/lds-adapters-onestore-graphql": "^1.377.1",
75
+ "@salesforce/lds-adapters-uiapi-lex": "^1.377.1",
76
+ "@salesforce/lds-luvio-service": "^1.377.1",
77
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.377.1"
77
78
  },
78
79
  "luvioBundlesize": [
79
80
  {