@flareapp/vue 1.0.0-beta.2 → 1.0.0-beta.4

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.
@@ -0,0 +1,28 @@
1
+ import { flare } from '@flareapp/js';
2
+
3
+ function flareVue(app) {
4
+ const initialErrorHandler = app.config.errorHandler;
5
+
6
+ app.config.errorHandler = (error, vm, info) => {
7
+ const componentName =
8
+ vm && vm.$options && vm.$options.name
9
+ ? vm.$options.name
10
+ : 'AnonymousComponent';
11
+
12
+ const context = {
13
+ vue: { info, componentName },
14
+ };
15
+
16
+ flare.report(error, context, { vue: { vm, info } });
17
+
18
+ if (typeof initialErrorHandler === 'function') {
19
+ initialErrorHandler(error, vm, info);
20
+
21
+ return;
22
+ }
23
+
24
+ throw error;
25
+ };
26
+ }
27
+
28
+ export { flareVue };
@@ -0,0 +1,28 @@
1
+ import { flare } from '@flareapp/js';
2
+
3
+ function flareVue(app) {
4
+ const initialErrorHandler = app.config.errorHandler;
5
+
6
+ app.config.errorHandler = (error, vm, info) => {
7
+ const componentName =
8
+ vm && vm.$options && vm.$options.name
9
+ ? vm.$options.name
10
+ : 'AnonymousComponent';
11
+
12
+ const context = {
13
+ vue: { info, componentName },
14
+ };
15
+
16
+ flare.report(error, context, { vue: { vm, info } });
17
+
18
+ if (typeof initialErrorHandler === 'function') {
19
+ initialErrorHandler(error, vm, info);
20
+
21
+ return;
22
+ }
23
+
24
+ throw error;
25
+ };
26
+ }
27
+
28
+ export { flareVue };
package/dist/index.js ADDED
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.js
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ flareVue: () => flareVue
24
+ });
25
+ module.exports = __toCommonJS(src_exports);
26
+ var import_js = require("@flareapp/js");
27
+ function flareVue(app) {
28
+ const initialErrorHandler = app.config.errorHandler;
29
+ app.config.errorHandler = (error, vm, info) => {
30
+ const componentName = vm && vm.$options && vm.$options.name ? vm.$options.name : "AnonymousComponent";
31
+ const context = {
32
+ vue: { info, componentName }
33
+ };
34
+ import_js.flare.report(error, context, { vue: { vm, info } });
35
+ if (typeof initialErrorHandler === "function") {
36
+ initialErrorHandler(error, vm, info);
37
+ return;
38
+ }
39
+ throw error;
40
+ };
41
+ }
42
+ // Annotate the CommonJS export names for ESM import in node:
43
+ 0 && (module.exports = {
44
+ flareVue
45
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,20 @@
1
+ // src/index.js
2
+ import { flare } from "@flareapp/js";
3
+ function flareVue(app) {
4
+ const initialErrorHandler = app.config.errorHandler;
5
+ app.config.errorHandler = (error, vm, info) => {
6
+ const componentName = vm && vm.$options && vm.$options.name ? vm.$options.name : "AnonymousComponent";
7
+ const context = {
8
+ vue: { info, componentName }
9
+ };
10
+ flare.report(error, context, { vue: { vm, info } });
11
+ if (typeof initialErrorHandler === "function") {
12
+ initialErrorHandler(error, vm, info);
13
+ return;
14
+ }
15
+ throw error;
16
+ };
17
+ }
18
+ export {
19
+ flareVue
20
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flareapp/vue",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.4",
4
4
  "description": "Vue client for flareapp.io",
5
5
  "homepage": "https://flareapp.io",
6
6
  "bugs": "https://github.com/facade/flare-client-js/issues",