specweave 0.29.0 → 0.29.1
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/package.json +3 -1
- package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +12 -0
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +18 -0
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.d.ts +0 -26
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.d.ts.map +0 -1
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.js +0 -249
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.js.map +0 -1
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts +0 -28
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts.map +0 -1
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js +0 -156
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js.map +0 -1
- package/dist/src/core/sync/bidirectional-engine.d.ts +0 -119
- package/dist/src/core/sync/bidirectional-engine.d.ts.map +0 -1
- package/dist/src/core/sync/bidirectional-engine.js +0 -359
- package/dist/src/core/sync/bidirectional-engine.js.map +0 -1
- package/dist/src/core/sync/conflict-resolver.d.ts +0 -66
- package/dist/src/core/sync/conflict-resolver.d.ts.map +0 -1
- package/dist/src/core/sync/conflict-resolver.js +0 -108
- package/dist/src/core/sync/conflict-resolver.js.map +0 -1
- package/dist/src/core/sync/enhanced-content-builder.d.ts +0 -55
- package/dist/src/core/sync/enhanced-content-builder.d.ts.map +0 -1
- package/dist/src/core/sync/enhanced-content-builder.js +0 -203
- package/dist/src/core/sync/enhanced-content-builder.js.map +0 -1
- package/dist/src/core/sync/folder-mapper.d.ts +0 -71
- package/dist/src/core/sync/folder-mapper.d.ts.map +0 -1
- package/dist/src/core/sync/folder-mapper.js +0 -203
- package/dist/src/core/sync/folder-mapper.js.map +0 -1
- package/dist/src/core/sync/label-detector.d.ts +0 -66
- package/dist/src/core/sync/label-detector.d.ts.map +0 -1
- package/dist/src/core/sync/label-detector.js +0 -224
- package/dist/src/core/sync/label-detector.js.map +0 -1
- package/dist/src/core/sync/performance-optimizer.d.ts +0 -153
- package/dist/src/core/sync/performance-optimizer.d.ts.map +0 -1
- package/dist/src/core/sync/performance-optimizer.js +0 -220
- package/dist/src/core/sync/performance-optimizer.js.map +0 -1
- package/dist/src/core/sync/profile-selector.d.ts +0 -52
- package/dist/src/core/sync/profile-selector.d.ts.map +0 -1
- package/dist/src/core/sync/profile-selector.js +0 -179
- package/dist/src/core/sync/profile-selector.js.map +0 -1
- package/dist/src/core/sync/profile-validator.d.ts +0 -52
- package/dist/src/core/sync/profile-validator.d.ts.map +0 -1
- package/dist/src/core/sync/profile-validator.js +0 -170
- package/dist/src/core/sync/profile-validator.js.map +0 -1
- package/dist/src/core/sync/rate-limiter.d.ts +0 -116
- package/dist/src/core/sync/rate-limiter.d.ts.map +0 -1
- package/dist/src/core/sync/rate-limiter.js +0 -308
- package/dist/src/core/sync/rate-limiter.js.map +0 -1
- package/dist/src/core/sync/retry-handler.d.ts +0 -98
- package/dist/src/core/sync/retry-handler.d.ts.map +0 -1
- package/dist/src/core/sync/retry-handler.js +0 -196
- package/dist/src/core/sync/retry-handler.js.map +0 -1
- package/dist/src/core/sync/retry-logic.d.ts +0 -64
- package/dist/src/core/sync/retry-logic.d.ts.map +0 -1
- package/dist/src/core/sync/retry-logic.js +0 -165
- package/dist/src/core/sync/retry-logic.js.map +0 -1
- package/dist/src/core/sync/status-cache.d.ts +0 -91
- package/dist/src/core/sync/status-cache.d.ts.map +0 -1
- package/dist/src/core/sync/status-cache.js +0 -140
- package/dist/src/core/sync/status-cache.js.map +0 -1
- package/dist/src/core/sync/status-mapper.d.ts +0 -69
- package/dist/src/core/sync/status-mapper.d.ts.map +0 -1
- package/dist/src/core/sync/status-mapper.js +0 -90
- package/dist/src/core/sync/status-mapper.js.map +0 -1
- package/dist/src/core/sync/status-sync-engine.d.ts +0 -162
- package/dist/src/core/sync/status-sync-engine.d.ts.map +0 -1
- package/dist/src/core/sync/status-sync-engine.js +0 -347
- package/dist/src/core/sync/status-sync-engine.js.map +0 -1
- package/dist/src/core/sync/sync-event-logger.d.ts +0 -113
- package/dist/src/core/sync/sync-event-logger.d.ts.map +0 -1
- package/dist/src/core/sync/sync-event-logger.js +0 -141
- package/dist/src/core/sync/sync-event-logger.js.map +0 -1
- package/dist/src/core/sync/time-range-selector.d.ts +0 -48
- package/dist/src/core/sync/time-range-selector.d.ts.map +0 -1
- package/dist/src/core/sync/time-range-selector.js +0 -224
- package/dist/src/core/sync/time-range-selector.js.map +0 -1
- package/dist/src/core/sync/types.d.ts +0 -52
- package/dist/src/core/sync/types.d.ts.map +0 -1
- package/dist/src/core/sync/types.js +0 -5
- package/dist/src/core/sync/types.js.map +0 -1
- package/dist/src/core/sync/workflow-detector.d.ts +0 -95
- package/dist/src/core/sync/workflow-detector.d.ts.map +0 -1
- package/dist/src/core/sync/workflow-detector.js +0 -175
- package/dist/src/core/sync/workflow-detector.js.map +0 -1
- package/plugins/specweave-github/lib/enhanced-github-sync.js +0 -220
- package/plugins/specweave-github/lib/enhanced-github-sync.ts +0 -322
- package/plugins/specweave-jira/lib/enhanced-jira-sync.js +0 -134
- package/plugins/specweave-jira/lib/enhanced-jira-sync.ts +0 -196
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Performance Optimizer for Status Sync
|
|
3
|
-
*
|
|
4
|
-
* Implements caching, batching, and optimization strategies to ensure
|
|
5
|
-
* status sync operations complete within performance targets:
|
|
6
|
-
* - Status sync: <2 seconds
|
|
7
|
-
* - Conflict detection: <1 second
|
|
8
|
-
* - Bulk sync (10 items): <5 seconds
|
|
9
|
-
*
|
|
10
|
-
* @module performance-optimizer
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Performance Optimizer
|
|
14
|
-
*
|
|
15
|
-
* Provides caching and optimization for status sync operations.
|
|
16
|
-
*/
|
|
17
|
-
export class PerformanceOptimizer {
|
|
18
|
-
constructor() {
|
|
19
|
-
this.cache = new Map();
|
|
20
|
-
this.DEFAULT_TTL_MS = 5 * 60 * 1000; // 5 minutes
|
|
21
|
-
this.metrics = [];
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Get cached value if available and not expired
|
|
25
|
-
*
|
|
26
|
-
* @param key - Cache key
|
|
27
|
-
* @returns Cached value or null if not found/expired
|
|
28
|
-
*/
|
|
29
|
-
get(key) {
|
|
30
|
-
const entry = this.cache.get(key);
|
|
31
|
-
if (!entry) {
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
// Check expiration
|
|
35
|
-
if (Date.now() > entry.expiresAt) {
|
|
36
|
-
this.cache.delete(key);
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
return entry.value;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Set cache value with TTL
|
|
43
|
-
*
|
|
44
|
-
* @param key - Cache key
|
|
45
|
-
* @param value - Value to cache
|
|
46
|
-
* @param ttlMs - Time to live in milliseconds (default: 5 minutes)
|
|
47
|
-
*/
|
|
48
|
-
set(key, value, ttlMs = this.DEFAULT_TTL_MS) {
|
|
49
|
-
this.cache.set(key, {
|
|
50
|
-
value,
|
|
51
|
-
expiresAt: Date.now() + ttlMs
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Clear specific cache entry
|
|
56
|
-
*
|
|
57
|
-
* @param key - Cache key
|
|
58
|
-
*/
|
|
59
|
-
clear(key) {
|
|
60
|
-
this.cache.delete(key);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Clear all cache entries
|
|
64
|
-
*/
|
|
65
|
-
clearAll() {
|
|
66
|
-
this.cache.clear();
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Clear expired cache entries
|
|
70
|
-
*/
|
|
71
|
-
clearExpired() {
|
|
72
|
-
const now = Date.now();
|
|
73
|
-
for (const [key, entry] of this.cache.entries()) {
|
|
74
|
-
if (now > entry.expiresAt) {
|
|
75
|
-
this.cache.delete(key);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Get cache statistics
|
|
81
|
-
*/
|
|
82
|
-
getCacheStats() {
|
|
83
|
-
const totalRequests = this.metrics.reduce((sum, m) => sum + m.cacheHits + m.cacheMisses, 0);
|
|
84
|
-
const totalHits = this.metrics.reduce((sum, m) => sum + m.cacheHits, 0);
|
|
85
|
-
return {
|
|
86
|
-
size: this.cache.size,
|
|
87
|
-
keys: Array.from(this.cache.keys()),
|
|
88
|
-
hitRate: totalRequests > 0 ? totalHits / totalRequests : 0
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Record performance metric
|
|
93
|
-
*
|
|
94
|
-
* @param metric - Performance metric
|
|
95
|
-
*/
|
|
96
|
-
recordMetric(metric) {
|
|
97
|
-
this.metrics.push(metric);
|
|
98
|
-
// Keep only last 100 metrics
|
|
99
|
-
if (this.metrics.length > 100) {
|
|
100
|
-
this.metrics.shift();
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Get performance metrics
|
|
105
|
-
*
|
|
106
|
-
* @param operationType - Filter by operation type
|
|
107
|
-
* @returns Performance metrics
|
|
108
|
-
*/
|
|
109
|
-
getMetrics(operationType) {
|
|
110
|
-
if (!operationType) {
|
|
111
|
-
return [...this.metrics];
|
|
112
|
-
}
|
|
113
|
-
return this.metrics.filter(m => m.operationType === operationType);
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Get average duration for operation type
|
|
117
|
-
*
|
|
118
|
-
* @param operationType - Operation type
|
|
119
|
-
* @returns Average duration in milliseconds
|
|
120
|
-
*/
|
|
121
|
-
getAverageDuration(operationType) {
|
|
122
|
-
const metrics = this.getMetrics(operationType);
|
|
123
|
-
if (metrics.length === 0) {
|
|
124
|
-
return 0;
|
|
125
|
-
}
|
|
126
|
-
const sum = metrics.reduce((total, m) => total + m.duration, 0);
|
|
127
|
-
return sum / metrics.length;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Check if performance targets are met
|
|
131
|
-
*
|
|
132
|
-
* Performance targets:
|
|
133
|
-
* - status-sync: <2000ms
|
|
134
|
-
* - conflict-detection: <1000ms
|
|
135
|
-
* - bulk-sync (10 items): <5000ms
|
|
136
|
-
*
|
|
137
|
-
* @returns Performance target status
|
|
138
|
-
*/
|
|
139
|
-
checkPerformanceTargets() {
|
|
140
|
-
const statusSyncAvg = this.getAverageDuration('status-sync');
|
|
141
|
-
const conflictAvg = this.getAverageDuration('conflict-detection');
|
|
142
|
-
const bulkSyncAvg = this.getAverageDuration('bulk-sync');
|
|
143
|
-
return {
|
|
144
|
-
statusSync: {
|
|
145
|
-
target: 2000,
|
|
146
|
-
actual: statusSyncAvg,
|
|
147
|
-
met: statusSyncAvg < 2000 || statusSyncAvg === 0
|
|
148
|
-
},
|
|
149
|
-
conflictDetection: {
|
|
150
|
-
target: 1000,
|
|
151
|
-
actual: conflictAvg,
|
|
152
|
-
met: conflictAvg < 1000 || conflictAvg === 0
|
|
153
|
-
},
|
|
154
|
-
bulkSync: {
|
|
155
|
-
target: 5000,
|
|
156
|
-
actual: bulkSyncAvg,
|
|
157
|
-
met: bulkSyncAvg < 5000 || bulkSyncAvg === 0
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Generate cache key for external status
|
|
163
|
-
*
|
|
164
|
-
* @param tool - External tool
|
|
165
|
-
* @param identifier - Issue/item identifier
|
|
166
|
-
* @returns Cache key
|
|
167
|
-
*/
|
|
168
|
-
static generateStatusCacheKey(tool, identifier) {
|
|
169
|
-
return `status:${tool}:${identifier}`;
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Generate cache key for workflow
|
|
173
|
-
*
|
|
174
|
-
* @param tool - External tool
|
|
175
|
-
* @param project - Project identifier
|
|
176
|
-
* @returns Cache key
|
|
177
|
-
*/
|
|
178
|
-
static generateWorkflowCacheKey(tool, project) {
|
|
179
|
-
return `workflow:${tool}:${project}`;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Batch process with delay
|
|
183
|
-
*
|
|
184
|
-
* Processes items in batches with configurable delay between batches
|
|
185
|
-
* to avoid rate limiting and improve throughput.
|
|
186
|
-
*
|
|
187
|
-
* @param items - Items to process
|
|
188
|
-
* @param processor - Async function to process each item
|
|
189
|
-
* @param batchSize - Batch size (default: 5)
|
|
190
|
-
* @param delayMs - Delay between batches in milliseconds (default: 1000)
|
|
191
|
-
* @returns Array of results
|
|
192
|
-
*/
|
|
193
|
-
static async batchProcess(items, processor, batchSize = 5, delayMs = 1000) {
|
|
194
|
-
const results = [];
|
|
195
|
-
for (let i = 0; i < items.length; i += batchSize) {
|
|
196
|
-
const batch = items.slice(i, i + batchSize);
|
|
197
|
-
// Process batch in parallel
|
|
198
|
-
const batchResults = await Promise.all(batch.map(item => processor(item)));
|
|
199
|
-
results.push(...batchResults);
|
|
200
|
-
// Add delay between batches (except for last batch)
|
|
201
|
-
if (i + batchSize < items.length) {
|
|
202
|
-
await new Promise(resolve => setTimeout(resolve, delayMs));
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
return results;
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Measure execution time of an async function
|
|
209
|
-
*
|
|
210
|
-
* @param operation - Async operation to measure
|
|
211
|
-
* @returns Tuple of [result, duration in ms]
|
|
212
|
-
*/
|
|
213
|
-
static async measureTime(operation) {
|
|
214
|
-
const startTime = Date.now();
|
|
215
|
-
const result = await operation();
|
|
216
|
-
const duration = Date.now() - startTime;
|
|
217
|
-
return [result, duration];
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
//# sourceMappingURL=performance-optimizer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"performance-optimizer.js","sourceRoot":"","sources":["../../../../src/core/sync/performance-optimizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAsBH;;;;GAIG;AACH,MAAM,OAAO,oBAAoB;IAAjC;QACU,UAAK,GAAiC,IAAI,GAAG,EAAE,CAAC;QACvC,mBAAc,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;QACrD,YAAO,GAAyB,EAAE,CAAC;IAoP7C,CAAC;IAlPC;;;;;OAKG;IACH,GAAG,CAAI,GAAW;QAChB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAElC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,IAAI,CAAC;QACd,CAAC;QAED,mBAAmB;QACnB,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;YACjC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACvB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,KAAK,CAAC,KAAU,CAAC;IAC1B,CAAC;IAED;;;;;;OAMG;IACH,GAAG,CAAI,GAAW,EAAE,KAAQ,EAAE,QAAgB,IAAI,CAAC,cAAc;QAC/D,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE;YAClB,KAAK;YACL,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;SAC9B,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,GAAW;QACf,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,YAAY;QACV,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;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AAM,GAAG,MAAM,SAAS,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;QAExC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interactive Profile Selector
|
|
3
|
-
*
|
|
4
|
-
* Rich CLI interface for selecting sync profiles with:
|
|
5
|
-
* - Profile listing by provider
|
|
6
|
-
* - Profile details and metadata
|
|
7
|
-
* - Smart filtering and search
|
|
8
|
-
* - Create new profile option
|
|
9
|
-
*/
|
|
10
|
-
import { SyncProfile, SyncProvider } from '../types/sync-profile.js';
|
|
11
|
-
export declare class ProfileSelector {
|
|
12
|
-
private profileManager;
|
|
13
|
-
constructor(projectRoot: string);
|
|
14
|
-
/**
|
|
15
|
-
* Display all profiles grouped by provider
|
|
16
|
-
*/
|
|
17
|
-
displayAllProfiles(): Promise<{
|
|
18
|
-
profiles: Record<string, SyncProfile>;
|
|
19
|
-
activeProfileId: string | null;
|
|
20
|
-
byProvider: Record<SyncProvider, ProfileOption[]>;
|
|
21
|
-
}>;
|
|
22
|
-
/**
|
|
23
|
-
* Display profiles for a specific provider
|
|
24
|
-
*/
|
|
25
|
-
displayProfilesByProvider(provider: SyncProvider): Promise<ProfileOption[]>;
|
|
26
|
-
/**
|
|
27
|
-
* Format profile option for display
|
|
28
|
-
*/
|
|
29
|
-
formatOption(option: ProfileOption, index: number): string[];
|
|
30
|
-
/**
|
|
31
|
-
* Format profile list header
|
|
32
|
-
*/
|
|
33
|
-
formatHeader(provider?: SyncProvider): string[];
|
|
34
|
-
/**
|
|
35
|
-
* Format "no profiles" message
|
|
36
|
-
*/
|
|
37
|
-
formatNoProfiles(provider?: SyncProvider): string[];
|
|
38
|
-
/**
|
|
39
|
-
* Display profile stats
|
|
40
|
-
*/
|
|
41
|
-
displayStats(): Promise<string[]>;
|
|
42
|
-
private formatProfileDetails;
|
|
43
|
-
private getProviderIcon;
|
|
44
|
-
private getProviderDisplayName;
|
|
45
|
-
}
|
|
46
|
-
export interface ProfileOption {
|
|
47
|
-
id: string;
|
|
48
|
-
profile: SyncProfile;
|
|
49
|
-
isActive: boolean;
|
|
50
|
-
details: string;
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=profile-selector.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profile-selector.d.ts","sourceRoot":"","sources":["../../../../src/core/sync/profile-selector.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAMrE,qBAAa,eAAe;IAC1B,OAAO,CAAC,cAAc,CAAiB;gBAE3B,WAAW,EAAE,MAAM;IAQ/B;;OAEG;IACG,kBAAkB,IAAI,OAAO,CAAC;QAClC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QACtC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;QAC/B,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,aAAa,EAAE,CAAC,CAAC;KACnD,CAAC;IA4BF;;OAEG;IACG,yBAAyB,CAC7B,QAAQ,EAAE,YAAY,GACrB,OAAO,CAAC,aAAa,EAAE,CAAC;IAkB3B;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;IAgC5D;;OAEG;IACH,YAAY,CAAC,QAAQ,CAAC,EAAE,YAAY,GAAG,MAAM,EAAE;IAc/C;;OAEG;IACH,gBAAgB,CAAC,QAAQ,CAAC,EAAE,YAAY,GAAG,MAAM,EAAE;IAiBnD;;OAEG;IACG,YAAY,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAgCvC,OAAO,CAAC,oBAAoB;IAsB5B,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,sBAAsB;CAQ/B;AAMD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interactive Profile Selector
|
|
3
|
-
*
|
|
4
|
-
* Rich CLI interface for selecting sync profiles with:
|
|
5
|
-
* - Profile listing by provider
|
|
6
|
-
* - Profile details and metadata
|
|
7
|
-
* - Smart filtering and search
|
|
8
|
-
* - Create new profile option
|
|
9
|
-
*/
|
|
10
|
-
import { ProfileManager } from './profile-manager.js';
|
|
11
|
-
// ============================================================================
|
|
12
|
-
// Profile Selector
|
|
13
|
-
// ============================================================================
|
|
14
|
-
export class ProfileSelector {
|
|
15
|
-
constructor(projectRoot) {
|
|
16
|
-
this.profileManager = new ProfileManager(projectRoot);
|
|
17
|
-
}
|
|
18
|
-
// ==========================================================================
|
|
19
|
-
// Interactive Selection
|
|
20
|
-
// ==========================================================================
|
|
21
|
-
/**
|
|
22
|
-
* Display all profiles grouped by provider
|
|
23
|
-
*/
|
|
24
|
-
async displayAllProfiles() {
|
|
25
|
-
const allProfiles = await this.profileManager.getAllProfiles();
|
|
26
|
-
const activeProfile = await this.profileManager.getActiveProfile();
|
|
27
|
-
const byProvider = {
|
|
28
|
-
github: [],
|
|
29
|
-
jira: [],
|
|
30
|
-
ado: [],
|
|
31
|
-
};
|
|
32
|
-
for (const [id, profile] of Object.entries(allProfiles)) {
|
|
33
|
-
const option = {
|
|
34
|
-
id,
|
|
35
|
-
profile,
|
|
36
|
-
isActive: activeProfile?.id === id,
|
|
37
|
-
details: this.formatProfileDetails(profile),
|
|
38
|
-
};
|
|
39
|
-
byProvider[profile.provider].push(option);
|
|
40
|
-
}
|
|
41
|
-
return {
|
|
42
|
-
profiles: allProfiles,
|
|
43
|
-
activeProfileId: activeProfile?.id || null,
|
|
44
|
-
byProvider,
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Display profiles for a specific provider
|
|
49
|
-
*/
|
|
50
|
-
async displayProfilesByProvider(provider) {
|
|
51
|
-
const profiles = await this.profileManager.getProfilesByProvider(provider);
|
|
52
|
-
const activeProfile = await this.profileManager.getActiveProfile();
|
|
53
|
-
const options = [];
|
|
54
|
-
for (const [id, profile] of Object.entries(profiles)) {
|
|
55
|
-
options.push({
|
|
56
|
-
id,
|
|
57
|
-
profile,
|
|
58
|
-
isActive: activeProfile?.id === id,
|
|
59
|
-
details: this.formatProfileDetails(profile),
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
return options;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Format profile option for display
|
|
66
|
-
*/
|
|
67
|
-
formatOption(option, index) {
|
|
68
|
-
const lines = [];
|
|
69
|
-
// Profile name
|
|
70
|
-
const activeTag = option.isActive ? ' (active)' : '';
|
|
71
|
-
lines.push(` ${index + 1}. ${option.profile.displayName}${activeTag}`);
|
|
72
|
-
// Configuration details
|
|
73
|
-
lines.push(` └─ ${this.getProviderIcon(option.profile.provider)} ${option.details}`);
|
|
74
|
-
// Description (if present)
|
|
75
|
-
if (option.profile.description) {
|
|
76
|
-
lines.push(` └─ ${option.profile.description}`);
|
|
77
|
-
}
|
|
78
|
-
// Time range defaults
|
|
79
|
-
lines.push(` └─ Default time range: ${option.profile.timeRange.default} (max: ${option.profile.timeRange.max})`);
|
|
80
|
-
// Project context (if present)
|
|
81
|
-
if (option.profile.projectContext) {
|
|
82
|
-
lines.push(` └─ Project: ${option.profile.projectContext.name}`);
|
|
83
|
-
}
|
|
84
|
-
return lines;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Format profile list header
|
|
88
|
-
*/
|
|
89
|
-
formatHeader(provider) {
|
|
90
|
-
const lines = [];
|
|
91
|
-
if (provider) {
|
|
92
|
-
lines.push(`🔗 ${this.getProviderDisplayName(provider)} Profiles:`);
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
lines.push('🔗 Available Sync Profiles:');
|
|
96
|
-
}
|
|
97
|
-
lines.push('');
|
|
98
|
-
return lines;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Format "no profiles" message
|
|
102
|
-
*/
|
|
103
|
-
formatNoProfiles(provider) {
|
|
104
|
-
const lines = [];
|
|
105
|
-
if (provider) {
|
|
106
|
-
lines.push(`No ${this.getProviderDisplayName(provider)} profiles configured yet.`);
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
lines.push('No sync profiles configured yet.');
|
|
110
|
-
}
|
|
111
|
-
lines.push('');
|
|
112
|
-
lines.push('Create your first profile:');
|
|
113
|
-
lines.push(' /specweave:sync-profile create');
|
|
114
|
-
lines.push('');
|
|
115
|
-
return lines;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Display profile stats
|
|
119
|
-
*/
|
|
120
|
-
async displayStats() {
|
|
121
|
-
const stats = await this.profileManager.getStats();
|
|
122
|
-
const lines = [];
|
|
123
|
-
lines.push('📊 Profile Statistics:');
|
|
124
|
-
lines.push('');
|
|
125
|
-
lines.push(` Total profiles: ${stats.totalProfiles}`);
|
|
126
|
-
if (stats.totalProfiles > 0) {
|
|
127
|
-
lines.push('');
|
|
128
|
-
lines.push(' By provider:');
|
|
129
|
-
for (const [provider, count] of Object.entries(stats.byProvider)) {
|
|
130
|
-
if (count > 0) {
|
|
131
|
-
lines.push(` ├─ ${this.getProviderIcon(provider)} ${this.getProviderDisplayName(provider)}: ${count}`);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
if (stats.activeProfile) {
|
|
136
|
-
lines.push('');
|
|
137
|
-
lines.push(` Active profile: ${stats.activeProfile}`);
|
|
138
|
-
}
|
|
139
|
-
return lines;
|
|
140
|
-
}
|
|
141
|
-
// ==========================================================================
|
|
142
|
-
// Profile Details Formatting
|
|
143
|
-
// ==========================================================================
|
|
144
|
-
formatProfileDetails(profile) {
|
|
145
|
-
switch (profile.provider) {
|
|
146
|
-
case 'github': {
|
|
147
|
-
const config = profile.config;
|
|
148
|
-
return `GitHub: ${config.owner}/${config.repo}`;
|
|
149
|
-
}
|
|
150
|
-
case 'jira': {
|
|
151
|
-
const config = profile.config;
|
|
152
|
-
return `JIRA: ${config.domain} (${config.projectKey})`;
|
|
153
|
-
}
|
|
154
|
-
case 'ado': {
|
|
155
|
-
const config = profile.config;
|
|
156
|
-
return `Azure DevOps: ${config.organization}/${config.project}`;
|
|
157
|
-
}
|
|
158
|
-
default:
|
|
159
|
-
return 'Unknown provider';
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
getProviderIcon(provider) {
|
|
163
|
-
const icons = {
|
|
164
|
-
github: '🐙',
|
|
165
|
-
jira: '📋',
|
|
166
|
-
ado: '⚡',
|
|
167
|
-
};
|
|
168
|
-
return icons[provider] || '🔗';
|
|
169
|
-
}
|
|
170
|
-
getProviderDisplayName(provider) {
|
|
171
|
-
const names = {
|
|
172
|
-
github: 'GitHub',
|
|
173
|
-
jira: 'JIRA',
|
|
174
|
-
ado: 'Azure DevOps',
|
|
175
|
-
};
|
|
176
|
-
return names[provider] || provider;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
//# sourceMappingURL=profile-selector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profile-selector.js","sourceRoot":"","sources":["../../../../src/core/sync/profile-selector.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,MAAM,OAAO,eAAe;IAG1B,YAAY,WAAmB;QAC7B,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;IACxD,CAAC;IAED,6EAA6E;IAC7E,wBAAwB;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C;YAED;gBACE,OAAO,kBAAkB,CAAC;QAC9B,CAAC;IACH,CAAC;IAEO,eAAe,CAAC,QAA+B;QACrD,MAAM,KAAK,GAA2B;YACpC,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,IAAI;YACV,GAAG,EAAE,GAAG;SACT,CAAC;QACF,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC;IACjC,CAAC;IAEO,sBAAsB,CAAC,QAA+B;QAC5D,MAAM,KAAK,GAA2B;YACpC,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,MAAM;YACZ,GAAG,EAAE,cAAc;SACpB,CAAC;QACF,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC;IACrC,CAAC;CACF"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sync Profile Validator
|
|
3
|
-
*
|
|
4
|
-
* Validates sync profile configurations for multi-team support
|
|
5
|
-
*/
|
|
6
|
-
import { SyncProfile, AdoConfig, JiraConfig, GitHubConfig, ProfileValidationResult } from '../types/sync-profile.js';
|
|
7
|
-
/**
|
|
8
|
-
* Validate Jira profile configuration
|
|
9
|
-
*
|
|
10
|
-
* Rules:
|
|
11
|
-
* - Strategy is required
|
|
12
|
-
* - project-per-team: requires projects[] array
|
|
13
|
-
* - shared-project-with-components: requires projectKey + components[]
|
|
14
|
-
* - Cannot mix strategies (no projects[] with shared-project)
|
|
15
|
-
*
|
|
16
|
-
* @param config - Jira configuration
|
|
17
|
-
* @returns Validation result with errors/warnings
|
|
18
|
-
*/
|
|
19
|
-
export declare function validateJiraConfig(config: JiraConfig): ProfileValidationResult;
|
|
20
|
-
/**
|
|
21
|
-
* Validate Azure DevOps profile configuration
|
|
22
|
-
*
|
|
23
|
-
* Rules:
|
|
24
|
-
* - organization and project are required
|
|
25
|
-
* - teams[] array is optional (single project if not provided)
|
|
26
|
-
* - Team names cannot be empty
|
|
27
|
-
* - areaPaths map must match teams if both provided
|
|
28
|
-
*
|
|
29
|
-
* @param config - ADO configuration
|
|
30
|
-
* @returns Validation result with errors/warnings
|
|
31
|
-
*/
|
|
32
|
-
export declare function validateAdoConfig(config: AdoConfig): ProfileValidationResult;
|
|
33
|
-
/**
|
|
34
|
-
* Validate GitHub profile configuration
|
|
35
|
-
*
|
|
36
|
-
* Rules:
|
|
37
|
-
* - owner and repo are required
|
|
38
|
-
*
|
|
39
|
-
* @param config - GitHub configuration
|
|
40
|
-
* @returns Validation result with errors/warnings
|
|
41
|
-
*/
|
|
42
|
-
export declare function validateGitHubConfig(config: GitHubConfig): ProfileValidationResult;
|
|
43
|
-
/**
|
|
44
|
-
* Validate sync profile
|
|
45
|
-
*
|
|
46
|
-
* Validates entire profile including provider-specific config
|
|
47
|
-
*
|
|
48
|
-
* @param profile - Sync profile to validate
|
|
49
|
-
* @returns Validation result with errors/warnings
|
|
50
|
-
*/
|
|
51
|
-
export declare function validateSyncProfile(profile: SyncProfile): ProfileValidationResult;
|
|
52
|
-
//# sourceMappingURL=profile-validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profile-validator.d.ts","sourceRoot":"","sources":["../../../../src/core/sync/profile-validator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,WAAW,EACX,SAAS,EACT,UAAU,EACV,YAAY,EACZ,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAElC;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,uBAAuB,CAyC9E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,uBAAuB,CAmD5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,uBAAuB,CAiBlF;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,GAAG,uBAAuB,CAwCjF"}
|