@salesforce/lds-runtime-one-runtime 1.463.0 → 1.464.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.
@@ -2636,7 +2636,7 @@ function buildServiceDescriptor$d(luvio) {
2636
2636
  },
2637
2637
  };
2638
2638
  }
2639
- // version: 1.463.0-ea9ecd17fc
2639
+ // version: 1.464.0-e54c238397
2640
2640
 
2641
2641
  class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheControlCommand {
2642
2642
  constructor(config, documentRootType, services) {
@@ -2975,7 +2975,7 @@ function buildServiceDescriptor$9(notifyRecordUpdateAvailable, getNormalizedLuvi
2975
2975
  },
2976
2976
  };
2977
2977
  }
2978
- // version: 1.463.0-ea9ecd17fc
2978
+ // version: 1.464.0-e54c238397
2979
2979
 
2980
2980
  class RetryService {
2981
2981
  constructor(defaultRetryPolicy) {
@@ -4447,7 +4447,12 @@ function buildServiceDescriptor$2(interceptors = {
4447
4447
  }
4448
4448
  const fetchArgs = cleanInit === void 0 ? [input] : [input, cleanInit];
4449
4449
  const baseContext = interceptors.createContext?.();
4450
- const context = contextSeed === void 0 ? baseContext : { ...baseContext, ...contextSeed };
4450
+ const onestore = cleanInit?.onestore;
4451
+ const context = contextSeed === void 0 && onestore === void 0 ? baseContext : {
4452
+ ...baseContext,
4453
+ ...contextSeed,
4454
+ ...onestore !== void 0 && { onestore }
4455
+ };
4451
4456
  const {
4452
4457
  request: requestInterceptors = [],
4453
4458
  retry: retryInterceptor = void 0,
@@ -5901,7 +5906,7 @@ function getEnvironmentSetting(name) {
5901
5906
  }
5902
5907
  return undefined;
5903
5908
  }
5904
- // version: 1.463.0-8515018faf
5909
+ // version: 1.464.0-b35c0e7723
5905
5910
 
5906
5911
  /**
5907
5912
  * Helpers for reaching the Aura framework from the LDS Aura runtime.
@@ -6316,7 +6321,13 @@ function getOrGenerateErrorId(responseBody, status, statusText) {
6316
6321
  return generateErrorId(context);
6317
6322
  }
6318
6323
  function buildLexRuntime5xxStatusResponseInterceptor(logger) {
6319
- return async (response) => {
6324
+ return async (response, context) => {
6325
+ // The caller opted in (`onestore.handleServerError`, exposed by the fetch service as
6326
+ // `context.onestore`) to receive the 5xx itself, so skip the gack and the throw and
6327
+ // let the response flow to the command's error handling.
6328
+ if (context?.onestore?.handleServerError === true) {
6329
+ return response;
6330
+ }
6320
6331
  if (response.status >= 500 && response.status < 600) {
6321
6332
  const internalLogMessage = `LEX runtime 5xx: ${response.status} ${response.statusText || ''}`.trim();
6322
6333
  logger.warn(internalLogMessage);
@@ -7537,15 +7548,21 @@ function buildCsrfRetryInterceptor() {
7537
7548
  }
7538
7549
 
7539
7550
  /**
7540
- * The context-seed key under which a custom command forwards its JWT mint
7551
+ * Legacy context-seed key under which a custom command forwards its JWT mint
7541
7552
  * parameters. The framework's `buildServiceDescriptor` merges the request init's
7542
7553
  * `__contextSeed` onto the per-request interceptor context, so this interceptor
7543
- * reads the params off `context[JWT_MINT_PARAMS_SEED_KEY]`.
7554
+ * can read the params off `context[JWT_MINT_PARAMS_SEED_KEY]`.
7555
+ *
7556
+ * **Transitional.** The first-class channel is now the typed
7557
+ * `init.onestore.mintParams` field (onestore 3.29.0), which this interceptor
7558
+ * prefers. This seed key remains only as a fallback while the core
7559
+ * `onestore-custom-adapters` producers still write `__contextSeed`; it — together
7560
+ * with the `context` fallback and the interceptor's `context` parameter — is
7561
+ * removed once those producers emit `onestore.mintParams`. That removal is the
7562
+ * follow-up PR #8314 (tracked under W-24472492).
7544
7563
  *
7545
- * This is a cross-team contract: the custom command writes this key, this
7546
- * interceptor reads it. It is intentionally an opaque key — OneStore does not
7547
- * define it and never inspects the param shape; the typed shape lives in the
7548
- * resolver.
7564
+ * It is intentionally an opaque key — OneStore does not define it and never
7565
+ * inspects the param shape; the typed shape lives in the resolver.
7549
7566
  */
7550
7567
  const JWT_MINT_PARAMS_SEED_KEY = 'jwtMintParams';
7551
7568
  /**
@@ -7576,15 +7593,17 @@ function hasAuthorizationHeader([resource, options]) {
7576
7593
  * Builds the request interceptor that bridges the per-request context seed to the
7577
7594
  * dispatching SFAP JwtManager for the **parameterized** mint path.
7578
7595
  *
7579
- * For a parameterized SFAP command, the context carries `jwtMintParams`. This
7580
- * interceptor reads them, calls `jwtManager.getJwt(params)` (which the dispatching
7581
- * resolver routes to the parameterized resolver), attaches the `Authorization`
7582
- * header, and rewrites the request URL via the minted `baseUri`. The presence of
7583
- * that `Authorization` header is the signal the descriptor's guarded legacy
7584
- * interceptor uses to skip — so the legacy path does not mint a second time.
7596
+ * For a parameterized SFAP command, the mint params arrive on the typed
7597
+ * `init.onestore.mintParams` field (preferred) or, transitionally, under the
7598
+ * legacy `context[jwtMintParams]` seed. This interceptor reads them (onestore
7599
+ * first), calls `jwtManager.getJwt(params)` (which the dispatching resolver routes
7600
+ * to the parameterized resolver), attaches the `Authorization` header, and
7601
+ * rewrites the request URL via the minted `baseUri`. The presence of that
7602
+ * `Authorization` header is the signal the descriptor's guarded legacy interceptor
7603
+ * uses to skip — so the legacy path does not mint a second time.
7585
7604
  *
7586
- * For a legacy parameterless command the context carries no `jwtMintParams`, so
7587
- * this interceptor **early-returns on its first line** and the request flows
7605
+ * For a legacy parameterless command neither channel carries mint params, so this
7606
+ * interceptor **early-returns on its first statement** and the request flows
7588
7607
  * unchanged to the legacy `buildJwtRequestHeaderInterceptor` — guaranteeing zero
7589
7608
  * behavior change for non-opted-in adapters.
7590
7609
  *
@@ -7598,8 +7617,11 @@ function hasAuthorizationHeader([resource, options]) {
7598
7617
  */
7599
7618
  function buildJwtParameterizationInterceptor(jwtManager, jwtRequestModifier = (_extraInfo, fetchArgs) => fetchArgs) {
7600
7619
  return (fetchArgs, context) => {
7601
- const jwtContext = context;
7602
- const mintParams = jwtContext?.[JWT_MINT_PARAMS_SEED_KEY];
7620
+ // Prefer the typed `init.onestore.mintParams`; fall back to the legacy
7621
+ // `context[JWT_MINT_PARAMS_SEED_KEY]` seed while the core producers still
7622
+ // write it (transitional dual-read — see JWT_MINT_PARAMS_SEED_KEY).
7623
+ const mintParams = fetchArgs[1]?.onestore?.mintParams ??
7624
+ context?.[JWT_MINT_PARAMS_SEED_KEY];
7603
7625
  // No mint params → not a parameterized request. Do nothing; the legacy
7604
7626
  // interceptor handles it. This MUST be the first statement so non-opted-in
7605
7627
  // SFAP commands observe no work at all.
@@ -7694,7 +7716,8 @@ function buildJwtAuthorizedSfapFetchServiceDescriptor(logger) {
7694
7716
  *
7695
7717
  * It reuses the module's `sfapJwtManager`: `cdp_url` is emitted on the same
7696
7718
  * `SFAP_API`-scope JWT, so the Data360 command mints the same kind of token — it
7697
- * just forwards the data-cloud scopes via the context-seed `jwtMintParams`.
7719
+ * just forwards the data-cloud scopes via `onestore.mintParams` (or, transitionally,
7720
+ * the legacy context-seed `jwtMintParams`).
7698
7721
  *
7699
7722
  * Gated behind its own `data_360_cdp_url_rewrite` auth-scope tag so it binds ONLY to
7700
7723
  * the Data360 command — the SFAP fleet never flows past this interceptor.
@@ -7825,10 +7848,11 @@ function buildJwtRequestInterceptor(logger) {
7825
7848
  * (`cdp_url`), and modifiers only receive `extraInfo`. So — like the copilot
7826
7849
  * interceptor that reads `decodedInfo.iss` — it holds the token directly:
7827
7850
  *
7828
- * 1. Read the command's `jwtMintParams` off the per-request context seed and
7829
- * mint (via the parameterized SFAP resolver, routed by the dispatching
7830
- * resolver inside `sfapJwtManager`). Without mint params there is no token
7831
- * to authorize with, so leave the request untouched.
7851
+ * 1. Read the command's mint params from `init.onestore.mintParams` (preferred)
7852
+ * or the legacy per-request context seed, and mint (via the parameterized
7853
+ * SFAP resolver, routed by the dispatching resolver inside `sfapJwtManager`).
7854
+ * Without mint params there is no token to authorize with, so leave the
7855
+ * request untouched.
7832
7856
  * 2. Decode `cdp_url` from the JWT and resolve the tenant-specific endpoint
7833
7857
  * (TSE). `cdp_url` is a bare host, so a scheme is prepended before parsing
7834
7858
  * and the protocol is forced to `https:`.
@@ -7847,7 +7871,11 @@ function buildJwtRequestInterceptor(logger) {
7847
7871
  */
7848
7872
  function buildData360HostRewriteInterceptor(logger) {
7849
7873
  return (fetchArgs, context) => {
7850
- const mintParams = context?.[JWT_MINT_PARAMS_SEED_KEY];
7874
+ // Prefer the typed `init.onestore.mintParams`; fall back to the legacy
7875
+ // `context[JWT_MINT_PARAMS_SEED_KEY]` seed while the core producers still
7876
+ // write it (transitional dual-read — see JWT_MINT_PARAMS_SEED_KEY).
7877
+ const mintParams = fetchArgs[1]?.onestore?.mintParams ??
7878
+ context?.[JWT_MINT_PARAMS_SEED_KEY];
7851
7879
  // No mint params → not a parameterized Data360 request. Nothing to do.
7852
7880
  if (mintParams === undefined) {
7853
7881
  return resolvedPromiseLike$2(fetchArgs);
@@ -10562,6 +10590,10 @@ function getLexRuntimeDefaultInterceptorConfig(logger) {
10562
10590
  buildCsrfTokenInterceptor(),
10563
10591
  buildEntityEncodingInterceptor(),
10564
10592
  buildFirstPartyHeaderInterceptor(),
10593
+ // Per-request gzip: compresses only operations that opt in via
10594
+ // `init.onestore.compression`; a pass-through no-op otherwise. Last in
10595
+ // the chain so it compresses the final body, after body-modifying interceptors.
10596
+ buildCompressionInterceptor(),
10565
10597
  ],
10566
10598
  retry: buildCsrfRetryInterceptor(),
10567
10599
  response: [
@@ -11499,4 +11531,4 @@ function ldsEngineCreator() {
11499
11531
  }
11500
11532
 
11501
11533
  export { LexRequestStrategy, PDL_ENGINE_REGISTRATION_ID, PdlPrefetcherEventType, PdlRequestPriority, buildPredictorForContext, configService, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, subscribeToPrefetcherEvents, unregisterRequestStrategy, whenPredictionsReady };
11502
- // version: 1.463.0-ea9ecd17fc
11534
+ // version: 1.464.0-e54c238397
@@ -20,7 +20,8 @@ export declare function buildJwtAuthorizedSfapFetchServiceDescriptor(logger: Log
20
20
  *
21
21
  * It reuses the module's `sfapJwtManager`: `cdp_url` is emitted on the same
22
22
  * `SFAP_API`-scope JWT, so the Data360 command mints the same kind of token — it
23
- * just forwards the data-cloud scopes via the context-seed `jwtMintParams`.
23
+ * just forwards the data-cloud scopes via `onestore.mintParams` (or, transitionally,
24
+ * the legacy context-seed `jwtMintParams`).
24
25
  *
25
26
  * Gated behind its own `data_360_cdp_url_rewrite` auth-scope tag so it binds ONLY to
26
27
  * the Data360 command — the SFAP fleet never flows past this interceptor.
@@ -3,15 +3,21 @@ import { type JwtRequestModifier } from '@conduit-client/service-fetch-network/v
3
3
  import type { JwtManager } from '@conduit-client/jwt-manager';
4
4
  import type { ExtraInfo } from '../network-sfap';
5
5
  /**
6
- * The context-seed key under which a custom command forwards its JWT mint
6
+ * Legacy context-seed key under which a custom command forwards its JWT mint
7
7
  * parameters. The framework's `buildServiceDescriptor` merges the request init's
8
8
  * `__contextSeed` onto the per-request interceptor context, so this interceptor
9
- * reads the params off `context[JWT_MINT_PARAMS_SEED_KEY]`.
9
+ * can read the params off `context[JWT_MINT_PARAMS_SEED_KEY]`.
10
10
  *
11
- * This is a cross-team contract: the custom command writes this key, this
12
- * interceptor reads it. It is intentionally an opaque key — OneStore does not
13
- * define it and never inspects the param shape; the typed shape lives in the
14
- * resolver.
11
+ * **Transitional.** The first-class channel is now the typed
12
+ * `init.onestore.mintParams` field (onestore 3.29.0), which this interceptor
13
+ * prefers. This seed key remains only as a fallback while the core
14
+ * `onestore-custom-adapters` producers still write `__contextSeed`; it — together
15
+ * with the `context` fallback and the interceptor's `context` parameter — is
16
+ * removed once those producers emit `onestore.mintParams`. That removal is the
17
+ * follow-up PR #8314 (tracked under W-24472492).
18
+ *
19
+ * It is intentionally an opaque key — OneStore does not define it and never
20
+ * inspects the param shape; the typed shape lives in the resolver.
15
21
  */
16
22
  export declare const JWT_MINT_PARAMS_SEED_KEY = "jwtMintParams";
17
23
  /**
@@ -27,15 +33,17 @@ export declare function hasAuthorizationHeader([resource, options]: FetchParamet
27
33
  * Builds the request interceptor that bridges the per-request context seed to the
28
34
  * dispatching SFAP JwtManager for the **parameterized** mint path.
29
35
  *
30
- * For a parameterized SFAP command, the context carries `jwtMintParams`. This
31
- * interceptor reads them, calls `jwtManager.getJwt(params)` (which the dispatching
32
- * resolver routes to the parameterized resolver), attaches the `Authorization`
33
- * header, and rewrites the request URL via the minted `baseUri`. The presence of
34
- * that `Authorization` header is the signal the descriptor's guarded legacy
35
- * interceptor uses to skip — so the legacy path does not mint a second time.
36
+ * For a parameterized SFAP command, the mint params arrive on the typed
37
+ * `init.onestore.mintParams` field (preferred) or, transitionally, under the
38
+ * legacy `context[jwtMintParams]` seed. This interceptor reads them (onestore
39
+ * first), calls `jwtManager.getJwt(params)` (which the dispatching resolver routes
40
+ * to the parameterized resolver), attaches the `Authorization` header, and
41
+ * rewrites the request URL via the minted `baseUri`. The presence of that
42
+ * `Authorization` header is the signal the descriptor's guarded legacy interceptor
43
+ * uses to skip — so the legacy path does not mint a second time.
36
44
  *
37
- * For a legacy parameterless command the context carries no `jwtMintParams`, so
38
- * this interceptor **early-returns on its first line** and the request flows
45
+ * For a legacy parameterless command neither channel carries mint params, so this
46
+ * interceptor **early-returns on its first statement** and the request flows
39
47
  * unchanged to the legacy `buildJwtRequestHeaderInterceptor` — guaranteeing zero
40
48
  * behavior change for non-opted-in adapters.
41
49
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-one-runtime",
3
- "version": "1.463.0",
3
+ "version": "1.464.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for the LEX on One Runtime (LWR) runtime.",
6
6
  "main": "dist/oneRuntimeLdsEngineCreator.js",
@@ -34,53 +34,53 @@
34
34
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-one-runtime"
35
35
  },
36
36
  "devDependencies": {
37
- "@conduit-client/service-provisioner": "3.30.0",
38
- "@conduit-client/tools-core": "3.30.0",
39
- "@salesforce/lds-adapters-apex": "^1.463.0",
40
- "@salesforce/lds-adapters-uiapi": "^1.463.0",
41
- "@salesforce/lds-ads-bridge": "^1.463.0",
42
- "@salesforce/lds-aura-storage": "^1.463.0",
43
- "@salesforce/lds-bindings": "^1.463.0",
44
- "@salesforce/lds-instrumentation": "^1.463.0",
45
- "@salesforce/lds-network-adapter": "^1.463.0",
46
- "@salesforce/lds-network-aura": "^1.463.0",
47
- "@salesforce/lds-network-fetch": "^1.463.0",
37
+ "@conduit-client/service-provisioner": "3.32.0",
38
+ "@conduit-client/tools-core": "3.32.0",
39
+ "@salesforce/lds-adapters-apex": "^1.464.0",
40
+ "@salesforce/lds-adapters-uiapi": "^1.464.0",
41
+ "@salesforce/lds-ads-bridge": "^1.464.0",
42
+ "@salesforce/lds-aura-storage": "^1.464.0",
43
+ "@salesforce/lds-bindings": "^1.464.0",
44
+ "@salesforce/lds-instrumentation": "^1.464.0",
45
+ "@salesforce/lds-network-adapter": "^1.464.0",
46
+ "@salesforce/lds-network-aura": "^1.464.0",
47
+ "@salesforce/lds-network-fetch": "^1.464.0",
48
48
  "jwt-encode": "1.0.1"
49
49
  },
50
50
  "dependencies": {
51
- "@conduit-client/command-aura-graphql-normalized-cache-control": "3.30.0",
52
- "@conduit-client/command-aura-network": "3.30.0",
53
- "@conduit-client/command-aura-normalized-cache-control": "3.30.0",
54
- "@conduit-client/command-fetch-network": "3.30.0",
55
- "@conduit-client/command-http-graphql-normalized-cache-control": "3.30.0",
56
- "@conduit-client/command-http-normalized-cache-control": "3.30.0",
57
- "@conduit-client/command-ndjson": "3.30.0",
58
- "@conduit-client/command-network": "3.30.0",
59
- "@conduit-client/command-sse": "3.30.0",
60
- "@conduit-client/command-streaming": "3.30.0",
61
- "@conduit-client/jwt-manager": "3.30.0",
62
- "@conduit-client/service-aura-network": "3.30.0",
63
- "@conduit-client/service-bindings-imperative": "3.30.0",
64
- "@conduit-client/service-bindings-lwc": "3.30.0",
65
- "@conduit-client/service-cache": "3.30.0",
66
- "@conduit-client/service-cache-control": "3.30.0",
67
- "@conduit-client/service-cache-inclusion-policy": "3.30.0",
68
- "@conduit-client/service-config": "3.30.0",
69
- "@conduit-client/service-feature-flags": "3.30.0",
70
- "@conduit-client/service-fetch-network": "3.30.0",
71
- "@conduit-client/service-instrument-command": "3.30.0",
72
- "@conduit-client/service-pubsub": "3.30.0",
73
- "@conduit-client/service-renewable-resource-manager": "3.30.0",
74
- "@conduit-client/service-store": "3.30.0",
75
- "@conduit-client/utils": "3.30.0",
51
+ "@conduit-client/command-aura-graphql-normalized-cache-control": "3.32.0",
52
+ "@conduit-client/command-aura-network": "3.32.0",
53
+ "@conduit-client/command-aura-normalized-cache-control": "3.32.0",
54
+ "@conduit-client/command-fetch-network": "3.32.0",
55
+ "@conduit-client/command-http-graphql-normalized-cache-control": "3.32.0",
56
+ "@conduit-client/command-http-normalized-cache-control": "3.32.0",
57
+ "@conduit-client/command-ndjson": "3.32.0",
58
+ "@conduit-client/command-network": "3.32.0",
59
+ "@conduit-client/command-sse": "3.32.0",
60
+ "@conduit-client/command-streaming": "3.32.0",
61
+ "@conduit-client/jwt-manager": "3.32.0",
62
+ "@conduit-client/service-aura-network": "3.32.0",
63
+ "@conduit-client/service-bindings-imperative": "3.32.0",
64
+ "@conduit-client/service-bindings-lwc": "3.32.0",
65
+ "@conduit-client/service-cache": "3.32.0",
66
+ "@conduit-client/service-cache-control": "3.32.0",
67
+ "@conduit-client/service-cache-inclusion-policy": "3.32.0",
68
+ "@conduit-client/service-config": "3.32.0",
69
+ "@conduit-client/service-feature-flags": "3.32.0",
70
+ "@conduit-client/service-fetch-network": "3.32.0",
71
+ "@conduit-client/service-instrument-command": "3.32.0",
72
+ "@conduit-client/service-pubsub": "3.32.0",
73
+ "@conduit-client/service-renewable-resource-manager": "3.32.0",
74
+ "@conduit-client/service-store": "3.32.0",
75
+ "@conduit-client/utils": "3.32.0",
76
76
  "@luvio/network-adapter-composable": "0.161.2",
77
77
  "@luvio/network-adapter-fetch": "0.161.2",
78
78
  "@lwc/state": "^0.29.0",
79
- "@salesforce/lds-adapters-onestore-graphql": "^1.463.0",
79
+ "@salesforce/lds-adapters-onestore-graphql": "^1.464.0",
80
80
  "@salesforce/lds-adapters-uiapi-lex": "^1.415.0",
81
- "@salesforce/lds-durable-storage": "^1.463.0",
82
- "@salesforce/lds-luvio-service": "^1.463.0",
83
- "@salesforce/lds-luvio-uiapi-records-service": "^1.463.0"
81
+ "@salesforce/lds-durable-storage": "^1.464.0",
82
+ "@salesforce/lds-luvio-service": "^1.464.0",
83
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.464.0"
84
84
  },
85
85
  "luvioBundlesize": [
86
86
  {