@salesforce/lds-runtime-webruntime 1.438.1 → 1.440.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/ldsWebruntimeOneStoreInit.js +42 -228
- package/package.json +27 -27
|
@@ -25,11 +25,6 @@ import isPreviewMode from '@app/isPreviewMode';
|
|
|
25
25
|
import authenticationCookieName from '@app/authenticationCookieName';
|
|
26
26
|
import apiBasePath from '@app/apiBasePath';
|
|
27
27
|
|
|
28
|
-
/*!
|
|
29
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
30
|
-
* All rights reserved.
|
|
31
|
-
* For full license text, see the LICENSE.txt file
|
|
32
|
-
*/
|
|
33
28
|
const { create, freeze, keys, entries } = Object;
|
|
34
29
|
const { isArray: isArray$1 } = Array;
|
|
35
30
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -151,7 +146,7 @@ function rejectedPromiseLike$2(reason) {
|
|
|
151
146
|
};
|
|
152
147
|
}
|
|
153
148
|
function isPromiseLike$2(x) {
|
|
154
|
-
return typeof
|
|
149
|
+
return typeof x?.then === "function";
|
|
155
150
|
}
|
|
156
151
|
function deepEquals$1(x, y) {
|
|
157
152
|
if (x === void 0) {
|
|
@@ -321,19 +316,9 @@ function logError$1(error) {
|
|
|
321
316
|
console.error("OneStore Command threw an error that we did not expect", error);
|
|
322
317
|
}
|
|
323
318
|
|
|
324
|
-
/*!
|
|
325
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
326
|
-
* All rights reserved.
|
|
327
|
-
* For full license text, see the LICENSE.txt file
|
|
328
|
-
*/
|
|
329
319
|
class BaseCommand {
|
|
330
320
|
}
|
|
331
321
|
|
|
332
|
-
/*!
|
|
333
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
334
|
-
* All rights reserved.
|
|
335
|
-
* For full license text, see the LICENSE.txt file
|
|
336
|
-
*/
|
|
337
322
|
let NetworkCommand$1 = class NetworkCommand extends BaseCommand {
|
|
338
323
|
constructor(services) {
|
|
339
324
|
super();
|
|
@@ -384,11 +369,6 @@ function buildServiceDescriptor$q() {
|
|
|
384
369
|
};
|
|
385
370
|
}
|
|
386
371
|
|
|
387
|
-
/*!
|
|
388
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
389
|
-
* All rights reserved.
|
|
390
|
-
* For full license text, see the LICENSE.txt file
|
|
391
|
-
*/
|
|
392
372
|
class AuraNetworkCommand extends NetworkCommand$1 {
|
|
393
373
|
constructor(services) {
|
|
394
374
|
super(services);
|
|
@@ -495,16 +475,6 @@ function buildServiceDescriptor$p() {
|
|
|
495
475
|
};
|
|
496
476
|
}
|
|
497
477
|
|
|
498
|
-
/*!
|
|
499
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
500
|
-
* All rights reserved.
|
|
501
|
-
* For full license text, see the LICENSE.txt file
|
|
502
|
-
*/
|
|
503
|
-
/*!
|
|
504
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
505
|
-
* All rights reserved.
|
|
506
|
-
* For full license text, see the LICENSE.txt file
|
|
507
|
-
*/
|
|
508
478
|
const { isArray } = Array;
|
|
509
479
|
let Ok$1 = class Ok {
|
|
510
480
|
constructor(value) {
|
|
@@ -572,7 +542,7 @@ function rejectedPromiseLike$1(reason) {
|
|
|
572
542
|
};
|
|
573
543
|
}
|
|
574
544
|
function isPromiseLike$1(x) {
|
|
575
|
-
return typeof
|
|
545
|
+
return typeof x?.then === "function";
|
|
576
546
|
}
|
|
577
547
|
function deepEquals(x, y) {
|
|
578
548
|
if (x === void 0) {
|
|
@@ -863,7 +833,7 @@ class CacheControlCommand extends BaseCommand {
|
|
|
863
833
|
unsubscribe() {
|
|
864
834
|
while (this.unsubscribers.length > 0) {
|
|
865
835
|
const unsubscriber = this.unsubscribers.pop();
|
|
866
|
-
unsubscriber
|
|
836
|
+
unsubscriber?.();
|
|
867
837
|
}
|
|
868
838
|
}
|
|
869
839
|
/**
|
|
@@ -1047,16 +1017,6 @@ function mergeCacheControlConfigs(baseConfig, overrides) {
|
|
|
1047
1017
|
};
|
|
1048
1018
|
}
|
|
1049
1019
|
|
|
1050
|
-
/*!
|
|
1051
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
1052
|
-
* All rights reserved.
|
|
1053
|
-
* For full license text, see the LICENSE.txt file
|
|
1054
|
-
*/
|
|
1055
|
-
/*!
|
|
1056
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
1057
|
-
* All rights reserved.
|
|
1058
|
-
* For full license text, see the LICENSE.txt file
|
|
1059
|
-
*/
|
|
1060
1020
|
let AuraCacheControlCommand$1 = class AuraCacheControlCommand extends CacheControlCommand {
|
|
1061
1021
|
constructor(services) {
|
|
1062
1022
|
super(services);
|
|
@@ -1166,8 +1126,7 @@ class AuraResourceCacheControlCommand extends AuraCacheControlCommand$1 {
|
|
|
1166
1126
|
this.services = services;
|
|
1167
1127
|
}
|
|
1168
1128
|
readFromCache(cache) {
|
|
1169
|
-
|
|
1170
|
-
const data = (_a = cache.get(this.buildKey())) == null ? void 0 : _a.value;
|
|
1129
|
+
const data = cache.get(this.buildKey())?.value;
|
|
1171
1130
|
if (data === void 0) {
|
|
1172
1131
|
return resolvedPromiseLike$2(err$1(new Error("Failed to find data in cache")));
|
|
1173
1132
|
}
|
|
@@ -1196,16 +1155,6 @@ function buildServiceDescriptor$o() {
|
|
|
1196
1155
|
};
|
|
1197
1156
|
}
|
|
1198
1157
|
|
|
1199
|
-
/*!
|
|
1200
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
1201
|
-
* All rights reserved.
|
|
1202
|
-
* For full license text, see the LICENSE.txt file
|
|
1203
|
-
*/
|
|
1204
|
-
/*!
|
|
1205
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
1206
|
-
* All rights reserved.
|
|
1207
|
-
* For full license text, see the LICENSE.txt file
|
|
1208
|
-
*/
|
|
1209
1158
|
class AuraCacheControlCommand extends CacheControlCommand {
|
|
1210
1159
|
constructor(services) {
|
|
1211
1160
|
super(services);
|
|
@@ -1341,16 +1290,6 @@ function buildServiceDescriptor$n() {
|
|
|
1341
1290
|
};
|
|
1342
1291
|
}
|
|
1343
1292
|
|
|
1344
|
-
/*!
|
|
1345
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
1346
|
-
* All rights reserved.
|
|
1347
|
-
* For full license text, see the LICENSE.txt file
|
|
1348
|
-
*/
|
|
1349
|
-
/*!
|
|
1350
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
1351
|
-
* All rights reserved.
|
|
1352
|
-
* For full license text, see the LICENSE.txt file
|
|
1353
|
-
*/
|
|
1354
1293
|
class HttpCacheControlCommand extends CacheControlCommand {
|
|
1355
1294
|
constructor(services) {
|
|
1356
1295
|
super(services);
|
|
@@ -1458,16 +1397,6 @@ function buildServiceDescriptor$m() {
|
|
|
1458
1397
|
};
|
|
1459
1398
|
}
|
|
1460
1399
|
|
|
1461
|
-
/*!
|
|
1462
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
1463
|
-
* All rights reserved.
|
|
1464
|
-
* For full license text, see the LICENSE.txt file
|
|
1465
|
-
*/
|
|
1466
|
-
/*!
|
|
1467
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
1468
|
-
* All rights reserved.
|
|
1469
|
-
* For full license text, see the LICENSE.txt file
|
|
1470
|
-
*/
|
|
1471
1400
|
class NetworkCommand extends BaseCommand {
|
|
1472
1401
|
constructor(services) {
|
|
1473
1402
|
super();
|
|
@@ -1517,7 +1446,7 @@ function hasFetchParams(command) {
|
|
|
1517
1446
|
return command && typeof command === "object" && "fetchParams" in command;
|
|
1518
1447
|
}
|
|
1519
1448
|
function createAbortableDecorator(command, options) {
|
|
1520
|
-
if (!
|
|
1449
|
+
if (!options?.signal || !(options?.signal instanceof AbortSignal)) {
|
|
1521
1450
|
return command;
|
|
1522
1451
|
}
|
|
1523
1452
|
const { signal } = options;
|
|
@@ -1664,11 +1593,6 @@ function buildServiceDescriptor$l() {
|
|
|
1664
1593
|
};
|
|
1665
1594
|
}
|
|
1666
1595
|
|
|
1667
|
-
/*!
|
|
1668
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
1669
|
-
* All rights reserved.
|
|
1670
|
-
* For full license text, see the LICENSE.txt file
|
|
1671
|
-
*/
|
|
1672
1596
|
class StreamingCommand extends BaseCommand {
|
|
1673
1597
|
constructor(services) {
|
|
1674
1598
|
super();
|
|
@@ -1704,11 +1628,6 @@ function buildServiceDescriptor$k() {
|
|
|
1704
1628
|
};
|
|
1705
1629
|
}
|
|
1706
1630
|
|
|
1707
|
-
/*!
|
|
1708
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
1709
|
-
* All rights reserved.
|
|
1710
|
-
* For full license text, see the LICENSE.txt file
|
|
1711
|
-
*/
|
|
1712
1631
|
class SSECommand extends StreamingCommand {
|
|
1713
1632
|
constructor(services) {
|
|
1714
1633
|
super(services);
|
|
@@ -1787,11 +1706,6 @@ function buildServiceDescriptor$j() {
|
|
|
1787
1706
|
};
|
|
1788
1707
|
}
|
|
1789
1708
|
|
|
1790
|
-
/*!
|
|
1791
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
1792
|
-
* All rights reserved.
|
|
1793
|
-
* For full license text, see the LICENSE.txt file
|
|
1794
|
-
*/
|
|
1795
1709
|
function buildInstrumentCommand(services) {
|
|
1796
1710
|
const meter = services.instrumentation.metrics.getMeter("onestore");
|
|
1797
1711
|
return function instrumentCommand(commandClass, commandName) {
|
|
@@ -1811,7 +1725,7 @@ function buildInstrumentCommand(services) {
|
|
|
1811
1725
|
try {
|
|
1812
1726
|
result = super.execute(...args);
|
|
1813
1727
|
} catch (e) {
|
|
1814
|
-
if (
|
|
1728
|
+
if (e?.name === "AbortError") {
|
|
1815
1729
|
abortCounter.add(1);
|
|
1816
1730
|
} else {
|
|
1817
1731
|
errorCounter.add(1);
|
|
@@ -1838,16 +1752,6 @@ function buildServiceDescriptor$i(instrumentation) {
|
|
|
1838
1752
|
};
|
|
1839
1753
|
}
|
|
1840
1754
|
|
|
1841
|
-
/*!
|
|
1842
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
1843
|
-
* All rights reserved.
|
|
1844
|
-
* For full license text, see the LICENSE.txt file
|
|
1845
|
-
*/
|
|
1846
|
-
/*!
|
|
1847
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
1848
|
-
* All rights reserved.
|
|
1849
|
-
* For full license text, see the LICENSE.txt file
|
|
1850
|
-
*/
|
|
1851
1755
|
class O11yOTelTraceAPI {
|
|
1852
1756
|
constructor(services) {
|
|
1853
1757
|
this.services = services;
|
|
@@ -1863,9 +1767,9 @@ class O11yTracer {
|
|
|
1863
1767
|
this.logger = logger;
|
|
1864
1768
|
}
|
|
1865
1769
|
startSpan(name, _options, context) {
|
|
1866
|
-
const traceId = context
|
|
1867
|
-
const spanId = context
|
|
1868
|
-
const traceFlags = context
|
|
1770
|
+
const traceId = context?.getValue(/* @__PURE__ */ Symbol.for("traceId"));
|
|
1771
|
+
const spanId = context?.getValue(/* @__PURE__ */ Symbol.for("spanId"));
|
|
1772
|
+
const traceFlags = context?.getValue(/* @__PURE__ */ Symbol.for("traceFlags"));
|
|
1869
1773
|
let spanContext = void 0;
|
|
1870
1774
|
if (traceId !== void 0 && spanId !== void 0 && traceFlags !== void 0) {
|
|
1871
1775
|
spanContext = {
|
|
@@ -2108,16 +2012,6 @@ function buildServiceDescriptor$h(logger) {
|
|
|
2108
2012
|
};
|
|
2109
2013
|
}
|
|
2110
2014
|
|
|
2111
|
-
/*!
|
|
2112
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
2113
|
-
* All rights reserved.
|
|
2114
|
-
* For full license text, see the LICENSE.txt file
|
|
2115
|
-
*/
|
|
2116
|
-
/*!
|
|
2117
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
2118
|
-
* All rights reserved.
|
|
2119
|
-
* For full license text, see the LICENSE.txt file
|
|
2120
|
-
*/
|
|
2121
2015
|
const { stringify, parse } = JSON;
|
|
2122
2016
|
function deepCopy(x) {
|
|
2123
2017
|
const stringified = stringify(x);
|
|
@@ -2141,7 +2035,7 @@ class DefaultRecordableCache {
|
|
|
2141
2035
|
if (value === void 0) {
|
|
2142
2036
|
this.missingKeysRead.add(key);
|
|
2143
2037
|
}
|
|
2144
|
-
if (options
|
|
2038
|
+
if (options?.copy) {
|
|
2145
2039
|
return deepCopy(value);
|
|
2146
2040
|
}
|
|
2147
2041
|
return value;
|
|
@@ -2185,7 +2079,7 @@ class DefaultFilteredCache {
|
|
|
2185
2079
|
get(key, options) {
|
|
2186
2080
|
const result = this.baseCache.get(key);
|
|
2187
2081
|
if (result && this.predicate(key, result)) {
|
|
2188
|
-
if (options
|
|
2082
|
+
if (options?.copy) {
|
|
2189
2083
|
return deepCopy(result);
|
|
2190
2084
|
}
|
|
2191
2085
|
return result;
|
|
@@ -2281,7 +2175,7 @@ class DefaultCache {
|
|
|
2281
2175
|
this.data = {};
|
|
2282
2176
|
}
|
|
2283
2177
|
get(key, options) {
|
|
2284
|
-
if (options
|
|
2178
|
+
if (options?.copy) {
|
|
2285
2179
|
return deepCopy(this.data[key]);
|
|
2286
2180
|
}
|
|
2287
2181
|
return this.data[key];
|
|
@@ -2361,11 +2255,6 @@ function buildServiceDescriptor$g() {
|
|
|
2361
2255
|
};
|
|
2362
2256
|
}
|
|
2363
2257
|
|
|
2364
|
-
/*!
|
|
2365
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
2366
|
-
* All rights reserved.
|
|
2367
|
-
* For full license text, see the LICENSE.txt file
|
|
2368
|
-
*/
|
|
2369
2258
|
class CacheControlStrategy {
|
|
2370
2259
|
constructor(services, config, requestRunner) {
|
|
2371
2260
|
this.services = services;
|
|
@@ -2426,11 +2315,11 @@ class MaxAgeCacheControlStrategy extends CacheControlStrategy {
|
|
|
2426
2315
|
if (value.isOk()) {
|
|
2427
2316
|
this.collectCacheHitInstrumentation(
|
|
2428
2317
|
startTime,
|
|
2429
|
-
options
|
|
2318
|
+
options?.instrumentationAttributes
|
|
2430
2319
|
);
|
|
2431
2320
|
return ok$2(void 0);
|
|
2432
2321
|
}
|
|
2433
|
-
this.collectCacheMissInstrumentation(startTime, options
|
|
2322
|
+
this.collectCacheMissInstrumentation(startTime, options?.instrumentationAttributes);
|
|
2434
2323
|
const tempCache = this.filteredCache;
|
|
2435
2324
|
return new Promise(async (resolve, reject) => {
|
|
2436
2325
|
try {
|
|
@@ -2500,11 +2389,11 @@ class OnlyIfCachedCacheControlStrategy extends CacheControlStrategy {
|
|
|
2500
2389
|
if (result.isOk()) {
|
|
2501
2390
|
this.collectCacheHitInstrumentation(
|
|
2502
2391
|
startTime,
|
|
2503
|
-
options
|
|
2392
|
+
options?.instrumentationAttributes
|
|
2504
2393
|
);
|
|
2505
2394
|
return ok$2(void 0);
|
|
2506
2395
|
}
|
|
2507
|
-
this.collectCacheMissInstrumentation(startTime, options
|
|
2396
|
+
this.collectCacheMissInstrumentation(startTime, options?.instrumentationAttributes);
|
|
2508
2397
|
const error = new UserVisibleError(
|
|
2509
2398
|
new FetchResponse(HttpStatusCode.GatewayTimeout, {
|
|
2510
2399
|
error: "Cache miss for only-if-cached request"
|
|
@@ -2588,12 +2477,7 @@ function buildServiceDescriptor$f(cache, cacheInclusionPolicy, instrumentation)
|
|
|
2588
2477
|
};
|
|
2589
2478
|
}
|
|
2590
2479
|
|
|
2591
|
-
|
|
2592
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
2593
|
-
* All rights reserved.
|
|
2594
|
-
* For full license text, see the LICENSE.txt file
|
|
2595
|
-
*/
|
|
2596
|
-
const EventTypeWildcard = Symbol("EventTypeWildcard");
|
|
2480
|
+
const EventTypeWildcard = /* @__PURE__ */ Symbol("EventTypeWildcard");
|
|
2597
2481
|
class DefaultPubSubService {
|
|
2598
2482
|
constructor() {
|
|
2599
2483
|
this.subscriptions = /* @__PURE__ */ new Map();
|
|
@@ -2656,18 +2540,8 @@ function buildServiceDescriptor$e() {
|
|
|
2656
2540
|
};
|
|
2657
2541
|
}
|
|
2658
2542
|
|
|
2659
|
-
/*!
|
|
2660
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
2661
|
-
* All rights reserved.
|
|
2662
|
-
* For full license text, see the LICENSE.txt file
|
|
2663
|
-
*/
|
|
2664
2543
|
class CacheInclusionPolicyService {
|
|
2665
2544
|
}
|
|
2666
|
-
/*!
|
|
2667
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
2668
|
-
* All rights reserved.
|
|
2669
|
-
* For full license text, see the LICENSE.txt file
|
|
2670
|
-
*/
|
|
2671
2545
|
class Ok {
|
|
2672
2546
|
constructor(value) {
|
|
2673
2547
|
this.value = value;
|
|
@@ -2715,7 +2589,7 @@ function rejectedPromiseLike(reason) {
|
|
|
2715
2589
|
};
|
|
2716
2590
|
}
|
|
2717
2591
|
function isPromiseLike(x) {
|
|
2718
|
-
return typeof
|
|
2592
|
+
return typeof x?.then === "function";
|
|
2719
2593
|
}
|
|
2720
2594
|
const isAndQuery = (query) => "$and" in query;
|
|
2721
2595
|
const isOrQuery = (query) => "$or" in query;
|
|
@@ -2855,11 +2729,6 @@ function buildInMemoryCacheInclusionPolicyService(cache) {
|
|
|
2855
2729
|
};
|
|
2856
2730
|
}
|
|
2857
2731
|
|
|
2858
|
-
/*!
|
|
2859
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
2860
|
-
* All rights reserved.
|
|
2861
|
-
* For full license text, see the LICENSE.txt file
|
|
2862
|
-
*/
|
|
2863
2732
|
class FeatureFlagsService {
|
|
2864
2733
|
constructor() {
|
|
2865
2734
|
this.flags = /* @__PURE__ */ new Map();
|
|
@@ -2879,11 +2748,6 @@ function buildServiceDescriptor$d() {
|
|
|
2879
2748
|
};
|
|
2880
2749
|
}
|
|
2881
2750
|
|
|
2882
|
-
/*!
|
|
2883
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
2884
|
-
* All rights reserved.
|
|
2885
|
-
* For full license text, see the LICENSE.txt file
|
|
2886
|
-
*/
|
|
2887
2751
|
function findExecutableOperation(input) {
|
|
2888
2752
|
const operations = input.query.definitions.filter(
|
|
2889
2753
|
(def) => def.kind === Kind.OPERATION_DEFINITION
|
|
@@ -2895,10 +2759,7 @@ function findExecutableOperation(input) {
|
|
|
2895
2759
|
return ok$2(operations[0]);
|
|
2896
2760
|
}
|
|
2897
2761
|
if (input.operationName) {
|
|
2898
|
-
const specifiedOperation = operations.find((op) =>
|
|
2899
|
-
var _a;
|
|
2900
|
-
return ((_a = op.name) == null ? void 0 : _a.value) === input.operationName;
|
|
2901
|
-
});
|
|
2762
|
+
const specifiedOperation = operations.find((op) => op.name?.value === input.operationName);
|
|
2902
2763
|
if (specifiedOperation) {
|
|
2903
2764
|
return ok$2(specifiedOperation);
|
|
2904
2765
|
}
|
|
@@ -2914,14 +2775,13 @@ function buildGraphQLInputExtension(input) {
|
|
|
2914
2775
|
const operation = operationResult.value;
|
|
2915
2776
|
const selections = operation.selectionSet.selections;
|
|
2916
2777
|
const variableDefinitions = operation.variableDefinitions;
|
|
2917
|
-
const variables =
|
|
2918
|
-
var _a;
|
|
2778
|
+
const variables = variableDefinitions?.reduce((prev, def) => {
|
|
2919
2779
|
prev[def.variable.name.value] = {
|
|
2920
2780
|
definition: def,
|
|
2921
|
-
value:
|
|
2781
|
+
value: input.variables?.[def.variable.name.value]
|
|
2922
2782
|
};
|
|
2923
2783
|
return prev;
|
|
2924
|
-
}, {})
|
|
2784
|
+
}, {}) || {};
|
|
2925
2785
|
const fragments = input.query.definitions.filter(isFragmentDefinition).reduce((prev, fragment) => {
|
|
2926
2786
|
prev[fragment.name.value] = fragment;
|
|
2927
2787
|
return prev;
|
|
@@ -2974,11 +2834,6 @@ function isFragmentDefinition(node) {
|
|
|
2974
2834
|
return node.kind === Kind.FRAGMENT_DEFINITION;
|
|
2975
2835
|
}
|
|
2976
2836
|
|
|
2977
|
-
/*!
|
|
2978
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
2979
|
-
* All rights reserved.
|
|
2980
|
-
* For full license text, see the LICENSE.txt file
|
|
2981
|
-
*/
|
|
2982
2837
|
class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheControlCommand {
|
|
2983
2838
|
constructor(config, documentRootType, services) {
|
|
2984
2839
|
super(services);
|
|
@@ -3159,11 +3014,6 @@ function buildServiceDescriptor$c() {
|
|
|
3159
3014
|
};
|
|
3160
3015
|
}
|
|
3161
3016
|
|
|
3162
|
-
/*!
|
|
3163
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3164
|
-
* All rights reserved.
|
|
3165
|
-
* For full license text, see the LICENSE.txt file
|
|
3166
|
-
*/
|
|
3167
3017
|
class HttpGraphQLNormalizedCacheControlCommand extends HttpNormalizedCacheControlCommand {
|
|
3168
3018
|
constructor(config, documentRootType, services) {
|
|
3169
3019
|
super(services);
|
|
@@ -3277,11 +3127,6 @@ function buildServiceDescriptor$b() {
|
|
|
3277
3127
|
};
|
|
3278
3128
|
}
|
|
3279
3129
|
|
|
3280
|
-
/*!
|
|
3281
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3282
|
-
* All rights reserved.
|
|
3283
|
-
* For full license text, see the LICENSE.txt file
|
|
3284
|
-
*/
|
|
3285
3130
|
class NDJSONCommand extends StreamingCommand {
|
|
3286
3131
|
constructor(services) {
|
|
3287
3132
|
super(services);
|
|
@@ -3382,7 +3227,7 @@ function buildServiceDescriptor$9(luvio) {
|
|
|
3382
3227
|
},
|
|
3383
3228
|
};
|
|
3384
3229
|
}
|
|
3385
|
-
// version: 1.
|
|
3230
|
+
// version: 1.440.0-267427df73
|
|
3386
3231
|
|
|
3387
3232
|
/**
|
|
3388
3233
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -3408,13 +3253,8 @@ function buildServiceDescriptor$8(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
3408
3253
|
},
|
|
3409
3254
|
};
|
|
3410
3255
|
}
|
|
3411
|
-
// version: 1.
|
|
3256
|
+
// version: 1.440.0-267427df73
|
|
3412
3257
|
|
|
3413
|
-
/*!
|
|
3414
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3415
|
-
* All rights reserved.
|
|
3416
|
-
* For full license text, see the LICENSE.txt file
|
|
3417
|
-
*/
|
|
3418
3258
|
class JsonSchemaViolationError extends Error {
|
|
3419
3259
|
constructor(message, validationErrors) {
|
|
3420
3260
|
super(message);
|
|
@@ -3844,11 +3684,6 @@ function findSchemaAtPath(document, ref) {
|
|
|
3844
3684
|
return current;
|
|
3845
3685
|
}
|
|
3846
3686
|
|
|
3847
|
-
/*!
|
|
3848
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3849
|
-
* All rights reserved.
|
|
3850
|
-
* For full license text, see the LICENSE.txt file
|
|
3851
|
-
*/
|
|
3852
3687
|
function isUserVisibleError(error) {
|
|
3853
3688
|
return error instanceof Error && "type" in error && error.type === "user-visible";
|
|
3854
3689
|
}
|
|
@@ -3873,11 +3708,6 @@ function logError(error) {
|
|
|
3873
3708
|
console.error("OneStore Command threw an error that we did not expect", error);
|
|
3874
3709
|
}
|
|
3875
3710
|
|
|
3876
|
-
/*!
|
|
3877
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3878
|
-
* All rights reserved.
|
|
3879
|
-
* For full license text, see the LICENSE.txt file
|
|
3880
|
-
*/
|
|
3881
3711
|
function buildBaseImperativeInvoker(getCommand, transformResult) {
|
|
3882
3712
|
return async (...params) => {
|
|
3883
3713
|
const command = getCommand({ params, assertIsValid });
|
|
@@ -3982,7 +3812,7 @@ class SubscribableImperativeBindingsService {
|
|
|
3982
3812
|
const api = {
|
|
3983
3813
|
data: result.value.data,
|
|
3984
3814
|
subscribe: (cb) => {
|
|
3985
|
-
result.value.subscribe((result2) => {
|
|
3815
|
+
return result.value.subscribe((result2) => {
|
|
3986
3816
|
if (result2.isErr()) {
|
|
3987
3817
|
return cb({ data: void 0, error: toError(result2.error) });
|
|
3988
3818
|
}
|
|
@@ -4085,10 +3915,10 @@ class GraphQLImperativeBindingsService {
|
|
|
4085
3915
|
acceptedOperations: ["query"]
|
|
4086
3916
|
};
|
|
4087
3917
|
const result = resolveAndValidateGraphQLConfig(params[0], options);
|
|
4088
|
-
if (result
|
|
3918
|
+
if (result?.isErr()) {
|
|
4089
3919
|
return result.error;
|
|
4090
3920
|
}
|
|
4091
|
-
if (result
|
|
3921
|
+
if (result?.isOk()) {
|
|
4092
3922
|
params[0] = result.value;
|
|
4093
3923
|
}
|
|
4094
3924
|
}
|
|
@@ -4107,7 +3937,7 @@ class GraphQLImperativeBindingsService {
|
|
|
4107
3937
|
deepFreeze(result.value);
|
|
4108
3938
|
consumerEmittedData.data = result.value.data.data;
|
|
4109
3939
|
consumerEmittedData.subscribe = (cb) => {
|
|
4110
|
-
result.value.subscribe((res) => {
|
|
3940
|
+
return result.value.subscribe((res) => {
|
|
4111
3941
|
const consumerEmittedData2 = {
|
|
4112
3942
|
data: void 0,
|
|
4113
3943
|
errors: void 0
|
|
@@ -4180,11 +4010,11 @@ class GraphQLLegacyImperativeBindingsService {
|
|
|
4180
4010
|
acceptedOperations: ["query"]
|
|
4181
4011
|
};
|
|
4182
4012
|
const result = resolveAndValidateGraphQLConfig(config, options);
|
|
4183
|
-
if (result
|
|
4013
|
+
if (result?.isErr()) {
|
|
4184
4014
|
callback(result.error);
|
|
4185
4015
|
return;
|
|
4186
4016
|
}
|
|
4187
|
-
if (result
|
|
4017
|
+
if (result?.isOk()) {
|
|
4188
4018
|
config = result.value;
|
|
4189
4019
|
}
|
|
4190
4020
|
}
|
|
@@ -4215,12 +4045,12 @@ class GraphQLLegacyImperativeBindingsService {
|
|
|
4215
4045
|
acceptedOperations: ["query"]
|
|
4216
4046
|
};
|
|
4217
4047
|
const result = resolveAndValidateGraphQLConfig(config, options);
|
|
4218
|
-
if (result
|
|
4048
|
+
if (result?.isErr()) {
|
|
4219
4049
|
callback(result.error);
|
|
4220
4050
|
return () => {
|
|
4221
4051
|
};
|
|
4222
4052
|
}
|
|
4223
|
-
if (result
|
|
4053
|
+
if (result?.isOk()) {
|
|
4224
4054
|
config = result.value;
|
|
4225
4055
|
}
|
|
4226
4056
|
}
|
|
@@ -4282,13 +4112,13 @@ class GraphQLMutationBindingsService {
|
|
|
4282
4112
|
acceptedOperations: ["mutation"]
|
|
4283
4113
|
};
|
|
4284
4114
|
const result2 = resolveAndValidateGraphQLConfig(params[0], options);
|
|
4285
|
-
if (result2
|
|
4115
|
+
if (result2?.isErr()) {
|
|
4286
4116
|
return {
|
|
4287
4117
|
data: void 0,
|
|
4288
4118
|
errors: result2.error.errors
|
|
4289
4119
|
};
|
|
4290
4120
|
}
|
|
4291
|
-
if (result2
|
|
4121
|
+
if (result2?.isOk()) {
|
|
4292
4122
|
params[0] = result2.value;
|
|
4293
4123
|
}
|
|
4294
4124
|
}
|
|
@@ -4314,11 +4144,6 @@ function buildServiceDescriptor$7() {
|
|
|
4314
4144
|
};
|
|
4315
4145
|
}
|
|
4316
4146
|
|
|
4317
|
-
/*!
|
|
4318
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
4319
|
-
* All rights reserved.
|
|
4320
|
-
* For full license text, see the LICENSE.txt file
|
|
4321
|
-
*/
|
|
4322
4147
|
class Sanitizer {
|
|
4323
4148
|
constructor(obj) {
|
|
4324
4149
|
this.obj = obj;
|
|
@@ -4378,7 +4203,7 @@ class CommandWireAdapterConstructor {
|
|
|
4378
4203
|
this.callback = callback;
|
|
4379
4204
|
this.connected = false;
|
|
4380
4205
|
this.exposeRefresh = false;
|
|
4381
|
-
if (!
|
|
4206
|
+
if (!options?.skipEmptyEmit) {
|
|
4382
4207
|
this.emit();
|
|
4383
4208
|
}
|
|
4384
4209
|
}
|
|
@@ -4675,11 +4500,6 @@ function buildServiceDescriptor$2() {
|
|
|
4675
4500
|
};
|
|
4676
4501
|
}
|
|
4677
4502
|
|
|
4678
|
-
/*!
|
|
4679
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
4680
|
-
* All rights reserved.
|
|
4681
|
-
* For full license text, see the LICENSE.txt file
|
|
4682
|
-
*/
|
|
4683
4503
|
function e(e2) {
|
|
4684
4504
|
this.message = e2;
|
|
4685
4505
|
}
|
|
@@ -4911,7 +4731,7 @@ class JwtManager {
|
|
|
4911
4731
|
constructor(jwtRepository, resolver, options) {
|
|
4912
4732
|
this.jwtRepository = jwtRepository;
|
|
4913
4733
|
this.resolver = resolver;
|
|
4914
|
-
if (options
|
|
4734
|
+
if (options?.keepTokenUpdated) {
|
|
4915
4735
|
jwtRepository.subscribeToTokenNearExpiration(() => this.refreshToken());
|
|
4916
4736
|
}
|
|
4917
4737
|
}
|
|
@@ -4965,11 +4785,6 @@ class JwtManager {
|
|
|
4965
4785
|
}
|
|
4966
4786
|
}
|
|
4967
4787
|
|
|
4968
|
-
/*!
|
|
4969
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
4970
|
-
* All rights reserved.
|
|
4971
|
-
* For full license text, see the LICENSE.txt file
|
|
4972
|
-
*/
|
|
4973
4788
|
function buildServiceDescriptor(interceptors = {
|
|
4974
4789
|
request: [],
|
|
4975
4790
|
retry: void 0,
|
|
@@ -4980,8 +4795,7 @@ function buildServiceDescriptor(interceptors = {
|
|
|
4980
4795
|
type: "fetch",
|
|
4981
4796
|
version: "1.0",
|
|
4982
4797
|
service: function(...args) {
|
|
4983
|
-
|
|
4984
|
-
const context = (_a = interceptors.createContext) == null ? void 0 : _a.call(interceptors);
|
|
4798
|
+
const context = interceptors.createContext?.();
|
|
4985
4799
|
const {
|
|
4986
4800
|
request: requestInterceptors = [],
|
|
4987
4801
|
retry: retryInterceptor = void 0,
|
|
@@ -5022,25 +4836,25 @@ function setHeader(headerName, headerValue, [resource, options = {}], {
|
|
|
5022
4836
|
errorMessage = `Unexpected ${headerName} header encountered`
|
|
5023
4837
|
} = {}) {
|
|
5024
4838
|
let hasHeaderBeenSet = false;
|
|
5025
|
-
if (resource instanceof Request && !
|
|
4839
|
+
if (resource instanceof Request && !options?.headers) {
|
|
5026
4840
|
if (throwOnExisting && resource.headers.has(headerName)) {
|
|
5027
4841
|
throw new Error(errorMessage);
|
|
5028
4842
|
}
|
|
5029
4843
|
resource.headers.set(headerName, headerValue);
|
|
5030
4844
|
hasHeaderBeenSet = true;
|
|
5031
4845
|
}
|
|
5032
|
-
if (
|
|
4846
|
+
if (options?.headers instanceof Headers) {
|
|
5033
4847
|
if (throwOnExisting && options.headers.has(headerName)) {
|
|
5034
4848
|
throw new Error(errorMessage);
|
|
5035
4849
|
}
|
|
5036
4850
|
options.headers.set(headerName, headerValue);
|
|
5037
4851
|
} else {
|
|
5038
|
-
if (throwOnExisting &&
|
|
4852
|
+
if (throwOnExisting && options?.headers && Reflect.has(options.headers, headerName)) {
|
|
5039
4853
|
throw new Error(errorMessage);
|
|
5040
4854
|
}
|
|
5041
4855
|
if (!hasHeaderBeenSet) {
|
|
5042
4856
|
options.headers = {
|
|
5043
|
-
...options
|
|
4857
|
+
...options?.headers,
|
|
5044
4858
|
[headerName]: headerValue
|
|
5045
4859
|
};
|
|
5046
4860
|
}
|
|
@@ -5332,4 +5146,4 @@ withDefaultLuvio((luvio) => {
|
|
|
5332
5146
|
];
|
|
5333
5147
|
setServices(services);
|
|
5334
5148
|
});
|
|
5335
|
-
// version: 1.
|
|
5149
|
+
// version: 1.440.0-267427df73
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-webruntime",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.440.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS engine for Webruntime runtime",
|
|
6
6
|
"main": "dist/ldsWebruntimeOneStoreInit.js",
|
|
@@ -35,38 +35,38 @@
|
|
|
35
35
|
"ready": "yarn build && jest --collectCoverage && yarn test:size && yarn release:corejar"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@conduit-client/service-provisioner": "3.
|
|
39
|
-
"@conduit-client/tools-core": "3.
|
|
38
|
+
"@conduit-client/service-provisioner": "3.20.5",
|
|
39
|
+
"@conduit-client/tools-core": "3.20.5",
|
|
40
40
|
"jwt-encode": "1.0.1"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@conduit-client/command-aura-network": "3.
|
|
44
|
-
"@conduit-client/command-aura-normalized-cache-control": "3.
|
|
45
|
-
"@conduit-client/command-aura-resource-cache-control": "3.
|
|
46
|
-
"@conduit-client/command-fetch-network": "3.
|
|
47
|
-
"@conduit-client/command-http-normalized-cache-control": "3.
|
|
48
|
-
"@conduit-client/command-ndjson": "3.
|
|
49
|
-
"@conduit-client/command-network": "3.
|
|
50
|
-
"@conduit-client/command-sse": "3.
|
|
51
|
-
"@conduit-client/command-streaming": "3.
|
|
52
|
-
"@conduit-client/jwt-manager": "3.
|
|
53
|
-
"@conduit-client/service-aura-network": "3.
|
|
54
|
-
"@conduit-client/service-bindings-imperative": "3.
|
|
55
|
-
"@conduit-client/service-bindings-lwc": "3.
|
|
56
|
-
"@conduit-client/service-cache": "3.
|
|
57
|
-
"@conduit-client/service-cache-control": "3.
|
|
58
|
-
"@conduit-client/service-cache-inclusion-policy": "3.
|
|
59
|
-
"@conduit-client/service-fetch-network": "3.
|
|
60
|
-
"@conduit-client/service-instrument-command": "3.
|
|
61
|
-
"@conduit-client/service-pubsub": "3.
|
|
62
|
-
"@conduit-client/service-store": "3.
|
|
63
|
-
"@conduit-client/utils": "3.
|
|
43
|
+
"@conduit-client/command-aura-network": "3.20.5",
|
|
44
|
+
"@conduit-client/command-aura-normalized-cache-control": "3.20.5",
|
|
45
|
+
"@conduit-client/command-aura-resource-cache-control": "3.20.5",
|
|
46
|
+
"@conduit-client/command-fetch-network": "3.20.5",
|
|
47
|
+
"@conduit-client/command-http-normalized-cache-control": "3.20.5",
|
|
48
|
+
"@conduit-client/command-ndjson": "3.20.5",
|
|
49
|
+
"@conduit-client/command-network": "3.20.5",
|
|
50
|
+
"@conduit-client/command-sse": "3.20.5",
|
|
51
|
+
"@conduit-client/command-streaming": "3.20.5",
|
|
52
|
+
"@conduit-client/jwt-manager": "3.20.5",
|
|
53
|
+
"@conduit-client/service-aura-network": "3.20.5",
|
|
54
|
+
"@conduit-client/service-bindings-imperative": "3.20.5",
|
|
55
|
+
"@conduit-client/service-bindings-lwc": "3.20.5",
|
|
56
|
+
"@conduit-client/service-cache": "3.20.5",
|
|
57
|
+
"@conduit-client/service-cache-control": "3.20.5",
|
|
58
|
+
"@conduit-client/service-cache-inclusion-policy": "3.20.5",
|
|
59
|
+
"@conduit-client/service-fetch-network": "3.20.5",
|
|
60
|
+
"@conduit-client/service-instrument-command": "3.20.5",
|
|
61
|
+
"@conduit-client/service-pubsub": "3.20.5",
|
|
62
|
+
"@conduit-client/service-store": "3.20.5",
|
|
63
|
+
"@conduit-client/utils": "3.20.5",
|
|
64
64
|
"@luvio/network-adapter-composable": "0.160.5",
|
|
65
65
|
"@luvio/network-adapter-fetch": "0.160.5",
|
|
66
66
|
"@salesforce/lds-adapters-uiapi-lex": "^1.415.0",
|
|
67
|
-
"@salesforce/lds-default-luvio": "^1.
|
|
68
|
-
"@salesforce/lds-luvio-service": "^1.
|
|
69
|
-
"@salesforce/lds-luvio-uiapi-records-service": "^1.
|
|
67
|
+
"@salesforce/lds-default-luvio": "^1.440.0",
|
|
68
|
+
"@salesforce/lds-luvio-service": "^1.440.0",
|
|
69
|
+
"@salesforce/lds-luvio-uiapi-records-service": "^1.440.0"
|
|
70
70
|
},
|
|
71
71
|
"luvioBundlesize": [
|
|
72
72
|
{
|