@salesforce/lds-runtime-mobile 1.371.0 → 1.372.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/main.js +143 -24
- package/package.json +30 -30
- package/sfdc/main.js +143 -24
package/dist/main.js
CHANGED
|
@@ -56455,14 +56455,20 @@ let AuraCacheControlCommand$1 = class AuraCacheControlCommand extends CacheContr
|
|
|
56455
56455
|
async coerceFetchError(errorResponse) {
|
|
56456
56456
|
return toError(errorResponse.statusText);
|
|
56457
56457
|
}
|
|
56458
|
+
processAuraReturnValue(auraReturnValue) {
|
|
56459
|
+
return ok$1(auraReturnValue);
|
|
56460
|
+
}
|
|
56461
|
+
processFetchReturnValue(json) {
|
|
56462
|
+
return ok$1(json);
|
|
56463
|
+
}
|
|
56458
56464
|
convertAuraResponseToData(responsePromise, coerceError) {
|
|
56459
56465
|
return responsePromise.then((response) => {
|
|
56460
|
-
|
|
56466
|
+
return this.processAuraReturnValue(response.getReturnValue());
|
|
56467
|
+
}).finally(() => {
|
|
56461
56468
|
try {
|
|
56462
56469
|
this.afterRequestHooks({ statusCode: 200 });
|
|
56463
56470
|
} catch (e) {
|
|
56464
56471
|
}
|
|
56465
|
-
return ok$1(auraReturnValue);
|
|
56466
56472
|
}).catch((error) => {
|
|
56467
56473
|
if (!error || !error.getError) {
|
|
56468
56474
|
return err$1(toError("Failed to get error from response"));
|
|
@@ -56481,7 +56487,9 @@ let AuraCacheControlCommand$1 = class AuraCacheControlCommand extends CacheContr
|
|
|
56481
56487
|
(response2) => {
|
|
56482
56488
|
if (response2.ok) {
|
|
56483
56489
|
return response2.json().then(
|
|
56484
|
-
(json) =>
|
|
56490
|
+
(json) => {
|
|
56491
|
+
return this.processFetchReturnValue(json);
|
|
56492
|
+
},
|
|
56485
56493
|
(reason) => err$1(toError(reason))
|
|
56486
56494
|
).finally(() => {
|
|
56487
56495
|
try {
|
|
@@ -56586,14 +56594,20 @@ class AuraCacheControlCommand extends CacheControlCommand {
|
|
|
56586
56594
|
async coerceFetchError(errorResponse) {
|
|
56587
56595
|
return toError(errorResponse.statusText);
|
|
56588
56596
|
}
|
|
56597
|
+
processAuraReturnValue(auraReturnValue) {
|
|
56598
|
+
return ok$1(auraReturnValue);
|
|
56599
|
+
}
|
|
56600
|
+
processFetchReturnValue(json) {
|
|
56601
|
+
return ok$1(json);
|
|
56602
|
+
}
|
|
56589
56603
|
convertAuraResponseToData(responsePromise, coerceError) {
|
|
56590
56604
|
return responsePromise.then((response) => {
|
|
56591
|
-
|
|
56605
|
+
return this.processAuraReturnValue(response.getReturnValue());
|
|
56606
|
+
}).finally(() => {
|
|
56592
56607
|
try {
|
|
56593
56608
|
this.afterRequestHooks({ statusCode: 200 });
|
|
56594
56609
|
} catch (e) {
|
|
56595
56610
|
}
|
|
56596
|
-
return ok$1(auraReturnValue);
|
|
56597
56611
|
}).catch((error) => {
|
|
56598
56612
|
if (!error || !error.getError) {
|
|
56599
56613
|
return err$1(toError("Failed to get error from response"));
|
|
@@ -56612,7 +56626,9 @@ class AuraCacheControlCommand extends CacheControlCommand {
|
|
|
56612
56626
|
(response2) => {
|
|
56613
56627
|
if (response2.ok) {
|
|
56614
56628
|
return response2.json().then(
|
|
56615
|
-
(json) =>
|
|
56629
|
+
(json) => {
|
|
56630
|
+
return this.processFetchReturnValue(json);
|
|
56631
|
+
},
|
|
56616
56632
|
(reason) => err$1(toError(reason))
|
|
56617
56633
|
).finally(() => {
|
|
56618
56634
|
try {
|
|
@@ -56805,12 +56821,17 @@ class HttpCacheControlCommand extends CacheControlCommand {
|
|
|
56805
56821
|
async coerceError(errorResponse) {
|
|
56806
56822
|
return toError(errorResponse.statusText);
|
|
56807
56823
|
}
|
|
56824
|
+
processFetchReturnValue(json) {
|
|
56825
|
+
return ok$1(json);
|
|
56826
|
+
}
|
|
56808
56827
|
convertFetchResponseToData(response) {
|
|
56809
56828
|
return response.then(
|
|
56810
56829
|
(response2) => {
|
|
56811
56830
|
if (response2.ok) {
|
|
56812
56831
|
return response2.json().then(
|
|
56813
|
-
(json) =>
|
|
56832
|
+
(json) => {
|
|
56833
|
+
return this.processFetchReturnValue(json);
|
|
56834
|
+
},
|
|
56814
56835
|
(reason) => err$1(toError(reason))
|
|
56815
56836
|
).finally(() => {
|
|
56816
56837
|
try {
|
|
@@ -57742,12 +57763,31 @@ function buildNimbusFetchServiceDescriptor() {
|
|
|
57742
57763
|
const service = (...args) => {
|
|
57743
57764
|
const resourceRequest = convertFetchParamsToResourceRequest(args);
|
|
57744
57765
|
const context = {};
|
|
57745
|
-
return NimbusNetworkAdapter(resourceRequest, context)
|
|
57746
|
-
|
|
57766
|
+
return NimbusNetworkAdapter(resourceRequest, context)
|
|
57767
|
+
.then((response) => {
|
|
57768
|
+
// This is a hack to make the response compatible with the Response interface
|
|
57769
|
+
const r = {
|
|
57770
|
+
body: response.body,
|
|
57747
57771
|
headers: response.headers,
|
|
57748
57772
|
status: response.status,
|
|
57749
57773
|
statusText: response.statusText,
|
|
57750
|
-
|
|
57774
|
+
json: () => {
|
|
57775
|
+
return Promise.resolve(response.body);
|
|
57776
|
+
},
|
|
57777
|
+
ok: response.status >= 200 && response.status < 300,
|
|
57778
|
+
};
|
|
57779
|
+
return r;
|
|
57780
|
+
})
|
|
57781
|
+
.catch((error) => {
|
|
57782
|
+
// Create a Response-like error object
|
|
57783
|
+
return {
|
|
57784
|
+
body: null,
|
|
57785
|
+
headers: {},
|
|
57786
|
+
status: 500,
|
|
57787
|
+
statusText: error.message || 'Internal Server Error',
|
|
57788
|
+
json: () => Promise.resolve(null),
|
|
57789
|
+
ok: false,
|
|
57790
|
+
};
|
|
57751
57791
|
});
|
|
57752
57792
|
};
|
|
57753
57793
|
return {
|
|
@@ -57766,38 +57806,113 @@ function buildNimbusFetchServiceDescriptor() {
|
|
|
57766
57806
|
* @returns A ResourceRequest object compatible with NimbusNetworkAdapter
|
|
57767
57807
|
*/
|
|
57768
57808
|
function convertFetchParamsToResourceRequest([input, init]) {
|
|
57769
|
-
const
|
|
57770
|
-
|
|
57771
|
-
: input instanceof URL
|
|
57772
|
-
? input
|
|
57773
|
-
: new URL(input.url);
|
|
57809
|
+
const urlString = typeof input === 'string' ? input : input.href || input.url || input;
|
|
57810
|
+
const { baseUri, basePath, queryParams } = parseUrlParts(urlString);
|
|
57774
57811
|
const headers = {};
|
|
57775
57812
|
if (init?.headers) {
|
|
57776
|
-
if (init
|
|
57813
|
+
if (typeof Headers !== 'undefined' && init?.headers instanceof Headers) {
|
|
57777
57814
|
init.headers.forEach((value, key) => {
|
|
57778
57815
|
headers[key] = value;
|
|
57779
57816
|
});
|
|
57780
57817
|
}
|
|
57781
|
-
else if (Array.isArray(init
|
|
57818
|
+
else if (Array.isArray(init?.headers)) {
|
|
57782
57819
|
init.headers.forEach(([key, value]) => {
|
|
57783
57820
|
headers[key] = value;
|
|
57784
57821
|
});
|
|
57785
57822
|
}
|
|
57786
57823
|
else {
|
|
57787
|
-
Object.entries(init
|
|
57824
|
+
Object.entries(init?.headers || {}).forEach(([key, value]) => {
|
|
57788
57825
|
headers[key] = value;
|
|
57789
57826
|
});
|
|
57790
57827
|
}
|
|
57791
57828
|
}
|
|
57792
|
-
|
|
57793
|
-
baseUri
|
|
57794
|
-
basePath
|
|
57829
|
+
const resourceRequest = {
|
|
57830
|
+
baseUri,
|
|
57831
|
+
basePath,
|
|
57795
57832
|
method: (init?.method || 'GET').toLowerCase(),
|
|
57796
|
-
body: init?.body || null,
|
|
57797
57833
|
headers,
|
|
57798
|
-
|
|
57834
|
+
body: (() => {
|
|
57835
|
+
if (!init?.body) {
|
|
57836
|
+
return null;
|
|
57837
|
+
}
|
|
57838
|
+
try {
|
|
57839
|
+
return typeof init.body === 'string' ? JSON.parse(init.body) : init.body;
|
|
57840
|
+
}
|
|
57841
|
+
catch {
|
|
57842
|
+
return init.body;
|
|
57843
|
+
}
|
|
57844
|
+
})(),
|
|
57845
|
+
queryParams,
|
|
57799
57846
|
urlParams: {},
|
|
57800
57847
|
};
|
|
57848
|
+
return resourceRequest;
|
|
57849
|
+
}
|
|
57850
|
+
function parseUrlParts(urlString) {
|
|
57851
|
+
// Split by protocol first
|
|
57852
|
+
const [protocol, rest] = urlString.split('://');
|
|
57853
|
+
// If no protocol, treat whole string as path
|
|
57854
|
+
if (!rest) {
|
|
57855
|
+
return {
|
|
57856
|
+
baseUri: '',
|
|
57857
|
+
basePath: urlString.startsWith('/')
|
|
57858
|
+
? urlString.split('?')[0]
|
|
57859
|
+
: `/${urlString.split('?')[0]}`,
|
|
57860
|
+
queryParams: extractQueryParams(urlString),
|
|
57861
|
+
};
|
|
57862
|
+
}
|
|
57863
|
+
// Split remaining parts
|
|
57864
|
+
const parts = rest.split('/');
|
|
57865
|
+
let hostPart = parts[0] || '';
|
|
57866
|
+
const pathParts = parts.slice(1);
|
|
57867
|
+
// Handle query string in host part (e.g., "example.com?key=value")
|
|
57868
|
+
let hostQueryString = '';
|
|
57869
|
+
if (hostPart.includes('?')) {
|
|
57870
|
+
const [host, query] = hostPart.split('?');
|
|
57871
|
+
hostPart = host;
|
|
57872
|
+
hostQueryString = query;
|
|
57873
|
+
}
|
|
57874
|
+
// Handle query string in path parts
|
|
57875
|
+
const lastPart = pathParts[pathParts.length - 1] || '';
|
|
57876
|
+
const [pathEnd, pathQueryString] = lastPart.split('?');
|
|
57877
|
+
// Combine query strings (host takes precedence if both exist)
|
|
57878
|
+
const queryString = hostQueryString || pathQueryString;
|
|
57879
|
+
// Reconstruct
|
|
57880
|
+
const baseUri = hostPart ? `${protocol}://${hostPart}` : urlString;
|
|
57881
|
+
const basePath = pathParts.length > 0 ? `/${pathParts.slice(0, -1).concat(pathEnd).join('/')}` : '/';
|
|
57882
|
+
const queryParams = {};
|
|
57883
|
+
if (queryString) {
|
|
57884
|
+
queryString.split('&').forEach((param) => {
|
|
57885
|
+
const [key, value = ''] = param.split('=');
|
|
57886
|
+
if (key) {
|
|
57887
|
+
try {
|
|
57888
|
+
queryParams[decodeURIComponent(key)] = decodeURIComponent(value);
|
|
57889
|
+
}
|
|
57890
|
+
catch {
|
|
57891
|
+
queryParams[key] = value;
|
|
57892
|
+
}
|
|
57893
|
+
}
|
|
57894
|
+
});
|
|
57895
|
+
}
|
|
57896
|
+
return { baseUri, basePath, queryParams };
|
|
57897
|
+
}
|
|
57898
|
+
function extractQueryParams(urlString) {
|
|
57899
|
+
const queryParams = {};
|
|
57900
|
+
const queryStart = urlString.indexOf('?');
|
|
57901
|
+
if (queryStart > -1) {
|
|
57902
|
+
const queryString = urlString.substring(queryStart + 1);
|
|
57903
|
+
queryString.split('&').forEach((param) => {
|
|
57904
|
+
const [key, value = ''] = param.split('=');
|
|
57905
|
+
if (key) {
|
|
57906
|
+
try {
|
|
57907
|
+
queryParams[decodeURIComponent(key)] = decodeURIComponent(value);
|
|
57908
|
+
}
|
|
57909
|
+
catch {
|
|
57910
|
+
queryParams[key] = value;
|
|
57911
|
+
}
|
|
57912
|
+
}
|
|
57913
|
+
});
|
|
57914
|
+
}
|
|
57915
|
+
return queryParams;
|
|
57801
57916
|
}
|
|
57802
57917
|
|
|
57803
57918
|
/*!
|
|
@@ -58327,6 +58442,10 @@ function initializeOneStore(sqliteStore) {
|
|
|
58327
58442
|
if (!useOneStore.isOpen({ fallback: true })) {
|
|
58328
58443
|
return;
|
|
58329
58444
|
}
|
|
58445
|
+
// Initialize performance.now() fallback if not available
|
|
58446
|
+
if (typeof globalThis.performance === 'undefined') {
|
|
58447
|
+
globalThis.performance = { now: () => Date.now() };
|
|
58448
|
+
}
|
|
58330
58449
|
const loggerService = new ConsoleLogger('ERROR');
|
|
58331
58450
|
const cacheServiceDescriptor = buildServiceDescriptor$6();
|
|
58332
58451
|
const instrumentationServiceDescriptor = buildServiceDescriptor$3(loggerService);
|
|
@@ -58557,4 +58676,4 @@ register({
|
|
|
58557
58676
|
});
|
|
58558
58677
|
|
|
58559
58678
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, registerReportObserver, reportGraphqlQueryParseError };
|
|
58560
|
-
// version: 1.
|
|
58679
|
+
// version: 1.372.0-5866fad2db
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-mobile",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.372.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS runtime for mobile/hybrid environments.",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -32,40 +32,40 @@
|
|
|
32
32
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-mobile"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@luvio/service-provisioner": "5.
|
|
36
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
37
|
-
"@salesforce/lds-bindings": "^1.
|
|
38
|
-
"@salesforce/lds-instrumentation": "^1.
|
|
35
|
+
"@luvio/service-provisioner": "5.49.0",
|
|
36
|
+
"@salesforce/lds-adapters-uiapi": "^1.372.0",
|
|
37
|
+
"@salesforce/lds-bindings": "^1.372.0",
|
|
38
|
+
"@salesforce/lds-instrumentation": "^1.372.0",
|
|
39
39
|
"@salesforce/user": "0.0.21",
|
|
40
40
|
"o11y": "250.7.0",
|
|
41
41
|
"o11y_schema": "256.126.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@luvio/command-aura-network": "5.
|
|
45
|
-
"@luvio/command-aura-normalized-cache-control": "5.
|
|
46
|
-
"@luvio/command-aura-resource-cache-control": "5.
|
|
47
|
-
"@luvio/command-fetch-network": "5.
|
|
48
|
-
"@luvio/command-http-normalized-cache-control": "5.
|
|
49
|
-
"@luvio/command-network": "5.
|
|
50
|
-
"@luvio/service-cache": "5.
|
|
51
|
-
"@luvio/service-cache-control": "5.
|
|
52
|
-
"@luvio/service-cache-inclusion-policy": "5.
|
|
53
|
-
"@luvio/service-fetch-network": "5.
|
|
54
|
-
"@luvio/service-instrument-command": "5.
|
|
55
|
-
"@luvio/service-instrumentation": "5.
|
|
56
|
-
"@luvio/service-pubsub": "5.
|
|
57
|
-
"@luvio/service-store": "5.
|
|
58
|
-
"@luvio/utils": "5.
|
|
59
|
-
"@salesforce/lds-adapters-graphql": "^1.
|
|
60
|
-
"@salesforce/lds-drafts": "^1.
|
|
61
|
-
"@salesforce/lds-durable-records": "^1.
|
|
62
|
-
"@salesforce/lds-network-adapter": "^1.
|
|
63
|
-
"@salesforce/lds-network-nimbus": "^1.
|
|
64
|
-
"@salesforce/lds-store-binary": "^1.
|
|
65
|
-
"@salesforce/lds-store-nimbus": "^1.
|
|
66
|
-
"@salesforce/lds-store-sql": "^1.
|
|
67
|
-
"@salesforce/lds-utils-adapters": "^1.
|
|
68
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
44
|
+
"@luvio/command-aura-network": "5.49.0",
|
|
45
|
+
"@luvio/command-aura-normalized-cache-control": "5.49.0",
|
|
46
|
+
"@luvio/command-aura-resource-cache-control": "5.49.0",
|
|
47
|
+
"@luvio/command-fetch-network": "5.49.0",
|
|
48
|
+
"@luvio/command-http-normalized-cache-control": "5.49.0",
|
|
49
|
+
"@luvio/command-network": "5.49.0",
|
|
50
|
+
"@luvio/service-cache": "5.49.0",
|
|
51
|
+
"@luvio/service-cache-control": "5.49.0",
|
|
52
|
+
"@luvio/service-cache-inclusion-policy": "5.49.0",
|
|
53
|
+
"@luvio/service-fetch-network": "5.49.0",
|
|
54
|
+
"@luvio/service-instrument-command": "5.49.0",
|
|
55
|
+
"@luvio/service-instrumentation": "5.49.0",
|
|
56
|
+
"@luvio/service-pubsub": "5.49.0",
|
|
57
|
+
"@luvio/service-store": "5.49.0",
|
|
58
|
+
"@luvio/utils": "5.49.0",
|
|
59
|
+
"@salesforce/lds-adapters-graphql": "^1.372.0",
|
|
60
|
+
"@salesforce/lds-drafts": "^1.372.0",
|
|
61
|
+
"@salesforce/lds-durable-records": "^1.372.0",
|
|
62
|
+
"@salesforce/lds-network-adapter": "^1.372.0",
|
|
63
|
+
"@salesforce/lds-network-nimbus": "^1.372.0",
|
|
64
|
+
"@salesforce/lds-store-binary": "^1.372.0",
|
|
65
|
+
"@salesforce/lds-store-nimbus": "^1.372.0",
|
|
66
|
+
"@salesforce/lds-store-sql": "^1.372.0",
|
|
67
|
+
"@salesforce/lds-utils-adapters": "^1.372.0",
|
|
68
|
+
"@salesforce/nimbus-plugin-lds": "^1.372.0",
|
|
69
69
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
70
70
|
"wait-for-expect": "^3.0.2"
|
|
71
71
|
},
|
package/sfdc/main.js
CHANGED
|
@@ -56455,14 +56455,20 @@ let AuraCacheControlCommand$1 = class AuraCacheControlCommand extends CacheContr
|
|
|
56455
56455
|
async coerceFetchError(errorResponse) {
|
|
56456
56456
|
return toError(errorResponse.statusText);
|
|
56457
56457
|
}
|
|
56458
|
+
processAuraReturnValue(auraReturnValue) {
|
|
56459
|
+
return ok$1(auraReturnValue);
|
|
56460
|
+
}
|
|
56461
|
+
processFetchReturnValue(json) {
|
|
56462
|
+
return ok$1(json);
|
|
56463
|
+
}
|
|
56458
56464
|
convertAuraResponseToData(responsePromise, coerceError) {
|
|
56459
56465
|
return responsePromise.then((response) => {
|
|
56460
|
-
|
|
56466
|
+
return this.processAuraReturnValue(response.getReturnValue());
|
|
56467
|
+
}).finally(() => {
|
|
56461
56468
|
try {
|
|
56462
56469
|
this.afterRequestHooks({ statusCode: 200 });
|
|
56463
56470
|
} catch (e) {
|
|
56464
56471
|
}
|
|
56465
|
-
return ok$1(auraReturnValue);
|
|
56466
56472
|
}).catch((error) => {
|
|
56467
56473
|
if (!error || !error.getError) {
|
|
56468
56474
|
return err$1(toError("Failed to get error from response"));
|
|
@@ -56481,7 +56487,9 @@ let AuraCacheControlCommand$1 = class AuraCacheControlCommand extends CacheContr
|
|
|
56481
56487
|
(response2) => {
|
|
56482
56488
|
if (response2.ok) {
|
|
56483
56489
|
return response2.json().then(
|
|
56484
|
-
(json) =>
|
|
56490
|
+
(json) => {
|
|
56491
|
+
return this.processFetchReturnValue(json);
|
|
56492
|
+
},
|
|
56485
56493
|
(reason) => err$1(toError(reason))
|
|
56486
56494
|
).finally(() => {
|
|
56487
56495
|
try {
|
|
@@ -56586,14 +56594,20 @@ class AuraCacheControlCommand extends CacheControlCommand {
|
|
|
56586
56594
|
async coerceFetchError(errorResponse) {
|
|
56587
56595
|
return toError(errorResponse.statusText);
|
|
56588
56596
|
}
|
|
56597
|
+
processAuraReturnValue(auraReturnValue) {
|
|
56598
|
+
return ok$1(auraReturnValue);
|
|
56599
|
+
}
|
|
56600
|
+
processFetchReturnValue(json) {
|
|
56601
|
+
return ok$1(json);
|
|
56602
|
+
}
|
|
56589
56603
|
convertAuraResponseToData(responsePromise, coerceError) {
|
|
56590
56604
|
return responsePromise.then((response) => {
|
|
56591
|
-
|
|
56605
|
+
return this.processAuraReturnValue(response.getReturnValue());
|
|
56606
|
+
}).finally(() => {
|
|
56592
56607
|
try {
|
|
56593
56608
|
this.afterRequestHooks({ statusCode: 200 });
|
|
56594
56609
|
} catch (e) {
|
|
56595
56610
|
}
|
|
56596
|
-
return ok$1(auraReturnValue);
|
|
56597
56611
|
}).catch((error) => {
|
|
56598
56612
|
if (!error || !error.getError) {
|
|
56599
56613
|
return err$1(toError("Failed to get error from response"));
|
|
@@ -56612,7 +56626,9 @@ class AuraCacheControlCommand extends CacheControlCommand {
|
|
|
56612
56626
|
(response2) => {
|
|
56613
56627
|
if (response2.ok) {
|
|
56614
56628
|
return response2.json().then(
|
|
56615
|
-
(json) =>
|
|
56629
|
+
(json) => {
|
|
56630
|
+
return this.processFetchReturnValue(json);
|
|
56631
|
+
},
|
|
56616
56632
|
(reason) => err$1(toError(reason))
|
|
56617
56633
|
).finally(() => {
|
|
56618
56634
|
try {
|
|
@@ -56805,12 +56821,17 @@ class HttpCacheControlCommand extends CacheControlCommand {
|
|
|
56805
56821
|
async coerceError(errorResponse) {
|
|
56806
56822
|
return toError(errorResponse.statusText);
|
|
56807
56823
|
}
|
|
56824
|
+
processFetchReturnValue(json) {
|
|
56825
|
+
return ok$1(json);
|
|
56826
|
+
}
|
|
56808
56827
|
convertFetchResponseToData(response) {
|
|
56809
56828
|
return response.then(
|
|
56810
56829
|
(response2) => {
|
|
56811
56830
|
if (response2.ok) {
|
|
56812
56831
|
return response2.json().then(
|
|
56813
|
-
(json) =>
|
|
56832
|
+
(json) => {
|
|
56833
|
+
return this.processFetchReturnValue(json);
|
|
56834
|
+
},
|
|
56814
56835
|
(reason) => err$1(toError(reason))
|
|
56815
56836
|
).finally(() => {
|
|
56816
56837
|
try {
|
|
@@ -57742,12 +57763,31 @@ function buildNimbusFetchServiceDescriptor() {
|
|
|
57742
57763
|
const service = (...args) => {
|
|
57743
57764
|
const resourceRequest = convertFetchParamsToResourceRequest(args);
|
|
57744
57765
|
const context = {};
|
|
57745
|
-
return NimbusNetworkAdapter(resourceRequest, context)
|
|
57746
|
-
|
|
57766
|
+
return NimbusNetworkAdapter(resourceRequest, context)
|
|
57767
|
+
.then((response) => {
|
|
57768
|
+
// This is a hack to make the response compatible with the Response interface
|
|
57769
|
+
const r = {
|
|
57770
|
+
body: response.body,
|
|
57747
57771
|
headers: response.headers,
|
|
57748
57772
|
status: response.status,
|
|
57749
57773
|
statusText: response.statusText,
|
|
57750
|
-
|
|
57774
|
+
json: () => {
|
|
57775
|
+
return Promise.resolve(response.body);
|
|
57776
|
+
},
|
|
57777
|
+
ok: response.status >= 200 && response.status < 300,
|
|
57778
|
+
};
|
|
57779
|
+
return r;
|
|
57780
|
+
})
|
|
57781
|
+
.catch((error) => {
|
|
57782
|
+
// Create a Response-like error object
|
|
57783
|
+
return {
|
|
57784
|
+
body: null,
|
|
57785
|
+
headers: {},
|
|
57786
|
+
status: 500,
|
|
57787
|
+
statusText: error.message || 'Internal Server Error',
|
|
57788
|
+
json: () => Promise.resolve(null),
|
|
57789
|
+
ok: false,
|
|
57790
|
+
};
|
|
57751
57791
|
});
|
|
57752
57792
|
};
|
|
57753
57793
|
return {
|
|
@@ -57766,38 +57806,113 @@ function buildNimbusFetchServiceDescriptor() {
|
|
|
57766
57806
|
* @returns A ResourceRequest object compatible with NimbusNetworkAdapter
|
|
57767
57807
|
*/
|
|
57768
57808
|
function convertFetchParamsToResourceRequest([input, init]) {
|
|
57769
|
-
const
|
|
57770
|
-
|
|
57771
|
-
: input instanceof URL
|
|
57772
|
-
? input
|
|
57773
|
-
: new URL(input.url);
|
|
57809
|
+
const urlString = typeof input === 'string' ? input : input.href || input.url || input;
|
|
57810
|
+
const { baseUri, basePath, queryParams } = parseUrlParts(urlString);
|
|
57774
57811
|
const headers = {};
|
|
57775
57812
|
if (init?.headers) {
|
|
57776
|
-
if (init
|
|
57813
|
+
if (typeof Headers !== 'undefined' && init?.headers instanceof Headers) {
|
|
57777
57814
|
init.headers.forEach((value, key) => {
|
|
57778
57815
|
headers[key] = value;
|
|
57779
57816
|
});
|
|
57780
57817
|
}
|
|
57781
|
-
else if (Array.isArray(init
|
|
57818
|
+
else if (Array.isArray(init?.headers)) {
|
|
57782
57819
|
init.headers.forEach(([key, value]) => {
|
|
57783
57820
|
headers[key] = value;
|
|
57784
57821
|
});
|
|
57785
57822
|
}
|
|
57786
57823
|
else {
|
|
57787
|
-
Object.entries(init
|
|
57824
|
+
Object.entries(init?.headers || {}).forEach(([key, value]) => {
|
|
57788
57825
|
headers[key] = value;
|
|
57789
57826
|
});
|
|
57790
57827
|
}
|
|
57791
57828
|
}
|
|
57792
|
-
|
|
57793
|
-
baseUri
|
|
57794
|
-
basePath
|
|
57829
|
+
const resourceRequest = {
|
|
57830
|
+
baseUri,
|
|
57831
|
+
basePath,
|
|
57795
57832
|
method: (init?.method || 'GET').toLowerCase(),
|
|
57796
|
-
body: init?.body || null,
|
|
57797
57833
|
headers,
|
|
57798
|
-
|
|
57834
|
+
body: (() => {
|
|
57835
|
+
if (!init?.body) {
|
|
57836
|
+
return null;
|
|
57837
|
+
}
|
|
57838
|
+
try {
|
|
57839
|
+
return typeof init.body === 'string' ? JSON.parse(init.body) : init.body;
|
|
57840
|
+
}
|
|
57841
|
+
catch {
|
|
57842
|
+
return init.body;
|
|
57843
|
+
}
|
|
57844
|
+
})(),
|
|
57845
|
+
queryParams,
|
|
57799
57846
|
urlParams: {},
|
|
57800
57847
|
};
|
|
57848
|
+
return resourceRequest;
|
|
57849
|
+
}
|
|
57850
|
+
function parseUrlParts(urlString) {
|
|
57851
|
+
// Split by protocol first
|
|
57852
|
+
const [protocol, rest] = urlString.split('://');
|
|
57853
|
+
// If no protocol, treat whole string as path
|
|
57854
|
+
if (!rest) {
|
|
57855
|
+
return {
|
|
57856
|
+
baseUri: '',
|
|
57857
|
+
basePath: urlString.startsWith('/')
|
|
57858
|
+
? urlString.split('?')[0]
|
|
57859
|
+
: `/${urlString.split('?')[0]}`,
|
|
57860
|
+
queryParams: extractQueryParams(urlString),
|
|
57861
|
+
};
|
|
57862
|
+
}
|
|
57863
|
+
// Split remaining parts
|
|
57864
|
+
const parts = rest.split('/');
|
|
57865
|
+
let hostPart = parts[0] || '';
|
|
57866
|
+
const pathParts = parts.slice(1);
|
|
57867
|
+
// Handle query string in host part (e.g., "example.com?key=value")
|
|
57868
|
+
let hostQueryString = '';
|
|
57869
|
+
if (hostPart.includes('?')) {
|
|
57870
|
+
const [host, query] = hostPart.split('?');
|
|
57871
|
+
hostPart = host;
|
|
57872
|
+
hostQueryString = query;
|
|
57873
|
+
}
|
|
57874
|
+
// Handle query string in path parts
|
|
57875
|
+
const lastPart = pathParts[pathParts.length - 1] || '';
|
|
57876
|
+
const [pathEnd, pathQueryString] = lastPart.split('?');
|
|
57877
|
+
// Combine query strings (host takes precedence if both exist)
|
|
57878
|
+
const queryString = hostQueryString || pathQueryString;
|
|
57879
|
+
// Reconstruct
|
|
57880
|
+
const baseUri = hostPart ? `${protocol}://${hostPart}` : urlString;
|
|
57881
|
+
const basePath = pathParts.length > 0 ? `/${pathParts.slice(0, -1).concat(pathEnd).join('/')}` : '/';
|
|
57882
|
+
const queryParams = {};
|
|
57883
|
+
if (queryString) {
|
|
57884
|
+
queryString.split('&').forEach((param) => {
|
|
57885
|
+
const [key, value = ''] = param.split('=');
|
|
57886
|
+
if (key) {
|
|
57887
|
+
try {
|
|
57888
|
+
queryParams[decodeURIComponent(key)] = decodeURIComponent(value);
|
|
57889
|
+
}
|
|
57890
|
+
catch {
|
|
57891
|
+
queryParams[key] = value;
|
|
57892
|
+
}
|
|
57893
|
+
}
|
|
57894
|
+
});
|
|
57895
|
+
}
|
|
57896
|
+
return { baseUri, basePath, queryParams };
|
|
57897
|
+
}
|
|
57898
|
+
function extractQueryParams(urlString) {
|
|
57899
|
+
const queryParams = {};
|
|
57900
|
+
const queryStart = urlString.indexOf('?');
|
|
57901
|
+
if (queryStart > -1) {
|
|
57902
|
+
const queryString = urlString.substring(queryStart + 1);
|
|
57903
|
+
queryString.split('&').forEach((param) => {
|
|
57904
|
+
const [key, value = ''] = param.split('=');
|
|
57905
|
+
if (key) {
|
|
57906
|
+
try {
|
|
57907
|
+
queryParams[decodeURIComponent(key)] = decodeURIComponent(value);
|
|
57908
|
+
}
|
|
57909
|
+
catch {
|
|
57910
|
+
queryParams[key] = value;
|
|
57911
|
+
}
|
|
57912
|
+
}
|
|
57913
|
+
});
|
|
57914
|
+
}
|
|
57915
|
+
return queryParams;
|
|
57801
57916
|
}
|
|
57802
57917
|
|
|
57803
57918
|
/*!
|
|
@@ -58327,6 +58442,10 @@ function initializeOneStore(sqliteStore) {
|
|
|
58327
58442
|
if (!useOneStore.isOpen({ fallback: true })) {
|
|
58328
58443
|
return;
|
|
58329
58444
|
}
|
|
58445
|
+
// Initialize performance.now() fallback if not available
|
|
58446
|
+
if (typeof globalThis.performance === 'undefined') {
|
|
58447
|
+
globalThis.performance = { now: () => Date.now() };
|
|
58448
|
+
}
|
|
58330
58449
|
const loggerService = new ConsoleLogger('ERROR');
|
|
58331
58450
|
const cacheServiceDescriptor = buildServiceDescriptor$6();
|
|
58332
58451
|
const instrumentationServiceDescriptor = buildServiceDescriptor$3(loggerService);
|
|
@@ -58557,4 +58676,4 @@ register({
|
|
|
58557
58676
|
});
|
|
58558
58677
|
|
|
58559
58678
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, registerReportObserver, reportGraphqlQueryParseError };
|
|
58560
|
-
// version: 1.
|
|
58679
|
+
// version: 1.372.0-5866fad2db
|