@salesforce/lds-runtime-aura 1.465.0 → 1.466.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.
@@ -13,7 +13,6 @@
13
13
  */
14
14
  /* proxy-compat-disable */
15
15
  import { HttpStatusCode as HttpStatusCode$2, InMemoryStore, Environment, Luvio, InMemoryStoreQueryEvaluator } from 'force/luvioEngine';
16
- import useOneStoreGraphql from '@salesforce/gate/lds.oneStoreGraphqlEnabled.ltng';
17
16
  import usePersistedQueries from '@salesforce/gate/lds.graphqlusepersistedqueries';
18
17
  import { instrument, buildRecordRepKeyFromId, configuration, InMemoryRecordRepresentationQueryEvaluator, UiApiNamespace, RecordRepresentationRepresentationType, RecordRepresentationVersion } from 'force/ldsAdaptersUiapi';
19
18
  import { getInstrumentation } from 'o11y/client';
@@ -40,7 +39,6 @@ import { createStorage, clearStorages } from 'force/ldsDurableStorage';
40
39
  import useHttpUiapiOneRuntime from '@salesforce/gate/lds.useHttpUiapiOneRuntime';
41
40
  import useHttpUiapiAuraSites from '@salesforce/gate/lds.usehttpuiapiaurasites';
42
41
  import auraBasedRequestsEnabled from '@salesforce/gate/ui.services.auraBasedRequests.enabled';
43
- import disableCreateContentDocumentAndVersionHTTPLexRuntime from '@salesforce/gate/lds.lex.http.disableCreateContentDocumentAndVersion';
44
42
  import { registerSubRequestNetworkAdapter } from 'force/ldsNetwork';
45
43
 
46
44
  const { create: create$1, freeze, keys: keys$2, entries: entries$1 } = Object;
@@ -384,13 +382,17 @@ function buildServiceDescriptor$q() {
384
382
  };
385
383
  }
386
384
 
387
- function applyOperationRequestOptions$1(init, operationType) {
388
- if (operationType === void 0) {
385
+ function applyOperationRequestOptions$3(init, operationType, requestOptions) {
386
+ if (operationType === void 0 && requestOptions === void 0) {
389
387
  return init;
390
388
  }
391
389
  return {
392
390
  ...init,
393
- onestore: { ...init?.onestore, retrySafe: operationType === "query" }
391
+ onestore: {
392
+ ...requestOptions,
393
+ ...init?.onestore,
394
+ ...operationType !== void 0 && { retrySafe: operationType === "query" }
395
+ }
394
396
  };
395
397
  }
396
398
  class AuraNetworkCommand extends NetworkCommand$1 {
@@ -423,6 +425,10 @@ class AuraNetworkCommand extends NetworkCommand$1 {
423
425
  get operationType() {
424
426
  return void 0;
425
427
  }
428
+ /** Declared `onestore` options (`handleServerError`, `compression`); generated overrides. HTTP fallback only. */
429
+ get requestOptions() {
430
+ return void 0;
431
+ }
426
432
  coerceAuraErrors(auraErrors) {
427
433
  const response = getFetchResponseFromAuraError(auraErrors[0]);
428
434
  return new UserVisibleError(
@@ -529,7 +535,11 @@ class AuraNetworkCommand extends NetworkCommand$1 {
529
535
  );
530
536
  } else if (this.shouldUseFetch()) {
531
537
  const [input, init] = this.fetchParams;
532
- const initWithOptions = applyOperationRequestOptions$1(init, this.operationType);
538
+ const initWithOptions = applyOperationRequestOptions$3(
539
+ init,
540
+ this.operationType,
541
+ this.requestOptions
542
+ );
533
543
  try {
534
544
  const fetchCall = initWithOptions === void 0 ? this.services.fetch(input) : this.services.fetch(input, initWithOptions);
535
545
  return this.convertFetchResponseToData(fetchCall);
@@ -1097,6 +1107,19 @@ function mergeCacheControlConfigs(baseConfig, overrides) {
1097
1107
  };
1098
1108
  }
1099
1109
 
1110
+ function applyOperationRequestOptions$2(init, operationType, requestOptions) {
1111
+ if (operationType === void 0 && requestOptions === void 0) {
1112
+ return init;
1113
+ }
1114
+ return {
1115
+ ...init,
1116
+ onestore: {
1117
+ ...requestOptions,
1118
+ ...init?.onestore,
1119
+ ...operationType !== void 0 && { retrySafe: operationType === "query" }
1120
+ }
1121
+ };
1122
+ }
1100
1123
  class AuraCacheControlCommand extends CacheControlCommand {
1101
1124
  constructor(services) {
1102
1125
  super(services);
@@ -1114,6 +1137,20 @@ class AuraCacheControlCommand extends CacheControlCommand {
1114
1137
  "Fetch parameters must be specified when using HTTP transport on an Aura adapter"
1115
1138
  );
1116
1139
  }
1140
+ /** Declared `onestore` options (`handleServerError`, `compression`); generated overrides. HTTP fallback only. */
1141
+ get requestOptions() {
1142
+ return void 0;
1143
+ }
1144
+ /**
1145
+ * `params` with request options merged into `init.onestore` (see `applyOperationRequestOptions`).
1146
+ * `retrySafe` follows `operationType` (default `'query'`): hand-written writes must override it.
1147
+ */
1148
+ withRequestOptions([
1149
+ input,
1150
+ init
1151
+ ]) {
1152
+ return [input, applyOperationRequestOptions$2(init, this.operationType, this.requestOptions)];
1153
+ }
1117
1154
  shouldUseAuraNetwork() {
1118
1155
  return this.services.auraNetwork !== void 0 && (this.networkPreference === "aura" || !this.services.fetch);
1119
1156
  }
@@ -1132,7 +1169,7 @@ class AuraCacheControlCommand extends CacheControlCommand {
1132
1169
  (errs) => this.coerceAuraErrors(errs)
1133
1170
  );
1134
1171
  } else if (this.shouldUseFetch()) {
1135
- const params = this.fetchParams;
1172
+ const params = this.withRequestOptions(this.fetchParams);
1136
1173
  try {
1137
1174
  return this.convertFetchResponseToData(this.services.fetch(...params));
1138
1175
  } catch (reason) {
@@ -1237,6 +1274,19 @@ function buildServiceDescriptor$o() {
1237
1274
  };
1238
1275
  }
1239
1276
 
1277
+ function applyOperationRequestOptions$1(init, operationType, requestOptions) {
1278
+ if (operationType === void 0 && requestOptions === void 0) {
1279
+ return init;
1280
+ }
1281
+ return {
1282
+ ...init,
1283
+ onestore: {
1284
+ ...requestOptions,
1285
+ ...init?.onestore,
1286
+ ...operationType !== void 0 && { retrySafe: operationType === "query" }
1287
+ }
1288
+ };
1289
+ }
1240
1290
  class HttpCacheControlCommand extends CacheControlCommand {
1241
1291
  constructor(services) {
1242
1292
  super(services);
@@ -1246,9 +1296,25 @@ class HttpCacheControlCommand extends CacheControlCommand {
1246
1296
  requestFromNetwork() {
1247
1297
  return this.fetch();
1248
1298
  }
1299
+ /** Declared `onestore` options (`handleServerError`, `compression`); generated overrides. */
1300
+ get requestOptions() {
1301
+ return void 0;
1302
+ }
1303
+ /**
1304
+ * `params` with request options merged into `init.onestore` (see `applyOperationRequestOptions`).
1305
+ * `retrySafe` follows `operationType` (default `'query'`): hand-written writes must override it.
1306
+ */
1307
+ withRequestOptions([
1308
+ input,
1309
+ init
1310
+ ]) {
1311
+ return [input, applyOperationRequestOptions$1(init, this.operationType, this.requestOptions)];
1312
+ }
1249
1313
  fetch() {
1250
1314
  try {
1251
- return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
1315
+ return this.convertFetchResponseToData(
1316
+ this.services.fetch(...this.withRequestOptions(this.fetchParams))
1317
+ );
1252
1318
  } catch (reason) {
1253
1319
  return resolvedPromiseLike$2(err$1(toError(reason)));
1254
1320
  }
@@ -1386,13 +1452,17 @@ class NetworkCommand extends BaseCommand {
1386
1452
  async afterRequestHooks(_options) {
1387
1453
  }
1388
1454
  }
1389
- function applyOperationRequestOptions(init, operationType) {
1390
- if (operationType === void 0) {
1455
+ function applyOperationRequestOptions(init, operationType, requestOptions) {
1456
+ if (operationType === void 0 && requestOptions === void 0) {
1391
1457
  return init;
1392
1458
  }
1393
1459
  return {
1394
1460
  ...init,
1395
- onestore: { ...init?.onestore, retrySafe: operationType === "query" }
1461
+ onestore: {
1462
+ ...requestOptions,
1463
+ ...init?.onestore,
1464
+ ...operationType !== void 0 && { retrySafe: operationType === "query" }
1465
+ }
1396
1466
  };
1397
1467
  }
1398
1468
  function isAbortableCommand(command) {
@@ -1490,11 +1560,19 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
1490
1560
  get operationType() {
1491
1561
  return void 0;
1492
1562
  }
1563
+ /** Declared `onestore` options (`handleServerError`, `compression`); generated overrides (`generateRequestOptionsGetter`). */
1564
+ get requestOptions() {
1565
+ return void 0;
1566
+ }
1493
1567
  fetch(contextSeed) {
1494
1568
  try {
1495
1569
  const [input, init] = this.fetchParams;
1496
1570
  const operationType = this.operationType;
1497
- const initWithOptions = applyOperationRequestOptions(init, operationType);
1571
+ const initWithOptions = applyOperationRequestOptions(
1572
+ init,
1573
+ operationType,
1574
+ this.requestOptions
1575
+ );
1498
1576
  const seed = operationType === void 0 ? contextSeed : { operationType, ...contextSeed };
1499
1577
  const initWithSeed = seed === void 0 ? initWithOptions : { ...initWithOptions, __contextSeed: seed };
1500
1578
  const fetchCall = initWithSeed === void 0 ? this.services.fetch(input) : this.services.fetch(input, initWithSeed);
@@ -2635,7 +2713,7 @@ function buildServiceDescriptor$d(luvio) {
2635
2713
  },
2636
2714
  };
2637
2715
  }
2638
- // version: 1.465.0-91ef58ca05
2716
+ // version: 1.466.0-b7b08a8e3c
2639
2717
 
2640
2718
  class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheControlCommand {
2641
2719
  constructor(config, documentRootType, services) {
@@ -2746,7 +2824,7 @@ class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheContro
2746
2824
  return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
2747
2825
  });
2748
2826
  } else if (this.shouldUseFetch()) {
2749
- const params = this.originalFetchParams;
2827
+ const params = this.withRequestOptions(this.originalFetchParams);
2750
2828
  try {
2751
2829
  return this.convertFetchResponseToData(this.services.fetch(...params)).then(
2752
2830
  (result) => {
@@ -2901,7 +2979,7 @@ class HttpGraphQLNormalizedCacheControlCommand extends HttpNormalizedCacheContro
2901
2979
  }
2902
2980
  runOriginalRequest() {
2903
2981
  return this.convertFetchResponseToData(
2904
- this.services.fetch(...this.originalFetchParams)
2982
+ this.services.fetch(...this.withRequestOptions(this.originalFetchParams))
2905
2983
  ).then((result) => {
2906
2984
  return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
2907
2985
  });
@@ -2974,7 +3052,7 @@ function buildServiceDescriptor$9(notifyRecordUpdateAvailable, getNormalizedLuvi
2974
3052
  },
2975
3053
  };
2976
3054
  }
2977
- // version: 1.465.0-91ef58ca05
3055
+ // version: 1.466.0-b7b08a8e3c
2978
3056
 
2979
3057
  class RetryService {
2980
3058
  constructor(defaultRetryPolicy) {
@@ -8009,7 +8087,7 @@ function getEnvironmentSetting(name) {
8009
8087
  }
8010
8088
  return undefined;
8011
8089
  }
8012
- // version: 1.465.0-4371689bb7
8090
+ // version: 1.466.0-ba624febc8
8013
8091
 
8014
8092
  const auraClientService = getAuraClientService();
8015
8093
  const defaultConfig = {
@@ -8480,7 +8558,7 @@ function isOneRuntime() {
8480
8558
  return !!globalThis.LWR;
8481
8559
  }
8482
8560
  /**
8483
- * Single content documents version URL enabled/disabled by killswitch.
8561
+ * Single content documents version URL.
8484
8562
  * Exported for reuse in tests.
8485
8563
  */
8486
8564
  const CONTENT_DOCUMENTS_VERSIONS_PATH = '/ui-api/records/content-documents/content-versions';
@@ -8536,12 +8614,11 @@ const PREDICATE_PATH_SETS = [
8536
8614
  auraBasedRequestsEnabled.isOpen({ fallback: false }),
8537
8615
  paths: UIAPI_PRIVATE_PATHS,
8538
8616
  },
8539
- // disableCreateContentDocumentAndVersionHTTPLexRuntime killswitch.
8540
- // Excluded on Aura Sites for the same broken-CSRF reason as the UIAPI paths
8541
- // (W-23092947); LEX / One Runtime are unaffected.
8617
+ // Content document + version creation. Excluded on Aura Sites for the same
8618
+ // broken-CSRF reason as the UIAPI paths (W-23092947); LEX / One Runtime are
8619
+ // unaffected.
8542
8620
  {
8543
- predicate: () => !isAuraSite() &&
8544
- !disableCreateContentDocumentAndVersionHTTPLexRuntime.isOpen({ fallback: false }),
8621
+ predicate: () => !isAuraSite(),
8545
8622
  paths: [CONTENT_DOCUMENTS_VERSIONS_PATH],
8546
8623
  },
8547
8624
  ];
@@ -8739,6 +8816,9 @@ function buildJwtAuthorizedSfapFetchServiceDescriptor(logger) {
8739
8816
  buildJwtParameterizationInterceptor(sfapJwtManager, buildSfapJwtRequestModifier(logger)),
8740
8817
  // Guarded so it is skipped once the parameterized interceptor handled the request.
8741
8818
  buildGuardedLegacyJwtRequestInterceptor(logger),
8819
+ // Per-request gzip: compresses only operations that opt in via
8820
+ // `init.onestore.compression`; a pass-through no-op otherwise.
8821
+ buildCompressionInterceptor(),
8742
8822
  ],
8743
8823
  finally: [buildThirdPartyTrackerFinishInterceptor()],
8744
8824
  });
@@ -8841,6 +8921,9 @@ function buildCopilotFetchServiceDescriptor(logger) {
8841
8921
  });
8842
8922
  },
8843
8923
  buildJwtRequestInterceptor(logger),
8924
+ // Per-request gzip (opt-in via `init.onestore.compression`); last so it
8925
+ // sees the body after the session-start rewrite above.
8926
+ buildCompressionInterceptor(),
8844
8927
  ],
8845
8928
  retry: buildFetchRetryInterceptor(),
8846
8929
  finally: [buildThirdPartyTrackerFinishInterceptor()],
@@ -8851,7 +8934,8 @@ function buildCopilotFetchServiceDescriptor(logger) {
8851
8934
  function buildUnauthorizedFetchServiceDescriptor() {
8852
8935
  const fetchService = buildServiceDescriptor$2({
8853
8936
  createContext: createInstrumentationIdContext(),
8854
- request: [buildThirdPartyTrackerRegisterInterceptor()],
8937
+ // Per-request gzip (opt-in via `init.onestore.compression`).
8938
+ request: [buildThirdPartyTrackerRegisterInterceptor(), buildCompressionInterceptor()],
8855
8939
  retry: buildFetchRetryInterceptor(),
8856
8940
  finally: [buildThirdPartyTrackerFinishInterceptor()],
8857
8941
  });
@@ -9384,8 +9468,6 @@ function initializeOneStore(luvio) {
9384
9468
  version: '1.0',
9385
9469
  service: prefetchSfapJwt,
9386
9470
  };
9387
- // set flags based on gates
9388
- featureFlagsService.set('useOneStoreGraphQL', useOneStoreGraphql.isOpen({ fallback: false }));
9389
9471
  // Use the Aura transport for the OneStore GraphQL command by default. The
9390
9472
  // HTTP transport's CSRF handling is broken on Aura/Experience sites
9391
9473
  // (W-23092947), and defaulting to Aura keeps a single, known-good transport
@@ -9460,4 +9542,4 @@ function ldsEngineCreator() {
9460
9542
  }
9461
9543
 
9462
9544
  export { PDL_ENGINE_REGISTRATION_ID, buildPredictorForContext, configService, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory };
9463
- // version: 1.465.0-91ef58ca05
9545
+ // version: 1.466.0-b7b08a8e3c
@@ -4,7 +4,7 @@ import type { RequestLogger } from '@salesforce/lds-network-fetch';
4
4
  import type { RequestTracker } from '@salesforce/lds-runtime-shared';
5
5
  export { UIAPI_PUBLIC_PATHS, UIAPI_PRIVATE_PATHS };
6
6
  /**
7
- * Single content documents version URL enabled/disabled by killswitch.
7
+ * Single content documents version URL.
8
8
  * Exported for reuse in tests.
9
9
  */
10
10
  export declare const CONTENT_DOCUMENTS_VERSIONS_PATH = "/ui-api/records/content-documents/content-versions";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-aura",
3
- "version": "1.465.0",
3
+ "version": "1.466.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for Aura runtime.",
6
6
  "main": "dist/ldsEngineCreator.js",
@@ -34,54 +34,54 @@
34
34
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-aura"
35
35
  },
36
36
  "devDependencies": {
37
- "@conduit-client/service-provisioner": "3.32.1",
38
- "@conduit-client/tools-core": "3.32.1",
39
- "@salesforce/lds-adapters-apex": "^1.465.0",
40
- "@salesforce/lds-adapters-uiapi": "^1.465.0",
41
- "@salesforce/lds-ads-bridge": "^1.465.0",
42
- "@salesforce/lds-aura-storage": "^1.465.0",
43
- "@salesforce/lds-bindings": "^1.465.0",
44
- "@salesforce/lds-instrumentation": "^1.465.0",
45
- "@salesforce/lds-network-adapter": "^1.465.0",
46
- "@salesforce/lds-network-aura": "^1.465.0",
47
- "@salesforce/lds-network-fetch": "^1.465.0",
48
- "@salesforce/lds-runtime-shared": "^1.465.0",
37
+ "@conduit-client/service-provisioner": "3.33.0",
38
+ "@conduit-client/tools-core": "3.33.0",
39
+ "@salesforce/lds-adapters-apex": "^1.466.0",
40
+ "@salesforce/lds-adapters-uiapi": "^1.466.0",
41
+ "@salesforce/lds-ads-bridge": "^1.466.0",
42
+ "@salesforce/lds-aura-storage": "^1.466.0",
43
+ "@salesforce/lds-bindings": "^1.466.0",
44
+ "@salesforce/lds-instrumentation": "^1.466.0",
45
+ "@salesforce/lds-network-adapter": "^1.466.0",
46
+ "@salesforce/lds-network-aura": "^1.466.0",
47
+ "@salesforce/lds-network-fetch": "^1.466.0",
48
+ "@salesforce/lds-runtime-shared": "^1.466.0",
49
49
  "jwt-encode": "1.0.1"
50
50
  },
51
51
  "dependencies": {
52
- "@conduit-client/command-aura-graphql-normalized-cache-control": "3.32.1",
53
- "@conduit-client/command-aura-network": "3.32.1",
54
- "@conduit-client/command-aura-normalized-cache-control": "3.32.1",
55
- "@conduit-client/command-fetch-network": "3.32.1",
56
- "@conduit-client/command-http-graphql-normalized-cache-control": "3.32.1",
57
- "@conduit-client/command-http-normalized-cache-control": "3.32.1",
58
- "@conduit-client/command-ndjson": "3.32.1",
59
- "@conduit-client/command-network": "3.32.1",
60
- "@conduit-client/command-sse": "3.32.1",
61
- "@conduit-client/command-streaming": "3.32.1",
62
- "@conduit-client/jwt-manager": "3.32.1",
63
- "@conduit-client/service-aura-network": "3.32.1",
64
- "@conduit-client/service-bindings-imperative": "3.32.1",
65
- "@conduit-client/service-bindings-lwc": "3.32.1",
66
- "@conduit-client/service-cache": "3.32.1",
67
- "@conduit-client/service-cache-control": "3.32.1",
68
- "@conduit-client/service-cache-inclusion-policy": "3.32.1",
69
- "@conduit-client/service-config": "3.32.1",
70
- "@conduit-client/service-feature-flags": "3.32.1",
71
- "@conduit-client/service-fetch-network": "3.32.1",
72
- "@conduit-client/service-instrument-command": "3.32.1",
73
- "@conduit-client/service-pubsub": "3.32.1",
74
- "@conduit-client/service-renewable-resource-manager": "3.32.1",
75
- "@conduit-client/service-store": "3.32.1",
76
- "@conduit-client/utils": "3.32.1",
52
+ "@conduit-client/command-aura-graphql-normalized-cache-control": "3.33.0",
53
+ "@conduit-client/command-aura-network": "3.33.0",
54
+ "@conduit-client/command-aura-normalized-cache-control": "3.33.0",
55
+ "@conduit-client/command-fetch-network": "3.33.0",
56
+ "@conduit-client/command-http-graphql-normalized-cache-control": "3.33.0",
57
+ "@conduit-client/command-http-normalized-cache-control": "3.33.0",
58
+ "@conduit-client/command-ndjson": "3.33.0",
59
+ "@conduit-client/command-network": "3.33.0",
60
+ "@conduit-client/command-sse": "3.33.0",
61
+ "@conduit-client/command-streaming": "3.33.0",
62
+ "@conduit-client/jwt-manager": "3.33.0",
63
+ "@conduit-client/service-aura-network": "3.33.0",
64
+ "@conduit-client/service-bindings-imperative": "3.33.0",
65
+ "@conduit-client/service-bindings-lwc": "3.33.0",
66
+ "@conduit-client/service-cache": "3.33.0",
67
+ "@conduit-client/service-cache-control": "3.33.0",
68
+ "@conduit-client/service-cache-inclusion-policy": "3.33.0",
69
+ "@conduit-client/service-config": "3.33.0",
70
+ "@conduit-client/service-feature-flags": "3.33.0",
71
+ "@conduit-client/service-fetch-network": "3.33.0",
72
+ "@conduit-client/service-instrument-command": "3.33.0",
73
+ "@conduit-client/service-pubsub": "3.33.0",
74
+ "@conduit-client/service-renewable-resource-manager": "3.33.0",
75
+ "@conduit-client/service-store": "3.33.0",
76
+ "@conduit-client/utils": "3.33.0",
77
77
  "@luvio/network-adapter-composable": "0.161.2",
78
78
  "@luvio/network-adapter-fetch": "0.161.2",
79
79
  "@lwc/state": "^0.29.0",
80
- "@salesforce/lds-adapters-onestore-graphql": "^1.465.0",
80
+ "@salesforce/lds-adapters-onestore-graphql": "^1.466.0",
81
81
  "@salesforce/lds-adapters-uiapi-lex": "^1.415.0",
82
- "@salesforce/lds-durable-storage": "^1.465.0",
83
- "@salesforce/lds-luvio-service": "^1.465.0",
84
- "@salesforce/lds-luvio-uiapi-records-service": "^1.465.0"
82
+ "@salesforce/lds-durable-storage": "^1.466.0",
83
+ "@salesforce/lds-luvio-service": "^1.466.0",
84
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.466.0"
85
85
  },
86
86
  "luvioBundlesize": [
87
87
  {