@depict-ai/utilishared 2.1.1 → 2.1.3

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 CHANGED
@@ -275,7 +275,7 @@ $parcel$export(module.exports, "version", () => $ce0ab19b284b64fa$export$83d89fb
275
275
  $parcel$export(module.exports, "add_to_version_info", () => $045fb30107c9eecc$export$2cefb7e61fcbae00);
276
276
  $parcel$export(module.exports, "sync_el_content_with_accessor", () => $84d13ab567309a50$export$c3f56a35e076f139);
277
277
  $parcel$export(module.exports, "use_href_accessor", () => $59b7011b96010a8e$export$e35115e6d0715f77);
278
- const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.1.1";
278
+ const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.1.3";
279
279
  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"))();
280
280
  const $7f95f77417d06249$var$browser_prefix_styling = "color: #fff;";
281
281
  let $7f95f77417d06249$var$browser_prefix = "[Depict]";
@@ -3452,6 +3452,7 @@ function $a1dd43178e1da976$export$39d526a1194b6499(anything, depth) {
3452
3452
  const $1a15d4d13e0d0cf9$export$5c069c93d2b7493f = delay => new Promise(resolve => setTimeout(resolve, delay));
3453
3453
  async function $8f0b9bb45dd059c3$export$bcd70d5ed1cf6313(url, options) {
3454
3454
  let max_retries = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
3455
+ let useFetch = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : fetch;
3455
3456
  const ONE_MINUTE = 60000;
3456
3457
  const max_backoff_ms = ONE_MINUTE;
3457
3458
  const {
@@ -3466,7 +3467,7 @@ async function $8f0b9bb45dd059c3$export$bcd70d5ed1cf6313(url, options) {
3466
3467
  let has_succeeded = false;
3467
3468
  let result = false;
3468
3469
  while (max_retries && !has_succeeded) try {
3469
- const response = await fetch(url, options);
3470
+ const response = await useFetch(url, options);
3470
3471
  const {
3471
3472
  status: status,
3472
3473
  ok: ok
package/ES10/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { JSX, Accessor } from "solid-js";
2
- export const version = "2.1.1";
2
+ export const version = "2.1.3";
3
3
  export const is_debug: boolean;
4
4
  /**
5
5
  * Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.
@@ -969,9 +969,10 @@ export const wait: (delay: number) => Promise<unknown>;
969
969
  * @param url Url to perform fetch towards
970
970
  * @param options Fetch options
971
971
  * @param max_retries Max number of retries, defaults to 10
972
+ * @param useFetch The fetch function to use, defaults to the global fetch
972
973
  * @returns The fetch response
973
974
  */
974
- export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number): Promise<false | Response>;
975
+ export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number, useFetch?: typeof fetch): Promise<false | Response>;
975
976
  type PossibleEndpoint = "general" | "product" | "products" | "category";
976
977
  type ExclusiveId = {
977
978
  category_id: string;
package/ES10/index.js CHANGED
@@ -16,7 +16,7 @@ function $parcel$export(e, n, v, s) {
16
16
  function $parcel$interopDefault(a) {
17
17
  return a && a.__esModule ? a.default : a;
18
18
  }
19
- const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "2.1.1";
19
+ const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "2.1.3";
20
20
  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"))();
21
21
  const $241f2f02cc612a49$var$browser_prefix_styling = "color: #fff;";
22
22
  let $241f2f02cc612a49$var$browser_prefix = "[Depict]";
@@ -3193,6 +3193,7 @@ function $d9aec442b12a1134$export$39d526a1194b6499(anything, depth) {
3193
3193
  const $57642e3bf93ac1e7$export$5c069c93d2b7493f = delay => new Promise(resolve => setTimeout(resolve, delay));
3194
3194
  async function $c95f8181bad32e8d$export$bcd70d5ed1cf6313(url, options) {
3195
3195
  let max_retries = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
3196
+ let useFetch = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : fetch;
3196
3197
  const ONE_MINUTE = 60000;
3197
3198
  const max_backoff_ms = ONE_MINUTE;
3198
3199
  const {
@@ -3207,7 +3208,7 @@ async function $c95f8181bad32e8d$export$bcd70d5ed1cf6313(url, options) {
3207
3208
  let has_succeeded = false;
3208
3209
  let result = false;
3209
3210
  while (max_retries && !has_succeeded) try {
3210
- const response = await fetch(url, options);
3211
+ const response = await useFetch(url, options);
3211
3212
  const {
3212
3213
  status: status,
3213
3214
  ok: ok
package/latest/index.cjs CHANGED
@@ -272,7 +272,7 @@ $parcel$export(module.exports, "version", () => $815f67c61b4c0a42$export$83d89fb
272
272
  $parcel$export(module.exports, "add_to_version_info", () => $e4a18bf12ad092d9$export$2cefb7e61fcbae00);
273
273
  $parcel$export(module.exports, "sync_el_content_with_accessor", () => $35303d72263038db$export$c3f56a35e076f139);
274
274
  $parcel$export(module.exports, "use_href_accessor", () => $da35c7e27be2a442$export$e35115e6d0715f77);
275
- const $815f67c61b4c0a42$export$83d89fbfd8236492 = "2.1.1";
275
+ const $815f67c61b4c0a42$export$83d89fbfd8236492 = "2.1.3";
276
276
  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"))();
277
277
  const $e6c6e7929ea385ae$var$browser_prefix_styling = "color: #fff;";
278
278
  let $e6c6e7929ea385ae$var$browser_prefix = "[Depict]";
@@ -3122,7 +3122,7 @@ function $45e05ec4fd7f1ee7$export$39d526a1194b6499(anything, depth) {
3122
3122
  return output;
3123
3123
  }
3124
3124
  const $55769f63ea4d8da4$export$5c069c93d2b7493f = delay => new Promise(resolve => setTimeout(resolve, delay));
3125
- async function $d2fc3fb450961938$export$bcd70d5ed1cf6313(url, options, max_retries = 10) {
3125
+ async function $d2fc3fb450961938$export$bcd70d5ed1cf6313(url, options, max_retries = 10, useFetch = fetch) {
3126
3126
  const ONE_MINUTE = 60000;
3127
3127
  const max_backoff_ms = ONE_MINUTE;
3128
3128
  const {
@@ -3137,7 +3137,7 @@ async function $d2fc3fb450961938$export$bcd70d5ed1cf6313(url, options, max_retri
3137
3137
  let has_succeeded = false;
3138
3138
  let result = false;
3139
3139
  while (max_retries && !has_succeeded) try {
3140
- const response = await fetch(url, options);
3140
+ const response = await useFetch(url, options);
3141
3141
  const {
3142
3142
  status: status,
3143
3143
  ok: ok
package/latest/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { JSX, Accessor } from "solid-js";
2
- export const version = "2.1.1";
2
+ export const version = "2.1.3";
3
3
  export const is_debug: boolean;
4
4
  /**
5
5
  * Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.
@@ -969,9 +969,10 @@ export const wait: (delay: number) => Promise<unknown>;
969
969
  * @param url Url to perform fetch towards
970
970
  * @param options Fetch options
971
971
  * @param max_retries Max number of retries, defaults to 10
972
+ * @param useFetch The fetch function to use, defaults to the global fetch
972
973
  * @returns The fetch response
973
974
  */
974
- export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number): Promise<false | Response>;
975
+ export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number, useFetch?: typeof fetch): Promise<false | Response>;
975
976
  type PossibleEndpoint = "general" | "product" | "products" | "category";
976
977
  type ExclusiveId = {
977
978
  category_id: string;
package/latest/index.js CHANGED
@@ -13,7 +13,7 @@ function $parcel$export(e, n, v, s) {
13
13
  function $parcel$interopDefault(a) {
14
14
  return a && a.__esModule ? a.default : a;
15
15
  }
16
- const $0766c85d387a9765$export$83d89fbfd8236492 = "2.1.1";
16
+ const $0766c85d387a9765$export$83d89fbfd8236492 = "2.1.3";
17
17
  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"))();
18
18
  const $649f456f663da9fc$var$browser_prefix_styling = "color: #fff;";
19
19
  let $649f456f663da9fc$var$browser_prefix = "[Depict]";
@@ -2863,7 +2863,7 @@ function $5c4afc453f904a1f$export$39d526a1194b6499(anything, depth) {
2863
2863
  return output;
2864
2864
  }
2865
2865
  const $2cbe7e0ca2ce5438$export$5c069c93d2b7493f = delay => new Promise(resolve => setTimeout(resolve, delay));
2866
- async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retries = 10) {
2866
+ async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retries = 10, useFetch = fetch) {
2867
2867
  const ONE_MINUTE = 60000;
2868
2868
  const max_backoff_ms = ONE_MINUTE;
2869
2869
  const {
@@ -2878,7 +2878,7 @@ async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retri
2878
2878
  let has_succeeded = false;
2879
2879
  let result = false;
2880
2880
  while (max_retries && !has_succeeded) try {
2881
- const response = await fetch(url, options);
2881
+ const response = await useFetch(url, options);
2882
2882
  const {
2883
2883
  status: status,
2884
2884
  ok: ok
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/utilishared",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "packageManager": "yarn@3.2.2",
5
5
  "source": "src/index.ts",
6
6
  "types": "ES10/index.d.ts",
@@ -139,7 +139,7 @@
139
139
  ],
140
140
  "devDependencies": {
141
141
  "@babel/core": "latest",
142
- "@depict-ai/types": "^5.1.1",
142
+ "@depict-ai/types": "^5.1.3",
143
143
  "@parcel/resolver-default": "^2.10.3",
144
144
  "@sentry/cli": "^2.21.2",
145
145
  "@sentry/types": "^7.75.1",
@@ -275,7 +275,7 @@ $parcel$export(module.exports, "version", () => $ce0ab19b284b64fa$export$83d89fb
275
275
  $parcel$export(module.exports, "add_to_version_info", () => $045fb30107c9eecc$export$2cefb7e61fcbae00);
276
276
  $parcel$export(module.exports, "sync_el_content_with_accessor", () => $84d13ab567309a50$export$c3f56a35e076f139);
277
277
  $parcel$export(module.exports, "use_href_accessor", () => $59b7011b96010a8e$export$e35115e6d0715f77);
278
- const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.1.1";
278
+ const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.1.3";
279
279
  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"))();
280
280
  const $7f95f77417d06249$var$browser_prefix_styling = "color: #fff;";
281
281
  let $7f95f77417d06249$var$browser_prefix = "[Depict]";
@@ -3452,6 +3452,7 @@ function $a1dd43178e1da976$export$39d526a1194b6499(anything, depth) {
3452
3452
  const $1a15d4d13e0d0cf9$export$5c069c93d2b7493f = delay => new Promise(resolve => setTimeout(resolve, delay));
3453
3453
  async function $8f0b9bb45dd059c3$export$bcd70d5ed1cf6313(url, options) {
3454
3454
  let max_retries = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
3455
+ let useFetch = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : fetch;
3455
3456
  const ONE_MINUTE = 60000;
3456
3457
  const max_backoff_ms = ONE_MINUTE;
3457
3458
  const {
@@ -3466,7 +3467,7 @@ async function $8f0b9bb45dd059c3$export$bcd70d5ed1cf6313(url, options) {
3466
3467
  let has_succeeded = false;
3467
3468
  let result = false;
3468
3469
  while (max_retries && !has_succeeded) try {
3469
- const response = await fetch(url, options);
3470
+ const response = await useFetch(url, options);
3470
3471
  const {
3471
3472
  status: status,
3472
3473
  ok: ok
@@ -1,5 +1,5 @@
1
1
  import { JSX, Accessor } from "solid-js";
2
- export const version = "2.1.1";
2
+ export const version = "2.1.3";
3
3
  export const is_debug: boolean;
4
4
  /**
5
5
  * Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.
@@ -969,9 +969,10 @@ export const wait: (delay: number) => Promise<unknown>;
969
969
  * @param url Url to perform fetch towards
970
970
  * @param options Fetch options
971
971
  * @param max_retries Max number of retries, defaults to 10
972
+ * @param useFetch The fetch function to use, defaults to the global fetch
972
973
  * @returns The fetch response
973
974
  */
974
- export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number): Promise<false | Response>;
975
+ export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number, useFetch?: typeof fetch): Promise<false | Response>;
975
976
  type PossibleEndpoint = "general" | "product" | "products" | "category";
976
977
  type ExclusiveId = {
977
978
  category_id: string;
@@ -16,7 +16,7 @@ function $parcel$export(e, n, v, s) {
16
16
  function $parcel$interopDefault(a) {
17
17
  return a && a.__esModule ? a.default : a;
18
18
  }
19
- const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "2.1.1";
19
+ const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "2.1.3";
20
20
  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"))();
21
21
  const $241f2f02cc612a49$var$browser_prefix_styling = "color: #fff;";
22
22
  let $241f2f02cc612a49$var$browser_prefix = "[Depict]";
@@ -3193,6 +3193,7 @@ function $d9aec442b12a1134$export$39d526a1194b6499(anything, depth) {
3193
3193
  const $57642e3bf93ac1e7$export$5c069c93d2b7493f = delay => new Promise(resolve => setTimeout(resolve, delay));
3194
3194
  async function $c95f8181bad32e8d$export$bcd70d5ed1cf6313(url, options) {
3195
3195
  let max_retries = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
3196
+ let useFetch = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : fetch;
3196
3197
  const ONE_MINUTE = 60000;
3197
3198
  const max_backoff_ms = ONE_MINUTE;
3198
3199
  const {
@@ -3207,7 +3208,7 @@ async function $c95f8181bad32e8d$export$bcd70d5ed1cf6313(url, options) {
3207
3208
  let has_succeeded = false;
3208
3209
  let result = false;
3209
3210
  while (max_retries && !has_succeeded) try {
3210
- const response = await fetch(url, options);
3211
+ const response = await useFetch(url, options);
3211
3212
  const {
3212
3213
  status: status,
3213
3214
  ok: ok
@@ -272,7 +272,7 @@ $parcel$export(module.exports, "version", () => $815f67c61b4c0a42$export$83d89fb
272
272
  $parcel$export(module.exports, "add_to_version_info", () => $e4a18bf12ad092d9$export$2cefb7e61fcbae00);
273
273
  $parcel$export(module.exports, "sync_el_content_with_accessor", () => $35303d72263038db$export$c3f56a35e076f139);
274
274
  $parcel$export(module.exports, "use_href_accessor", () => $da35c7e27be2a442$export$e35115e6d0715f77);
275
- const $815f67c61b4c0a42$export$83d89fbfd8236492 = "2.1.1";
275
+ const $815f67c61b4c0a42$export$83d89fbfd8236492 = "2.1.3";
276
276
  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"))();
277
277
  const $e6c6e7929ea385ae$var$browser_prefix_styling = "color: #fff;";
278
278
  let $e6c6e7929ea385ae$var$browser_prefix = "[Depict]";
@@ -3122,7 +3122,7 @@ function $45e05ec4fd7f1ee7$export$39d526a1194b6499(anything, depth) {
3122
3122
  return output;
3123
3123
  }
3124
3124
  const $55769f63ea4d8da4$export$5c069c93d2b7493f = delay => new Promise(resolve => setTimeout(resolve, delay));
3125
- async function $d2fc3fb450961938$export$bcd70d5ed1cf6313(url, options, max_retries = 10) {
3125
+ async function $d2fc3fb450961938$export$bcd70d5ed1cf6313(url, options, max_retries = 10, useFetch = fetch) {
3126
3126
  const ONE_MINUTE = 60000;
3127
3127
  const max_backoff_ms = ONE_MINUTE;
3128
3128
  const {
@@ -3137,7 +3137,7 @@ async function $d2fc3fb450961938$export$bcd70d5ed1cf6313(url, options, max_retri
3137
3137
  let has_succeeded = false;
3138
3138
  let result = false;
3139
3139
  while (max_retries && !has_succeeded) try {
3140
- const response = await fetch(url, options);
3140
+ const response = await useFetch(url, options);
3141
3141
  const {
3142
3142
  status: status,
3143
3143
  ok: ok
@@ -1,5 +1,5 @@
1
1
  import { JSX, Accessor } from "solid-js";
2
- export const version = "2.1.1";
2
+ export const version = "2.1.3";
3
3
  export const is_debug: boolean;
4
4
  /**
5
5
  * Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.
@@ -969,9 +969,10 @@ export const wait: (delay: number) => Promise<unknown>;
969
969
  * @param url Url to perform fetch towards
970
970
  * @param options Fetch options
971
971
  * @param max_retries Max number of retries, defaults to 10
972
+ * @param useFetch The fetch function to use, defaults to the global fetch
972
973
  * @returns The fetch response
973
974
  */
974
- export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number): Promise<false | Response>;
975
+ export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number, useFetch?: typeof fetch): Promise<false | Response>;
975
976
  type PossibleEndpoint = "general" | "product" | "products" | "category";
976
977
  type ExclusiveId = {
977
978
  category_id: string;
@@ -13,7 +13,7 @@ function $parcel$export(e, n, v, s) {
13
13
  function $parcel$interopDefault(a) {
14
14
  return a && a.__esModule ? a.default : a;
15
15
  }
16
- const $0766c85d387a9765$export$83d89fbfd8236492 = "2.1.1";
16
+ const $0766c85d387a9765$export$83d89fbfd8236492 = "2.1.3";
17
17
  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"))();
18
18
  const $649f456f663da9fc$var$browser_prefix_styling = "color: #fff;";
19
19
  let $649f456f663da9fc$var$browser_prefix = "[Depict]";
@@ -2863,7 +2863,7 @@ function $5c4afc453f904a1f$export$39d526a1194b6499(anything, depth) {
2863
2863
  return output;
2864
2864
  }
2865
2865
  const $2cbe7e0ca2ce5438$export$5c069c93d2b7493f = delay => new Promise(resolve => setTimeout(resolve, delay));
2866
- async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retries = 10) {
2866
+ async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retries = 10, useFetch = fetch) {
2867
2867
  const ONE_MINUTE = 60000;
2868
2868
  const max_backoff_ms = ONE_MINUTE;
2869
2869
  const {
@@ -2878,7 +2878,7 @@ async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retri
2878
2878
  let has_succeeded = false;
2879
2879
  let result = false;
2880
2880
  while (max_retries && !has_succeeded) try {
2881
- const response = await fetch(url, options);
2881
+ const response = await useFetch(url, options);
2882
2882
  const {
2883
2883
  status: status,
2884
2884
  ok: ok