Compare commits

..

6 Commits

Author SHA1 Message Date
eda67395fe v2.13.10
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2026-03-24 15:05:07 +00:00
470e87eb79 fix(config): migrate configuration handling from npmextra to smartconfig 2026-03-24 15:05:07 +00:00
3358a0eacc v2.13.9
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 10m42s
Default (tags) / release (push) Has been cancelled
Default (tags) / metadata (push) Has been cancelled
2026-03-11 19:10:18 +00:00
b65fac6257 fix(deps,readme): bump dependencies and update README to prefer pnpm and document semantic commit flags 2026-03-11 19:10:18 +00:00
4ab59609e6 v2.13.8
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 12m24s
Default (tags) / release (push) Has been cancelled
Default (tags) / metadata (push) Has been cancelled
2026-03-05 11:30:34 +00:00
32f106291f fix(dependencies): move runtime tooling packages from devDependencies to dependencies 2026-03-05 11:30:34 +00:00
22 changed files with 820 additions and 3002 deletions

View File

@@ -19,6 +19,10 @@ node_modules/
dist/
dist_*/
# rust
rust/target/
dist_rust/
# AI
.claude/
.serena/

View File

@@ -1,5 +1,27 @@
# Changelog
## 2026-03-24 - 2.13.10 - fix(config)
migrate configuration handling from npmextra to smartconfig
- replace @push.rocks/npmextra with @push.rocks/smartconfig across config, commit, format, and service modules
- switch managed project config file references from npmextra.json to smartconfig.json
- update formatting and package metadata checks to include smartconfig.json
- extend the gitignore template with Rust build output directories
## 2026-03-11 - 2.13.9 - fix(deps,readme)
bump dependencies and update README to prefer pnpm and document semantic commit flags
- Dev dependency updates: @git.zone/tsbuild -> ^4.3.0, @git.zone/tstest -> ^3.3.2, @types/node -> ^25.4.0
- Dependency upgrades: @git.zone/tsdoc -> ^2.0.0, @git.zone/tspublish -> ^1.11.2, @push.rocks/lik -> ^6.3.1, @push.rocks/smartfs -> ^1.5.0, @push.rocks/smartlog -> ^3.2.1, @push.rocks/smartstream -> ^3.4.0, prettier -> ^3.8.1 (and other minor/patch bumps)
- README changes: prefer pnpm for global install, clarify format command dry-run behavior and --write flag, add and document gitzone commit flags (-y/--yes, -p/--push, -t/--test, -b/--build, -r/--release) and AI-powered commit workflow
- No source code changes; this is a documentation and dependency refresh, recommend a patch release
## 2026-03-05 - 2.13.8 - fix(dependencies)
move runtime tooling packages from devDependencies to dependencies
- Removed @push.rocks/smartdelay, @push.rocks/smartinteract, @push.rocks/smartnetwork, and @push.rocks/smartshell from devDependencies and added them to dependencies
- No package version numbers were changed; this ensures the moved packages are installed for consumers at runtime
## 2026-03-05 - 2.13.7 - fix(deps)
bump devDependencies: @git.zone/tsbuild to ^4.1.4 and @push.rocks/smartshell to ^3.3.7

View File

@@ -1,7 +1,7 @@
{
"name": "@git.zone/cli",
"private": false,
"version": "2.13.7",
"version": "2.13.10",
"description": "A comprehensive CLI tool for enhancing and managing local development workflows with gitzone utilities, focusing on project setup, version control, code formatting, and template management.",
"main": "dist_ts/index.ts",
"typings": "dist_ts/index.d.ts",
@@ -57,45 +57,45 @@
},
"homepage": "https://gitlab.com/gitzone/private/gitzone#readme",
"devDependencies": {
"@git.zone/tsbuild": "^4.1.4",
"@git.zone/tsbuild": "^4.3.0",
"@git.zone/tsrun": "^2.0.1",
"@git.zone/tstest": "^3.1.4",
"@push.rocks/smartdelay": "^3.0.5",
"@push.rocks/smartinteract": "^2.0.16",
"@push.rocks/smartnetwork": "^4.4.0",
"@push.rocks/smartshell": "^3.3.7",
"@types/node": "^25.0.6"
"@git.zone/tstest": "^3.3.2",
"@types/node": "^25.4.0"
},
"dependencies": {
"@git.zone/tsdoc": "^1.12.0",
"@git.zone/tspublish": "^1.11.0",
"@git.zone/tsdoc": "^2.0.0",
"@git.zone/tspublish": "^1.11.2",
"@push.rocks/commitinfo": "^1.0.12",
"@push.rocks/early": "^4.0.4",
"@push.rocks/gulp-function": "^3.0.7",
"@push.rocks/lik": "^6.2.2",
"@push.rocks/npmextra": "^5.3.3",
"@push.rocks/lik": "^6.3.1",
"@push.rocks/smartconfig": "^6.0.0",
"@push.rocks/projectinfo": "^5.0.2",
"@push.rocks/smartcli": "^4.0.20",
"@push.rocks/smartdelay": "^3.0.5",
"@push.rocks/smartdiff": "^1.1.0",
"@push.rocks/smartfile": "^13.1.2",
"@push.rocks/smartfs": "^1.3.1",
"@push.rocks/smartfs": "^1.5.0",
"@push.rocks/smartgulp": "^3.0.4",
"@push.rocks/smartinteract": "^2.0.16",
"@push.rocks/smartjson": "^6.0.0",
"@push.rocks/smartlegal": "^1.0.27",
"@push.rocks/smartlog": "^3.1.10",
"@push.rocks/smartlog": "^3.2.1",
"@push.rocks/smartlog-destination-local": "^9.0.2",
"@push.rocks/smartmustache": "^3.0.2",
"@push.rocks/smartnetwork": "^4.4.0",
"@push.rocks/smartnpm": "^2.0.6",
"@push.rocks/smartobject": "^1.0.12",
"@push.rocks/smartopen": "^2.0.0",
"@push.rocks/smartpath": "^6.0.0",
"@push.rocks/smartpromise": "^4.2.3",
"@push.rocks/smartscaf": "^4.0.19",
"@push.rocks/smartstream": "^3.2.5",
"@push.rocks/smartshell": "^3.3.7",
"@push.rocks/smartstream": "^3.4.0",
"@push.rocks/smartunique": "^3.0.9",
"@push.rocks/smartupdate": "^2.0.6",
"@types/through2": "^2.0.41",
"prettier": "^3.7.4",
"prettier": "^3.8.1",
"through2": "^4.0.2"
},
"files": [

3263
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

455
readme.md
View File

@@ -18,11 +18,11 @@ For reporting bugs, issues, or security vulnerabilities, please visit [community
### Installation
```bash
# Install globally via npm
npm install -g @git.zone/cli
# Or with pnpm (recommended)
# Install globally via pnpm (recommended)
pnpm add -g @git.zone/cli
# Or with npm
npm install -g @git.zone/cli
```
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
# Create a new TypeScript npm package
gitzone template npm
# Format your entire codebase
# Format your entire codebase (dry-run by default)
gitzone format
# Apply formatting changes
gitzone format --write
# Start local MongoDB and MinIO services
gitzone services start
@@ -45,34 +48,146 @@ gitzone commit
## 🛠️ Core Features
### 🔀 Semantic Commits & Versioning
Create standardized commits with AI-powered suggestions that automatically handle versioning:
```bash
# Interactive commit with AI recommendations
gitzone commit
# Auto-accept AI recommendations (skipped for BREAKING CHANGEs)
gitzone commit -y
# Auto-accept, push, build, and release
gitzone commit -ypbr
```
**Flags:**
| Flag | Long Form | Description |
|------|-----------|-------------|
| `-y` | `--yes` | Auto-accept AI recommendations |
| `-p` | `--push` | Push to remote after commit |
| `-t` | `--test` | Run tests before committing |
| `-b` | `--build` | Build after commit, verify clean tree |
| `-r` | `--release` | Publish to configured npm registries |
| | `--format` | Run format before committing |
**Workflow steps:**
1. 🤖 **AI-powered analysis** — analyzes your changes and suggests commit type, scope, and message
2. 📝 Interactive commit message builder (type: `fix`/`feat`/`BREAKING CHANGE`, scope, description)
3. 📜 Automatic changelog generation
4. 🏷️ Automatic version bumping (major/minor/patch) with git tag creation
5. 🔨 Optional build & verification
6. 🚀 Optional push to origin
7. 📦 Optional publish to npm registries
Supports both npm (`package.json`) and Deno (`deno.json`) projects, including dual-type projects.
### 🎨 Intelligent Code Formatting
Automatically format and standardize your entire codebase. **Dry-run by default** — nothing changes until you explicitly use `--write`:
```bash
# Preview what would change (default behavior)
gitzone format
# Apply changes
gitzone format --write
# Auto-approve without prompts
gitzone format --yes --write
# Show detailed diffs
gitzone format --diff
# Enable verbose logging
gitzone format --verbose
```
**Flags:**
| Flag | Description |
|------|-------------|
| `--write` / `-w` | Apply changes (default is dry-run) |
| `--yes` | Auto-approve without interactive confirmation |
| `--plan-only` | Only show what would be done |
| `--save-plan <file>` | Save the format plan to a file |
| `--from-plan <file>` | Load and execute a saved plan |
| `--detailed` | Show detailed stats and save report |
| `--parallel` / `--no-parallel` | Toggle parallel execution |
| `--verbose` | Enable verbose logging |
| `--diff` | Show file diffs |
**Formatters (executed in order):**
1. 🧹 **Cleanup** — removes obsolete files (yarn.lock, package-lock.json, tslint.json, etc.)
2. ⚙️ **Npmextra** — formats and standardizes `npmextra.json`
3. 📜 **License** — ensures proper licensing and checks dependency licenses
4. 📦 **Package.json** — standardizes package configuration
5. 📋 **Templates** — applies project template updates
6. 🙈 **Gitignore** — updates repository ignore rules
7. 🔧 **Tsconfig** — optimizes TypeScript configuration
8.**Prettier** — applies code formatting
9. 📖 **Readme** — ensures readme files exist
10. 📂 **Copy** — copies configured files
### 🐳 Development Services Management
Effortlessly manage local MongoDB and MinIO (S3-compatible) services for your development environment:
Effortlessly manage local development services (MongoDB, MinIO S3, Elasticsearch) with Docker:
```bash
gitzone services [command]
```
**Available commands:**
**Commands:**
- **`start [service]`** - Start services (mongo|s3|all)
- **`stop [service]`** - Stop services (mongo|s3|all)
- **`restart [service]`** - Restart services
- **`status`** - Show current service status
- **`config`** - Display configuration details
- **`compass`** - Get MongoDB Compass connection string with network IP
- **`logs [service] [lines]`** - View service logs
- **`remove`** - Remove containers (preserves data)
- **`clean`** - Remove containers AND data (⚠️ destructive)
| Command | Description |
|---------|-------------|
| `start [service]` | Start services (`mongo`\|`s3`\|`elasticsearch`\|`all`) |
| `stop [service]` | Stop services |
| `restart [service]` | Restart services |
| `status` | Show current service status |
| `config` | Display configuration details |
| `compass` | Get MongoDB Compass connection string with network IP |
| `logs [service] [lines]` | View service logs (default: 20 lines) |
| `reconfigure` | Reassign ports and restart all services |
| `remove` | Remove containers (preserves data) |
| `clean` | Remove containers AND data (⚠️ destructive) |
**Service aliases:**
- `mongo` / `mongodb` — MongoDB
- `minio` / `s3` — MinIO (S3-compatible storage)
- `elasticsearch` / `es` — Elasticsearch
- `all` — All services (default)
**Key features:**
- 🎲 **Smart port assignment** - Automatically assigns random ports (20000-30000) to avoid conflicts
- 📦 **Project isolation** - Each project gets its own containers with unique names
- 💾 **Data persistence** - Data stored in `.nogit/` directories survives container restarts
- 🔗 **MongoDB Compass support** - Instantly get connection strings for GUI access
- 🌐 **Network IP detection** - Automatically detects your local network IP for remote connections
- ⚙️ **Auto-configuration** - Creates `.nogit/env.json` with smart defaults
- 🎲 **Smart port assignment** — automatically assigns random ports (2000030000) to avoid conflicts
- 📦 **Project isolation** — each project gets its own containers with unique names
- 💾 **Data persistence** — data stored in `.nogit/` survives container restarts
- 🔗 **MongoDB Compass support** — instantly get connection strings for GUI access
- 🌐 **Network IP detection** detects your local network IP for remote connections
- ⚙️ **Auto-configuration** — creates `.nogit/env.json` with smart defaults
**Global operations (`-g` flag):**
```bash
# List all registered projects
gitzone services list -g
# Show status across all projects
gitzone services status -g
# Stop all containers across all projects
gitzone services stop -g
# Remove stale registry entries
gitzone services cleanup -g
```
**Example workflow:**
@@ -94,7 +209,26 @@ gitzone services logs mongo 50
gitzone services stop
```
The services are configured via `.nogit/env.json` which is automatically created with secure defaults and random ports for each project.
### ⚙️ Release & Commit Configuration
Manage release registries and commit settings:
```bash
gitzone config [subcommand]
```
| Command | Description |
|---------|-------------|
| `show` | Display current release config (registries, access level) |
| `add [url]` | Add a registry URL (default: `https://registry.npmjs.org`) |
| `remove [url]` | Remove a registry URL (interactive selection if no URL) |
| `clear` | Clear all registries (with confirmation) |
| `access [public\|private]` | Set npm access level for publishing |
| `commit alwaysTest [true\|false]` | Always run tests before commit |
| `commit alwaysBuild [true\|false]` | Always build after commit |
| `services` | Configure which services are enabled |
Configuration is stored in `npmextra.json` under the `@git.zone/cli` key.
### 📦 Project Templates
@@ -104,12 +238,12 @@ Instantly scaffold production-ready projects with best practices built-in:
gitzone template [template-name]
```
**Available templates:**
**Interactive templates:**
- **`npm`** - TypeScript npm package with testing, CI/CD, and full tooling
- **`service`** - Microservice architecture with Docker support
- **`website`** - Modern web application with LitElement and service workers
- **`wcc`** - Web Component Collection for reusable UI components
- **`npm`** TypeScript npm package with testing, CI/CD, and full tooling
- **`service`** Microservice architecture with Docker support
- **`website`** Modern web application with LitElement and service workers
- **`wcc`** Web Component Collection for reusable UI components
Each template comes pre-configured with:
@@ -119,94 +253,6 @@ Each template comes pre-configured with:
- ✅ Code formatting and linting
- ✅ Documentation structure
### 🎨 Intelligent Code Formatting
The most powerful feature of gitzone - automatically format and standardize your entire codebase:
```bash
# Preview changes without applying them
gitzone format --dry-run
# Format with automatic approval
gitzone format --yes
# Save formatting plan for later execution
gitzone format --save-plan format-plan.json
# Execute a saved plan
gitzone format --from-plan format-plan.json
# Enable verbose output for debugging
gitzone format --verbose
```
**Format features:**
- 🔄 **Smart caching** - Only processes changed files
- 🛡️ **Rollback support** - Undo formatting changes if needed
- 📊 **Detailed reporting** - See exactly what changed
-**Parallel execution** - Format multiple files simultaneously
- 🎯 **Module-specific formatting** - Target specific formatters
**Rollback capabilities:**
```bash
# List all available backups
gitzone format --list-backups
# Rollback to the last operation
gitzone format --rollback
# Rollback to a specific operation
gitzone format --rollback [operation-id]
# Clean old backups
gitzone format --clean-backups
```
**Formatters included:**
- **Prettier** - JavaScript/TypeScript code formatting
- **License** - Ensure proper licensing
- **Package.json** - Standardize package configurations
- **Tsconfig** - TypeScript configuration optimization
- **Readme** - Documentation formatting
- **Gitignore** - Repository ignore rules
- **Templates** - Project template updates
- **Npmextra** - Extended npm configurations
- **Cleanup** - Removes obsolete files (yarn.lock, package-lock.json, tslint.json, etc.)
### 🔀 Semantic Commits & Versioning
Create standardized commits with AI-powered suggestions that automatically handle versioning:
```bash
# Interactive commit with AI recommendations
gitzone commit
# Auto-accept AI recommendations
gitzone commit -y
# Auto-accept and push
gitzone commit -y -p
```
Features:
- 🤖 **AI-powered analysis** - Analyzes your changes and suggests commit type, scope, and message
- 📝 Interactive commit message builder with smart defaults
- 🏷️ Automatic version bumping (major/minor/patch)
- 📜 Changelog generation
- 🚀 Optional auto-push to origin
- 🎯 Conventional commit compliance
The commit wizard guides you through:
1. **Type selection** (fix/feat/BREAKING CHANGE) with AI recommendation
2. **Scope definition** (component/module affected)
3. **Description crafting**
4. **Version bump determination**
### 🏗️ Meta Repository Management
Manage multiple related repositories as a cohesive unit:
@@ -218,36 +264,22 @@ gitzone meta init
# Add a sub-project
gitzone meta add [name] [git-url]
# Update all sub-projects
# Update all sub-projects (clone missing, clean superfluous)
gitzone meta update
# Remove a sub-project
gitzone meta remove [name]
```
Perfect for:
- Monorepo management
- Multi-package projects
- Coordinated deployments
- Synchronized versioning
### 🐳 Docker Management
Streamline your Docker workflow:
```bash
# Clean up all Docker resources
# Clean up all Docker resources (containers, images, volumes, networks)
gitzone docker prune
```
This command removes:
- Stopped containers
- Unused images
- Dangling volumes
- Unused networks
### 🔗 Quick CI/CD Access
Jump directly to your CI/CD configurations:
@@ -270,12 +302,7 @@ Smoothly transition users from old to new packages:
gitzone deprecate
```
Interactive wizard for:
- Setting deprecation notices
- Guiding users to replacements
- Updating registry metadata
- Coordinating migration paths
Interactive wizard that prompts for registry URLs, old package name, and new package name — then runs `npm deprecate` across all specified registries.
### 🚦 Project Initialization
@@ -285,17 +312,10 @@ Prepare existing projects for development:
gitzone start
```
Automatically:
- Checks out master branch
- Pulls latest changes
- Installs dependencies
- Sets up development environment
Automatically checks out master, pulls latest changes, and installs dependencies.
### 🔧 Helper Utilities
Quick utilities for common tasks:
```bash
# Generate a unique short ID
gitzone helpers shortid
@@ -303,31 +323,44 @@ gitzone helpers shortid
## 📋 Configuration
### npmextra.json Configuration
### npmextra.json
Customize gitzone behavior through `npmextra.json`:
```json
{
"@git.zone/cli": {
"projectType": "npm",
"release": {
"registries": [
"https://registry.npmjs.org"
],
"accessLevel": "public"
},
"commit": {
"alwaysTest": false,
"alwaysBuild": false
}
},
"gitzone": {
"format": {
"interactive": true,
"showDiffs": false,
"autoApprove": false,
"parallel": true,
"rollback": {
"showStats": true,
"cache": {
"enabled": true,
"autoRollbackOnError": true,
"backupRetentionDays": 7
"clean": true
},
"modules": {
"skip": ["prettier"],
"only": [],
"order": []
},
"cache": {
"enabled": true,
"clean": true
"licenses": {
"allowed": ["MIT", "Apache-2.0"],
"exceptions": {
"some-package": "GPL-3.0"
}
}
}
}
@@ -336,35 +369,9 @@ Customize gitzone behavior through `npmextra.json`:
### Environment Variables
- `CI` - Detect CI environment for automated workflows
- `DEBUG` - Enable debug output
- `GITZONE_FORMAT_PARALLEL` - Control parallel formatting
## 🏆 Best Practices
### For New Projects
1. Start with a template: `gitzone template npm`
2. Set up local services: `gitzone services start`
3. Customize the generated structure
4. Run initial format: `gitzone format`
5. Set up CI/CD: `gitzone open ci`
### For Existing Projects
1. Initialize: `gitzone start`
2. Format codebase: `gitzone format --dry-run` (preview first!)
3. Apply formatting: `gitzone format --yes`
4. Set up services: `gitzone services start`
5. Commit changes: `gitzone commit`
### For Teams
1. Document format preferences in `npmextra.json`
2. Share `.nogit/env.json` template for consistent service setup
3. Use `--save-plan` for reviewable format changes
4. Enable rollback for safety
5. Standardize commit conventions
- `CI` Detect CI environment for automated workflows
- `DEBUG` Enable debug output
- `GITZONE_FORMAT_PARALLEL` Control parallel formatting
## 🎯 Common Workflows
@@ -383,8 +390,9 @@ gitzone services start
# 4. Check service logs if needed
gitzone services logs mongo
# 5. Format code
# 5. Preview format changes, then apply
gitzone format
gitzone format --write
# 6. Commit with semantic versioning
gitzone commit
@@ -393,6 +401,13 @@ gitzone commit
gitzone services stop
```
### Automated CI/CD Commit
```bash
# Auto-accept, test, build, push, and release in one command
gitzone commit -ytbpr
```
### Multi-Repository Management
```bash
@@ -408,29 +423,26 @@ gitzone meta add shared https://github.com/org/shared.git
gitzone meta update
```
### Safe Formatting with Rollback
### Safe Formatting with Plan Review
```bash
# 1. Preview changes
gitzone format --dry-run
# 1. Preview changes (default)
gitzone format
# 2. Save plan for review
gitzone format --save-plan format-changes.json
# 3. Apply formatting
gitzone format --from-plan format-changes.json
# 4. If something goes wrong, rollback
gitzone format --rollback
# 3. Apply from saved plan
gitzone format --from-plan format-changes.json --write
```
### Database-Driven Development
```bash
# 1. Start MongoDB and MinIO
# 1. Start MongoDB, MinIO, and Elasticsearch
gitzone services start
# 2. Get connection string for your app
# 2. Get connection details
gitzone services config
# 3. Connect with MongoDB Compass
@@ -447,43 +459,44 @@ gitzone services clean # ⚠️ Warning: deletes data
### CI/CD Platforms
- **GitLab CI** - Full pipeline support with templates
- **GitHub Actions** - Automated workflows
- **Docker** - Container-based deployments
- **GitLab CI** — full pipeline support with templates
- **GitHub Actions** — automated workflows
- **Docker** — container-based deployments
### Development Tools
- **TypeScript** - First-class support
- **Prettier** - Code formatting
- **npm/pnpm** - Package management
- **MongoDB** - Local database service
- **MinIO** - S3-compatible object storage
- **MongoDB Compass** - Database GUI integration
- **TypeScript** — first-class support
- **Prettier** — code formatting
- **pnpm** — package management
- **MongoDB** — local database service
- **MinIO** S3-compatible object storage
- **Elasticsearch** — search and analytics
- **MongoDB Compass** — database GUI integration
### Version Control
- **Git** - Deep integration
- **Semantic Versioning** - Automatic version bumping
- **Conventional Commits** - Standardized commit messages
- **Git** — deep integration
- **Semantic Versioning** — automatic version bumping
- **Conventional Commits** — standardized commit messages
- **AI-Powered Analysis** — intelligent commit suggestions via `@git.zone/tsdoc`
## 💡 Pro Tips
1. **Use aliases**: Add `alias gz='gitzone'` to your shell profile
2. **Combine commands**: `gitzone format --yes && gitzone commit`
2. **Combine flags**: `gitzone commit -ypbr` for the full auto workflow
3. **Leverage templates**: Start projects right with proven structures
4. **Enable caching**: Dramatically speeds up formatting operations
5. **Save format plans**: Review changes before applying in production
5. **Save format plans**: Review changes before applying
6. **Port management**: Let services auto-assign ports to avoid conflicts
7. **Use MongoDB Compass**: `gitzone services compass` for visual DB management
8. **Global service management**: `gitzone services status -g` to see all projects' services at once
## 🐛 Troubleshooting
### Format Command Shows "Cancelled"
If the format command shows cancelled even after confirming:
- Check your `npmextra.json` configuration
- Try with `--yes` flag to skip confirmation
- Try with `--yes --write` flags
- Use `--verbose` for detailed output
### Docker Commands Fail
@@ -496,19 +509,20 @@ docker info
### Services Won't Start
Check for port conflicts:
```bash
# Services auto-assign ports, but you can check the config
cat .nogit/env.json
# Verify Docker is running
docker ps
# Reassign ports if there are conflicts
gitzone services reconfigure
```
### Template Creation Issues
Verify npm/pnpm is properly configured:
Verify pnpm/npm is properly configured:
```bash
npm config get registry
@@ -524,12 +538,11 @@ npm config get registry
gitzone is optimized for speed:
- **Parallel processing** for format operations
- **Smart caching** to avoid redundant work
- **Incremental updates** for meta repositories
- **Minimal dependencies** for fast installation
- **Isolated services** prevent resource conflicts
- **Auto port assignment** eliminates manual configuration
- **Parallel processing** for format operations
- 🧠 **Smart caching** to avoid redundant work
- 📊 **Incremental updates** for meta repositories
- 🐳 **Isolated services** prevent resource conflicts
- 🎲 **Auto port assignment** eliminates manual configuration
## License and Legal Information

2
test

Submodule test updated: 5e3fd29967...0b89443584

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@git.zone/cli',
version: '2.13.7',
version: '2.13.10',
description: 'A comprehensive CLI tool for enhancing and managing local development workflows with gitzone utilities, focusing on project setup, version control, code formatting, and template management.'
}

View File

@@ -38,7 +38,7 @@ export class GitzoneConfig {
public data: IGitzoneConfigData;
public async readConfigFromCwd() {
const npmextraInstance = new plugins.npmextra.Npmextra(paths.cwd);
const npmextraInstance = new plugins.npmextra.Smartconfig(paths.cwd);
this.data = npmextraInstance.dataFor<IGitzoneConfigData>('@git.zone/cli', {});
// Read szci config for backward compatibility

View File

@@ -9,7 +9,7 @@ import { ReleaseConfig } from '../mod_config/classes.releaseconfig.js';
export const run = async (argvArg: any) => {
// Read commit config from npmextra.json
const npmextraConfig = new plugins.npmextra.Npmextra();
const npmextraConfig = new plugins.npmextra.Smartconfig();
const gitzoneConfig = npmextraConfig.dataFor<{
commit?: {
alwaysTest?: boolean;

View File

@@ -31,7 +31,7 @@ export class CommitConfig {
* Load configuration from npmextra.json
*/
public async load(): Promise<void> {
const npmextraInstance = new plugins.npmextra.Npmextra(this.cwd);
const npmextraInstance = new plugins.npmextra.Smartconfig(this.cwd);
const gitzoneConfig = npmextraInstance.dataFor<any>('@git.zone/cli', {});
this.config = {
@@ -44,7 +44,7 @@ export class CommitConfig {
* Save configuration to npmextra.json
*/
public async save(): Promise<void> {
const npmextraPath = plugins.path.join(this.cwd, 'npmextra.json');
const npmextraPath = plugins.path.join(this.cwd, 'smartconfig.json');
let npmextraData: any = {};
// Read existing npmextra.json

View File

@@ -33,7 +33,7 @@ export class ReleaseConfig {
* Load configuration from npmextra.json
*/
public async load(): Promise<void> {
const npmextraInstance = new plugins.npmextra.Npmextra(this.cwd);
const npmextraInstance = new plugins.npmextra.Smartconfig(this.cwd);
const gitzoneConfig = npmextraInstance.dataFor<any>('@git.zone/cli', {});
// Also check szci for backward compatibility
@@ -49,7 +49,7 @@ export class ReleaseConfig {
* Save configuration to npmextra.json
*/
public async save(): Promise<void> {
const npmextraPath = plugins.path.join(this.cwd, 'npmextra.json');
const npmextraPath = plugins.path.join(this.cwd, 'smartconfig.json');
let npmextraData: any = {};
// Read existing npmextra.json

View File

@@ -6,7 +6,7 @@ export const run = async (projectArg: Project) => {
const gitzoneConfig = await projectArg.gitzoneConfig;
// Get copy configuration from npmextra.json
const npmextraConfig = new plugins.npmextra.Npmextra();
const npmextraConfig = new plugins.npmextra.Smartconfig();
const copyConfig = npmextraConfig.dataFor<any>('gitzone.format.copy', {
patterns: [],
});

View File

@@ -76,7 +76,7 @@ const migrateAccessLevel = (npmextraJson: any): boolean => {
*/
export const run = async (projectArg: Project) => {
const formatSmartstream = new plugins.smartstream.StreamWrapper([
plugins.smartgulp.src([`npmextra.json`]),
plugins.smartgulp.src([`smartconfig.json`]),
gulpFunction.forEach(async (fileArg: plugins.smartfile.SmartFile) => {
const fileString = fileArg.contents.toString();
const npmextraJson = JSON.parse(fileString);

View File

@@ -73,7 +73,7 @@ export const run = async (projectArg: Project) => {
const formatStreamWrapper = new plugins.smartstream.StreamWrapper([
plugins.smartgulp.src([`package.json`]),
gulpFunction.forEach(async (fileArg: plugins.smartfile.SmartFile) => {
const npmextraConfig = new plugins.npmextra.Npmextra(paths.cwd);
const npmextraConfig = new plugins.npmextra.Smartconfig(paths.cwd);
const gitzoneData: any = npmextraConfig.dataFor('@git.zone/cli', {});
const fileString = fileArg.contents.toString();
const packageJson = JSON.parse(fileString);
@@ -149,7 +149,7 @@ export const run = async (projectArg: Project) => {
'dist_ts_web/**/*',
'assets/**/*',
'cli.js',
'npmextra.json',
'smartconfig.json',
'readme.md',
];

View File

@@ -18,7 +18,7 @@ export class CopyFormatter extends BaseFormatter {
const changes: IPlannedChange[] = [];
// Get copy configuration from npmextra.json
const npmextraConfig = new plugins.npmextra.Npmextra();
const npmextraConfig = new plugins.npmextra.Smartconfig();
const copyConfig = npmextraConfig.dataFor<{ patterns: ICopyPattern[] }>(
'gitzone.format.copy',
{ patterns: [] },

View File

@@ -70,7 +70,7 @@ export class NpmextraFormatter extends BaseFormatter {
async analyze(): Promise<IPlannedChange[]> {
const changes: IPlannedChange[] = [];
const npmextraPath = 'npmextra.json';
const npmextraPath = 'smartconfig.json';
// Check if file exists
const exists = await plugins.smartfs.file(npmextraPath).exists();

View File

@@ -101,7 +101,7 @@ export class PackageJsonFormatter extends BaseFormatter {
const packageJson = JSON.parse(currentContent);
// Get gitzone config from npmextra
const npmextraConfig = new plugins.npmextra.Npmextra(paths.cwd);
const npmextraConfig = new plugins.npmextra.Smartconfig(paths.cwd);
const gitzoneData: any = npmextraConfig.dataFor('@git.zone/cli', {});
// Set metadata from gitzone config
@@ -156,7 +156,7 @@ export class PackageJsonFormatter extends BaseFormatter {
'dist_ts_web/**/*',
'assets/**/*',
'cli.js',
'npmextra.json',
'smartconfig.json',
'readme.md',
];

View File

@@ -21,7 +21,7 @@ export class PrettierFormatter extends BaseFormatter {
const rootConfigFiles = [
'package.json',
'tsconfig.json',
'npmextra.json',
'smartconfig.json',
'.prettierrc',
'.prettierrc.json',
'.prettierrc.js',
@@ -232,7 +232,7 @@ export class PrettierFormatter extends BaseFormatter {
private async getPrettierConfig(): Promise<any> {
// Try to load prettier config from the project
const prettierConfig = new plugins.npmextra.Npmextra();
const prettierConfig = new plugins.npmextra.Smartconfig();
return prettierConfig.dataFor('prettier', {
// Default prettier config
singleQuote: true,

View File

@@ -47,7 +47,7 @@ export let run = async (
const planner = new FormatPlanner();
// Get configuration from npmextra
const npmextraConfig = new plugins.npmextra.Npmextra();
const npmextraConfig = new plugins.npmextra.Smartconfig();
const formatConfig = npmextraConfig.dataFor<any>('@git.zone/cli.format', {
interactive: true,
showDiffs: false,

View File

@@ -11,7 +11,7 @@ import * as smartobject from '@push.rocks/smartobject';
import * as smartnpm from '@push.rocks/smartnpm';
import * as smartstream from '@push.rocks/smartstream';
import * as through2 from 'through2';
import * as npmextra from '@push.rocks/npmextra';
import * as npmextra from '@push.rocks/smartconfig';
import * as smartdiff from '@push.rocks/smartdiff';
export {

View File

@@ -42,7 +42,7 @@ export class ServiceManager {
* Load service configuration from npmextra.json
*/
private async loadServiceConfiguration(): Promise<void> {
const npmextraConfig = new plugins.npmextra.Npmextra(process.cwd());
const npmextraConfig = new plugins.npmextra.Smartconfig(process.cwd());
const gitzoneConfig = npmextraConfig.dataFor<any>('@git.zone/cli', {});
// Check if services array exists
@@ -75,7 +75,7 @@ export class ServiceManager {
* Save service configuration to npmextra.json
*/
private async saveServiceConfiguration(services: string[]): Promise<void> {
const npmextraPath = plugins.path.join(process.cwd(), 'npmextra.json');
const npmextraPath = plugins.path.join(process.cwd(), 'smartconfig.json');
let npmextraData: any = {};
// Read existing npmextra.json if it exists

View File

@@ -1,6 +1,6 @@
import * as smartlog from '@push.rocks/smartlog';
import * as smartlogDestinationLocal from '@push.rocks/smartlog-destination-local';
import * as npmextra from '@push.rocks/npmextra';
import * as npmextra from '@push.rocks/smartconfig';
import * as path from 'path';
import * as projectinfo from '@push.rocks/projectinfo';
import * as smartcli from '@push.rocks/smartcli';