@wandzai/utils 1.0.71 → 1.0.73
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/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/index.js.map +1 -1
- package/src/sentry.d.ts +2 -0
- package/src/sentry.js +22 -0
- package/src/sentry.js.map +1 -0
- package/src/slack.d.ts +2 -1
- package/src/slack.js +1 -0
- package/src/slack.js.map +1 -1
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
|
@@ -28,4 +28,5 @@ __exportStar(require("./schedule"), exports);
|
|
|
28
28
|
__exportStar(require("./cache"), exports);
|
|
29
29
|
__exportStar(require("./interactions"), exports);
|
|
30
30
|
__exportStar(require("./slack"), exports);
|
|
31
|
+
__exportStar(require("./sentry"), exports);
|
|
31
32
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/utils/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,yCAAuB;AACvB,yCAAuB;AACvB,yCAAuB;AACvB,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,oDAAkC;AAClC,0CAAwB;AACxB,8CAA4B;AAC5B,6CAA2B;AAC3B,0CAAwB;AACxB,iDAA+B;AAC/B,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/utils/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,yCAAuB;AACvB,yCAAuB;AACvB,yCAAuB;AACvB,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,oDAAkC;AAClC,0CAAwB;AACxB,8CAA4B;AAC5B,6CAA2B;AAC3B,0CAAwB;AACxB,iDAA+B;AAC/B,0CAAwB;AACxB,2CAAwB"}
|
package/src/sentry.d.ts
ADDED
package/src/sentry.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.shouldSkipSentryError = void 0;
|
|
4
|
+
const shouldSkipSentryError = (err, sentrySkipErrors, sentrySkippedErrorsInput) => {
|
|
5
|
+
const { currentRepo, currentRoute, componentName, info } = sentrySkippedErrorsInput;
|
|
6
|
+
if (!Array.isArray(sentrySkipErrors) || !(err instanceof Error))
|
|
7
|
+
return false;
|
|
8
|
+
const message = err.message;
|
|
9
|
+
return sentrySkipErrors.some((skippedError) => {
|
|
10
|
+
const originMatch = skippedError.origin === currentRepo;
|
|
11
|
+
const textExactMatch = skippedError.errorExactText ? message === skippedError.errorExactText : false;
|
|
12
|
+
const textContainedMatch = skippedError.errorContainedText
|
|
13
|
+
? message.includes(skippedError.errorContainedText)
|
|
14
|
+
: false;
|
|
15
|
+
const componentMatch = skippedError.componentName ? skippedError.componentName === componentName : true;
|
|
16
|
+
const urlMatch = skippedError.url ? skippedError.url === currentRoute : true;
|
|
17
|
+
const infoMatch = skippedError.info ? skippedError.info === info : true;
|
|
18
|
+
return originMatch && (textExactMatch || textContainedMatch) && componentMatch && urlMatch && infoMatch;
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
exports.shouldSkipSentryError = shouldSkipSentryError;
|
|
22
|
+
//# sourceMappingURL=sentry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sentry.js","sourceRoot":"","sources":["../../../../libs/utils/src/sentry.ts"],"names":[],"mappings":";;;AAEO,MAAM,qBAAqB,GAAG,CAAC,GAAY,EAAE,gBAAwC,EAAE,wBAAmD,EAAW,EAAE;IAC5J,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,wBAAwB,CAAC;IACpF,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,gBAA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["SHARED_LINKS_NOTIFICATIONS"] = "shared-links-notifications";
|
|
8
|
+
SlackChannels["NEW_CLIENT_AUTOMATIC_CREATION"] = "new_client_automatic_creation";
|
|
8
9
|
})(SlackChannels || (exports.SlackChannels = SlackChannels = {}));
|
|
9
10
|
//# sourceMappingURL=slack.js.map
|
package/src/slack.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slack.js","sourceRoot":"","sources":["../../../../libs/utils/src/slack.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"slack.js","sourceRoot":"","sources":["../../../../libs/utils/src/slack.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,gDAA+B,CAAA;IAC/B,0EAAyD,CAAA;IACzD,gFAA+D,CAAA;AACjE,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB"}
|