@git.zone/cli 2.13.7 → 2.13.10
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/assets/templates/gitignore/_gitignore +4 -0
- package/dist_ts/00_commitinfo_data.js +2 -2
- package/dist_ts/classes.gitzoneconfig.js +2 -2
- package/dist_ts/mod_commit/index.js +2 -2
- package/dist_ts/mod_config/classes.commitconfig.js +3 -3
- package/dist_ts/mod_config/classes.releaseconfig.js +3 -3
- package/dist_ts/mod_format/format.copy.js +2 -2
- package/dist_ts/mod_format/format.npmextra.js +2 -2
- package/dist_ts/mod_format/format.packagejson.js +3 -3
- package/dist_ts/mod_format/formatters/copy.formatter.js +2 -2
- package/dist_ts/mod_format/formatters/npmextra.formatter.js +2 -2
- package/dist_ts/mod_format/formatters/packagejson.formatter.js +3 -3
- package/dist_ts/mod_format/formatters/prettier.formatter.js +3 -3
- package/dist_ts/mod_format/index.js +2 -2
- package/dist_ts/mod_format/mod.plugins.d.ts +1 -1
- package/dist_ts/mod_format/mod.plugins.js +2 -2
- package/dist_ts/mod_services/classes.servicemanager.js +3 -3
- package/dist_ts/plugins.d.ts +1 -1
- package/dist_ts/plugins.js +2 -2
- package/package.json +16 -16
- package/readme.md +231 -218
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.gitzoneconfig.ts +1 -1
- package/ts/mod_commit/index.ts +1 -1
- package/ts/mod_config/classes.commitconfig.ts +2 -2
- package/ts/mod_config/classes.releaseconfig.ts +2 -2
- package/ts/mod_format/format.copy.ts +1 -1
- package/ts/mod_format/format.npmextra.ts +1 -1
- package/ts/mod_format/format.packagejson.ts +2 -2
- package/ts/mod_format/formatters/copy.formatter.ts +1 -1
- package/ts/mod_format/formatters/npmextra.formatter.ts +1 -1
- package/ts/mod_format/formatters/packagejson.formatter.ts +2 -2
- package/ts/mod_format/formatters/prettier.formatter.ts +2 -2
- package/ts/mod_format/index.ts +1 -1
- package/ts/mod_format/mod.plugins.ts +1 -1
- package/ts/mod_services/classes.servicemanager.ts +2 -2
- package/ts/plugins.ts +1 -1
package/readme.md
CHANGED
|
@@ -18,11 +18,11 @@ For reporting bugs, issues, or security vulnerabilities, please visit [community
|
|
|
18
18
|
### Installation
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
# Install globally via
|
|
22
|
-
npm install -g @git.zone/cli
|
|
23
|
-
|
|
24
|
-
# Or with pnpm (recommended)
|
|
21
|
+
# Install globally via pnpm (recommended)
|
|
25
22
|
pnpm add -g @git.zone/cli
|
|
23
|
+
|
|
24
|
+
# Or with npm
|
|
25
|
+
npm install -g @git.zone/cli
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
Once installed, you can use either `gitzone` or the shorter `gzone` command from anywhere in your terminal.
|
|
@@ -33,9 +33,12 @@ Once installed, you can use either `gitzone` or the shorter `gzone` command from
|
|
|
33
33
|
# Create a new TypeScript npm package
|
|
34
34
|
gitzone template npm
|
|
35
35
|
|
|
36
|
-
# Format your entire codebase
|
|
36
|
+
# Format your entire codebase (dry-run by default)
|
|
37
37
|
gitzone format
|
|
38
38
|
|
|
39
|
+
# Apply formatting changes
|
|
40
|
+
gitzone format --write
|
|
41
|
+
|
|
39
42
|
# Start local MongoDB and MinIO services
|
|
40
43
|
gitzone services start
|
|
41
44
|
|
|
@@ -45,167 +48,210 @@ gitzone commit
|
|
|
45
48
|
|
|
46
49
|
## 🛠️ Core Features
|
|
47
50
|
|
|
48
|
-
###
|
|
51
|
+
### 🔀 Semantic Commits & Versioning
|
|
49
52
|
|
|
50
|
-
|
|
53
|
+
Create standardized commits with AI-powered suggestions that automatically handle versioning:
|
|
51
54
|
|
|
52
55
|
```bash
|
|
53
|
-
|
|
56
|
+
# Interactive commit with AI recommendations
|
|
57
|
+
gitzone commit
|
|
58
|
+
|
|
59
|
+
# Auto-accept AI recommendations (skipped for BREAKING CHANGEs)
|
|
60
|
+
gitzone commit -y
|
|
61
|
+
|
|
62
|
+
# Auto-accept, push, build, and release
|
|
63
|
+
gitzone commit -ypbr
|
|
54
64
|
```
|
|
55
65
|
|
|
56
|
-
**
|
|
66
|
+
**Flags:**
|
|
57
67
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
- **`clean`** - Remove containers AND data (⚠️ destructive)
|
|
68
|
+
| Flag | Long Form | Description |
|
|
69
|
+
|------|-----------|-------------|
|
|
70
|
+
| `-y` | `--yes` | Auto-accept AI recommendations |
|
|
71
|
+
| `-p` | `--push` | Push to remote after commit |
|
|
72
|
+
| `-t` | `--test` | Run tests before committing |
|
|
73
|
+
| `-b` | `--build` | Build after commit, verify clean tree |
|
|
74
|
+
| `-r` | `--release` | Publish to configured npm registries |
|
|
75
|
+
| | `--format` | Run format before committing |
|
|
67
76
|
|
|
68
|
-
**
|
|
77
|
+
**Workflow steps:**
|
|
69
78
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
79
|
+
1. 🤖 **AI-powered analysis** — analyzes your changes and suggests commit type, scope, and message
|
|
80
|
+
2. 📝 Interactive commit message builder (type: `fix`/`feat`/`BREAKING CHANGE`, scope, description)
|
|
81
|
+
3. 📜 Automatic changelog generation
|
|
82
|
+
4. 🏷️ Automatic version bumping (major/minor/patch) with git tag creation
|
|
83
|
+
5. 🔨 Optional build & verification
|
|
84
|
+
6. 🚀 Optional push to origin
|
|
85
|
+
7. 📦 Optional publish to npm registries
|
|
76
86
|
|
|
77
|
-
|
|
87
|
+
Supports both npm (`package.json`) and Deno (`deno.json`) projects, including dual-type projects.
|
|
88
|
+
|
|
89
|
+
### 🎨 Intelligent Code Formatting
|
|
90
|
+
|
|
91
|
+
Automatically format and standardize your entire codebase. **Dry-run by default** — nothing changes until you explicitly use `--write`:
|
|
78
92
|
|
|
79
93
|
```bash
|
|
80
|
-
#
|
|
81
|
-
gitzone
|
|
94
|
+
# Preview what would change (default behavior)
|
|
95
|
+
gitzone format
|
|
82
96
|
|
|
83
|
-
#
|
|
84
|
-
gitzone
|
|
97
|
+
# Apply changes
|
|
98
|
+
gitzone format --write
|
|
85
99
|
|
|
86
|
-
#
|
|
87
|
-
gitzone
|
|
88
|
-
# Output: mongodb://defaultadmin:defaultpass@192.168.1.100:27018/myproject?authSource=admin
|
|
100
|
+
# Auto-approve without prompts
|
|
101
|
+
gitzone format --yes --write
|
|
89
102
|
|
|
90
|
-
#
|
|
91
|
-
gitzone
|
|
103
|
+
# Show detailed diffs
|
|
104
|
+
gitzone format --diff
|
|
92
105
|
|
|
93
|
-
#
|
|
94
|
-
gitzone
|
|
106
|
+
# Enable verbose logging
|
|
107
|
+
gitzone format --verbose
|
|
95
108
|
```
|
|
96
109
|
|
|
97
|
-
|
|
110
|
+
**Flags:**
|
|
111
|
+
|
|
112
|
+
| Flag | Description |
|
|
113
|
+
|------|-------------|
|
|
114
|
+
| `--write` / `-w` | Apply changes (default is dry-run) |
|
|
115
|
+
| `--yes` | Auto-approve without interactive confirmation |
|
|
116
|
+
| `--plan-only` | Only show what would be done |
|
|
117
|
+
| `--save-plan <file>` | Save the format plan to a file |
|
|
118
|
+
| `--from-plan <file>` | Load and execute a saved plan |
|
|
119
|
+
| `--detailed` | Show detailed stats and save report |
|
|
120
|
+
| `--parallel` / `--no-parallel` | Toggle parallel execution |
|
|
121
|
+
| `--verbose` | Enable verbose logging |
|
|
122
|
+
| `--diff` | Show file diffs |
|
|
123
|
+
|
|
124
|
+
**Formatters (executed in order):**
|
|
125
|
+
|
|
126
|
+
1. 🧹 **Cleanup** — removes obsolete files (yarn.lock, package-lock.json, tslint.json, etc.)
|
|
127
|
+
2. ⚙️ **Npmextra** — formats and standardizes `npmextra.json`
|
|
128
|
+
3. 📜 **License** — ensures proper licensing and checks dependency licenses
|
|
129
|
+
4. 📦 **Package.json** — standardizes package configuration
|
|
130
|
+
5. 📋 **Templates** — applies project template updates
|
|
131
|
+
6. 🙈 **Gitignore** — updates repository ignore rules
|
|
132
|
+
7. 🔧 **Tsconfig** — optimizes TypeScript configuration
|
|
133
|
+
8. ✨ **Prettier** — applies code formatting
|
|
134
|
+
9. 📖 **Readme** — ensures readme files exist
|
|
135
|
+
10. 📂 **Copy** — copies configured files
|
|
98
136
|
|
|
99
|
-
###
|
|
137
|
+
### 🐳 Development Services Management
|
|
100
138
|
|
|
101
|
-
|
|
139
|
+
Effortlessly manage local development services (MongoDB, MinIO S3, Elasticsearch) with Docker:
|
|
102
140
|
|
|
103
141
|
```bash
|
|
104
|
-
gitzone
|
|
142
|
+
gitzone services [command]
|
|
105
143
|
```
|
|
106
144
|
|
|
107
|
-
**
|
|
145
|
+
**Commands:**
|
|
108
146
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
147
|
+
| Command | Description |
|
|
148
|
+
|---------|-------------|
|
|
149
|
+
| `start [service]` | Start services (`mongo`\|`s3`\|`elasticsearch`\|`all`) |
|
|
150
|
+
| `stop [service]` | Stop services |
|
|
151
|
+
| `restart [service]` | Restart services |
|
|
152
|
+
| `status` | Show current service status |
|
|
153
|
+
| `config` | Display configuration details |
|
|
154
|
+
| `compass` | Get MongoDB Compass connection string with network IP |
|
|
155
|
+
| `logs [service] [lines]` | View service logs (default: 20 lines) |
|
|
156
|
+
| `reconfigure` | Reassign ports and restart all services |
|
|
157
|
+
| `remove` | Remove containers (preserves data) |
|
|
158
|
+
| `clean` | Remove containers AND data (⚠️ destructive) |
|
|
113
159
|
|
|
114
|
-
|
|
160
|
+
**Service aliases:**
|
|
115
161
|
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
- ✅ Documentation structure
|
|
162
|
+
- `mongo` / `mongodb` — MongoDB
|
|
163
|
+
- `minio` / `s3` — MinIO (S3-compatible storage)
|
|
164
|
+
- `elasticsearch` / `es` — Elasticsearch
|
|
165
|
+
- `all` — All services (default)
|
|
121
166
|
|
|
122
|
-
|
|
167
|
+
**Key features:**
|
|
123
168
|
|
|
124
|
-
|
|
169
|
+
- 🎲 **Smart port assignment** — automatically assigns random ports (20000–30000) to avoid conflicts
|
|
170
|
+
- 📦 **Project isolation** — each project gets its own containers with unique names
|
|
171
|
+
- 💾 **Data persistence** — data stored in `.nogit/` survives container restarts
|
|
172
|
+
- 🔗 **MongoDB Compass support** — instantly get connection strings for GUI access
|
|
173
|
+
- 🌐 **Network IP detection** — detects your local network IP for remote connections
|
|
174
|
+
- ⚙️ **Auto-configuration** — creates `.nogit/env.json` with smart defaults
|
|
125
175
|
|
|
126
|
-
|
|
127
|
-
# Preview changes without applying them
|
|
128
|
-
gitzone format --dry-run
|
|
176
|
+
**Global operations (`-g` flag):**
|
|
129
177
|
|
|
130
|
-
|
|
131
|
-
|
|
178
|
+
```bash
|
|
179
|
+
# List all registered projects
|
|
180
|
+
gitzone services list -g
|
|
132
181
|
|
|
133
|
-
#
|
|
134
|
-
gitzone
|
|
182
|
+
# Show status across all projects
|
|
183
|
+
gitzone services status -g
|
|
135
184
|
|
|
136
|
-
#
|
|
137
|
-
gitzone
|
|
185
|
+
# Stop all containers across all projects
|
|
186
|
+
gitzone services stop -g
|
|
138
187
|
|
|
139
|
-
#
|
|
140
|
-
gitzone
|
|
188
|
+
# Remove stale registry entries
|
|
189
|
+
gitzone services cleanup -g
|
|
141
190
|
```
|
|
142
191
|
|
|
143
|
-
**
|
|
144
|
-
|
|
145
|
-
- 🔄 **Smart caching** - Only processes changed files
|
|
146
|
-
- 🛡️ **Rollback support** - Undo formatting changes if needed
|
|
147
|
-
- 📊 **Detailed reporting** - See exactly what changed
|
|
148
|
-
- ⚡ **Parallel execution** - Format multiple files simultaneously
|
|
149
|
-
- 🎯 **Module-specific formatting** - Target specific formatters
|
|
150
|
-
|
|
151
|
-
**Rollback capabilities:**
|
|
192
|
+
**Example workflow:**
|
|
152
193
|
|
|
153
194
|
```bash
|
|
154
|
-
#
|
|
155
|
-
gitzone
|
|
195
|
+
# Start all services for your project
|
|
196
|
+
gitzone services start
|
|
156
197
|
|
|
157
|
-
#
|
|
158
|
-
gitzone
|
|
198
|
+
# Check what's running
|
|
199
|
+
gitzone services status
|
|
159
200
|
|
|
160
|
-
#
|
|
161
|
-
gitzone
|
|
201
|
+
# Get MongoDB Compass connection string
|
|
202
|
+
gitzone services compass
|
|
203
|
+
# Output: mongodb://defaultadmin:defaultpass@192.168.1.100:27018/myproject?authSource=admin
|
|
162
204
|
|
|
163
|
-
#
|
|
164
|
-
gitzone
|
|
205
|
+
# View MongoDB logs
|
|
206
|
+
gitzone services logs mongo 50
|
|
207
|
+
|
|
208
|
+
# Stop services when done
|
|
209
|
+
gitzone services stop
|
|
165
210
|
```
|
|
166
211
|
|
|
167
|
-
|
|
212
|
+
### ⚙️ Release & Commit Configuration
|
|
168
213
|
|
|
169
|
-
|
|
170
|
-
- **License** - Ensure proper licensing
|
|
171
|
-
- **Package.json** - Standardize package configurations
|
|
172
|
-
- **Tsconfig** - TypeScript configuration optimization
|
|
173
|
-
- **Readme** - Documentation formatting
|
|
174
|
-
- **Gitignore** - Repository ignore rules
|
|
175
|
-
- **Templates** - Project template updates
|
|
176
|
-
- **Npmextra** - Extended npm configurations
|
|
177
|
-
- **Cleanup** - Removes obsolete files (yarn.lock, package-lock.json, tslint.json, etc.)
|
|
214
|
+
Manage release registries and commit settings:
|
|
178
215
|
|
|
179
|
-
|
|
216
|
+
```bash
|
|
217
|
+
gitzone config [subcommand]
|
|
218
|
+
```
|
|
180
219
|
|
|
181
|
-
|
|
220
|
+
| Command | Description |
|
|
221
|
+
|---------|-------------|
|
|
222
|
+
| `show` | Display current release config (registries, access level) |
|
|
223
|
+
| `add [url]` | Add a registry URL (default: `https://registry.npmjs.org`) |
|
|
224
|
+
| `remove [url]` | Remove a registry URL (interactive selection if no URL) |
|
|
225
|
+
| `clear` | Clear all registries (with confirmation) |
|
|
226
|
+
| `access [public\|private]` | Set npm access level for publishing |
|
|
227
|
+
| `commit alwaysTest [true\|false]` | Always run tests before commit |
|
|
228
|
+
| `commit alwaysBuild [true\|false]` | Always build after commit |
|
|
229
|
+
| `services` | Configure which services are enabled |
|
|
182
230
|
|
|
183
|
-
|
|
184
|
-
# Interactive commit with AI recommendations
|
|
185
|
-
gitzone commit
|
|
231
|
+
Configuration is stored in `npmextra.json` under the `@git.zone/cli` key.
|
|
186
232
|
|
|
187
|
-
|
|
188
|
-
|
|
233
|
+
### 📦 Project Templates
|
|
234
|
+
|
|
235
|
+
Instantly scaffold production-ready projects with best practices built-in:
|
|
189
236
|
|
|
190
|
-
|
|
191
|
-
gitzone
|
|
237
|
+
```bash
|
|
238
|
+
gitzone template [template-name]
|
|
192
239
|
```
|
|
193
240
|
|
|
194
|
-
|
|
241
|
+
**Interactive templates:**
|
|
195
242
|
|
|
196
|
-
-
|
|
197
|
-
-
|
|
198
|
-
-
|
|
199
|
-
-
|
|
200
|
-
- 🚀 Optional auto-push to origin
|
|
201
|
-
- 🎯 Conventional commit compliance
|
|
243
|
+
- **`npm`** — TypeScript npm package with testing, CI/CD, and full tooling
|
|
244
|
+
- **`service`** — Microservice architecture with Docker support
|
|
245
|
+
- **`website`** — Modern web application with LitElement and service workers
|
|
246
|
+
- **`wcc`** — Web Component Collection for reusable UI components
|
|
202
247
|
|
|
203
|
-
|
|
248
|
+
Each template comes pre-configured with:
|
|
204
249
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
250
|
+
- ✅ TypeScript with modern configurations
|
|
251
|
+
- ✅ Automated testing setup with `@git.zone/tstest`
|
|
252
|
+
- ✅ CI/CD pipelines (GitLab/GitHub)
|
|
253
|
+
- ✅ Code formatting and linting
|
|
254
|
+
- ✅ Documentation structure
|
|
209
255
|
|
|
210
256
|
### 🏗️ Meta Repository Management
|
|
211
257
|
|
|
@@ -218,36 +264,22 @@ gitzone meta init
|
|
|
218
264
|
# Add a sub-project
|
|
219
265
|
gitzone meta add [name] [git-url]
|
|
220
266
|
|
|
221
|
-
# Update all sub-projects
|
|
267
|
+
# Update all sub-projects (clone missing, clean superfluous)
|
|
222
268
|
gitzone meta update
|
|
223
269
|
|
|
224
270
|
# Remove a sub-project
|
|
225
271
|
gitzone meta remove [name]
|
|
226
272
|
```
|
|
227
273
|
|
|
228
|
-
Perfect for:
|
|
229
|
-
|
|
230
|
-
- Monorepo management
|
|
231
|
-
- Multi-package projects
|
|
232
|
-
- Coordinated deployments
|
|
233
|
-
- Synchronized versioning
|
|
234
|
-
|
|
235
274
|
### 🐳 Docker Management
|
|
236
275
|
|
|
237
276
|
Streamline your Docker workflow:
|
|
238
277
|
|
|
239
278
|
```bash
|
|
240
|
-
# Clean up all Docker resources
|
|
279
|
+
# Clean up all Docker resources (containers, images, volumes, networks)
|
|
241
280
|
gitzone docker prune
|
|
242
281
|
```
|
|
243
282
|
|
|
244
|
-
This command removes:
|
|
245
|
-
|
|
246
|
-
- Stopped containers
|
|
247
|
-
- Unused images
|
|
248
|
-
- Dangling volumes
|
|
249
|
-
- Unused networks
|
|
250
|
-
|
|
251
283
|
### 🔗 Quick CI/CD Access
|
|
252
284
|
|
|
253
285
|
Jump directly to your CI/CD configurations:
|
|
@@ -270,12 +302,7 @@ Smoothly transition users from old to new packages:
|
|
|
270
302
|
gitzone deprecate
|
|
271
303
|
```
|
|
272
304
|
|
|
273
|
-
Interactive wizard for
|
|
274
|
-
|
|
275
|
-
- Setting deprecation notices
|
|
276
|
-
- Guiding users to replacements
|
|
277
|
-
- Updating registry metadata
|
|
278
|
-
- Coordinating migration paths
|
|
305
|
+
Interactive wizard that prompts for registry URLs, old package name, and new package name — then runs `npm deprecate` across all specified registries.
|
|
279
306
|
|
|
280
307
|
### 🚦 Project Initialization
|
|
281
308
|
|
|
@@ -285,17 +312,10 @@ Prepare existing projects for development:
|
|
|
285
312
|
gitzone start
|
|
286
313
|
```
|
|
287
314
|
|
|
288
|
-
Automatically
|
|
289
|
-
|
|
290
|
-
- Checks out master branch
|
|
291
|
-
- Pulls latest changes
|
|
292
|
-
- Installs dependencies
|
|
293
|
-
- Sets up development environment
|
|
315
|
+
Automatically checks out master, pulls latest changes, and installs dependencies.
|
|
294
316
|
|
|
295
317
|
### 🔧 Helper Utilities
|
|
296
318
|
|
|
297
|
-
Quick utilities for common tasks:
|
|
298
|
-
|
|
299
319
|
```bash
|
|
300
320
|
# Generate a unique short ID
|
|
301
321
|
gitzone helpers shortid
|
|
@@ -303,31 +323,44 @@ gitzone helpers shortid
|
|
|
303
323
|
|
|
304
324
|
## 📋 Configuration
|
|
305
325
|
|
|
306
|
-
### npmextra.json
|
|
326
|
+
### npmextra.json
|
|
307
327
|
|
|
308
328
|
Customize gitzone behavior through `npmextra.json`:
|
|
309
329
|
|
|
310
330
|
```json
|
|
311
331
|
{
|
|
332
|
+
"@git.zone/cli": {
|
|
333
|
+
"projectType": "npm",
|
|
334
|
+
"release": {
|
|
335
|
+
"registries": [
|
|
336
|
+
"https://registry.npmjs.org"
|
|
337
|
+
],
|
|
338
|
+
"accessLevel": "public"
|
|
339
|
+
},
|
|
340
|
+
"commit": {
|
|
341
|
+
"alwaysTest": false,
|
|
342
|
+
"alwaysBuild": false
|
|
343
|
+
}
|
|
344
|
+
},
|
|
312
345
|
"gitzone": {
|
|
313
346
|
"format": {
|
|
314
347
|
"interactive": true,
|
|
315
|
-
"showDiffs": false,
|
|
316
|
-
"autoApprove": false,
|
|
317
348
|
"parallel": true,
|
|
318
|
-
"
|
|
349
|
+
"showStats": true,
|
|
350
|
+
"cache": {
|
|
319
351
|
"enabled": true,
|
|
320
|
-
"
|
|
321
|
-
"backupRetentionDays": 7
|
|
352
|
+
"clean": true
|
|
322
353
|
},
|
|
323
354
|
"modules": {
|
|
324
355
|
"skip": ["prettier"],
|
|
325
356
|
"only": [],
|
|
326
357
|
"order": []
|
|
327
358
|
},
|
|
328
|
-
"
|
|
329
|
-
"
|
|
330
|
-
"
|
|
359
|
+
"licenses": {
|
|
360
|
+
"allowed": ["MIT", "Apache-2.0"],
|
|
361
|
+
"exceptions": {
|
|
362
|
+
"some-package": "GPL-3.0"
|
|
363
|
+
}
|
|
331
364
|
}
|
|
332
365
|
}
|
|
333
366
|
}
|
|
@@ -336,35 +369,9 @@ Customize gitzone behavior through `npmextra.json`:
|
|
|
336
369
|
|
|
337
370
|
### Environment Variables
|
|
338
371
|
|
|
339
|
-
- `CI`
|
|
340
|
-
- `DEBUG`
|
|
341
|
-
- `GITZONE_FORMAT_PARALLEL`
|
|
342
|
-
|
|
343
|
-
## 🏆 Best Practices
|
|
344
|
-
|
|
345
|
-
### For New Projects
|
|
346
|
-
|
|
347
|
-
1. Start with a template: `gitzone template npm`
|
|
348
|
-
2. Set up local services: `gitzone services start`
|
|
349
|
-
3. Customize the generated structure
|
|
350
|
-
4. Run initial format: `gitzone format`
|
|
351
|
-
5. Set up CI/CD: `gitzone open ci`
|
|
352
|
-
|
|
353
|
-
### For Existing Projects
|
|
354
|
-
|
|
355
|
-
1. Initialize: `gitzone start`
|
|
356
|
-
2. Format codebase: `gitzone format --dry-run` (preview first!)
|
|
357
|
-
3. Apply formatting: `gitzone format --yes`
|
|
358
|
-
4. Set up services: `gitzone services start`
|
|
359
|
-
5. Commit changes: `gitzone commit`
|
|
360
|
-
|
|
361
|
-
### For Teams
|
|
362
|
-
|
|
363
|
-
1. Document format preferences in `npmextra.json`
|
|
364
|
-
2. Share `.nogit/env.json` template for consistent service setup
|
|
365
|
-
3. Use `--save-plan` for reviewable format changes
|
|
366
|
-
4. Enable rollback for safety
|
|
367
|
-
5. Standardize commit conventions
|
|
372
|
+
- `CI` — Detect CI environment for automated workflows
|
|
373
|
+
- `DEBUG` — Enable debug output
|
|
374
|
+
- `GITZONE_FORMAT_PARALLEL` — Control parallel formatting
|
|
368
375
|
|
|
369
376
|
## 🎯 Common Workflows
|
|
370
377
|
|
|
@@ -383,8 +390,9 @@ gitzone services start
|
|
|
383
390
|
# 4. Check service logs if needed
|
|
384
391
|
gitzone services logs mongo
|
|
385
392
|
|
|
386
|
-
# 5.
|
|
393
|
+
# 5. Preview format changes, then apply
|
|
387
394
|
gitzone format
|
|
395
|
+
gitzone format --write
|
|
388
396
|
|
|
389
397
|
# 6. Commit with semantic versioning
|
|
390
398
|
gitzone commit
|
|
@@ -393,6 +401,13 @@ gitzone commit
|
|
|
393
401
|
gitzone services stop
|
|
394
402
|
```
|
|
395
403
|
|
|
404
|
+
### Automated CI/CD Commit
|
|
405
|
+
|
|
406
|
+
```bash
|
|
407
|
+
# Auto-accept, test, build, push, and release in one command
|
|
408
|
+
gitzone commit -ytbpr
|
|
409
|
+
```
|
|
410
|
+
|
|
396
411
|
### Multi-Repository Management
|
|
397
412
|
|
|
398
413
|
```bash
|
|
@@ -408,29 +423,26 @@ gitzone meta add shared https://github.com/org/shared.git
|
|
|
408
423
|
gitzone meta update
|
|
409
424
|
```
|
|
410
425
|
|
|
411
|
-
### Safe Formatting with
|
|
426
|
+
### Safe Formatting with Plan Review
|
|
412
427
|
|
|
413
428
|
```bash
|
|
414
|
-
# 1. Preview changes
|
|
415
|
-
gitzone format
|
|
429
|
+
# 1. Preview changes (default)
|
|
430
|
+
gitzone format
|
|
416
431
|
|
|
417
432
|
# 2. Save plan for review
|
|
418
433
|
gitzone format --save-plan format-changes.json
|
|
419
434
|
|
|
420
|
-
# 3. Apply
|
|
421
|
-
gitzone format --from-plan format-changes.json
|
|
422
|
-
|
|
423
|
-
# 4. If something goes wrong, rollback
|
|
424
|
-
gitzone format --rollback
|
|
435
|
+
# 3. Apply from saved plan
|
|
436
|
+
gitzone format --from-plan format-changes.json --write
|
|
425
437
|
```
|
|
426
438
|
|
|
427
439
|
### Database-Driven Development
|
|
428
440
|
|
|
429
441
|
```bash
|
|
430
|
-
# 1. Start MongoDB and
|
|
442
|
+
# 1. Start MongoDB, MinIO, and Elasticsearch
|
|
431
443
|
gitzone services start
|
|
432
444
|
|
|
433
|
-
# 2. Get connection
|
|
445
|
+
# 2. Get connection details
|
|
434
446
|
gitzone services config
|
|
435
447
|
|
|
436
448
|
# 3. Connect with MongoDB Compass
|
|
@@ -447,43 +459,44 @@ gitzone services clean # ⚠️ Warning: deletes data
|
|
|
447
459
|
|
|
448
460
|
### CI/CD Platforms
|
|
449
461
|
|
|
450
|
-
- **GitLab CI**
|
|
451
|
-
- **GitHub Actions**
|
|
452
|
-
- **Docker**
|
|
462
|
+
- **GitLab CI** — full pipeline support with templates
|
|
463
|
+
- **GitHub Actions** — automated workflows
|
|
464
|
+
- **Docker** — container-based deployments
|
|
453
465
|
|
|
454
466
|
### Development Tools
|
|
455
467
|
|
|
456
|
-
- **TypeScript**
|
|
457
|
-
- **Prettier**
|
|
458
|
-
- **
|
|
459
|
-
- **MongoDB**
|
|
460
|
-
- **MinIO**
|
|
461
|
-
- **
|
|
468
|
+
- **TypeScript** — first-class support
|
|
469
|
+
- **Prettier** — code formatting
|
|
470
|
+
- **pnpm** — package management
|
|
471
|
+
- **MongoDB** — local database service
|
|
472
|
+
- **MinIO** — S3-compatible object storage
|
|
473
|
+
- **Elasticsearch** — search and analytics
|
|
474
|
+
- **MongoDB Compass** — database GUI integration
|
|
462
475
|
|
|
463
476
|
### Version Control
|
|
464
477
|
|
|
465
|
-
- **Git**
|
|
466
|
-
- **Semantic Versioning**
|
|
467
|
-
- **Conventional Commits**
|
|
478
|
+
- **Git** — deep integration
|
|
479
|
+
- **Semantic Versioning** — automatic version bumping
|
|
480
|
+
- **Conventional Commits** — standardized commit messages
|
|
481
|
+
- **AI-Powered Analysis** — intelligent commit suggestions via `@git.zone/tsdoc`
|
|
468
482
|
|
|
469
483
|
## 💡 Pro Tips
|
|
470
484
|
|
|
471
485
|
1. **Use aliases**: Add `alias gz='gitzone'` to your shell profile
|
|
472
|
-
2. **Combine
|
|
486
|
+
2. **Combine flags**: `gitzone commit -ypbr` for the full auto workflow
|
|
473
487
|
3. **Leverage templates**: Start projects right with proven structures
|
|
474
488
|
4. **Enable caching**: Dramatically speeds up formatting operations
|
|
475
|
-
5. **Save format plans**: Review changes before applying
|
|
489
|
+
5. **Save format plans**: Review changes before applying
|
|
476
490
|
6. **Port management**: Let services auto-assign ports to avoid conflicts
|
|
477
491
|
7. **Use MongoDB Compass**: `gitzone services compass` for visual DB management
|
|
492
|
+
8. **Global service management**: `gitzone services status -g` to see all projects' services at once
|
|
478
493
|
|
|
479
494
|
## 🐛 Troubleshooting
|
|
480
495
|
|
|
481
496
|
### Format Command Shows "Cancelled"
|
|
482
497
|
|
|
483
|
-
If the format command shows cancelled even after confirming:
|
|
484
|
-
|
|
485
498
|
- Check your `npmextra.json` configuration
|
|
486
|
-
- Try with `--yes`
|
|
499
|
+
- Try with `--yes --write` flags
|
|
487
500
|
- Use `--verbose` for detailed output
|
|
488
501
|
|
|
489
502
|
### Docker Commands Fail
|
|
@@ -496,19 +509,20 @@ docker info
|
|
|
496
509
|
|
|
497
510
|
### Services Won't Start
|
|
498
511
|
|
|
499
|
-
Check for port conflicts:
|
|
500
|
-
|
|
501
512
|
```bash
|
|
502
513
|
# Services auto-assign ports, but you can check the config
|
|
503
514
|
cat .nogit/env.json
|
|
504
515
|
|
|
505
516
|
# Verify Docker is running
|
|
506
517
|
docker ps
|
|
518
|
+
|
|
519
|
+
# Reassign ports if there are conflicts
|
|
520
|
+
gitzone services reconfigure
|
|
507
521
|
```
|
|
508
522
|
|
|
509
523
|
### Template Creation Issues
|
|
510
524
|
|
|
511
|
-
Verify npm
|
|
525
|
+
Verify pnpm/npm is properly configured:
|
|
512
526
|
|
|
513
527
|
```bash
|
|
514
528
|
npm config get registry
|
|
@@ -524,12 +538,11 @@ npm config get registry
|
|
|
524
538
|
|
|
525
539
|
gitzone is optimized for speed:
|
|
526
540
|
|
|
527
|
-
- **Parallel processing** for format operations
|
|
528
|
-
- **Smart caching** to avoid redundant work
|
|
529
|
-
- **Incremental updates** for meta repositories
|
|
530
|
-
- **
|
|
531
|
-
- **
|
|
532
|
-
- **Auto port assignment** eliminates manual configuration
|
|
541
|
+
- ⚡ **Parallel processing** for format operations
|
|
542
|
+
- 🧠 **Smart caching** to avoid redundant work
|
|
543
|
+
- 📊 **Incremental updates** for meta repositories
|
|
544
|
+
- 🐳 **Isolated services** prevent resource conflicts
|
|
545
|
+
- 🎲 **Auto port assignment** eliminates manual configuration
|
|
533
546
|
|
|
534
547
|
## License and Legal Information
|
|
535
548
|
|