specweave 1.0.461 → 1.0.463
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-ac-checkbox-sync.d.ts +0 -1
- package/dist/plugins/specweave-ado/lib/ado-ac-checkbox-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-ac-checkbox-sync.js +1 -7
- package/dist/plugins/specweave-ado/lib/ado-ac-checkbox-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-ac-checkbox-sync.d.ts +0 -1
- package/dist/plugins/specweave-github/lib/github-ac-checkbox-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-ac-checkbox-sync.js +3 -14
- package/dist/plugins/specweave-github/lib/github-ac-checkbox-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-client-v2.js +1 -1
- package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-ac-checkbox-sync.d.ts +0 -1
- package/dist/plugins/specweave-jira/lib/jira-ac-checkbox-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-ac-checkbox-sync.js +2 -9
- package/dist/plugins/specweave-jira/lib/jira-ac-checkbox-sync.js.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/lib/vendor/utils/clean-env.d.ts +47 -0
- package/plugins/specweave/lib/vendor/utils/clean-env.js +63 -0
- package/plugins/specweave/lib/vendor/utils/clean-env.js.map +1 -0
- package/plugins/specweave/lib/vendor/utils/execFileNoThrow.d.ts +99 -0
- package/plugins/specweave/lib/vendor/utils/execFileNoThrow.js +149 -0
- package/plugins/specweave/lib/vendor/utils/execFileNoThrow.js.map +1 -0
- package/plugins/specweave-ado/lib/ado-ac-checkbox-sync.js +0 -5
- package/plugins/specweave-ado/lib/ado-ac-checkbox-sync.ts +1 -7
- package/plugins/specweave-github/lib/github-ac-checkbox-sync.js +2 -12
- package/plugins/specweave-github/lib/github-ac-checkbox-sync.ts +3 -16
- package/plugins/specweave-github/lib/github-client-v2.js +1 -1
- package/plugins/specweave-github/lib/github-client-v2.ts +1 -1
- package/plugins/specweave-jira/lib/jira-ac-checkbox-sync.js +1 -7
- package/plugins/specweave-jira/lib/jira-ac-checkbox-sync.ts +2 -9
- package/plugins/specweave/lib/vendor/utils/project-detection.d.ts +0 -250
- package/plugins/specweave/lib/vendor/utils/project-detection.js +0 -560
- package/plugins/specweave/lib/vendor/utils/project-detection.js.map +0 -1
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Project ID Auto-Detection Utilities
|
|
3
|
-
*
|
|
4
|
-
* Detects project ID from (priority order):
|
|
5
|
-
* 1. sync.defaultProfile (for multi-profile monorepos)
|
|
6
|
-
* 2. Git remote (GitHub repo name)
|
|
7
|
-
* 3. Sync configuration (JIRA project key, ADO project name)
|
|
8
|
-
* 4. User prompt (fallback)
|
|
9
|
-
*
|
|
10
|
-
* NOTE: multiProject.activeProject has been REMOVED!
|
|
11
|
-
* Per-US project targeting replaces global activeProject.
|
|
12
|
-
* See: 0125-cross-project-user-story-targeting
|
|
13
|
-
*
|
|
14
|
-
* Also provides repo name parsing for domain context understanding.
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Parsed repo name structure for domain understanding
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* parseRepoName('sw-qr-menu-be')
|
|
21
|
-
* // Returns: { prefix: 'sw', product: 'qr-menu', component: 'be', full: 'sw-qr-menu-be' }
|
|
22
|
-
*/
|
|
23
|
-
export interface ParsedRepoName {
|
|
24
|
-
/** Short prefix (e.g., 'sw' for company/project abbreviation) */
|
|
25
|
-
prefix: string | null;
|
|
26
|
-
/** Product/domain name (e.g., 'qr-menu') */
|
|
27
|
-
product: string;
|
|
28
|
-
/** Component suffix (e.g., 'be', 'fe', 'shared', 'api', 'web', 'mobile') */
|
|
29
|
-
component: string | null;
|
|
30
|
-
/** Full original repo name */
|
|
31
|
-
full: string;
|
|
32
|
-
/** Detected domain context based on product name */
|
|
33
|
-
domain: string | null;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Parse repo name to extract product, component, and domain context
|
|
37
|
-
*
|
|
38
|
-
* Understands naming conventions like:
|
|
39
|
-
* - `sw-qr-menu-be` → prefix: sw, product: qr-menu, component: be
|
|
40
|
-
* - `my-app-frontend` → prefix: null, product: my-app, component: frontend
|
|
41
|
-
* - `ecommerce-api` → prefix: null, product: ecommerce, component: api
|
|
42
|
-
*
|
|
43
|
-
* @param repoName - Repository name (e.g., "sw-qr-menu-be")
|
|
44
|
-
* @returns Parsed repo name structure
|
|
45
|
-
*/
|
|
46
|
-
export declare function parseRepoName(repoName: string): ParsedRepoName;
|
|
47
|
-
/**
|
|
48
|
-
* Detect default project ID from configuration
|
|
49
|
-
*
|
|
50
|
-
* NOTE: multiProject.activeProject has been REMOVED!
|
|
51
|
-
* This function now only uses sync.defaultProfile for legacy umbrella repos.
|
|
52
|
-
*
|
|
53
|
-
* Priority:
|
|
54
|
-
* 1. sync.defaultProfile - for umbrella repos where profile maps to folder
|
|
55
|
-
*
|
|
56
|
-
* @param projectRoot - Project root directory
|
|
57
|
-
* @returns Default project ID or null if not configured
|
|
58
|
-
*/
|
|
59
|
-
export declare function detectDefaultProfileId(projectRoot: string): string | null;
|
|
60
|
-
/**
|
|
61
|
-
* Auto-detect project ID from git remote URL
|
|
62
|
-
*
|
|
63
|
-
* Extracts repository name from git remote URL
|
|
64
|
-
*
|
|
65
|
-
* @param projectRoot - Project root directory
|
|
66
|
-
* @returns Project ID (repo name) or null if not detected
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* // Git remote: https://github.com/anton-abyzov/specweave.git
|
|
70
|
-
* detectProjectIdFromGit('/path/to/project')
|
|
71
|
-
* // Returns: "specweave"
|
|
72
|
-
*
|
|
73
|
-
* @example
|
|
74
|
-
* // Git remote: git@github.com:my-org/web-app.git
|
|
75
|
-
* detectProjectIdFromGit('/path/to/project')
|
|
76
|
-
* // Returns: "web-app"
|
|
77
|
-
*/
|
|
78
|
-
export declare function detectProjectIdFromGit(projectRoot: string): string | null;
|
|
79
|
-
/**
|
|
80
|
-
* Auto-detect project ID from sync configuration
|
|
81
|
-
*
|
|
82
|
-
* Checks existing sync profiles for JIRA project key or ADO project name
|
|
83
|
-
*
|
|
84
|
-
* @param projectRoot - Project root directory
|
|
85
|
-
* @returns Project ID from sync config or null if not detected
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
* // Config has JIRA: { projectKey: "WEBAPP" }
|
|
89
|
-
* detectProjectIdFromSync('/path/to/project')
|
|
90
|
-
* // Returns: "webapp"
|
|
91
|
-
*/
|
|
92
|
-
export declare function detectProjectIdFromSync(projectRoot: string): string | null;
|
|
93
|
-
/**
|
|
94
|
-
* Prompt user for project ID
|
|
95
|
-
*
|
|
96
|
-
* Interactive prompt with validation and helpful examples
|
|
97
|
-
*
|
|
98
|
-
* @param suggestedId - Optional suggested project ID (from detection)
|
|
99
|
-
* @returns Project ID entered by user
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* await promptForProjectId()
|
|
103
|
-
* // User sees:
|
|
104
|
-
* // Project ID (matches GitHub repo, JIRA project, or ADO project): █
|
|
105
|
-
* // User enters: "web-app"
|
|
106
|
-
* // Returns: "web-app"
|
|
107
|
-
*/
|
|
108
|
-
export declare function promptForProjectId(suggestedId?: string): Promise<string>;
|
|
109
|
-
/**
|
|
110
|
-
* Auto-detect project ID synchronously (no prompts)
|
|
111
|
-
*
|
|
112
|
-
* Priority:
|
|
113
|
-
* 1. Active sync profile ID (for multi-profile monorepos like sw-qr-menu)
|
|
114
|
-
* 2. Git remote (GitHub repo name) - for single-repo projects
|
|
115
|
-
* 3. Sync configuration (JIRA/ADO project) - legacy fallback
|
|
116
|
-
* 4. "default" (fallback)
|
|
117
|
-
*
|
|
118
|
-
* @param projectRoot - Project root directory
|
|
119
|
-
* @param options - Detection options
|
|
120
|
-
* @returns Detected project ID or "default"
|
|
121
|
-
*
|
|
122
|
-
* @example
|
|
123
|
-
* // Multi-project setup with activeProject: "be"
|
|
124
|
-
* autoDetectProjectIdSync('/path/to/sw-qr-menu')
|
|
125
|
-
* // Returns: "be" (profile ID, NOT "sw-qr-menu-be")
|
|
126
|
-
*
|
|
127
|
-
* @example
|
|
128
|
-
* // Single repo: https://github.com/anton-abyzov/specweave.git
|
|
129
|
-
* autoDetectProjectIdSync('/path/to/project')
|
|
130
|
-
* // Returns: "specweave"
|
|
131
|
-
*
|
|
132
|
-
* @example
|
|
133
|
-
* // No git, no sync
|
|
134
|
-
* autoDetectProjectIdSync('/path/to/project')
|
|
135
|
-
* // Returns: "default"
|
|
136
|
-
*/
|
|
137
|
-
export declare function autoDetectProjectIdSync(projectRoot: string, options?: {
|
|
138
|
-
silent?: boolean;
|
|
139
|
-
}): string;
|
|
140
|
-
/**
|
|
141
|
-
* Auto-detect project ID with fallback chain (async version with prompts)
|
|
142
|
-
*
|
|
143
|
-
* Priority:
|
|
144
|
-
* 1. Default sync profile ID (for multi-profile monorepos)
|
|
145
|
-
* 2. Git remote (GitHub repo name)
|
|
146
|
-
* 3. Sync configuration (JIRA/ADO project)
|
|
147
|
-
* 4. User prompt (with detected suggestion)
|
|
148
|
-
* 5. "default" (if user accepts default in prompt)
|
|
149
|
-
*
|
|
150
|
-
* @param projectRoot - Project root directory
|
|
151
|
-
* @param options - Detection options
|
|
152
|
-
* @returns Detected or prompted project ID
|
|
153
|
-
*
|
|
154
|
-
* @example
|
|
155
|
-
* // Multi-project setup with defaultProfile: "be"
|
|
156
|
-
* await autoDetectProjectId('/path/to/sw-qr-menu')
|
|
157
|
-
* // Output: "✅ Detected default profile: be"
|
|
158
|
-
* // Returns: "be"
|
|
159
|
-
*
|
|
160
|
-
* @example
|
|
161
|
-
* // In git repo: https://github.com/anton-abyzov/specweave.git
|
|
162
|
-
* await autoDetectProjectId('/path/to/project')
|
|
163
|
-
* // Output: "✅ Detected git repository: specweave"
|
|
164
|
-
* // Returns: "specweave"
|
|
165
|
-
*
|
|
166
|
-
* @example
|
|
167
|
-
* // No git, no sync, user prompted
|
|
168
|
-
* await autoDetectProjectId('/path/to/project')
|
|
169
|
-
* // Output: "📝 No git repository or sync configuration detected."
|
|
170
|
-
* // Prompts user for project ID
|
|
171
|
-
* // Returns: user input (e.g., "my-project")
|
|
172
|
-
*/
|
|
173
|
-
export declare function autoDetectProjectId(projectRoot: string, options?: {
|
|
174
|
-
silent?: boolean;
|
|
175
|
-
promptIfNotDetected?: boolean;
|
|
176
|
-
}): Promise<string>;
|
|
177
|
-
/**
|
|
178
|
-
* Format project ID to display name
|
|
179
|
-
*
|
|
180
|
-
* Converts kebab-case/snake_case to Title Case
|
|
181
|
-
*
|
|
182
|
-
* @param projectId - Project ID (e.g., "web-app", "mobile_app")
|
|
183
|
-
* @returns Formatted name (e.g., "Web App", "Mobile App")
|
|
184
|
-
*
|
|
185
|
-
* @example
|
|
186
|
-
* formatProjectName('web-app')
|
|
187
|
-
* // Returns: "Web App"
|
|
188
|
-
*
|
|
189
|
-
* @example
|
|
190
|
-
* formatProjectName('mobile_app')
|
|
191
|
-
* // Returns: "Mobile App"
|
|
192
|
-
*
|
|
193
|
-
* @example
|
|
194
|
-
* formatProjectName('specweave')
|
|
195
|
-
* // Returns: "SpecWeave"
|
|
196
|
-
*/
|
|
197
|
-
export declare function formatProjectName(projectId: string): string;
|
|
198
|
-
/**
|
|
199
|
-
* Validate project ID format
|
|
200
|
-
*
|
|
201
|
-
* @param projectId - Project ID to validate
|
|
202
|
-
* @returns True if valid, error message if invalid
|
|
203
|
-
*/
|
|
204
|
-
export declare function validateProjectId(projectId: string): true | string;
|
|
205
|
-
/**
|
|
206
|
-
* Full project context for intelligent user story routing and domain awareness
|
|
207
|
-
*/
|
|
208
|
-
export interface ProjectContext {
|
|
209
|
-
/** Default project/profile ID (folder name under specs/) */
|
|
210
|
-
projectId: string;
|
|
211
|
-
/** How projectId was detected */
|
|
212
|
-
detectedFrom: 'defaultProfile' | 'gitRemote' | 'syncConfig' | 'fallback';
|
|
213
|
-
/** Parsed repo name with domain context (if git remote detected) */
|
|
214
|
-
repoInfo: ParsedRepoName | null;
|
|
215
|
-
/** All available profiles (for multi-profile monorepos) */
|
|
216
|
-
availableProfiles: string[];
|
|
217
|
-
/** Default profile config (if multi-profile) */
|
|
218
|
-
defaultProfile: {
|
|
219
|
-
id: string;
|
|
220
|
-
displayName: string;
|
|
221
|
-
provider: string;
|
|
222
|
-
repo?: string;
|
|
223
|
-
} | null;
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Get full project context for intelligent routing and domain awareness
|
|
227
|
-
*
|
|
228
|
-
* Use this to understand:
|
|
229
|
-
* - Which project folder to use for specs (projectId)
|
|
230
|
-
* - What domain/product this project is about (repoInfo.domain)
|
|
231
|
-
* - What component type this is (repoInfo.component: be/fe/shared)
|
|
232
|
-
* - What other profiles are available (for cross-project user stories)
|
|
233
|
-
*
|
|
234
|
-
* @param projectRoot - Project root directory
|
|
235
|
-
* @returns Full project context
|
|
236
|
-
*
|
|
237
|
-
* @example
|
|
238
|
-
* // sw-qr-menu monorepo with defaultProfile: "be"
|
|
239
|
-
* getProjectContext('/path/to/sw-qr-menu')
|
|
240
|
-
* // Returns:
|
|
241
|
-
* // {
|
|
242
|
-
* // projectId: 'be',
|
|
243
|
-
* // detectedFrom: 'defaultProfile',
|
|
244
|
-
* // repoInfo: { prefix: 'sw', product: 'qr-menu', component: 'be', domain: 'hospitality/restaurant' },
|
|
245
|
-
* // availableProfiles: ['be', 'fe', 'shared'],
|
|
246
|
-
* // defaultProfile: { id: 'be', displayName: 'sw-qr-menu-be service', provider: 'github', repo: 'sw-qr-menu-be' }
|
|
247
|
-
* // }
|
|
248
|
-
*/
|
|
249
|
-
export declare function getProjectContext(projectRoot: string): ProjectContext;
|
|
250
|
-
//# sourceMappingURL=project-detection.d.ts.map
|