@wyxos/zephyr 0.1.11 → 0.1.13
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 +104 -75
- package/bin/zephyr.mjs +6 -6
- package/package.json +48 -48
- package/src/index.mjs +1391 -1368
package/README.md
CHANGED
|
@@ -1,76 +1,105 @@
|
|
|
1
|
-
# @wyxos/zephyr
|
|
2
|
-
|
|
3
|
-
A streamlined deployment tool for web applications with intelligent Laravel project detection.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install -g @wyxos/zephyr
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Or run directly with npx:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npx @wyxos/zephyr
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Usage
|
|
18
|
-
|
|
19
|
-
Navigate to your project directory and run:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
zephyr
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Follow the interactive prompts to configure your deployment target:
|
|
26
|
-
- Server name and IP address
|
|
27
|
-
- Project path on the remote server
|
|
28
|
-
- Git branch to deploy
|
|
29
|
-
- SSH user and private key
|
|
30
|
-
|
|
31
|
-
Configuration is saved
|
|
32
|
-
|
|
33
|
-
## Features
|
|
34
|
-
|
|
35
|
-
- Automated Git operations (branch switching, commits, pushes)
|
|
36
|
-
- SSH-based deployment to remote servers
|
|
37
|
-
- Laravel project detection with smart task execution
|
|
38
|
-
- Intelligent dependency management (Composer, npm)
|
|
39
|
-
- Database migrations when detected
|
|
40
|
-
- Frontend asset compilation
|
|
41
|
-
- Cache clearing and queue worker management
|
|
42
|
-
- SSH key validation and management
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- **
|
|
52
|
-
- **
|
|
53
|
-
- **
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
-
|
|
1
|
+
# @wyxos/zephyr
|
|
2
|
+
|
|
3
|
+
A streamlined deployment tool for web applications with intelligent Laravel project detection.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @wyxos/zephyr
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or run directly with npx:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @wyxos/zephyr
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
Navigate to your project directory and run:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
zephyr
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Follow the interactive prompts to configure your deployment target:
|
|
26
|
+
- Server name and IP address
|
|
27
|
+
- Project path on the remote server
|
|
28
|
+
- Git branch to deploy
|
|
29
|
+
- SSH user and private key
|
|
30
|
+
|
|
31
|
+
Configuration is saved automatically for future deployments.
|
|
32
|
+
|
|
33
|
+
## Features
|
|
34
|
+
|
|
35
|
+
- Automated Git operations (branch switching, commits, pushes)
|
|
36
|
+
- SSH-based deployment to remote servers
|
|
37
|
+
- Laravel project detection with smart task execution
|
|
38
|
+
- Intelligent dependency management (Composer, npm)
|
|
39
|
+
- Database migrations when detected
|
|
40
|
+
- Frontend asset compilation
|
|
41
|
+
- Cache clearing and queue worker management
|
|
42
|
+
- SSH key validation and management
|
|
43
|
+
- Deployment locking to prevent concurrent runs
|
|
44
|
+
- Task snapshots for resuming failed deployments
|
|
45
|
+
- Comprehensive logging of all remote operations
|
|
46
|
+
|
|
47
|
+
## Smart Task Execution
|
|
48
|
+
|
|
49
|
+
Zephyr analyzes changed files and runs appropriate tasks:
|
|
50
|
+
|
|
51
|
+
- **Always**: `git pull origin <branch>`
|
|
52
|
+
- **Composer files changed**: `composer update --no-dev --no-interaction --prefer-dist`
|
|
53
|
+
- **Migration files added**: `php artisan migrate --force`
|
|
54
|
+
- **package.json changed**: `npm install`
|
|
55
|
+
- **Frontend files changed**: `npm run build`
|
|
56
|
+
- **PHP files changed**: Clear Laravel caches, restart queues
|
|
57
|
+
|
|
58
|
+
## Configuration
|
|
59
|
+
|
|
60
|
+
### Global Server Configuration
|
|
61
|
+
|
|
62
|
+
Servers are stored globally at `~/.config/zephyr/servers.json`:
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
[
|
|
66
|
+
{
|
|
67
|
+
"serverName": "production",
|
|
68
|
+
"serverIp": "192.168.1.100"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Project Configuration
|
|
74
|
+
|
|
75
|
+
Deployment targets are stored per-project at `.zephyr/config.json`:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"apps": [
|
|
80
|
+
{
|
|
81
|
+
"serverName": "production",
|
|
82
|
+
"projectPath": "~/webapps/myapp",
|
|
83
|
+
"branch": "main",
|
|
84
|
+
"sshUser": "forge",
|
|
85
|
+
"sshKey": "~/.ssh/id_rsa"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Project Directory Structure
|
|
92
|
+
|
|
93
|
+
Zephyr creates a `.zephyr/` directory in your project with:
|
|
94
|
+
- `config.json` - Project deployment configuration
|
|
95
|
+
- `deploy.lock` - Lock file to prevent concurrent deployments
|
|
96
|
+
- `pending-tasks.json` - Task snapshot for resuming failed deployments
|
|
97
|
+
- `{timestamp}.log` - Log files for each deployment run
|
|
98
|
+
|
|
99
|
+
The `.zephyr/` directory is automatically added to `.gitignore`.
|
|
100
|
+
|
|
101
|
+
## Requirements
|
|
102
|
+
|
|
103
|
+
- Node.js 16+
|
|
104
|
+
- Git
|
|
76
105
|
- SSH access to target servers
|
package/bin/zephyr.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { main } from '../src/index.mjs'
|
|
3
|
-
|
|
4
|
-
main().catch((error) => {
|
|
5
|
-
console.error(error.message)
|
|
6
|
-
process.exit(1)
|
|
7
|
-
})
|
|
2
|
+
import { main } from '../src/index.mjs'
|
|
3
|
+
|
|
4
|
+
main().catch((error) => {
|
|
5
|
+
console.error(error.message)
|
|
6
|
+
process.exit(1)
|
|
7
|
+
})
|
package/package.json
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@wyxos/zephyr",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "A streamlined deployment tool for web applications with intelligent Laravel project detection",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./src/index.mjs",
|
|
7
|
-
"bin": {
|
|
8
|
-
"zephyr": "bin/zephyr.mjs"
|
|
9
|
-
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"test": "vitest",
|
|
12
|
-
"release": "node publish.mjs"
|
|
13
|
-
},
|
|
14
|
-
"keywords": [
|
|
15
|
-
"deployment",
|
|
16
|
-
"laravel",
|
|
17
|
-
"ssh",
|
|
18
|
-
"automation",
|
|
19
|
-
"devops",
|
|
20
|
-
"git"
|
|
21
|
-
],
|
|
22
|
-
"author": "wyxos",
|
|
23
|
-
"license": "MIT",
|
|
24
|
-
"repository": {
|
|
25
|
-
"type": "git",
|
|
26
|
-
"url": "git+https://github.com/wyxos/zephyr.git"
|
|
27
|
-
},
|
|
28
|
-
"bugs": {
|
|
29
|
-
"url": "https://github.com/wyxos/zephyr/issues"
|
|
30
|
-
},
|
|
31
|
-
"homepage": "https://github.com/wyxos/zephyr#readme",
|
|
32
|
-
"engines": {
|
|
33
|
-
"node": ">=16.0.0"
|
|
34
|
-
},
|
|
35
|
-
"files": [
|
|
36
|
-
"bin/",
|
|
37
|
-
"src/",
|
|
38
|
-
"README.md"
|
|
39
|
-
],
|
|
40
|
-
"dependencies": {
|
|
41
|
-
"chalk": "5.3.0",
|
|
42
|
-
"inquirer": "^9.2.12",
|
|
43
|
-
"node-ssh": "^13.1.0"
|
|
44
|
-
},
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"vitest": "^2.1.8"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@wyxos/zephyr",
|
|
3
|
+
"version": "0.1.13",
|
|
4
|
+
"description": "A streamlined deployment tool for web applications with intelligent Laravel project detection",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./src/index.mjs",
|
|
7
|
+
"bin": {
|
|
8
|
+
"zephyr": "bin/zephyr.mjs"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "vitest",
|
|
12
|
+
"release": "node publish.mjs"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"deployment",
|
|
16
|
+
"laravel",
|
|
17
|
+
"ssh",
|
|
18
|
+
"automation",
|
|
19
|
+
"devops",
|
|
20
|
+
"git"
|
|
21
|
+
],
|
|
22
|
+
"author": "wyxos",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/wyxos/zephyr.git"
|
|
27
|
+
},
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/wyxos/zephyr/issues"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/wyxos/zephyr#readme",
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=16.0.0"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"bin/",
|
|
37
|
+
"src/",
|
|
38
|
+
"README.md"
|
|
39
|
+
],
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"chalk": "5.3.0",
|
|
42
|
+
"inquirer": "^9.2.12",
|
|
43
|
+
"node-ssh": "^13.1.0"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"vitest": "^2.1.8"
|
|
47
|
+
}
|
|
48
|
+
}
|