speccore 5.13.0 → 5.15.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/dist/cli.js +1 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/analyze.d.ts +1 -0
- package/dist/commands/analyze.d.ts.map +1 -1
- package/dist/commands/analyze.js +96 -0
- package/dist/commands/analyze.js.map +1 -1
- package/dist/commands/done.d.ts.map +1 -1
- package/dist/commands/done.js +6 -0
- package/dist/commands/done.js.map +1 -1
- package/dist/commands/execute.d.ts.map +1 -1
- package/dist/commands/execute.js +6 -1
- package/dist/commands/execute.js.map +1 -1
- package/dist/core/git-integration.d.ts.map +1 -1
- package/dist/core/git-integration.js +1 -2
- package/dist/core/git-integration.js.map +1 -1
- package/dist/core/question-checklist.d.ts +14 -0
- package/dist/core/question-checklist.d.ts.map +1 -0
- package/dist/core/question-checklist.js +105 -0
- package/dist/core/question-checklist.js.map +1 -0
- package/package.json +1 -1
- package/dist/core/safe-write.d.ts +0 -20
- package/dist/core/safe-write.d.ts.map +0 -1
- package/dist/core/safe-write.js +0 -34
- package/dist/core/safe-write.js.map +0 -1
- package/dist/core/task-lock.d.ts +0 -30
- package/dist/core/task-lock.d.ts.map +0 -1
- package/dist/core/task-lock.js +0 -94
- package/dist/core/task-lock.js.map +0 -1
- package/dist/core/tx-wrapper.d.ts +0 -17
- package/dist/core/tx-wrapper.d.ts.map +0 -1
- package/dist/core/tx-wrapper.js +0 -31
- package/dist/core/tx-wrapper.js.map +0 -1
- package/dist/locales/en-US.json +0 -153
- package/dist/locales/zh-CN.json +0 -153
- package/dist/utils/file.d.ts +0 -29
- package/dist/utils/file.d.ts.map +0 -1
- package/dist/utils/file.js +0 -126
- package/dist/utils/file.js.map +0 -1
- package/dist/utils/git.d.ts +0 -25
- package/dist/utils/git.d.ts.map +0 -1
- package/dist/utils/git.js +0 -77
- package/dist/utils/git.js.map +0 -1
package/dist/locales/zh-CN.json
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_meta": {
|
|
3
|
-
"locale": "zh-CN",
|
|
4
|
-
"name": "中文"
|
|
5
|
-
},
|
|
6
|
-
"cmd": {
|
|
7
|
-
"init": {
|
|
8
|
-
"start": "初始化 SpecCore 项目...",
|
|
9
|
-
"success": "项目初始化完成!",
|
|
10
|
-
"already": "SpecCore 已初始化,使用 --force 强制覆盖。",
|
|
11
|
-
"force": "使用 --force 重新初始化..."
|
|
12
|
-
},
|
|
13
|
-
"import": {
|
|
14
|
-
"start": "导入项目到全量层...",
|
|
15
|
-
"success": "项目导入完成!",
|
|
16
|
-
"scanning": "扫描项目: {project} ({type})",
|
|
17
|
-
"found": "发现 {count} 个接口, {models} 个数据模型",
|
|
18
|
-
"generated_req": "生成需求: {req}"
|
|
19
|
-
},
|
|
20
|
-
"execute": {
|
|
21
|
-
"start": "准备执行...",
|
|
22
|
-
"preview": "执行预览",
|
|
23
|
-
"executing": "执行 {task}...",
|
|
24
|
-
"success": "执行完成!",
|
|
25
|
-
"dry_run": "预览模式 — 不产生实际修改",
|
|
26
|
-
"no_tasks": "未找到匹配的任务",
|
|
27
|
-
"batch_start": "分批模式: {batches} 批次, 每批 {size} 个任务",
|
|
28
|
-
"task_not_found": "任务 \"{task}\" 未找到。可用: {list}",
|
|
29
|
-
"completed": "任务 {task} 完成",
|
|
30
|
-
"branch_created": "已创建分支: {branch}"
|
|
31
|
-
},
|
|
32
|
-
"plan": {
|
|
33
|
-
"start": "生成执行计划...",
|
|
34
|
-
"success": "执行计划已生成",
|
|
35
|
-
"assigned": "已将 {assignee} 分配给 {task}"
|
|
36
|
-
},
|
|
37
|
-
"validate": {
|
|
38
|
-
"start": "校验 Spec...",
|
|
39
|
-
"success": "校验完成",
|
|
40
|
-
"failed": "校验失败: {error}",
|
|
41
|
-
"pass_rate": "通过率: {rate}%",
|
|
42
|
-
"total_checks": "检查项: {total}",
|
|
43
|
-
"errors": "错误: {errors}",
|
|
44
|
-
"warnings": "警告: {warnings}"
|
|
45
|
-
},
|
|
46
|
-
"progress": {
|
|
47
|
-
"start": "加载进度...",
|
|
48
|
-
"success": "进度已加载",
|
|
49
|
-
"report": "进度报告: {iteration}",
|
|
50
|
-
"total": "合计: {total} | 已完成: {done} | 进行中: {wip} | 待处理: {pending} | 已归档: {archived}",
|
|
51
|
-
"completion_rate": "完成率: {rate}%",
|
|
52
|
-
"no_tasks": "未找到任务"
|
|
53
|
-
},
|
|
54
|
-
"health": {
|
|
55
|
-
"start": "生成健康报告...",
|
|
56
|
-
"success": "健康报告已生成",
|
|
57
|
-
"overall": "整体健康度: {score}%",
|
|
58
|
-
"dimensions": "各维度:"
|
|
59
|
-
},
|
|
60
|
-
"archive": {
|
|
61
|
-
"start": "归档任务",
|
|
62
|
-
"success": "任务已归档: {task}",
|
|
63
|
-
"all_success": "{count} 个任务已归档",
|
|
64
|
-
"list": "已归档任务列表",
|
|
65
|
-
"restore": "任务已恢复: {task}",
|
|
66
|
-
"not_found": "任务未找到: {task}"
|
|
67
|
-
},
|
|
68
|
-
"delete": {
|
|
69
|
-
"moved": "已移至: {path}",
|
|
70
|
-
"success": "任务 \"{task}\" 已删除,所有引用已清理。",
|
|
71
|
-
"recover_hint": "恢复: 从 .speccore/trash/ mv 回原目录",
|
|
72
|
-
"not_found": "任务 \"{task}\" 未找到。"
|
|
73
|
-
},
|
|
74
|
-
"search": {
|
|
75
|
-
"result": "搜索: \"{query}\" — {count} 个匹配",
|
|
76
|
-
"no_match": "暂无匹配结果。"
|
|
77
|
-
},
|
|
78
|
-
"sync": {
|
|
79
|
-
"start": "同步 Spec...",
|
|
80
|
-
"success": "Spec 同步完成",
|
|
81
|
-
"reverse_scan": "反向同步: 扫描代码中的 @spec 注释...",
|
|
82
|
-
"reverse_no_refs": "未在代码中找到 @spec 引用",
|
|
83
|
-
"reverse_complete": "反向同步完成: {count} 个任务已更新"
|
|
84
|
-
},
|
|
85
|
-
"change": {
|
|
86
|
-
"success": "变更已记录",
|
|
87
|
-
"require_task": "请指定要变更的 Task。用法: speccore change --task=<id> --desc=\"<变更描述>\""
|
|
88
|
-
},
|
|
89
|
-
"backup": {
|
|
90
|
-
"created": "备份已创建: {path}",
|
|
91
|
-
"list": "备份列表",
|
|
92
|
-
"restore": "备份已恢复: {name}"
|
|
93
|
-
},
|
|
94
|
-
"status": {
|
|
95
|
-
"success": "状态已加载",
|
|
96
|
-
"report": "状态报告: {iteration}"
|
|
97
|
-
},
|
|
98
|
-
"report": {
|
|
99
|
-
"success": "报告已生成: {path}"
|
|
100
|
-
},
|
|
101
|
-
"hooks": {
|
|
102
|
-
"installed": "Git hooks 已安装: pre-commit + pre-push",
|
|
103
|
-
"not_git": "不是 Git 仓库"
|
|
104
|
-
},
|
|
105
|
-
"current": {
|
|
106
|
-
"no_task": "当前分支无关联任务。",
|
|
107
|
-
"hint": "使用 \"speccore execute --task=Task-XXX\" 创建关联分支。"
|
|
108
|
-
},
|
|
109
|
-
"migrate": {
|
|
110
|
-
"success": "迁移完成",
|
|
111
|
-
"dry_run": "预览模式 — 未实际修改",
|
|
112
|
-
"file_changes": "{count} 处待修改。移除 --dry-run 以应用。"
|
|
113
|
-
},
|
|
114
|
-
"iteration": {
|
|
115
|
-
"created": "迭代已创建: {name}",
|
|
116
|
-
"exists": "迭代已存在: {name}"
|
|
117
|
-
},
|
|
118
|
-
"task": {
|
|
119
|
-
"created": "任务创建成功",
|
|
120
|
-
"task_created": "任务 {id} 已创建: {name}",
|
|
121
|
-
"exists": "任务已存在: {id}"
|
|
122
|
-
},
|
|
123
|
-
"handover": {
|
|
124
|
-
"generated": "交接文档已生成: {path}"
|
|
125
|
-
},
|
|
126
|
-
"retro": {
|
|
127
|
-
"generated": "回顾总结已生成: {path}"
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
"common": {
|
|
131
|
-
"next_steps": "下一步:",
|
|
132
|
-
"error": "错误: {msg}",
|
|
133
|
-
"warning": "警告: {msg}",
|
|
134
|
-
"no_iteration": "未找到活跃期次。使用 --iteration=<name> 指定。",
|
|
135
|
-
"usage": "用法: {cmd}",
|
|
136
|
-
"loading": "加载中...",
|
|
137
|
-
"done": "完成"
|
|
138
|
-
},
|
|
139
|
-
"task": {
|
|
140
|
-
"status": {
|
|
141
|
-
"pending": "待开发",
|
|
142
|
-
"in_progress": "开发中",
|
|
143
|
-
"completed": "已完成",
|
|
144
|
-
"blocked": "已阻塞",
|
|
145
|
-
"archived": "已归档"
|
|
146
|
-
},
|
|
147
|
-
"type": {
|
|
148
|
-
"feature": "功能",
|
|
149
|
-
"bugfix": "修复",
|
|
150
|
-
"research": "调研"
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
package/dist/utils/file.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Read a file as string, return empty string if not found
|
|
3
|
-
*/
|
|
4
|
-
export declare function readFileSafe(filePath: string): Promise<string>;
|
|
5
|
-
/**
|
|
6
|
-
* Write file with auto directory creation
|
|
7
|
-
*/
|
|
8
|
-
export declare function writeFileSafe(filePath: string, content: string): Promise<void>;
|
|
9
|
-
/**
|
|
10
|
-
* Copy directory with overwrite support
|
|
11
|
-
*/
|
|
12
|
-
export declare function copyDir(src: string, dest: string, overwrite?: boolean): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Check if file exists and is readable
|
|
15
|
-
*/
|
|
16
|
-
export declare function isReadable(filePath: string): Promise<boolean>;
|
|
17
|
-
/**
|
|
18
|
-
* Get file extension without dot
|
|
19
|
-
*/
|
|
20
|
-
export declare function getExtension(filePath: string): string;
|
|
21
|
-
/**
|
|
22
|
-
* Replace file extension
|
|
23
|
-
*/
|
|
24
|
-
export declare function replaceExtension(filePath: string, newExt: string): string;
|
|
25
|
-
/**
|
|
26
|
-
* Find files matching pattern in directory
|
|
27
|
-
*/
|
|
28
|
-
export declare function findFiles(dir: string, pattern: RegExp): Promise<string[]>;
|
|
29
|
-
//# sourceMappingURL=file.d.ts.map
|
package/dist/utils/file.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/utils/file.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CASpE;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGpF;AAED;;GAEG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAOzF;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOnE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAErD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAMzE;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAkB/E"}
|
package/dist/utils/file.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
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.readFileSafe = readFileSafe;
|
|
37
|
-
exports.writeFileSafe = writeFileSafe;
|
|
38
|
-
exports.copyDir = copyDir;
|
|
39
|
-
exports.isReadable = isReadable;
|
|
40
|
-
exports.getExtension = getExtension;
|
|
41
|
-
exports.replaceExtension = replaceExtension;
|
|
42
|
-
exports.findFiles = findFiles;
|
|
43
|
-
const fs_extra_1 = require("fs-extra");
|
|
44
|
-
const path_1 = require("path");
|
|
45
|
-
/**
|
|
46
|
-
* Read a file as string, return empty string if not found
|
|
47
|
-
*/
|
|
48
|
-
async function readFileSafe(filePath) {
|
|
49
|
-
try {
|
|
50
|
-
if (await (0, fs_extra_1.pathExists)(filePath)) {
|
|
51
|
-
return await (0, fs_extra_1.readFile)(filePath, 'utf-8');
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
catch (error) {
|
|
55
|
-
// Ignore errors
|
|
56
|
-
}
|
|
57
|
-
return '';
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Write file with auto directory creation
|
|
61
|
-
*/
|
|
62
|
-
async function writeFileSafe(filePath, content) {
|
|
63
|
-
await (0, fs_extra_1.ensureDir)((0, path_1.dirname)(filePath));
|
|
64
|
-
await (0, fs_extra_1.writeFile)(filePath, content, 'utf-8');
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Copy directory with overwrite support
|
|
68
|
-
*/
|
|
69
|
-
async function copyDir(src, dest, overwrite = false) {
|
|
70
|
-
if (overwrite) {
|
|
71
|
-
if (await (0, fs_extra_1.pathExists)(dest)) {
|
|
72
|
-
await (0, fs_extra_1.remove)(dest);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
await (0, fs_extra_1.copy)(src, dest);
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Check if file exists and is readable
|
|
79
|
-
*/
|
|
80
|
-
async function isReadable(filePath) {
|
|
81
|
-
try {
|
|
82
|
-
await (0, fs_extra_1.readFile)(filePath, 'utf-8');
|
|
83
|
-
return true;
|
|
84
|
-
}
|
|
85
|
-
catch {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Get file extension without dot
|
|
91
|
-
*/
|
|
92
|
-
function getExtension(filePath) {
|
|
93
|
-
return (0, path_1.basename)(filePath).split('.').pop() || '';
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Replace file extension
|
|
97
|
-
*/
|
|
98
|
-
function replaceExtension(filePath, newExt) {
|
|
99
|
-
const ext = getExtension(filePath);
|
|
100
|
-
if (ext) {
|
|
101
|
-
return filePath.slice(0, -ext.length - 1) + '.' + newExt;
|
|
102
|
-
}
|
|
103
|
-
return filePath + '.' + newExt;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Find files matching pattern in directory
|
|
107
|
-
*/
|
|
108
|
-
async function findFiles(dir, pattern) {
|
|
109
|
-
const { readdir } = await Promise.resolve().then(() => __importStar(require('fs-extra')));
|
|
110
|
-
const files = [];
|
|
111
|
-
async function scan(currentDir) {
|
|
112
|
-
const entries = await readdir(currentDir, { withFileTypes: true });
|
|
113
|
-
for (const entry of entries) {
|
|
114
|
-
const fullPath = (0, path_1.join)(currentDir, entry.name);
|
|
115
|
-
if (entry.isDirectory()) {
|
|
116
|
-
await scan(fullPath);
|
|
117
|
-
}
|
|
118
|
-
else if (pattern.test(entry.name)) {
|
|
119
|
-
files.push(fullPath);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
await scan(dir);
|
|
124
|
-
return files;
|
|
125
|
-
}
|
|
126
|
-
//# sourceMappingURL=file.js.map
|
package/dist/utils/file.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/utils/file.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,oCASC;AAKD,sCAGC;AAKD,0BAOC;AAKD,gCAOC;AAKD,oCAEC;AAKD,4CAMC;AAKD,8BAkBC;AAxFD,uCAAoF;AACpF,+BAA+C;AAE/C;;GAEG;AACI,KAAK,UAAU,YAAY,CAAC,QAAgB;IACjD,IAAI,CAAC;QACH,IAAI,MAAM,IAAA,qBAAU,EAAC,QAAQ,CAAC,EAAE,CAAC;YAC/B,OAAO,MAAM,IAAA,mBAAQ,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,gBAAgB;IAClB,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;G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AG,GAAG,MAAM,CAAC;AACjC,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,SAAS,CAAC,GAAW,EAAE,OAAe;IAC1D,MAAM,EAAE,OAAO,EAAE,GAAG,wDAAa,UAAU,GAAC,CAAC;IAC7C,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,KAAK,UAAU,IAAI,CAAC,UAAkB;QACpC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;QACnE,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;YAC9C,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;gBACxB,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC;YACvB,CAAC;iBAAM,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;gBACpC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACvB,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,IAAI,CAAC,GAAG,CAAC,CAAC;IAChB,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/utils/git.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get current Git user name
|
|
3
|
-
*/
|
|
4
|
-
export declare function getGitUser(): string;
|
|
5
|
-
/**
|
|
6
|
-
* Get current Git user email
|
|
7
|
-
*/
|
|
8
|
-
export declare function getGitEmail(): string;
|
|
9
|
-
/**
|
|
10
|
-
* Get current branch name
|
|
11
|
-
*/
|
|
12
|
-
export declare function getCurrentBranch(): string;
|
|
13
|
-
/**
|
|
14
|
-
* Get last commit hash (short)
|
|
15
|
-
*/
|
|
16
|
-
export declare function getLastCommit(): string;
|
|
17
|
-
/**
|
|
18
|
-
* Check if current directory is a git repository
|
|
19
|
-
*/
|
|
20
|
-
export declare function isGitRepo(): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Get repository root path
|
|
23
|
-
*/
|
|
24
|
-
export declare function getRepoRoot(): string;
|
|
25
|
-
//# sourceMappingURL=git.d.ts.map
|
package/dist/utils/git.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/utils/git.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAMnC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAMpC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAMzC;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAMtC;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAOnC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAMpC"}
|
package/dist/utils/git.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getGitUser = getGitUser;
|
|
4
|
-
exports.getGitEmail = getGitEmail;
|
|
5
|
-
exports.getCurrentBranch = getCurrentBranch;
|
|
6
|
-
exports.getLastCommit = getLastCommit;
|
|
7
|
-
exports.isGitRepo = isGitRepo;
|
|
8
|
-
exports.getRepoRoot = getRepoRoot;
|
|
9
|
-
const child_process_1 = require("child_process");
|
|
10
|
-
/**
|
|
11
|
-
* Get current Git user name
|
|
12
|
-
*/
|
|
13
|
-
function getGitUser() {
|
|
14
|
-
try {
|
|
15
|
-
return (0, child_process_1.execSync)('git config user.name', { encoding: 'utf-8' }).trim();
|
|
16
|
-
}
|
|
17
|
-
catch {
|
|
18
|
-
return 'unknown';
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Get current Git user email
|
|
23
|
-
*/
|
|
24
|
-
function getGitEmail() {
|
|
25
|
-
try {
|
|
26
|
-
return (0, child_process_1.execSync)('git config user.email', { encoding: 'utf-8' }).trim();
|
|
27
|
-
}
|
|
28
|
-
catch {
|
|
29
|
-
return 'unknown';
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Get current branch name
|
|
34
|
-
*/
|
|
35
|
-
function getCurrentBranch() {
|
|
36
|
-
try {
|
|
37
|
-
return (0, child_process_1.execSync)('git rev-parse --abbrev-ref HEAD', { encoding: 'utf-8' }).trim();
|
|
38
|
-
}
|
|
39
|
-
catch {
|
|
40
|
-
return 'unknown';
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Get last commit hash (short)
|
|
45
|
-
*/
|
|
46
|
-
function getLastCommit() {
|
|
47
|
-
try {
|
|
48
|
-
return (0, child_process_1.execSync)('git rev-parse --short HEAD', { encoding: 'utf-8' }).trim();
|
|
49
|
-
}
|
|
50
|
-
catch {
|
|
51
|
-
return 'unknown';
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Check if current directory is a git repository
|
|
56
|
-
*/
|
|
57
|
-
function isGitRepo() {
|
|
58
|
-
try {
|
|
59
|
-
(0, child_process_1.execSync)('git rev-parse --git-dir', { stdio: 'ignore' });
|
|
60
|
-
return true;
|
|
61
|
-
}
|
|
62
|
-
catch {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Get repository root path
|
|
68
|
-
*/
|
|
69
|
-
function getRepoRoot() {
|
|
70
|
-
try {
|
|
71
|
-
return (0, child_process_1.execSync)('git rev-parse --show-toplevel', { encoding: 'utf-8' }).trim();
|
|
72
|
-
}
|
|
73
|
-
catch {
|
|
74
|
-
return process.cwd();
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=git.js.map
|
package/dist/utils/git.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