@wyxos/zephyr 0.2.9 → 0.2.11

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,105 +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 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
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
105
105
  - SSH access to target servers
package/bin/zephyr.mjs CHANGED
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import { main } from '../src/index.mjs'
3
-
4
- // Parse --type flag from command line arguments
5
- const args = process.argv.slice(2)
6
- const typeFlag = args.find(arg => arg.startsWith('--type='))
7
- const releaseType = typeFlag ? typeFlag.split('=')[1] : null
8
-
9
- // Pass the type to main function
10
- main(releaseType).catch((error) => {
11
- console.error(error.message)
12
- process.exit(1)
13
- })
2
+ import { main } from '../src/index.mjs'
3
+
4
+ // Parse --type flag from command line arguments
5
+ const args = process.argv.slice(2)
6
+ const typeFlag = args.find(arg => arg.startsWith('--type='))
7
+ const releaseType = typeFlag ? typeFlag.split('=')[1] : null
8
+
9
+ // Pass the type to main function
10
+ main(releaseType).catch((error) => {
11
+ console.error(error.message)
12
+ process.exit(1)
13
+ })
package/package.json CHANGED
@@ -1,53 +1,53 @@
1
- {
2
- "name": "@wyxos/zephyr",
3
- "version": "0.2.9",
4
- "description": "A streamlined deployment tool for web applications with intelligent Laravel project detection",
5
- "type": "module",
6
- "main": "./src/index.mjs",
7
- "exports": {
8
- ".": "./src/index.mjs",
9
- "./ssh-utils": "./src/ssh-utils.mjs"
10
- },
11
- "bin": {
12
- "zephyr": "bin/zephyr.mjs"
13
- },
14
- "scripts": {
15
- "test": "vitest run",
16
- "release": "node bin/zephyr.mjs --type=node"
17
- },
18
- "keywords": [
19
- "deployment",
20
- "laravel",
21
- "ssh",
22
- "automation",
23
- "devops",
24
- "git"
25
- ],
26
- "author": "wyxos",
27
- "license": "MIT",
28
- "repository": {
29
- "type": "git",
30
- "url": "git+https://github.com/wyxos/zephyr.git"
31
- },
32
- "bugs": {
33
- "url": "https://github.com/wyxos/zephyr/issues"
34
- },
35
- "homepage": "https://github.com/wyxos/zephyr#readme",
36
- "engines": {
37
- "node": ">=16.0.0"
38
- },
39
- "files": [
40
- "bin/",
41
- "src/",
42
- "README.md"
43
- ],
44
- "dependencies": {
45
- "chalk": "5.3.0",
46
- "inquirer": "^9.2.12",
47
- "node-ssh": "^13.1.0",
48
- "semver": "^7.6.3"
49
- },
50
- "devDependencies": {
51
- "vitest": "^2.1.8"
52
- }
53
- }
1
+ {
2
+ "name": "@wyxos/zephyr",
3
+ "version": "0.2.11",
4
+ "description": "A streamlined deployment tool for web applications with intelligent Laravel project detection",
5
+ "type": "module",
6
+ "main": "./src/index.mjs",
7
+ "exports": {
8
+ ".": "./src/index.mjs",
9
+ "./ssh-utils": "./src/ssh-utils.mjs"
10
+ },
11
+ "bin": {
12
+ "zephyr": "bin/zephyr.mjs"
13
+ },
14
+ "scripts": {
15
+ "test": "vitest run",
16
+ "release": "node bin/zephyr.mjs --type=node"
17
+ },
18
+ "keywords": [
19
+ "deployment",
20
+ "laravel",
21
+ "ssh",
22
+ "automation",
23
+ "devops",
24
+ "git"
25
+ ],
26
+ "author": "wyxos",
27
+ "license": "MIT",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/wyxos/zephyr.git"
31
+ },
32
+ "bugs": {
33
+ "url": "https://github.com/wyxos/zephyr/issues"
34
+ },
35
+ "homepage": "https://github.com/wyxos/zephyr#readme",
36
+ "engines": {
37
+ "node": ">=16.0.0"
38
+ },
39
+ "files": [
40
+ "bin/",
41
+ "src/",
42
+ "README.md"
43
+ ],
44
+ "dependencies": {
45
+ "chalk": "5.3.0",
46
+ "inquirer": "^9.2.12",
47
+ "node-ssh": "^13.1.0",
48
+ "semver": "^7.6.3"
49
+ },
50
+ "devDependencies": {
51
+ "vitest": "^2.1.8"
52
+ }
53
+ }