devtunnel-cli 3.0.44 → 3.1.0

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/README.md CHANGED
@@ -1,141 +1,152 @@
1
- # DevTunnel-CLI šŸš€
2
-
3
- **Share your local dev servers worldwide - Zero config tunnel for any framework**
4
-
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6
- [![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey)](https://github.com/maiz-an/DevTunnel-CLI)
7
- [![npm version](https://img.shields.io/npm/v/devtunnel-cli)](https://www.npmjs.com/package/devtunnel-cli)
8
-
9
- 🌐 **Website:** [devtunnel-cli.vercel.app](https://devtunnel-cli.vercel.app) | šŸ“¦ **npm:** [devtunnel-cli](https://www.npmjs.com/package/devtunnel-cli) | šŸ’» **GitHub:** [maiz-an/DevTunnel-CLI](https://github.com/maiz-an/DevTunnel-CLI)
10
-
11
- **Install (global):** `npm i -g devtunnel-cli`
12
-
13
- ---
14
-
15
- ## šŸŽÆ Purpose & Scope
16
-
17
- DevTunnel-CLI is designed for **DEVELOPMENT**, **TESTING**, **DEMOS**, and **WEBHOOK DEBUGGING**. It provides fast, frictionless access to your local dev servers from anywhere.
18
-
19
- DevTunnel-CLI is built for developers who need instant public URLs to share work-in-progress, test on mobile devices, demo features to clients, or debug webhooks from third-party services.
20
-
21
- ---
22
-
23
- ## ⚔ Quick Start
24
-
25
- ### Step-by-Step Guide
26
-
27
- **1. Install DevTunnel (one-time setup):**
28
-
29
- ```bash
30
- npm i -g devtunnel-cli
31
- ```
32
-
33
- **2. Navigate to your project directory:**
34
-
35
- ```bash
36
- cd your-project
37
- ```
38
-
39
- **3. Have your app running (in one terminal):**
40
-
41
- ```bash
42
- npm run dev
43
- # OR php artisan serve (Laravel)
44
- # OR XAMPP / Live Server (PHP/HTML)
45
- # HTML: optional — DevTunnel can start a built-in server
46
- ```
47
-
48
- **4. Run DevTunnel (in another terminal, same directory):**
49
-
50
- ```bash
51
- cd your-project # Same directory as your project
52
- devtunnel-cli # Auto-detects project type and port!
53
- ```
54
-
55
- **That's it!** DevTunnel auto-detects Node, Laravel, HTML, and PHP/XAMPP projects.
56
-
57
- ---
58
-
59
- ## ✨ Features
60
-
61
- - šŸ¤– **Fully Automatic** - Cloudflare bundled, no installation needed
62
- - šŸŽÆ **Zero Config** - No project changes needed
63
- - šŸ”— **Smart Proxy** - Bypasses Vite/React restrictions
64
- - šŸŒ **Cross-Platform** - Windows, macOS, Linux
65
- - šŸš€ **Any Framework** - Node, React, Laravel, plain HTML, PHP/XAMPP
66
- - šŸ“„ **HTML** - Default port 5500; built-in static server if none running
67
- - 🐘 **PHP/XAMPP** - Port 80; supports htdocs subfolders (e.g. <http://localhost/YourProject/>)
68
- - šŸ”„ **Multi-Service** - Cloudflare, Ngrok, LocalTunnel fallback
69
- - šŸ”Œ **Multiple Ports** - DevTunnel-CLI supports multiple ports; auto-detects or lets you choose
70
- - šŸ“¹ **Streaming Support** - Handles video/audio files
71
-
72
- ---
73
-
74
- ## šŸ’” How to Use
75
-
76
- **Important:** Run `devtunnel-cli` from the same directory as your project!
77
-
78
- 1. **Install DevTunnel** (one-time): `npm i -g devtunnel-cli`
79
- 2. **Go to your project**: `cd your-project` (Node, Laravel, HTML, or XAMPP folder)
80
- 3. **Have your app running**: `npm run dev`, `php artisan serve`, or XAMPP. For HTML, optional — DevTunnel can serve it.
81
- 4. **Open a new terminal** in the same project directory
82
- 5. **Run DevTunnel**: `devtunnel-cli` (auto-detects project type and port!)
83
- 6. **Get your public URL** and share it! šŸŒ
84
-
85
- **Example (Node):**
86
-
87
- ```bash
88
- # Terminal 1
89
- cd my-react-app
90
- npm run dev
91
-
92
- # Terminal 2 - same directory
93
- cd my-react-app
94
- devtunnel-cli
95
- ```
96
-
97
- **Works with:** Vite, React, Next.js, Express, NestJS, Laravel, plain HTML, PHP/XAMPP, and any HTTP/HTTPS server.
98
-
99
- ---
100
-
101
- ## šŸ“– Documentation
102
-
103
- - [Features](docs/FEATURES.md)
104
- - [Troubleshooting](docs/TROUBLESHOOTING.md)
105
- - [Contributing](docs/CONTRIBUTING.md)
106
- - [License](docs/LICENSE)
107
-
108
- ---
109
-
110
- ## šŸ› ļø Requirements
111
-
112
- - Node.js 16+ (download from [nodejs.org](https://nodejs.org))
113
- - Internet connection
114
- - Your dev server running
115
-
116
- **No other installations needed!** Cloudflare is automatically bundled on first run.
117
-
118
- ---
119
-
120
- ## šŸ“„ License
121
-
122
- MIT License - see [LICENSE](docs/LICENSE)
123
-
124
- ---
125
-
126
- **Latest on [npm](https://www.npmjs.com/package/devtunnel-cli)** | Made with ā¤ļøŽ for developers worldwide
127
-
128
- ---
129
-
130
- ## šŸ” Search keywords
131
-
132
- Find this project as: **DevTunnel**, **devtunnel**, **dev-tunnel**, **Dev-Tunnel**, **DevTunnel-CLI**, **devtunnel-cli**, **dev-tunnel-cli**, **Dev-Tunnel-CLI**. npm (install here): [devtunnel-cli](https://www.npmjs.com/package/devtunnel-cli) Ā· Docs: [devtunnel-cli.vercel.app](https://devtunnel-cli.vercel.app) Ā· GitHub: [maiz-an/DevTunnel-CLI](https://github.com/maiz-an/DevTunnel-CLI).
133
-
134
- ---
135
-
136
- ## šŸ“¦ Links
137
-
138
- - **Website**: [devtunnel-cli.vercel.app](https://devtunnel-cli.vercel.app)
139
- - **npm**: [devtunnel-cli](https://www.npmjs.com/package/devtunnel-cli)
140
- - **GitHub**: [maiz-an/DevTunnel-CLI](https://github.com/maiz-an/DevTunnel-CLI)
141
- - **Issues**: [GitHub Issues](https://github.com/maiz-an/DevTunnel-CLI/issues)
1
+ # DevTunnel-CLI šŸš€
2
+
3
+ **Share your local dev servers worldwide - Zero config tunnel for any framework**
4
+
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6
+ [![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey)](https://github.com/maiz-an/DevTunnel-CLI)
7
+ [![npm version](https://img.shields.io/npm/v/devtunnel-cli)](https://www.npmjs.com/package/devtunnel-cli)
8
+
9
+ 🌐 **Website:** [devtunnel-cli.vercel.app](https://devtunnel-cli.vercel.app) | šŸ“¦ **npm:** [devtunnel-cli](https://www.npmjs.com/package/devtunnel-cli) | šŸ’» **GitHub:** [maiz-an/DevTunnel-CLI](https://github.com/maiz-an/DevTunnel-CLI)
10
+
11
+ ## Install
12
+
13
+ | Platform | Command |
14
+ | -------- | ------- |
15
+ | **Windows** | `winget install devtunnel-cli` |
16
+ | **macOS** | `brew install devtunnel-cli` |
17
+ | **Linux** | `sudo apt install devtunnel-cli` |
18
+ | **npm** | `npm i -g devtunnel-cli` |
19
+
20
+ Windows, macOS, and Linux: same style — **standalone binary**, no Node required.
21
+ **Linux (first time only):** run once `curl -fsSL https://raw.githubusercontent.com/maiz-an/DevTunnel-CLI/main/scripts/install.sh | sudo sh` to add our APT repo, then use the command above. npm requires Node.
22
+
23
+ ---
24
+
25
+ ## šŸŽÆ Purpose & Scope
26
+
27
+ DevTunnel-CLI is designed for **DEVELOPMENT**, **TESTING**, **DEMOS**, and **WEBHOOK DEBUGGING**. It provides fast, frictionless access to your local dev servers from anywhere.
28
+
29
+ DevTunnel-CLI is built for developers who need instant public URLs to share work-in-progress, test on mobile devices, demo features to clients, or debug webhooks from third-party services.
30
+
31
+ ---
32
+
33
+ ## ⚔ Quick Start
34
+
35
+ ### Step-by-Step Guide
36
+
37
+ **1. Install DevTunnel (one-time setup):**
38
+ Use **Windows** (winget), **macOS** (brew), **Linux** (apt), or **npm** — see the [Install](#install) table above.
39
+
40
+ ```bash
41
+ npm i -g devtunnel-cli
42
+ ```
43
+
44
+ **2. Navigate to your project directory:**
45
+
46
+ ```bash
47
+ cd your-project
48
+ ```
49
+
50
+ **3. Have your app running (in one terminal):**
51
+
52
+ ```bash
53
+ npm run dev
54
+ # OR php artisan serve (Laravel)
55
+ # OR XAMPP / Live Server (PHP/HTML)
56
+ # HTML: optional — DevTunnel can start a built-in server
57
+ ```
58
+
59
+ **4. Run DevTunnel (in another terminal, same directory):**
60
+
61
+ ```bash
62
+ cd your-project # Same directory as your project
63
+ devtunnel-cli # Auto-detects project type and port!
64
+ ```
65
+
66
+ **That's it!** DevTunnel auto-detects Node, Laravel, HTML, and PHP/XAMPP projects.
67
+
68
+ ---
69
+
70
+ ## ✨ Features
71
+
72
+ - šŸ¤– **Fully Automatic** - Cloudflare bundled, no installation needed
73
+ - šŸŽÆ **Zero Config** - No project changes needed
74
+ - šŸ”— **Smart Proxy** - Bypasses Vite/React restrictions
75
+ - šŸŒ **Cross-Platform** - Windows, macOS, Linux
76
+ - šŸš€ **Any Framework** - Node, React, Laravel, plain HTML, PHP/XAMPP
77
+ - šŸ“„ **HTML** - Default port 5500; built-in static server if none running
78
+ - 🐘 **PHP/XAMPP** - Port 80; supports htdocs subfolders (e.g. <http://localhost/YourProject/>)
79
+ - šŸ”„ **Multi-Service** - Cloudflare, Ngrok, LocalTunnel fallback
80
+ - šŸ”Œ **Multiple Ports** - DevTunnel-CLI supports multiple ports; auto-detects or lets you choose
81
+ - šŸ“¹ **Streaming Support** - Handles video/audio files
82
+
83
+ ---
84
+
85
+ ## šŸ’” How to Use
86
+
87
+ **Important:** Run `devtunnel-cli` from the same directory as your project!
88
+
89
+ 1. **Install DevTunnel** (one-time): use winget, brew, apt, or [npm](#install) above.
90
+ 2. **Go to your project**: `cd your-project` (Node, Laravel, HTML, or XAMPP folder)
91
+ 3. **Have your app running**: `npm run dev`, `php artisan serve`, or XAMPP. For HTML, optional — DevTunnel can serve it.
92
+ 4. **Open a new terminal** in the same project directory
93
+ 5. **Run DevTunnel**: `devtunnel-cli` (auto-detects project type and port!)
94
+ 6. **Get your public URL** and share it! šŸŒ
95
+
96
+ **Example (Node):**
97
+
98
+ ```bash
99
+ # Terminal 1
100
+ cd my-react-app
101
+ npm run dev
102
+
103
+ # Terminal 2 - same directory
104
+ cd my-react-app
105
+ devtunnel-cli
106
+ ```
107
+
108
+ **Works with:** Vite, React, Next.js, Express, NestJS, Laravel, plain HTML, PHP/XAMPP, and any HTTP/HTTPS server.
109
+
110
+ ---
111
+
112
+ ## šŸ“– Documentation
113
+
114
+ - [Features](docs/FEATURES.md)
115
+ - [Troubleshooting](docs/TROUBLESHOOTING.md)
116
+ - [Contributing](docs/CONTRIBUTING.md)
117
+ - [License](docs/LICENSE)
118
+
119
+ ---
120
+
121
+ ## šŸ› ļø Requirements
122
+
123
+ - **Windows / macOS / Linux (OS install):** No Node required — standalone binary.
124
+ - **npm install:** Node.js 16+ ([nodejs.org](https://nodejs.org)).
125
+ - Internet connection and your dev server running.
126
+
127
+ Cloudflare is automatically bundled on first run.
128
+
129
+ ---
130
+
131
+ ## šŸ“„ License
132
+
133
+ MIT License - see [LICENSE](docs/LICENSE)
134
+
135
+ ---
136
+
137
+ **Latest on [npm](https://www.npmjs.com/package/devtunnel-cli)** | Made with ā¤ļøŽ for developers worldwide
138
+
139
+ ---
140
+
141
+ ## šŸ” Search keywords
142
+
143
+ Find this project as: **DevTunnel**, **devtunnel**, **dev-tunnel**, **Dev-Tunnel**, **DevTunnel-CLI**, **devtunnel-cli**, **dev-tunnel-cli**, **Dev-Tunnel-CLI**. npm (install here): [devtunnel-cli](https://www.npmjs.com/package/devtunnel-cli) Ā· Docs: [devtunnel-cli.vercel.app](https://devtunnel-cli.vercel.app) Ā· GitHub: [maiz-an/DevTunnel-CLI](https://github.com/maiz-an/DevTunnel-CLI).
144
+
145
+ ---
146
+
147
+ ## šŸ“¦ Links
148
+
149
+ - **Website**: [devtunnel-cli.vercel.app](https://devtunnel-cli.vercel.app)
150
+ - **npm**: [devtunnel-cli](https://www.npmjs.com/package/devtunnel-cli)
151
+ - **GitHub**: [maiz-an/DevTunnel-CLI](https://github.com/maiz-an/DevTunnel-CLI)
152
+ - **Issues**: [GitHub Issues](https://github.com/maiz-an/DevTunnel-CLI/issues)
package/package.json CHANGED
@@ -1,86 +1,90 @@
1
- {
2
- "name": "devtunnel-cli",
3
- "version": "3.0.44",
4
- "type": "module",
5
- "description": "DevTunnel-CLI — fast, zero-config tool to share local servers for development, testing, demos, and webhook debugging. npm i -g devtunnel-cli.",
6
- "main": "src/core/start.js",
7
- "files": [
8
- "README.md",
9
- "src"
10
- ],
11
- "bin": {
12
- "devtunnel-cli": "src/core/RUN.js"
13
- },
14
- "scripts": {
15
- "start": "node src/core/RUN.js",
16
- "dev": "node src/core/RUN.js",
17
- "run": "node src/core/RUN.js",
18
- "tunnel": "node src/core/index.js",
19
- "sync-version": "node sync-version.js",
20
- "test": "node -e \"console.log('ok')\"",
21
- "prepublishOnly": "npm test"
22
- },
23
- "keywords": [
24
- "DevTunnel-CLI",
25
- "DevTunnel",
26
- "devtunnel",
27
- "dev-tunnel",
28
- "Dev-Tunnel",
29
- "devtunnel-cli",
30
- "dev-tunnel-cli",
31
- "Dev-Tunnel-CLI",
32
- "multiple ports",
33
- "dev tunnel",
34
- "localhost tunnel",
35
- "cloudflare tunnel",
36
- "ngrok alternative",
37
- "ngrok",
38
- "localtunnel",
39
- "dev-server",
40
- "share localhost",
41
- "public-url",
42
- "port forwarding",
43
- "local development",
44
- "vite tunnel",
45
- "react dev server",
46
- "nextjs tunnel",
47
- "nestjs",
48
- "express",
49
- "laravel",
50
- "php",
51
- "html",
52
- "backend",
53
- "frontend",
54
- "proxy",
55
- "development tools",
56
- "web development",
57
- "tunnel service",
58
- "local server sharing",
59
- "dev server proxy",
60
- "cloudflare tunnel cli",
61
- "ngrok alternative free",
62
- "zero config tunnel",
63
- "development",
64
- "localhost"
65
- ],
66
- "author": "maiz",
67
- "license": "MIT",
68
- "preferGlobal": true,
69
- "repository": {
70
- "type": "git",
71
- "url": "git+https://github.com/maiz-an/DevTunnel-CLI.git"
72
- },
73
- "bugs": {
74
- "url": "https://github.com/maiz-an/DevTunnel-CLI/issues"
75
- },
76
- "homepage": "https://devtunnel-cli.vercel.app",
77
- "engines": {
78
- "node": ">=16.0.0"
79
- },
80
- "dependencies": {
81
- "http-proxy": "^1.18.1",
82
- "localtunnel": "^2.0.2",
83
- "prompts": "^2.4.2"
84
- },
85
- "devDependencies": {}
1
+ {
2
+ "name": "devtunnel-cli",
3
+ "version": "3.1.0",
4
+ "type": "module",
5
+ "description": "DevTunnel-CLI — fast, zero-config tool to share local servers for development, testing, demos, and webhook debugging. npm i -g devtunnel-cli.",
6
+ "main": "src/core/start.js",
7
+ "files": [
8
+ "README.md",
9
+ "src"
10
+ ],
11
+ "bin": {
12
+ "devtunnel-cli": "src/core/RUN.js"
13
+ },
14
+ "scripts": {
15
+ "start": "node src/core/RUN.js",
16
+ "dev": "node src/core/RUN.js",
17
+ "run": "node src/core/RUN.js",
18
+ "tunnel": "node src/core/index.js",
19
+ "sync-version": "node sync-version.js",
20
+ "build:standalone": "node scripts/build-standalone.js",
21
+ "test": "node -e \"console.log('ok')\"",
22
+ "prepublishOnly": "npm test",
23
+ "postinstall": "node src/utils/postinstall-global-check.cjs"
24
+ },
25
+ "keywords": [
26
+ "DevTunnel-CLI",
27
+ "DevTunnel",
28
+ "devtunnel",
29
+ "dev-tunnel",
30
+ "Dev-Tunnel",
31
+ "devtunnel-cli",
32
+ "dev-tunnel-cli",
33
+ "Dev-Tunnel-CLI",
34
+ "multiple ports",
35
+ "dev tunnel",
36
+ "localhost tunnel",
37
+ "cloudflare tunnel",
38
+ "ngrok alternative",
39
+ "ngrok",
40
+ "localtunnel",
41
+ "dev-server",
42
+ "share localhost",
43
+ "public-url",
44
+ "port forwarding",
45
+ "local development",
46
+ "vite tunnel",
47
+ "react dev server",
48
+ "nextjs tunnel",
49
+ "nestjs",
50
+ "express",
51
+ "laravel",
52
+ "php",
53
+ "html",
54
+ "backend",
55
+ "frontend",
56
+ "proxy",
57
+ "development tools",
58
+ "web development",
59
+ "tunnel service",
60
+ "local server sharing",
61
+ "dev server proxy",
62
+ "cloudflare tunnel cli",
63
+ "ngrok alternative free",
64
+ "zero config tunnel",
65
+ "development",
66
+ "localhost"
67
+ ],
68
+ "author": "maiz",
69
+ "license": "MIT",
70
+ "preferGlobal": true,
71
+ "repository": {
72
+ "type": "git",
73
+ "url": "git+https://github.com/maiz-an/DevTunnel-CLI.git"
74
+ },
75
+ "bugs": {
76
+ "url": "https://github.com/maiz-an/DevTunnel-CLI/issues"
77
+ },
78
+ "homepage": "https://devtunnel-cli.vercel.app",
79
+ "engines": {
80
+ "node": ">=16.0.0"
81
+ },
82
+ "dependencies": {
83
+ "http-proxy": "^1.18.1",
84
+ "localtunnel": "^2.0.2",
85
+ "prompts": "^2.4.2"
86
+ },
87
+ "devDependencies": {
88
+ "@yao-pkg/pkg": "^5.15.0"
89
+ }
86
90
  }
package/src/core/RUN.js CHANGED
@@ -1,64 +1,64 @@
1
- #!/usr/bin/env node
2
-
3
- // Universal Node.js Launcher - Works on ALL platforms!
4
- import { spawn } from "child_process";
5
- import { readFileSync, existsSync } from "fs";
6
- import { fileURLToPath } from "url";
7
- import { dirname, join } from "path";
8
-
9
- const __filename = fileURLToPath(import.meta.url);
10
- const __dirname = dirname(__filename);
11
-
12
- // Version flags: devtunnel-cli --version, -v, or --v
13
- const args = process.argv.slice(2);
14
- const showVersion = args.some((a) => a === "--version" || a === "-v" || a === "--v");
15
- if (showVersion) {
16
- try {
17
- const pkgPath = join(dirname(dirname(__dirname)), "package.json");
18
- const version = existsSync(pkgPath)
19
- ? JSON.parse(readFileSync(pkgPath, "utf8")).version
20
- : "?.?.?";
21
- console.log(version);
22
- } catch (err) {
23
- console.log("?.?.?");
24
- }
25
- process.exit(0);
26
- }
27
-
28
- const originalEmitWarning = process.emitWarning;
29
- process.emitWarning = function(warning, ...args) {
30
- if (typeof warning === 'string' && warning.includes('util._extend')) {
31
- return;
32
- }
33
- return originalEmitWarning.call(this, warning, ...args);
34
- };
35
-
36
- process.stdout.write('\x1B[2J\x1B[0f');
37
- console.clear();
38
-
39
- const startPath = join(__dirname, "start.js");
40
- const child = spawn("node", [startPath], {
41
- stdio: "inherit",
42
- shell: false
43
- });
44
-
45
- child.on("error", (error) => {
46
- console.error("āŒ Error starting app:", error.message);
47
- process.exit(1);
48
- });
49
-
50
- child.on("close", (code) => {
51
- if (code !== 0) {
52
- console.log(`\nāš ļø Process exited with code ${code}`);
53
- }
54
- process.exit(code || 0);
55
- });
56
-
57
- // Handle Ctrl+C
58
- process.on("SIGINT", () => {
59
- child.kill("SIGINT");
60
- });
61
-
62
- process.on("SIGTERM", () => {
63
- child.kill("SIGTERM");
64
- });
1
+ #!/usr/bin/env node
2
+
3
+ // Universal Node.js Launcher - Works on ALL platforms!
4
+ import { spawn } from "child_process";
5
+ import { readFileSync, existsSync } from "fs";
6
+ import { fileURLToPath } from "url";
7
+ import { dirname, join } from "path";
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = dirname(__filename);
11
+
12
+ // Version flags: devtunnel-cli --version, -v, or --v
13
+ const args = process.argv.slice(2);
14
+ const showVersion = args.some((a) => a === "--version" || a === "-v" || a === "--v");
15
+ if (showVersion) {
16
+ try {
17
+ const pkgPath = join(dirname(dirname(__dirname)), "package.json");
18
+ const version = existsSync(pkgPath)
19
+ ? JSON.parse(readFileSync(pkgPath, "utf8")).version
20
+ : "?.?.?";
21
+ console.log(version);
22
+ } catch (err) {
23
+ console.log("?.?.?");
24
+ }
25
+ process.exit(0);
26
+ }
27
+
28
+ const originalEmitWarning = process.emitWarning;
29
+ process.emitWarning = function(warning, ...args) {
30
+ if (typeof warning === 'string' && warning.includes('util._extend')) {
31
+ return;
32
+ }
33
+ return originalEmitWarning.call(this, warning, ...args);
34
+ };
35
+
36
+ process.stdout.write('\x1B[2J\x1B[0f');
37
+ console.clear();
38
+
39
+ const startPath = join(__dirname, "start.js");
40
+ const child = spawn("node", [startPath], {
41
+ stdio: "inherit",
42
+ shell: false
43
+ });
44
+
45
+ child.on("error", (error) => {
46
+ console.error("āŒ Error starting app:", error.message);
47
+ process.exit(1);
48
+ });
49
+
50
+ child.on("close", (code) => {
51
+ if (code !== 0) {
52
+ console.log(`\nāš ļø Process exited with code ${code}`);
53
+ }
54
+ process.exit(code || 0);
55
+ });
56
+
57
+ // Handle Ctrl+C
58
+ process.on("SIGINT", () => {
59
+ child.kill("SIGINT");
60
+ });
61
+
62
+ process.on("SIGTERM", () => {
63
+ child.kill("SIGTERM");
64
+ });