@depict-ai/utilishared 2.4.0 → 2.4.1
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/ES10/index.cjs +7 -4
- package/ES10/index.d.ts +9 -2
- package/ES10/index.js +7 -4
- package/latest/index.cjs +7 -4
- package/latest/index.d.ts +9 -2
- package/latest/index.js +7 -4
- package/package.json +1 -1
- package/server/ES10/index.cjs +7 -4
- package/server/ES10/index.d.ts +9 -2
- package/server/ES10/index.js +7 -4
- package/server/latest/index.cjs +7 -4
- package/server/latest/index.d.ts +9 -2
- package/server/latest/index.js +7 -4
package/ES10/index.cjs
CHANGED
|
@@ -207,7 +207,7 @@ $parcel$export(module.exports, "version", () => $ce0ab19b284b64fa$export$83d89fb
|
|
|
207
207
|
$parcel$export(module.exports, "add_to_version_info", () => $045fb30107c9eecc$export$2cefb7e61fcbae00);
|
|
208
208
|
$parcel$export(module.exports, "sync_el_content_with_accessor", () => $84d13ab567309a50$export$c3f56a35e076f139);
|
|
209
209
|
$parcel$export(module.exports, "use_href_accessor", () => $59b7011b96010a8e$export$e35115e6d0715f77);
|
|
210
|
-
const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.4.
|
|
210
|
+
const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.4.1";
|
|
211
211
|
const $9e9538f4aff6f83c$export$55fe61489d2c7417 = /*@__PURE__*/((_globalThis$document, _globalThis$document$, _globalThis$document$2, _globalThis$localStor, _globalThis$localStor2) => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && ((globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : (_globalThis$document$ = _globalThis$document.currentScript) === null || _globalThis$document$ === void 0 ? void 0 : (_globalThis$document$2 = _globalThis$document$.dataset) === null || _globalThis$document$2 === void 0 ? void 0 : _globalThis$document$2.debug) === "true" || (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$localStor = globalThis.localStorage) === null || _globalThis$localStor === void 0 ? void 0 : (_globalThis$localStor2 = _globalThis$localStor.getItem) === null || _globalThis$localStor2 === void 0 ? void 0 : _globalThis$localStor2.call(_globalThis$localStor, "debug")) === "true"))();
|
|
212
212
|
const $7f95f77417d06249$var$browser_prefix_styling = "color: #fff;";
|
|
213
213
|
let $7f95f77417d06249$var$browser_prefix = "[Depict]";
|
|
@@ -4908,7 +4908,10 @@ const $675e948221f082fe$export$783ef16647773b3d = /*@__PURE__*/$9cefb304a1734a6b
|
|
|
4908
4908
|
const $1a15d4d13e0d0cf9$export$5c069c93d2b7493f = delay => new Promise(resolve => setTimeout(resolve, delay));
|
|
4909
4909
|
async function $8f0b9bb45dd059c3$export$bcd70d5ed1cf6313(url, options) {
|
|
4910
4910
|
let max_retries = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
|
|
4911
|
-
let
|
|
4911
|
+
let {
|
|
4912
|
+
useFetch_ = fetch,
|
|
4913
|
+
initialRetryDuration_ = 100
|
|
4914
|
+
} = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
4912
4915
|
const ONE_MINUTE = 60000;
|
|
4913
4916
|
const max_backoff_ms = ONE_MINUTE;
|
|
4914
4917
|
const {
|
|
@@ -4919,11 +4922,11 @@ async function $8f0b9bb45dd059c3$export$bcd70d5ed1cf6313(url, options) {
|
|
|
4919
4922
|
if (delay > max_backoff_ms) delay = max_backoff_ms * (1 + Math.random() / 10);
|
|
4920
4923
|
return delay;
|
|
4921
4924
|
};
|
|
4922
|
-
let try_again_in_ms =
|
|
4925
|
+
let try_again_in_ms = initialRetryDuration_;
|
|
4923
4926
|
let has_succeeded = false;
|
|
4924
4927
|
let result = false;
|
|
4925
4928
|
while (max_retries && !has_succeeded) try {
|
|
4926
|
-
const response = await
|
|
4929
|
+
const response = await useFetch_(url, options);
|
|
4927
4930
|
const {
|
|
4928
4931
|
status: status,
|
|
4929
4932
|
ok: ok
|
package/ES10/index.d.ts
CHANGED
|
@@ -1360,10 +1360,17 @@ export const wait: (delay: number) => Promise<unknown>;
|
|
|
1360
1360
|
* @param url Url to perform fetch towards
|
|
1361
1361
|
* @param options Fetch options
|
|
1362
1362
|
* @param max_retries Max number of retries, defaults to 10
|
|
1363
|
-
* @param
|
|
1363
|
+
* @param useFetch_ The fetch function to use, defaults to the global fetch
|
|
1364
|
+
* @param initialRetryDuration_ The start duration for the first retry, defaults to 100ms
|
|
1364
1365
|
* @returns The fetch response
|
|
1365
1366
|
*/
|
|
1366
|
-
export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number,
|
|
1367
|
+
export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number, {
|
|
1368
|
+
useFetch_,
|
|
1369
|
+
initialRetryDuration_
|
|
1370
|
+
}?: {
|
|
1371
|
+
useFetch_?: typeof fetch;
|
|
1372
|
+
initialRetryDuration_?: number;
|
|
1373
|
+
}): Promise<false | Response>;
|
|
1367
1374
|
/**
|
|
1368
1375
|
* Ensures that the attribute value of an element is what an AsyncIterable resolves with
|
|
1369
1376
|
* @param el Element to set attribute on
|
package/ES10/index.js
CHANGED
|
@@ -8,7 +8,7 @@ register_es_version("utilishared", "ES10");
|
|
|
8
8
|
function $parcel$interopDefault(a) {
|
|
9
9
|
return a && a.__esModule ? a.default : a;
|
|
10
10
|
}
|
|
11
|
-
const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "2.4.
|
|
11
|
+
const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "2.4.1";
|
|
12
12
|
const $a5a2bdb4ae93374b$export$55fe61489d2c7417 = /*@__PURE__*/((_globalThis$document, _globalThis$document$, _globalThis$document$2, _globalThis$localStor, _globalThis$localStor2) => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && ((globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : (_globalThis$document$ = _globalThis$document.currentScript) === null || _globalThis$document$ === void 0 ? void 0 : (_globalThis$document$2 = _globalThis$document$.dataset) === null || _globalThis$document$2 === void 0 ? void 0 : _globalThis$document$2.debug) === "true" || (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$localStor = globalThis.localStorage) === null || _globalThis$localStor === void 0 ? void 0 : (_globalThis$localStor2 = _globalThis$localStor.getItem) === null || _globalThis$localStor2 === void 0 ? void 0 : _globalThis$localStor2.call(_globalThis$localStor, "debug")) === "true"))();
|
|
13
13
|
const $241f2f02cc612a49$var$browser_prefix_styling = "color: #fff;";
|
|
14
14
|
let $241f2f02cc612a49$var$browser_prefix = "[Depict]";
|
|
@@ -4709,7 +4709,10 @@ const $f69445e469425bcb$export$783ef16647773b3d = /*@__PURE__*/$9c44a7238815fa47
|
|
|
4709
4709
|
const $57642e3bf93ac1e7$export$5c069c93d2b7493f = delay => new Promise(resolve => setTimeout(resolve, delay));
|
|
4710
4710
|
async function $c95f8181bad32e8d$export$bcd70d5ed1cf6313(url, options) {
|
|
4711
4711
|
let max_retries = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
|
|
4712
|
-
let
|
|
4712
|
+
let {
|
|
4713
|
+
useFetch_ = fetch,
|
|
4714
|
+
initialRetryDuration_ = 100
|
|
4715
|
+
} = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
4713
4716
|
const ONE_MINUTE = 60000;
|
|
4714
4717
|
const max_backoff_ms = ONE_MINUTE;
|
|
4715
4718
|
const {
|
|
@@ -4720,11 +4723,11 @@ async function $c95f8181bad32e8d$export$bcd70d5ed1cf6313(url, options) {
|
|
|
4720
4723
|
if (delay > max_backoff_ms) delay = max_backoff_ms * (1 + Math.random() / 10);
|
|
4721
4724
|
return delay;
|
|
4722
4725
|
};
|
|
4723
|
-
let try_again_in_ms =
|
|
4726
|
+
let try_again_in_ms = initialRetryDuration_;
|
|
4724
4727
|
let has_succeeded = false;
|
|
4725
4728
|
let result = false;
|
|
4726
4729
|
while (max_retries && !has_succeeded) try {
|
|
4727
|
-
const response = await
|
|
4730
|
+
const response = await useFetch_(url, options);
|
|
4728
4731
|
const {
|
|
4729
4732
|
status: status,
|
|
4730
4733
|
ok: ok
|
package/latest/index.cjs
CHANGED
|
@@ -204,7 +204,7 @@ $parcel$export(module.exports, "version", () => $815f67c61b4c0a42$export$83d89fb
|
|
|
204
204
|
$parcel$export(module.exports, "add_to_version_info", () => $e4a18bf12ad092d9$export$2cefb7e61fcbae00);
|
|
205
205
|
$parcel$export(module.exports, "sync_el_content_with_accessor", () => $35303d72263038db$export$c3f56a35e076f139);
|
|
206
206
|
$parcel$export(module.exports, "use_href_accessor", () => $da35c7e27be2a442$export$e35115e6d0715f77);
|
|
207
|
-
const $815f67c61b4c0a42$export$83d89fbfd8236492 = "2.4.
|
|
207
|
+
const $815f67c61b4c0a42$export$83d89fbfd8236492 = "2.4.1";
|
|
208
208
|
const $7b5e577a60b81e60$export$55fe61489d2c7417 = /*@__PURE__*/(() => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && (globalThis?.document?.currentScript?.dataset?.debug === "true" || globalThis?.localStorage?.getItem?.("debug") === "true"))();
|
|
209
209
|
const $e6c6e7929ea385ae$var$browser_prefix_styling = "color: #fff;";
|
|
210
210
|
let $e6c6e7929ea385ae$var$browser_prefix = "[Depict]";
|
|
@@ -4443,7 +4443,10 @@ const $23d6393391c08860$export$783ef16647773b3d = /*@__PURE__*/$41f528c04cc8a8da
|
|
|
4443
4443
|
return meta?.product;
|
|
4444
4444
|
}));
|
|
4445
4445
|
const $55769f63ea4d8da4$export$5c069c93d2b7493f = delay => new Promise(resolve => setTimeout(resolve, delay));
|
|
4446
|
-
async function $d2fc3fb450961938$export$bcd70d5ed1cf6313(url, options, max_retries = 10,
|
|
4446
|
+
async function $d2fc3fb450961938$export$bcd70d5ed1cf6313(url, options, max_retries = 10, {
|
|
4447
|
+
useFetch_ = fetch,
|
|
4448
|
+
initialRetryDuration_ = 100
|
|
4449
|
+
} = {}) {
|
|
4447
4450
|
const ONE_MINUTE = 60000;
|
|
4448
4451
|
const max_backoff_ms = ONE_MINUTE;
|
|
4449
4452
|
const {
|
|
@@ -4454,11 +4457,11 @@ async function $d2fc3fb450961938$export$bcd70d5ed1cf6313(url, options, max_retri
|
|
|
4454
4457
|
if (delay > max_backoff_ms) delay = max_backoff_ms * (1 + Math.random() / 10);
|
|
4455
4458
|
return delay;
|
|
4456
4459
|
};
|
|
4457
|
-
let try_again_in_ms =
|
|
4460
|
+
let try_again_in_ms = initialRetryDuration_;
|
|
4458
4461
|
let has_succeeded = false;
|
|
4459
4462
|
let result = false;
|
|
4460
4463
|
while (max_retries && !has_succeeded) try {
|
|
4461
|
-
const response = await
|
|
4464
|
+
const response = await useFetch_(url, options);
|
|
4462
4465
|
const {
|
|
4463
4466
|
status: status,
|
|
4464
4467
|
ok: ok
|
package/latest/index.d.ts
CHANGED
|
@@ -1360,10 +1360,17 @@ export const wait: (delay: number) => Promise<unknown>;
|
|
|
1360
1360
|
* @param url Url to perform fetch towards
|
|
1361
1361
|
* @param options Fetch options
|
|
1362
1362
|
* @param max_retries Max number of retries, defaults to 10
|
|
1363
|
-
* @param
|
|
1363
|
+
* @param useFetch_ The fetch function to use, defaults to the global fetch
|
|
1364
|
+
* @param initialRetryDuration_ The start duration for the first retry, defaults to 100ms
|
|
1364
1365
|
* @returns The fetch response
|
|
1365
1366
|
*/
|
|
1366
|
-
export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number,
|
|
1367
|
+
export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number, {
|
|
1368
|
+
useFetch_,
|
|
1369
|
+
initialRetryDuration_
|
|
1370
|
+
}?: {
|
|
1371
|
+
useFetch_?: typeof fetch;
|
|
1372
|
+
initialRetryDuration_?: number;
|
|
1373
|
+
}): Promise<false | Response>;
|
|
1367
1374
|
/**
|
|
1368
1375
|
* Ensures that the attribute value of an element is what an AsyncIterable resolves with
|
|
1369
1376
|
* @param el Element to set attribute on
|
package/latest/index.js
CHANGED
|
@@ -5,7 +5,7 @@ register_es_version("utilishared", "latest");
|
|
|
5
5
|
function $parcel$interopDefault(a) {
|
|
6
6
|
return a && a.__esModule ? a.default : a;
|
|
7
7
|
}
|
|
8
|
-
const $0766c85d387a9765$export$83d89fbfd8236492 = "2.4.
|
|
8
|
+
const $0766c85d387a9765$export$83d89fbfd8236492 = "2.4.1";
|
|
9
9
|
const $571bce04eb920cd8$export$55fe61489d2c7417 = /*@__PURE__*/(() => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && (globalThis?.document?.currentScript?.dataset?.debug === "true" || globalThis?.localStorage?.getItem?.("debug") === "true"))();
|
|
10
10
|
const $649f456f663da9fc$var$browser_prefix_styling = "color: #fff;";
|
|
11
11
|
let $649f456f663da9fc$var$browser_prefix = "[Depict]";
|
|
@@ -4244,7 +4244,10 @@ const $802201ed0a316c43$export$783ef16647773b3d = /*@__PURE__*/$511123bb28a7b6f7
|
|
|
4244
4244
|
return meta?.product;
|
|
4245
4245
|
}));
|
|
4246
4246
|
const $2cbe7e0ca2ce5438$export$5c069c93d2b7493f = delay => new Promise(resolve => setTimeout(resolve, delay));
|
|
4247
|
-
async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retries = 10,
|
|
4247
|
+
async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retries = 10, {
|
|
4248
|
+
useFetch_ = fetch,
|
|
4249
|
+
initialRetryDuration_ = 100
|
|
4250
|
+
} = {}) {
|
|
4248
4251
|
const ONE_MINUTE = 60000;
|
|
4249
4252
|
const max_backoff_ms = ONE_MINUTE;
|
|
4250
4253
|
const {
|
|
@@ -4255,11 +4258,11 @@ async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retri
|
|
|
4255
4258
|
if (delay > max_backoff_ms) delay = max_backoff_ms * (1 + Math.random() / 10);
|
|
4256
4259
|
return delay;
|
|
4257
4260
|
};
|
|
4258
|
-
let try_again_in_ms =
|
|
4261
|
+
let try_again_in_ms = initialRetryDuration_;
|
|
4259
4262
|
let has_succeeded = false;
|
|
4260
4263
|
let result = false;
|
|
4261
4264
|
while (max_retries && !has_succeeded) try {
|
|
4262
|
-
const response = await
|
|
4265
|
+
const response = await useFetch_(url, options);
|
|
4263
4266
|
const {
|
|
4264
4267
|
status: status,
|
|
4265
4268
|
ok: ok
|
package/package.json
CHANGED
package/server/ES10/index.cjs
CHANGED
|
@@ -207,7 +207,7 @@ $parcel$export(module.exports, "version", () => $ce0ab19b284b64fa$export$83d89fb
|
|
|
207
207
|
$parcel$export(module.exports, "add_to_version_info", () => $045fb30107c9eecc$export$2cefb7e61fcbae00);
|
|
208
208
|
$parcel$export(module.exports, "sync_el_content_with_accessor", () => $84d13ab567309a50$export$c3f56a35e076f139);
|
|
209
209
|
$parcel$export(module.exports, "use_href_accessor", () => $59b7011b96010a8e$export$e35115e6d0715f77);
|
|
210
|
-
const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.4.
|
|
210
|
+
const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.4.1";
|
|
211
211
|
const $9e9538f4aff6f83c$export$55fe61489d2c7417 = /*@__PURE__*/((_globalThis$document, _globalThis$document$, _globalThis$document$2, _globalThis$localStor, _globalThis$localStor2) => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && ((globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : (_globalThis$document$ = _globalThis$document.currentScript) === null || _globalThis$document$ === void 0 ? void 0 : (_globalThis$document$2 = _globalThis$document$.dataset) === null || _globalThis$document$2 === void 0 ? void 0 : _globalThis$document$2.debug) === "true" || (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$localStor = globalThis.localStorage) === null || _globalThis$localStor === void 0 ? void 0 : (_globalThis$localStor2 = _globalThis$localStor.getItem) === null || _globalThis$localStor2 === void 0 ? void 0 : _globalThis$localStor2.call(_globalThis$localStor, "debug")) === "true"))();
|
|
212
212
|
const $7f95f77417d06249$var$browser_prefix_styling = "color: #fff;";
|
|
213
213
|
let $7f95f77417d06249$var$browser_prefix = "[Depict]";
|
|
@@ -4898,7 +4898,10 @@ const $675e948221f082fe$export$783ef16647773b3d = /*@__PURE__*/$9cefb304a1734a6b
|
|
|
4898
4898
|
const $1a15d4d13e0d0cf9$export$5c069c93d2b7493f = delay => new Promise(resolve => setTimeout(resolve, delay));
|
|
4899
4899
|
async function $8f0b9bb45dd059c3$export$bcd70d5ed1cf6313(url, options) {
|
|
4900
4900
|
let max_retries = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
|
|
4901
|
-
let
|
|
4901
|
+
let {
|
|
4902
|
+
useFetch_ = fetch,
|
|
4903
|
+
initialRetryDuration_ = 100
|
|
4904
|
+
} = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
4902
4905
|
const ONE_MINUTE = 60000;
|
|
4903
4906
|
const max_backoff_ms = ONE_MINUTE;
|
|
4904
4907
|
const {
|
|
@@ -4909,11 +4912,11 @@ async function $8f0b9bb45dd059c3$export$bcd70d5ed1cf6313(url, options) {
|
|
|
4909
4912
|
if (delay > max_backoff_ms) delay = max_backoff_ms * (1 + Math.random() / 10);
|
|
4910
4913
|
return delay;
|
|
4911
4914
|
};
|
|
4912
|
-
let try_again_in_ms =
|
|
4915
|
+
let try_again_in_ms = initialRetryDuration_;
|
|
4913
4916
|
let has_succeeded = false;
|
|
4914
4917
|
let result = false;
|
|
4915
4918
|
while (max_retries && !has_succeeded) try {
|
|
4916
|
-
const response = await
|
|
4919
|
+
const response = await useFetch_(url, options);
|
|
4917
4920
|
const {
|
|
4918
4921
|
status: status,
|
|
4919
4922
|
ok: ok
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -1360,10 +1360,17 @@ export const wait: (delay: number) => Promise<unknown>;
|
|
|
1360
1360
|
* @param url Url to perform fetch towards
|
|
1361
1361
|
* @param options Fetch options
|
|
1362
1362
|
* @param max_retries Max number of retries, defaults to 10
|
|
1363
|
-
* @param
|
|
1363
|
+
* @param useFetch_ The fetch function to use, defaults to the global fetch
|
|
1364
|
+
* @param initialRetryDuration_ The start duration for the first retry, defaults to 100ms
|
|
1364
1365
|
* @returns The fetch response
|
|
1365
1366
|
*/
|
|
1366
|
-
export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number,
|
|
1367
|
+
export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number, {
|
|
1368
|
+
useFetch_,
|
|
1369
|
+
initialRetryDuration_
|
|
1370
|
+
}?: {
|
|
1371
|
+
useFetch_?: typeof fetch;
|
|
1372
|
+
initialRetryDuration_?: number;
|
|
1373
|
+
}): Promise<false | Response>;
|
|
1367
1374
|
/**
|
|
1368
1375
|
* Ensures that the attribute value of an element is what an AsyncIterable resolves with
|
|
1369
1376
|
* @param el Element to set attribute on
|
package/server/ES10/index.js
CHANGED
|
@@ -8,7 +8,7 @@ register_es_version("utilishared", "ES10");
|
|
|
8
8
|
function $parcel$interopDefault(a) {
|
|
9
9
|
return a && a.__esModule ? a.default : a;
|
|
10
10
|
}
|
|
11
|
-
const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "2.4.
|
|
11
|
+
const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "2.4.1";
|
|
12
12
|
const $a5a2bdb4ae93374b$export$55fe61489d2c7417 = /*@__PURE__*/((_globalThis$document, _globalThis$document$, _globalThis$document$2, _globalThis$localStor, _globalThis$localStor2) => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && ((globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : (_globalThis$document$ = _globalThis$document.currentScript) === null || _globalThis$document$ === void 0 ? void 0 : (_globalThis$document$2 = _globalThis$document$.dataset) === null || _globalThis$document$2 === void 0 ? void 0 : _globalThis$document$2.debug) === "true" || (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$localStor = globalThis.localStorage) === null || _globalThis$localStor === void 0 ? void 0 : (_globalThis$localStor2 = _globalThis$localStor.getItem) === null || _globalThis$localStor2 === void 0 ? void 0 : _globalThis$localStor2.call(_globalThis$localStor, "debug")) === "true"))();
|
|
13
13
|
const $241f2f02cc612a49$var$browser_prefix_styling = "color: #fff;";
|
|
14
14
|
let $241f2f02cc612a49$var$browser_prefix = "[Depict]";
|
|
@@ -4699,7 +4699,10 @@ const $f69445e469425bcb$export$783ef16647773b3d = /*@__PURE__*/$9c44a7238815fa47
|
|
|
4699
4699
|
const $57642e3bf93ac1e7$export$5c069c93d2b7493f = delay => new Promise(resolve => setTimeout(resolve, delay));
|
|
4700
4700
|
async function $c95f8181bad32e8d$export$bcd70d5ed1cf6313(url, options) {
|
|
4701
4701
|
let max_retries = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
|
|
4702
|
-
let
|
|
4702
|
+
let {
|
|
4703
|
+
useFetch_ = fetch,
|
|
4704
|
+
initialRetryDuration_ = 100
|
|
4705
|
+
} = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
4703
4706
|
const ONE_MINUTE = 60000;
|
|
4704
4707
|
const max_backoff_ms = ONE_MINUTE;
|
|
4705
4708
|
const {
|
|
@@ -4710,11 +4713,11 @@ async function $c95f8181bad32e8d$export$bcd70d5ed1cf6313(url, options) {
|
|
|
4710
4713
|
if (delay > max_backoff_ms) delay = max_backoff_ms * (1 + Math.random() / 10);
|
|
4711
4714
|
return delay;
|
|
4712
4715
|
};
|
|
4713
|
-
let try_again_in_ms =
|
|
4716
|
+
let try_again_in_ms = initialRetryDuration_;
|
|
4714
4717
|
let has_succeeded = false;
|
|
4715
4718
|
let result = false;
|
|
4716
4719
|
while (max_retries && !has_succeeded) try {
|
|
4717
|
-
const response = await
|
|
4720
|
+
const response = await useFetch_(url, options);
|
|
4718
4721
|
const {
|
|
4719
4722
|
status: status,
|
|
4720
4723
|
ok: ok
|
package/server/latest/index.cjs
CHANGED
|
@@ -204,7 +204,7 @@ $parcel$export(module.exports, "version", () => $815f67c61b4c0a42$export$83d89fb
|
|
|
204
204
|
$parcel$export(module.exports, "add_to_version_info", () => $e4a18bf12ad092d9$export$2cefb7e61fcbae00);
|
|
205
205
|
$parcel$export(module.exports, "sync_el_content_with_accessor", () => $35303d72263038db$export$c3f56a35e076f139);
|
|
206
206
|
$parcel$export(module.exports, "use_href_accessor", () => $da35c7e27be2a442$export$e35115e6d0715f77);
|
|
207
|
-
const $815f67c61b4c0a42$export$83d89fbfd8236492 = "2.4.
|
|
207
|
+
const $815f67c61b4c0a42$export$83d89fbfd8236492 = "2.4.1";
|
|
208
208
|
const $7b5e577a60b81e60$export$55fe61489d2c7417 = /*@__PURE__*/(() => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && (globalThis?.document?.currentScript?.dataset?.debug === "true" || globalThis?.localStorage?.getItem?.("debug") === "true"))();
|
|
209
209
|
const $e6c6e7929ea385ae$var$browser_prefix_styling = "color: #fff;";
|
|
210
210
|
let $e6c6e7929ea385ae$var$browser_prefix = "[Depict]";
|
|
@@ -4433,7 +4433,10 @@ const $23d6393391c08860$export$783ef16647773b3d = /*@__PURE__*/$41f528c04cc8a8da
|
|
|
4433
4433
|
return meta?.product;
|
|
4434
4434
|
}));
|
|
4435
4435
|
const $55769f63ea4d8da4$export$5c069c93d2b7493f = delay => new Promise(resolve => setTimeout(resolve, delay));
|
|
4436
|
-
async function $d2fc3fb450961938$export$bcd70d5ed1cf6313(url, options, max_retries = 10,
|
|
4436
|
+
async function $d2fc3fb450961938$export$bcd70d5ed1cf6313(url, options, max_retries = 10, {
|
|
4437
|
+
useFetch_ = fetch,
|
|
4438
|
+
initialRetryDuration_ = 100
|
|
4439
|
+
} = {}) {
|
|
4437
4440
|
const ONE_MINUTE = 60000;
|
|
4438
4441
|
const max_backoff_ms = ONE_MINUTE;
|
|
4439
4442
|
const {
|
|
@@ -4444,11 +4447,11 @@ async function $d2fc3fb450961938$export$bcd70d5ed1cf6313(url, options, max_retri
|
|
|
4444
4447
|
if (delay > max_backoff_ms) delay = max_backoff_ms * (1 + Math.random() / 10);
|
|
4445
4448
|
return delay;
|
|
4446
4449
|
};
|
|
4447
|
-
let try_again_in_ms =
|
|
4450
|
+
let try_again_in_ms = initialRetryDuration_;
|
|
4448
4451
|
let has_succeeded = false;
|
|
4449
4452
|
let result = false;
|
|
4450
4453
|
while (max_retries && !has_succeeded) try {
|
|
4451
|
-
const response = await
|
|
4454
|
+
const response = await useFetch_(url, options);
|
|
4452
4455
|
const {
|
|
4453
4456
|
status: status,
|
|
4454
4457
|
ok: ok
|
package/server/latest/index.d.ts
CHANGED
|
@@ -1360,10 +1360,17 @@ export const wait: (delay: number) => Promise<unknown>;
|
|
|
1360
1360
|
* @param url Url to perform fetch towards
|
|
1361
1361
|
* @param options Fetch options
|
|
1362
1362
|
* @param max_retries Max number of retries, defaults to 10
|
|
1363
|
-
* @param
|
|
1363
|
+
* @param useFetch_ The fetch function to use, defaults to the global fetch
|
|
1364
|
+
* @param initialRetryDuration_ The start duration for the first retry, defaults to 100ms
|
|
1364
1365
|
* @returns The fetch response
|
|
1365
1366
|
*/
|
|
1366
|
-
export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number,
|
|
1367
|
+
export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number, {
|
|
1368
|
+
useFetch_,
|
|
1369
|
+
initialRetryDuration_
|
|
1370
|
+
}?: {
|
|
1371
|
+
useFetch_?: typeof fetch;
|
|
1372
|
+
initialRetryDuration_?: number;
|
|
1373
|
+
}): Promise<false | Response>;
|
|
1367
1374
|
/**
|
|
1368
1375
|
* Ensures that the attribute value of an element is what an AsyncIterable resolves with
|
|
1369
1376
|
* @param el Element to set attribute on
|
package/server/latest/index.js
CHANGED
|
@@ -5,7 +5,7 @@ register_es_version("utilishared", "latest");
|
|
|
5
5
|
function $parcel$interopDefault(a) {
|
|
6
6
|
return a && a.__esModule ? a.default : a;
|
|
7
7
|
}
|
|
8
|
-
const $0766c85d387a9765$export$83d89fbfd8236492 = "2.4.
|
|
8
|
+
const $0766c85d387a9765$export$83d89fbfd8236492 = "2.4.1";
|
|
9
9
|
const $571bce04eb920cd8$export$55fe61489d2c7417 = /*@__PURE__*/(() => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && (globalThis?.document?.currentScript?.dataset?.debug === "true" || globalThis?.localStorage?.getItem?.("debug") === "true"))();
|
|
10
10
|
const $649f456f663da9fc$var$browser_prefix_styling = "color: #fff;";
|
|
11
11
|
let $649f456f663da9fc$var$browser_prefix = "[Depict]";
|
|
@@ -4234,7 +4234,10 @@ const $802201ed0a316c43$export$783ef16647773b3d = /*@__PURE__*/$511123bb28a7b6f7
|
|
|
4234
4234
|
return meta?.product;
|
|
4235
4235
|
}));
|
|
4236
4236
|
const $2cbe7e0ca2ce5438$export$5c069c93d2b7493f = delay => new Promise(resolve => setTimeout(resolve, delay));
|
|
4237
|
-
async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retries = 10,
|
|
4237
|
+
async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retries = 10, {
|
|
4238
|
+
useFetch_ = fetch,
|
|
4239
|
+
initialRetryDuration_ = 100
|
|
4240
|
+
} = {}) {
|
|
4238
4241
|
const ONE_MINUTE = 60000;
|
|
4239
4242
|
const max_backoff_ms = ONE_MINUTE;
|
|
4240
4243
|
const {
|
|
@@ -4245,11 +4248,11 @@ async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retri
|
|
|
4245
4248
|
if (delay > max_backoff_ms) delay = max_backoff_ms * (1 + Math.random() / 10);
|
|
4246
4249
|
return delay;
|
|
4247
4250
|
};
|
|
4248
|
-
let try_again_in_ms =
|
|
4251
|
+
let try_again_in_ms = initialRetryDuration_;
|
|
4249
4252
|
let has_succeeded = false;
|
|
4250
4253
|
let result = false;
|
|
4251
4254
|
while (max_retries && !has_succeeded) try {
|
|
4252
|
-
const response = await
|
|
4255
|
+
const response = await useFetch_(url, options);
|
|
4253
4256
|
const {
|
|
4254
4257
|
status: status,
|
|
4255
4258
|
ok: ok
|