@salesforce/lds-runtime-aura 1.440.0 → 1.441.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.
package/dist/ldsEngineCreator.js
CHANGED
|
@@ -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
|
-
|
|
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.
|
|
2647
|
+
// version: 1.441.0-5e7d04c146
|
|
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.
|
|
2985
|
+
// version: 1.441.0-5e7d04c146
|
|
2983
2986
|
|
|
2984
2987
|
class RetryService {
|
|
2985
2988
|
constructor(defaultRetryPolicy) {
|
|
@@ -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
|
|
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.
|
|
4154
|
+
return this.getToken();
|
|
4132
4155
|
}
|
|
4133
4156
|
/**
|
|
4134
|
-
*
|
|
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
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
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
|
|
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
|
-
|
|
4154
|
-
this.
|
|
4190
|
+
removeToken(params) {
|
|
4191
|
+
const key = cacheKeyFor(params);
|
|
4192
|
+
this._tokens.delete(key);
|
|
4193
|
+
this.clearTimeoutHandler(key);
|
|
4155
4194
|
}
|
|
4156
4195
|
/**
|
|
4157
|
-
*
|
|
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.
|
|
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
|
-
*
|
|
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
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
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
|
|
4251
|
+
* Observe and handle expiration of the token at the given cache key.
|
|
4178
4252
|
*/
|
|
4179
|
-
observeTokenExpiration() {
|
|
4180
|
-
this.clearTimeoutHandler();
|
|
4181
|
-
|
|
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
|
-
|
|
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 =
|
|
4194
|
-
|
|
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,
|
|
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(
|
|
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
|
-
*
|
|
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
|
-
|
|
4235
|
-
|
|
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.
|
|
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
|
-
* @
|
|
4333
|
+
* @param params - Optional mint parameters. Omit for the legacy parameterless token.
|
|
4334
|
+
* @returns Promise of the refreshed token.
|
|
4249
4335
|
*/
|
|
4250
|
-
refreshToken() {
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
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
|
-
|
|
4352
|
+
});
|
|
4353
|
+
this.inflightPromises.set(key, promise);
|
|
4354
|
+
return promise;
|
|
4264
4355
|
}
|
|
4265
4356
|
/**
|
|
4266
|
-
* Method to check if
|
|
4357
|
+
* Method to check if any token refresh is in progress.
|
|
4267
4358
|
*
|
|
4268
|
-
* @returns {boolean} true if
|
|
4359
|
+
* @returns {boolean} true if at least one refresh is in flight, false otherwise.
|
|
4269
4360
|
*/
|
|
4270
4361
|
get isRefreshingToken() {
|
|
4271
|
-
return this.
|
|
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(
|
|
4285
|
-
|
|
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((
|
|
4294
|
-
resolvedPromiseLike$2(
|
|
4393
|
+
(previousPromise, interceptor) => previousPromise.then((args) => interceptor(args, context)),
|
|
4394
|
+
resolvedPromiseLike$2(fetchArgs)
|
|
4295
4395
|
);
|
|
4296
|
-
return Promise.resolve(pending).then((
|
|
4396
|
+
return Promise.resolve(pending).then((args) => {
|
|
4297
4397
|
if (retryInterceptor) {
|
|
4298
|
-
return retryInterceptor(
|
|
4398
|
+
return retryInterceptor(args, retryService, context);
|
|
4299
4399
|
} else {
|
|
4300
4400
|
if (retryService) {
|
|
4301
|
-
return retryService.applyRetry(() => fetch(...
|
|
4401
|
+
return retryService.applyRetry(() => fetch(...args));
|
|
4302
4402
|
}
|
|
4303
|
-
return fetch(...
|
|
4403
|
+
return fetch(...args);
|
|
4304
4404
|
}
|
|
4305
4405
|
}).then((response) => {
|
|
4306
4406
|
return responseInterceptors.reduce(
|
|
@@ -5575,7 +5675,7 @@ function getEnvironmentSetting(name) {
|
|
|
5575
5675
|
}
|
|
5576
5676
|
return undefined;
|
|
5577
5677
|
}
|
|
5578
|
-
// version: 1.
|
|
5678
|
+
// version: 1.441.0-0055bd971e
|
|
5579
5679
|
|
|
5580
5680
|
const environmentHasAura = typeof window !== 'undefined' && typeof window.$A !== 'undefined';
|
|
5581
5681
|
const defaultConfig = {
|
|
@@ -5971,6 +6071,7 @@ function buildLexRuntime5xxStatusResponseInterceptor(logger) {
|
|
|
5971
6071
|
// Throw a simple error to terminate the request completely
|
|
5972
6072
|
// The consumer has NOT opted in to handle 5xx errors, so we don't return any response
|
|
5973
6073
|
// The systemError event above will handle showing the gack dialog
|
|
6074
|
+
// 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
6075
|
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
5975
6076
|
throw new Error(error.message);
|
|
5976
6077
|
}
|
|
@@ -6011,11 +6112,10 @@ function buildLexRuntimeLuvio5xxStatusResponseInterceptor() {
|
|
|
6011
6112
|
window.setTimeout(() => {
|
|
6012
6113
|
dispatchGlobalEvent('markup://aura:systemError', evtArgs);
|
|
6013
6114
|
}, 0);
|
|
6014
|
-
// Throw
|
|
6015
|
-
//
|
|
6016
|
-
//
|
|
6017
|
-
|
|
6018
|
-
throw new Error(error.message);
|
|
6115
|
+
// Throw the FetchResponse so luvio's isFetchResponse() check (Environment.ts)
|
|
6116
|
+
// produces errorType: 'fetchResponse' instead of 'networkAdapterError',
|
|
6117
|
+
// matching the Aura path which throws AuraFetchResponse(500, ...).
|
|
6118
|
+
throw response;
|
|
6019
6119
|
}
|
|
6020
6120
|
return response;
|
|
6021
6121
|
};
|
|
@@ -6261,6 +6361,36 @@ function buildLuvioCsrfTokenInterceptor() {
|
|
|
6261
6361
|
};
|
|
6262
6362
|
}
|
|
6263
6363
|
|
|
6364
|
+
const ENTITY_ENCODING_HEADER = 'X-Chatter-Entity-Encoding';
|
|
6365
|
+
const ENTITY_ENCODING_DISABLED_VALUE = 'false';
|
|
6366
|
+
/**
|
|
6367
|
+
* Builds a request interceptor that sets `X-Chatter-Entity-Encoding: false` on
|
|
6368
|
+
* outgoing requests. Connect REST applies HTML4 entity escaping to every string
|
|
6369
|
+
* field of a response unless this header is sent with the literal value "false"
|
|
6370
|
+
* (case-insensitive); any other value is equivalent to omitting the header.
|
|
6371
|
+
*/
|
|
6372
|
+
function buildEntityEncodingInterceptor() {
|
|
6373
|
+
return (fetchArgs) => {
|
|
6374
|
+
return resolvedPromiseLike$2(setHeader(ENTITY_ENCODING_HEADER, ENTITY_ENCODING_DISABLED_VALUE, fetchArgs));
|
|
6375
|
+
};
|
|
6376
|
+
}
|
|
6377
|
+
/**
|
|
6378
|
+
* Builds a Luvio request interceptor that sets `X-Chatter-Entity-Encoding: false`
|
|
6379
|
+
* on the outgoing ResourceRequest when the header is absent. See
|
|
6380
|
+
* {@link buildEntityEncodingInterceptor} for context.
|
|
6381
|
+
*/
|
|
6382
|
+
function buildLuvioEntityEncodingInterceptor() {
|
|
6383
|
+
return (resourceRequest) => {
|
|
6384
|
+
if (!resourceRequest.headers) {
|
|
6385
|
+
resourceRequest.headers = {};
|
|
6386
|
+
}
|
|
6387
|
+
if (!resourceRequest.headers[ENTITY_ENCODING_HEADER]) {
|
|
6388
|
+
resourceRequest.headers[ENTITY_ENCODING_HEADER] = ENTITY_ENCODING_DISABLED_VALUE;
|
|
6389
|
+
}
|
|
6390
|
+
return resolvedPromiseLike$2(resourceRequest);
|
|
6391
|
+
};
|
|
6392
|
+
}
|
|
6393
|
+
|
|
6264
6394
|
function createInstrumentationIdContext() {
|
|
6265
6395
|
return () => ({
|
|
6266
6396
|
instrumentationId: generateRequestId(),
|
|
@@ -7021,6 +7151,7 @@ const composedFetchNetworkAdapter = {
|
|
|
7021
7151
|
buildLuvioTransportMarksSendInterceptor(),
|
|
7022
7152
|
buildLuvioPageScopedCacheRequestInterceptor(),
|
|
7023
7153
|
buildLuvioCsrfTokenInterceptor(),
|
|
7154
|
+
buildLuvioEntityEncodingInterceptor(),
|
|
7024
7155
|
],
|
|
7025
7156
|
retry: buildLuvioFetchRetryInterceptor(),
|
|
7026
7157
|
response: [
|
|
@@ -9954,6 +10085,7 @@ function getLexRuntimeDefaultInterceptorConfig(logger) {
|
|
|
9954
10085
|
buildActionMarksSendInterceptor(),
|
|
9955
10086
|
buildTransportMarksSendInterceptor(),
|
|
9956
10087
|
buildCsrfTokenInterceptor(),
|
|
10088
|
+
buildEntityEncodingInterceptor(),
|
|
9957
10089
|
],
|
|
9958
10090
|
retry: buildCsrfRetryInterceptor(),
|
|
9959
10091
|
response: [
|
|
@@ -10725,4 +10857,4 @@ function ldsEngineCreator() {
|
|
|
10725
10857
|
}
|
|
10726
10858
|
|
|
10727
10859
|
export { LexRequestStrategy, PdlPrefetcherEventType, PdlRequestPriority, buildPredictorForContext, configService, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, subscribeToPrefetcherEvents, unregisterRequestStrategy, whenPredictionsReady };
|
|
10728
|
-
// version: 1.
|
|
10860
|
+
// version: 1.441.0-5e7d04c146
|
|
@@ -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.
|
|
3
|
+
"version": "1.441.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.
|
|
38
|
-
"@conduit-client/tools-core": "3.
|
|
39
|
-
"@salesforce/lds-adapters-apex": "^1.
|
|
40
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
41
|
-
"@salesforce/lds-ads-bridge": "^1.
|
|
42
|
-
"@salesforce/lds-aura-storage": "^1.
|
|
43
|
-
"@salesforce/lds-bindings": "^1.
|
|
44
|
-
"@salesforce/lds-instrumentation": "^1.
|
|
45
|
-
"@salesforce/lds-network-adapter": "^1.
|
|
46
|
-
"@salesforce/lds-network-aura": "^1.
|
|
47
|
-
"@salesforce/lds-network-fetch": "^1.
|
|
37
|
+
"@conduit-client/service-provisioner": "3.21.0",
|
|
38
|
+
"@conduit-client/tools-core": "3.21.0",
|
|
39
|
+
"@salesforce/lds-adapters-apex": "^1.441.0",
|
|
40
|
+
"@salesforce/lds-adapters-uiapi": "^1.441.0",
|
|
41
|
+
"@salesforce/lds-ads-bridge": "^1.441.0",
|
|
42
|
+
"@salesforce/lds-aura-storage": "^1.441.0",
|
|
43
|
+
"@salesforce/lds-bindings": "^1.441.0",
|
|
44
|
+
"@salesforce/lds-instrumentation": "^1.441.0",
|
|
45
|
+
"@salesforce/lds-network-adapter": "^1.441.0",
|
|
46
|
+
"@salesforce/lds-network-aura": "^1.441.0",
|
|
47
|
+
"@salesforce/lds-network-fetch": "^1.441.0",
|
|
48
48
|
"jwt-encode": "1.0.1"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@conduit-client/command-aura-graphql-normalized-cache-control": "3.
|
|
52
|
-
"@conduit-client/command-aura-network": "3.
|
|
53
|
-
"@conduit-client/command-aura-normalized-cache-control": "3.
|
|
54
|
-
"@conduit-client/command-aura-resource-cache-control": "3.
|
|
55
|
-
"@conduit-client/command-fetch-network": "3.
|
|
56
|
-
"@conduit-client/command-http-graphql-normalized-cache-control": "3.
|
|
57
|
-
"@conduit-client/command-http-normalized-cache-control": "3.
|
|
58
|
-
"@conduit-client/command-ndjson": "3.
|
|
59
|
-
"@conduit-client/command-network": "3.
|
|
60
|
-
"@conduit-client/command-sse": "3.
|
|
61
|
-
"@conduit-client/command-streaming": "3.
|
|
62
|
-
"@conduit-client/service-aura-network": "3.
|
|
63
|
-
"@conduit-client/service-bindings-imperative": "3.
|
|
64
|
-
"@conduit-client/service-bindings-lwc": "3.
|
|
65
|
-
"@conduit-client/service-cache": "3.
|
|
66
|
-
"@conduit-client/service-cache-control": "3.
|
|
67
|
-
"@conduit-client/service-cache-inclusion-policy": "3.
|
|
68
|
-
"@conduit-client/service-config": "3.
|
|
69
|
-
"@conduit-client/service-feature-flags": "3.
|
|
70
|
-
"@conduit-client/service-fetch-network": "3.
|
|
71
|
-
"@conduit-client/service-instrument-command": "3.
|
|
72
|
-
"@conduit-client/service-pubsub": "3.
|
|
73
|
-
"@conduit-client/service-store": "3.
|
|
74
|
-
"@conduit-client/utils": "3.
|
|
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.
|
|
78
|
+
"@salesforce/lds-adapters-onestore-graphql": "^1.441.0",
|
|
79
79
|
"@salesforce/lds-adapters-uiapi-lex": "^1.415.0",
|
|
80
|
-
"@salesforce/lds-durable-storage": "^1.
|
|
81
|
-
"@salesforce/lds-luvio-service": "^1.
|
|
82
|
-
"@salesforce/lds-luvio-uiapi-records-service": "^1.
|
|
80
|
+
"@salesforce/lds-durable-storage": "^1.441.0",
|
|
81
|
+
"@salesforce/lds-luvio-service": "^1.441.0",
|
|
82
|
+
"@salesforce/lds-luvio-uiapi-records-service": "^1.441.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": "63.5 kB"
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
],
|