@usereactify/search 3.10.3 → 3.10.4-0
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/provider.js +34 -1
- package/package.json +4 -2
package/dist/provider.js
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
2
21
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
22
|
var t = {};
|
|
4
23
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -16,6 +35,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
36
|
exports.useContext = exports.ConfiguredProvider = exports.Provider = void 0;
|
|
18
37
|
const react_1 = __importDefault(require("react"));
|
|
38
|
+
const Sentry = __importStar(require("@sentry/react"));
|
|
19
39
|
const hooks_1 = require("./hooks");
|
|
20
40
|
const UtilityAuthenticatedReactiveBase_1 = require("./utility/UtilityAuthenticatedReactiveBase");
|
|
21
41
|
const debug = require("debug")("reactify-search:Provider");
|
|
@@ -25,6 +45,9 @@ const defaultCredentials = {
|
|
|
25
45
|
password: "password",
|
|
26
46
|
endpoint: "https://api.search.reactify.app",
|
|
27
47
|
};
|
|
48
|
+
Sentry.init({
|
|
49
|
+
dsn: "https://f591e13196ad4d6bbcd8abbeb2e023db@o1280055.ingest.sentry.io/6482743",
|
|
50
|
+
});
|
|
28
51
|
const Provider = (_a) => {
|
|
29
52
|
var { renderBooting } = _a, props = __rest(_a, ["renderBooting"]);
|
|
30
53
|
const { config } = (0, hooks_1.useLiveConfig)(props.shopifyPermanentDomain);
|
|
@@ -33,7 +56,17 @@ const Provider = (_a) => {
|
|
|
33
56
|
return renderBooting();
|
|
34
57
|
return null;
|
|
35
58
|
}
|
|
36
|
-
return react_1.default.createElement(
|
|
59
|
+
return (react_1.default.createElement(Sentry.ErrorBoundary, { fallback: react_1.default.createElement("p", null, "An error has occurred"), beforeCapture: (scope) => {
|
|
60
|
+
scope.setTag("index", props.index);
|
|
61
|
+
scope.setTag("shop", props.shopifyPermanentDomain);
|
|
62
|
+
if (!!props.collection)
|
|
63
|
+
scope.setTag("collection", props.collection.handle);
|
|
64
|
+
if (!!props.filterStackId)
|
|
65
|
+
scope.setTag("filterStackId", props.filterStackId);
|
|
66
|
+
if (!!props.instantSearch)
|
|
67
|
+
scope.setTag("instantSearch", true);
|
|
68
|
+
} },
|
|
69
|
+
react_1.default.createElement(exports.ConfiguredProvider, Object.assign({}, props, { config: config }))));
|
|
37
70
|
};
|
|
38
71
|
exports.Provider = Provider;
|
|
39
72
|
const ConfiguredProvider = (props) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usereactify/search",
|
|
3
3
|
"description": "React UI library for Reactify Search",
|
|
4
|
-
"version": "3.10.
|
|
4
|
+
"version": "3.10.4-0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"watch": "tsc --watch",
|
|
14
14
|
"release": "standard-version",
|
|
15
|
-
"patch": "standard-version -
|
|
15
|
+
"release:patch": "standard-version --release-as patch",
|
|
16
|
+
"release:beta": "standard-version --prerelease",
|
|
16
17
|
"build": "rimraf dist && tsc",
|
|
17
18
|
"prettier": "prettier --write .",
|
|
18
19
|
"storybook": "start-storybook -p 6006",
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
]
|
|
31
32
|
},
|
|
32
33
|
"dependencies": {
|
|
34
|
+
"@sentry/react": "7.1.1",
|
|
33
35
|
"ahooks": "2.10.11",
|
|
34
36
|
"axios": "0.26.1",
|
|
35
37
|
"currency.js": "2.0.4",
|