@alanszp/axios-node 2.1.7
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/.gitignore +3 -0
- package/.npmignore +3 -0
- package/LICENSE +21 -0
- package/dist/axios.d.ts +6 -0
- package/dist/axios.js +45 -0
- package/dist/axios.js.map +1 -0
- package/dist/errors/GenericError.d.ts +4 -0
- package/dist/errors/GenericError.js +11 -0
- package/dist/errors/GenericError.js.map +1 -0
- package/dist/errors/NetworkRequestError.d.ts +7 -0
- package/dist/errors/NetworkRequestError.js +12 -0
- package/dist/errors/NetworkRequestError.js.map +1 -0
- package/dist/errors/Non200ResponseError.d.ts +8 -0
- package/dist/errors/Non200ResponseError.js +13 -0
- package/dist/errors/Non200ResponseError.js.map +1 -0
- package/dist/errors/RequestError.d.ts +5 -0
- package/dist/errors/RequestError.js +12 -0
- package/dist/errors/RequestError.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/package.json +25 -0
- package/src/axios.ts +56 -0
- package/src/errors/GenericError.ts +8 -0
- package/src/errors/NetworkRequestError.ts +12 -0
- package/src/errors/Non200ResponseError.ts +14 -0
- package/src/errors/RequestError.ts +11 -0
- package/src/index.ts +5 -0
- package/tsconfig.json +15 -0
package/.gitignore
ADDED
package/.npmignore
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Alan Szpigiel
|
|
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/dist/axios.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { RequestSharedContext } from "@alanszp/express";
|
|
3
|
+
import { AsyncLocalStorage } from "async_hooks";
|
|
4
|
+
export declare const isAxiosError: any;
|
|
5
|
+
export declare function createAxios(): import("axios").AxiosInstance;
|
|
6
|
+
export declare function createAxiosWithTrace(requestSharedContext: AsyncLocalStorage<RequestSharedContext>): import("axios").AxiosInstance;
|
package/dist/axios.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createAxiosWithTrace = exports.createAxios = exports.isAxiosError = void 0;
|
|
7
|
+
const axios_1 = __importDefault(require("axios"));
|
|
8
|
+
const NetworkRequestError_1 = require("./errors/NetworkRequestError");
|
|
9
|
+
const Non200ResponseError_1 = require("./errors/Non200ResponseError");
|
|
10
|
+
const GenericError_1 = require("./errors/GenericError");
|
|
11
|
+
exports.isAxiosError = axios_1.default.isAxiosError.bind(axios_1.default);
|
|
12
|
+
function mapAxiosErrorToRequestError(error) {
|
|
13
|
+
if (error.response) {
|
|
14
|
+
return Promise.reject(new Non200ResponseError_1.Non200ResponseError(error));
|
|
15
|
+
}
|
|
16
|
+
if (error.request) {
|
|
17
|
+
return Promise.reject(new NetworkRequestError_1.NetworkRequestError(error));
|
|
18
|
+
}
|
|
19
|
+
Promise.reject(new GenericError_1.GenericError(error));
|
|
20
|
+
}
|
|
21
|
+
function id(a) {
|
|
22
|
+
return a;
|
|
23
|
+
}
|
|
24
|
+
function createAxios() {
|
|
25
|
+
const axios = axios_1.default.create();
|
|
26
|
+
axios.interceptors.request.use(id, mapAxiosErrorToRequestError);
|
|
27
|
+
axios.interceptors.response.use(id, mapAxiosErrorToRequestError);
|
|
28
|
+
return axios;
|
|
29
|
+
}
|
|
30
|
+
exports.createAxios = createAxios;
|
|
31
|
+
function createAxiosWithTrace(requestSharedContext) {
|
|
32
|
+
const axios = axios_1.default.create();
|
|
33
|
+
axios.interceptors.request.use((config) => {
|
|
34
|
+
const context = requestSharedContext.getStore();
|
|
35
|
+
if (!context)
|
|
36
|
+
return config;
|
|
37
|
+
return Object.assign(Object.assign({}, config), {
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
39
|
+
headers: Object.assign({ "x-lifecycle-id": context.lifecycleId, "x-lifecycle-chain": context.lifecycleChain }, config.headers) });
|
|
40
|
+
}, mapAxiosErrorToRequestError);
|
|
41
|
+
axios.interceptors.response.use(id, mapAxiosErrorToRequestError);
|
|
42
|
+
return axios;
|
|
43
|
+
}
|
|
44
|
+
exports.createAxiosWithTrace = createAxiosWithTrace;
|
|
45
|
+
//# sourceMappingURL=axios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axios.js","sourceRoot":"","sources":["../src/axios.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAgD;AAGhD,sEAAmE;AACnE,sEAAmE;AACnE,wDAAqD;AAExC,QAAA,YAAY,GAAG,eAAW,CAAC,YAAY,CAAC,IAAI,CAAC,eAAW,CAAC,CAAC;AAEvE,SAAS,2BAA2B,CAAI,KAAU;IAChD,IAAI,KAAK,CAAC,QAAQ,EAAE;QAClB,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,yCAAmB,CAAI,KAAsB,CAAC,CAAC,CAAC;KAC3E;IAED,IAAI,KAAK,CAAC,OAAO,EAAE;QACjB,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,yCAAmB,CAAC,KAAsB,CAAC,CAAC,CAAC;KACxE;IAED,OAAO,CAAC,MAAM,CAAC,IAAI,2BAAY,CAAC,KAAK,CAAC,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,EAAE,CAAI,CAAI;IACjB,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAgB,WAAW;IACzB,MAAM,KAAK,GAAG,eAAW,CAAC,MAAM,EAAE,CAAC;IACnC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,2BAA2B,CAAC,CAAC;IAChE,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,2BAA2B,CAAC,CAAC;IACjE,OAAO,KAAK,CAAC;AACf,CAAC;AALD,kCAKC;AAED,SAAgB,oBAAoB,CAClC,oBAA6D;IAE7D,MAAM,KAAK,GAAG,eAAW,CAAC,MAAM,EAAE,CAAC;IAEnC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QACxC,MAAM,OAAO,GAAG,oBAAoB,CAAC,QAAQ,EAAE,CAAC;QAChD,IAAI,CAAC,OAAO;YAAE,OAAO,MAAM,CAAC;QAE5B,uCACK,MAAM;YACT,mEAAmE;YACnE,OAAO,kBACL,gBAAgB,EAAE,OAAO,CAAC,WAAW,EACrC,mBAAmB,EAAE,OAAO,CAAC,cAAc,IACxC,MAAM,CAAC,OAAO,KAEnB;IACJ,CAAC,EAAE,2BAA2B,CAAC,CAAC;IAEhC,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,2BAA2B,CAAC,CAAC;IAEjE,OAAO,KAAK,CAAC;AACf,CAAC;AAvBD,oDAuBC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GenericError = void 0;
|
|
4
|
+
const RequestError_1 = require("./RequestError");
|
|
5
|
+
class GenericError extends RequestError_1.RequestError {
|
|
6
|
+
constructor(error) {
|
|
7
|
+
super("Generic Error", error);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.GenericError = GenericError;
|
|
11
|
+
//# sourceMappingURL=GenericError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenericError.js","sourceRoot":"","sources":["../../src/errors/GenericError.ts"],"names":[],"mappings":";;;AACA,iDAA8C;AAE9C,MAAa,YAAa,SAAQ,2BAAY;IAC5C,YAAY,KAAY;QACtB,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IAChC,CAAC;CACF;AAJD,oCAIC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NetworkRequestError = void 0;
|
|
4
|
+
const RequestError_1 = require("./RequestError");
|
|
5
|
+
class NetworkRequestError extends RequestError_1.RequestError {
|
|
6
|
+
constructor(error) {
|
|
7
|
+
super("Network Error", error);
|
|
8
|
+
this.request = error.request;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.NetworkRequestError = NetworkRequestError;
|
|
12
|
+
//# sourceMappingURL=NetworkRequestError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworkRequestError.js","sourceRoot":"","sources":["../../src/errors/NetworkRequestError.ts"],"names":[],"mappings":";;;AACA,iDAA8C;AAE9C,MAAa,mBAAuB,SAAQ,2BAAY;IAItD,YAAY,KAAoB;QAC9B,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAC/B,CAAC;CACF;AARD,kDAQC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AxiosError, AxiosResponse } from "axios";
|
|
2
|
+
import { RequestError } from "./RequestError";
|
|
3
|
+
export declare class Non200ResponseError<T> extends RequestError {
|
|
4
|
+
error: AxiosError<T>;
|
|
5
|
+
request: any;
|
|
6
|
+
response: AxiosResponse<T>;
|
|
7
|
+
constructor(error: AxiosError<T>);
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Non200ResponseError = void 0;
|
|
4
|
+
const RequestError_1 = require("./RequestError");
|
|
5
|
+
class Non200ResponseError extends RequestError_1.RequestError {
|
|
6
|
+
constructor(error) {
|
|
7
|
+
super("Non 200 Response Error", error);
|
|
8
|
+
this.request = error.request;
|
|
9
|
+
this.request = error.response;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.Non200ResponseError = Non200ResponseError;
|
|
13
|
+
//# sourceMappingURL=Non200ResponseError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Non200ResponseError.js","sourceRoot":"","sources":["../../src/errors/Non200ResponseError.ts"],"names":[],"mappings":";;;AACA,iDAA8C;AAE9C,MAAa,mBAAuB,SAAQ,2BAAY;IAKtD,YAAY,KAAoB;QAC9B,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;QACvC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC;IAChC,CAAC;CACF;AAVD,kDAUC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RequestError = void 0;
|
|
4
|
+
const errors_1 = require("@alanszp/errors");
|
|
5
|
+
class RequestError extends errors_1.BaseError {
|
|
6
|
+
constructor(message, error) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.error = error;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.RequestError = RequestError;
|
|
12
|
+
//# sourceMappingURL=RequestError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestError.js","sourceRoot":"","sources":["../../src/errors/RequestError.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAG5C,MAAsB,YAAa,SAAQ,kBAAS;IAGlD,YAAY,OAAe,EAAE,KAAY;QACvC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AAPD,oCAOC"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./axios"), exports);
|
|
14
|
+
__exportStar(require("./errors/GenericError"), exports);
|
|
15
|
+
__exportStar(require("./errors/NetworkRequestError"), exports);
|
|
16
|
+
__exportStar(require("./errors/Non200ResponseError"), exports);
|
|
17
|
+
__exportStar(require("./errors/RequestError"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAAwB;AACxB,wDAAsC;AACtC,+DAA6C;AAC7C,+DAA6C;AAC7C,wDAAsC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@alanszp/axios-node",
|
|
3
|
+
"version": "2.1.7",
|
|
4
|
+
"description": "Alan's axios wrapper with base interceptor.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"typings": "dist/index.d.ts",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"files": [
|
|
9
|
+
"**/*"
|
|
10
|
+
],
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"compile": "rm -rf ./dist && tsc --declaration",
|
|
16
|
+
"compile-watch": "tsc -w",
|
|
17
|
+
"build": "yarn run compile",
|
|
18
|
+
"prepack": "yarn run build"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@alanszp/errors": "^2.0.0",
|
|
22
|
+
"@alanszp/express": "^2.1.7"
|
|
23
|
+
},
|
|
24
|
+
"gitHead": "c6720dba2344585e90f988e99716dbcecfa7f43c"
|
|
25
|
+
}
|
package/src/axios.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import AxiosGlobal, { AxiosError } from "axios";
|
|
2
|
+
import { RequestSharedContext } from "@alanszp/express";
|
|
3
|
+
import { AsyncLocalStorage } from "async_hooks";
|
|
4
|
+
import { NetworkRequestError } from "./errors/NetworkRequestError";
|
|
5
|
+
import { Non200ResponseError } from "./errors/Non200ResponseError";
|
|
6
|
+
import { GenericError } from "./errors/GenericError";
|
|
7
|
+
|
|
8
|
+
export const isAxiosError = AxiosGlobal.isAxiosError.bind(AxiosGlobal);
|
|
9
|
+
|
|
10
|
+
function mapAxiosErrorToRequestError<T>(error: any) {
|
|
11
|
+
if (error.response) {
|
|
12
|
+
return Promise.reject(new Non200ResponseError<T>(error as AxiosError<T>));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (error.request) {
|
|
16
|
+
return Promise.reject(new NetworkRequestError(error as AxiosError<T>));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
Promise.reject(new GenericError(error));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function id<T>(a: T): T {
|
|
23
|
+
return a;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function createAxios() {
|
|
27
|
+
const axios = AxiosGlobal.create();
|
|
28
|
+
axios.interceptors.request.use(id, mapAxiosErrorToRequestError);
|
|
29
|
+
axios.interceptors.response.use(id, mapAxiosErrorToRequestError);
|
|
30
|
+
return axios;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function createAxiosWithTrace(
|
|
34
|
+
requestSharedContext: AsyncLocalStorage<RequestSharedContext>
|
|
35
|
+
) {
|
|
36
|
+
const axios = AxiosGlobal.create();
|
|
37
|
+
|
|
38
|
+
axios.interceptors.request.use((config) => {
|
|
39
|
+
const context = requestSharedContext.getStore();
|
|
40
|
+
if (!context) return config;
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
...config,
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
45
|
+
headers: {
|
|
46
|
+
"x-lifecycle-id": context.lifecycleId,
|
|
47
|
+
"x-lifecycle-chain": context.lifecycleChain,
|
|
48
|
+
...config.headers,
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
}, mapAxiosErrorToRequestError);
|
|
52
|
+
|
|
53
|
+
axios.interceptors.response.use(id, mapAxiosErrorToRequestError);
|
|
54
|
+
|
|
55
|
+
return axios;
|
|
56
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AxiosError } from "axios";
|
|
2
|
+
import { RequestError } from "./RequestError";
|
|
3
|
+
|
|
4
|
+
export class NetworkRequestError<T> extends RequestError {
|
|
5
|
+
public error: AxiosError<T>;
|
|
6
|
+
public request: any;
|
|
7
|
+
|
|
8
|
+
constructor(error: AxiosError<T>) {
|
|
9
|
+
super("Network Error", error);
|
|
10
|
+
this.request = error.request;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AxiosError, AxiosResponse, AxiosRequestConfig } from "axios";
|
|
2
|
+
import { RequestError } from "./RequestError";
|
|
3
|
+
|
|
4
|
+
export class Non200ResponseError<T> extends RequestError {
|
|
5
|
+
public error: AxiosError<T>;
|
|
6
|
+
public request: any;
|
|
7
|
+
public response: AxiosResponse<T>;
|
|
8
|
+
|
|
9
|
+
constructor(error: AxiosError<T>) {
|
|
10
|
+
super("Non 200 Response Error", error);
|
|
11
|
+
this.request = error.request;
|
|
12
|
+
this.request = error.response;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseError } from "@alanszp/errors";
|
|
2
|
+
import { AxiosError } from "axios";
|
|
3
|
+
|
|
4
|
+
export abstract class RequestError extends BaseError {
|
|
5
|
+
public error: Error;
|
|
6
|
+
|
|
7
|
+
constructor(message: string, error: Error) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.error = error;
|
|
10
|
+
}
|
|
11
|
+
}
|
package/src/index.ts
ADDED
package/tsconfig.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"rootDir": "src",
|
|
4
|
+
"outDir": "dist",
|
|
5
|
+
"module": "commonjs",
|
|
6
|
+
"target": "es6",
|
|
7
|
+
"types": ["node"],
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
|
|
11
|
+
"alwaysStrict": true,
|
|
12
|
+
"strictNullChecks": true
|
|
13
|
+
},
|
|
14
|
+
"exclude": ["node_modules"]
|
|
15
|
+
}
|