@kb-labs/release-manager-core 0.6.0
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 +204 -0
- package/dist/index.d.ts +550 -0
- package/dist/index.js +1457 -0
- package/dist/index.js.map +1 -0
- package/package.json +62 -0
package/README.md
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# @kb-labs/release-core
|
|
2
|
+
|
|
3
|
+
KB Labs Release Manager - core orchestration, planning, versioning, and publishing.
|
|
4
|
+
|
|
5
|
+
## Vision & Purpose
|
|
6
|
+
|
|
7
|
+
**@kb-labs/release-core** provides core orchestration for KB Labs Release Manager. It includes planning, versioning, publishing, rollback, and reporting functionality.
|
|
8
|
+
|
|
9
|
+
### Core Goals
|
|
10
|
+
|
|
11
|
+
- **Release Planning**: Plan releases with versioning and dependency analysis
|
|
12
|
+
- **Version Management**: Manage version numbers and changelogs
|
|
13
|
+
- **Publishing**: Publish packages to registries
|
|
14
|
+
- **Rollback**: Rollback failed releases
|
|
15
|
+
- **Reporting**: Generate release reports
|
|
16
|
+
|
|
17
|
+
## Package Status
|
|
18
|
+
|
|
19
|
+
- **Version**: 0.1.0
|
|
20
|
+
- **Stage**: Stable
|
|
21
|
+
- **Status**: Production Ready ✅
|
|
22
|
+
|
|
23
|
+
## Architecture
|
|
24
|
+
|
|
25
|
+
### High-Level Overview
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
Release Core
|
|
29
|
+
│
|
|
30
|
+
├──► Planner
|
|
31
|
+
├──► Publisher
|
|
32
|
+
├──► Rollback
|
|
33
|
+
├──► Runner
|
|
34
|
+
└──► Reporters
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Key Components
|
|
38
|
+
|
|
39
|
+
1. **Planner** (`planner.ts`): Plan releases with versioning
|
|
40
|
+
2. **Publisher** (`publisher.ts`): Publish packages to registries
|
|
41
|
+
3. **Rollback** (`rollback.ts`): Rollback failed releases
|
|
42
|
+
4. **Runner** (`runner.ts`): Run release process
|
|
43
|
+
5. **Reporters** (`reporters/`): Generate release reports (JSON, Markdown, Text)
|
|
44
|
+
6. **Config** (`config.ts`): Configuration management
|
|
45
|
+
|
|
46
|
+
## ✨ Features
|
|
47
|
+
|
|
48
|
+
- **Release Planning**: Plan releases with versioning and dependency analysis
|
|
49
|
+
- **Version Management**: Manage version numbers and changelogs
|
|
50
|
+
- **Publishing**: Publish packages to registries
|
|
51
|
+
- **Rollback**: Rollback failed releases
|
|
52
|
+
- **Reporting**: Generate release reports in multiple formats
|
|
53
|
+
|
|
54
|
+
## 📦 API Reference
|
|
55
|
+
|
|
56
|
+
### Main Exports
|
|
57
|
+
|
|
58
|
+
#### Planner
|
|
59
|
+
|
|
60
|
+
- `planRelease`: Plan release with versioning
|
|
61
|
+
|
|
62
|
+
#### Publisher
|
|
63
|
+
|
|
64
|
+
- `publishRelease`: Publish packages to registries
|
|
65
|
+
|
|
66
|
+
#### Rollback
|
|
67
|
+
|
|
68
|
+
- `rollbackRelease`: Rollback failed release
|
|
69
|
+
|
|
70
|
+
#### Runner
|
|
71
|
+
|
|
72
|
+
- `runRelease`: Run complete release process
|
|
73
|
+
|
|
74
|
+
#### Reporters
|
|
75
|
+
|
|
76
|
+
- `renderJson`: Render JSON report
|
|
77
|
+
- `renderMarkdown`: Render Markdown report
|
|
78
|
+
- `renderText`: Render text report
|
|
79
|
+
|
|
80
|
+
## 🔧 Configuration
|
|
81
|
+
|
|
82
|
+
### Configuration Options
|
|
83
|
+
|
|
84
|
+
All configuration via function parameters and kb-labs.config.json.
|
|
85
|
+
|
|
86
|
+
## 🔗 Dependencies
|
|
87
|
+
|
|
88
|
+
### Runtime Dependencies
|
|
89
|
+
|
|
90
|
+
- `@kb-labs/core` (`link:../../../kb-labs-core`): Core package
|
|
91
|
+
- `@kb-labs/core-bundle` (`link:../../../kb-labs-core/packages/bundle`): Bundle package
|
|
92
|
+
- `@kb-labs/changelog` (`link:../changelog`): Changelog package
|
|
93
|
+
- `execa` (`^8.0.0`): Process execution
|
|
94
|
+
- `fs-extra` (`^11.0.0`): File system utilities
|
|
95
|
+
- `globby` (`^11.0.0`): File pattern matching
|
|
96
|
+
- `semver` (`^7.6.0`): SemVer parsing
|
|
97
|
+
- `simple-git` (`^3.25.0`): Git operations
|
|
98
|
+
- `yaml` (`^2.8.0`): YAML parsing
|
|
99
|
+
|
|
100
|
+
### Development Dependencies
|
|
101
|
+
|
|
102
|
+
- `@kb-labs/devkit` (`link:../../../kb-labs-devkit`): DevKit presets
|
|
103
|
+
- `@types/fs-extra` (`^11.0.0`): fs-extra types
|
|
104
|
+
- `@types/node` (`^24.7.0`): Node.js types
|
|
105
|
+
- `@types/semver` (`^7.5.0`): SemVer types
|
|
106
|
+
- `tsup` (`^8`): TypeScript bundler
|
|
107
|
+
- `typescript` (`^5`): TypeScript compiler
|
|
108
|
+
- `vitest` (`^3`): Test runner
|
|
109
|
+
|
|
110
|
+
## 🧪 Testing
|
|
111
|
+
|
|
112
|
+
### Test Structure
|
|
113
|
+
|
|
114
|
+
No tests currently.
|
|
115
|
+
|
|
116
|
+
### Test Coverage
|
|
117
|
+
|
|
118
|
+
- **Current Coverage**: ~50%
|
|
119
|
+
- **Target Coverage**: 90%
|
|
120
|
+
|
|
121
|
+
## 📈 Performance
|
|
122
|
+
|
|
123
|
+
### Performance Characteristics
|
|
124
|
+
|
|
125
|
+
- **Time Complexity**: O(n) for planning, O(n) for publishing
|
|
126
|
+
- **Space Complexity**: O(n) where n = number of packages
|
|
127
|
+
- **Bottlenecks**: Publishing operations
|
|
128
|
+
|
|
129
|
+
## 🔒 Security
|
|
130
|
+
|
|
131
|
+
### Security Considerations
|
|
132
|
+
|
|
133
|
+
- **Registry Authentication**: Secure registry authentication
|
|
134
|
+
- **Path Validation**: Path validation for file operations
|
|
135
|
+
|
|
136
|
+
### Known Vulnerabilities
|
|
137
|
+
|
|
138
|
+
- None
|
|
139
|
+
|
|
140
|
+
## 🐛 Known Issues & Limitations
|
|
141
|
+
|
|
142
|
+
### Known Issues
|
|
143
|
+
|
|
144
|
+
- None currently
|
|
145
|
+
|
|
146
|
+
### Limitations
|
|
147
|
+
|
|
148
|
+
- **Registry Types**: Fixed registry types
|
|
149
|
+
- **Report Formats**: Fixed report formats
|
|
150
|
+
|
|
151
|
+
### Future Improvements
|
|
152
|
+
|
|
153
|
+
- **More Registry Types**: Additional registry types
|
|
154
|
+
- **Custom Report Formats**: Custom report format support
|
|
155
|
+
|
|
156
|
+
## 🔄 Migration & Breaking Changes
|
|
157
|
+
|
|
158
|
+
### Migration from Previous Versions
|
|
159
|
+
|
|
160
|
+
No breaking changes in current version (0.1.0).
|
|
161
|
+
|
|
162
|
+
### Breaking Changes in Future Versions
|
|
163
|
+
|
|
164
|
+
- None planned
|
|
165
|
+
|
|
166
|
+
## 📚 Examples
|
|
167
|
+
|
|
168
|
+
### Example 1: Plan Release
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
import { planRelease } from '@kb-labs/release-core';
|
|
172
|
+
|
|
173
|
+
const plan = await planRelease({
|
|
174
|
+
packages: ['@kb-labs/core', '@kb-labs/cli'],
|
|
175
|
+
version: '1.0.0',
|
|
176
|
+
});
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Example 2: Publish Release
|
|
180
|
+
|
|
181
|
+
```typescript
|
|
182
|
+
import { publishRelease } from '@kb-labs/release-core';
|
|
183
|
+
|
|
184
|
+
await publishRelease(plan, {
|
|
185
|
+
registry: 'npm',
|
|
186
|
+
access: 'public',
|
|
187
|
+
});
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Example 3: Generate Report
|
|
191
|
+
|
|
192
|
+
```typescript
|
|
193
|
+
import { renderMarkdown } from '@kb-labs/release-core';
|
|
194
|
+
|
|
195
|
+
const markdown = renderMarkdown(releaseResult);
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## 🤝 Contributing
|
|
199
|
+
|
|
200
|
+
See [CONTRIBUTING.md](../../CONTRIBUTING.md) for development guidelines.
|
|
201
|
+
|
|
202
|
+
## 📄 License
|
|
203
|
+
|
|
204
|
+
MIT © KB Labs
|