specweave 0.24.6 → 0.24.9
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/CLAUDE.md +64 -0
- package/README.md +34 -0
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +3 -1
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/github-multi-repo.d.ts +5 -2
- package/dist/src/cli/helpers/issue-tracker/github-multi-repo.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/github-multi-repo.js +90 -8
- package/dist/src/cli/helpers/issue-tracker/github-multi-repo.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/github.d.ts +2 -1
- package/dist/src/cli/helpers/issue-tracker/github.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/github.js +4 -3
- package/dist/src/cli/helpers/issue-tracker/github.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/index.js +26 -9
- package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/types.d.ts +1 -0
- package/dist/src/cli/helpers/issue-tracker/types.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/types.js.map +1 -1
- package/dist/src/core/repo-structure/git-error-handler.d.ts +37 -0
- package/dist/src/core/repo-structure/git-error-handler.d.ts.map +1 -0
- package/dist/src/core/repo-structure/git-error-handler.js +214 -0
- package/dist/src/core/repo-structure/git-error-handler.js.map +1 -0
- package/dist/src/core/repo-structure/git-provider.d.ts +183 -0
- package/dist/src/core/repo-structure/git-provider.d.ts.map +1 -0
- package/dist/src/core/repo-structure/git-provider.js +57 -0
- package/dist/src/core/repo-structure/git-provider.js.map +1 -0
- package/dist/src/core/repo-structure/github-validator.d.ts +1 -0
- package/dist/src/core/repo-structure/github-validator.d.ts.map +1 -1
- package/dist/src/core/repo-structure/github-validator.js +35 -9
- package/dist/src/core/repo-structure/github-validator.js.map +1 -1
- package/dist/src/core/repo-structure/platform-registry.d.ts +114 -0
- package/dist/src/core/repo-structure/platform-registry.d.ts.map +1 -0
- package/dist/src/core/repo-structure/platform-registry.js +206 -0
- package/dist/src/core/repo-structure/platform-registry.js.map +1 -0
- package/dist/src/core/repo-structure/prompt-consolidator.d.ts +42 -0
- package/dist/src/core/repo-structure/prompt-consolidator.d.ts.map +1 -1
- package/dist/src/core/repo-structure/prompt-consolidator.js +102 -0
- package/dist/src/core/repo-structure/prompt-consolidator.js.map +1 -1
- package/dist/src/core/repo-structure/providers/azure-devops-provider.d.ts +64 -0
- package/dist/src/core/repo-structure/providers/azure-devops-provider.d.ts.map +1 -0
- package/dist/src/core/repo-structure/providers/azure-devops-provider.js +263 -0
- package/dist/src/core/repo-structure/providers/azure-devops-provider.js.map +1 -0
- package/dist/src/core/repo-structure/providers/bitbucket-provider.d.ts +55 -0
- package/dist/src/core/repo-structure/providers/bitbucket-provider.d.ts.map +1 -0
- package/dist/src/core/repo-structure/providers/bitbucket-provider.js +238 -0
- package/dist/src/core/repo-structure/providers/bitbucket-provider.js.map +1 -0
- package/dist/src/core/repo-structure/providers/github-provider.d.ts +53 -0
- package/dist/src/core/repo-structure/providers/github-provider.d.ts.map +1 -0
- package/dist/src/core/repo-structure/providers/github-provider.js +239 -0
- package/dist/src/core/repo-structure/providers/github-provider.js.map +1 -0
- package/dist/src/core/repo-structure/providers/gitlab-provider.d.ts +51 -0
- package/dist/src/core/repo-structure/providers/gitlab-provider.d.ts.map +1 -0
- package/dist/src/core/repo-structure/providers/gitlab-provider.js +251 -0
- package/dist/src/core/repo-structure/providers/gitlab-provider.js.map +1 -0
- package/dist/src/core/repo-structure/providers/index.d.ts +35 -0
- package/dist/src/core/repo-structure/providers/index.d.ts.map +1 -0
- package/dist/src/core/repo-structure/providers/index.js +68 -0
- package/dist/src/core/repo-structure/providers/index.js.map +1 -0
- package/dist/src/core/repo-structure/providers/local-provider.d.ts +61 -0
- package/dist/src/core/repo-structure/providers/local-provider.d.ts.map +1 -0
- package/dist/src/core/repo-structure/providers/local-provider.js +148 -0
- package/dist/src/core/repo-structure/providers/local-provider.js.map +1 -0
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts +21 -4
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.js +380 -113
- package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
- package/dist/src/core/repo-structure/url-generator.d.ts +80 -0
- package/dist/src/core/repo-structure/url-generator.d.ts.map +1 -0
- package/dist/src/core/repo-structure/url-generator.js +110 -0
- package/dist/src/core/repo-structure/url-generator.js.map +1 -0
- package/package.json +1 -1
- package/plugins/specweave/hooks/post-task-completion.sh +69 -175
- package/plugins/specweave/lib/hooks/consolidated-sync.js +183 -0
- package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +64 -0
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +96 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git Platform Registry
|
|
3
|
+
*
|
|
4
|
+
* Central registry for all supported Git platforms.
|
|
5
|
+
* Manages platform instances and provides platform selection.
|
|
6
|
+
*
|
|
7
|
+
* @module platform-registry
|
|
8
|
+
*/
|
|
9
|
+
import type { GitProvider, GitPlatformType, PlatformConfig } from './git-provider.js';
|
|
10
|
+
/**
|
|
11
|
+
* Platform registry entry
|
|
12
|
+
*/
|
|
13
|
+
export interface PlatformEntry {
|
|
14
|
+
/** Platform type identifier */
|
|
15
|
+
type: GitPlatformType;
|
|
16
|
+
/** Display name */
|
|
17
|
+
name: string;
|
|
18
|
+
/** Short description */
|
|
19
|
+
description: string;
|
|
20
|
+
/** Whether platform is fully supported */
|
|
21
|
+
supported: boolean;
|
|
22
|
+
/** Status message (e.g., "Coming Soon", "Beta") */
|
|
23
|
+
status?: string;
|
|
24
|
+
/** Platform configuration */
|
|
25
|
+
config: PlatformConfig;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Platform selection option (for prompts)
|
|
29
|
+
*/
|
|
30
|
+
export interface PlatformOption {
|
|
31
|
+
value: GitPlatformType;
|
|
32
|
+
name: string;
|
|
33
|
+
description: string;
|
|
34
|
+
disabled?: boolean | string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Git Platform Registry
|
|
38
|
+
*
|
|
39
|
+
* Singleton registry for all Git hosting platforms.
|
|
40
|
+
*/
|
|
41
|
+
export declare class GitPlatformRegistry {
|
|
42
|
+
private static instance;
|
|
43
|
+
private platforms;
|
|
44
|
+
private providers;
|
|
45
|
+
private constructor();
|
|
46
|
+
/**
|
|
47
|
+
* Get singleton instance
|
|
48
|
+
*/
|
|
49
|
+
static getInstance(): GitPlatformRegistry;
|
|
50
|
+
/**
|
|
51
|
+
* Register default platforms
|
|
52
|
+
*/
|
|
53
|
+
private registerDefaultPlatforms;
|
|
54
|
+
/**
|
|
55
|
+
* Register a platform
|
|
56
|
+
*/
|
|
57
|
+
registerPlatform(entry: PlatformEntry): void;
|
|
58
|
+
/**
|
|
59
|
+
* Register a provider instance
|
|
60
|
+
* Idempotent: skips if provider already registered (Issue #4 fix)
|
|
61
|
+
*/
|
|
62
|
+
registerProvider(type: GitPlatformType, provider: GitProvider): void;
|
|
63
|
+
/**
|
|
64
|
+
* Clear all registered providers (for testing/cleanup)
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
clearProviders(): void;
|
|
68
|
+
/**
|
|
69
|
+
* Clear all registered platforms (for testing/cleanup)
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
clearPlatforms(): void;
|
|
73
|
+
/**
|
|
74
|
+
* Reset the entire registry (for testing only)
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
reset(): void;
|
|
78
|
+
/**
|
|
79
|
+
* Get platform entry
|
|
80
|
+
*/
|
|
81
|
+
getPlatform(type: GitPlatformType): PlatformEntry | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* Get provider instance
|
|
84
|
+
*/
|
|
85
|
+
getProvider(type: GitPlatformType): GitProvider | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Get all supported platforms
|
|
88
|
+
*/
|
|
89
|
+
getSupportedPlatforms(): PlatformEntry[];
|
|
90
|
+
/**
|
|
91
|
+
* Get all platforms (including unsupported)
|
|
92
|
+
*/
|
|
93
|
+
getAllPlatforms(): PlatformEntry[];
|
|
94
|
+
/**
|
|
95
|
+
* Get platform options for user selection
|
|
96
|
+
*
|
|
97
|
+
* @param includeUnsupported - Whether to include unsupported platforms
|
|
98
|
+
* @returns Platform options for prompts
|
|
99
|
+
*/
|
|
100
|
+
getPlatformOptions(includeUnsupported?: boolean): PlatformOption[];
|
|
101
|
+
/**
|
|
102
|
+
* Check if a platform is supported
|
|
103
|
+
*/
|
|
104
|
+
isSupported(type: GitPlatformType): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Get default platform (GitHub)
|
|
107
|
+
*/
|
|
108
|
+
getDefaultPlatform(): GitPlatformType;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Get platform registry instance (convenience function)
|
|
112
|
+
*/
|
|
113
|
+
export declare function getPlatformRegistry(): GitPlatformRegistry;
|
|
114
|
+
//# sourceMappingURL=platform-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-registry.d.ts","sourceRoot":"","sources":["../../../../src/core/repo-structure/platform-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEtF;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,+BAA+B;IAC/B,IAAI,EAAE,eAAe,CAAC;IAEtB,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IAEb,wBAAwB;IACxB,WAAW,EA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;IAK3C;;OAEG;IACH,kBAAkB,IAAI,eAAe;CAGtC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,mBAAmB,CAEzD"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git Platform Registry
|
|
3
|
+
*
|
|
4
|
+
* Central registry for all supported Git platforms.
|
|
5
|
+
* Manages platform instances and provides platform selection.
|
|
6
|
+
*
|
|
7
|
+
* @module platform-registry
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Git Platform Registry
|
|
11
|
+
*
|
|
12
|
+
* Singleton registry for all Git hosting platforms.
|
|
13
|
+
*/
|
|
14
|
+
export class GitPlatformRegistry {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.platforms = new Map();
|
|
17
|
+
this.providers = new Map();
|
|
18
|
+
this.registerDefaultPlatforms();
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Get singleton instance
|
|
22
|
+
*/
|
|
23
|
+
static getInstance() {
|
|
24
|
+
if (!GitPlatformRegistry.instance) {
|
|
25
|
+
GitPlatformRegistry.instance = new GitPlatformRegistry();
|
|
26
|
+
}
|
|
27
|
+
return GitPlatformRegistry.instance;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Register default platforms
|
|
31
|
+
*/
|
|
32
|
+
registerDefaultPlatforms() {
|
|
33
|
+
// GitHub (fully supported)
|
|
34
|
+
this.registerPlatform({
|
|
35
|
+
type: 'github',
|
|
36
|
+
name: 'GitHub',
|
|
37
|
+
description: 'GitHub.com - Most popular Git hosting',
|
|
38
|
+
supported: true,
|
|
39
|
+
config: {
|
|
40
|
+
type: 'github',
|
|
41
|
+
name: 'GitHub',
|
|
42
|
+
host: 'github.com',
|
|
43
|
+
apiBaseUrl: 'https://api.github.com',
|
|
44
|
+
selfHosted: false
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
// GitLab (fully supported)
|
|
48
|
+
this.registerPlatform({
|
|
49
|
+
type: 'gitlab',
|
|
50
|
+
name: 'GitLab',
|
|
51
|
+
description: 'GitLab.com - DevOps platform',
|
|
52
|
+
supported: true,
|
|
53
|
+
config: {
|
|
54
|
+
type: 'gitlab',
|
|
55
|
+
name: 'GitLab',
|
|
56
|
+
host: 'gitlab.com',
|
|
57
|
+
apiBaseUrl: 'https://gitlab.com/api/v4',
|
|
58
|
+
selfHosted: false
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
// Bitbucket (fully supported)
|
|
62
|
+
this.registerPlatform({
|
|
63
|
+
type: 'bitbucket',
|
|
64
|
+
name: 'Bitbucket',
|
|
65
|
+
description: 'Bitbucket.org - Atlassian Git hosting',
|
|
66
|
+
supported: true,
|
|
67
|
+
config: {
|
|
68
|
+
type: 'bitbucket',
|
|
69
|
+
name: 'Bitbucket',
|
|
70
|
+
host: 'bitbucket.org',
|
|
71
|
+
apiBaseUrl: 'https://api.bitbucket.org/2.0',
|
|
72
|
+
selfHosted: false
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
// Azure DevOps (fully supported)
|
|
76
|
+
this.registerPlatform({
|
|
77
|
+
type: 'azure-devops',
|
|
78
|
+
name: 'Azure DevOps',
|
|
79
|
+
description: 'Azure DevOps Repos - Microsoft DevOps platform',
|
|
80
|
+
supported: true,
|
|
81
|
+
config: {
|
|
82
|
+
type: 'azure-devops',
|
|
83
|
+
name: 'Azure DevOps',
|
|
84
|
+
host: 'dev.azure.com',
|
|
85
|
+
apiBaseUrl: 'https://dev.azure.com',
|
|
86
|
+
selfHosted: false
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
// Local Git (fully supported)
|
|
90
|
+
this.registerPlatform({
|
|
91
|
+
type: 'local',
|
|
92
|
+
name: 'Local Git',
|
|
93
|
+
description: 'Local-only Git repositories (no remote hosting)',
|
|
94
|
+
supported: true,
|
|
95
|
+
config: {
|
|
96
|
+
type: 'local',
|
|
97
|
+
name: 'Local Git',
|
|
98
|
+
host: 'localhost',
|
|
99
|
+
apiBaseUrl: '',
|
|
100
|
+
selfHosted: true
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Register a platform
|
|
106
|
+
*/
|
|
107
|
+
registerPlatform(entry) {
|
|
108
|
+
this.platforms.set(entry.type, entry);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Register a provider instance
|
|
112
|
+
* Idempotent: skips if provider already registered (Issue #4 fix)
|
|
113
|
+
*/
|
|
114
|
+
registerProvider(type, provider) {
|
|
115
|
+
// Issue #4 fix: Idempotency check to prevent unnecessary re-registration
|
|
116
|
+
if (this.providers.has(type)) {
|
|
117
|
+
// Provider already registered, skip to avoid replacing existing instance
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
this.providers.set(type, provider);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Clear all registered providers (for testing/cleanup)
|
|
124
|
+
* @internal
|
|
125
|
+
*/
|
|
126
|
+
clearProviders() {
|
|
127
|
+
this.providers.clear();
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Clear all registered platforms (for testing/cleanup)
|
|
131
|
+
* @internal
|
|
132
|
+
*/
|
|
133
|
+
clearPlatforms() {
|
|
134
|
+
this.platforms.clear();
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Reset the entire registry (for testing only)
|
|
138
|
+
* @internal
|
|
139
|
+
*/
|
|
140
|
+
reset() {
|
|
141
|
+
this.providers.clear();
|
|
142
|
+
this.platforms.clear();
|
|
143
|
+
this.registerDefaultPlatforms();
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Get platform entry
|
|
147
|
+
*/
|
|
148
|
+
getPlatform(type) {
|
|
149
|
+
return this.platforms.get(type);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Get provider instance
|
|
153
|
+
*/
|
|
154
|
+
getProvider(type) {
|
|
155
|
+
return this.providers.get(type);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Get all supported platforms
|
|
159
|
+
*/
|
|
160
|
+
getSupportedPlatforms() {
|
|
161
|
+
return Array.from(this.platforms.values()).filter(p => p.supported);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Get all platforms (including unsupported)
|
|
165
|
+
*/
|
|
166
|
+
getAllPlatforms() {
|
|
167
|
+
return Array.from(this.platforms.values());
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Get platform options for user selection
|
|
171
|
+
*
|
|
172
|
+
* @param includeUnsupported - Whether to include unsupported platforms
|
|
173
|
+
* @returns Platform options for prompts
|
|
174
|
+
*/
|
|
175
|
+
getPlatformOptions(includeUnsupported = false) {
|
|
176
|
+
const platforms = includeUnsupported
|
|
177
|
+
? this.getAllPlatforms()
|
|
178
|
+
: this.getSupportedPlatforms();
|
|
179
|
+
return platforms.map(p => ({
|
|
180
|
+
value: p.type,
|
|
181
|
+
name: p.status ? `${p.name} (${p.status})` : p.name,
|
|
182
|
+
description: p.description,
|
|
183
|
+
disabled: p.supported ? false : p.status || 'Not yet supported'
|
|
184
|
+
}));
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Check if a platform is supported
|
|
188
|
+
*/
|
|
189
|
+
isSupported(type) {
|
|
190
|
+
const platform = this.getPlatform(type);
|
|
191
|
+
return platform?.supported || false;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Get default platform (GitHub)
|
|
195
|
+
*/
|
|
196
|
+
getDefaultPlatform() {
|
|
197
|
+
return 'github';
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Get platform registry instance (convenience function)
|
|
202
|
+
*/
|
|
203
|
+
export function getPlatformRegistry() {
|
|
204
|
+
return GitPlatformRegistry.getInstance();
|
|
205
|
+
}
|
|
206
|
+
//# sourceMappingURL=platform-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-registry.js","sourceRoot":"","sources":["../../../../src/core/repo-structure/platform-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAqCH;;;;GAIG;AACH,MAAM,OAAO,mBAAmB;IAK9B;QACE,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;QAC3B,IAAI,CAAC,wBAAwB,EAAE,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,WAAW;QAChB,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,CAAC;YAClC,mBAAmB,CAAC,QAAQ,GAAG,IAAI,mBAAmB,EAAE,CAAC;QAC3D,CAAC;QACD,OAAO,mBAAmB,CAAC,QAAQ,CAAC;IACtC,CAAC;IAED;;OAEG;IACK,wBAAwB;QAC9B,2BAA2B;QAC3B,IAAI,CAAC,gBAAgB,CAAC;YACpB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uCAAuC;YACpD,SAAS,EAAE,IAAI;YACf,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,YAAY;gBAClB,UAAU,EAAE,wBAAwB;gBACpC,UAAU,EAAE,KAAK;aAClB;SACF,CAAC,CAAC;QAEH,2BAA2B;QAC3B,IAAI,CAAC,gBAAgB,CAAC;YACpB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,8BAA8B;YAC3C,SAAS,EAAE,IAAI;YACf,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,YAAY;gBAClB,UAAU,EAAE,2BAA2B;gBACvC,UAAU,EAAE,KAAK;aAClB;SACF,CAAC,CAAC;QAEH,8BAA8B;QAC9B,IAAI,CAAC,gBAAgB,CAAC;YACpB,IAAI,E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AAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;YACnD,WAAW,EAAE,CAAC,CAAC,WAAW;YAC1B,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,mBAAmB;SAChE,CAAC,CAAC,CAAC;IACN,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,IAAqB;QAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACxC,OAAO,QAAQ,EAAE,SAAS,IAAI,KAAK,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,mBAAmB,CAAC,WAAW,EAAE,CAAC;AAC3C,CAAC"}
|
|
@@ -60,6 +60,48 @@ export declare function getVisibilityPrompt(repoName: string): {
|
|
|
60
60
|
}>;
|
|
61
61
|
default: 'private' | 'public';
|
|
62
62
|
};
|
|
63
|
+
/**
|
|
64
|
+
* Get Git remote URL type prompt (SSH vs HTTPS)
|
|
65
|
+
*
|
|
66
|
+
* @param platform - Optional platform name for examples
|
|
67
|
+
* @returns URL type question and options
|
|
68
|
+
*/
|
|
69
|
+
export declare function getUrlTypePrompt(platform?: string): {
|
|
70
|
+
question: string;
|
|
71
|
+
options: Array<{
|
|
72
|
+
value: 'ssh' | 'https';
|
|
73
|
+
label: string;
|
|
74
|
+
description: string;
|
|
75
|
+
}>;
|
|
76
|
+
default: 'ssh' | 'https';
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Get platform selection prompt
|
|
80
|
+
*
|
|
81
|
+
* @returns Platform selection question and options
|
|
82
|
+
*/
|
|
83
|
+
export declare function getPlatformSelectionPrompt(): {
|
|
84
|
+
question: string;
|
|
85
|
+
message: string;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Get GitHub token permission guidance
|
|
89
|
+
*
|
|
90
|
+
* @param isOrganization - Whether creating repos in an organization
|
|
91
|
+
* @returns Formatted guidance message
|
|
92
|
+
* @deprecated Use getTokenGuidance() for platform-agnostic guidance
|
|
93
|
+
*/
|
|
94
|
+
export declare function getGitHubTokenGuidance(isOrganization?: boolean): string;
|
|
95
|
+
/**
|
|
96
|
+
* Get platform-specific token permission guidance
|
|
97
|
+
*
|
|
98
|
+
* @param platform - Platform type
|
|
99
|
+
* @param tokenUrl - URL to create token
|
|
100
|
+
* @param scopes - Required scopes/permissions
|
|
101
|
+
* @param isOrganization - Whether creating repos in an organization
|
|
102
|
+
* @returns Formatted guidance message
|
|
103
|
+
*/
|
|
104
|
+
export declare function getTokenGuidance(platform: string, tokenUrl: string, scopes: string[], isOrganization?: boolean): string;
|
|
63
105
|
/**
|
|
64
106
|
* Format architecture choice for display
|
|
65
107
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-consolidator.d.ts","sourceRoot":"","sources":["../../../../src/core/repo-structure/prompt-consolidator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,eAAe,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,IAAI;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B,CAkCA;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAwC9C;AAED;;;;;;GAMG;AACH,wB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B,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpF,OAAO,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC/B,CAiBA;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,GAAE,MAAqB,GAAG;IACjE,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/E,OAAO,EAAE,KAAK,GAAG,OAAO,CAAC;CAC1B,CAiBA;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,IAAI;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAmBA;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,cAAc,GAAE,OAAe,GAAG,MAAM,CAsB9E;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EAAE,EAChB,cAAc,GAAE,OAAe,GAC9B,MAAM,CAgBR;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAS3E"}
|
|
@@ -137,6 +137,108 @@ export function getVisibilityPrompt(repoName) {
|
|
|
137
137
|
default: 'private'
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Get Git remote URL type prompt (SSH vs HTTPS)
|
|
142
|
+
*
|
|
143
|
+
* @param platform - Optional platform name for examples
|
|
144
|
+
* @returns URL type question and options
|
|
145
|
+
*/
|
|
146
|
+
export function getUrlTypePrompt(platform = 'github.com') {
|
|
147
|
+
return {
|
|
148
|
+
question: 'Git remote URL format?',
|
|
149
|
+
options: [
|
|
150
|
+
{
|
|
151
|
+
value: 'ssh',
|
|
152
|
+
label: 'SSH (Recommended)',
|
|
153
|
+
description: `git@${platform}:owner/repo.git - More secure, no password needed`
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
value: 'https',
|
|
157
|
+
label: 'HTTPS',
|
|
158
|
+
description: `https://${platform}/owner/repo.git - Works everywhere, uses tokens`
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
default: 'ssh'
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Get platform selection prompt
|
|
166
|
+
*
|
|
167
|
+
* @returns Platform selection question and options
|
|
168
|
+
*/
|
|
169
|
+
export function getPlatformSelectionPrompt() {
|
|
170
|
+
return {
|
|
171
|
+
question: 'Select your Git hosting platform:',
|
|
172
|
+
message: `
|
|
173
|
+
🌐 Git Platform Selection
|
|
174
|
+
|
|
175
|
+
SpecWeave supports multiple Git hosting platforms.
|
|
176
|
+
Choose where your repositories will be hosted.
|
|
177
|
+
|
|
178
|
+
✅ Fully Supported Platforms:
|
|
179
|
+
• GitHub (github.com)
|
|
180
|
+
• GitLab (gitlab.com)
|
|
181
|
+
• Bitbucket (bitbucket.org)
|
|
182
|
+
• Azure DevOps (dev.azure.com)
|
|
183
|
+
• Local Git (local-only repositories)
|
|
184
|
+
|
|
185
|
+
All platforms include full repository validation, creation, and management capabilities.
|
|
186
|
+
`.trim()
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Get GitHub token permission guidance
|
|
191
|
+
*
|
|
192
|
+
* @param isOrganization - Whether creating repos in an organization
|
|
193
|
+
* @returns Formatted guidance message
|
|
194
|
+
* @deprecated Use getTokenGuidance() for platform-agnostic guidance
|
|
195
|
+
*/
|
|
196
|
+
export function getGitHubTokenGuidance(isOrganization = false) {
|
|
197
|
+
const requiredScopes = [
|
|
198
|
+
'• repo (Full control of private repositories)',
|
|
199
|
+
];
|
|
200
|
+
if (isOrganization) {
|
|
201
|
+
requiredScopes.push('• admin:org (Manage organization repositories)');
|
|
202
|
+
}
|
|
203
|
+
return `
|
|
204
|
+
📋 GitHub Personal Access Token Requirements
|
|
205
|
+
|
|
206
|
+
Required Scopes:
|
|
207
|
+
${requiredScopes.join('\n')}
|
|
208
|
+
|
|
209
|
+
🔗 Create token at: https://github.com/settings/tokens/new
|
|
210
|
+
|
|
211
|
+
⚠️ Important:
|
|
212
|
+
- Select "repo" scope at minimum
|
|
213
|
+
${isOrganization ? '- Select "admin:org" if creating in organization\n' : ''}- Token will be stored in .env (never committed)
|
|
214
|
+
- Keep your token secure
|
|
215
|
+
`.trim();
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Get platform-specific token permission guidance
|
|
219
|
+
*
|
|
220
|
+
* @param platform - Platform type
|
|
221
|
+
* @param tokenUrl - URL to create token
|
|
222
|
+
* @param scopes - Required scopes/permissions
|
|
223
|
+
* @param isOrganization - Whether creating repos in an organization
|
|
224
|
+
* @returns Formatted guidance message
|
|
225
|
+
*/
|
|
226
|
+
export function getTokenGuidance(platform, tokenUrl, scopes, isOrganization = false) {
|
|
227
|
+
const platformName = platform.charAt(0).toUpperCase() + platform.slice(1);
|
|
228
|
+
return `
|
|
229
|
+
📋 ${platformName} Access Token Requirements
|
|
230
|
+
|
|
231
|
+
Required Scopes/Permissions:
|
|
232
|
+
${scopes.map(s => `• ${s}`).join('\n')}
|
|
233
|
+
|
|
234
|
+
🔗 Create token at: ${tokenUrl}
|
|
235
|
+
|
|
236
|
+
⚠️ Important:
|
|
237
|
+
- Select all required scopes/permissions above
|
|
238
|
+
${isOrganization && platform === 'github' ? '- Select "admin:org" if creating in organization\n' : ''}- Token will be stored in .env (never committed)
|
|
239
|
+
- Keep your token secure
|
|
240
|
+
`.trim();
|
|
241
|
+
}
|
|
140
242
|
/**
|
|
141
243
|
* Format architecture choice for display
|
|
142
244
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-consolidator.js","sourceRoot":"","sources":["../../../../src/core/repo-structure/prompt-consolidator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAiBH;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB;IAInC,OAAO;QACL,QAAQ,EAAE,uCAAuC;QACjD,OAAO,EAAE;YACP;gBACE,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,wBAAwB;gBAC/B,WAAW,EAAE,4BAA4B;gBACzC,OAAO,EAAE;;;;;;SAMR,CAAC,IAAI,EAAE;aACT;YACD;gBACE,KAAK,EAAE,eAAe;gBACtB,KAAK,EAAE,iDAAiD;gBACxD,WAAW,EAAE,+DAA+D;gBAC5E,OAAO,EAAE;;;;;;;;;;SAUR,CAAC,IAAI,EAAE;aACT;SACF;KACF,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCN,CAAC,IAAI,EAAE,CAAC;AACX,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CAAC,WAAmB,EAAE,SAAiB;IAC9E,MAAM,KAAK,GAAG,WAAW,GAAG,SAAS,CAAC;IAEtC,IAAI,WAAW,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,qCAAqC,KAAK;;MAE/C,SAAS,mBAAmB,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc;;eAElE,KAAK,yCAAyC,CAAC;IAC5D,CAAC;IAED,OAAO,qCAAqC,KAAK,EAAE,CAAC;AACtD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAAgB;IAKlD,OAAO;QACL,QAAQ,EAAE,8BAA8B,QAAQ,IAAI;QACpD,OAAO,EAAE;YACP;gBACE,KAAK,EAAE,SAAS;gBAChB,KAAK,EAAE,uBAAuB;gBAC9B,WAAW,EAAE,oDAAoD;aAClE;YACD;gBACE,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,gCAAgC;aAC9C;SACF;QACD,OAAO,EAAE,SAAS;KACnB,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAA0B;IACjE,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,QAAQ;YACX,OAAO,mBAAmB,CAAC;QAC7B,KAAK,eAAe;YAClB,OAAO,qCAAqC,CAAC;QAC/C;YACE,OAAO,MAAM,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"prompt-consolidator.js","sourceRoot":"","sources":["../../../../src/core/repo-structure/prompt-consolidator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAiBH;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB;IAInC,OAAO;QACL,QAAQ,EAAE,uCAAuC;QACjD,OAAO,EAAE;YACP;gBACE,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,wBAAwB;gBAC/B,WAAW,EAAE,4BAA4B;gBACzC,OAAO,EAAE;;;;;;SAMR,CAAC,IAAI,EAAE;aACT;YACD;gBACE,KAAK,EAAE,eAAe;gBACtB,KAAK,EAAE,iDAAiD;gBACxD,WAAW,EAAE,+DAA+D;gBAC5E,OAAO,EAAE;;;;;;;;;;SAUR,CAAC,IAAI,EAAE;aACT;SACF;KACF,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCN,CAAC,IAAI,EAAE,CAAC;AACX,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CAAC,WAAmB,EAAE,SAAiB;IAC9E,MAAM,KAAK,GAAG,WAAW,GAAG,SAAS,CAA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B,+CAA+C;KAChD,CAAC;IAEF,IAAI,cAAc,EAAE,CAAC;QACnB,cAAc,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;IACxE,CAAC;IAED,OAAO;;;;EAIP,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;KAMtB,cAAc,CAAC,CAAC,CAAC,oDAAoD,CAAC,CAAC,CAAC,EAAE;;GAE5E,CAAC,IAAI,EAAE,CAAC;AACX,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAC9B,QAAgB,EAChB,QAAgB,EAChB,MAAgB,EAChB,iBAA0B,KAAK;IAE/B,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE1E,OAAO;KACJ,YAAY;;;EAGf,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;sBAEhB,QAAQ;;;;KAIzB,cAAc,IAAI,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,oDAAoD,CAAC,CAAC,CAAC,EAAE;;GAErG,CAAC,IAAI,EAAE,CAAC;AACX,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAA0B;IACjE,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,QAAQ;YACX,OAAO,mBAAmB,CAAC;QAC7B,KAAK,eAAe;YAClB,OAAO,qCAAqC,CAAC;QAC/C;YACE,OAAO,MAAM,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Azure DevOps Provider Implementation
|
|
3
|
+
*
|
|
4
|
+
* Implements GitProvider interface for Azure DevOps Repos.
|
|
5
|
+
* Handles repository validation, creation, and management via Azure DevOps REST API.
|
|
6
|
+
*
|
|
7
|
+
* @module providers/azure-devops-provider
|
|
8
|
+
*/
|
|
9
|
+
import { BaseGitProvider, type PlatformConfig, type RepoValidationResult, type OwnerValidationResult, type CreateRepoOptions } from '../git-provider.js';
|
|
10
|
+
import type { UrlType } from '../url-generator.js';
|
|
11
|
+
/**
|
|
12
|
+
* Azure DevOps Provider
|
|
13
|
+
*
|
|
14
|
+
* Implements Git operations for Azure DevOps platform.
|
|
15
|
+
* Note: Azure DevOps uses organization/project/repository structure.
|
|
16
|
+
* The "owner" parameter typically represents "organization/project".
|
|
17
|
+
*/
|
|
18
|
+
export declare class AzureDevOpsProvider extends BaseGitProvider {
|
|
19
|
+
constructor(config?: Partial<PlatformConfig>);
|
|
20
|
+
/**
|
|
21
|
+
* Validate if a repository exists in Azure DevOps
|
|
22
|
+
* owner format: "organization/project"
|
|
23
|
+
*/
|
|
24
|
+
validateRepository(owner: string, repo: string, token?: string): Promise<RepoValidationResult>;
|
|
25
|
+
/**
|
|
26
|
+
* Validate if an Azure DevOps organization/project exists
|
|
27
|
+
* owner format: "organization/project"
|
|
28
|
+
*/
|
|
29
|
+
validateOwner(owner: string, token?: string): Promise<OwnerValidationResult>;
|
|
30
|
+
/**
|
|
31
|
+
* Create a new repository in Azure DevOps
|
|
32
|
+
*/
|
|
33
|
+
createRepository(options: CreateRepoOptions, token: string): Promise<string>;
|
|
34
|
+
/**
|
|
35
|
+
* Check if account is an organization (always true for Azure DevOps)
|
|
36
|
+
*/
|
|
37
|
+
isOrganization(account: string, token?: string): Promise<boolean>;
|
|
38
|
+
/**
|
|
39
|
+
* Get token creation URL
|
|
40
|
+
*/
|
|
41
|
+
getTokenUrl(): string;
|
|
42
|
+
/**
|
|
43
|
+
* Get required token scopes
|
|
44
|
+
*/
|
|
45
|
+
getRequiredScopes(isOrganization?: boolean): string[];
|
|
46
|
+
/**
|
|
47
|
+
* Override getRemoteUrl for Azure DevOps-specific URL format
|
|
48
|
+
*/
|
|
49
|
+
getRemoteUrl(owner: string, repo: string, urlType: UrlType): string;
|
|
50
|
+
/**
|
|
51
|
+
* Override getAuthHeaders for Azure DevOps-specific auth (Basic Auth with PAT)
|
|
52
|
+
*/
|
|
53
|
+
protected getAuthHeaders(token: string): Record<string, string>;
|
|
54
|
+
/**
|
|
55
|
+
* Parse owner string into organization and project
|
|
56
|
+
* Format: "organization" or "organization/project"
|
|
57
|
+
*/
|
|
58
|
+
private parseOwner;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Create an Azure DevOps provider instance
|
|
62
|
+
*/
|
|
63
|
+
export declare function createAzureDevOpsProvider(config?: Partial<PlatformConfig>): AzureDevOpsProvider;
|
|
64
|
+
//# sourceMappingURL=azure-devops-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"azure-devops-provider.d.ts","sourceRoot":"","sources":["../../../../../src/core/repo-structure/providers/azure-devops-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,eAAe,EAAE,KAAK,cAAc,EAAE,KAAK,oBAAoB,EAAE,KAAK,qBAAqB,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEzJ,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD;;;;;;GAMG;AACH,qBAAa,mBAAoB,SAAQ,eAAe;gBAC1C,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;IAW5C;;;OAGG;IACG,kBAAkB,CACtB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,oBAAoB,CAAC;IA2EhC;;;OAGG;IACG,aAAa,CACjB,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,qBAAqB,CAAC;IAkEjC;;OAEG;IACG,gBAAgB,CACpB,OAAO,EAAE,iBAAiB,EAC1B,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,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