@availity/exceptions-axios 4.0.0-alpha.9 → 4.0.2

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/CHANGELOG.md CHANGED
@@ -1,7 +1,223 @@
1
- # Change Log
1
+ # Changelog
2
+
3
+ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
+
5
+ ## [4.0.2](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@4.0.1...@availity/exceptions-axios@4.0.2) (2022-05-24)
6
+
7
+
8
+
9
+ ## [4.0.1](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@4.0.0...@availity/exceptions-axios@4.0.1) (2022-04-28)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * add browser field for output ([0ce7170](https://github.com/Availity/sdk-js/commit/0ce717075a82675b8707e4db0cc07cd4af370f3d))
15
+
16
+
17
+
18
+ # [4.0.0](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.69...@availity/exceptions-axios@4.0.0) (2022-04-28)
19
+
20
+
21
+ * build!: switch from lerna to nx and compile to esm with tsup ([c586085](https://github.com/Availity/sdk-js/commit/c5860856ca96b743a0653d335ea00f0889132f7f))
22
+
23
+
24
+ ### BREAKING CHANGES
25
+
26
+ * Drop Internet Explorer support
27
+
28
+
29
+
30
+ ## [3.0.69](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.67...@availity/exceptions-axios@3.0.69) (2022-02-22)
31
+
32
+ **Note:** Version bump only for package @availity/exceptions-axios
33
+
34
+
35
+
36
+
37
+
38
+ ## [3.0.68](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.67...@availity/exceptions-axios@3.0.68) (2022-01-19)
39
+
40
+ **Note:** Version bump only for package @availity/exceptions-axios
41
+
42
+
43
+
44
+
45
+
46
+ ## 3.0.67 (2021-12-21)
47
+
48
+ **Note:** Version bump only for package @availity/exceptions-axios
49
+
50
+
51
+
52
+
53
+
54
+ ## [3.0.66](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.65...@availity/exceptions-axios@3.0.66) (2021-10-29)
55
+
56
+ **Note:** Version bump only for package @availity/exceptions-axios
57
+
58
+
59
+
60
+
61
+
62
+ ## [3.0.65](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.64...@availity/exceptions-axios@3.0.65) (2021-10-22)
63
+
64
+ **Note:** Version bump only for package @availity/exceptions-axios
65
+
66
+
67
+
68
+
69
+
70
+ ## 3.0.64 (2021-10-20)
71
+
72
+ **Note:** Version bump only for package @availity/exceptions-axios
73
+
74
+
75
+
76
+
77
+
78
+ ## 3.0.63 (2021-10-19)
79
+
80
+ **Note:** Version bump only for package @availity/exceptions-axios
81
+
82
+
83
+
84
+
85
+
86
+ ## [3.0.62](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.61...@availity/exceptions-axios@3.0.62) (2021-09-30)
87
+
88
+ **Note:** Version bump only for package @availity/exceptions-axios
89
+
90
+
91
+
92
+
93
+
94
+ ## [3.0.61](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.60...@availity/exceptions-axios@3.0.61) (2021-09-28)
95
+
96
+ **Note:** Version bump only for package @availity/exceptions-axios
97
+
98
+
99
+
100
+
101
+
102
+ ## 3.0.60 (2021-09-16)
103
+
104
+ **Note:** Version bump only for package @availity/exceptions-axios
105
+
106
+
107
+
108
+
109
+
110
+ ## [3.0.59](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.58...@availity/exceptions-axios@3.0.59) (2021-05-25)
111
+
112
+ **Note:** Version bump only for package @availity/exceptions-axios
113
+
114
+
115
+
116
+
117
+
118
+ ## [3.0.58](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.57...@availity/exceptions-axios@3.0.58) (2021-05-20)
119
+
120
+ **Note:** Version bump only for package @availity/exceptions-axios
121
+
122
+
123
+
124
+
125
+
126
+ ## [3.0.57](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.56...@availity/exceptions-axios@3.0.57) (2021-05-17)
127
+
128
+ **Note:** Version bump only for package @availity/exceptions-axios
129
+
130
+
131
+
132
+
133
+
134
+ ## 3.0.56 (2021-04-01)
135
+
136
+ **Note:** Version bump only for package @availity/exceptions-axios
137
+
138
+
139
+
140
+
141
+
142
+ ## 3.0.55 (2020-12-16)
143
+
144
+ **Note:** Version bump only for package @availity/exceptions-axios
145
+
146
+
147
+
148
+
149
+
150
+ ## [3.0.54](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.53...@availity/exceptions-axios@3.0.54) (2020-08-24)
151
+
152
+ **Note:** Version bump only for package @availity/exceptions-axios
153
+
154
+
155
+
156
+
157
+
158
+ ## [3.0.53](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.52...@availity/exceptions-axios@3.0.53) (2020-07-08)
159
+
160
+ **Note:** Version bump only for package @availity/exceptions-axios
161
+
162
+
163
+
164
+
165
+
166
+ ## [3.0.52](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.51...@availity/exceptions-axios@3.0.52) (2020-06-22)
167
+
168
+ **Note:** Version bump only for package @availity/exceptions-axios
169
+
170
+
171
+
172
+
173
+
174
+ ## [3.0.51](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.50...@availity/exceptions-axios@3.0.51) (2020-06-15)
175
+
176
+ **Note:** Version bump only for package @availity/exceptions-axios
177
+
178
+
179
+
180
+
181
+
182
+ ## [3.0.50](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.49...@availity/exceptions-axios@3.0.50) (2020-06-08)
183
+
184
+ **Note:** Version bump only for package @availity/exceptions-axios
185
+
186
+
187
+
188
+
189
+
190
+ ## [3.0.49](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.48...@availity/exceptions-axios@3.0.49) (2020-06-04)
191
+
192
+ **Note:** Version bump only for package @availity/exceptions-axios
193
+
194
+
195
+
196
+
197
+
198
+ ## [3.0.48](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.47...@availity/exceptions-axios@3.0.48) (2020-06-04)
199
+
200
+ **Note:** Version bump only for package @availity/exceptions-axios
201
+
202
+
203
+
204
+
205
+
206
+ ## 3.0.47 (2020-06-04)
207
+
208
+ **Note:** Version bump only for package @availity/exceptions-axios
209
+
210
+
211
+
212
+
213
+
214
+ ## 3.0.46 (2020-06-03)
215
+
216
+ **Note:** Version bump only for package @availity/exceptions-axios
217
+
218
+
219
+
2
220
 
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
221
 
6
222
  ## [3.0.45](https://github.com/Availity/sdk-js/compare/@availity/exceptions-axios@3.0.44...@availity/exceptions-axios@3.0.45) (2020-05-11)
7
223
 
package/README.md CHANGED
@@ -1,8 +1,10 @@
1
- # Axios Exceptions
1
+ # @availity/exceptions-axios
2
2
 
3
3
  > A package wrapping the Exceptions class to use axios. Using avLogMessagesApi to log errors.
4
4
 
5
5
  [![Version](https://img.shields.io/npm/v/@availity/exceptions-axios.svg?style=for-the-badge)](https://www.npmjs.com/package/@availity/exceptions-axios)
6
+ [![NPM Downloads](https://img.shields.io/npm/dt/@availity/exceptions-axios.svg?style=for-the-badge)](https://www.npmjs.com/package/@availity/exceptions-axios)
7
+ [![Dependecy Status](https://img.shields.io/librariesio/release/npm/@availity/exceptions-axios?style=for-the-badge)](https://github.com/Availity/sdk-js/blob/master/packages/exceptions-axios/package.json)
6
8
 
7
9
  More details about configuration can be found in [Exceptions-Core](../exceptions-core)
8
10
 
@@ -11,22 +13,24 @@ More details about configuration can be found in [Exceptions-Core](../exceptions
11
13
  ### NPM
12
14
 
13
15
  ```bash
14
- $ npm install @availity/exceptions-axios
16
+ npm install @availity/exceptions-axios
15
17
  ```
16
18
 
17
19
  ### Yarn
18
20
 
19
21
  ```bash
20
- $ yarn add @availity/exceptions-axios
22
+ yarn add @availity/exceptions-axios
21
23
  ```
22
24
 
23
- add module to your app.
25
+ ## Usage
26
+
27
+ Add module to your app.
24
28
 
25
29
  ```js
26
30
  import avExceptionsAxios from '@availity/exceptions-axios';
27
31
  ```
28
32
 
29
- To configure the default Options
33
+ Configure the default options
30
34
 
31
35
  ```js
32
36
  import avExceptionsAxios from '@availity/exceptions-axios';
@@ -34,7 +38,6 @@ import avExceptionsAxios from '@availity/exceptions-axios';
34
38
  avExceptionsAxios.enabled(false); // enabled defaults to true... this example would disable it
35
39
  avExceptionsAxios.appId('exampleApp'); // if undefined, logs 'N/A'
36
40
  avExceptionsAxios.repeatTime(5000); // sets the time in ms between logging calls for the same error message. (default 5 seconds)
37
- });
38
41
  ```
39
42
 
40
43
  It will automatically catch all error which bubble up to the window (error which are not caught and handled in code) and log those errors. So as long as you are not catching your error you should be able to throw and error to log it.
@@ -43,9 +46,8 @@ It will automatically catch all error which bubble up to the window (error which
43
46
  // this import doesn't need to be on every file, just needs to be imported once somewhere like the main index.js or App.js
44
47
  import avExceptionsAxios from '@availity/exceptions-axios';
45
48
 
46
- //... somewhere when something happened
49
+ // ... somewhere when something happened
47
50
  throw new Error('As long as this error is not caught it will be logged');
48
- });
49
51
  ```
50
52
 
51
53
  Or you can manually log and error in the case where something is catching and handling errors before they bubble to the window:
@@ -53,11 +55,6 @@ Or you can manually log and error in the case where something is catching and ha
53
55
  ```js
54
56
  import avExceptionsAxios from '@availity/exceptions-axios';
55
57
 
56
- //... somewhere when something happened
58
+ // ... somewhere when something happened
57
59
  avExceptionsAxios.submitError(new Error('Manually logging this error'));
58
- });
59
60
  ```
60
-
61
- ## License
62
-
63
- [MIT](../../LICENSE)
@@ -0,0 +1,5 @@
1
+ import AvExceptionsCore from '@availity/exceptions-core';
2
+
3
+ declare const avExceptionsAxios: AvExceptionsCore;
4
+
5
+ export { avExceptionsAxios as default };
package/dist/index.js ADDED
@@ -0,0 +1,33 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
+
22
+ // src/index.js
23
+ var src_exports = {};
24
+ __export(src_exports, {
25
+ default: () => src_default
26
+ });
27
+ module.exports = __toCommonJS(src_exports);
28
+ var import_api_axios = require("@availity/api-axios");
29
+ var import_exceptions_core = __toESM(require("@availity/exceptions-core"));
30
+ var avExceptionsAxios = new import_exceptions_core.default(import_api_axios.avLogMessagesApi.error);
31
+ var src_default = avExceptionsAxios;
32
+ // Annotate the CommonJS export names for ESM import in node:
33
+ 0 && (module.exports = {});
package/dist/index.mjs ADDED
@@ -0,0 +1,8 @@
1
+ // src/index.js
2
+ import { avLogMessagesApi } from "@availity/api-axios";
3
+ import AvExceptionsCore from "@availity/exceptions-core";
4
+ var avExceptionsAxios = new AvExceptionsCore(avLogMessagesApi.error);
5
+ var src_default = avExceptionsAxios;
6
+ export {
7
+ src_default as default
8
+ };
package/jest.config.js ADDED
@@ -0,0 +1,7 @@
1
+ const global = require('../../jest.config');
2
+
3
+ module.exports = {
4
+ ...global,
5
+ displayName: 'exceptions-axios',
6
+ coverageDirectory: '../../coverage/exceptions-axios',
7
+ };
package/package.json CHANGED
@@ -1,21 +1,31 @@
1
1
  {
2
2
  "name": "@availity/exceptions-axios",
3
- "version": "4.0.0-alpha.9+f0d746e",
3
+ "version": "4.0.2",
4
4
  "description": "Availity class to log exceptions via axios",
5
- "main": "lib/index.js",
6
- "module": "src/index.js",
7
- "author": "Evan Sharp <evan.sharp@availity.com>",
8
5
  "license": "MIT",
9
- "peerDependencies": {
10
- "@availity/api-axios": "^4.0.0",
11
- "@availity/exceptions-core": "^2.6.1"
6
+ "author": "Evan Sharp <evan.sharp@availity.com>",
7
+ "browser": "./dist/index.js",
8
+ "main": "./dist/index.js",
9
+ "module": "./dist/index.mjs",
10
+ "types": "./dist/index.d.ts",
11
+ "scripts": {
12
+ "build": "tsup src/index.js --format esm,cjs --dts",
13
+ "dev": "tsup src/index.js --format esm,cjs --watch --dts",
14
+ "lint": "eslint src",
15
+ "lint:fix": "eslint src --fix",
16
+ "clean": "rm -rf node_modules && rm -rf dist",
17
+ "bundlesize": "bundlesize",
18
+ "publish": "yarn npm publish --tolerate-republish --access public"
19
+ },
20
+ "dependencies": {
21
+ "@availity/api-axios": "7.0.2",
22
+ "@availity/exceptions-core": "4.0.2"
12
23
  },
13
24
  "devDependencies": {
14
- "@availity/api-axios": "^6.0.0-alpha.9+f0d746e",
15
- "@availity/exceptions-core": "^3.0.19"
25
+ "tsup": "^5.12.8",
26
+ "typescript": "^4.6.4"
16
27
  },
17
28
  "publishConfig": {
18
29
  "access": "public"
19
- },
20
- "gitHead": "f0d746e72dc44112fc306105c9708767644c6372"
21
- }
30
+ }
31
+ }
package/project.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "root": "packages/exceptions-axios",
3
+ "projectType": "library",
4
+ "targets": {
5
+ "test": {
6
+ "executor": "@nrwl/jest:jest",
7
+ "outputs": ["coverage/exceptions-axios"],
8
+ "options": {
9
+ "jestConfig": "packages/exceptions-axios/jest.config.js",
10
+ "passWithNoTests": true
11
+ }
12
+ },
13
+ "version": {
14
+ "executor": "@jscutlery/semver:version",
15
+ "options": {
16
+ "preset": "angular",
17
+ "commitMessageFormat": "chore(${projectName}): release version ${version} [skip ci]",
18
+ "tagPrefix": "@availity/${projectName}@",
19
+ "baseBranch": "master"
20
+ }
21
+ },
22
+ "lint": {
23
+ "executor": "@nrwl/linter:eslint",
24
+ "options": {
25
+ "eslintConfig": ".eslintrc.yaml",
26
+ "lintFilePatterns": ["packages/exceptions-axios/**/*.{js,ts}"],
27
+ "silent": false,
28
+ "fix": false,
29
+ "cache": true,
30
+ "cacheLocation": "./node_modules/.cache/exceptions-axios/.eslintcache",
31
+ "maxWarnings": -1,
32
+ "quiet": false,
33
+ "noEslintrc": false,
34
+ "hasTypeAwareRules": true,
35
+ "cacheStrategy": "metadata"
36
+ }
37
+ }
38
+ }
39
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ import AvExceptionsCore from '@availity/exceptions-core';
2
+
3
+ declare const avExceptionsAxios: AvExceptionsCore;
4
+
5
+ export default avExceptionsAxios;
package/tsconfig.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "include": ["."],
4
+ "exclude": ["dist", "build", "node_modules"]
5
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../../dist/out-tsc",
5
+ "module": "commonjs",
6
+ "types": ["jest", "node"],
7
+ "allowJs": true
8
+ },
9
+ "include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
10
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2016-present Availity, LLC
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/lib/index.js DELETED
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = void 0;
9
-
10
- var _apiAxios = require("@availity/api-axios");
11
-
12
- var _exceptionsCore = _interopRequireDefault(require("@availity/exceptions-core"));
13
-
14
- var avExceptionsAxios = new _exceptionsCore["default"](_apiAxios.avLogMessagesApi.error);
15
- var _default = avExceptionsAxios;
16
- exports["default"] = _default;
@@ -1,13 +0,0 @@
1
- import AvExceptionsCore from '@availity/exceptions-core';
2
- import { avLogMessagesApi } from '@availity/api-axios';
3
- import avExceptionsAxios from '../src/index';
4
-
5
- describe('AvExceptionsAxios', () => {
6
- test('avExceptionsAxios be an instance of AvExceptionsCore', () => {
7
- expect(avExceptionsAxios).toBeInstanceOf(AvExceptionsCore);
8
- });
9
-
10
- test('avExceptionsAxios should be api-axios avLogMessagesApi error function', () => {
11
- expect(avExceptionsAxios.log).toBe(avLogMessagesApi.error);
12
- });
13
- });