@git.zone/cli 6.6.2 → 6.7.2

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.
Files changed (50) hide show
  1. package/.smartconfig.json +2 -1
  2. package/dist_ts/00_commitinfo_data.js +1 -1
  3. package/dist_ts/gitzone.cli.js +2 -2
  4. package/dist_ts/helpers.workflow.d.ts +3 -0
  5. package/dist_ts/helpers.workflow.js +14 -1
  6. package/dist_ts/mod_config/index.js +4 -1
  7. package/dist_ts/mod_deprecate/helpers.deprecation.d.ts +12 -0
  8. package/dist_ts/mod_deprecate/helpers.deprecation.js +87 -0
  9. package/dist_ts/mod_deprecate/index.d.ts +1 -1
  10. package/dist_ts/mod_deprecate/index.js +77 -40
  11. package/dist_ts/mod_format/classes.baseformatter.d.ts +6 -0
  12. package/dist_ts/mod_format/classes.baseformatter.js +61 -1
  13. package/dist_ts/mod_format/classes.formatplanner.js +14 -3
  14. package/dist_ts/mod_format/classes.formatstats.d.ts +4 -1
  15. package/dist_ts/mod_format/classes.formatstats.js +11 -1
  16. package/dist_ts/mod_format/formatters/readme.formatter.d.ts +2 -1
  17. package/dist_ts/mod_format/formatters/readme.formatter.js +80 -14
  18. package/dist_ts/mod_format/index.js +2 -1
  19. package/dist_ts/mod_format/interfaces.format.d.ts +6 -2
  20. package/dist_ts/mod_format/interfaces.format.js +1 -1
  21. package/dist_ts/mod_release/classes.releasejournal.d.ts +17 -3
  22. package/dist_ts/mod_release/classes.releasejournal.js +144 -12
  23. package/dist_ts/mod_release/helpers.npmartifact.d.ts +3 -1
  24. package/dist_ts/mod_release/helpers.npmartifact.js +64 -5
  25. package/dist_ts/mod_release/helpers.releasepublication.js +72 -20
  26. package/dist_ts/mod_release/index.d.ts +24 -0
  27. package/dist_ts/mod_release/index.js +82 -22
  28. package/dist_ts/plugins.d.ts +2 -1
  29. package/dist_ts/plugins.js +3 -2
  30. package/package.json +2 -2
  31. package/readme.md +86 -3
  32. package/ts/00_commitinfo_data.ts +1 -1
  33. package/ts/gitzone.cli.ts +1 -1
  34. package/ts/helpers.workflow.ts +17 -0
  35. package/ts/mod_config/index.ts +3 -0
  36. package/ts/mod_deprecate/helpers.deprecation.ts +151 -0
  37. package/ts/mod_deprecate/index.ts +92 -41
  38. package/ts/mod_format/classes.baseformatter.ts +71 -0
  39. package/ts/mod_format/classes.formatplanner.ts +16 -3
  40. package/ts/mod_format/classes.formatstats.ts +14 -1
  41. package/ts/mod_format/formatters/readme.formatter.ts +89 -14
  42. package/ts/mod_format/index.ts +1 -0
  43. package/ts/mod_format/interfaces.format.ts +7 -2
  44. package/ts/mod_release/classes.releasejournal.ts +219 -20
  45. package/ts/mod_release/helpers.npmartifact.ts +120 -23
  46. package/ts/mod_release/helpers.releasepublication.ts +131 -16
  47. package/ts/mod_release/index.ts +127 -30
  48. package/ts/plugins.ts +2 -0
  49. package/readme.hints.md +0 -596
  50. package/readme.plan.md +0 -176
package/readme.plan.md DELETED
@@ -1,176 +0,0 @@
1
- # GitZone Services Command Implementation Plan
2
-
3
- ## Overview
4
-
5
- Implement the `gitzone services` command to manage MongoDB, ObjectStorage, and Elasticsearch containers for development projects.
6
-
7
- ## Tasks
8
-
9
- ### Module Structure Setup
10
-
11
- - [x] Create `ts/mod_services/` directory
12
- - [x] Create `mod.plugins.ts` with required imports
13
- - [x] Create `helpers.ts` with utility functions
14
- - [x] Create `classes.serviceconfiguration.ts` for config handling
15
- - [x] Create `classes.dockercontainer.ts` for Docker operations
16
- - [x] Create `classes.servicemanager.ts` for service management
17
- - [x] Create `index.ts` with main command logic
18
-
19
- ### Core Functionality
20
-
21
- - [x] Implement ServiceConfiguration class
22
- - [x] Load/create `.nogit/env.json` configuration
23
- - [x] Generate random available ports (20000-30000 range)
24
- - [x] Preserve existing custom values
25
- - [x] Provide default values for missing fields
26
-
27
- - [x] Implement DockerContainer class
28
- - [x] Check container status
29
- - [x] Start/stop/restart containers
30
- - [x] Execute Docker commands
31
- - [x] Handle container logs
32
- - [x] Manage volumes and port bindings
33
-
34
- - [x] Implement ServiceManager class
35
- - [x] Manage MongoDB containers
36
- - [x] Manage ObjectStorage containers
37
- - [x] Handle container lifecycle
38
- - [x] Generate project-specific container names
39
- - [x] Manage data directories in `.nogit/`
40
- - [x] Generate MongoDB Compass connection strings
41
-
42
- ### Commands Implementation
43
-
44
- - [x] `start` command - Start enabled services or target mongo|objectstorage|s3|elasticsearch
45
- - [x] `stop` command - Stop all services or target mongo|objectstorage|s3|elasticsearch
46
- - [x] `restart` command - Stop all then start enabled services, or restart target mongo|objectstorage|s3|elasticsearch
47
- - [x] `status` command - Show service status
48
- - [x] `config` command - Show current configuration
49
- - [x] `compass` command - Show MongoDB Compass connection string
50
- - [x] `logs` command - Show service logs with line count
51
- - [x] `remove` command - Remove containers (preserve data)
52
- - [x] `clean` command - Remove containers and data
53
-
54
- ### Integration
55
-
56
- - [x] Add `@push.rocks/smartshell` to main plugins.ts
57
- - [x] Add `@push.rocks/smartnetwork` to main plugins.ts
58
- - [x] Add `@push.rocks/smartinteract` to main plugins.ts
59
- - [x] Register services command in `gitzone.cli.ts`
60
-
61
- ### Features
62
-
63
- - [x] Auto-configuration with smart defaults
64
- - [x] Random port assignment to avoid conflicts
65
- - [x] Project isolation with unique container names
66
- - [x] Data persistence in `.nogit/` directories
67
- - [x] Status display (running/stopped/not installed)
68
- - [x] Interactive confirmations for destructive operations
69
- - [x] Colored console output
70
- - [x] ObjectStorage bucket auto-creation and authenticated verification
71
- - [x] MongoDB Compass connection string with network IP
72
-
73
- ### Testing
74
-
75
- - [x] Test service start/stop operations
76
- - [x] Test configuration creation and updates
77
- - [ ] Test port collision handling
78
- - [ ] Test data persistence
79
- - [ ] Test MongoDB Compass connection string generation
80
- - [ ] Test all command variations
81
-
82
- ## Configuration Format
83
-
84
- ```json
85
- {
86
- "PROJECT_NAME": "derived-from-package-name",
87
- "MONGODB_HOST": "localhost",
88
- "MONGODB_NAME": "project-name",
89
- "MONGODB_PORT": "random-port",
90
- "MONGODB_USER": "defaultadmin",
91
- "MONGODB_PASS": "defaultpass",
92
- "MONGODB_URL": "derived connection URL",
93
- "MONGODB_AUTH_ENABLED": true,
94
- "S3_HOST": "localhost",
95
- "S3_PORT": "random-port",
96
- "S3_UI_PORT": "first available port at or above s3-port+1",
97
- "S3_ACCESSKEY": "defaultadmin",
98
- "S3_SECRETKEY": "defaultpass",
99
- "S3_ADMIN_PASSWORD": "random-secret",
100
- "S3_REGION": "us-east-1",
101
- "S3_BUCKET": "project-name-documents",
102
- "S3_ENDPOINT": "localhost",
103
- "S3_USESSL": false,
104
- "ELASTICSEARCH_HOST": "localhost",
105
- "ELASTICSEARCH_PORT": "9200",
106
- "ELASTICSEARCH_USER": "elastic",
107
- "ELASTICSEARCH_PASS": "elastic",
108
- "ELASTICSEARCH_URL": "derived connection URL"
109
- }
110
- ```
111
-
112
- ## Command Examples
113
-
114
- ```bash
115
- gitzone services start # Start all enabled services
116
- gitzone services start mongo # Start only MongoDB
117
- gitzone services stop # Stop all services
118
- gitzone services status # Check service status
119
- gitzone services config # Show configuration
120
- gitzone services compass # Show MongoDB Compass connection string
121
- gitzone services logs mongo 50 # Show last 50 lines of MongoDB logs
122
- gitzone services remove # Remove containers (preserve data)
123
- gitzone services clean # Remove containers and data
124
- ```
125
-
126
- ## Progress Notes
127
-
128
- Implementation started: 2025-08-14
129
- Implementation completed: 2025-08-14
130
-
131
- ## Summary
132
-
133
- Successfully implemented the `gitzone services` command in TypeScript, providing a complete replacement for the `services.sh` shell script. The implementation includes:
134
-
135
- 1. **Complete Docker service management** for MongoDB, ObjectStorage, and Elasticsearch containers
136
- 2. **Smart configuration management** with automatic port assignment and conflict avoidance
137
- 3. **MongoDB Compass support** with network IP detection for remote connections
138
- 4. **Project isolation** using project-specific container names
139
- 5. **Data persistence** in `.nogit/` directories
140
- 6. **Interactive confirmations** for destructive operations
141
- 7. **Comprehensive command set** including start, stop, restart, status, config, compass, logs, remove, and clean commands
142
-
143
- The module is integrated into the gitzone CLI and covered by unit tests. A real
144
- authenticated Docker smoke still requires an explicitly isolated harness; it
145
- must never run against user-managed containers.
146
-
147
- ## Destructive-command audit — remaining items
148
-
149
- Audit performed alongside the `mod_docker` rewrite. Fixed in that pass:
150
- `docker system prune -a -f --volumes` (mod_docker), `git clean -fd` on every
151
- `meta` subcommand, unconfirmed `meta remove` plus its path escape,
152
- `services cleanup -g` unregistering projects whose containers still exist,
153
- `tools update` deleting shims of packages it does not manage, and the
154
- undisclosed `--dangerously-skip-permissions` behind `-y`.
155
-
156
- Still open, in rough hazard order:
157
-
158
- - [ ] `ts/mod_meta/meta.classes.meta.ts` — `syncToRemote()` runs
159
- `git push origin master` as a side effect of `readDirectory()`, so a read
160
- publishes to a remote. Branch is hardcoded to `master`.
161
- - [ ] `ts/mod_deprecate/index.ts:47` — `npm deprecate <pkg>@*` runs against every
162
- configured registry with no confirm-before-execute step and no dry run.
163
- Also `validate: (s) => s !== '' && !process.env.CI` can never pass in CI.
164
- - [ ] `ts/mod_start/index.ts:17` — `gitzone start` hardcodes `git checkout master`
165
- and runs `npm ci`, which contradicts the repo's pnpm-only policy and needs
166
- a `package-lock.json` this ecosystem does not produce.
167
- - [ ] `ts/mod_meta/meta.classes.meta.ts` — the "delete superfluous directory"
168
- prompt logs `Deleting >>...<<!` and then never deletes anything. Either
169
- implement it or drop the prompt; the log line is currently false.
170
- - [ ] `ts/mod_commit/mod.helpers.ts:178` — `bumpProjectVersion()` is dead code
171
- that commits and tags. No callers; remove it before it gets re-wired.
172
- - [ ] `ts/mod_format/index.ts:449` — `migrateConfigFile()` deletes
173
- `npmextra.json` before the plan is shown and before confirmation, so
174
- declining still leaves the old filename gone. Content is copied first, so
175
- it is a rename rather than data loss.
176
- - [ ] `ts/mod_audit/index.ts` is a one-line stub and is not routed. Dead file.