neex 0.4.3 → 0.4.6

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.
Files changed (55) hide show
  1. package/README.md +43 -73
  2. package/bun.lock +38 -356
  3. package/dist/bin/neex.js +4 -0
  4. package/dist/{cli.js → src/cli.js} +8 -18
  5. package/dist/{commands → src/commands}/run-commands/run.js +0 -1
  6. package/dist/src/index.js +70 -0
  7. package/dist/{logger.js → src/logger.js} +0 -1
  8. package/dist/src/project-manager.js +208 -0
  9. package/dist/{runner.js → src/runner.js} +0 -1
  10. package/dist/{types.js → src/types.js} +0 -1
  11. package/package.json +3 -17
  12. package/.env +0 -2
  13. package/Screenshot 1404-03-20 at 17.20.45.png +0 -0
  14. package/Screenshot 1404-03-20 at 17.20.56.png +0 -0
  15. package/Screenshot 1404-03-20 at 17.21.04.png +0 -0
  16. package/dist/cli.d.ts +0 -1
  17. package/dist/cli.js.map +0 -1
  18. package/dist/commands/process-command/process.d.ts +0 -2
  19. package/dist/commands/process-command/process.js +0 -150
  20. package/dist/commands/process-command/process.js.map +0 -1
  21. package/dist/commands/project-command/build.d.ts +0 -3
  22. package/dist/commands/project-command/build.js +0 -42
  23. package/dist/commands/project-command/build.js.map +0 -1
  24. package/dist/commands/project-command/cache.d.ts +0 -3
  25. package/dist/commands/project-command/cache.js +0 -57
  26. package/dist/commands/project-command/cache.js.map +0 -1
  27. package/dist/commands/project-command/dev.d.ts +0 -3
  28. package/dist/commands/project-command/dev.js +0 -52
  29. package/dist/commands/project-command/dev.js.map +0 -1
  30. package/dist/commands/project-command/start.d.ts +0 -3
  31. package/dist/commands/project-command/start.js +0 -46
  32. package/dist/commands/project-command/start.js.map +0 -1
  33. package/dist/commands/run-commands/run.d.ts +0 -2
  34. package/dist/commands/run-commands/run.js.map +0 -1
  35. package/dist/index.d.ts +0 -30
  36. package/dist/index.js +0 -66
  37. package/dist/index.js.map +0 -1
  38. package/dist/logger.d.ts +0 -31
  39. package/dist/logger.js.map +0 -1
  40. package/dist/process-manager.d.ts +0 -60
  41. package/dist/process-manager.js +0 -277
  42. package/dist/process-manager.js.map +0 -1
  43. package/dist/project-manager.d.ts +0 -74
  44. package/dist/project-manager.js +0 -605
  45. package/dist/project-manager.js.map +0 -1
  46. package/dist/runner.d.ts +0 -17
  47. package/dist/runner.js.map +0 -1
  48. package/dist/server.d.ts +0 -2
  49. package/dist/server.js +0 -67
  50. package/dist/server.js.map +0 -1
  51. package/dist/types.d.ts +0 -37
  52. package/dist/types.js.map +0 -1
  53. package/dist/typescript-runner.d.ts +0 -12
  54. package/dist/typescript-runner.js +0 -162
  55. package/dist/typescript-runner.js.map +0 -1
package/README.md CHANGED
@@ -6,14 +6,14 @@
6
6
  </picture>
7
7
  </a>
8
8
 
9
- # Neex v0.4.1
9
+ # Neex v0.1.2
10
+
10
11
  ### 🚀 Neex: The Modern Build System for Polyrepo-in-Monorepo Architecture
11
12
 
12
13
  [![NPM version](https://img.shields.io/npm/v/neex.svg?style=for-the-badge&labelColor=000000&color=0066FF&borderRadius=8)](https://www.npmjs.com/package/neex)
13
14
  [![Download Count](https://img.shields.io/npm/dt/neex.svg?style=for-the-badge&labelColor=000000&color=0066FF&borderRadius=8)](https://www.npmjs.com/package/neex)
14
15
  [![MIT License](https://img.shields.io/badge/license-MIT-0066FF.svg?style=for-the-badge&labelColor=000000&borderRadius=8)](https://github.com/neexjs/blob/main/LICENSE)
15
16
  [![GitHub](https://img.shields.io/badge/GitHub-Neex-0066FF.svg?style=for-the-badge&logo=github&labelColor=000000&logoWidth=20&borderRadius=8)](https://github.com/Neexjs)
16
-
17
17
  </div>
18
18
 
19
19
  ## 🎯 Overview
@@ -25,7 +25,7 @@ Neex is a modern build system designed to bridge the gap between polyrepo and mo
25
25
  ## ✨ Key Features
26
26
 
27
27
  - 🎨 **Colored Output** - Distinguish commands with unique colors
28
- - ⚡ **Dual Execution Modes** - Run commands in parallel (`p`) or sequence (`s`)
28
+ - ⚡ **Dual Execution Modes** - Run commands in parallel (`p`, `runx`) or sequence (`s`, `run`)
29
29
  - ⏱️ **Smart Timing** - Track execution time for each command
30
30
  - 🛑 **Error Control** - Stop on first error (perfect for CI/CD)
31
31
  - 🔢 **Parallel Control** - Limit concurrent processes with `--max-parallel`
@@ -49,45 +49,22 @@ bun add -D neex # bun
49
49
 
50
50
  ## 🖥️ Usage
51
51
 
52
- ### Process Management Commands
52
+ ### Commands
53
53
 
54
- ```bash
55
- # Start a process
56
- neex startx app.js -n "my-app" -w
57
-
58
- # startx options
59
- -n, --name <name> Process name
60
- -w, --watch Watch for file changes
61
- -r, --max-restarts <number> Maximum restart attempts
62
- -d, --restart-delay <ms> Delay between restarts
63
-
64
- # Stop a process
65
- neex stopx <process-id>
66
-
67
- # List processes
68
- neex list
69
- neex list -a # Show all processes
70
- neex list -j # JSON output
71
-
72
- # Monitor process
73
- neex monit <process-id>
74
- neex monit <process-id> -i 1000 # Set update interval
75
-
76
- # View logs
77
- neex log <process-id>
78
- neex log <process-id> -f # Follow logs
79
- neex log <process-id> -e # Show only errors
80
- neex log <process-id> -w # Show only warnings
81
- ```
54
+ - `runx` (alias: `p`) - Run in **parallel** (default)
55
+ - `run` (alias: `s`) - Run **sequentially**
82
56
 
83
- ### Script Execution Commands
57
+ ### Examples
84
58
 
85
59
  ```bash
60
+ # Parallel execution (default)
61
+ neex p "echo Task 1" "echo Task 2" "echo Task 3"
62
+
86
63
  # Sequential execution
87
- neex s "npm install" "npm run build"
64
+ neex s "echo Step 1" "echo Step 2" "echo Step 3"
88
65
 
89
- # Parallel execution
90
- neex p "npm run dev" "npm run watch"
66
+ # Parallel with sequential flag
67
+ neex p -q "echo Step 1" "echo Step 2" "echo Step 3"
91
68
  ```
92
69
 
93
70
  ### 🛠️ Options
@@ -102,6 +79,14 @@ neex p "npm run dev" "npm run watch"
102
79
  | `--max-parallel` | `-m` | Max parallel tasks | CPU count |
103
80
  | `--sequential` | `-q` | Force sequential | `false` |
104
81
 
82
+
83
+ ### Advanced Example
84
+
85
+ ```bash
86
+ # Run tests & build with max 2 parallel tasks, stop on error
87
+ neex p -s -m 2 -t "npm test" "npm run build" "npm run lint"
88
+ ```
89
+
105
90
  ## 📦 Node.js API
106
91
 
107
92
  ```javascript
@@ -130,6 +115,20 @@ async function main() {
130
115
  }
131
116
  ```
132
117
 
118
+ ### API Options
119
+
120
+ ```typescript
121
+ interface RunOptions {
122
+ parallel?: boolean; // Run in parallel (default: true)
123
+ maxParallel?: number; // Max parallel processes (default: CPU count)
124
+ color?: boolean; // Enable colors (default: true)
125
+ prefix?: boolean; // Show command prefix (default: true)
126
+ showTiming?: boolean; // Show timing info (default: true)
127
+ printOutput?: boolean; // Show command output (default: true)
128
+ stopOnError?: boolean; // Stop on failure (default: false)
129
+ }
130
+ ```
131
+
133
132
  ## 🔄 CI/CD Integration
134
133
 
135
134
  ```yaml
@@ -144,45 +143,16 @@ steps:
144
143
 
145
144
  ## 💡 Real-world Examples
146
145
 
147
- ### Multi-part Project Execution
148
-
149
- ```json
150
- {
151
- "scripts": {
152
- "dev": "neex p dev:client dev:server",
153
- "dev:client": "cd apps/client && npm run dev",
154
- "dev:server": "cd apps/server && npm run dev",
155
- "build": "neex s build:client build:server",
156
- "build:client": "cd apps/client && npm run build",
157
- "build:server": "cd apps/server && npm run build",
158
- "start": "neex p start:client start:server",
159
- "start:client": "cd apps/client && npm run start",
160
- "start:server": "cd apps/server && npm run start"
161
- }
162
- }
163
- ```
164
-
165
- ### Production Project Management
166
-
167
- ```json
168
- {
169
- "scripts": {
170
- "startx": "neex startx:client && neex startx:server",
171
- "startx:client": "neex startx apps/client/index.js -n client -w",
172
- "startx:server": "neex startx apps/server/index.js -n server -w",
173
- "stopx": "neex stopx:client && neex stopx:server",
174
- "stopx:client": "neex stopx client",
175
- "stopx:server": "neex stopx server"
176
- }
177
- }
178
- ```
146
+ ```bash
147
+ # Dev servers
148
+ neex p "cd frontend && npm dev" "cd api && npm dev"
179
149
 
180
- ## Important Notes
150
+ # Monorepo build
151
+ neex p -m 2 "npm run build:ui" "npm run build:api"
181
152
 
182
- - Logs are stored in the `.neex-logs` directory
183
- - Configuration is stored in `.neex-config.json`
184
- - Use `Ctrl+C` to stop live monitoring
185
- - Use `neex stopx -f` for force stop when needed
153
+ # Deploy pipeline
154
+ neex s -s "npm test" "npm run build" "npm run deploy"
155
+ ```
186
156
 
187
157
  ## 🤝 Contributing
188
158