codesyncer 1.0.0
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/LICENSE +31 -0
- package/README.ko.md +417 -0
- package/README.md +417 -0
- package/bin/codesyncer.js +3 -0
- package/dist/commands/add-repo.d.ts +3 -0
- package/dist/commands/add-repo.d.ts.map +1 -0
- package/dist/commands/add-repo.js +145 -0
- package/dist/commands/add-repo.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +489 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/update.d.ts +3 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +123 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/constants/keywords.d.ts +23 -0
- package/dist/constants/keywords.d.ts.map +1 -0
- package/dist/constants/keywords.js +133 -0
- package/dist/constants/keywords.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +52 -0
- package/dist/index.js.map +1 -0
- package/dist/templates/en/architecture.md +147 -0
- package/dist/templates/en/claude.md +267 -0
- package/dist/templates/en/comment_guide.md +324 -0
- package/dist/templates/en/decisions.md +227 -0
- package/dist/templates/en/master.md +179 -0
- package/dist/templates/ko/architecture.md +147 -0
- package/dist/templates/ko/claude.md +267 -0
- package/dist/templates/ko/comment_guide.md +324 -0
- package/dist/templates/ko/decisions.md +227 -0
- package/dist/templates/ko/master.md +179 -0
- package/dist/types.d.ts +78 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +16 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/messages.d.ts +129 -0
- package/dist/utils/messages.d.ts.map +1 -0
- package/dist/utils/messages.js +168 -0
- package/dist/utils/messages.js.map +1 -0
- package/dist/utils/scanner.d.ts +11 -0
- package/dist/utils/scanner.d.ts.map +1 -0
- package/dist/utils/scanner.js +311 -0
- package/dist/utils/scanner.js.map +1 -0
- package/dist/utils/template-loader.d.ts +18 -0
- package/dist/utils/template-loader.d.ts.map +1 -0
- package/dist/utils/template-loader.js +496 -0
- package/dist/utils/template-loader.js.map +1 -0
- package/package.json +70 -0
- package/src/templates/en/architecture.md +147 -0
- package/src/templates/en/claude.md +267 -0
- package/src/templates/en/comment_guide.md +324 -0
- package/src/templates/en/decisions.md +227 -0
- package/src/templates/en/master.md +179 -0
- package/src/templates/ko/architecture.md +147 -0
- package/src/templates/ko/claude.md +267 -0
- package/src/templates/ko/comment_guide.md +324 -0
- package/src/templates/ko/decisions.md +227 -0
- package/src/templates/ko/master.md +179 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.scanForRepositories = scanForRepositories;
|
|
37
|
+
exports.hasMasterSetup = hasMasterSetup;
|
|
38
|
+
const fs = __importStar(require("fs-extra"));
|
|
39
|
+
const path = __importStar(require("path"));
|
|
40
|
+
/**
|
|
41
|
+
* Scan current directory for potential repository folders
|
|
42
|
+
* Looks for folders that contain package.json, git repos, or common project structures
|
|
43
|
+
*/
|
|
44
|
+
async function scanForRepositories(rootPath) {
|
|
45
|
+
const repos = [];
|
|
46
|
+
try {
|
|
47
|
+
const entries = await fs.readdir(rootPath, { withFileTypes: true });
|
|
48
|
+
for (const entry of entries) {
|
|
49
|
+
if (!entry.isDirectory())
|
|
50
|
+
continue;
|
|
51
|
+
// Skip node_modules, .git, dist, build folders
|
|
52
|
+
if (['node_modules', '.git', 'dist', 'build', '.next', 'coverage'].includes(entry.name)) {
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
const folderPath = path.join(rootPath, entry.name);
|
|
56
|
+
const isRepo = await isValidRepository(folderPath);
|
|
57
|
+
if (isRepo) {
|
|
58
|
+
const type = await detectProjectType(folderPath);
|
|
59
|
+
const techStack = await detectTechStack(folderPath, type);
|
|
60
|
+
const hasCodeSyncer = await hasCodeSyncerSetup(folderPath);
|
|
61
|
+
repos.push({
|
|
62
|
+
name: entry.name,
|
|
63
|
+
path: folderPath,
|
|
64
|
+
type,
|
|
65
|
+
description: '', // Will be filled by user input
|
|
66
|
+
techStack, // Auto-detected tech stack
|
|
67
|
+
hasCodeSyncer,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
console.error('Error scanning directories:', error);
|
|
74
|
+
}
|
|
75
|
+
return repos;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Check if a folder is a valid repository
|
|
79
|
+
*/
|
|
80
|
+
async function isValidRepository(folderPath) {
|
|
81
|
+
try {
|
|
82
|
+
// Check for package.json (Node.js projects)
|
|
83
|
+
const hasPackageJson = await fs.pathExists(path.join(folderPath, 'package.json'));
|
|
84
|
+
if (hasPackageJson)
|
|
85
|
+
return true;
|
|
86
|
+
// Check for .git folder
|
|
87
|
+
const hasGit = await fs.pathExists(path.join(folderPath, '.git'));
|
|
88
|
+
if (hasGit)
|
|
89
|
+
return true;
|
|
90
|
+
// Check for common project files
|
|
91
|
+
const commonFiles = [
|
|
92
|
+
'pom.xml', // Java
|
|
93
|
+
'requirements.txt', // Python
|
|
94
|
+
'Cargo.toml', // Rust
|
|
95
|
+
'go.mod', // Go
|
|
96
|
+
'build.gradle', // Android/Java
|
|
97
|
+
'pubspec.yaml', // Flutter/Dart
|
|
98
|
+
];
|
|
99
|
+
for (const file of commonFiles) {
|
|
100
|
+
if (await fs.pathExists(path.join(folderPath, file))) {
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
// Check for src folder (common in many projects)
|
|
105
|
+
const hasSrc = await fs.pathExists(path.join(folderPath, 'src'));
|
|
106
|
+
if (hasSrc)
|
|
107
|
+
return true;
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Detect project type based on folder structure and files
|
|
116
|
+
*/
|
|
117
|
+
async function detectProjectType(folderPath) {
|
|
118
|
+
try {
|
|
119
|
+
// Check for Java projects (Spring Boot)
|
|
120
|
+
const hasPomXml = await fs.pathExists(path.join(folderPath, 'pom.xml'));
|
|
121
|
+
const hasGradle = await fs.pathExists(path.join(folderPath, 'build.gradle'));
|
|
122
|
+
if (hasPomXml || hasGradle) {
|
|
123
|
+
// Check if it's Android (mobile) or Spring (backend)
|
|
124
|
+
const hasAndroid = await fs.pathExists(path.join(folderPath, 'app', 'src', 'main', 'AndroidManifest.xml'));
|
|
125
|
+
if (hasAndroid) {
|
|
126
|
+
return 'mobile';
|
|
127
|
+
}
|
|
128
|
+
return 'backend'; // Java Spring Boot
|
|
129
|
+
}
|
|
130
|
+
// Check for Python projects (Django, FastAPI)
|
|
131
|
+
const hasRequirements = await fs.pathExists(path.join(folderPath, 'requirements.txt'));
|
|
132
|
+
const hasPipfile = await fs.pathExists(path.join(folderPath, 'Pipfile'));
|
|
133
|
+
if (hasRequirements || hasPipfile) {
|
|
134
|
+
try {
|
|
135
|
+
let content = '';
|
|
136
|
+
if (hasRequirements) {
|
|
137
|
+
content = await fs.readFile(path.join(folderPath, 'requirements.txt'), 'utf-8');
|
|
138
|
+
}
|
|
139
|
+
// Check for web frameworks
|
|
140
|
+
if (content.includes('django') || content.includes('fastapi') || content.includes('flask')) {
|
|
141
|
+
return 'backend';
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
catch {
|
|
145
|
+
// If can't read file, default to backend
|
|
146
|
+
}
|
|
147
|
+
return 'backend'; // Python backend
|
|
148
|
+
}
|
|
149
|
+
// Check for Node.js projects
|
|
150
|
+
const packageJsonPath = path.join(folderPath, 'package.json');
|
|
151
|
+
if (await fs.pathExists(packageJsonPath)) {
|
|
152
|
+
const packageJson = await fs.readJson(packageJsonPath);
|
|
153
|
+
const deps = {
|
|
154
|
+
...packageJson.dependencies,
|
|
155
|
+
...packageJson.devDependencies,
|
|
156
|
+
};
|
|
157
|
+
// Check for mobile
|
|
158
|
+
if (deps['react-native'] || deps['expo'] || deps['@react-native']) {
|
|
159
|
+
return 'mobile';
|
|
160
|
+
}
|
|
161
|
+
// Check for frontend (React, Vue, etc.)
|
|
162
|
+
if (deps['react'] || deps['vue'] || deps['angular'] || deps['svelte']) {
|
|
163
|
+
// Check if it's Next.js (could be fullstack)
|
|
164
|
+
if (deps['next'] && (deps['prisma'] || deps['mongoose'] || deps['@prisma/client'])) {
|
|
165
|
+
return 'fullstack';
|
|
166
|
+
}
|
|
167
|
+
return 'frontend';
|
|
168
|
+
}
|
|
169
|
+
// Check for backend (Express, Fastify, NestJS)
|
|
170
|
+
if (deps['express'] || deps['fastify'] || deps['koa'] || deps['@nestjs/core']) {
|
|
171
|
+
return 'backend';
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
// Check for mobile-specific files
|
|
175
|
+
const hasPodfile = await fs.pathExists(path.join(folderPath, 'ios', 'Podfile'));
|
|
176
|
+
const hasAndroidGradle = await fs.pathExists(path.join(folderPath, 'android', 'build.gradle'));
|
|
177
|
+
if (hasPodfile || hasAndroidGradle) {
|
|
178
|
+
return 'mobile';
|
|
179
|
+
}
|
|
180
|
+
// Default to fullstack if can't determine
|
|
181
|
+
return 'fullstack';
|
|
182
|
+
}
|
|
183
|
+
catch {
|
|
184
|
+
return 'fullstack';
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Detect tech stack based on project files and dependencies
|
|
189
|
+
*/
|
|
190
|
+
async function detectTechStack(folderPath, type) {
|
|
191
|
+
const techStack = [];
|
|
192
|
+
try {
|
|
193
|
+
// Check for Java projects
|
|
194
|
+
const hasPomXml = await fs.pathExists(path.join(folderPath, 'pom.xml'));
|
|
195
|
+
if (hasPomXml) {
|
|
196
|
+
techStack.push('Java');
|
|
197
|
+
try {
|
|
198
|
+
const pomContent = await fs.readFile(path.join(folderPath, 'pom.xml'), 'utf-8');
|
|
199
|
+
if (pomContent.includes('spring-boot')) {
|
|
200
|
+
techStack.push('Spring Boot');
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
catch { }
|
|
204
|
+
return techStack;
|
|
205
|
+
}
|
|
206
|
+
const hasGradle = await fs.pathExists(path.join(folderPath, 'build.gradle'));
|
|
207
|
+
if (hasGradle) {
|
|
208
|
+
techStack.push('Java');
|
|
209
|
+
try {
|
|
210
|
+
const gradleContent = await fs.readFile(path.join(folderPath, 'build.gradle'), 'utf-8');
|
|
211
|
+
if (gradleContent.includes('spring-boot')) {
|
|
212
|
+
techStack.push('Spring Boot');
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
catch { }
|
|
216
|
+
return techStack;
|
|
217
|
+
}
|
|
218
|
+
// Check for Python projects
|
|
219
|
+
const hasRequirements = await fs.pathExists(path.join(folderPath, 'requirements.txt'));
|
|
220
|
+
if (hasRequirements) {
|
|
221
|
+
techStack.push('Python');
|
|
222
|
+
try {
|
|
223
|
+
const reqContent = await fs.readFile(path.join(folderPath, 'requirements.txt'), 'utf-8');
|
|
224
|
+
if (reqContent.includes('django'))
|
|
225
|
+
techStack.push('Django');
|
|
226
|
+
if (reqContent.includes('fastapi'))
|
|
227
|
+
techStack.push('FastAPI');
|
|
228
|
+
if (reqContent.includes('flask'))
|
|
229
|
+
techStack.push('Flask');
|
|
230
|
+
}
|
|
231
|
+
catch { }
|
|
232
|
+
return techStack;
|
|
233
|
+
}
|
|
234
|
+
// Check for Node.js projects
|
|
235
|
+
const packageJsonPath = path.join(folderPath, 'package.json');
|
|
236
|
+
if (await fs.pathExists(packageJsonPath)) {
|
|
237
|
+
const packageJson = await fs.readJson(packageJsonPath);
|
|
238
|
+
const deps = {
|
|
239
|
+
...packageJson.dependencies,
|
|
240
|
+
...packageJson.devDependencies,
|
|
241
|
+
};
|
|
242
|
+
// Check for TypeScript
|
|
243
|
+
if (deps['typescript']) {
|
|
244
|
+
techStack.push('TypeScript');
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
techStack.push('JavaScript');
|
|
248
|
+
}
|
|
249
|
+
// Frontend frameworks
|
|
250
|
+
if (deps['react'])
|
|
251
|
+
techStack.push('React');
|
|
252
|
+
if (deps['vue'])
|
|
253
|
+
techStack.push('Vue');
|
|
254
|
+
if (deps['angular'])
|
|
255
|
+
techStack.push('Angular');
|
|
256
|
+
if (deps['svelte'])
|
|
257
|
+
techStack.push('Svelte');
|
|
258
|
+
if (deps['next'])
|
|
259
|
+
techStack.push('Next.js');
|
|
260
|
+
// Backend frameworks
|
|
261
|
+
if (deps['express'])
|
|
262
|
+
techStack.push('Express');
|
|
263
|
+
if (deps['fastify'])
|
|
264
|
+
techStack.push('Fastify');
|
|
265
|
+
if (deps['@nestjs/core'])
|
|
266
|
+
techStack.push('NestJS');
|
|
267
|
+
if (deps['koa'])
|
|
268
|
+
techStack.push('Koa');
|
|
269
|
+
// Mobile
|
|
270
|
+
if (deps['react-native'])
|
|
271
|
+
techStack.push('React Native');
|
|
272
|
+
if (deps['expo'])
|
|
273
|
+
techStack.push('Expo');
|
|
274
|
+
// Build tools
|
|
275
|
+
if (deps['vite'])
|
|
276
|
+
techStack.push('Vite');
|
|
277
|
+
if (deps['webpack'])
|
|
278
|
+
techStack.push('Webpack');
|
|
279
|
+
return techStack;
|
|
280
|
+
}
|
|
281
|
+
// Default fallback based on type
|
|
282
|
+
const fallbackStack = {
|
|
283
|
+
frontend: ['React', 'TypeScript'],
|
|
284
|
+
backend: ['Node.js', 'TypeScript'],
|
|
285
|
+
mobile: ['React Native', 'TypeScript'],
|
|
286
|
+
fullstack: ['Next.js', 'TypeScript'],
|
|
287
|
+
};
|
|
288
|
+
return fallbackStack[type] || ['TypeScript'];
|
|
289
|
+
}
|
|
290
|
+
catch (error) {
|
|
291
|
+
// Fallback to defaults
|
|
292
|
+
return ['TypeScript'];
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Check if CodeSyncer is already set up in the repository
|
|
297
|
+
*/
|
|
298
|
+
async function hasCodeSyncerSetup(folderPath) {
|
|
299
|
+
const claudePath = path.join(folderPath, '.claude');
|
|
300
|
+
const vibeSyncPath = path.join(folderPath, '.codesyncer');
|
|
301
|
+
return (await fs.pathExists(claudePath)) || (await fs.pathExists(vibeSyncPath));
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Check if master CodeSyncer setup exists in root
|
|
305
|
+
*/
|
|
306
|
+
async function hasMasterSetup(rootPath) {
|
|
307
|
+
const masterPath = path.join(rootPath, '.codesyncer');
|
|
308
|
+
const legacyMasterPath = path.join(rootPath, '.master');
|
|
309
|
+
return (await fs.pathExists(masterPath)) || (await fs.pathExists(legacyMasterPath));
|
|
310
|
+
}
|
|
311
|
+
//# sourceMappingURL=scanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scanner.js","sourceRoot":"","sources":["../../src/utils/scanner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,kDAqCC;AAyOD,wCAKC;AA3RD,6CAA+B;AAC/B,2CAA6B;AAG7B;;;GAGG;AACI,KAAK,UAAU,mBAAmB,CAAC,QAAgB;IACxD,MAAM,KAAK,GAAqB,EAAE,CAAC;IAEnC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;QAEpE,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;gBAAE,SAAS;YAEnC,+CAA+C;YAC/C,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;gBACxF,SAAS;YACX,CAAC;YAED,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;YACnD,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,UAAU,CAAC,CAAC;YAE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,YAAY,CAAC;SACrC,CAAC;QAEF,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC/C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,uBAAuB;QACvB,OAAO,CAAC,YAAY,CAAC,CAAC;IACxB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,kBAAkB,CAAC,UAAkB;IAClD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IACpD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAE1D,OAAO,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;AAClF,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,cAAc,CAAC,QAAgB;IACnD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IACtD,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAExD,OAAO,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACtF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Language, MasterDocConfig, RepoSetupConfig } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Load template file from templates directory
|
|
4
|
+
*/
|
|
5
|
+
export declare function loadTemplate(templateName: string, lang: Language): Promise<string>;
|
|
6
|
+
/**
|
|
7
|
+
* Replace variables in template with actual values
|
|
8
|
+
*/
|
|
9
|
+
export declare function replaceTemplateVars(template: string, vars: Record<string, string>): string;
|
|
10
|
+
/**
|
|
11
|
+
* Generate master document content
|
|
12
|
+
*/
|
|
13
|
+
export declare function generateMasterDoc(config: MasterDocConfig): Promise<string>;
|
|
14
|
+
/**
|
|
15
|
+
* Generate repository-specific collaboration system docs
|
|
16
|
+
*/
|
|
17
|
+
export declare function generateRepoDoc(docType: 'CLAUDE' | 'COMMENT_GUIDE' | 'ARCHITECTURE' | 'DECISIONS', config: RepoSetupConfig): Promise<string>;
|
|
18
|
+
//# sourceMappingURL=template-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-loader.d.ts","sourceRoot":"","sources":["../../src/utils/template-loader.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEtE;;GAEG;AACH,wBAAsB,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAQxF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAc1F;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CA0BhF;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,QAAQ,GAAG,eAAe,GAAG,cAAc,GAAG,WAAW,EAClE,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC,MAAM,CAAC,CAyBjB"}
|