From fe67d04646eae07e9b38402625231a876fed0599 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Thu, 29 Feb 2024 14:02:48 +0000 Subject: [PATCH 1/9] chore: website [skip ci] --- README.md | 7 +++++-- website/index.html | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e1ad049a..358c2fcb 100644 --- a/README.md +++ b/README.md @@ -415,6 +415,7 @@ Support this project by becoming a sponsor. Your logo will show up here with a l OnlineCasinosSpelen Beoordelen van nieuwe online casino's 2023 CasinoZonderRegistratie.net - Nederlandse Top Casino's +Onlinecasinoprofy is your guide to the world of gambling. OSLabs is a nonprofit tech accelerator devoted to furthering high-impact open source software within a collaborative community of dedicated engineers and mentors Ilmaiset Pitkävetovihjeet NyeCasino.me is a website that lists the newest and best online casinos in Norway @@ -439,7 +440,7 @@ Support this project by becoming a sponsor. Your logo will show up here with a l Helping Swedes finding safe unlicensed casinos free spins no deposit I migliori casinò online dagli esperti di SitiCasinoNonAAMS -Best Australian Online Casinos in 2024 +aussiecasinoreviewer.com MEGAFAMOUS.com PopularityBazaar helps you quickly grow your social media accounts. Buy 100% real likes, followers, views, comments, and more to kickstart your online presence. Non-GamStop NonStop Casino @@ -452,7 +453,9 @@ Support this project by becoming a sponsor. Your logo will show up here with a l Analysis of payment methods for use in the iGaming 30 Best Casinos Not on Gamstop in 2024 -Twitter Video Downloader HD Tool allows you to store tweets on your device (mobile or PC) for free. +Twitter Video Downloader HD Tool allows you to store tweets on your device (mobile or PC) for free. +The best online Casinos websites. No deposit bonus codes, Free Spins and Promo Codes. Stake, Roobet, Jackpotcity and more. +Online casino. Please note that links to the sponsors above are not direct endorsements nor affiliated with any of contributors of the nodemon project. diff --git a/website/index.html b/website/index.html index a22a11ac..f15641f1 100644 --- a/website/index.html +++ b/website/index.html @@ -108,6 +108,7 @@

Features

OnlineCasinosSpelen Beoordelen van nieuwe online casino's 2023 CasinoZonderRegistratie.net - Nederlandse Top Casino's +Onlinecasinoprofy is your guide to the world of gambling. OSLabs is a nonprofit tech accelerator devoted to furthering high-impact open source software within a collaborative community of dedicated engineers and mentors Ilmaiset Pitkävetovihjeet NyeCasino.me is a website that lists the newest and best online casinos in Norway @@ -132,7 +133,7 @@

Features

Helping Swedes finding safe unlicensed casinos free spins no deposit I migliori casinò online dagli esperti di SitiCasinoNonAAMS -Best Australian Online Casinos in 2024 +aussiecasinoreviewer.com MEGAFAMOUS.com PopularityBazaar helps you quickly grow your social media accounts. Buy 100% real likes, followers, views, comments, and more to kickstart your online presence. Non-GamStop NonStop Casino @@ -145,7 +146,9 @@

Features

Analysis of payment methods for use in the iGaming 30 Best Casinos Not on Gamstop in 2024 -Twitter Video Downloader HD Tool allows you to store tweets on your device (mobile or PC) for free. +Twitter Video Downloader HD Tool allows you to store tweets on your device (mobile or PC) for free. +The best online Casinos websites. No deposit bonus codes, Free Spins and Promo Codes. Stake, Roobet, Jackpotcity and more. +Online casino.

Please note that links to the sponsors above are not direct endorsements nor affiliated with any of contributors of the nodemon project.

From 2835883de5640a09fa405619dcc74414f8898850 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 1 Mar 2024 10:02:18 +0000 Subject: [PATCH 2/9] chore: website [skip ci] --- README.md | 2 +- website/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 358c2fcb..ed430859 100644 --- a/README.md +++ b/README.md @@ -454,7 +454,7 @@ Support this project by becoming a sponsor. Your logo will show up here with a l Analysis of payment methods for use in the iGaming 30 Best Casinos Not on Gamstop in 2024 Twitter Video Downloader HD Tool allows you to store tweets on your device (mobile or PC) for free. -The best online Casinos websites. No deposit bonus codes, Free Spins and Promo Codes. Stake, Roobet, Jackpotcity and more. +No deposit casino promo Codes 2024 - The best online Casinos websites. No deposit bonus codes, Free Spins and Promo Codes. Stake, Roobet, Jackpotcity and more. Online casino. diff --git a/website/index.html b/website/index.html index f15641f1..351cfb1a 100644 --- a/website/index.html +++ b/website/index.html @@ -147,7 +147,7 @@

Features

Analysis of payment methods for use in the iGaming 30 Best Casinos Not on Gamstop in 2024 Twitter Video Downloader HD Tool allows you to store tweets on your device (mobile or PC) for free. -The best online Casinos websites. No deposit bonus codes, Free Spins and Promo Codes. Stake, Roobet, Jackpotcity and more. +No deposit casino promo Codes 2024 - The best online Casinos websites. No deposit bonus codes, Free Spins and Promo Codes. Stake, Roobet, Jackpotcity and more. Online casino.

Please note that links to the sponsors above are not direct endorsements nor affiliated with any of From 332f9570bfa07378827c88470dc8af60dc1d3576 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Wed, 13 Mar 2024 17:16:36 +0000 Subject: [PATCH 3/9] chore: website [skip ci] --- README.md | 6 +++--- website/index.html | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ed430859..77ab2e48 100644 --- a/README.md +++ b/README.md @@ -409,7 +409,6 @@ Support this project by becoming a sponsor. Your logo will show up here with a l BestUSCasinos TightPoker Buy Instagram Likes -Find the best casinos online. Casinot.biz lists and reviews online casinos. btcgaming Norway's biggest and most reliable online casino portal OnlineCasinosSpelen @@ -418,7 +417,6 @@ Support this project by becoming a sponsor. Your logo will show up here with a l Onlinecasinoprofy is your guide to the world of gambling. OSLabs is a nonprofit tech accelerator devoted to furthering high-impact open source software within a collaborative community of dedicated engineers and mentors Ilmaiset Pitkävetovihjeet -NyeCasino.me is a website that lists the newest and best online casinos in Norway Famoid is a digital marketing agency that specializes in social media services and tools. LookSlots Gives a fun for our users @@ -455,7 +453,9 @@ Support this project by becoming a sponsor. Your logo will show up here with a l 30 Best Casinos Not on Gamstop in 2024 Twitter Video Downloader HD Tool allows you to store tweets on your device (mobile or PC) for free. No deposit casino promo Codes 2024 - The best online Casinos websites. No deposit bonus codes, Free Spins and Promo Codes. Stake, Roobet, Jackpotcity and more. -Online casino. +Online casino. +Listing no deposit bonus offers from various internet sites . +Marketing research website. Please note that links to the sponsors above are not direct endorsements nor affiliated with any of contributors of the nodemon project. diff --git a/website/index.html b/website/index.html index 351cfb1a..145e609e 100644 --- a/website/index.html +++ b/website/index.html @@ -102,7 +102,6 @@

Features

BestUSCasinos TightPoker Buy Instagram Likes -Find the best casinos online. Casinot.biz lists and reviews online casinos. btcgaming Norway's biggest and most reliable online casino portal OnlineCasinosSpelen @@ -111,7 +110,6 @@

Features

Onlinecasinoprofy is your guide to the world of gambling. OSLabs is a nonprofit tech accelerator devoted to furthering high-impact open source software within a collaborative community of dedicated engineers and mentors Ilmaiset Pitkävetovihjeet -NyeCasino.me is a website that lists the newest and best online casinos in Norway Famoid is a digital marketing agency that specializes in social media services and tools. LookSlots Gives a fun for our users @@ -148,7 +146,9 @@

Features

30 Best Casinos Not on Gamstop in 2024 Twitter Video Downloader HD Tool allows you to store tweets on your device (mobile or PC) for free. No deposit casino promo Codes 2024 - The best online Casinos websites. No deposit bonus codes, Free Spins and Promo Codes. Stake, Roobet, Jackpotcity and more. -Online casino. +Online casino. +Listing no deposit bonus offers from various internet sites . +Marketing research website.

Please note that links to the sponsors above are not direct endorsements nor affiliated with any of contributors of the nodemon project.

From f8e3b8cc95872aeacd1eea52adf2512c12a461c7 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Mon, 18 Mar 2024 14:06:12 +0000 Subject: [PATCH 4/9] chore: website [skip ci] --- README.md | 4 ++-- website/index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 77ab2e48..b2019e69 100644 --- a/README.md +++ b/README.md @@ -448,14 +448,14 @@ Support this project by becoming a sponsor. Your logo will show up here with a l Buy real Instagram followers from Stormlikes starting at only $2.97. Stormlikes has been voted the best site to buy followers from the likes of US Magazine. UpGrow is the Best Instagram Growth Service in 2024. Get more real Instagram followers with our AI-powered growth engine to get 10x faster results. Reviewing companies in high-risk industries like online casinos, forex brokers and crypto exchanges - Analysis of payment methods for use in the iGaming 30 Best Casinos Not on Gamstop in 2024 Twitter Video Downloader HD Tool allows you to store tweets on your device (mobile or PC) for free. No deposit casino promo Codes 2024 - The best online Casinos websites. No deposit bonus codes, Free Spins and Promo Codes. Stake, Roobet, Jackpotcity and more. Online casino. Listing no deposit bonus offers from various internet sites . -Marketing research website. +Marketing research website. +Quantum AI Please note that links to the sponsors above are not direct endorsements nor affiliated with any of contributors of the nodemon project. diff --git a/website/index.html b/website/index.html index 145e609e..ed12f5b5 100644 --- a/website/index.html +++ b/website/index.html @@ -141,14 +141,14 @@

Features

Buy real Instagram followers from Stormlikes starting at only $2.97. Stormlikes has been voted the best site to buy followers from the likes of US Magazine. UpGrow is the Best Instagram Growth Service in 2024. Get more real Instagram followers with our AI-powered growth engine to get 10x faster results. Reviewing companies in high-risk industries like online casinos, forex brokers and crypto exchanges - Analysis of payment methods for use in the iGaming 30 Best Casinos Not on Gamstop in 2024 Twitter Video Downloader HD Tool allows you to store tweets on your device (mobile or PC) for free. No deposit casino promo Codes 2024 - The best online Casinos websites. No deposit bonus codes, Free Spins and Promo Codes. Stake, Roobet, Jackpotcity and more. Online casino. Listing no deposit bonus offers from various internet sites . -Marketing research website. +Marketing research website. +Quantum AI

Please note that links to the sponsors above are not direct endorsements nor affiliated with any of contributors of the nodemon project.

From 0bfd65a1ea1729b2f44ed25c3c32790f541b91ae Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Tue, 26 Mar 2024 18:37:50 +0000 Subject: [PATCH 5/9] chore: website [skip ci] --- README.md | 5 +++-- website/index.html | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b2019e69..871416eb 100644 --- a/README.md +++ b/README.md @@ -450,12 +450,13 @@ Support this project by becoming a sponsor. Your logo will show up here with a l Reviewing companies in high-risk industries like online casinos, forex brokers and crypto exchanges Analysis of payment methods for use in the iGaming 30 Best Casinos Not on Gamstop in 2024 -Twitter Video Downloader HD Tool allows you to store tweets on your device (mobile or PC) for free. No deposit casino promo Codes 2024 - The best online Casinos websites. No deposit bonus codes, Free Spins and Promo Codes. Stake, Roobet, Jackpotcity and more. Online casino. Listing no deposit bonus offers from various internet sites . Marketing research website. -Quantum AI +Quantum AI +Fortune Tiger +Parimatch Please note that links to the sponsors above are not direct endorsements nor affiliated with any of contributors of the nodemon project. diff --git a/website/index.html b/website/index.html index ed12f5b5..c6b5ccc8 100644 --- a/website/index.html +++ b/website/index.html @@ -143,12 +143,13 @@

Features

Reviewing companies in high-risk industries like online casinos, forex brokers and crypto exchanges Analysis of payment methods for use in the iGaming 30 Best Casinos Not on Gamstop in 2024 -Twitter Video Downloader HD Tool allows you to store tweets on your device (mobile or PC) for free. No deposit casino promo Codes 2024 - The best online Casinos websites. No deposit bonus codes, Free Spins and Promo Codes. Stake, Roobet, Jackpotcity and more. Online casino. Listing no deposit bonus offers from various internet sites . Marketing research website. -Quantum AI +Quantum AI +Fortune Tiger +Parimatch

Please note that links to the sponsors above are not direct endorsements nor affiliated with any of contributors of the nodemon project.

From f35aa98cc8cbdbda98e0988ad9e7f14049c55ac1 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Sun, 14 Apr 2024 16:27:03 +0100 Subject: [PATCH 6/9] chore: website [skip ci] --- README.md | 7 ++++--- website/index.html | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 871416eb..8af999a6 100644 --- a/README.md +++ b/README.md @@ -376,7 +376,6 @@ Support this project by becoming a sponsor. Your logo will show up here with a l Casinoonlineaams.com Best Aussie casinos at aussielowdepositcasino.com Best online casinos not on GamStop in the UK -freebets.ltd.uk TheCasinoDB Marketing Rating of best betting sites in Australia @@ -419,7 +418,7 @@ Support this project by becoming a sponsor. Your logo will show up here with a l Ilmaiset Pitkävetovihjeet Famoid is a digital marketing agency that specializes in social media services and tools. LookSlots -Gives a fun for our users +Gives a fun for our users We are the leading Nearshore Technology Solutions company. We architect and engineer scalable and high-performing software solutions. Buy real Instagram followers from Twicsy starting at only $2.97. Twicsy has been voted the best site to buy followers from the likes of US Magazine. SocialWick offers the best Instagram Followers in the market. If you are looking to boost your organic growth, buy Instagram followers from SocialWick @@ -456,7 +455,9 @@ Support this project by becoming a sponsor. Your logo will show up here with a l Marketing research website. Quantum AI Fortune Tiger -Parimatch +Parimatch +Supbot.com +ExpressFollowers Please note that links to the sponsors above are not direct endorsements nor affiliated with any of contributors of the nodemon project. diff --git a/website/index.html b/website/index.html index c6b5ccc8..d46de7d6 100644 --- a/website/index.html +++ b/website/index.html @@ -69,7 +69,6 @@

Features

Casinoonlineaams.com Best Aussie casinos at aussielowdepositcasino.com Best online casinos not on GamStop in the UK -freebets.ltd.uk TheCasinoDB Marketing Rating of best betting sites in Australia @@ -112,7 +111,7 @@

Features

Ilmaiset Pitkävetovihjeet Famoid is a digital marketing agency that specializes in social media services and tools. LookSlots -Gives a fun for our users +Gives a fun for our users We are the leading Nearshore Technology Solutions company. We architect and engineer scalable and high-performing software solutions. Buy real Instagram followers from Twicsy starting at only $2.97. Twicsy has been voted the best site to buy followers from the likes of US Magazine. SocialWick offers the best Instagram Followers in the market. If you are looking to boost your organic growth, buy Instagram followers from SocialWick @@ -149,7 +148,9 @@

Features

Marketing research website. Quantum AI Fortune Tiger -Parimatch +Parimatch +Supbot.com +ExpressFollowers

Please note that links to the sponsors above are not direct endorsements nor affiliated with any of contributors of the nodemon project.

From 502238c966bc0aa9f7f8899c3a52f751e7f38367 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 19 Apr 2024 09:45:16 +0100 Subject: [PATCH 7/9] chore: website [skip ci] --- README.md | 6 +++--- website/index.html | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8af999a6..3d0dcfb4 100644 --- a/README.md +++ b/README.md @@ -413,7 +413,7 @@ Support this project by becoming a sponsor. Your logo will show up here with a l OnlineCasinosSpelen Beoordelen van nieuwe online casino's 2023 CasinoZonderRegistratie.net - Nederlandse Top Casino's -Onlinecasinoprofy is your guide to the world of gambling. +OnlineCasinoProfy is your guide to the world of gambling. OSLabs is a nonprofit tech accelerator devoted to furthering high-impact open source software within a collaborative community of dedicated engineers and mentors Ilmaiset Pitkävetovihjeet Famoid is a digital marketing agency that specializes in social media services and tools. @@ -426,7 +426,6 @@ Support this project by becoming a sponsor. Your logo will show up here with a l https://bestnongamstopcasinos.net Aviators Online iGaming platform with reliable and trusted reviews. -$1 deposit casino Online Casinos Australia Looking to boost your YouTube channel? Buy YouTube subscribers with Views4You and watch your audience grow! casinosonlineaus @@ -457,7 +456,8 @@ Support this project by becoming a sponsor. Your logo will show up here with a l Fortune Tiger Parimatch Supbot.com -ExpressFollowers +ExpressFollowers +SidesMedia Please note that links to the sponsors above are not direct endorsements nor affiliated with any of contributors of the nodemon project. diff --git a/website/index.html b/website/index.html index d46de7d6..4b21fabe 100644 --- a/website/index.html +++ b/website/index.html @@ -106,7 +106,7 @@

Features

OnlineCasinosSpelen Beoordelen van nieuwe online casino's 2023 CasinoZonderRegistratie.net - Nederlandse Top Casino's -Onlinecasinoprofy is your guide to the world of gambling. +OnlineCasinoProfy is your guide to the world of gambling. OSLabs is a nonprofit tech accelerator devoted to furthering high-impact open source software within a collaborative community of dedicated engineers and mentors Ilmaiset Pitkävetovihjeet Famoid is a digital marketing agency that specializes in social media services and tools. @@ -119,7 +119,6 @@

Features

https://bestnongamstopcasinos.net Aviators Online iGaming platform with reliable and trusted reviews. -$1 deposit casino Online Casinos Australia Looking to boost your YouTube channel? Buy YouTube subscribers with Views4You and watch your audience grow! casinosonlineaus @@ -150,7 +149,8 @@

Features

Fortune Tiger Parimatch Supbot.com -ExpressFollowers +ExpressFollowers +SidesMedia

Please note that links to the sponsors above are not direct endorsements nor affiliated with any of contributors of the nodemon project.

From 1707f9243137319845245d1fb6608649dd11b184 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Wed, 24 Apr 2024 16:34:00 +0100 Subject: [PATCH 8/9] chore: website [skip ci] --- README.md | 5 ++--- website/index.html | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3d0dcfb4..0174d340 100644 --- a/README.md +++ b/README.md @@ -381,9 +381,7 @@ Support this project by becoming a sponsor. Your logo will show up here with a l Rating of best betting sites in Australia inkedin AU Internet Pokies -CasinoAus AU Online Casinos -Top Australian Gambling casino online stranieri Goread.io We are the most advanced casino guide! @@ -457,7 +455,8 @@ Support this project by becoming a sponsor. Your logo will show up here with a l Parimatch Supbot.com ExpressFollowers -SidesMedia +SidesMedia +BuitenlandseOnlineCasinos Please note that links to the sponsors above are not direct endorsements nor affiliated with any of contributors of the nodemon project. diff --git a/website/index.html b/website/index.html index 4b21fabe..c927cdbc 100644 --- a/website/index.html +++ b/website/index.html @@ -74,9 +74,7 @@

Features

Rating of best betting sites in Australia inkedin AU Internet Pokies -CasinoAus AU Online Casinos -Top Australian Gambling casino online stranieri Goread.io We are the most advanced casino guide! @@ -150,7 +148,8 @@

Features

Parimatch Supbot.com ExpressFollowers -SidesMedia +SidesMedia +BuitenlandseOnlineCasinos

Please note that links to the sponsors above are not direct endorsements nor affiliated with any of contributors of the nodemon project.

From cd27c0b50584e078a10338ef0c37282255f3f9ca Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Sat, 25 May 2024 10:48:53 +0100 Subject: [PATCH 9/9] fix: add types to help with required nodemon usage (#2204) --- .github/workflows/node.js.yml | 2 +- .github/workflows/release.yml | 2 +- index.d.ts | 126 ++++++++++++++++++++++++++++++++++ jsconfig.json | 7 ++ lib/nodemon.js | 4 ++ package.json | 1 + 6 files changed, 140 insertions(+), 2 deletions(-) create mode 100644 index.d.ts create mode 100644 jsconfig.json diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 7629d907..5af7f9e1 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x, 18.x] + node-version: [18.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 07706003..c2ac4d79 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: uses: actions/setup-node@v4 with: cache: npm - node-version: 16 + node-version: 18 - name: Install dependencies run: npm ci - name: Release diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 00000000..4b146e5d --- /dev/null +++ b/index.d.ts @@ -0,0 +1,126 @@ +type NodemonEventHandler = + | 'start' + | 'crash' + | 'exit' + | 'quit' + | 'restart' + | 'config:update' + | 'log' + | 'readable' + | 'stdout' + | 'stderr'; + +type NodemonEventListener = { + on(event: 'start' | 'crash' | 'readable', listener: () => void): Nodemon; + on(event: 'log', listener: (e: NodemonEventLog) => void): Nodemon; + on(event: 'stdout' | 'stderr', listener: (e: string) => void): Nodemon; + on(event: 'restart', listener: (e?: NodemonEventRestart) => void): Nodemon; + on(event: 'quit', listener: (e?: NodemonEventQuit) => void): Nodemon; + on(event: 'exit', listener: (e?: NodemonEventExit) => void): Nodemon; + on( + event: 'config:update', + listener: (e?: NodemonEventConfig) => void + ): Nodemon; +}; + +type Nodemon = { + (options?: NodemonSettings): Nodemon; + on(event: 'start' | 'crash', listener: () => void): Nodemon; + on(event: 'log', listener: (e: NodemonEventLog) => void): Nodemon; + on(event: 'restart', listener: (e?: NodemonEventRestart) => void): Nodemon; + on(event: 'quit', listener: (e?: NodemonEventQuit) => void): Nodemon; + on(event: 'exit', listener: (e?: NodemonEventExit) => void): Nodemon; + on( + event: 'config:update', + listener: (e?: NodemonEventConfig) => void + ): Nodemon; + + // this is repeated because VS Code doesn't autocomplete otherwise + addEventListener(event: 'start' | 'crash', listener: () => void): Nodemon; + addEventListener( + event: 'log', + listener: (e: NodemonEventLog) => void + ): Nodemon; + addEventListener( + event: 'restart', + listener: (e?: NodemonEventRestart) => void + ): Nodemon; + addEventListener( + event: 'quit', + listener: (e?: NodemonEventQuit) => void + ): Nodemon; + addEventListener( + event: 'exit', + listener: (e?: NodemonEventExit) => void + ): Nodemon; + addEventListener( + event: 'config:update', + listener: (e?: NodemonEventConfig) => void + ): Nodemon; + + once(event: 'start' | 'crash', listener: () => void): Nodemon; + once(event: 'log', listener: (e: NodemonEventLog) => void): Nodemon; + once(event: 'restart', listener: (e?: NodemonEventRestart) => void): Nodemon; + once(event: 'quit', listener: (e?: NodemonEventQuit) => void): Nodemon; + once(event: 'exit', listener: (e?: NodemonEventExit) => void): Nodemon; + once( + event: 'config:update', + listener: (e?: NodemonEventConfig) => void + ): Nodemon; + + removeAllListeners(event: NodemonEventHandler): Nodemon; + emit(type: NodemonEventHandler, event?: any): Nodemon; + reset(callback: Function): Nodemon; + restart(): Nodemon; + config: NodemonSettings; +}; + +type NodemonEventLog = { + /** + detail*: what you get with nodemon --verbose. + status: subprocess starting, restarting. + fail: is the subprocess crashing. + error: is a nodemon system error. + */ + type: 'detail' | 'log' | 'status' | 'error' | 'fail'; + /** the plain text message */ + message: String; + /** contains the terminal escape codes to add colour, plus the "[nodemon]" prefix */ + colour: String; +}; + +interface NodemonEventRestart { + matched?: { + result: string[]; + total: number; + }; +} + +type NodemonEventQuit = 143 | 130; +type NodemonEventExit = number; + +// TODO: Define the type of NodemonEventConfig +type NodemonEventConfig = any; + +interface NodemonSettings { + /* restartable defaults to "rs" as a string the user enters */ + restartable?: false | String; + colours?: Boolean; + execMap?: { [key: string]: string }; + ignoreRoot?: string[]; + watch?: string[]; + stdin?: boolean; + runOnChangeOnly?: boolean; + verbose?: boolean; + signal?: string; + stdout?: boolean; + watchOptions?: WatchOptions; +} + +interface WatchOptions { + ignorePermissionErrors: boolean; + ignored: string; + persistent: boolean; + usePolling: boolean; + interval: number; +} diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 00000000..d77141cb --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "typeRoots": ["./index.d.ts", "./node_modules/@types"], + "checkJs": true + }, + "exclude": ["node_modules"] +} diff --git a/lib/nodemon.js b/lib/nodemon.js index ce649cb6..278ea658 100644 --- a/lib/nodemon.js +++ b/lib/nodemon.js @@ -16,6 +16,10 @@ var eventHandlers = {}; // stable module API config.required = utils.isRequired; +/** + * @param {NodemonSettings} settings + * @returns {Nodemon} + */ function nodemon(settings) { bus.emit('boot'); nodemon.reset(); diff --git a/package.json b/package.json index e887374b..63a03822 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "terminal" ], "license": "MIT", + "types": "./index.d.ts", "main": "./lib/nodemon", "scripts": { "commitmsg": "commitlint -e",