@salesforce/lds-runtime-aura 1.429.0 → 1.431.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
|
@@ -13,11 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { HttpStatusCode as HttpStatusCode$2, InMemoryStore, Environment, Luvio, InMemoryStoreQueryEvaluator } from 'force/luvioEngine';
|
|
16
|
-
import ldsTrackedFieldsBehaviorGate from '@salesforce/gate/lds.useNewTrackedFieldBehavior';
|
|
17
16
|
import usePredictiveLoading from '@salesforce/gate/lds.usePredictiveLoading';
|
|
18
|
-
import useApexPredictions from '@salesforce/gate/lds.pdl.useApexPredictions';
|
|
19
|
-
import useRelatedListsPredictions from '@salesforce/gate/lds.pdl.useRelatedListsPredictions';
|
|
20
|
-
import useRelatedListPlus from '@salesforce/gate/lds.pdl.useRelatedListPlus';
|
|
21
17
|
import useLocalStorage from '@salesforce/gate/lds.pdl.useLocalStorage';
|
|
22
18
|
import useOneStoreGraphql from '@salesforce/gate/lds.oneStoreGraphqlEnabled.ltng';
|
|
23
19
|
import canCombineRecordLayoutRequests from '@salesforce/gate/lds.pdl.canCombineRecordLayoutRequests';
|
|
@@ -1354,6 +1350,7 @@ class HttpCacheControlCommand extends CacheControlCommand {
|
|
|
1354
1350
|
constructor(services) {
|
|
1355
1351
|
super(services);
|
|
1356
1352
|
this.services = services;
|
|
1353
|
+
this.additionalNullResponses = [];
|
|
1357
1354
|
}
|
|
1358
1355
|
requestFromNetwork() {
|
|
1359
1356
|
return this.fetch();
|
|
@@ -1365,6 +1362,15 @@ class HttpCacheControlCommand extends CacheControlCommand {
|
|
|
1365
1362
|
return resolvedPromiseLike$2(err$1(toError(reason)));
|
|
1366
1363
|
}
|
|
1367
1364
|
}
|
|
1365
|
+
isSemanticNullResponse(response) {
|
|
1366
|
+
return this.additionalNullResponses.includes(response.status);
|
|
1367
|
+
}
|
|
1368
|
+
isProtocolNoBodyStatus(status) {
|
|
1369
|
+
return status === 204 || status === 205;
|
|
1370
|
+
}
|
|
1371
|
+
isUndeclaredNoBodyResponse(response) {
|
|
1372
|
+
return this.isProtocolNoBodyStatus(response.status) && !this.isSemanticNullResponse(response);
|
|
1373
|
+
}
|
|
1368
1374
|
async coerceError(errorResponse) {
|
|
1369
1375
|
return toError(errorResponse.statusText);
|
|
1370
1376
|
}
|
|
@@ -1375,12 +1381,26 @@ class HttpCacheControlCommand extends CacheControlCommand {
|
|
|
1375
1381
|
return response.then(
|
|
1376
1382
|
(response2) => {
|
|
1377
1383
|
if (response2.ok) {
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
+
let resultPromise;
|
|
1385
|
+
if (this.isSemanticNullResponse(response2)) {
|
|
1386
|
+
resultPromise = Promise.resolve(ok$2(null));
|
|
1387
|
+
} else if (this.isUndeclaredNoBodyResponse(response2)) {
|
|
1388
|
+
resultPromise = Promise.resolve(
|
|
1389
|
+
err$1(
|
|
1390
|
+
toError(
|
|
1391
|
+
`Unexpected ${response2.status} response: no-content status was not declared in the API specification. Declare this response in your OAS without a content property.`
|
|
1392
|
+
)
|
|
1393
|
+
)
|
|
1394
|
+
);
|
|
1395
|
+
} else {
|
|
1396
|
+
resultPromise = response2.json().then(
|
|
1397
|
+
(json) => {
|
|
1398
|
+
return this.processFetchReturnValue(json);
|
|
1399
|
+
},
|
|
1400
|
+
(reason) => err$1(toError(reason))
|
|
1401
|
+
);
|
|
1402
|
+
}
|
|
1403
|
+
return resultPromise.finally(() => {
|
|
1384
1404
|
try {
|
|
1385
1405
|
this.afterRequestHooks({ statusCode: response2.status });
|
|
1386
1406
|
} catch {
|
|
@@ -1564,6 +1584,7 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
|
|
|
1564
1584
|
constructor(services) {
|
|
1565
1585
|
super(services);
|
|
1566
1586
|
this.services = services;
|
|
1587
|
+
this.additionalNullResponses = [];
|
|
1567
1588
|
}
|
|
1568
1589
|
fetch() {
|
|
1569
1590
|
try {
|
|
@@ -1572,6 +1593,15 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
|
|
|
1572
1593
|
return resolvedPromiseLike$2(err$1(toError(reason)));
|
|
1573
1594
|
}
|
|
1574
1595
|
}
|
|
1596
|
+
isSemanticNullResponse(response) {
|
|
1597
|
+
return this.additionalNullResponses.includes(response.status);
|
|
1598
|
+
}
|
|
1599
|
+
isProtocolNoBodyStatus(status) {
|
|
1600
|
+
return status === 204 || status === 205;
|
|
1601
|
+
}
|
|
1602
|
+
isUndeclaredNoBodyResponse(response) {
|
|
1603
|
+
return this.isProtocolNoBodyStatus(response.status) && !this.isSemanticNullResponse(response);
|
|
1604
|
+
}
|
|
1575
1605
|
async coerceError(errorResponse) {
|
|
1576
1606
|
return toError(errorResponse.statusText);
|
|
1577
1607
|
}
|
|
@@ -1579,10 +1609,24 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
|
|
|
1579
1609
|
return response.then(
|
|
1580
1610
|
(response2) => {
|
|
1581
1611
|
if (response2.ok) {
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1612
|
+
let resultPromise;
|
|
1613
|
+
if (this.isSemanticNullResponse(response2)) {
|
|
1614
|
+
resultPromise = Promise.resolve(ok$2(null));
|
|
1615
|
+
} else if (this.isUndeclaredNoBodyResponse(response2)) {
|
|
1616
|
+
resultPromise = Promise.resolve(
|
|
1617
|
+
err$1(
|
|
1618
|
+
toError(
|
|
1619
|
+
`Unexpected ${response2.status} response: no-content status was not declared in the API specification. Declare this response in your OAS without a content property.`
|
|
1620
|
+
)
|
|
1621
|
+
)
|
|
1622
|
+
);
|
|
1623
|
+
} else {
|
|
1624
|
+
resultPromise = response2.json().then(
|
|
1625
|
+
(json) => ok$2(json),
|
|
1626
|
+
(reason) => err$1(toError(reason))
|
|
1627
|
+
);
|
|
1628
|
+
}
|
|
1629
|
+
return resultPromise.finally(() => {
|
|
1586
1630
|
try {
|
|
1587
1631
|
this.afterRequestHooks({ statusCode: response2.status });
|
|
1588
1632
|
} catch {
|
|
@@ -2712,7 +2756,7 @@ function buildServiceDescriptor$d(luvio) {
|
|
|
2712
2756
|
},
|
|
2713
2757
|
};
|
|
2714
2758
|
}
|
|
2715
|
-
// version: 1.
|
|
2759
|
+
// version: 1.431.0-51a9c51ed3
|
|
2716
2760
|
|
|
2717
2761
|
/*!
|
|
2718
2762
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -3065,7 +3109,7 @@ function buildServiceDescriptor$9(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
3065
3109
|
},
|
|
3066
3110
|
};
|
|
3067
3111
|
}
|
|
3068
|
-
// version: 1.
|
|
3112
|
+
// version: 1.431.0-51a9c51ed3
|
|
3069
3113
|
|
|
3070
3114
|
/*!
|
|
3071
3115
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -4783,13 +4827,6 @@ const platformSfapJwtResolver = {
|
|
|
4783
4827
|
},
|
|
4784
4828
|
};
|
|
4785
4829
|
const jwtManager = new JwtManager(new JwtRepository(), platformSfapJwtResolver);
|
|
4786
|
-
function prefetchSfapJwt() {
|
|
4787
|
-
const maybePromise = jwtManager.getJwt();
|
|
4788
|
-
if ('then' in maybePromise) {
|
|
4789
|
-
return maybePromise.then(() => undefined).catch(() => undefined);
|
|
4790
|
-
}
|
|
4791
|
-
return Promise.resolve(undefined);
|
|
4792
|
-
}
|
|
4793
4830
|
const authenticateRequest = (resourceRequest, jwt) => {
|
|
4794
4831
|
const { token } = jwt;
|
|
4795
4832
|
const { headers } = resourceRequest;
|
|
@@ -5702,7 +5739,7 @@ function getEnvironmentSetting(name) {
|
|
|
5702
5739
|
}
|
|
5703
5740
|
return undefined;
|
|
5704
5741
|
}
|
|
5705
|
-
// version: 1.
|
|
5742
|
+
// version: 1.431.0-51a9c51ed3
|
|
5706
5743
|
|
|
5707
5744
|
const environmentHasAura = typeof window !== 'undefined' && typeof window.$A !== 'undefined';
|
|
5708
5745
|
const defaultConfig = {
|
|
@@ -6979,6 +7016,13 @@ function buildCsrfRetryInterceptor() {
|
|
|
6979
7016
|
const SFAP_BASE_URL = 'api.salesforce.com';
|
|
6980
7017
|
const sfapJwtRepository = new JwtRepository();
|
|
6981
7018
|
const sfapJwtManager = new JwtManager(sfapJwtRepository, platformSfapJwtResolver);
|
|
7019
|
+
function prefetchSfapJwt() {
|
|
7020
|
+
const maybePromise = sfapJwtManager.getJwt();
|
|
7021
|
+
if ('then' in maybePromise) {
|
|
7022
|
+
return maybePromise.then(() => undefined).catch(() => undefined);
|
|
7023
|
+
}
|
|
7024
|
+
return Promise.resolve(undefined);
|
|
7025
|
+
}
|
|
6982
7026
|
function buildJwtAuthorizedSfapFetchServiceDescriptor(logger) {
|
|
6983
7027
|
const jwtAuthorizedFetchService = buildServiceDescriptor$2({
|
|
6984
7028
|
createContext: createInstrumentationIdContext(),
|
|
@@ -10303,9 +10347,7 @@ function setupPredictivePrefetcher(luvio) {
|
|
|
10303
10347
|
const eventEmitter = new PrefetcherEventEmitter();
|
|
10304
10348
|
const prefetcher = new LexPredictivePrefetcher({ context: 'unknown' }, repository, requestRunner, eventEmitter, requestStrategyManager, prefetcherOptions);
|
|
10305
10349
|
registerPrefetcher(luvio, prefetcher);
|
|
10306
|
-
|
|
10307
|
-
registerPrefetcher$1(luvio, prefetcher);
|
|
10308
|
-
}
|
|
10350
|
+
registerPrefetcher$1(luvio, prefetcher);
|
|
10309
10351
|
__lexPrefetcher = prefetcher;
|
|
10310
10352
|
}
|
|
10311
10353
|
function saveRequestAsPrediction(request) {
|
|
@@ -10415,15 +10457,11 @@ function initializeLDS() {
|
|
|
10415
10457
|
const luvio = new Luvio(environment, {
|
|
10416
10458
|
instrument: instrumentation.instrumentLuvio.bind(instrumentation),
|
|
10417
10459
|
});
|
|
10418
|
-
// This configuration is needed by bindings time in adapter. Needs to happen
|
|
10419
|
-
// before setDefaultLuvio is called.
|
|
10420
|
-
configuration.setRelatedListsPredictionsEnabled(useRelatedListsPredictions.isOpen({ fallback: false }));
|
|
10421
|
-
configuration.setRelatedListsPlusPredictionsEnabled(useRelatedListPlus.isOpen({ fallback: false }));
|
|
10422
10460
|
setupInstrumentation(luvio, store);
|
|
10423
10461
|
setupMetadataWatcher(luvio);
|
|
10424
10462
|
setupQueryEvaluators(luvio, store);
|
|
10425
10463
|
setDefaultLuvio({ luvio });
|
|
10426
|
-
setTrackedFieldsConfig(
|
|
10464
|
+
setTrackedFieldsConfig(true);
|
|
10427
10465
|
if (usePredictiveLoading.isOpen({ fallback: false })) {
|
|
10428
10466
|
setupPredictivePrefetcher(luvio);
|
|
10429
10467
|
}
|
|
@@ -10533,4 +10571,4 @@ function ldsEngineCreator() {
|
|
|
10533
10571
|
}
|
|
10534
10572
|
|
|
10535
10573
|
export { LexRequestStrategy, PdlPrefetcherEventType, PdlRequestPriority, buildPredictorForContext, configService, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, subscribeToPrefetcherEvents, unregisterRequestStrategy, whenPredictionsReady };
|
|
10536
|
-
// version: 1.
|
|
10574
|
+
// version: 1.431.0-0cb7677555
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type FetchServiceDescriptor } from '@conduit-client/service-fetch-network/v1';
|
|
2
2
|
import { type LoggerService } from '@conduit-client/utils';
|
|
3
|
+
export declare function prefetchSfapJwt(): Promise<undefined>;
|
|
3
4
|
export declare function buildJwtAuthorizedSfapFetchServiceDescriptor(logger: LoggerService): FetchServiceDescriptor;
|
|
4
5
|
/**
|
|
5
6
|
* Returns a service descriptor for a fetch service that includes one-off copilot
|
|
@@ -10,7 +10,6 @@ export type ExtraInfo = {
|
|
|
10
10
|
* {@link JwtResolver} for platform SFAP
|
|
11
11
|
*/
|
|
12
12
|
export declare const platformSfapJwtResolver: JwtResolver<ExtraInfo>;
|
|
13
|
-
export declare function prefetchSfapJwt(): Promise<undefined>;
|
|
14
13
|
declare const composedNetworkAdapter: {
|
|
15
14
|
shouldHandleRequest(resourceRequest: ResourceRequest): boolean;
|
|
16
15
|
adapter: (resourceRequest: ResourceRequest, resourceRequestContext: ResourceRequestContext) => Promise<FetchResponse<any>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-aura",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.431.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS engine for Aura runtime",
|
|
6
6
|
"main": "dist/ldsEngineCreator.js",
|
|
@@ -34,51 +34,51 @@
|
|
|
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.19.
|
|
38
|
-
"@conduit-client/tools-core": "3.19.
|
|
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-aura": "^1.
|
|
46
|
-
"@salesforce/lds-network-fetch": "^1.
|
|
37
|
+
"@conduit-client/service-provisioner": "3.19.2",
|
|
38
|
+
"@conduit-client/tools-core": "3.19.2",
|
|
39
|
+
"@salesforce/lds-adapters-apex": "^1.431.0",
|
|
40
|
+
"@salesforce/lds-adapters-uiapi": "^1.431.0",
|
|
41
|
+
"@salesforce/lds-ads-bridge": "^1.431.0",
|
|
42
|
+
"@salesforce/lds-aura-storage": "^1.431.0",
|
|
43
|
+
"@salesforce/lds-bindings": "^1.431.0",
|
|
44
|
+
"@salesforce/lds-instrumentation": "^1.431.0",
|
|
45
|
+
"@salesforce/lds-network-aura": "^1.431.0",
|
|
46
|
+
"@salesforce/lds-network-fetch": "^1.431.0",
|
|
47
47
|
"jwt-encode": "1.0.1"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@conduit-client/command-aura-graphql-normalized-cache-control": "3.19.
|
|
51
|
-
"@conduit-client/command-aura-network": "3.19.
|
|
52
|
-
"@conduit-client/command-aura-normalized-cache-control": "3.19.
|
|
53
|
-
"@conduit-client/command-aura-resource-cache-control": "3.19.
|
|
54
|
-
"@conduit-client/command-fetch-network": "3.19.
|
|
55
|
-
"@conduit-client/command-http-graphql-normalized-cache-control": "3.19.
|
|
56
|
-
"@conduit-client/command-http-normalized-cache-control": "3.19.
|
|
57
|
-
"@conduit-client/command-ndjson": "3.19.
|
|
58
|
-
"@conduit-client/command-network": "3.19.
|
|
59
|
-
"@conduit-client/command-sse": "3.19.
|
|
60
|
-
"@conduit-client/command-streaming": "3.19.
|
|
61
|
-
"@conduit-client/service-aura-network": "3.19.
|
|
62
|
-
"@conduit-client/service-bindings-imperative": "3.19.
|
|
63
|
-
"@conduit-client/service-bindings-lwc": "3.19.
|
|
64
|
-
"@conduit-client/service-cache": "3.19.
|
|
65
|
-
"@conduit-client/service-cache-control": "3.19.
|
|
66
|
-
"@conduit-client/service-cache-inclusion-policy": "3.19.
|
|
67
|
-
"@conduit-client/service-config": "3.19.
|
|
68
|
-
"@conduit-client/service-feature-flags": "3.19.
|
|
69
|
-
"@conduit-client/service-fetch-network": "3.19.
|
|
70
|
-
"@conduit-client/service-instrument-command": "3.19.
|
|
71
|
-
"@conduit-client/service-pubsub": "3.19.
|
|
72
|
-
"@conduit-client/service-store": "3.19.
|
|
73
|
-
"@conduit-client/utils": "3.19.
|
|
50
|
+
"@conduit-client/command-aura-graphql-normalized-cache-control": "3.19.2",
|
|
51
|
+
"@conduit-client/command-aura-network": "3.19.2",
|
|
52
|
+
"@conduit-client/command-aura-normalized-cache-control": "3.19.2",
|
|
53
|
+
"@conduit-client/command-aura-resource-cache-control": "3.19.2",
|
|
54
|
+
"@conduit-client/command-fetch-network": "3.19.2",
|
|
55
|
+
"@conduit-client/command-http-graphql-normalized-cache-control": "3.19.2",
|
|
56
|
+
"@conduit-client/command-http-normalized-cache-control": "3.19.2",
|
|
57
|
+
"@conduit-client/command-ndjson": "3.19.2",
|
|
58
|
+
"@conduit-client/command-network": "3.19.2",
|
|
59
|
+
"@conduit-client/command-sse": "3.19.2",
|
|
60
|
+
"@conduit-client/command-streaming": "3.19.2",
|
|
61
|
+
"@conduit-client/service-aura-network": "3.19.2",
|
|
62
|
+
"@conduit-client/service-bindings-imperative": "3.19.2",
|
|
63
|
+
"@conduit-client/service-bindings-lwc": "3.19.2",
|
|
64
|
+
"@conduit-client/service-cache": "3.19.2",
|
|
65
|
+
"@conduit-client/service-cache-control": "3.19.2",
|
|
66
|
+
"@conduit-client/service-cache-inclusion-policy": "3.19.2",
|
|
67
|
+
"@conduit-client/service-config": "3.19.2",
|
|
68
|
+
"@conduit-client/service-feature-flags": "3.19.2",
|
|
69
|
+
"@conduit-client/service-fetch-network": "3.19.2",
|
|
70
|
+
"@conduit-client/service-instrument-command": "3.19.2",
|
|
71
|
+
"@conduit-client/service-pubsub": "3.19.2",
|
|
72
|
+
"@conduit-client/service-store": "3.19.2",
|
|
73
|
+
"@conduit-client/utils": "3.19.2",
|
|
74
74
|
"@luvio/network-adapter-composable": "0.160.4",
|
|
75
75
|
"@luvio/network-adapter-fetch": "0.160.4",
|
|
76
76
|
"@lwc/state": "^0.29.0",
|
|
77
|
-
"@salesforce/lds-adapters-onestore-graphql": "^1.
|
|
77
|
+
"@salesforce/lds-adapters-onestore-graphql": "^1.431.0",
|
|
78
78
|
"@salesforce/lds-adapters-uiapi-lex": "^1.415.0",
|
|
79
|
-
"@salesforce/lds-durable-storage": "^1.
|
|
80
|
-
"@salesforce/lds-luvio-service": "^1.
|
|
81
|
-
"@salesforce/lds-luvio-uiapi-records-service": "^1.
|
|
79
|
+
"@salesforce/lds-durable-storage": "^1.431.0",
|
|
80
|
+
"@salesforce/lds-luvio-service": "^1.431.0",
|
|
81
|
+
"@salesforce/lds-luvio-uiapi-records-service": "^1.431.0"
|
|
82
82
|
},
|
|
83
83
|
"luvioBundlesize": [
|
|
84
84
|
{
|