From 09e1495c785e7af98c37ab909d7e5d4823169026 Mon Sep 17 00:00:00 2001 From: Emile Fugulin Date: Tue, 5 May 2020 20:35:29 -0400 Subject: [PATCH 1/4] Move eslint to dev dependencies --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2365097..9f628cb 100644 --- a/package.json +++ b/package.json @@ -30,11 +30,11 @@ }, "homepage": "https://github.com/logdna/logdna-winston#readme", "dependencies": { - "eslint": "^6.5.1", "logdna": "^3.5.0", "winston": "^3.2.1" }, "devDependencies": { - "babel-eslint": "^10.0.3" + "babel-eslint": "^10.0.3", + "eslint": "^6.5.1" } } From f5ced3fc5ca94462f8ec81b456953c3daa135eec Mon Sep 17 00:00:00 2001 From: Emile Fugulin Date: Tue, 5 May 2020 21:26:43 -0400 Subject: [PATCH 2/4] Add type definition --- index.d.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..a352d56 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,17 @@ +import { ConstructorOptions } from "logdna" +import Transport from "winston-transport"; + +declare class LogDNATransport extends Transport { + constructor(options: LogDNATransport.TransportOptions); +} + +declare namespace LogDNATransport { + interface TransportOptions extends Transport.TransportStreamOptions, ConstructorOptions { + /** The LogDNA API key. */ + key: string; + /** The name of this transport. */ + name?: string; + } +} + +export = LogDNATransport; \ No newline at end of file From 9f890ac62744640a816181a16e1c8774fa226379 Mon Sep 17 00:00:00 2001 From: Emile Fugulin Date: Mon, 25 May 2020 17:28:40 -0400 Subject: [PATCH 3/4] Run Prettier --- index.d.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index a352d56..ddefb72 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1,4 @@ -import { ConstructorOptions } from "logdna" +import { ConstructorOptions } from "logdna"; import Transport from "winston-transport"; declare class LogDNATransport extends Transport { @@ -6,7 +6,9 @@ declare class LogDNATransport extends Transport { } declare namespace LogDNATransport { - interface TransportOptions extends Transport.TransportStreamOptions, ConstructorOptions { + interface TransportOptions + extends Transport.TransportStreamOptions, + ConstructorOptions { /** The LogDNA API key. */ key: string; /** The name of this transport. */ @@ -14,4 +16,4 @@ declare namespace LogDNATransport { } } -export = LogDNATransport; \ No newline at end of file +export = LogDNATransport; From a7b47dbc61fcf442670a0a31208178ccc7031433 Mon Sep 17 00:00:00 2001 From: Emile Fugulin Date: Sat, 6 Jun 2020 19:32:27 -0400 Subject: [PATCH 4/4] Add properties that differ from the parent classes --- index.d.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index ddefb72..e523385 100644 --- a/index.d.ts +++ b/index.d.ts @@ -11,8 +11,15 @@ declare namespace LogDNATransport { ConstructorOptions { /** The LogDNA API key. */ key: string; - /** The name of this transport. */ + /** The name of this transport (default: "LogDNA"). */ name?: string; + /** Level of messages that this transport should log (default: "debug"). */ + level?: string; + /** + * Allow meta objects to be passed with each line (default: false). + * See logger ConstructorOptions for more information. + */ + index_meta?: boolean; } }