specweave 0.28.19 → 0.28.20
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/helpers/init/external-import.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/external-import.js +186 -19
- 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/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/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 +252 -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/hooks/.specweave/logs/dora-tracking.log +9 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repository Initialization
|
|
3
|
+
*
|
|
4
|
+
* Extracted from repo-structure-manager.ts to reduce file size and prevent crashes.
|
|
5
|
+
* Handles cloning, git initialization, and directory structure creation.
|
|
6
|
+
*/
|
|
7
|
+
import type { GitProvider } from './git-provider.js';
|
|
8
|
+
import type { RepoStructureConfig } from './repo-structure-manager.js';
|
|
9
|
+
export interface RepoInitializerOptions {
|
|
10
|
+
projectPath: string;
|
|
11
|
+
githubToken?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Check if a repository exists on GitHub
|
|
15
|
+
*/
|
|
16
|
+
export declare function repositoryExistsOnGitHub(owner: string, repo: string, githubToken?: string): Promise<boolean>;
|
|
17
|
+
/**
|
|
18
|
+
* Clone or initialize a repository
|
|
19
|
+
* If the repo exists on the platform, clone it; otherwise, init + add remote
|
|
20
|
+
*/
|
|
21
|
+
export declare function cloneOrInitRepository(repoPath: string, owner: string, name: string, createOnGitHub: boolean, urlType: 'ssh' | 'https', provider: GitProvider, githubToken?: string): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Create basic structure for a repository/project
|
|
24
|
+
*
|
|
25
|
+
* NOTE: Only creates src/ and tests/ folders for nested projects.
|
|
26
|
+
* Documentation lives in .specweave/docs/internal/specs/{project-id}/ (source of truth)
|
|
27
|
+
*/
|
|
28
|
+
export declare function createBasicRepoStructure(repoPath: string, projectId: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Initialize local git repositories
|
|
31
|
+
*/
|
|
32
|
+
export declare function initializeLocalRepos(config: RepoStructureConfig, projectPath: string, githubToken?: string): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Create SpecWeave project structure (simplified - ONLY specs folders)
|
|
35
|
+
*
|
|
36
|
+
* NOTE: As of v0.X.X (increment 0026), we ONLY create specs/ folders.
|
|
37
|
+
* No modules/, team/, architecture/, legacy/ folders.
|
|
38
|
+
*/
|
|
39
|
+
export declare function createSpecWeaveStructure(config: RepoStructureConfig, projectPath: string): Promise<void>;
|
|
40
|
+
//# sourceMappingURL=repo-initializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo-initializer.d.ts","sourceRoot":"","sources":["../../../../src/core/repo-structure/repo-initializer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAIvE,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,OAAO,CAAC,CAiBlB;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,OAAO,EACvB,OAAO,EAAE,KAAK,GAAG,OAAe,EAChC,QAAQ,EAAE,WAAW,EACrB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CA0Df;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAuBlF;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,mBAAmB,EAC3B,WAAW,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAsHf;AAED;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,mBAAmB,EAC3B,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAuCf"}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repository Initialization
|
|
3
|
+
*
|
|
4
|
+
* Extracted from repo-structure-manager.ts to reduce file size and prevent crashes.
|
|
5
|
+
* Handles cloning, git initialization, and directory structure creation.
|
|
6
|
+
*/
|
|
7
|
+
import { existsSync, mkdirSync, writeFileSync, readdirSync, rmdirSync } from 'fs';
|
|
8
|
+
import path from 'path';
|
|
9
|
+
import chalk from 'chalk';
|
|
10
|
+
import ora from 'ora';
|
|
11
|
+
import { execFileNoThrowSync } from '../../utils/execFileNoThrow.js';
|
|
12
|
+
import { getJobManager } from '../background/index.js';
|
|
13
|
+
/**
|
|
14
|
+
* Check if a repository exists on GitHub
|
|
15
|
+
*/
|
|
16
|
+
export async function repositoryExistsOnGitHub(owner, repo, githubToken) {
|
|
17
|
+
if (!githubToken) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
const response = await fetch(`https://api.github.com/repos/${owner}/${repo}`, {
|
|
22
|
+
headers: {
|
|
23
|
+
'Authorization': `Bearer ${githubToken}`,
|
|
24
|
+
'Accept': 'application/vnd.github+json'
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return response.ok;
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Clone or initialize a repository
|
|
35
|
+
* If the repo exists on the platform, clone it; otherwise, init + add remote
|
|
36
|
+
*/
|
|
37
|
+
export async function cloneOrInitRepository(repoPath, owner, name, createOnGitHub, urlType = 'ssh', provider, githubToken) {
|
|
38
|
+
// If .git already exists, skip
|
|
39
|
+
if (existsSync(path.join(repoPath, '.git'))) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const remoteUrl = provider.getRemoteUrl(owner, name, urlType);
|
|
43
|
+
// Check if repository exists on GitHub
|
|
44
|
+
const repoExists = await repositoryExistsOnGitHub(owner, name, githubToken);
|
|
45
|
+
if (repoExists) {
|
|
46
|
+
// Repository exists - clone it
|
|
47
|
+
console.log(chalk.gray(` -> Cloning existing repository from GitHub...`));
|
|
48
|
+
try {
|
|
49
|
+
// Remove directory if it exists and is empty
|
|
50
|
+
if (existsSync(repoPath)) {
|
|
51
|
+
const files = readdirSync(repoPath);
|
|
52
|
+
if (files.length === 0) {
|
|
53
|
+
rmdirSync(repoPath);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
// Clone the repository
|
|
57
|
+
const parentDir = path.dirname(repoPath);
|
|
58
|
+
const repoName = path.basename(repoPath);
|
|
59
|
+
execFileNoThrowSync('git', ['clone', remoteUrl, repoName], { cwd: parentDir });
|
|
60
|
+
console.log(chalk.green(` [OK] Cloned ${owner}/${name}`));
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
console.log(chalk.yellow(` [!] Clone failed: ${error.message}`));
|
|
64
|
+
console.log(chalk.gray(` -> Falling back to init + remote`));
|
|
65
|
+
// Fallback: init + add remote
|
|
66
|
+
if (!existsSync(repoPath)) {
|
|
67
|
+
mkdirSync(repoPath, { recursive: true });
|
|
68
|
+
}
|
|
69
|
+
execFileNoThrowSync('git', ['init'], { cwd: repoPath });
|
|
70
|
+
execFileNoThrowSync('git', ['remote', 'add', 'origin', remoteUrl], { cwd: repoPath });
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
// Repository doesn't exist - init + add remote
|
|
75
|
+
if (!createOnGitHub) {
|
|
76
|
+
console.log(chalk.gray(` -> Repository will be created later (skipping for now)`));
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
console.log(chalk.gray(` -> Initializing empty git repository...`));
|
|
80
|
+
if (!existsSync(repoPath)) {
|
|
81
|
+
mkdirSync(repoPath, { recursive: true });
|
|
82
|
+
}
|
|
83
|
+
execFileNoThrowSync('git', ['init'], { cwd: repoPath });
|
|
84
|
+
execFileNoThrowSync('git', ['remote', 'add', 'origin', remoteUrl], { cwd: repoPath });
|
|
85
|
+
console.log(chalk.green(` [OK] Initialized ${owner}/${name}`));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Create basic structure for a repository/project
|
|
90
|
+
*
|
|
91
|
+
* NOTE: Only creates src/ and tests/ folders for nested projects.
|
|
92
|
+
* Documentation lives in .specweave/docs/internal/specs/{project-id}/ (source of truth)
|
|
93
|
+
*/
|
|
94
|
+
export function createBasicRepoStructure(repoPath, projectId) {
|
|
95
|
+
// Create basic directories (NO docs/ - documentation lives in .specweave/)
|
|
96
|
+
const dirs = ['src', 'tests'];
|
|
97
|
+
for (const dir of dirs) {
|
|
98
|
+
const dirPath = path.join(repoPath, dir);
|
|
99
|
+
if (!existsSync(dirPath)) {
|
|
100
|
+
mkdirSync(dirPath, { recursive: true });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
// Create README.md
|
|
104
|
+
const readmePath = path.join(repoPath, 'README.md');
|
|
105
|
+
if (!existsSync(readmePath)) {
|
|
106
|
+
const readmeContent = `# ${projectId}\n\n${projectId} service/component.\n\nPart of SpecWeave multi-repository project.\n`;
|
|
107
|
+
writeFileSync(readmePath, readmeContent);
|
|
108
|
+
}
|
|
109
|
+
// Create .gitignore
|
|
110
|
+
const gitignorePath = path.join(repoPath, '.gitignore');
|
|
111
|
+
if (!existsSync(gitignorePath)) {
|
|
112
|
+
const gitignoreContent = `node_modules/\ndist/\n.env\n.DS_Store\n*.log\n`;
|
|
113
|
+
writeFileSync(gitignorePath, gitignoreContent);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Initialize local git repositories
|
|
118
|
+
*/
|
|
119
|
+
export async function initializeLocalRepos(config, projectPath, githubToken) {
|
|
120
|
+
const totalRepos = config.repositories.length;
|
|
121
|
+
const spinner = ora(`Initializing local repositories... (0/${totalRepos})`).start();
|
|
122
|
+
// Create background job for tracking (if >1 repo)
|
|
123
|
+
let jobManager = null;
|
|
124
|
+
let jobId = null;
|
|
125
|
+
if (totalRepos > 1) {
|
|
126
|
+
try {
|
|
127
|
+
jobManager = getJobManager(projectPath);
|
|
128
|
+
const jobConfig = {
|
|
129
|
+
type: 'clone-repos',
|
|
130
|
+
repositories: config.repositories.map(r => ({
|
|
131
|
+
owner: r.owner,
|
|
132
|
+
name: r.name,
|
|
133
|
+
path: r.path
|
|
134
|
+
})),
|
|
135
|
+
projectPath: projectPath
|
|
136
|
+
};
|
|
137
|
+
const job = jobManager.createJob('clone-repos', jobConfig, totalRepos);
|
|
138
|
+
jobId = job.id;
|
|
139
|
+
jobManager.startJob(jobId);
|
|
140
|
+
}
|
|
141
|
+
catch {
|
|
142
|
+
// Job tracking is optional - continue without it
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
// Create directory structure based on architecture
|
|
146
|
+
if (config.architecture === 'parent') {
|
|
147
|
+
// Parent repo approach: ROOT-LEVEL cloning (not services/!)
|
|
148
|
+
// Initialize parent repo at root
|
|
149
|
+
if (!existsSync(path.join(projectPath, '.git'))) {
|
|
150
|
+
execFileNoThrowSync('git', ['init'], { cwd: projectPath });
|
|
151
|
+
if (config.parentRepo) {
|
|
152
|
+
const remoteUrl = config.provider.getRemoteUrl(config.parentRepo.owner, config.parentRepo.name, config.urlType);
|
|
153
|
+
execFileNoThrowSync('git', ['remote', 'add', 'origin', remoteUrl], { cwd: projectPath });
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
// Initialize implementation repos at ROOT LEVEL
|
|
157
|
+
let processed = 0;
|
|
158
|
+
for (const repo of config.repositories) {
|
|
159
|
+
processed++;
|
|
160
|
+
spinner.text = `Cloning repositories... (${processed}/${totalRepos}) -> ${repo.name}`;
|
|
161
|
+
const repoPath = path.join(projectPath, repo.path);
|
|
162
|
+
// Clone or initialize repository
|
|
163
|
+
await cloneOrInitRepository(repoPath, repo.owner, repo.name, repo.createOnGitHub, config.urlType, config.provider, githubToken);
|
|
164
|
+
// Create basic structure (only if repo was just initialized, not cloned)
|
|
165
|
+
if (!repo.createOnGitHub || !await repositoryExistsOnGitHub(repo.owner, repo.name, githubToken)) {
|
|
166
|
+
createBasicRepoStructure(repoPath, repo.id);
|
|
167
|
+
}
|
|
168
|
+
// Update background job progress
|
|
169
|
+
if (jobManager && jobId) {
|
|
170
|
+
jobManager.updateProgress(jobId, processed, repo.name, repo.name);
|
|
171
|
+
}
|
|
172
|
+
spinner.text = `Cloned ${processed}/${totalRepos}: ${repo.name}`;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
else if (config.architecture === 'multi-repo') {
|
|
176
|
+
// Standard multi-repo: repos as subdirectories
|
|
177
|
+
let processed = 0;
|
|
178
|
+
for (const repo of config.repositories) {
|
|
179
|
+
processed++;
|
|
180
|
+
spinner.text = `Cloning repositories... (${processed}/${totalRepos}) -> ${repo.name}`;
|
|
181
|
+
const repoPath = path.join(projectPath, repo.path);
|
|
182
|
+
// Clone or initialize repository
|
|
183
|
+
await cloneOrInitRepository(repoPath, repo.owner, repo.name, repo.createOnGitHub, config.urlType, config.provider, githubToken);
|
|
184
|
+
// Create basic structure (only if repo was just initialized, not cloned)
|
|
185
|
+
if (!repo.createOnGitHub || !await repositoryExistsOnGitHub(repo.owner, repo.name, githubToken)) {
|
|
186
|
+
createBasicRepoStructure(repoPath, repo.id);
|
|
187
|
+
}
|
|
188
|
+
// Update background job progress
|
|
189
|
+
if (jobManager && jobId) {
|
|
190
|
+
jobManager.updateProgress(jobId, processed, repo.name, repo.name);
|
|
191
|
+
}
|
|
192
|
+
spinner.text = `Cloned ${processed}/${totalRepos}: ${repo.name}`;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
// Single repo or monorepo
|
|
197
|
+
if (!existsSync(path.join(projectPath, '.git'))) {
|
|
198
|
+
execFileNoThrowSync('git', ['init'], { cwd: projectPath });
|
|
199
|
+
const repo = config.repositories[0];
|
|
200
|
+
if (repo) {
|
|
201
|
+
const remoteUrl = config.provider.getRemoteUrl(repo.owner, repo.name, config.urlType);
|
|
202
|
+
execFileNoThrowSync('git', ['remote', 'add', 'origin', remoteUrl], { cwd: projectPath });
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
// For monorepo, create project directories
|
|
206
|
+
if (config.architecture === 'monorepo' && config.monorepoProjects) {
|
|
207
|
+
for (const project of config.monorepoProjects) {
|
|
208
|
+
const projectPathInner = path.join(projectPath, 'packages', project);
|
|
209
|
+
if (!existsSync(projectPathInner)) {
|
|
210
|
+
mkdirSync(projectPathInner, { recursive: true });
|
|
211
|
+
}
|
|
212
|
+
createBasicRepoStructure(projectPathInner, project);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
// Complete background job
|
|
217
|
+
if (jobManager && jobId) {
|
|
218
|
+
jobManager.completeJob(jobId);
|
|
219
|
+
}
|
|
220
|
+
spinner.succeed(`Local repositories initialized (${totalRepos} repo${totalRepos === 1 ? '' : 's'})`);
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Create SpecWeave project structure (simplified - ONLY specs folders)
|
|
224
|
+
*
|
|
225
|
+
* NOTE: As of v0.X.X (increment 0026), we ONLY create specs/ folders.
|
|
226
|
+
* No modules/, team/, architecture/, legacy/ folders.
|
|
227
|
+
*/
|
|
228
|
+
export async function createSpecWeaveStructure(config, projectPath) {
|
|
229
|
+
const specweavePath = path.join(projectPath, '.specweave');
|
|
230
|
+
// Create project-specific spec folders (ONLY specs/, no nested folders)
|
|
231
|
+
if (config.architecture === 'monorepo' && config.monorepoProjects) {
|
|
232
|
+
// Monorepo: create specs folder for each project
|
|
233
|
+
for (const project of config.monorepoProjects) {
|
|
234
|
+
const projectSpecPath = path.join(specweavePath, 'docs', 'internal', 'specs', project.toLowerCase());
|
|
235
|
+
if (!existsSync(projectSpecPath)) {
|
|
236
|
+
mkdirSync(projectSpecPath, { recursive: true });
|
|
237
|
+
}
|
|
238
|
+
console.log(chalk.gray(` [OK] Created project structure: ${project}`));
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
else if (config.architecture === 'multi-repo' || config.architecture === 'parent') {
|
|
242
|
+
// Multi-repo: create specs folder for each repository
|
|
243
|
+
for (const repo of config.repositories) {
|
|
244
|
+
const projectSpecPath = path.join(specweavePath, 'docs', 'internal', 'specs', repo.id);
|
|
245
|
+
if (!existsSync(projectSpecPath)) {
|
|
246
|
+
mkdirSync(projectSpecPath, { recursive: true });
|
|
247
|
+
}
|
|
248
|
+
console.log(chalk.gray(` [OK] Created project structure: ${repo.path}`));
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
//# sourceMappingURL=repo-initializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo-initializer.js","sourceRoot":"","sources":["../../../../src/core/repo-structure/repo-initializer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAClF,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAGrE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAQvD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,KAAa,EACb,IAAY,EACZ,WAAoB;IAEpB,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,gCAAgC,KAAK,IAAI,IAAI,EAAE,EAAE;YAC5E,OAAO,EAAE;gBACP,eAAe,EAAE,UAAU,WAAW,EAAE;gBACxC,QAAQ,EAAE,6BAA6B;aACxC;SACF,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,EAAE,CAAC;IACrB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,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AC;YAED,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,sCAAsC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAC7E,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -71,23 +71,6 @@ export declare class RepoStructureManager {
|
|
|
71
71
|
* Configure single repository
|
|
72
72
|
*/
|
|
73
73
|
private configureSingleRepo;
|
|
74
|
-
/**
|
|
75
|
-
* Configure multi-repository architecture
|
|
76
|
-
* @param useParent - Whether to use parent repository/folder
|
|
77
|
-
* @param isLocalParent - If true, parent folder is local only (NOT pushed to GitHub)
|
|
78
|
-
* @param urlType - Git remote URL format (ssh or https)
|
|
79
|
-
* @param platform - Git hosting platform type
|
|
80
|
-
* @param provider - Git provider instance for API operations
|
|
81
|
-
*
|
|
82
|
-
* NOTE: This is primarily user-facing output (console.log/console.error).
|
|
83
|
-
* All console.* calls in this method are legitimate user-facing exceptions
|
|
84
|
-
* as defined in CONTRIBUTING.md (colored messages, confirmations, formatted output).
|
|
85
|
-
*/
|
|
86
|
-
private configureMultiRepo;
|
|
87
|
-
/**
|
|
88
|
-
* Save setup state for Ctrl+C recovery
|
|
89
|
-
*/
|
|
90
|
-
private saveSetupState;
|
|
91
74
|
/**
|
|
92
75
|
* Configure monorepo
|
|
93
76
|
*/
|
|
@@ -112,31 +95,14 @@ export declare class RepoStructureManager {
|
|
|
112
95
|
* Check if a GitHub account is an organization
|
|
113
96
|
*/
|
|
114
97
|
private isGitHubOrganization;
|
|
115
|
-
/**
|
|
116
|
-
* Check if a repository exists on GitHub
|
|
117
|
-
*/
|
|
118
|
-
private repositoryExistsOnGitHub;
|
|
119
|
-
/**
|
|
120
|
-
* Clone or initialize a repository
|
|
121
|
-
* If the repo exists on the platform, clone it; otherwise, init + add remote
|
|
122
|
-
*/
|
|
123
|
-
private cloneOrInitRepository;
|
|
124
98
|
/**
|
|
125
99
|
* Initialize local git repositories
|
|
100
|
+
* Delegates to extracted repo-initializer module
|
|
126
101
|
*/
|
|
127
102
|
initializeLocalRepos(config: RepoStructureConfig): Promise<void>;
|
|
128
103
|
/**
|
|
129
|
-
* Create
|
|
130
|
-
*
|
|
131
|
-
* NOTE: Only creates src/ and tests/ folders for nested projects.
|
|
132
|
-
* Documentation lives in .specweave/docs/internal/specs/{project-id}/ (source of truth)
|
|
133
|
-
*/
|
|
134
|
-
private createBasicRepoStructure;
|
|
135
|
-
/**
|
|
136
|
-
* Create SpecWeave project structure (simplified - ONLY specs folders)
|
|
137
|
-
*
|
|
138
|
-
* NOTE: As of v0.X.X (increment 0026), we ONLY create specs/ folders.
|
|
139
|
-
* No modules/, team/, architecture/, legacy/ folders.
|
|
104
|
+
* Create SpecWeave project structure
|
|
105
|
+
* Delegates to extracted repo-initializer module
|
|
140
106
|
*/
|
|
141
107
|
createSpecWeaveStructure(config: RepoStructureConfig): Promise<void>;
|
|
142
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo-structure-manager.d.ts","sourceRoot":"","sources":["../../../../src/core/repo-structure/repo-structure-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"repo-structure-manager.d.ts","sourceRoot":"","sources":["../../../../src/core/repo-structure/repo-structure-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAWH,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAStE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,YAAY,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE/E,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,gBAAgB,CAAC;IAC/B,OAAO,EAAE,KAAK,GAAG,OAAO,CAAC;IACzB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,WAAW,CAAC;IACtB,UA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