specweave 0.28.19 → 0.28.22
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/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts +16 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.js +63 -3
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.js.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-status-sync.d.ts +12 -3
- package/dist/plugins/specweave-ado/lib/ado-status-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-status-sync.js +37 -3
- package/dist/plugins/specweave-ado/lib/ado-status-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-increment-sync-cli.d.ts +8 -6
- package/dist/plugins/specweave-github/lib/github-increment-sync-cli.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js +230 -165
- package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-status-sync.d.ts +10 -0
- package/dist/plugins/specweave-github/lib/github-status-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-status-sync.js +40 -2
- package/dist/plugins/specweave-github/lib/github-status-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/increment-issue-builder.d.ts +2 -0
- package/dist/plugins/specweave-github/lib/increment-issue-builder.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/increment-issue-builder.js +25 -5
- package/dist/plugins/specweave-github/lib/increment-issue-builder.js.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts +12 -0
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.js +57 -5
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.js.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts +5 -1
- package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-status-sync.js +12 -4
- package/dist/plugins/specweave-jira/lib/jira-status-sync.js.map +1 -1
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +7 -3
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/helpers/init/external-import.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/external-import.js +193 -23
- package/dist/src/cli/helpers/init/external-import.js.map +1 -1
- package/dist/src/cli/helpers/init/jira-ado-auto-detect.d.ts +115 -0
- package/dist/src/cli/helpers/init/jira-ado-auto-detect.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/jira-ado-auto-detect.js +590 -0
- package/dist/src/cli/helpers/init/jira-ado-auto-detect.js.map +1 -0
- package/dist/src/cli/helpers/init/language-selection.js +1 -1
- package/dist/src/cli/helpers/init/language-selection.js.map +1 -1
- package/dist/src/cli/helpers/init/repository-setup.js +1 -1
- package/dist/src/cli/helpers/init/repository-setup.js.map +1 -1
- package/dist/src/config/types.d.ts +6 -6
- package/dist/src/core/background/index.d.ts +11 -0
- package/dist/src/core/background/index.d.ts.map +1 -0
- package/dist/src/core/background/index.js +11 -0
- package/dist/src/core/background/index.js.map +1 -0
- package/dist/src/core/background/job-manager.d.ts +65 -0
- package/dist/src/core/background/job-manager.d.ts.map +1 -0
- package/dist/src/core/background/job-manager.js +192 -0
- package/dist/src/core/background/job-manager.js.map +1 -0
- package/dist/src/core/background/types.d.ts +59 -0
- package/dist/src/core/background/types.d.ts.map +1 -0
- package/dist/src/core/background/types.js +8 -0
- package/dist/src/core/background/types.js.map +1 -0
- package/dist/src/core/repo-structure/multi-repo-configurator.d.ts +25 -0
- package/dist/src/core/repo-structure/multi-repo-configurator.d.ts.map +1 -0
- package/dist/src/core/repo-structure/multi-repo-configurator.js +614 -0
- package/dist/src/core/repo-structure/multi-repo-configurator.js.map +1 -0
- package/dist/src/core/repo-structure/prompt-consolidator.d.ts.map +1 -1
- package/dist/src/core/repo-structure/prompt-consolidator.js +6 -36
- package/dist/src/core/repo-structure/prompt-consolidator.js.map +1 -1
- package/dist/src/core/repo-structure/repo-initializer.d.ts +40 -0
- package/dist/src/core/repo-structure/repo-initializer.d.ts.map +1 -0
- package/dist/src/core/repo-structure/repo-initializer.js +260 -0
- package/dist/src/core/repo-structure/repo-initializer.js.map +1 -0
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts +3 -37
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.js +23 -803
- package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
- package/dist/src/core/types/spec-metadata.d.ts +2 -0
- package/dist/src/core/types/spec-metadata.d.ts.map +1 -1
- package/dist/src/importers/import-coordinator.d.ts +20 -0
- package/dist/src/importers/import-coordinator.d.ts.map +1 -1
- package/dist/src/importers/import-coordinator.js.map +1 -1
- package/dist/src/init/architecture/types.d.ts +2 -2
- package/dist/src/init/compliance/types.d.ts +1 -1
- package/package.json +1 -1
- package/plugins/specweave/commands/specweave-jobs.md +160 -0
- package/plugins/specweave-ado/lib/ado-spec-sync.js +59 -3
- package/plugins/specweave-ado/lib/ado-spec-sync.ts +72 -3
- package/plugins/specweave-ado/lib/ado-status-sync.js +35 -3
- package/plugins/specweave-ado/lib/ado-status-sync.ts +48 -4
- package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +6 -0
- package/plugins/specweave-github/lib/github-increment-sync-cli.js +268 -155
- package/plugins/specweave-github/lib/github-increment-sync-cli.ts +313 -209
- package/plugins/specweave-github/lib/github-status-sync.js +37 -1
- package/plugins/specweave-github/lib/github-status-sync.ts +60 -4
- package/plugins/specweave-github/lib/increment-issue-builder.js +26 -5
- package/plugins/specweave-github/lib/increment-issue-builder.ts +36 -5
- package/plugins/specweave-jira/lib/jira-spec-sync.js +53 -5
- package/plugins/specweave-jira/lib/jira-spec-sync.ts +87 -7
- package/plugins/specweave-jira/lib/jira-status-sync.js +9 -3
- package/plugins/specweave-jira/lib/jira-status-sync.ts +15 -6
- package/plugins/specweave-release/commands/specweave-release-npm.md +187 -8
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +9 -0
|
@@ -0,0 +1,614 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multi-Repository Configuration
|
|
3
|
+
*
|
|
4
|
+
* Extracted from repo-structure-manager.ts to reduce file size and prevent crashes.
|
|
5
|
+
* Handles configuration of multi-repository setups including parent repos and discovery.
|
|
6
|
+
*/
|
|
7
|
+
import path from 'path';
|
|
8
|
+
import chalk from 'chalk';
|
|
9
|
+
import { select, input, confirm, number } from '@inquirer/prompts';
|
|
10
|
+
import { Octokit } from '@octokit/rest';
|
|
11
|
+
import { normalizeRepoName, suggestRepoName } from './repo-id-generator.js';
|
|
12
|
+
import { getParentRepoBenefits, getVisibilityPrompt, } from './prompt-consolidator.js';
|
|
13
|
+
import { detectRepositoryHints } from './folder-detector.js';
|
|
14
|
+
import { discoverRepositories } from './repo-bulk-discovery.js';
|
|
15
|
+
/**
|
|
16
|
+
* Save setup state for Ctrl+C recovery
|
|
17
|
+
*/
|
|
18
|
+
async function saveSetupState(stateManager, state) {
|
|
19
|
+
try {
|
|
20
|
+
await stateManager.saveState(state);
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
console.warn(chalk.yellow(`Warning: Failed to save setup state: ${error.message}`));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Configure multi-repository architecture
|
|
28
|
+
* @param options - Configuration options
|
|
29
|
+
*/
|
|
30
|
+
export async function configureMultiRepo(options) {
|
|
31
|
+
const { projectPath, githubToken, stateManager, useParent = true, isLocalParent = false, urlType = 'ssh', platform = 'github', provider } = options;
|
|
32
|
+
console.log(chalk.cyan('\n Multi-Repository Configuration\n'));
|
|
33
|
+
console.log(chalk.gray('This creates separate repositories for each service/component.\n'));
|
|
34
|
+
// Show parent repo benefits if using parent approach
|
|
35
|
+
if (useParent) {
|
|
36
|
+
console.log(chalk.blue(getParentRepoBenefits()));
|
|
37
|
+
console.log('');
|
|
38
|
+
}
|
|
39
|
+
const config = {
|
|
40
|
+
architecture: useParent ? 'parent' : 'multi-repo',
|
|
41
|
+
urlType,
|
|
42
|
+
platform,
|
|
43
|
+
provider,
|
|
44
|
+
repositories: []
|
|
45
|
+
};
|
|
46
|
+
// Save state: architecture selected
|
|
47
|
+
await saveSetupState(stateManager, {
|
|
48
|
+
version: '1.0.0',
|
|
49
|
+
architecture: useParent ? 'parent' : 'multi-repo',
|
|
50
|
+
parentRepo: undefined,
|
|
51
|
+
repos: [],
|
|
52
|
+
currentStep: 'architecture-selected',
|
|
53
|
+
timestamp: new Date().toISOString(),
|
|
54
|
+
envCreated: false
|
|
55
|
+
});
|
|
56
|
+
// ========== NEW FLOW: Ask discovery strategy FIRST (before parent questions!) ==========
|
|
57
|
+
// Step 1: Ask how to configure implementation repositories (BEFORE parent questions)
|
|
58
|
+
let discoveryStrategy = 'manual';
|
|
59
|
+
let discoveredRepos = [];
|
|
60
|
+
let owner = '';
|
|
61
|
+
if (!isLocalParent && githubToken && useParent) {
|
|
62
|
+
console.log(chalk.cyan('\n Repository Discovery\n'));
|
|
63
|
+
console.log(chalk.gray('You\'re setting up multiple repositories. We can discover them automatically!\n'));
|
|
64
|
+
const configMethod = await select({
|
|
65
|
+
message: 'How do you want to configure repositories?',
|
|
66
|
+
choices: [
|
|
67
|
+
{
|
|
68
|
+
name: [
|
|
69
|
+
chalk.bold.green(' Bulk Discovery (RECOMMENDED)'),
|
|
70
|
+
chalk.gray(' Automatically discover repos from ' + provider.config.name),
|
|
71
|
+
chalk.gray(' - Select parent from discovered list'),
|
|
72
|
+
chalk.gray(' - Auto-configure implementation repos'),
|
|
73
|
+
chalk.gray(' - Supports: all, pattern, regex filtering'),
|
|
74
|
+
''
|
|
75
|
+
].join('\n'),
|
|
76
|
+
value: 'bulk-discovery'
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: [
|
|
80
|
+
chalk.bold(' Manual Entry'),
|
|
81
|
+
chalk.gray(' Enter each repository manually'),
|
|
82
|
+
chalk.gray(' - Full control over settings'),
|
|
83
|
+
chalk.gray(' - Best for new repos or custom setup'),
|
|
84
|
+
''
|
|
85
|
+
].join('\n'),
|
|
86
|
+
value: 'manual'
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
default: 'bulk-discovery'
|
|
90
|
+
});
|
|
91
|
+
discoveryStrategy = configMethod;
|
|
92
|
+
}
|
|
93
|
+
// Step 2: If bulk discovery, discover repos FIRST, then ask which is parent
|
|
94
|
+
if (discoveryStrategy === 'bulk-discovery') {
|
|
95
|
+
// Get owner FIRST (needed for discovery)
|
|
96
|
+
console.log(chalk.cyan('\n Repository Owner\n'));
|
|
97
|
+
owner = await input({
|
|
98
|
+
message: `${provider.config.name} owner/organization:`,
|
|
99
|
+
validate: async (val) => {
|
|
100
|
+
if (!val.trim())
|
|
101
|
+
return 'Owner is required';
|
|
102
|
+
// Validate owner exists on the platform
|
|
103
|
+
if (githubToken) {
|
|
104
|
+
const result = await provider.validateOwner(val, githubToken);
|
|
105
|
+
if (!result.valid) {
|
|
106
|
+
return result.error || `Invalid ${provider.config.name} owner`;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
// Discover repositories via pattern matching
|
|
113
|
+
const octokit = new Octokit({ auth: githubToken });
|
|
114
|
+
const isOrg = await provider.isOrganization(owner, githubToken);
|
|
115
|
+
// Retry loop for pattern adjustment
|
|
116
|
+
let discoveryResult = null;
|
|
117
|
+
while (discoveryResult === null) {
|
|
118
|
+
// Discovery-first flow: skip count validation since user discovers THEN selects
|
|
119
|
+
discoveryResult = await discoverRepositories(octokit, owner, isOrg, 0, { skipValidation: true });
|
|
120
|
+
// If null, user selected "go back and adjust pattern", loop will retry
|
|
121
|
+
// If user selected "manual", discoveryResult will be { repositories: [], strategy: 'manual' }
|
|
122
|
+
}
|
|
123
|
+
if (discoveryResult && discoveryResult.strategy !== 'manual') {
|
|
124
|
+
discoveredRepos = discoveryResult.repositories;
|
|
125
|
+
// Now ask: Which repo is the parent?
|
|
126
|
+
console.log(chalk.cyan('\n Select Parent Repository\n'));
|
|
127
|
+
console.log(chalk.gray('Choose which repository will be the parent (contains .specweave/ structure)\n'));
|
|
128
|
+
const parentChoices = [
|
|
129
|
+
...discoveredRepos.map((repo, index) => ({
|
|
130
|
+
name: `${chalk.bold(repo.name)}\n${chalk.gray(repo.description || '(no description)')}`,
|
|
131
|
+
value: index.toString(),
|
|
132
|
+
short: repo.name
|
|
133
|
+
})),
|
|
134
|
+
{
|
|
135
|
+
name: `${chalk.yellow(' Enter parent manually')} ${chalk.gray('(not in discovered list)')}`,
|
|
136
|
+
value: 'manual',
|
|
137
|
+
short: 'Enter manually'
|
|
138
|
+
}
|
|
139
|
+
];
|
|
140
|
+
const parentSelection = await select({
|
|
141
|
+
message: 'Which repository is the parent?',
|
|
142
|
+
choices: parentChoices,
|
|
143
|
+
pageSize: 15
|
|
144
|
+
});
|
|
145
|
+
if (parentSelection === 'manual') {
|
|
146
|
+
// User wants to enter parent manually - fall back to old flow
|
|
147
|
+
discoveryStrategy = 'manual';
|
|
148
|
+
discoveredRepos = []; // Clear discovered repos
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
// User selected a parent from discovered list
|
|
152
|
+
const parentIndex = parseInt(parentSelection);
|
|
153
|
+
const selectedParent = discoveredRepos[parentIndex];
|
|
154
|
+
// Fetch full repo details from GitHub API
|
|
155
|
+
let description = selectedParent.description || 'SpecWeave parent repository - specs, docs, and architecture';
|
|
156
|
+
let existingVisibility = selectedParent.private ? 'private' : 'public';
|
|
157
|
+
try {
|
|
158
|
+
const response = await fetch(`https://api.github.com/repos/${owner}/${selectedParent.name}`, {
|
|
159
|
+
headers: {
|
|
160
|
+
'Authorization': `Bearer ${githubToken}`,
|
|
161
|
+
'Accept': 'application/vnd.github+json'
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
if (response.ok) {
|
|
165
|
+
const data = await response.json();
|
|
166
|
+
description = data.description || description;
|
|
167
|
+
existingVisibility = data.private ? 'private' : 'public';
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
catch {
|
|
171
|
+
// Use defaults if fetch fails
|
|
172
|
+
}
|
|
173
|
+
// Set parent config
|
|
174
|
+
config.parentRepo = {
|
|
175
|
+
name: selectedParent.name,
|
|
176
|
+
owner: owner,
|
|
177
|
+
description: description,
|
|
178
|
+
visibility: existingVisibility,
|
|
179
|
+
createOnGitHub: false // Already exists!
|
|
180
|
+
};
|
|
181
|
+
// Remove parent from discovered repos (implementation repos = discovered - parent)
|
|
182
|
+
discoveredRepos.splice(parentIndex, 1);
|
|
183
|
+
console.log(chalk.green(`\n Using existing repository: ${owner}/${selectedParent.name}\n`));
|
|
184
|
+
console.log(chalk.gray(` Implementation repositories: ${discoveredRepos.length}\n`));
|
|
185
|
+
// Save state: parent repo configured
|
|
186
|
+
await saveSetupState(stateManager, {
|
|
187
|
+
version: '1.0.0',
|
|
188
|
+
architecture: useParent ? 'parent' : 'multi-repo',
|
|
189
|
+
parentRepo: config.parentRepo,
|
|
190
|
+
repos: [],
|
|
191
|
+
currentStep: 'parent-repo-configured',
|
|
192
|
+
timestamp: new Date().toISOString(),
|
|
193
|
+
envCreated: false
|
|
194
|
+
});
|
|
195
|
+
// Skip to repository configuration (lines 794+)
|
|
196
|
+
// We'll continue below with discoveredRepos
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
// User selected manual - fall back to old flow
|
|
201
|
+
discoveryStrategy = 'manual';
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
// Step 3: Manual flow (existing logic) - only runs if discoveryStrategy === 'manual'
|
|
205
|
+
if (discoveryStrategy === 'manual' && useParent) {
|
|
206
|
+
let parentAnswers;
|
|
207
|
+
if (isLocalParent) {
|
|
208
|
+
// Local parent: Skip GitHub questions, just ask for folder name
|
|
209
|
+
console.log(chalk.blue('\n Local Parent Folder Setup'));
|
|
210
|
+
console.log(chalk.gray('This folder will contain .specweave/ but will NOT be pushed to GitHub.\n'));
|
|
211
|
+
const parentNameAnswer = await input({
|
|
212
|
+
message: 'Parent folder name:',
|
|
213
|
+
default: `${path.basename(projectPath)}`,
|
|
214
|
+
validate: (val) => {
|
|
215
|
+
if (!val.trim())
|
|
216
|
+
return 'Folder name is required';
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
const ownerForLocalAnswer = await input({
|
|
221
|
+
message: `${provider.config.name} owner/organization for IMPLEMENTATION repos:`,
|
|
222
|
+
validate: async (val) => {
|
|
223
|
+
if (!val.trim())
|
|
224
|
+
return 'Owner is required';
|
|
225
|
+
// Validate owner exists on the platform
|
|
226
|
+
if (githubToken) {
|
|
227
|
+
const result = await provider.validateOwner(val, githubToken);
|
|
228
|
+
if (!result.valid) {
|
|
229
|
+
return result.error || `Invalid ${provider.config.name} owner`;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return true;
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
parentAnswers = {
|
|
236
|
+
parentName: parentNameAnswer,
|
|
237
|
+
owner: ownerForLocalAnswer
|
|
238
|
+
};
|
|
239
|
+
// Set defaults for local parent
|
|
240
|
+
parentAnswers.description = 'Local parent folder (not synced to GitHub)';
|
|
241
|
+
parentAnswers.createOnGitHub = false; // Never create GitHub repo for local parent
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
// GitHub parent: First ask if using existing or creating new
|
|
245
|
+
const parentChoice = await select({
|
|
246
|
+
message: 'Parent repository setup:',
|
|
247
|
+
choices: [
|
|
248
|
+
{
|
|
249
|
+
name: `${chalk.green('Use existing parent repository')}\n${chalk.gray('Connect to an existing GitHub repo that already has .specweave/ structure')}`,
|
|
250
|
+
value: 'existing'
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: `${chalk.blue('Create new parent repository')}\n${chalk.gray('Create a new GitHub repo for specs, docs, and architecture')}`,
|
|
254
|
+
value: 'new'
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
default: 'new'
|
|
258
|
+
});
|
|
259
|
+
if (parentChoice === 'existing') {
|
|
260
|
+
// Using existing parent repository
|
|
261
|
+
console.log(chalk.cyan('\n Existing Parent Repository\n'));
|
|
262
|
+
// Ask for owner first
|
|
263
|
+
const existingOwner = await input({
|
|
264
|
+
message: `${provider.config.name} owner/organization:`,
|
|
265
|
+
validate: async (val) => {
|
|
266
|
+
if (!val.trim())
|
|
267
|
+
return 'Owner is required';
|
|
268
|
+
// Validate owner exists on the platform
|
|
269
|
+
if (githubToken) {
|
|
270
|
+
const result = await provider.validateOwner(val, githubToken);
|
|
271
|
+
if (!result.valid) {
|
|
272
|
+
return result.error || `Invalid ${provider.config.name} owner`;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return true;
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
const ownerPrompt = { owner: existingOwner };
|
|
279
|
+
// Ask for existing repo name
|
|
280
|
+
const existingParentName = await input({
|
|
281
|
+
message: 'Existing parent repository name:',
|
|
282
|
+
default: `${path.basename(projectPath)}-parent`,
|
|
283
|
+
validate: async (val) => {
|
|
284
|
+
if (!val.trim())
|
|
285
|
+
return 'Repository name is required';
|
|
286
|
+
// Validate repository EXISTS on the platform
|
|
287
|
+
if (githubToken && ownerPrompt.owner) {
|
|
288
|
+
const result = await provider.validateRepository(ownerPrompt.owner, val, githubToken);
|
|
289
|
+
if (!result.exists) {
|
|
290
|
+
return `Repository ${ownerPrompt.owner}/${val} not found on ${provider.config.name}. Please check the name or choose 'Create new'.`;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return true;
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
const repoPrompt = { parentName: existingParentName };
|
|
297
|
+
// Fetch description and visibility from GitHub API (or use defaults)
|
|
298
|
+
let description = 'SpecWeave parent repository - specs, docs, and architecture';
|
|
299
|
+
let existingVisibility = 'private';
|
|
300
|
+
if (githubToken) {
|
|
301
|
+
try {
|
|
302
|
+
const response = await fetch(`https://api.github.com/repos/${ownerPrompt.owner}/${repoPrompt.parentName}`, {
|
|
303
|
+
headers: {
|
|
304
|
+
'Authorization': `Bearer ${githubToken}`,
|
|
305
|
+
'Accept': 'application/vnd.github+json'
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
if (response.ok) {
|
|
309
|
+
const data = await response.json();
|
|
310
|
+
description = data.description || description;
|
|
311
|
+
existingVisibility = data.private ? 'private' : 'public';
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
catch {
|
|
315
|
+
// Use defaults if fetch fails
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
parentAnswers = {
|
|
319
|
+
owner: ownerPrompt.owner,
|
|
320
|
+
parentName: repoPrompt.parentName,
|
|
321
|
+
description: description,
|
|
322
|
+
createOnGitHub: false, // Don't create, it already exists!
|
|
323
|
+
visibility: existingVisibility // Use existing visibility from GitHub
|
|
324
|
+
};
|
|
325
|
+
console.log(chalk.green(`\n Using existing repository: ${ownerPrompt.owner}/${repoPrompt.parentName}\n`));
|
|
326
|
+
}
|
|
327
|
+
else {
|
|
328
|
+
// Creating new parent repository
|
|
329
|
+
console.log(chalk.cyan('\n New Parent Repository\n'));
|
|
330
|
+
// Ask for owner (separate prompt to avoid validator issues)
|
|
331
|
+
const newOwner = await input({
|
|
332
|
+
message: `${provider.config.name} owner/organization for ALL repos:`,
|
|
333
|
+
validate: async (val) => {
|
|
334
|
+
if (!val.trim())
|
|
335
|
+
return 'Owner is required';
|
|
336
|
+
// Validate owner exists on the platform
|
|
337
|
+
if (githubToken) {
|
|
338
|
+
const result = await provider.validateOwner(val, githubToken);
|
|
339
|
+
if (!result.valid) {
|
|
340
|
+
return result.error || `Invalid ${provider.config.name} owner`;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
return true;
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
const ownerPrompt = { owner: newOwner };
|
|
347
|
+
// Now ask remaining questions, using the owner value
|
|
348
|
+
const newParentName = await input({
|
|
349
|
+
message: 'Parent repository name:',
|
|
350
|
+
default: `${path.basename(projectPath)}-parent`,
|
|
351
|
+
validate: async (val) => {
|
|
352
|
+
if (!val.trim())
|
|
353
|
+
return 'Repository name is required';
|
|
354
|
+
// Validate repository DOESN'T exist
|
|
355
|
+
if (githubToken && ownerPrompt.owner) {
|
|
356
|
+
const result = await provider.validateRepository(ownerPrompt.owner, val, githubToken);
|
|
357
|
+
if (result.exists) {
|
|
358
|
+
return `Repository ${ownerPrompt.owner}/${val} already exists at ${result.url}. Please choose 'Use existing' or pick a different name.`;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
return true;
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
const newParentDesc = await input({
|
|
365
|
+
message: 'Parent repository description:',
|
|
366
|
+
default: 'SpecWeave parent repository - specs, docs, and architecture'
|
|
367
|
+
});
|
|
368
|
+
const createParentOnGitHub = await confirm({
|
|
369
|
+
message: 'Create parent repository on GitHub?',
|
|
370
|
+
default: true
|
|
371
|
+
});
|
|
372
|
+
// Merge the answers
|
|
373
|
+
parentAnswers = {
|
|
374
|
+
...ownerPrompt,
|
|
375
|
+
parentName: newParentName,
|
|
376
|
+
description: newParentDesc,
|
|
377
|
+
createOnGitHub: createParentOnGitHub
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
// Ask about visibility for parent repo (only if creating NEW repo on GitHub)
|
|
382
|
+
let parentVisibility = 'private';
|
|
383
|
+
if (!isLocalParent && parentAnswers.createOnGitHub) {
|
|
384
|
+
// Only prompt for visibility when creating a NEW repository
|
|
385
|
+
const parentVisibilityPrompt = getVisibilityPrompt(parentAnswers.parentName);
|
|
386
|
+
parentVisibility = await select({
|
|
387
|
+
message: parentVisibilityPrompt.question,
|
|
388
|
+
choices: parentVisibilityPrompt.options.map(opt => ({
|
|
389
|
+
name: `${opt.label}\n${chalk.gray(opt.description)}`,
|
|
390
|
+
value: opt.value
|
|
391
|
+
})),
|
|
392
|
+
default: parentVisibilityPrompt.default
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
else if (!isLocalParent && parentAnswers.visibility) {
|
|
396
|
+
// Use existing repository's visibility (fetched from GitHub API)
|
|
397
|
+
parentVisibility = parentAnswers.visibility;
|
|
398
|
+
}
|
|
399
|
+
config.parentRepo = {
|
|
400
|
+
name: parentAnswers.parentName,
|
|
401
|
+
owner: parentAnswers.owner,
|
|
402
|
+
description: parentAnswers.description,
|
|
403
|
+
visibility: parentVisibility,
|
|
404
|
+
createOnGitHub: parentAnswers.createOnGitHub
|
|
405
|
+
};
|
|
406
|
+
// Save state: parent repo configured
|
|
407
|
+
await saveSetupState(stateManager, {
|
|
408
|
+
version: '1.0.0',
|
|
409
|
+
architecture: useParent ? 'parent' : 'multi-repo',
|
|
410
|
+
parentRepo: config.parentRepo,
|
|
411
|
+
repos: [],
|
|
412
|
+
currentStep: 'parent-repo-configured',
|
|
413
|
+
timestamp: new Date().toISOString(),
|
|
414
|
+
envCreated: false
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
// Step 4: Repository count and discovery (skip count question if using bulk discovery)
|
|
418
|
+
let repoCount;
|
|
419
|
+
let bulkDiscoveryStrategy = discoveryStrategy === 'bulk-discovery' ? 'pattern' : 'manual';
|
|
420
|
+
if (discoveryStrategy === 'bulk-discovery' && discoveredRepos.length > 0) {
|
|
421
|
+
// Bulk discovery: repos already discovered, skip count question
|
|
422
|
+
repoCount = discoveredRepos.length;
|
|
423
|
+
console.log(chalk.green(`\n Total repositories: ${repoCount + 1} (1 parent + ${repoCount} implementation)\n`));
|
|
424
|
+
}
|
|
425
|
+
else {
|
|
426
|
+
// Manual entry: ask for count
|
|
427
|
+
// Auto-detect existing folders
|
|
428
|
+
const hints = await detectRepositoryHints(projectPath);
|
|
429
|
+
if (hints.detectedFolders.length > 0) {
|
|
430
|
+
console.log(chalk.green(`\n Detected ${hints.detectedFolders.length} service folder(s):`));
|
|
431
|
+
hints.detectedFolders.forEach(f => console.log(chalk.gray(` - ${f}`)));
|
|
432
|
+
console.log('');
|
|
433
|
+
}
|
|
434
|
+
// Show repository count clarification BEFORE asking
|
|
435
|
+
if (useParent && config.parentRepo) {
|
|
436
|
+
console.log(chalk.cyan('\n Repository Count\n'));
|
|
437
|
+
console.log(chalk.gray('You will create:'));
|
|
438
|
+
if (isLocalParent) {
|
|
439
|
+
console.log(chalk.white(' - 1 parent FOLDER (local only, .specweave/ gitignored)'));
|
|
440
|
+
console.log(chalk.white(' - N implementation repositories (your services/apps on GitHub)'));
|
|
441
|
+
}
|
|
442
|
+
else {
|
|
443
|
+
console.log(chalk.white(' - 1 parent repository (specs, docs, increments)'));
|
|
444
|
+
console.log(chalk.white(' - N implementation repositories (your services/apps)'));
|
|
445
|
+
}
|
|
446
|
+
console.log(chalk.gray('\nNext question asks for: IMPLEMENTATION repositories ONLY (not counting parent)\n'));
|
|
447
|
+
}
|
|
448
|
+
// Ask how many implementation repositories
|
|
449
|
+
const repoCountAnswer = await number({
|
|
450
|
+
message: useParent
|
|
451
|
+
? ' How many IMPLEMENTATION repositories? (not counting parent)'
|
|
452
|
+
: 'How many repositories?',
|
|
453
|
+
default: hints.suggestedCount, // Use auto-detected count
|
|
454
|
+
validate: (val) => {
|
|
455
|
+
if (val === undefined || val < 1)
|
|
456
|
+
return useParent
|
|
457
|
+
? 'Need at least 1 implementation repository'
|
|
458
|
+
: 'Need at least 2 repositories';
|
|
459
|
+
if (val > 10)
|
|
460
|
+
return 'Maximum 10 repositories supported';
|
|
461
|
+
return true;
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
repoCount = repoCountAnswer ?? hints.suggestedCount;
|
|
465
|
+
// Show summary AFTER for confirmation
|
|
466
|
+
if (useParent && config.parentRepo) {
|
|
467
|
+
if (isLocalParent) {
|
|
468
|
+
console.log(chalk.green(`\n Total repositories to create: ${repoCount} implementation repos`));
|
|
469
|
+
console.log(chalk.gray(` (Parent folder is local only, not counted)\n`));
|
|
470
|
+
}
|
|
471
|
+
else {
|
|
472
|
+
const totalRepos = 1 + repoCount;
|
|
473
|
+
console.log(chalk.green(`\n Total repositories to create: ${totalRepos} (1 parent + ${repoCount} implementation)\n`));
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
// Bulk repository discovery for manual flow (old behavior)
|
|
477
|
+
if (githubToken && config.parentRepo && discoveryStrategy === 'manual') {
|
|
478
|
+
const octokit = new Octokit({ auth: githubToken });
|
|
479
|
+
const discoveryOwner = config.parentRepo.owner;
|
|
480
|
+
const isOrg = await provider.isOrganization(discoveryOwner, githubToken);
|
|
481
|
+
// Retry loop for pattern adjustment
|
|
482
|
+
let discoveryResult = null;
|
|
483
|
+
while (discoveryResult === null) {
|
|
484
|
+
discoveryResult = await discoverRepositories(octokit, discoveryOwner, isOrg, repoCount);
|
|
485
|
+
// If null, user selected "go back and adjust pattern", loop will retry
|
|
486
|
+
// If user selected "manual", discoveryResult will be { repositories: [], strategy: 'manual' }
|
|
487
|
+
}
|
|
488
|
+
if (discoveryResult) {
|
|
489
|
+
bulkDiscoveryStrategy = discoveryResult.strategy;
|
|
490
|
+
if (discoveryResult.strategy !== 'manual') {
|
|
491
|
+
discoveredRepos = discoveryResult.repositories;
|
|
492
|
+
// Update repoCount to match discovered repos
|
|
493
|
+
if (discoveredRepos.length !== repoCount) {
|
|
494
|
+
console.log(chalk.yellow(`\n Adjusting repository count from ${repoCount} to ${discoveredRepos.length} (based on discovery)\n`));
|
|
495
|
+
repoCount = discoveredRepos.length;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
// Configure each repository
|
|
502
|
+
console.log(chalk.cyan('\n Configure Each Repository:\n'));
|
|
503
|
+
const usedIds = new Set();
|
|
504
|
+
const configuredRepoNames = []; // Track configured repo names for smart ID generation
|
|
505
|
+
for (let i = 0; i < repoCount; i++) {
|
|
506
|
+
const discoveredRepo = discoveredRepos[i]; // May be undefined if manual
|
|
507
|
+
const isDiscovered = bulkDiscoveryStrategy !== 'manual' && discoveredRepo;
|
|
508
|
+
console.log(chalk.white(`\nRepository ${i + 1} of ${repoCount}:`));
|
|
509
|
+
// Smart suggestion for ALL repos (not just first one!)
|
|
510
|
+
const projectName = path.basename(projectPath);
|
|
511
|
+
const suggestedName = isDiscovered ? discoveredRepo.name : suggestRepoName(projectName, i, repoCount);
|
|
512
|
+
// If discovered, auto-use without confirmation (repos exist on GitHub)
|
|
513
|
+
if (isDiscovered) {
|
|
514
|
+
// Use normalized repo name as ID (repo names are unique in GitHub)
|
|
515
|
+
const repoId = normalizeRepoName(discoveredRepo.name);
|
|
516
|
+
console.log(chalk.green(` Using: ${chalk.bold(discoveredRepo.name)} ${chalk.gray(`(id: ${repoId})`)}`));
|
|
517
|
+
usedIds.add(repoId);
|
|
518
|
+
configuredRepoNames.push(discoveredRepo.name);
|
|
519
|
+
config.repositories.push({
|
|
520
|
+
id: repoId,
|
|
521
|
+
name: discoveredRepo.name,
|
|
522
|
+
owner: discoveredRepo.owner,
|
|
523
|
+
description: discoveredRepo.description || `${discoveredRepo.name} service`,
|
|
524
|
+
path: discoveredRepo.name,
|
|
525
|
+
visibility: discoveredRepo.private ? 'private' : 'public',
|
|
526
|
+
createOnGitHub: false,
|
|
527
|
+
isNested: useParent
|
|
528
|
+
});
|
|
529
|
+
continue;
|
|
530
|
+
}
|
|
531
|
+
// Manual entry (original behavior)
|
|
532
|
+
const repoName = await input({
|
|
533
|
+
message: 'Repository name:',
|
|
534
|
+
default: suggestedName,
|
|
535
|
+
validate: async (val) => {
|
|
536
|
+
if (!val.trim())
|
|
537
|
+
return 'Repository name is required';
|
|
538
|
+
// Validate repository doesn't exist (skip for discovered repos)
|
|
539
|
+
if (!isDiscovered && githubToken && config.parentRepo) {
|
|
540
|
+
const result = await provider.validateRepository(config.parentRepo.owner, val, githubToken);
|
|
541
|
+
if (result.exists) {
|
|
542
|
+
return `Repository ${config.parentRepo.owner}/${val} already exists at ${result.url}`;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
return true;
|
|
546
|
+
}
|
|
547
|
+
});
|
|
548
|
+
const repoDescription = await input({
|
|
549
|
+
message: 'Repository description:',
|
|
550
|
+
default: `${path.basename(repoName)} service`
|
|
551
|
+
});
|
|
552
|
+
// Skip "Create on GitHub?" for discovered repos - they already exist!
|
|
553
|
+
let repoCreateOnGitHub = false;
|
|
554
|
+
if (!isDiscovered) {
|
|
555
|
+
repoCreateOnGitHub = await confirm({
|
|
556
|
+
message: 'Create this repository on GitHub?',
|
|
557
|
+
default: true
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
const repoAnswers = {
|
|
561
|
+
name: repoName,
|
|
562
|
+
description: repoDescription,
|
|
563
|
+
createOnGitHub: repoCreateOnGitHub
|
|
564
|
+
};
|
|
565
|
+
// Use normalized repo name as ID (repo names are unique)
|
|
566
|
+
const id = normalizeRepoName(repoAnswers.name);
|
|
567
|
+
console.log(chalk.green(` Repository ID: ${chalk.bold(id)}`));
|
|
568
|
+
usedIds.add(id);
|
|
569
|
+
configuredRepoNames.push(repoAnswers.name);
|
|
570
|
+
// Ask about visibility only if creating a new repository
|
|
571
|
+
let visibility = 'private';
|
|
572
|
+
if (repoAnswers.createOnGitHub) {
|
|
573
|
+
const visibilityPrompt = getVisibilityPrompt(repoAnswers.name);
|
|
574
|
+
visibility = await select({
|
|
575
|
+
message: visibilityPrompt.question,
|
|
576
|
+
choices: visibilityPrompt.options.map(opt => ({
|
|
577
|
+
name: `${opt.label}\n${chalk.gray(opt.description)}`,
|
|
578
|
+
value: opt.value
|
|
579
|
+
})),
|
|
580
|
+
default: visibilityPrompt.default
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
config.repositories.push({
|
|
584
|
+
id: id,
|
|
585
|
+
name: repoAnswers.name,
|
|
586
|
+
owner: config.parentRepo?.owner || '',
|
|
587
|
+
description: repoAnswers.description,
|
|
588
|
+
path: repoAnswers.name, // Use full repo name as folder (not short ID)
|
|
589
|
+
visibility: visibility,
|
|
590
|
+
createOnGitHub: repoAnswers.createOnGitHub,
|
|
591
|
+
isNested: useParent
|
|
592
|
+
});
|
|
593
|
+
// Save state after each repo
|
|
594
|
+
await saveSetupState(stateManager, {
|
|
595
|
+
version: '1.0.0',
|
|
596
|
+
architecture: useParent ? 'parent' : 'multi-repo',
|
|
597
|
+
parentRepo: config.parentRepo,
|
|
598
|
+
repos: config.repositories.map(r => ({
|
|
599
|
+
id: r.id,
|
|
600
|
+
repo: r.name,
|
|
601
|
+
owner: r.owner,
|
|
602
|
+
path: r.path,
|
|
603
|
+
visibility: r.visibility,
|
|
604
|
+
displayName: r.name,
|
|
605
|
+
created: false
|
|
606
|
+
})),
|
|
607
|
+
currentStep: `repo-${i + 1}-configured`,
|
|
608
|
+
timestamp: new Date().toISOString(),
|
|
609
|
+
envCreated: false
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
return config;
|
|
613
|
+
}
|
|
614
|
+
//# sourceMappingURL=multi-repo-configurator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-repo-configurator.js","sourceRoot":"","sources":["../../../../src/core/repo-structure/multi-repo-configurator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,iB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E,MAAM,CAAC,UAAU,EAAE,KAAK,IAAI,EAAE;YACrC,WAAW,EAAE,WAAW,CAAC,WAAW;YACpC,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,8CAA8C;YACtE,UAAU,EAAE,UAAU;YACtB,cAAc,EAAE,WAAW,CAAC,cAAc;YAC1C,QAAQ,EAAE,SAAS;SACpB,CAAC,CAAC;QAEH,6BAA6B;QAC7B,MAAM,cAAc,CAAC,YAAY,EAAE;YACjC,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY;YACjD,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;gBACnC,EAAE,EAAE,CAAC,CAAC,EAAE;gBACR,IAAI,EAAE,CAAC,CAAC,IAAI;gBACZ,KAAK,EAAE,CAAC,CAAC,KAAK;gBACd,IAAI,EAAE,CAAC,CAAC,IAAI;gBACZ,UAAU,EAAE,CAAC,CAAC,UAAU;gBACxB,WAAW,EAAE,CAAC,CAAC,IAAI;gBACnB,OAAO,EAAE,KAAK;aACf,CAAC,CAAC;YACH,WAAW,EAAE,QAAQ,CAAC,GAAG,CAAC,aAAa;YACvC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,UAAU,EAAE,KAAK;SAClB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -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,
|
|
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,CAU9C;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAYxF;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,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,C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