Skip to content

Commit 68a07f1

Browse files
committed
Fixed build errors, updated vue package to use global error handler.
1 parent f46477c commit 68a07f1

File tree

15 files changed

+830
-37790
lines changed

15 files changed

+830
-37790
lines changed

package-lock.json

Lines changed: 763 additions & 9912 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/src/models/Event.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ export const enum KnownEventDataKeys {
4343
}
4444

4545
interface IData extends Record<string, any> {
46-
"@error": ErrorInfo;
47-
"@simple_error": any; // TODO: Need a model for simple error
48-
"@request": RequestInfo;
49-
"@environment": EnvironmentInfo;
50-
"@user": UserInfo;
51-
"@user_description": UserDescription;
52-
"@version": string;
53-
"@level": string;
54-
"@submission_method": string;
55-
"@stack": ManualStackingInfo;
46+
"@error"?: ErrorInfo;
47+
"@simple_error"?: any; // TODO: Need a model for simple error
48+
"@request"?: RequestInfo;
49+
"@environment"?: EnvironmentInfo;
50+
"@user"?: UserInfo;
51+
"@user_description"?: UserDescription;
52+
"@version"?: string;
53+
"@level"?: string;
54+
"@submission_method"?: string;
55+
"@stack"?: ManualStackingInfo;
5656
}

packages/react/README.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
1-
## Exceptionless React
1+
# Exceptionless React
22

3-
The Exceptionless React package provides a native way to handle errors and events in React. This means errors inside your components, which tend to crash your entire app, can be sent to Exceptionless and you can be alerted. Additionally, you can use this package to catch errors throughout your non-component functions such as in Redux actions, utility functions, etc.
3+
The Exceptionless React package provides a native way to handle errors and events in React. This means errors inside your components, which tend to crash your entire app, can be sent to Exceptionless and you can be alerted. Additionally, you can use this package to catch errors throughout your non-component functions such as in Redux actions, utility functions, etc.
44

5-
### Getting Started
5+
## Getting Started
66

7-
To use this package, your must be using ES6 and Node 15+.
7+
To use this package, your must be using ES6 and Node 15+.
88

9-
**Install**
9+
### Install
1010

11-
NPM:
11+
NPM:
1212

13-
`npm install @exceptionless/react`
13+
`npm install @exceptionless/react`
1414

15-
Yarn:
16-
17-
`yarn add @exceptionless/react`
18-
19-
### Configuration
15+
## Configuration
2016

2117
Inside your `index.js` file or your `App.js` file, you can configure and start Exceptionless as follows.
2218

23-
**Class Components**
19+
### Class Components
2420

2521
```jsx
2622
class App extends Component {
@@ -45,26 +41,26 @@ class App extends Component {
4541
export default App;
4642
```
4743

48-
### Handling Events
44+
## Handling Events
4945

50-
While errors within the components themselves are automatically sent to Exceptionless, you will still want to handle events that happen outside the components.
46+
While errors within the components themselves are automatically sent to Exceptionless, you will still want to handle events that happen outside the components.
5147

5248
Because the Exceptionless client is a singleton, it is available anywhere in your app where you import it. Here's an example from a file we'll call `utilities.js`.
5349

5450
```js
55-
export const myUtilityFunction = () => {
51+
export const myUtilityFunction = async () => {
5652
try {
5753
// Handle successful run of code
5854
} catch(e) {
5955
// If there's an error, send it to Exceptionless
60-
Exceptionless.submitException(e);
56+
await Exceptionless.submitException(e);
6157
}
6258
}
6359
```
6460

65-
You can also sent events and logs that are not errors by simply calling the built-in methods on the Exceptionless class:
61+
You can also sent events and logs that are not errors by simply calling the built-in methods on the Exceptionless class:
6662

6763
```js
68-
Exceptionless.submitLog("Hello, world!");
69-
Exceptionless.submitFeatureUsage("New Shopping Cart Feature");
64+
await Exceptionless.submitLog("Hello, world!");
65+
await Exceptionless.submitFeatureUsage("New Shopping Cart Feature");
7066
```

packages/react/package.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,6 @@
3030
".": "./dist/index.js",
3131
"./package.json": "./package.json"
3232
},
33-
"jest": {
34-
"moduleFileExtensions": [
35-
"js",
36-
"ts"
37-
],
38-
"moduleNameMapper": {
39-
"^@exceptionless/(.*)$": "<rootDir>/../$1/src"
40-
},
41-
"preset": "ts-jest",
42-
"resolver": "jest-ts-webcompat-resolver",
43-
"testEnvironment": "jsdom"
44-
},
4533
"scripts": {
4634
"build": "tsc -p tsconfig.json",
4735
"watch": "tsc -p tsconfig.json -w --preserveWatchOutput",

packages/vue/.gitignore

Lines changed: 0 additions & 23 deletions
This file was deleted.

packages/vue/README.md

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
1-
# vue
1+
# Exceptionless vue
22

3-
## Project setup
4-
```
5-
npm install
6-
```
3+
The Exceptionless Vue package provides a native way to handle errors and events in React. This means errors inside your components, which tend to crash your entire app, can be sent to Exceptionless and you can be alerted. Additionally, you can use this package to catch errors throughout your non-component functions such as in Redux actions, utility functions, etc.
74

8-
### Compiles and hot-reloads for development
9-
```
10-
npm run serve
11-
```
5+
## Getting Started
126

13-
### Compiles and minifies for production
14-
```
15-
npm run build
16-
```
7+
To use this package, your must be using ES6 and Node 15+.
178

18-
### Lints and fixes files
19-
```
20-
npm run lint
21-
```
9+
### Install
2210

23-
### Customize configuration
24-
See [Configuration Reference](https://cli.vuejs.org/config/).
11+
NPM:
12+
13+
`npm install @exceptionless/vue`

packages/vue/babel.config.cjs

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/vue/index.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)