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