gib-runs 2.3.6 → 2.3.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/.gib-runs.json.example +21 -0
- package/CHANGELOG.md +16 -0
- package/README.md +24 -7
- package/gib-run.js +8 -0
- package/index.js +9 -1
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"port": 8080,
|
|
3
|
+
"host": "0.0.0.0",
|
|
4
|
+
"open": true,
|
|
5
|
+
"logLevel": 2,
|
|
6
|
+
"compression": true,
|
|
7
|
+
"cors": false,
|
|
8
|
+
"spa": false,
|
|
9
|
+
"watch": ["src", "public", "dist"],
|
|
10
|
+
"ignore": ["*.test.js", "*.spec.js", "*.map"],
|
|
11
|
+
"middleware": [],
|
|
12
|
+
"wait": 100,
|
|
13
|
+
"noCssInject": false,
|
|
14
|
+
"qrCode": false,
|
|
15
|
+
"tunnel": false,
|
|
16
|
+
"autoRestart": false,
|
|
17
|
+
"enableUpload": false,
|
|
18
|
+
"enableHealth": true,
|
|
19
|
+
"logToFile": false,
|
|
20
|
+
"customErrorPage": true
|
|
21
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [2.3.7] - 2026-02-13
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- 📁 **Project-Level Config File** - Support for `.gib-runs.json` in project root
|
|
9
|
+
- Overrides global config (`~/.gib-runs.json`)
|
|
10
|
+
- Priority: Project config > Global config > CLI args > Defaults
|
|
11
|
+
- Perfect for team-shared project settings
|
|
12
|
+
- 🎯 **Improved Watch Ignore Patterns** - Better file watching performance
|
|
13
|
+
- Auto-ignore common directories: `node_modules`, `.git`, `dist`, `build`, `coverage`, `.next`, `.nuxt`, `.output`, `out`, `target`
|
|
14
|
+
- Prevents unnecessary reloads from build artifacts
|
|
15
|
+
- Reduces CPU usage during development
|
|
16
|
+
- ⚡ **Enhanced File Watching Stability** - More reliable change detection
|
|
17
|
+
- Added `awaitWriteFinish` option to prevent partial file reads
|
|
18
|
+
- Ignores permission errors automatically
|
|
19
|
+
- Debounced file changes for better performance
|
|
20
|
+
|
|
5
21
|
## [2.3.6] - 2026-02-12
|
|
6
22
|
|
|
7
23
|
### Added
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://github.com/levouinse/gib-runs/blob/main/LICENSE)
|
|
4
4
|
[](https://github.com/levouinse/gib-runs)
|
|
5
5
|
|
|
6
|
-
# 🚀 GIB-RUNS v2.3.
|
|
6
|
+
# 🚀 GIB-RUNS v2.3.7
|
|
7
7
|
|
|
8
8
|
**Modern development server with live reload - Unlike some people, this actually runs on merit, not connections.**
|
|
9
9
|
|
|
@@ -61,10 +61,13 @@ The name is a playful nod to Indonesia's Vice President Gibran Rakabuming Raka,
|
|
|
61
61
|
- 🚦 **Rate Limiting** - Protect against abuse (better protection than family connections)
|
|
62
62
|
- 🌐 **Network Access** - True network binding that actually works (unlike some political promises)
|
|
63
63
|
|
|
64
|
-
### New in v2.3.
|
|
65
|
-
-
|
|
64
|
+
### New in v2.3.7 🎉
|
|
65
|
+
- 📁 **Project-Level Config File** - `.gib-runs.json` in project root (overrides global config)
|
|
66
|
+
- 🎯 **Improved Watch Ignore** - Auto-ignore common directories (node_modules, dist, build, etc)
|
|
67
|
+
- ⚡ **Enhanced File Watching** - Better stability with awaitWriteFinish option
|
|
66
68
|
|
|
67
69
|
### New in v2.3.6 🎉
|
|
70
|
+
- 🔄 **Environment Variable Replacement** - Automatic replacement of `${VAR_NAME}` in HTML files from .env
|
|
68
71
|
- 🔁 **Auto-Restart on Crash** - Automatically restart server on unexpected errors (resilient mode)
|
|
69
72
|
- 📤 **File Upload Endpoint** - Built-in file upload support for development (POST to /upload)
|
|
70
73
|
- 💚 **Health Check Endpoint** - Monitor server health and statistics (GET /health)
|
|
@@ -226,7 +229,7 @@ const server = gibRun.start({
|
|
|
226
229
|
|
|
227
230
|
### Configuration File
|
|
228
231
|
|
|
229
|
-
Create `~/.gib-runs.json` for default settings:
|
|
232
|
+
Create `~/.gib-runs.json` for global default settings:
|
|
230
233
|
|
|
231
234
|
```json
|
|
232
235
|
{
|
|
@@ -239,6 +242,20 @@ Create `~/.gib-runs.json` for default settings:
|
|
|
239
242
|
}
|
|
240
243
|
```
|
|
241
244
|
|
|
245
|
+
Or create `.gib-runs.json` in your project root for project-specific settings (overrides global config):
|
|
246
|
+
|
|
247
|
+
```json
|
|
248
|
+
{
|
|
249
|
+
"port": 3000,
|
|
250
|
+
"spa": true,
|
|
251
|
+
"watch": ["src", "public"],
|
|
252
|
+
"ignore": ["*.test.js", "*.spec.js"],
|
|
253
|
+
"middleware": ["performance", "security"]
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
**Priority**: Project config > Global config > CLI arguments > Defaults
|
|
258
|
+
|
|
242
259
|
## 🔒 HTTPS Configuration
|
|
243
260
|
|
|
244
261
|
Create an HTTPS configuration module:
|
|
@@ -389,7 +406,7 @@ gib-runs
|
|
|
389
406
|
Network URLs are **ALWAYS shown automatically** when you start the server:
|
|
390
407
|
|
|
391
408
|
```
|
|
392
|
-
🚀 GIB-RUNS v2.3.
|
|
409
|
+
🚀 GIB-RUNS v2.3.7
|
|
393
410
|
"Unlike Gibran, this actually works through merit"
|
|
394
411
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
395
412
|
📁 Root: /home/user/project
|
|
@@ -508,7 +525,7 @@ gib-runs --tunnel-service=tunnelto
|
|
|
508
525
|
### Example Output
|
|
509
526
|
|
|
510
527
|
```
|
|
511
|
-
🚀 GIB-RUNS v2.3.
|
|
528
|
+
🚀 GIB-RUNS v2.3.7
|
|
512
529
|
"Unlike Gibran, this actually works through merit"
|
|
513
530
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
514
531
|
📁 Root: /home/user/project
|
|
@@ -638,7 +655,7 @@ pm2 list
|
|
|
638
655
|
### Example Output
|
|
639
656
|
|
|
640
657
|
```
|
|
641
|
-
🚀 GIB-RUNS v2.3.
|
|
658
|
+
🚀 GIB-RUNS v2.3.7
|
|
642
659
|
"Unlike Gibran, this actually works through merit"
|
|
643
660
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
644
661
|
📁 Root: /home/user/project
|
package/gib-run.js
CHANGED
|
@@ -23,6 +23,14 @@ if (fs.existsSync(configPath)) {
|
|
|
23
23
|
if (opts.ignorePattern) opts.ignorePattern = new RegExp(opts.ignorePattern);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
// Project-level config (overrides global config)
|
|
27
|
+
var projectConfigPath = path.join(process.cwd(), '.gib-runs.json');
|
|
28
|
+
if (fs.existsSync(projectConfigPath)) {
|
|
29
|
+
var projectConfig = fs.readFileSync(projectConfigPath, 'utf8');
|
|
30
|
+
assign(opts, JSON.parse(projectConfig));
|
|
31
|
+
if (opts.ignorePattern) opts.ignorePattern = new RegExp(opts.ignorePattern);
|
|
32
|
+
}
|
|
33
|
+
|
|
26
34
|
for (var i = process.argv.length - 1; i >= 2; --i) {
|
|
27
35
|
var arg = process.argv[i];
|
|
28
36
|
if (arg.indexOf("--port=") > -1) {
|
package/index.js
CHANGED
|
@@ -627,6 +627,9 @@ GibRuns.start = function(options) {
|
|
|
627
627
|
},
|
|
628
628
|
function(testPath) { // Ignore common build artifacts
|
|
629
629
|
return /\.(log|lock|tmp)$/.test(testPath);
|
|
630
|
+
},
|
|
631
|
+
function(testPath) { // Ignore common directories
|
|
632
|
+
return /(^|\/)((node_modules|\.git|dist|build|coverage|\.next|\.nuxt|\.output|out|target)(\/|$))/.test(testPath);
|
|
630
633
|
}
|
|
631
634
|
];
|
|
632
635
|
if (options.ignore) {
|
|
@@ -638,7 +641,12 @@ GibRuns.start = function(options) {
|
|
|
638
641
|
// Setup file watcher
|
|
639
642
|
GibRuns.watcher = chokidar.watch(watchPaths, {
|
|
640
643
|
ignored: ignored,
|
|
641
|
-
ignoreInitial: true
|
|
644
|
+
ignoreInitial: true,
|
|
645
|
+
ignorePermissionErrors: true,
|
|
646
|
+
awaitWriteFinish: {
|
|
647
|
+
stabilityThreshold: 100,
|
|
648
|
+
pollInterval: 50
|
|
649
|
+
}
|
|
642
650
|
});
|
|
643
651
|
function handleChange(changePath) {
|
|
644
652
|
GibRuns.reloadCount++;
|
package/package.json
CHANGED