@salesforce/lds-runtime-aura 1.440.0 → 1.442.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.
@@ -1521,9 +1521,12 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
1521
1521
  this.services = services;
1522
1522
  this.additionalNullResponses = [];
1523
1523
  }
1524
- fetch() {
1524
+ fetch(contextSeed) {
1525
1525
  try {
1526
- return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
1526
+ const [input, init] = this.fetchParams;
1527
+ const initWithSeed = contextSeed === void 0 ? init : { ...init, __contextSeed: contextSeed };
1528
+ const fetchCall = initWithSeed === void 0 ? this.services.fetch(input) : this.services.fetch(input, initWithSeed);
1529
+ return this.convertFetchResponseToData(fetchCall);
1527
1530
  } catch (reason) {
1528
1531
  return resolvedPromiseLike$2(err$1(toError(reason)));
1529
1532
  }
@@ -2641,7 +2644,7 @@ function buildServiceDescriptor$d(luvio) {
2641
2644
  },
2642
2645
  };
2643
2646
  }
2644
- // version: 1.440.0-267427df73
2647
+ // version: 1.442.0-e47893165a
2645
2648
 
2646
2649
  class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheControlCommand {
2647
2650
  constructor(config, documentRootType, services) {
@@ -2979,7 +2982,7 @@ function buildServiceDescriptor$9(notifyRecordUpdateAvailable, getNormalizedLuvi
2979
2982
  },
2980
2983
  };
2981
2984
  }
2982
- // version: 1.440.0-267427df73
2985
+ // version: 1.442.0-e47893165a
2983
2986
 
2984
2987
  class RetryService {
2985
2988
  constructor(defaultRetryPolicy) {
@@ -3987,13 +3990,13 @@ function buildLWCGraphQLWireBindingsServiceDescriptor() {
3987
3990
  };
3988
3991
  }
3989
3992
 
3990
- function e$1(e2) {
3993
+ function e(e2) {
3991
3994
  this.message = e2;
3992
3995
  }
3993
- e$1.prototype = new Error(), e$1.prototype.name = "InvalidCharacterError";
3996
+ e.prototype = new Error(), e.prototype.name = "InvalidCharacterError";
3994
3997
  var r = "undefined" != typeof window && window.atob && window.atob.bind(window) || function(r2) {
3995
3998
  var t2 = String(r2).replace(/=+$/, "");
3996
- if (t2.length % 4 == 1) throw new e$1("'atob' failed: The string to be decoded is not correctly encoded.");
3999
+ if (t2.length % 4 == 1) throw new e("'atob' failed: The string to be decoded is not correctly encoded.");
3997
4000
  for (var n2, o2, a = 0, i = 0, c = ""; o2 = t2.charAt(i++); ~o2 && (n2 = a % 4 ? 64 * n2 + o2 : o2, a++ % 4) ? c += String.fromCharCode(255 & n2 >> (-2 * a & 6)) : 0) o2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o2);
3998
4001
  return c;
3999
4002
  };
@@ -4022,19 +4025,19 @@ function t(e2) {
4022
4025
  return r(t2);
4023
4026
  }
4024
4027
  }
4025
- function n$1(e2) {
4028
+ function n(e2) {
4026
4029
  this.message = e2;
4027
4030
  }
4028
4031
  function o(e2, r2) {
4029
- if ("string" != typeof e2) throw new n$1("Invalid token specified");
4032
+ if ("string" != typeof e2) throw new n("Invalid token specified");
4030
4033
  var o2 = true === (r2 = r2 || {}).header ? 0 : 1;
4031
4034
  try {
4032
4035
  return JSON.parse(t(e2.split(".")[o2]));
4033
4036
  } catch (e3) {
4034
- throw new n$1("Invalid token specified: " + e3.message);
4037
+ throw new n("Invalid token specified: " + e3.message);
4035
4038
  }
4036
4039
  }
4037
- n$1.prototype = new Error(), n$1.prototype.name = "InvalidTokenError";
4040
+ n.prototype = new Error(), n.prototype.name = "InvalidTokenError";
4038
4041
  class JwtToken {
4039
4042
  /**
4040
4043
  * Create a new JwtToken.
@@ -4042,11 +4045,13 @@ class JwtToken {
4042
4045
  * @param _token - The JWT string.
4043
4046
  * @param _decodedInfo - The decoded information from the JWT.
4044
4047
  * @param _extraInfo - Any additional information associated with the JWT.
4048
+ * @param _mintParams - The parameters used to mint this token. Undefined for legacy parameterless tokens.
4045
4049
  */
4046
- constructor(_token, _decodedInfo, _extraInfo) {
4050
+ constructor(_token, _decodedInfo, _extraInfo, _mintParams) {
4047
4051
  this._token = _token;
4048
4052
  this._decodedInfo = _decodedInfo;
4049
4053
  this._extraInfo = _extraInfo;
4054
+ this._mintParams = _mintParams;
4050
4055
  }
4051
4056
  /**
4052
4057
  * Get the JWT string.
@@ -4072,6 +4077,14 @@ class JwtToken {
4072
4077
  get decodedInfo() {
4073
4078
  return this._decodedInfo;
4074
4079
  }
4080
+ /**
4081
+ * Get the mint parameters used to produce this token.
4082
+ *
4083
+ * @returns The mint parameters, or undefined for legacy parameterless tokens.
4084
+ */
4085
+ get mintParams() {
4086
+ return this._mintParams;
4087
+ }
4075
4088
  /**
4076
4089
  * Get the remaining time in seconds until the JWT expires.
4077
4090
  *
@@ -4089,6 +4102,12 @@ class JwtToken {
4089
4102
  return this.tokenRemainingSeconds <= 0;
4090
4103
  }
4091
4104
  }
4105
+ function cacheKeyFor(params) {
4106
+ if (params === void 0) {
4107
+ return "jwt:";
4108
+ }
4109
+ return `jwt:${stableJSONStringify$2(params) ?? ""}`;
4110
+ }
4092
4111
  let defaultLogger = {
4093
4112
  trace: () => {
4094
4113
  },
@@ -4122,85 +4141,146 @@ class JwtRepository {
4122
4141
  this.limitInSeconds = limitInSeconds;
4123
4142
  this.defaultTokenTTLInSeconds = defaultTokenTTLInSeconds;
4124
4143
  this.logger = logger;
4144
+ this._tokens = /* @__PURE__ */ new Map();
4145
+ this.timeoutHandlers = /* @__PURE__ */ new Map();
4125
4146
  this.observers = [];
4126
4147
  }
4127
4148
  /**
4128
- * Get the current token.
4149
+ * Get the legacy (parameterless) token. Equivalent to `getToken()` with
4150
+ * no args. Preserved for backward compatibility with code that reads the
4151
+ * `token` property directly.
4129
4152
  */
4130
4153
  get token() {
4131
- return this._token;
4154
+ return this.getToken();
4132
4155
  }
4133
4156
  /**
4134
- * Set the current token.
4157
+ * Get the cached token for the given mint params.
4158
+ *
4159
+ * @param params - The mint params identifying the token. Omit for the legacy global token.
4160
+ */
4161
+ getToken(params) {
4162
+ return this._tokens.get(cacheKeyFor(params));
4163
+ }
4164
+ /**
4165
+ * Set the cached token for the given mint params.
4135
4166
  *
4136
4167
  * @param token - JWT token as a string.
4137
4168
  * @param extraInfo - Optional extra information.
4169
+ * @param params - The mint params identifying the token. Omit for the legacy global token.
4138
4170
  */
4139
- setToken(token, extraInfo) {
4171
+ setToken(token, extraInfo, params) {
4140
4172
  const decodedInfo = computeDecodedInfo(
4141
4173
  token,
4142
4174
  this.defaultTokenTTLInSeconds,
4143
4175
  this.logger
4144
4176
  );
4145
- this._token = new JwtToken(token, decodedInfo, extraInfo);
4146
- this.observeTokenExpiration();
4147
- return this._token;
4177
+ const key = cacheKeyFor(params);
4178
+ const jwtToken = new JwtToken(token, decodedInfo, extraInfo, params);
4179
+ this._tokens.set(key, jwtToken);
4180
+ this.observeTokenExpiration(key);
4181
+ return jwtToken;
4148
4182
  }
4149
4183
  /**
4150
- * Remove the current token.
4184
+ * Remove the cached token for the given mint params.
4185
+ *
4186
+ * @param params - The mint params identifying the token. Omit to remove
4187
+ * only the legacy global-key entry (matches today's behavior of "remove
4188
+ * the only token there is").
4151
4189
  */
4152
- removeToken() {
4153
- this._token = void 0;
4154
- this.clearTimeoutHandler();
4190
+ removeToken(params) {
4191
+ const key = cacheKeyFor(params);
4192
+ this._tokens.delete(key);
4193
+ this.clearTimeoutHandler(key);
4155
4194
  }
4156
4195
  /**
4157
- * Subscribe to the token nearing its expiration.
4196
+ * Remove every cached token and clear every near-expiry timer. Used by
4197
+ * test teardown and full auth-reset paths that previously called
4198
+ * `removeToken()` to clear the single token.
4199
+ */
4200
+ clearAllTokens() {
4201
+ for (const key of Array.from(this.timeoutHandlers.keys())) {
4202
+ this.clearTimeoutHandler(key);
4203
+ }
4204
+ this._tokens.clear();
4205
+ }
4206
+ /**
4207
+ * Subscribe to any cached token nearing its expiration.
4208
+ *
4209
+ * The callback receives the specific token whose timer fired. Use
4210
+ * `token.mintParams` to determine which token-set the expiry belongs to.
4211
+ *
4212
+ * Already-cached tokens are armed at subscribe time. Tokens added later
4213
+ * via `setToken` arm their own timers from inside `setToken`, so this
4214
+ * loop only needs to cover the existing entries.
4158
4215
  *
4159
- * @param cb - Callback function to execute when token is nearing expiration.
4216
+ * @param cb - Callback function to execute when a token is nearing expiration.
4160
4217
  */
4161
4218
  subscribeToTokenNearExpiration(cb) {
4162
4219
  this.observers.push(cb);
4163
- this.observeTokenExpiration();
4220
+ for (const key of this._tokens.keys()) {
4221
+ this.observeTokenExpiration(key);
4222
+ }
4164
4223
  return () => {
4165
4224
  this.observers = this.observers.filter((observer) => observer !== cb);
4225
+ if (this.observers.length === 0) {
4226
+ for (const key of Array.from(this.timeoutHandlers.keys())) {
4227
+ this.clearTimeoutHandler(key);
4228
+ }
4229
+ }
4166
4230
  };
4167
4231
  }
4168
4232
  /**
4169
- * Clear the timeout handler.
4233
+ * Number of currently cached tokens. Exposed for size observability so
4234
+ * runtime callers can emit a metric on cache growth and detect adapters
4235
+ * that misuse `dynamicParams` for per-request values.
4170
4236
  */
4171
- clearTimeoutHandler() {
4172
- if (this.timeoutHandler !== void 0) {
4173
- clearTimeout(this.timeoutHandler);
4237
+ get size() {
4238
+ return this._tokens.size;
4239
+ }
4240
+ /**
4241
+ * Clear the timeout handler for a specific cache key.
4242
+ */
4243
+ clearTimeoutHandler(key) {
4244
+ const handler = this.timeoutHandlers.get(key);
4245
+ if (handler !== void 0) {
4246
+ clearTimeout(handler);
4247
+ this.timeoutHandlers.delete(key);
4174
4248
  }
4175
4249
  }
4176
4250
  /**
4177
- * Observe and handle token expiration.
4251
+ * Observe and handle expiration of the token at the given cache key.
4178
4252
  */
4179
- observeTokenExpiration() {
4180
- this.clearTimeoutHandler();
4181
- if (this.observers.length === 0 || this.token === void 0) {
4253
+ observeTokenExpiration(key) {
4254
+ this.clearTimeoutHandler(key);
4255
+ const token = this._tokens.get(key);
4256
+ if (this.observers.length === 0 || token === void 0) {
4182
4257
  return;
4183
4258
  }
4184
- this.timeoutHandler = setTimeout(
4185
- () => this.notifyTokenIsExpiring(),
4186
- this.computeTimeoutTimeInMs()
4259
+ const handler = setTimeout(
4260
+ () => this.notifyTokenIsExpiring(key),
4261
+ this.computeTimeoutTimeInMs(token)
4187
4262
  );
4263
+ this.timeoutHandlers.set(key, handler);
4188
4264
  }
4189
4265
  /**
4190
- * Compute the timeout time in milliseconds.
4266
+ * Compute the timeout time in milliseconds for the given token.
4191
4267
  */
4192
- computeTimeoutTimeInMs() {
4193
- const remainingSeconds = this.token.tokenRemainingSeconds;
4194
- let timeoutTimeInSeconds = remainingSeconds - this.limitInSeconds;
4268
+ computeTimeoutTimeInMs(token) {
4269
+ const remainingSeconds = token.tokenRemainingSeconds;
4270
+ const timeoutTimeInSeconds = remainingSeconds - this.limitInSeconds;
4195
4271
  return timeoutTimeInSeconds < 0 ? 0 : timeoutTimeInSeconds * 1e3;
4196
4272
  }
4197
4273
  /**
4198
- * Notify all observers that the token is expiring.
4274
+ * Notify all observers that the token at the given cache key is expiring.
4199
4275
  */
4200
- notifyTokenIsExpiring() {
4276
+ notifyTokenIsExpiring(key) {
4277
+ const token = this._tokens.get(key);
4278
+ if (token === void 0) {
4279
+ return;
4280
+ }
4201
4281
  this.observers.forEach((cb) => {
4202
4282
  try {
4203
- cb.call(void 0, this.token);
4283
+ cb.call(void 0, token);
4204
4284
  } catch (e2) {
4205
4285
  this.logger.error(e2.message);
4206
4286
  }
@@ -4218,57 +4298,68 @@ class JwtManager {
4218
4298
  constructor(jwtRepository, resolver, options) {
4219
4299
  this.jwtRepository = jwtRepository;
4220
4300
  this.resolver = resolver;
4301
+ this.inflightPromises = /* @__PURE__ */ new Map();
4221
4302
  if (options?.keepTokenUpdated) {
4222
- jwtRepository.subscribeToTokenNearExpiration(() => this.refreshToken());
4303
+ jwtRepository.subscribeToTokenNearExpiration(
4304
+ (token) => this.refreshToken(token.mintParams)
4305
+ );
4223
4306
  }
4224
4307
  }
4225
4308
  /**
4226
- * Method to get a JWT token.
4227
- * If there's a token request in progress, it will return the Promise of this request.
4228
- * If the current token is undefined or expired, it will initiate a token refresh.
4229
- * Otherwise, it will return the current token.
4309
+ * Method to get a JWT token for the given mint params.
4230
4310
  *
4231
- * @returns {JwtToken<T, ExtraInfo> | Promise<JwtToken<T, ExtraInfo>>} The current token or the Promise of a token request.
4311
+ * If a request for the same params is in flight, returns its promise. If
4312
+ * a cached token for those params exists and is not expired, returns it
4313
+ * synchronously. Otherwise initiates a refresh.
4314
+ *
4315
+ * @param params - Optional mint parameters. Omit for the legacy parameterless token.
4316
+ * @returns The cached token (sync) or a promise that resolves to the refreshed token.
4232
4317
  */
4233
- getJwt() {
4234
- if (this.inflightPromise) {
4235
- return this.inflightPromise;
4318
+ getJwt(params) {
4319
+ const key = cacheKeyFor(params);
4320
+ const inflight = this.inflightPromises.get(key);
4321
+ if (inflight) {
4322
+ return inflight;
4236
4323
  }
4237
- const token = this.jwtRepository.token;
4324
+ const token = this.jwtRepository.getToken(params);
4238
4325
  if (token === void 0 || token.isExpired) {
4239
- return this.refreshToken();
4326
+ return this.refreshToken(params);
4240
4327
  }
4241
4328
  return token;
4242
4329
  }
4243
4330
  /**
4244
- * Method to refresh a JWT token.
4245
- * If a refresh request is already in progress, it will return the Promise of this request.
4246
- * Otherwise, it will start a new refresh request and return its Promise.
4331
+ * Method to refresh a JWT token for the given mint params.
4247
4332
  *
4248
- * @returns {Promise<JwtToken<T, ExtraInfo>>} Promise of the refreshed token.
4333
+ * @param params - Optional mint parameters. Omit for the legacy parameterless token.
4334
+ * @returns Promise of the refreshed token.
4249
4335
  */
4250
- refreshToken() {
4251
- if (this.inflightPromise === void 0) {
4252
- this.inflightPromise = new Promise((resolve, reject) => {
4253
- this.resolver.getJwt().then(({ jwt, extraInfo }) => {
4254
- this.inflightPromise = void 0;
4255
- const token = this.jwtRepository.setToken(jwt, extraInfo);
4256
- resolve(token);
4257
- }).catch((reason) => {
4258
- this.inflightPromise = void 0;
4259
- reject(reason);
4260
- });
4336
+ refreshToken(params) {
4337
+ const key = cacheKeyFor(params);
4338
+ const existing = this.inflightPromises.get(key);
4339
+ if (existing !== void 0) {
4340
+ return existing;
4341
+ }
4342
+ const resolverPromise = params === void 0 ? this.resolver.getJwt() : this.resolver.getJwt(params);
4343
+ const promise = new Promise((resolve, reject) => {
4344
+ resolverPromise.then(({ jwt, extraInfo }) => {
4345
+ this.inflightPromises.delete(key);
4346
+ const token = this.jwtRepository.setToken(jwt, extraInfo, params);
4347
+ resolve(token);
4348
+ }).catch((reason) => {
4349
+ this.inflightPromises.delete(key);
4350
+ reject(reason);
4261
4351
  });
4262
- }
4263
- return this.inflightPromise;
4352
+ });
4353
+ this.inflightPromises.set(key, promise);
4354
+ return promise;
4264
4355
  }
4265
4356
  /**
4266
- * Method to check if a token refresh is in progress.
4357
+ * Method to check if any token refresh is in progress.
4267
4358
  *
4268
- * @returns {boolean} true if a token refresh is in progress, false otherwise.
4359
+ * @returns {boolean} true if at least one refresh is in flight, false otherwise.
4269
4360
  */
4270
4361
  get isRefreshingToken() {
4271
- return this.inflightPromise !== void 0;
4362
+ return this.inflightPromises.size > 0;
4272
4363
  }
4273
4364
  }
4274
4365
 
@@ -4281,8 +4372,17 @@ function buildServiceDescriptor$2(interceptors = {
4281
4372
  return {
4282
4373
  type: "fetch",
4283
4374
  version: "1.0",
4284
- service: function(...args) {
4285
- const context = interceptors.createContext?.();
4375
+ service: function(input, init) {
4376
+ let contextSeed;
4377
+ let cleanInit = init;
4378
+ if (init !== void 0 && "__contextSeed" in init) {
4379
+ const { __contextSeed, ...initWithoutSeed } = init;
4380
+ contextSeed = __contextSeed;
4381
+ cleanInit = Object.keys(initWithoutSeed).length === 0 ? void 0 : initWithoutSeed;
4382
+ }
4383
+ const fetchArgs = cleanInit === void 0 ? [input] : [input, cleanInit];
4384
+ const baseContext = interceptors.createContext?.();
4385
+ const context = contextSeed === void 0 ? baseContext : { ...baseContext, ...contextSeed };
4286
4386
  const {
4287
4387
  request: requestInterceptors = [],
4288
4388
  retry: retryInterceptor = void 0,
@@ -4290,17 +4390,17 @@ function buildServiceDescriptor$2(interceptors = {
4290
4390
  finally: finallyInterceptors = []
4291
4391
  } = interceptors;
4292
4392
  const pending = requestInterceptors.reduce(
4293
- (previousPromise, interceptor) => previousPromise.then((args2) => interceptor(args2, context)),
4294
- resolvedPromiseLike$2(args)
4393
+ (previousPromise, interceptor) => previousPromise.then((args) => interceptor(args, context)),
4394
+ resolvedPromiseLike$2(fetchArgs)
4295
4395
  );
4296
- return Promise.resolve(pending).then((args2) => {
4396
+ return Promise.resolve(pending).then((args) => {
4297
4397
  if (retryInterceptor) {
4298
- return retryInterceptor(args2, retryService, context);
4398
+ return retryInterceptor(args, retryService, context);
4299
4399
  } else {
4300
4400
  if (retryService) {
4301
- return retryService.applyRetry(() => fetch(...args2));
4401
+ return retryService.applyRetry(() => fetch(...args));
4302
4402
  }
4303
- return fetch(...args2);
4403
+ return fetch(...args);
4304
4404
  }
4305
4405
  }).then((response) => {
4306
4406
  return responseInterceptors.reduce(
@@ -4764,8 +4864,6 @@ function generateRequestId$1() {
4764
4864
  }
4765
4865
  }
4766
4866
 
4767
- function e(e){this.message=e;}e.prototype=new Error,e.prototype.name="InvalidCharacterError";"undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function n(e){this.message=e;}n.prototype=new Error,n.prototype.name="InvalidTokenError";
4768
-
4769
4867
  /**
4770
4868
  * Observability / Critical Availability Program (230+)
4771
4869
  *
@@ -5575,7 +5673,7 @@ function getEnvironmentSetting(name) {
5575
5673
  }
5576
5674
  return undefined;
5577
5675
  }
5578
- // version: 1.440.0-1ddfff6500
5676
+ // version: 1.442.0-d73ebfc396
5579
5677
 
5580
5678
  const environmentHasAura = typeof window !== 'undefined' && typeof window.$A !== 'undefined';
5581
5679
  const defaultConfig = {
@@ -5971,6 +6069,7 @@ function buildLexRuntime5xxStatusResponseInterceptor(logger) {
5971
6069
  // Throw a simple error to terminate the request completely
5972
6070
  // The consumer has NOT opted in to handle 5xx errors, so we don't return any response
5973
6071
  // The systemError event above will handle showing the gack dialog
6072
+ // Stays an Error (unlike the Luvio path below) — Conduit's FetchNetworkCommand wraps the rejection via toError(), which JSON-stringifies non-Error throws into a useless Error("{}").
5974
6073
  // eslint-disable-next-line @salesforce/lds/no-error-in-production
5975
6074
  throw new Error(error.message);
5976
6075
  }
@@ -6011,11 +6110,10 @@ function buildLexRuntimeLuvio5xxStatusResponseInterceptor() {
6011
6110
  window.setTimeout(() => {
6012
6111
  dispatchGlobalEvent('markup://aura:systemError', evtArgs);
6013
6112
  }, 0);
6014
- // Throw a simple error to terminate the request completely
6015
- // The consumer has NOT opted in to handle 5xx errors, so we don't return any response
6016
- // The systemError event above will handle showing the gack dialog
6017
- // eslint-disable-next-line @salesforce/lds/no-error-in-production
6018
- throw new Error(error.message);
6113
+ // Throw the FetchResponse so luvio's isFetchResponse() check (Environment.ts)
6114
+ // produces errorType: 'fetchResponse' instead of 'networkAdapterError',
6115
+ // matching the Aura path which throws AuraFetchResponse(500, ...).
6116
+ throw response;
6019
6117
  }
6020
6118
  return response;
6021
6119
  };
@@ -6261,6 +6359,36 @@ function buildLuvioCsrfTokenInterceptor() {
6261
6359
  };
6262
6360
  }
6263
6361
 
6362
+ const ENTITY_ENCODING_HEADER = 'X-Chatter-Entity-Encoding';
6363
+ const ENTITY_ENCODING_DISABLED_VALUE = 'false';
6364
+ /**
6365
+ * Builds a request interceptor that sets `X-Chatter-Entity-Encoding: false` on
6366
+ * outgoing requests. Connect REST applies HTML4 entity escaping to every string
6367
+ * field of a response unless this header is sent with the literal value "false"
6368
+ * (case-insensitive); any other value is equivalent to omitting the header.
6369
+ */
6370
+ function buildEntityEncodingInterceptor() {
6371
+ return (fetchArgs) => {
6372
+ return resolvedPromiseLike$2(setHeader(ENTITY_ENCODING_HEADER, ENTITY_ENCODING_DISABLED_VALUE, fetchArgs));
6373
+ };
6374
+ }
6375
+ /**
6376
+ * Builds a Luvio request interceptor that sets `X-Chatter-Entity-Encoding: false`
6377
+ * on the outgoing ResourceRequest when the header is absent. See
6378
+ * {@link buildEntityEncodingInterceptor} for context.
6379
+ */
6380
+ function buildLuvioEntityEncodingInterceptor() {
6381
+ return (resourceRequest) => {
6382
+ if (!resourceRequest.headers) {
6383
+ resourceRequest.headers = {};
6384
+ }
6385
+ if (!resourceRequest.headers[ENTITY_ENCODING_HEADER]) {
6386
+ resourceRequest.headers[ENTITY_ENCODING_HEADER] = ENTITY_ENCODING_DISABLED_VALUE;
6387
+ }
6388
+ return resolvedPromiseLike$2(resourceRequest);
6389
+ };
6390
+ }
6391
+
6264
6392
  function createInstrumentationIdContext() {
6265
6393
  return () => ({
6266
6394
  instrumentationId: generateRequestId(),
@@ -7021,6 +7149,7 @@ const composedFetchNetworkAdapter = {
7021
7149
  buildLuvioTransportMarksSendInterceptor(),
7022
7150
  buildLuvioPageScopedCacheRequestInterceptor(),
7023
7151
  buildLuvioCsrfTokenInterceptor(),
7152
+ buildLuvioEntityEncodingInterceptor(),
7024
7153
  ],
7025
7154
  retry: buildLuvioFetchRetryInterceptor(),
7026
7155
  response: [
@@ -9954,6 +10083,7 @@ function getLexRuntimeDefaultInterceptorConfig(logger) {
9954
10083
  buildActionMarksSendInterceptor(),
9955
10084
  buildTransportMarksSendInterceptor(),
9956
10085
  buildCsrfTokenInterceptor(),
10086
+ buildEntityEncodingInterceptor(),
9957
10087
  ],
9958
10088
  retry: buildCsrfRetryInterceptor(),
9959
10089
  response: [
@@ -10725,4 +10855,4 @@ function ldsEngineCreator() {
10725
10855
  }
10726
10856
 
10727
10857
  export { LexRequestStrategy, PdlPrefetcherEventType, PdlRequestPriority, buildPredictorForContext, configService, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, subscribeToPrefetcherEvents, unregisterRequestStrategy, whenPredictionsReady };
10728
- // version: 1.440.0-267427df73
10858
+ // version: 1.442.0-e47893165a
@@ -8,8 +8,4 @@ export declare function buildJwtAuthorizedSfapFetchServiceDescriptor(logger: Log
8
8
  * copilot commands.
9
9
  */
10
10
  export declare function buildCopilotFetchServiceDescriptor(logger: LoggerService): FetchServiceDescriptor;
11
- export declare const lightningJwtResolver: {
12
- getJwt(): Promise<any>;
13
- };
14
- export declare function buildJwtAuthorizedLightningFetchServiceDescriptor(): FetchServiceDescriptor;
15
11
  export declare function buildUnauthorizedFetchServiceDescriptor(): FetchServiceDescriptor;
@@ -0,0 +1,17 @@
1
+ import type { RequestInterceptor } from '@conduit-client/service-fetch-network/v1';
2
+ import type { ResourceRequest } from '@luvio/engine';
3
+ export declare const ENTITY_ENCODING_HEADER = "X-Chatter-Entity-Encoding";
4
+ export declare const ENTITY_ENCODING_DISABLED_VALUE = "false";
5
+ /**
6
+ * Builds a request interceptor that sets `X-Chatter-Entity-Encoding: false` on
7
+ * outgoing requests. Connect REST applies HTML4 entity escaping to every string
8
+ * field of a response unless this header is sent with the literal value "false"
9
+ * (case-insensitive); any other value is equivalent to omitting the header.
10
+ */
11
+ export declare function buildEntityEncodingInterceptor(): RequestInterceptor;
12
+ /**
13
+ * Builds a Luvio request interceptor that sets `X-Chatter-Entity-Encoding: false`
14
+ * on the outgoing ResourceRequest when the header is absent. See
15
+ * {@link buildEntityEncodingInterceptor} for context.
16
+ */
17
+ export declare function buildLuvioEntityEncodingInterceptor(): (resourceRequest: ResourceRequest) => PromiseLike<ResourceRequest>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-aura",
3
- "version": "1.440.0",
3
+ "version": "1.442.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for Aura runtime.",
6
6
  "main": "dist/ldsEngineCreator.js",
@@ -34,52 +34,52 @@
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.20.5",
38
- "@conduit-client/tools-core": "3.20.5",
39
- "@salesforce/lds-adapters-apex": "^1.440.0",
40
- "@salesforce/lds-adapters-uiapi": "^1.440.0",
41
- "@salesforce/lds-ads-bridge": "^1.440.0",
42
- "@salesforce/lds-aura-storage": "^1.440.0",
43
- "@salesforce/lds-bindings": "^1.440.0",
44
- "@salesforce/lds-instrumentation": "^1.440.0",
45
- "@salesforce/lds-network-adapter": "^1.440.0",
46
- "@salesforce/lds-network-aura": "^1.440.0",
47
- "@salesforce/lds-network-fetch": "^1.440.0",
37
+ "@conduit-client/service-provisioner": "3.21.0",
38
+ "@conduit-client/tools-core": "3.21.0",
39
+ "@salesforce/lds-adapters-apex": "^1.442.0",
40
+ "@salesforce/lds-adapters-uiapi": "^1.442.0",
41
+ "@salesforce/lds-ads-bridge": "^1.442.0",
42
+ "@salesforce/lds-aura-storage": "^1.442.0",
43
+ "@salesforce/lds-bindings": "^1.442.0",
44
+ "@salesforce/lds-instrumentation": "^1.442.0",
45
+ "@salesforce/lds-network-adapter": "^1.442.0",
46
+ "@salesforce/lds-network-aura": "^1.442.0",
47
+ "@salesforce/lds-network-fetch": "^1.442.0",
48
48
  "jwt-encode": "1.0.1"
49
49
  },
50
50
  "dependencies": {
51
- "@conduit-client/command-aura-graphql-normalized-cache-control": "3.20.5",
52
- "@conduit-client/command-aura-network": "3.20.5",
53
- "@conduit-client/command-aura-normalized-cache-control": "3.20.5",
54
- "@conduit-client/command-aura-resource-cache-control": "3.20.5",
55
- "@conduit-client/command-fetch-network": "3.20.5",
56
- "@conduit-client/command-http-graphql-normalized-cache-control": "3.20.5",
57
- "@conduit-client/command-http-normalized-cache-control": "3.20.5",
58
- "@conduit-client/command-ndjson": "3.20.5",
59
- "@conduit-client/command-network": "3.20.5",
60
- "@conduit-client/command-sse": "3.20.5",
61
- "@conduit-client/command-streaming": "3.20.5",
62
- "@conduit-client/service-aura-network": "3.20.5",
63
- "@conduit-client/service-bindings-imperative": "3.20.5",
64
- "@conduit-client/service-bindings-lwc": "3.20.5",
65
- "@conduit-client/service-cache": "3.20.5",
66
- "@conduit-client/service-cache-control": "3.20.5",
67
- "@conduit-client/service-cache-inclusion-policy": "3.20.5",
68
- "@conduit-client/service-config": "3.20.5",
69
- "@conduit-client/service-feature-flags": "3.20.5",
70
- "@conduit-client/service-fetch-network": "3.20.5",
71
- "@conduit-client/service-instrument-command": "3.20.5",
72
- "@conduit-client/service-pubsub": "3.20.5",
73
- "@conduit-client/service-store": "3.20.5",
74
- "@conduit-client/utils": "3.20.5",
51
+ "@conduit-client/command-aura-graphql-normalized-cache-control": "3.21.0",
52
+ "@conduit-client/command-aura-network": "3.21.0",
53
+ "@conduit-client/command-aura-normalized-cache-control": "3.21.0",
54
+ "@conduit-client/command-aura-resource-cache-control": "3.21.0",
55
+ "@conduit-client/command-fetch-network": "3.21.0",
56
+ "@conduit-client/command-http-graphql-normalized-cache-control": "3.21.0",
57
+ "@conduit-client/command-http-normalized-cache-control": "3.21.0",
58
+ "@conduit-client/command-ndjson": "3.21.0",
59
+ "@conduit-client/command-network": "3.21.0",
60
+ "@conduit-client/command-sse": "3.21.0",
61
+ "@conduit-client/command-streaming": "3.21.0",
62
+ "@conduit-client/service-aura-network": "3.21.0",
63
+ "@conduit-client/service-bindings-imperative": "3.21.0",
64
+ "@conduit-client/service-bindings-lwc": "3.21.0",
65
+ "@conduit-client/service-cache": "3.21.0",
66
+ "@conduit-client/service-cache-control": "3.21.0",
67
+ "@conduit-client/service-cache-inclusion-policy": "3.21.0",
68
+ "@conduit-client/service-config": "3.21.0",
69
+ "@conduit-client/service-feature-flags": "3.21.0",
70
+ "@conduit-client/service-fetch-network": "3.21.0",
71
+ "@conduit-client/service-instrument-command": "3.21.0",
72
+ "@conduit-client/service-pubsub": "3.21.0",
73
+ "@conduit-client/service-store": "3.21.0",
74
+ "@conduit-client/utils": "3.21.0",
75
75
  "@luvio/network-adapter-composable": "0.160.5",
76
76
  "@luvio/network-adapter-fetch": "0.160.5",
77
77
  "@lwc/state": "^0.29.0",
78
- "@salesforce/lds-adapters-onestore-graphql": "^1.440.0",
78
+ "@salesforce/lds-adapters-onestore-graphql": "^1.442.0",
79
79
  "@salesforce/lds-adapters-uiapi-lex": "^1.415.0",
80
- "@salesforce/lds-durable-storage": "^1.440.0",
81
- "@salesforce/lds-luvio-service": "^1.440.0",
82
- "@salesforce/lds-luvio-uiapi-records-service": "^1.440.0"
80
+ "@salesforce/lds-durable-storage": "^1.442.0",
81
+ "@salesforce/lds-luvio-service": "^1.442.0",
82
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.442.0"
83
83
  },
84
84
  "luvioBundlesize": [
85
85
  {
@@ -87,7 +87,7 @@
87
87
  "maxSize": {
88
88
  "none": "383 kB",
89
89
  "min": "190 kB",
90
- "compressed": "63 kB"
90
+ "compressed": "64.5 kB"
91
91
  }
92
92
  }
93
93
  ],