@depict-ai/utilishared 1.0.38 → 1.0.40
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 +3 -2
- package/ES10/index.d.ts +3 -2
- package/ES10/index.js +3 -2
- package/latest/index.cjs +3 -3
- package/latest/index.d.ts +3 -2
- package/latest/index.js +3 -3
- package/package.json +2 -2
package/ES10/index.cjs
CHANGED
|
@@ -278,7 +278,7 @@ $parcel$export(module.exports, "add_to_version_info", () => $045fb30107c9eecc$ex
|
|
|
278
278
|
$parcel$export(module.exports, "edit_current_page_meta_tags", () => $0126fdc29a9f7f2d$export$ef73ea4f975745ba);
|
|
279
279
|
$parcel$export(module.exports, "sync_el_text_content_with_accessor", () => $47853ce77959143b$export$a484632aef15b2b3);
|
|
280
280
|
$parcel$export(module.exports, "use_href_accessor", () => $59b7011b96010a8e$export$e35115e6d0715f77);
|
|
281
|
-
const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "1.0.
|
|
281
|
+
const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "1.0.40";
|
|
282
282
|
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"))();
|
|
283
283
|
const $7f95f77417d06249$var$browser_prefix_styling = "color: #fff;";
|
|
284
284
|
let $7f95f77417d06249$var$browser_prefix = "[Depict]";
|
|
@@ -7272,6 +7272,7 @@ class $fe05042754d72fbc$export$f8da66bc4f1d059e extends Response {
|
|
|
7272
7272
|
}
|
|
7273
7273
|
}
|
|
7274
7274
|
function $675e948221f082fe$export$ab0f802c05dd969b(on_request) {
|
|
7275
|
+
let lenient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
7275
7276
|
$fe05042754d72fbc$export$85be83e1935d93c2(async (target, this_arg, argument_list) => {
|
|
7276
7277
|
const response_promise = target.apply(this_arg, argument_list);
|
|
7277
7278
|
try {
|
|
@@ -7281,7 +7282,7 @@ function $675e948221f082fe$export$ab0f802c05dd969b(on_request) {
|
|
|
7281
7282
|
// And what if the developer wants to override which url's corespond to which events?
|
|
7282
7283
|
const url_segement_to_type = [["/cart.js", "get_items"], ["/cart/add.js", "add_items"], ["/cart/update.js", "update_items"], ["/cart/change.js", "change_items"], ["/cart/clear.js", "clear_items"]];
|
|
7283
7284
|
for (const [segment, type] of url_segement_to_type) {
|
|
7284
|
-
if (!url.includes(segment)) continue;
|
|
7285
|
+
if (!url.includes(segment) && (!lenient || !url.endsWith(segment.split(".js")[0]))) continue;
|
|
7285
7286
|
let decoded_body;
|
|
7286
7287
|
try {
|
|
7287
7288
|
var _argument_list$;
|
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.
|
|
4
|
+
export const version = "1.0.40";
|
|
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]`.
|
|
@@ -2009,8 +2009,9 @@ export type ShopifyEvent = {
|
|
|
2009
2009
|
* In order to get the cart contents at some point even if you miss the merchants innitialt Shopify request.
|
|
2010
2010
|
*
|
|
2011
2011
|
* - `intercept` intercepts all requests to Shopify, including requests made by you.
|
|
2012
|
+
* @param lenient: If true, also new style endpoints not ending on .js will be intercepted.
|
|
2012
2013
|
*/
|
|
2013
|
-
export function intercept(on_request: (event: ShopifyEvent) => any): void;
|
|
2014
|
+
export function intercept(on_request: (event: ShopifyEvent) => any, lenient?: boolean): void;
|
|
2014
2015
|
export type AddToCartOptions = {
|
|
2015
2016
|
quantity?: number;
|
|
2016
2017
|
};
|
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.
|
|
18
|
+
const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "1.0.40";
|
|
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]";
|
|
@@ -7009,6 +7009,7 @@ class $201e455525e1fa49$export$f8da66bc4f1d059e extends Response {
|
|
|
7009
7009
|
}
|
|
7010
7010
|
}
|
|
7011
7011
|
function $f69445e469425bcb$export$ab0f802c05dd969b(on_request) {
|
|
7012
|
+
let lenient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
7012
7013
|
$201e455525e1fa49$export$85be83e1935d93c2(async (target, this_arg, argument_list) => {
|
|
7013
7014
|
const response_promise = target.apply(this_arg, argument_list);
|
|
7014
7015
|
try {
|
|
@@ -7018,7 +7019,7 @@ function $f69445e469425bcb$export$ab0f802c05dd969b(on_request) {
|
|
|
7018
7019
|
// And what if the developer wants to override which url's corespond to which events?
|
|
7019
7020
|
const url_segement_to_type = [["/cart.js", "get_items"], ["/cart/add.js", "add_items"], ["/cart/update.js", "update_items"], ["/cart/change.js", "change_items"], ["/cart/clear.js", "clear_items"]];
|
|
7020
7021
|
for (const [segment, type] of url_segement_to_type) {
|
|
7021
|
-
if (!url.includes(segment)) continue;
|
|
7022
|
+
if (!url.includes(segment) && (!lenient || !url.endsWith(segment.split(".js")[0]))) continue;
|
|
7022
7023
|
let decoded_body;
|
|
7023
7024
|
try {
|
|
7024
7025
|
var _argument_list$;
|
package/latest/index.cjs
CHANGED
|
@@ -275,7 +275,7 @@ $parcel$export(module.exports, "add_to_version_info", () => $e4a18bf12ad092d9$ex
|
|
|
275
275
|
$parcel$export(module.exports, "edit_current_page_meta_tags", () => $8838e3e61b748a8b$export$ef73ea4f975745ba);
|
|
276
276
|
$parcel$export(module.exports, "sync_el_text_content_with_accessor", () => $14bef7fbda1619f5$export$a484632aef15b2b3);
|
|
277
277
|
$parcel$export(module.exports, "use_href_accessor", () => $da35c7e27be2a442$export$e35115e6d0715f77);
|
|
278
|
-
const $815f67c61b4c0a42$export$83d89fbfd8236492 = "1.0.
|
|
278
|
+
const $815f67c61b4c0a42$export$83d89fbfd8236492 = "1.0.40";
|
|
279
279
|
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"))();
|
|
280
280
|
const $e6c6e7929ea385ae$var$browser_prefix_styling = "color: #fff;";
|
|
281
281
|
let $e6c6e7929ea385ae$var$browser_prefix = "[Depict]";
|
|
@@ -6723,7 +6723,7 @@ class $7ccebf01cfe4f824$export$f8da66bc4f1d059e extends Response {
|
|
|
6723
6723
|
});
|
|
6724
6724
|
}
|
|
6725
6725
|
}
|
|
6726
|
-
function $23d6393391c08860$export$ab0f802c05dd969b(on_request) {
|
|
6726
|
+
function $23d6393391c08860$export$ab0f802c05dd969b(on_request, lenient = false) {
|
|
6727
6727
|
$7ccebf01cfe4f824$export$85be83e1935d93c2(async (target, this_arg, argument_list) => {
|
|
6728
6728
|
const response_promise = target.apply(this_arg, argument_list);
|
|
6729
6729
|
try {
|
|
@@ -6733,7 +6733,7 @@ function $23d6393391c08860$export$ab0f802c05dd969b(on_request) {
|
|
|
6733
6733
|
// And what if the developer wants to override which url's corespond to which events?
|
|
6734
6734
|
const url_segement_to_type = [["/cart.js", "get_items"], ["/cart/add.js", "add_items"], ["/cart/update.js", "update_items"], ["/cart/change.js", "change_items"], ["/cart/clear.js", "clear_items"]];
|
|
6735
6735
|
for (const [segment, type] of url_segement_to_type) {
|
|
6736
|
-
if (!url.includes(segment)) continue;
|
|
6736
|
+
if (!url.includes(segment) && (!lenient || !url.endsWith(segment.split(".js")[0]))) continue;
|
|
6737
6737
|
let decoded_body;
|
|
6738
6738
|
try {
|
|
6739
6739
|
const body = argument_list[1]?.body;
|
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.
|
|
4
|
+
export const version = "1.0.40";
|
|
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]`.
|
|
@@ -2009,8 +2009,9 @@ export type ShopifyEvent = {
|
|
|
2009
2009
|
* In order to get the cart contents at some point even if you miss the merchants innitialt Shopify request.
|
|
2010
2010
|
*
|
|
2011
2011
|
* - `intercept` intercepts all requests to Shopify, including requests made by you.
|
|
2012
|
+
* @param lenient: If true, also new style endpoints not ending on .js will be intercepted.
|
|
2012
2013
|
*/
|
|
2013
|
-
export function intercept(on_request: (event: ShopifyEvent) => any): void;
|
|
2014
|
+
export function intercept(on_request: (event: ShopifyEvent) => any, lenient?: boolean): void;
|
|
2014
2015
|
export type AddToCartOptions = {
|
|
2015
2016
|
quantity?: number;
|
|
2016
2017
|
};
|
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.
|
|
15
|
+
const $0766c85d387a9765$export$83d89fbfd8236492 = "1.0.40";
|
|
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]";
|
|
@@ -6460,7 +6460,7 @@ class $b6f5b218b1a73900$export$f8da66bc4f1d059e extends Response {
|
|
|
6460
6460
|
});
|
|
6461
6461
|
}
|
|
6462
6462
|
}
|
|
6463
|
-
function $802201ed0a316c43$export$ab0f802c05dd969b(on_request) {
|
|
6463
|
+
function $802201ed0a316c43$export$ab0f802c05dd969b(on_request, lenient = false) {
|
|
6464
6464
|
$b6f5b218b1a73900$export$85be83e1935d93c2(async (target, this_arg, argument_list) => {
|
|
6465
6465
|
const response_promise = target.apply(this_arg, argument_list);
|
|
6466
6466
|
try {
|
|
@@ -6470,7 +6470,7 @@ function $802201ed0a316c43$export$ab0f802c05dd969b(on_request) {
|
|
|
6470
6470
|
// And what if the developer wants to override which url's corespond to which events?
|
|
6471
6471
|
const url_segement_to_type = [["/cart.js", "get_items"], ["/cart/add.js", "add_items"], ["/cart/update.js", "update_items"], ["/cart/change.js", "change_items"], ["/cart/clear.js", "clear_items"]];
|
|
6472
6472
|
for (const [segment, type] of url_segement_to_type) {
|
|
6473
|
-
if (!url.includes(segment)) continue;
|
|
6473
|
+
if (!url.includes(segment) && (!lenient || !url.endsWith(segment.split(".js")[0]))) continue;
|
|
6474
6474
|
let decoded_body;
|
|
6475
6475
|
try {
|
|
6476
6476
|
const body = argument_list[1]?.body;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/utilishared",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
4
4
|
"packageManager": "yarn@3.2.2",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"types": "ES10/index.d.ts",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
],
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@babel/core": "latest",
|
|
82
|
-
"@depict-ai/types": "^1.0.
|
|
82
|
+
"@depict-ai/types": "^1.0.38",
|
|
83
83
|
"@parcel/resolver-default": "^2.8.0",
|
|
84
84
|
"@sentry/cli": "latest",
|
|
85
85
|
"@sentry/types": "^7.13.0",
|