@salesforce/lds-runtime-aura 1.385.0 → 1.387.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 +213 -109
- package/package.json +36 -36
package/dist/ldsEngineCreator.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* *******************************************************************************************
|
|
13
13
|
*/
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
|
-
import { HttpStatusCode as HttpStatusCode$
|
|
15
|
+
import { HttpStatusCode as HttpStatusCode$2, InMemoryStore, Environment, Luvio, InMemoryStoreQueryEvaluator } from 'force/luvioEngine';
|
|
16
16
|
import ldsTrackedFieldsBehaviorGate from '@salesforce/gate/lds.useNewTrackedFieldBehavior';
|
|
17
17
|
import usePredictiveLoading from '@salesforce/gate/lds.usePredictiveLoading';
|
|
18
18
|
import useApexPredictions from '@salesforce/gate/lds.pdl.useApexPredictions';
|
|
@@ -110,18 +110,24 @@ let Err$1 = class Err {
|
|
|
110
110
|
};
|
|
111
111
|
const ok$2 = (value) => new Ok$2(value);
|
|
112
112
|
const err$1 = (err2) => new Err$1(err2);
|
|
113
|
+
function isResult(value) {
|
|
114
|
+
return value != null && typeof value === "object" && "isOk" in value && "isErr" in value && typeof value.isOk === "function" && typeof value.isErr === "function" && (value.isOk() === true && value.isErr() === false && "value" in value || value.isOk() === false && value.isErr() === true && "error" in value);
|
|
115
|
+
}
|
|
116
|
+
function isSubscribable(obj) {
|
|
117
|
+
return typeof obj === "object" && obj !== null && "subscribe" in obj && typeof obj.subscribe === "function" && "refresh" in obj && typeof obj.refresh === "function";
|
|
118
|
+
}
|
|
113
119
|
function isSubscribableResult(x) {
|
|
114
|
-
if (
|
|
120
|
+
if (!isResult(x)) {
|
|
115
121
|
return false;
|
|
116
122
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
return isSubscribable(x.isOk() ? x.value : x.error);
|
|
124
|
+
}
|
|
125
|
+
function buildSubscribableResult$1(result, subscribe, refresh) {
|
|
126
|
+
if (result.isOk()) {
|
|
127
|
+
return ok$2({ data: result.value, subscribe, refresh });
|
|
128
|
+
} else {
|
|
129
|
+
return err$1({ failure: result.error, subscribe, refresh });
|
|
123
130
|
}
|
|
124
|
-
return false;
|
|
125
131
|
}
|
|
126
132
|
function resolvedPromiseLike$3(result) {
|
|
127
133
|
if (isPromiseLike$3(result)) {
|
|
@@ -209,6 +215,47 @@ function toError(x) {
|
|
|
209
215
|
}
|
|
210
216
|
return new Error(typeof x === "string" ? x : JSON.stringify(x));
|
|
211
217
|
}
|
|
218
|
+
var HttpStatusCode$1 = /* @__PURE__ */ ((HttpStatusCode2) => {
|
|
219
|
+
HttpStatusCode2[HttpStatusCode2["Ok"] = 200] = "Ok";
|
|
220
|
+
HttpStatusCode2[HttpStatusCode2["Created"] = 201] = "Created";
|
|
221
|
+
HttpStatusCode2[HttpStatusCode2["NoContent"] = 204] = "NoContent";
|
|
222
|
+
HttpStatusCode2[HttpStatusCode2["NotModified"] = 304] = "NotModified";
|
|
223
|
+
HttpStatusCode2[HttpStatusCode2["BadRequest"] = 400] = "BadRequest";
|
|
224
|
+
HttpStatusCode2[HttpStatusCode2["Unauthorized"] = 401] = "Unauthorized";
|
|
225
|
+
HttpStatusCode2[HttpStatusCode2["Forbidden"] = 403] = "Forbidden";
|
|
226
|
+
HttpStatusCode2[HttpStatusCode2["NotFound"] = 404] = "NotFound";
|
|
227
|
+
HttpStatusCode2[HttpStatusCode2["ServerError"] = 500] = "ServerError";
|
|
228
|
+
HttpStatusCode2[HttpStatusCode2["GatewayTimeout"] = 504] = "GatewayTimeout";
|
|
229
|
+
return HttpStatusCode2;
|
|
230
|
+
})(HttpStatusCode$1 || {});
|
|
231
|
+
function getStatusText(status) {
|
|
232
|
+
switch (status) {
|
|
233
|
+
case 200:
|
|
234
|
+
return "OK";
|
|
235
|
+
case 201:
|
|
236
|
+
return "Created";
|
|
237
|
+
case 304:
|
|
238
|
+
return "Not Modified";
|
|
239
|
+
case 400:
|
|
240
|
+
return "Bad Request";
|
|
241
|
+
case 404:
|
|
242
|
+
return "Not Found";
|
|
243
|
+
case 500:
|
|
244
|
+
return "Server Error";
|
|
245
|
+
default:
|
|
246
|
+
return `Unexpected HTTP Status Code: ${status}`;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
class FetchResponse extends Error {
|
|
250
|
+
constructor(status, body, headers) {
|
|
251
|
+
super();
|
|
252
|
+
this.status = status;
|
|
253
|
+
this.body = body;
|
|
254
|
+
this.headers = headers || {};
|
|
255
|
+
this.ok = status >= 200 && this.status <= 299;
|
|
256
|
+
this.statusText = getStatusText(status);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
212
259
|
class InternalError extends Error {
|
|
213
260
|
constructor(data) {
|
|
214
261
|
super();
|
|
@@ -253,35 +300,27 @@ let NetworkCommand$1 = class NetworkCommand extends BaseCommand {
|
|
|
253
300
|
}
|
|
254
301
|
fetchSubscribableResult(res) {
|
|
255
302
|
return res.then((networkResult) => {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
};
|
|
267
|
-
},
|
|
268
|
-
refresh: () => this.refresh()
|
|
269
|
-
});
|
|
270
|
-
}
|
|
303
|
+
return buildSubscribableResult$1(
|
|
304
|
+
networkResult,
|
|
305
|
+
(cb) => {
|
|
306
|
+
this.subscriptions.push(cb);
|
|
307
|
+
return () => {
|
|
308
|
+
this.subscriptions = this.subscriptions.filter((cb2) => cb2 !== cb);
|
|
309
|
+
};
|
|
310
|
+
},
|
|
311
|
+
() => this.refresh()
|
|
312
|
+
);
|
|
271
313
|
});
|
|
272
314
|
}
|
|
273
315
|
refresh() {
|
|
274
316
|
return this.execute().then((newResult) => {
|
|
275
|
-
if (newResult
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
return ok$2(void 0);
|
|
317
|
+
if (isSubscribableResult(newResult)) {
|
|
318
|
+
const value = newResult.isOk() ? ok$2(newResult.value.data) : err$1(newResult.error.failure);
|
|
319
|
+
this.subscriptions.forEach((cb) => {
|
|
320
|
+
cb(value);
|
|
321
|
+
});
|
|
283
322
|
}
|
|
284
|
-
return
|
|
323
|
+
return ok$2(void 0);
|
|
285
324
|
});
|
|
286
325
|
}
|
|
287
326
|
async afterRequestHooks(_options) {
|
|
@@ -432,6 +471,13 @@ class Err {
|
|
|
432
471
|
}
|
|
433
472
|
const ok$1 = (value) => new Ok$1(value);
|
|
434
473
|
const err = (err2) => new Err(err2);
|
|
474
|
+
function buildSubscribableResult(result, subscribe, refresh) {
|
|
475
|
+
if (result.isOk()) {
|
|
476
|
+
return ok$1({ data: result.value, subscribe, refresh });
|
|
477
|
+
} else {
|
|
478
|
+
return err({ failure: result.error, subscribe, refresh });
|
|
479
|
+
}
|
|
480
|
+
}
|
|
435
481
|
function resolvedPromiseLike$2(result) {
|
|
436
482
|
if (isPromiseLike$2(result)) {
|
|
437
483
|
return result.then((nextResult) => nextResult);
|
|
@@ -531,7 +577,7 @@ class CacheControlRequestRunner {
|
|
|
531
577
|
const resultPromise = this.readFromCacheInternal(cache);
|
|
532
578
|
return resultPromise.then((result) => {
|
|
533
579
|
if (result.isErr()) {
|
|
534
|
-
return err(result.error);
|
|
580
|
+
return err(result.error.failure);
|
|
535
581
|
}
|
|
536
582
|
this.returnData = result;
|
|
537
583
|
return ok$1(void 0);
|
|
@@ -560,7 +606,7 @@ class CacheControlCommand extends BaseCommand {
|
|
|
560
606
|
this.keysUsed = /* @__PURE__ */ new Set();
|
|
561
607
|
this.keysUpdated = void 0;
|
|
562
608
|
this.operationType = "query";
|
|
563
|
-
this.
|
|
609
|
+
this.lastResult = void 0;
|
|
564
610
|
this.unsubscribeFromKeysImpl = () => void 0;
|
|
565
611
|
this.subscriptions = [];
|
|
566
612
|
this.instantiationTime = Date.now() / 1e3;
|
|
@@ -577,32 +623,54 @@ class CacheControlCommand extends BaseCommand {
|
|
|
577
623
|
instrumentationAttributes: this.instrumentationAttributes
|
|
578
624
|
});
|
|
579
625
|
return resultPromise.then((result) => {
|
|
580
|
-
return this.handleCacheControllerResult(result, requestRunner)
|
|
626
|
+
return this.handleCacheControllerResult(result, requestRunner).then((result2) => {
|
|
627
|
+
if (this.lastResult === void 0) {
|
|
628
|
+
if (result2.isErr()) {
|
|
629
|
+
this.lastResult = { type: "error", error: result2.error.failure };
|
|
630
|
+
} else {
|
|
631
|
+
this.lastResult = { type: "data", data: result2.value.data };
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
return result2;
|
|
635
|
+
});
|
|
581
636
|
});
|
|
582
637
|
}
|
|
583
638
|
handleCacheControllerResult(result, requestRunner) {
|
|
584
639
|
const { networkError, networkData, returnData } = requestRunner;
|
|
585
640
|
return this.publishUpdatedKeys().then(() => {
|
|
586
641
|
if (networkError) {
|
|
587
|
-
return
|
|
642
|
+
return buildSubscribableResult(
|
|
643
|
+
networkError,
|
|
644
|
+
this.buildSubscribe(),
|
|
645
|
+
() => this.refresh()
|
|
646
|
+
);
|
|
588
647
|
}
|
|
589
648
|
if (result.isErr()) {
|
|
590
649
|
if (networkData) {
|
|
591
|
-
return
|
|
650
|
+
return buildSubscribableResult(
|
|
651
|
+
networkData,
|
|
652
|
+
this.buildSubscribe(),
|
|
653
|
+
() => this.refresh()
|
|
654
|
+
);
|
|
592
655
|
}
|
|
593
|
-
return
|
|
656
|
+
return buildSubscribableResult(result, this.buildSubscribe(), () => this.refresh());
|
|
594
657
|
}
|
|
595
658
|
if (this.subscriptions.length > 0) {
|
|
596
659
|
this.subscribeToKeysUsed();
|
|
597
660
|
}
|
|
598
661
|
if (returnData === void 0) {
|
|
599
662
|
if (networkData) {
|
|
600
|
-
return
|
|
663
|
+
return buildSubscribableResult(
|
|
664
|
+
networkData,
|
|
665
|
+
this.buildSubscribe(),
|
|
666
|
+
() => this.refresh()
|
|
667
|
+
);
|
|
601
668
|
}
|
|
602
|
-
return
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
669
|
+
return buildSubscribableResult(
|
|
670
|
+
err(new Error("Cache miss after fetching from network")),
|
|
671
|
+
this.buildSubscribe(),
|
|
672
|
+
() => this.refresh()
|
|
673
|
+
);
|
|
606
674
|
}
|
|
607
675
|
return returnData;
|
|
608
676
|
});
|
|
@@ -662,7 +730,7 @@ class CacheControlCommand extends BaseCommand {
|
|
|
662
730
|
refresh() {
|
|
663
731
|
return this.rerun({ cacheControlConfig: { type: "no-cache" } }).then((result) => {
|
|
664
732
|
if (result.isErr()) {
|
|
665
|
-
return err(result.error);
|
|
733
|
+
return err(result.error.failure);
|
|
666
734
|
}
|
|
667
735
|
return ok$1(void 0);
|
|
668
736
|
});
|
|
@@ -680,22 +748,22 @@ class CacheControlCommand extends BaseCommand {
|
|
|
680
748
|
const result = this.readFromCache(recordableCache);
|
|
681
749
|
return result.then((readResult) => {
|
|
682
750
|
if (readResult.isErr()) {
|
|
683
|
-
return
|
|
751
|
+
return buildSubscribableResult(
|
|
752
|
+
readResult,
|
|
753
|
+
this.buildSubscribe(),
|
|
754
|
+
() => this.refresh()
|
|
755
|
+
);
|
|
684
756
|
} else {
|
|
685
757
|
const data = readResult.value;
|
|
686
758
|
this.keysUsed = recordableCache.keysRead;
|
|
687
|
-
return
|
|
759
|
+
return buildSubscribableResult(
|
|
760
|
+
ok$1(data),
|
|
761
|
+
this.buildSubscribe(),
|
|
762
|
+
() => this.refresh()
|
|
763
|
+
);
|
|
688
764
|
}
|
|
689
765
|
});
|
|
690
766
|
}
|
|
691
|
-
constructSubscribableResult(data) {
|
|
692
|
-
return ok$1({
|
|
693
|
-
data,
|
|
694
|
-
// this cast is in case we need to return Network data as a fallback for caching errors
|
|
695
|
-
subscribe: this.buildSubscribe(),
|
|
696
|
-
refresh: () => this.refresh()
|
|
697
|
-
});
|
|
698
|
-
}
|
|
699
767
|
/**
|
|
700
768
|
* Builds a function that subscribes to cache changes via the pubsub service. Whenever
|
|
701
769
|
* relevant cache updates occur, it re-reads the data and compares it against
|
|
@@ -722,11 +790,12 @@ class CacheControlCommand extends BaseCommand {
|
|
|
722
790
|
rerun(overrides) {
|
|
723
791
|
return this.execute(overrides).then((result) => {
|
|
724
792
|
if (result.isErr()) {
|
|
725
|
-
this.
|
|
793
|
+
this.lastResult = { type: "error", error: result.error.failure };
|
|
794
|
+
this.invokeConsumerCallbacks(err(result.error.failure));
|
|
726
795
|
return result;
|
|
727
796
|
}
|
|
728
|
-
if (!this.equals(this.
|
|
729
|
-
this.
|
|
797
|
+
if (this.lastResult === void 0 || this.lastResult.type === "error" || !this.equals(this.lastResult.data, result.value.data)) {
|
|
798
|
+
this.lastResult = { type: "data", data: result.value.data };
|
|
730
799
|
this.invokeConsumerCallbacks(ok$1(result.value.data));
|
|
731
800
|
}
|
|
732
801
|
return result;
|
|
@@ -870,9 +939,6 @@ class AuraResourceCacheControlCommand extends AuraCacheControlCommand$1 {
|
|
|
870
939
|
super(services);
|
|
871
940
|
this.services = services;
|
|
872
941
|
}
|
|
873
|
-
execute() {
|
|
874
|
-
return super.execute();
|
|
875
|
-
}
|
|
876
942
|
readFromCache(cache) {
|
|
877
943
|
var _a;
|
|
878
944
|
const data = (_a = cache.get(this.buildKey())) == null ? void 0 : _a.value;
|
|
@@ -1158,35 +1224,27 @@ class NetworkCommand extends BaseCommand {
|
|
|
1158
1224
|
}
|
|
1159
1225
|
fetchSubscribableResult(res) {
|
|
1160
1226
|
return res.then((networkResult) => {
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
};
|
|
1172
|
-
},
|
|
1173
|
-
refresh: () => this.refresh()
|
|
1174
|
-
});
|
|
1175
|
-
}
|
|
1227
|
+
return buildSubscribableResult$1(
|
|
1228
|
+
networkResult,
|
|
1229
|
+
(cb) => {
|
|
1230
|
+
this.subscriptions.push(cb);
|
|
1231
|
+
return () => {
|
|
1232
|
+
this.subscriptions = this.subscriptions.filter((cb2) => cb2 !== cb);
|
|
1233
|
+
};
|
|
1234
|
+
},
|
|
1235
|
+
() => this.refresh()
|
|
1236
|
+
);
|
|
1176
1237
|
});
|
|
1177
1238
|
}
|
|
1178
1239
|
refresh() {
|
|
1179
1240
|
return this.execute().then((newResult) => {
|
|
1180
|
-
if (newResult
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
});
|
|
1186
|
-
}
|
|
1187
|
-
return ok$2(void 0);
|
|
1241
|
+
if (isSubscribableResult(newResult)) {
|
|
1242
|
+
const value = newResult.isOk() ? ok$2(newResult.value.data) : err$1(newResult.error.failure);
|
|
1243
|
+
this.subscriptions.forEach((cb) => {
|
|
1244
|
+
cb(value);
|
|
1245
|
+
});
|
|
1188
1246
|
}
|
|
1189
|
-
return
|
|
1247
|
+
return ok$2(void 0);
|
|
1190
1248
|
});
|
|
1191
1249
|
}
|
|
1192
1250
|
async afterRequestHooks(_options) {
|
|
@@ -2056,6 +2114,59 @@ class MaxAgeCacheControlStrategy extends CacheControlStrategy {
|
|
|
2056
2114
|
];
|
|
2057
2115
|
}
|
|
2058
2116
|
}
|
|
2117
|
+
class OnlyIfCachedCacheControlStrategy extends CacheControlStrategy {
|
|
2118
|
+
execute(options) {
|
|
2119
|
+
const startTime = this.services.instrumentation ? this.services.instrumentation.currentTimeMs() : 0;
|
|
2120
|
+
return this.services.cacheInclusionPolicy.read({
|
|
2121
|
+
l1: this.filteredCache,
|
|
2122
|
+
readFromL1: (l1) => this.requestRunner.readFromCache(l1)
|
|
2123
|
+
}).then((result) => {
|
|
2124
|
+
if (result.isOk()) {
|
|
2125
|
+
this.collectCacheHitInstrumentation(
|
|
2126
|
+
startTime,
|
|
2127
|
+
options == null ? void 0 : options.instrumentationAttributes
|
|
2128
|
+
);
|
|
2129
|
+
return ok$2(void 0);
|
|
2130
|
+
}
|
|
2131
|
+
this.collectCacheMissInstrumentation(startTime, options == null ? void 0 : options.instrumentationAttributes);
|
|
2132
|
+
const error = new UserVisibleError(
|
|
2133
|
+
new FetchResponse(HttpStatusCode$1.GatewayTimeout, {
|
|
2134
|
+
error: "Cache miss for only-if-cached request"
|
|
2135
|
+
})
|
|
2136
|
+
);
|
|
2137
|
+
return err$1(error);
|
|
2138
|
+
});
|
|
2139
|
+
}
|
|
2140
|
+
get expiredChecks() {
|
|
2141
|
+
return [
|
|
2142
|
+
(cacheControlMetadata) => cacheControlMetadata.type === "no-store"
|
|
2143
|
+
];
|
|
2144
|
+
}
|
|
2145
|
+
collectCacheHitInstrumentation(startTime, instrumentationAttributes) {
|
|
2146
|
+
if (this.services.instrumentation) {
|
|
2147
|
+
const meter = this.services.instrumentation.metrics.getMeter("onestore");
|
|
2148
|
+
meter.createCounter(`command.only-if-cached.cache-hit.count`).add(1, instrumentationAttributes);
|
|
2149
|
+
meter.createHistogram(
|
|
2150
|
+
`command.only-if-cached.cache-hit.duration`
|
|
2151
|
+
).record(
|
|
2152
|
+
this.services.instrumentation.currentTimeMs() - startTime,
|
|
2153
|
+
instrumentationAttributes
|
|
2154
|
+
);
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
collectCacheMissInstrumentation(startTime, instrumentationAttributes) {
|
|
2158
|
+
if (this.services.instrumentation) {
|
|
2159
|
+
const meter = this.services.instrumentation.metrics.getMeter("onestore");
|
|
2160
|
+
meter.createCounter(`command.only-if-cached.cache-miss.count`).add(1, instrumentationAttributes);
|
|
2161
|
+
meter.createHistogram(
|
|
2162
|
+
`command.only-if-cached.cache-miss.duration`
|
|
2163
|
+
).record(
|
|
2164
|
+
this.services.instrumentation.currentTimeMs() - startTime,
|
|
2165
|
+
instrumentationAttributes
|
|
2166
|
+
);
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2059
2170
|
class CacheController {
|
|
2060
2171
|
constructor(services) {
|
|
2061
2172
|
this.services = services;
|
|
@@ -2069,6 +2180,8 @@ class CacheController {
|
|
|
2069
2180
|
return new MaxAgeCacheControlStrategy(this.services, config, requestRunner);
|
|
2070
2181
|
} else if (config.type === "no-cache") {
|
|
2071
2182
|
return new NoCacheCacheControlStrategy(this.services, config, requestRunner);
|
|
2183
|
+
} else if (config.type === "only-if-cached") {
|
|
2184
|
+
return new OnlyIfCachedCacheControlStrategy(this.services, config, requestRunner);
|
|
2072
2185
|
}
|
|
2073
2186
|
throw new Error(`Unknown cache control strategy ${config.type}`);
|
|
2074
2187
|
}
|
|
@@ -2310,7 +2423,7 @@ function buildServiceDescriptor$5(luvio) {
|
|
|
2310
2423
|
},
|
|
2311
2424
|
};
|
|
2312
2425
|
}
|
|
2313
|
-
// version: 1.
|
|
2426
|
+
// version: 1.387.0-1c34f8f965
|
|
2314
2427
|
|
|
2315
2428
|
/*!
|
|
2316
2429
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -2412,22 +2525,22 @@ class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheContro
|
|
|
2412
2525
|
),
|
|
2413
2526
|
(errs) => this.coerceError(errs)
|
|
2414
2527
|
).then((result) => {
|
|
2415
|
-
|
|
2416
|
-
return this.constructSubscribableResult(result.value);
|
|
2417
|
-
}
|
|
2418
|
-
return result;
|
|
2528
|
+
return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
|
|
2419
2529
|
});
|
|
2420
2530
|
} else if (this.shouldUseFetch()) {
|
|
2421
2531
|
return this.convertFetchResponseToData(
|
|
2422
2532
|
this.services.fetch(...this.originalFetchParams)
|
|
2423
2533
|
).then((result) => {
|
|
2424
|
-
|
|
2425
|
-
return this.constructSubscribableResult(result.value);
|
|
2426
|
-
}
|
|
2427
|
-
return result;
|
|
2534
|
+
return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
|
|
2428
2535
|
});
|
|
2429
2536
|
}
|
|
2430
|
-
return resolvedPromiseLike$3(
|
|
2537
|
+
return resolvedPromiseLike$3(
|
|
2538
|
+
buildSubscribableResult$1(
|
|
2539
|
+
err$1(toError("Aura/Fetch network services not found")),
|
|
2540
|
+
this.buildSubscribe(),
|
|
2541
|
+
() => this.refresh()
|
|
2542
|
+
)
|
|
2543
|
+
);
|
|
2431
2544
|
}
|
|
2432
2545
|
buildRequestQuery() {
|
|
2433
2546
|
const augmentedQueryResult = this.documentRootType.buildAugmentedQuery(this.config);
|
|
@@ -2456,9 +2569,6 @@ class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheContro
|
|
|
2456
2569
|
if (this.subscriptions.length > 0) {
|
|
2457
2570
|
this.subscribeToKeysUsed();
|
|
2458
2571
|
}
|
|
2459
|
-
if (this.lastEmittedData === void 0) {
|
|
2460
|
-
this.lastEmittedData = returnData.value.data;
|
|
2461
|
-
}
|
|
2462
2572
|
return returnData;
|
|
2463
2573
|
});
|
|
2464
2574
|
}
|
|
@@ -2550,10 +2660,7 @@ class HttpGraphQLNormalizedCacheControlCommand extends HttpNormalizedCacheContro
|
|
|
2550
2660
|
return this.convertFetchResponseToData(
|
|
2551
2661
|
this.services.fetch(...this.originalFetchParams)
|
|
2552
2662
|
).then((result) => {
|
|
2553
|
-
|
|
2554
|
-
return this.constructSubscribableResult(result.value);
|
|
2555
|
-
}
|
|
2556
|
-
return result;
|
|
2663
|
+
return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
|
|
2557
2664
|
});
|
|
2558
2665
|
}
|
|
2559
2666
|
// Any changes to this method should most likely be duplicated in the aura command as well
|
|
@@ -2566,9 +2673,6 @@ class HttpGraphQLNormalizedCacheControlCommand extends HttpNormalizedCacheContro
|
|
|
2566
2673
|
if (this.subscriptions.length > 0) {
|
|
2567
2674
|
this.subscribeToKeysUsed();
|
|
2568
2675
|
}
|
|
2569
|
-
if (this.lastEmittedData === void 0) {
|
|
2570
|
-
this.lastEmittedData = returnData.value.data;
|
|
2571
|
-
}
|
|
2572
2676
|
return returnData;
|
|
2573
2677
|
});
|
|
2574
2678
|
}
|
|
@@ -2629,7 +2733,7 @@ function buildServiceDescriptor$1(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
2629
2733
|
},
|
|
2630
2734
|
};
|
|
2631
2735
|
}
|
|
2632
|
-
// version: 1.
|
|
2736
|
+
// version: 1.387.0-1c34f8f965
|
|
2633
2737
|
|
|
2634
2738
|
/*!
|
|
2635
2739
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -3269,7 +3373,7 @@ const platformSfapJwtResolver = {
|
|
|
3269
3373
|
}
|
|
3270
3374
|
// AuraFetchResponse errors
|
|
3271
3375
|
const { status } = error;
|
|
3272
|
-
if (status !== HttpStatusCode$
|
|
3376
|
+
if (status !== HttpStatusCode$2.ServerError) {
|
|
3273
3377
|
// ConnectInJavaError
|
|
3274
3378
|
reject(error.body.message);
|
|
3275
3379
|
return;
|
|
@@ -6131,7 +6235,7 @@ function getEnvironmentSetting(name) {
|
|
|
6131
6235
|
}
|
|
6132
6236
|
return undefined;
|
|
6133
6237
|
}
|
|
6134
|
-
// version: 1.
|
|
6238
|
+
// version: 1.387.0-1c34f8f965
|
|
6135
6239
|
|
|
6136
6240
|
const forceRecordTransactionsDisabled = getEnvironmentSetting(EnvironmentSettings.ForceRecordTransactionsDisabled);
|
|
6137
6241
|
//TODO: Some duplication here that can be most likely moved to a util class
|
|
@@ -7098,4 +7202,4 @@ function ldsEngineCreator() {
|
|
|
7098
7202
|
}
|
|
7099
7203
|
|
|
7100
7204
|
export { LexRequestStrategy, PdlRequestPriority, buildPredictorForContext, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, unregisterRequestStrategy, whenPredictionsReady };
|
|
7101
|
-
// version: 1.
|
|
7205
|
+
// version: 1.387.0-8c93a5dd2c
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-aura",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.387.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS engine for Aura runtime",
|
|
6
6
|
"main": "dist/ldsEngineCreator.js",
|
|
@@ -34,47 +34,47 @@
|
|
|
34
34
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-aura"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@luvio/service-provisioner": "5.
|
|
38
|
-
"@luvio/tools-core": "5.
|
|
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
|
+
"@luvio/service-provisioner": "5.60.0",
|
|
38
|
+
"@luvio/tools-core": "5.60.0",
|
|
39
|
+
"@salesforce/lds-adapters-apex": "^1.387.0",
|
|
40
|
+
"@salesforce/lds-adapters-uiapi": "^1.387.0",
|
|
41
|
+
"@salesforce/lds-ads-bridge": "^1.387.0",
|
|
42
|
+
"@salesforce/lds-aura-storage": "^1.387.0",
|
|
43
|
+
"@salesforce/lds-bindings": "^1.387.0",
|
|
44
|
+
"@salesforce/lds-instrumentation": "^1.387.0",
|
|
45
|
+
"@salesforce/lds-network-aura": "^1.387.0",
|
|
46
|
+
"@salesforce/lds-network-fetch": "^1.387.0",
|
|
47
47
|
"jwt-encode": "1.0.1"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@luvio/command-aura-graphql-normalized-cache-control": "5.
|
|
51
|
-
"@luvio/command-aura-network": "5.
|
|
52
|
-
"@luvio/command-aura-normalized-cache-control": "5.
|
|
53
|
-
"@luvio/command-aura-resource-cache-control": "5.
|
|
54
|
-
"@luvio/command-fetch-network": "5.
|
|
55
|
-
"@luvio/command-http-graphql-normalized-cache-control": "5.
|
|
56
|
-
"@luvio/command-http-normalized-cache-control": "5.
|
|
57
|
-
"@luvio/command-ndjson": "5.
|
|
58
|
-
"@luvio/command-network": "5.
|
|
59
|
-
"@luvio/command-sse": "5.
|
|
60
|
-
"@luvio/command-streaming": "5.
|
|
50
|
+
"@luvio/command-aura-graphql-normalized-cache-control": "5.60.0",
|
|
51
|
+
"@luvio/command-aura-network": "5.60.0",
|
|
52
|
+
"@luvio/command-aura-normalized-cache-control": "5.60.0",
|
|
53
|
+
"@luvio/command-aura-resource-cache-control": "5.60.0",
|
|
54
|
+
"@luvio/command-fetch-network": "5.60.0",
|
|
55
|
+
"@luvio/command-http-graphql-normalized-cache-control": "5.60.0",
|
|
56
|
+
"@luvio/command-http-normalized-cache-control": "5.60.0",
|
|
57
|
+
"@luvio/command-ndjson": "5.60.0",
|
|
58
|
+
"@luvio/command-network": "5.60.0",
|
|
59
|
+
"@luvio/command-sse": "5.60.0",
|
|
60
|
+
"@luvio/command-streaming": "5.60.0",
|
|
61
61
|
"@luvio/network-adapter-composable": "0.158.7",
|
|
62
62
|
"@luvio/network-adapter-fetch": "0.158.7",
|
|
63
|
-
"@luvio/service-aura-network": "5.
|
|
64
|
-
"@luvio/service-cache": "5.
|
|
65
|
-
"@luvio/service-cache-control": "5.
|
|
66
|
-
"@luvio/service-cache-inclusion-policy": "5.
|
|
67
|
-
"@luvio/service-feature-flags": "5.
|
|
68
|
-
"@luvio/service-fetch-network": "5.
|
|
69
|
-
"@luvio/service-instrument-command": "5.
|
|
70
|
-
"@luvio/service-pubsub": "5.
|
|
71
|
-
"@luvio/service-store": "5.
|
|
72
|
-
"@luvio/utils": "5.
|
|
63
|
+
"@luvio/service-aura-network": "5.60.0",
|
|
64
|
+
"@luvio/service-cache": "5.60.0",
|
|
65
|
+
"@luvio/service-cache-control": "5.60.0",
|
|
66
|
+
"@luvio/service-cache-inclusion-policy": "5.60.0",
|
|
67
|
+
"@luvio/service-feature-flags": "5.60.0",
|
|
68
|
+
"@luvio/service-fetch-network": "5.60.0",
|
|
69
|
+
"@luvio/service-instrument-command": "5.60.0",
|
|
70
|
+
"@luvio/service-pubsub": "5.60.0",
|
|
71
|
+
"@luvio/service-store": "5.60.0",
|
|
72
|
+
"@luvio/utils": "5.60.0",
|
|
73
73
|
"@lwc/state": "^0.23.0",
|
|
74
|
-
"@salesforce/lds-adapters-onestore-graphql": "^1.
|
|
75
|
-
"@salesforce/lds-adapters-uiapi-lex": "^1.
|
|
76
|
-
"@salesforce/lds-luvio-service": "^1.
|
|
77
|
-
"@salesforce/lds-luvio-uiapi-records-service": "^1.
|
|
74
|
+
"@salesforce/lds-adapters-onestore-graphql": "^1.387.0",
|
|
75
|
+
"@salesforce/lds-adapters-uiapi-lex": "^1.387.0",
|
|
76
|
+
"@salesforce/lds-luvio-service": "^1.387.0",
|
|
77
|
+
"@salesforce/lds-luvio-uiapi-records-service": "^1.387.0"
|
|
78
78
|
},
|
|
79
79
|
"luvioBundlesize": [
|
|
80
80
|
{
|