@modainteract/moda-interact-shared 5.12.3 → 5.12.5
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/{chunk-SOAGFZ7A.js → chunk-724PTEP6.js} +2 -2
- package/dist/{chunk-VJNXWDA5.js → chunk-C53TPPK3.js} +2 -2
- package/dist/{chunk-JWX4ZVKK.js → chunk-QXS7H6FR.js} +2 -2
- package/dist/{chunk-W5Y5ZLGN.js → chunk-TFUUXKMI.js} +12 -2
- package/dist/{chunk-W5Y5ZLGN.js.map → chunk-TFUUXKMI.js.map} +1 -1
- package/dist/commerce/index.d.ts +4 -4
- package/dist/commerce/index.js +5 -3
- package/dist/commerce/index.js.map +1 -1
- package/dist/commerce/model/node.d.ts +3 -3
- package/dist/commerce/model/node.js +1 -1
- package/dist/commerce/outreach/index.d.ts +3 -3
- package/dist/commerce/outreach/index.js +1 -1
- package/dist/commerce/presentation/index.d.ts +1 -1
- package/dist/commerce/presentation/index.js +3 -3
- package/dist/commerce/presentation/node/index.js +2 -2
- package/dist/commerce/runner/index.d.ts +4 -4
- package/dist/commerce/runner/index.js +3 -3
- package/dist/{product-context-D1Xfe1FX.d.ts → product-context--Wd0ZncM.d.ts} +1 -1
- package/dist/{response-gHpvLkzy.d.ts → response--jpPTmq8.d.ts} +3 -1
- package/dist/{types-CZeBh6OR.d.ts → types-DBcr5G9K.d.ts} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-SOAGFZ7A.js.map → chunk-724PTEP6.js.map} +0 -0
- /package/dist/{chunk-VJNXWDA5.js.map → chunk-C53TPPK3.js.map} +0 -0
- /package/dist/{chunk-JWX4ZVKK.js.map → chunk-QXS7H6FR.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CommerceProductSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TFUUXKMI.js";
|
|
4
4
|
|
|
5
5
|
// src/commerce/presentation/product-image.ts
|
|
6
6
|
import { z } from "zod";
|
|
@@ -181,4 +181,4 @@ export {
|
|
|
181
181
|
digest,
|
|
182
182
|
readPreparedWrapper
|
|
183
183
|
};
|
|
184
|
-
//# sourceMappingURL=chunk-
|
|
184
|
+
//# sourceMappingURL=chunk-724PTEP6.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
isBuiltInTool,
|
|
8
8
|
isTrustedCommerceBuiltInDescriptor,
|
|
9
9
|
isTrustedCommerceBuiltInGrant
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TFUUXKMI.js";
|
|
11
11
|
import {
|
|
12
12
|
IdSchema
|
|
13
13
|
} from "./chunk-GCCT2BDE.js";
|
|
@@ -102,4 +102,4 @@ export {
|
|
|
102
102
|
currentlyGrantedTools,
|
|
103
103
|
verifyCommerceAnswerPresentationSelection
|
|
104
104
|
};
|
|
105
|
-
//# sourceMappingURL=chunk-
|
|
105
|
+
//# sourceMappingURL=chunk-C53TPPK3.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CommerceProductSchema,
|
|
3
3
|
CommerceProductSelectedOptionsSchema
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TFUUXKMI.js";
|
|
5
5
|
|
|
6
6
|
// src/commerce/product-context.ts
|
|
7
7
|
import { z } from "zod";
|
|
@@ -73,4 +73,4 @@ export {
|
|
|
73
73
|
resolveConversationProductReference,
|
|
74
74
|
recordCommerceProductPresentation
|
|
75
75
|
};
|
|
76
|
-
//# sourceMappingURL=chunk-
|
|
76
|
+
//# sourceMappingURL=chunk-QXS7H6FR.js.map
|
|
@@ -1577,9 +1577,18 @@ var CommerceToolOutputs = {
|
|
|
1577
1577
|
commerce_find_qualifying_products: alternatives,
|
|
1578
1578
|
commerce_find_similar_products: alternatives
|
|
1579
1579
|
};
|
|
1580
|
+
function commerceStoreHostname(value) {
|
|
1581
|
+
try {
|
|
1582
|
+
if (!value || /[\\\s]/u.test(value)) return null;
|
|
1583
|
+
const url = new URL(value.includes("://") ? value : `https://${value}`);
|
|
1584
|
+
return url.protocol === "https:" && !url.username && !url.password && !url.port && url.pathname === "/" && !url.search && !url.hash ? url.hostname.toLowerCase() : null;
|
|
1585
|
+
} catch {
|
|
1586
|
+
return null;
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1580
1589
|
function productBelongsToDomain(product, verifiedDomain) {
|
|
1581
1590
|
try {
|
|
1582
|
-
return product.url === null || new URL(product.url).hostname === verifiedDomain;
|
|
1591
|
+
return product.url === null || commerceStoreHostname(verifiedDomain) !== null && new URL(product.url).protocol === "https:" && !new URL(product.url).username && !new URL(product.url).password && !new URL(product.url).port && new URL(product.url).hostname === commerceStoreHostname(verifiedDomain);
|
|
1583
1592
|
} catch {
|
|
1584
1593
|
return false;
|
|
1585
1594
|
}
|
|
@@ -1694,6 +1703,7 @@ export {
|
|
|
1694
1703
|
CommerceShippingInformationSchema,
|
|
1695
1704
|
CommerceToolInputs,
|
|
1696
1705
|
CommerceToolOutputs,
|
|
1706
|
+
commerceStoreHostname,
|
|
1697
1707
|
productBelongsToDomain
|
|
1698
1708
|
};
|
|
1699
|
-
//# sourceMappingURL=chunk-
|
|
1709
|
+
//# sourceMappingURL=chunk-TFUUXKMI.js.map
|