scripts-orchestrator 1.0.0 → 1.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 +19 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,14 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
A powerful script orchestrator for running parallel commands with dependency management, background processes, and health checks. Perfect for CI/CD pipelines and automated testing workflows.
|
|
4
4
|
|
|
5
|
+
## Why?
|
|
6
|
+
I don't have access to a mature CI/CD solution. As the project grows, I have added several scripts to my package.json which I need to run as sanity. Ex: `build, test, lint, test-storybook, playwright, stylelint` etc. I wanted a script that
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
* would run the commands specified in my package in parallel
|
|
10
|
+
* be OS agnostic
|
|
11
|
+
* start & stop any dependencies
|
|
12
|
+
* keep the terminal clean
|
|
13
|
+
* log in the right places
|
|
14
|
+
* give me a clear go/no-go indication at the end
|
|
15
|
+
|
|
16
|
+
There don't seem to be any existing npm packages that meet my needs so I wrote one.
|
|
17
|
+
|
|
5
18
|
## Installation
|
|
6
19
|
|
|
7
20
|
```bash
|
|
8
21
|
# Install as a development dependency
|
|
9
22
|
npm install --save-dev scripts-orchestrator
|
|
10
23
|
|
|
11
|
-
# Or install globally
|
|
12
|
-
npm install -g scripts-orchestrator
|
|
13
24
|
```
|
|
14
25
|
|
|
15
26
|
## Features
|
|
@@ -47,7 +58,7 @@ Create a configuration file (default: `scripts-orchestrator.config.js`) that def
|
|
|
47
58
|
|
|
48
59
|
## Command Types
|
|
49
60
|
|
|
50
|
-
The orchestrator is completely agnostic to what commands it runs. It can execute any npm scripts
|
|
61
|
+
The orchestrator is completely agnostic to what commands it runs. It can execute any npm scripts. Common use cases include:
|
|
51
62
|
|
|
52
63
|
1. **Build Processes**: Compile, bundle, or build your project
|
|
53
64
|
2. **Testing**: Run unit tests, integration tests, or end-to-end tests
|
|
@@ -56,7 +67,7 @@ The orchestrator is completely agnostic to what commands it runs. It can execute
|
|
|
56
67
|
5. **Deployment**: Run deployment scripts or environment checks
|
|
57
68
|
6. **Custom Scripts**: Execute any custom npm scripts or shell commands
|
|
58
69
|
|
|
59
|
-
The orchestrator doesn't care what the commands do - it just ensures they run in
|
|
70
|
+
The orchestrator doesn't care what the commands do - it just ensures they run (in parallel), handles dependencies, manages background processes, and provides proper logging and error handling.
|
|
60
71
|
|
|
61
72
|
## Usage
|
|
62
73
|
|
|
@@ -81,19 +92,6 @@ The orchestrator doesn't care what the commands do - it just ensures they run in
|
|
|
81
92
|
npm run scripts-orchestrator -- ./path/to/your/config.js
|
|
82
93
|
```
|
|
83
94
|
|
|
84
|
-
### Global Installation
|
|
85
|
-
|
|
86
|
-
1. Create a configuration file in your project root
|
|
87
|
-
2. Configure your commands in the config file
|
|
88
|
-
3. Run the orchestrator:
|
|
89
|
-
```bash
|
|
90
|
-
# Using default config file (scripts-orchestrator.config.js)
|
|
91
|
-
scripts-orchestrator
|
|
92
|
-
|
|
93
|
-
# Or specify a custom config file
|
|
94
|
-
scripts-orchestrator ./path/to/your/config.js
|
|
95
|
-
```
|
|
96
|
-
|
|
97
95
|
## Error Handling
|
|
98
96
|
|
|
99
97
|
- The script tracks failed and skipped commands
|
|
@@ -103,7 +101,7 @@ The orchestrator doesn't care what the commands do - it just ensures they run in
|
|
|
103
101
|
|
|
104
102
|
## Logging
|
|
105
103
|
|
|
106
|
-
- Each command's output is logged to `
|
|
104
|
+
- Each command's output is logged to `scripts-orchestrator-logs/<command>.log` in the current working directory
|
|
107
105
|
- Provides real-time status updates during execution
|
|
108
106
|
- Summarizes results at the end of execution
|
|
109
107
|
|
|
@@ -112,20 +110,13 @@ The orchestrator doesn't care what the commands do - it just ensures they run in
|
|
|
112
110
|
- `0`: All commands executed successfully
|
|
113
111
|
- `1`: One or more commands failed or were skipped
|
|
114
112
|
|
|
115
|
-
##
|
|
113
|
+
## Disclaimer
|
|
116
114
|
|
|
117
|
-
The
|
|
118
|
-
- SIGINT (Ctrl+C)
|
|
119
|
-
- SIGTERM
|
|
120
|
-
- SIGQUIT
|
|
121
|
-
- SIGHUP
|
|
122
|
-
- Uncaught exceptions
|
|
123
|
-
- Unhandled rejections
|
|
115
|
+
This software is provided "as is", without warranty of any kind, express or implied. The author(s) shall not be liable for any claims, damages, or other liabilities arising from the use of this software. Users are responsible for testing and verifying the software in their own environment before using it in production.
|
|
124
116
|
|
|
125
117
|
## Contributing
|
|
126
118
|
|
|
127
119
|
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
128
120
|
|
|
129
121
|
## License
|
|
130
|
-
|
|
131
|
-
MIT © Vivek Kodira
|
|
122
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scripts-orchestrator",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "A powerful script orchestrator for running parallel commands with dependency management, background processes, and health checks",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"type": "module",
|