@vortex-ai/cli 0.1.2
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/.turbo/turbo-build.log +15 -0
- package/.turbo/turbo-check-types.log +5 -0
- package/.vortex-bm25.json +1 -0
- package/.vortex.db +0 -0
- package/README.md +155 -0
- package/dist/chunk-C6P2IO65.mjs +41 -0
- package/dist/chunk-FC2JQ4EC.mjs +119 -0
- package/dist/chunk-PNFSQC3M.mjs +4792 -0
- package/dist/chunk-PXYQG752.mjs +99 -0
- package/dist/dist-2OLJAZT5.mjs +1244 -0
- package/dist/dist-BPCHQHDN.mjs +5 -0
- package/dist/dist-DAPSACZG.mjs +5 -0
- package/dist/index.js +886 -0
- package/dist/index.mjs +880 -0
- package/dist/multipart-parser-DVTUXEEQ.mjs +371 -0
- package/dist/src-IOKO4UCP.mjs +1408 -0
- package/package.json +43 -0
- package/src/commands/analyze.ts +74 -0
- package/src/commands/cache.ts +33 -0
- package/src/commands/fix-nitbits.ts +63 -0
- package/src/commands/graph.ts +59 -0
- package/src/commands/init.ts +37 -0
- package/src/commands/issue.ts +79 -0
- package/src/commands/review.ts +218 -0
- package/src/commands/search.ts +67 -0
- package/src/commands/solve-issue.ts +69 -0
- package/src/commands/solve.ts +177 -0
- package/src/commands/suggest.ts +54 -0
- package/src/commands/watch.ts +56 -0
- package/src/index.ts +147 -0
- package/tsconfig.json +5 -0
- package/vortex-ai-0.1.0.tgz +0 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__commonJS,
|
|
3
|
+
__require
|
|
4
|
+
} from "./chunk-C6P2IO65.mjs";
|
|
5
|
+
|
|
6
|
+
// ../git/dist/index.js
|
|
7
|
+
var require_dist = __commonJS({
|
|
8
|
+
"../git/dist/index.js"(exports, module) {
|
|
9
|
+
var __create = Object.create;
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
14
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
+
var __export = (target, all) => {
|
|
16
|
+
for (var name in all)
|
|
17
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
18
|
+
};
|
|
19
|
+
var __copyProps = (to, from, except, desc) => {
|
|
20
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
21
|
+
for (let key of __getOwnPropNames(from))
|
|
22
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
23
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
24
|
+
}
|
|
25
|
+
return to;
|
|
26
|
+
};
|
|
27
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
28
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
29
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
30
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
31
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
32
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
33
|
+
mod
|
|
34
|
+
));
|
|
35
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
|
+
var index_exports = {};
|
|
37
|
+
__export(index_exports, {
|
|
38
|
+
getGitRoot: () => getGitRoot,
|
|
39
|
+
getGithubRepoInfo: () => getGithubRepoInfo,
|
|
40
|
+
getLatestCommitHash: () => getLatestCommitHash,
|
|
41
|
+
getLatestCommitTimestamp: () => getLatestCommitTimestamp,
|
|
42
|
+
isGitRepo: () => isGitRepo,
|
|
43
|
+
listTrackedFiles: () => listTrackedFiles
|
|
44
|
+
});
|
|
45
|
+
module.exports = __toCommonJS(index_exports);
|
|
46
|
+
var import_child_process = __require("child_process");
|
|
47
|
+
var path = __toESM(__require("path"));
|
|
48
|
+
function runGitCmd(cmd, cwd) {
|
|
49
|
+
try {
|
|
50
|
+
return (0, import_child_process.execSync)(`git ${cmd}`, { cwd, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim();
|
|
51
|
+
} catch (error) {
|
|
52
|
+
throw new Error(`Git command failed: git ${cmd} in ${cwd}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function isGitRepo(cwd) {
|
|
56
|
+
try {
|
|
57
|
+
runGitCmd("rev-parse --is-inside-work-tree", cwd);
|
|
58
|
+
return true;
|
|
59
|
+
} catch {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function getGitRoot(cwd) {
|
|
64
|
+
return runGitCmd("rev-parse --show-toplevel", cwd);
|
|
65
|
+
}
|
|
66
|
+
function listTrackedFiles(cwd) {
|
|
67
|
+
const root = getGitRoot(cwd);
|
|
68
|
+
const output = runGitCmd("ls-files --cached --others --exclude-standard", root);
|
|
69
|
+
return output.split("\n").filter((line) => line.length > 0).map((file) => path.join(root, file));
|
|
70
|
+
}
|
|
71
|
+
function getLatestCommitHash(cwd, filePath) {
|
|
72
|
+
if (filePath) {
|
|
73
|
+
return runGitCmd(`log -n 1 --pretty=format:%H -- "${filePath}"`, cwd);
|
|
74
|
+
}
|
|
75
|
+
return runGitCmd("rev-parse HEAD", cwd);
|
|
76
|
+
}
|
|
77
|
+
function getLatestCommitTimestamp(cwd, filePath) {
|
|
78
|
+
const cmd = filePath ? `log -n 1 --pretty=format:%ct -- "${filePath}"` : `log -n 1 --pretty=format:%ct`;
|
|
79
|
+
const output = runGitCmd(cmd, cwd);
|
|
80
|
+
return parseInt(output, 10);
|
|
81
|
+
}
|
|
82
|
+
function getGithubRepoInfo(cwd) {
|
|
83
|
+
try {
|
|
84
|
+
const remoteUrl = runGitCmd("remote get-url origin", cwd);
|
|
85
|
+
const match = remoteUrl.match(/github\.com[:/]([^/]+)\/([^.]+)/);
|
|
86
|
+
if (match && match.length >= 3) {
|
|
87
|
+
return { owner: match[1], repo: match[2] };
|
|
88
|
+
}
|
|
89
|
+
return null;
|
|
90
|
+
} catch {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
export {
|
|
98
|
+
require_dist
|
|
99
|
+
};
|