@depict-ai/utilishared 1.0.47 → 1.0.49

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
@@ -279,7 +279,7 @@ $parcel$export(module.exports, "add_to_version_info", () => $045fb30107c9eecc$ex
279
279
  $parcel$export(module.exports, "edit_current_page_meta_tags", () => $0126fdc29a9f7f2d$export$ef73ea4f975745ba);
280
280
  $parcel$export(module.exports, "sync_el_content_with_accessor", () => $84d13ab567309a50$export$c3f56a35e076f139);
281
281
  $parcel$export(module.exports, "use_href_accessor", () => $59b7011b96010a8e$export$e35115e6d0715f77);
282
- const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "1.0.47";
282
+ const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "1.0.49";
283
283
  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"))();
284
284
  const $7f95f77417d06249$var$browser_prefix_styling = "color: #fff;";
285
285
  let $7f95f77417d06249$var$browser_prefix = "[Depict]";
@@ -7292,7 +7292,8 @@ async function $fe05042754d72fbc$export$85be83e1935d93c2(fetch_proxy_handler) {
7292
7292
  return (await ((_fetch_proxy_handler = fetch_proxy_handler(target, this_arg, arguments_list)) === null || _fetch_proxy_handler === void 0 ? void 0 : (_fetch_proxy_handler$ = _fetch_proxy_handler.catch) === null || _fetch_proxy_handler$ === void 0 ? void 0 : _fetch_proxy_handler$.call(_fetch_proxy_handler, (0, $46b94b232dc792af$export$8048b892d651b310)))) || (await target.apply(this_arg, arguments_list));
7293
7293
  }
7294
7294
  }
7295
- class $fe05042754d72fbc$export$f8da66bc4f1d059e extends Response {
7295
+ class $fe05042754d72fbc$export$f8da66bc4f1d059e extends ((globalThis === null || globalThis === void 0 ? void 0 : globalThis.Response) || class {}) {
7296
+ // the or here is to not throw on node 16 on the server
7296
7297
  constructor(response_string, url) {
7297
7298
  let headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
7298
7299
  let override_options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
package/ES10/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /// <reference path="../jsx.d.ts" />
2
2
  import { EUnavailabilityType } from "@depict-ai/types/api/TrackV2Request";
3
3
  import { Accessor } from "solid-js";
4
- export const version = "1.0.47";
4
+ export const version = "1.0.49";
5
5
  export const is_debug: boolean;
6
6
  /**
7
7
  * Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.
@@ -980,7 +980,7 @@ export const wait: (delay: number) => Promise<unknown>;
980
980
  * @param max_retries Max number of retries, defaults to 10
981
981
  * @returns The fetch response
982
982
  */
983
- export function fetch_retry(url: RequestInfo, options?: RequestInit, max_retries?: number): Promise<false | Response>;
983
+ export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number): Promise<false | Response>;
984
984
  type PossibleEndpoint = "general" | "product" | "products" | "category";
985
985
  type ExclusiveId = {
986
986
  category_id: string;
@@ -1957,6 +1957,12 @@ export function navigate_with_next_router(e: MouseEvent, url: string): false | u
1957
1957
  * @return Nothing
1958
1958
  */
1959
1959
  export function fetch_replacer(fetch_proxy_handler: (target: typeof window.fetch, this_arg: typeof window, arguments_list: Parameters<typeof window.fetch>) => Promise<Response | FakeResponse>, unsafe_throw_up?: boolean): Promise<void>;
1960
+ declare const FakeResponse_base: {
1961
+ new (body?: BodyInit | null | undefined, init?: ResponseInit | undefined): Response;
1962
+ prototype: Response;
1963
+ error(): Response;
1964
+ redirect(url: string | URL, status?: number | undefined): Response;
1965
+ };
1960
1966
  /**
1961
1967
  * This class extends and models the `Response` class as close as possible. Basically the only thing not being identical would be `instance_of_fake_response.constructor` and some other stuff, but nothing connected to how you're usually using a `Response` object.
1962
1968
  * Useful when wanting to change the result of a `fetch request`
@@ -1966,7 +1972,7 @@ export function fetch_replacer(fetch_proxy_handler: (target: typeof window.fetch
1966
1972
  * @param headers Response headers
1967
1973
  * @param override_options More options to pass to the `Response` constructor
1968
1974
  */
1969
- export class FakeResponse extends Response {
1975
+ export class FakeResponse extends FakeResponse_base {
1970
1976
  constructor(response_string: string, url: string, headers?: HeadersInit, override_options?: ResponseInit);
1971
1977
  }
1972
1978
  export type ShopifyItem = {
package/ES10/index.js CHANGED
@@ -15,7 +15,7 @@ function $parcel$export(e, n, v, s) {
15
15
  function $parcel$interopDefault(a) {
16
16
  return a && a.__esModule ? a.default : a;
17
17
  }
18
- const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "1.0.47";
18
+ const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "1.0.49";
19
19
  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"))();
20
20
  const $241f2f02cc612a49$var$browser_prefix_styling = "color: #fff;";
21
21
  let $241f2f02cc612a49$var$browser_prefix = "[Depict]";
@@ -7028,7 +7028,8 @@ async function $201e455525e1fa49$export$85be83e1935d93c2(fetch_proxy_handler) {
7028
7028
  return (await ((_fetch_proxy_handler = fetch_proxy_handler(target, this_arg, arguments_list)) === null || _fetch_proxy_handler === void 0 ? void 0 : (_fetch_proxy_handler$ = _fetch_proxy_handler.catch) === null || _fetch_proxy_handler$ === void 0 ? void 0 : _fetch_proxy_handler$.call(_fetch_proxy_handler, (0, $b000f5ef6ce456d9$export$8048b892d651b310)))) || (await target.apply(this_arg, arguments_list));
7029
7029
  }
7030
7030
  }
7031
- class $201e455525e1fa49$export$f8da66bc4f1d059e extends Response {
7031
+ class $201e455525e1fa49$export$f8da66bc4f1d059e extends ((globalThis === null || globalThis === void 0 ? void 0 : globalThis.Response) || class {}) {
7032
+ // the or here is to not throw on node 16 on the server
7032
7033
  constructor(response_string, url) {
7033
7034
  let headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
7034
7035
  let override_options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
package/latest/index.cjs CHANGED
@@ -276,7 +276,7 @@ $parcel$export(module.exports, "add_to_version_info", () => $e4a18bf12ad092d9$ex
276
276
  $parcel$export(module.exports, "edit_current_page_meta_tags", () => $8838e3e61b748a8b$export$ef73ea4f975745ba);
277
277
  $parcel$export(module.exports, "sync_el_content_with_accessor", () => $35303d72263038db$export$c3f56a35e076f139);
278
278
  $parcel$export(module.exports, "use_href_accessor", () => $da35c7e27be2a442$export$e35115e6d0715f77);
279
- const $815f67c61b4c0a42$export$83d89fbfd8236492 = "1.0.47";
279
+ const $815f67c61b4c0a42$export$83d89fbfd8236492 = "1.0.49";
280
280
  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"))();
281
281
  const $e6c6e7929ea385ae$var$browser_prefix_styling = "color: #fff;";
282
282
  let $e6c6e7929ea385ae$var$browser_prefix = "[Depict]";
@@ -6742,7 +6742,8 @@ unsafe_throw_up = false) {
6742
6742
  return (await fetch_proxy_handler(target, this_arg, arguments_list)?.catch?.((0, $548fd58b14b25a52$export$8048b892d651b310))) || (await target.apply(this_arg, arguments_list));
6743
6743
  }
6744
6744
  }
6745
- class $7ccebf01cfe4f824$export$f8da66bc4f1d059e extends Response {
6745
+ class $7ccebf01cfe4f824$export$f8da66bc4f1d059e extends (globalThis?.Response || class {}) {
6746
+ // the or here is to not throw on node 16 on the server
6746
6747
  constructor(response_string, url, headers = {}, override_options = {}) {
6747
6748
  const options = {
6748
6749
  status: 200,
package/latest/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /// <reference path="../jsx.d.ts" />
2
2
  import { EUnavailabilityType } from "@depict-ai/types/api/TrackV2Request";
3
3
  import { Accessor } from "solid-js";
4
- export const version = "1.0.47";
4
+ export const version = "1.0.49";
5
5
  export const is_debug: boolean;
6
6
  /**
7
7
  * Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.
@@ -980,7 +980,7 @@ export const wait: (delay: number) => Promise<unknown>;
980
980
  * @param max_retries Max number of retries, defaults to 10
981
981
  * @returns The fetch response
982
982
  */
983
- export function fetch_retry(url: RequestInfo, options?: RequestInit, max_retries?: number): Promise<false | Response>;
983
+ export function fetch_retry(url: RequestInfo | URL, options?: RequestInit, max_retries?: number): Promise<false | Response>;
984
984
  type PossibleEndpoint = "general" | "product" | "products" | "category";
985
985
  type ExclusiveId = {
986
986
  category_id: string;
@@ -1957,6 +1957,12 @@ export function navigate_with_next_router(e: MouseEvent, url: string): false | u
1957
1957
  * @return Nothing
1958
1958
  */
1959
1959
  export function fetch_replacer(fetch_proxy_handler: (target: typeof window.fetch, this_arg: typeof window, arguments_list: Parameters<typeof window.fetch>) => Promise<Response | FakeResponse>, unsafe_throw_up?: boolean): Promise<void>;
1960
+ declare const FakeResponse_base: {
1961
+ new (body?: BodyInit | null | undefined, init?: ResponseInit | undefined): Response;
1962
+ prototype: Response;
1963
+ error(): Response;
1964
+ redirect(url: string | URL, status?: number | undefined): Response;
1965
+ };
1960
1966
  /**
1961
1967
  * This class extends and models the `Response` class as close as possible. Basically the only thing not being identical would be `instance_of_fake_response.constructor` and some other stuff, but nothing connected to how you're usually using a `Response` object.
1962
1968
  * Useful when wanting to change the result of a `fetch request`
@@ -1966,7 +1972,7 @@ export function fetch_replacer(fetch_proxy_handler: (target: typeof window.fetch
1966
1972
  * @param headers Response headers
1967
1973
  * @param override_options More options to pass to the `Response` constructor
1968
1974
  */
1969
- export class FakeResponse extends Response {
1975
+ export class FakeResponse extends FakeResponse_base {
1970
1976
  constructor(response_string: string, url: string, headers?: HeadersInit, override_options?: ResponseInit);
1971
1977
  }
1972
1978
  export type ShopifyItem = {
package/latest/index.js CHANGED
@@ -12,7 +12,7 @@ function $parcel$export(e, n, v, s) {
12
12
  function $parcel$interopDefault(a) {
13
13
  return a && a.__esModule ? a.default : a;
14
14
  }
15
- const $0766c85d387a9765$export$83d89fbfd8236492 = "1.0.47";
15
+ const $0766c85d387a9765$export$83d89fbfd8236492 = "1.0.49";
16
16
  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"))();
17
17
  const $649f456f663da9fc$var$browser_prefix_styling = "color: #fff;";
18
18
  let $649f456f663da9fc$var$browser_prefix = "[Depict]";
@@ -6478,7 +6478,8 @@ unsafe_throw_up = false) {
6478
6478
  return (await fetch_proxy_handler(target, this_arg, arguments_list)?.catch?.((0, $7547e32486a3abc0$export$8048b892d651b310))) || (await target.apply(this_arg, arguments_list));
6479
6479
  }
6480
6480
  }
6481
- class $b6f5b218b1a73900$export$f8da66bc4f1d059e extends Response {
6481
+ class $b6f5b218b1a73900$export$f8da66bc4f1d059e extends (globalThis?.Response || class {}) {
6482
+ // the or here is to not throw on node 16 on the server
6482
6483
  constructor(response_string, url, headers = {}, override_options = {}) {
6483
6484
  const options = {
6484
6485
  status: 200,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/utilishared",
3
- "version": "1.0.47",
3
+ "version": "1.0.49",
4
4
  "packageManager": "yarn@3.2.2",
5
5
  "source": "src/index.ts",
6
6
  "types": "ES10/index.d.ts",
@@ -81,8 +81,8 @@
81
81
  "@babel/core": "latest",
82
82
  "@depict-ai/types": "^1.0.39",
83
83
  "@parcel/resolver-default": "^2.9.3",
84
- "@sentry/cli": "latest",
85
- "@sentry/types": "^7.13.0",
84
+ "@sentry/cli": "^2.21.2",
85
+ "@sentry/types": "^7.75.1",
86
86
  "@types/jest": "^29.2.5",
87
87
  "@types/node": "^18.11.9",
88
88
  "jest": "^29.3.1",
@@ -93,7 +93,7 @@
93
93
  "@babel/plugin-transform-typescript": "^7.22.9",
94
94
  "@babel/runtime": "latest",
95
95
  "@babel/runtime-corejs3": "latest",
96
- "@sentry/browser": "^7.23.0",
96
+ "@sentry/browser": "^7.75.1",
97
97
  "solid-js": "^1.8.1"
98
98
  },
99
99
  "type": "module",