projectify-cli 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.
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GitService = void 0;
7
+ const simple_git_1 = __importDefault(require("simple-git"));
8
+ class GitService {
9
+ constructor(projectPath) {
10
+ this.git = (0, simple_git_1.default)(projectPath);
11
+ }
12
+ async isRepo() {
13
+ return await this.git.checkIsRepo();
14
+ }
15
+ async getAnalysis(limit = 50) {
16
+ try {
17
+ if (!await this.isRepo()) {
18
+ return null;
19
+ }
20
+ const log = await this.git.log({ maxCount: limit });
21
+ const authorMap = new Map();
22
+ log.all.forEach(commit => {
23
+ const key = commit.author_email;
24
+ if (!authorMap.has(key)) {
25
+ authorMap.set(key, {
26
+ name: commit.author_name,
27
+ email: commit.author_email,
28
+ commits: 0
29
+ });
30
+ }
31
+ const stats = authorMap.get(key);
32
+ stats.commits++;
33
+ });
34
+ return {
35
+ totalCommits: log.total,
36
+ lastCommitDate: log.latest?.date || new Date().toISOString(),
37
+ authroStats: Array.from(authorMap.values()).sort((a, b) => b.commits - a.commits),
38
+ recentActivity: log.all.slice(0, 10).map(c => `[${c.date.substring(0, 10)}] ${c.message} (${c.author_name})`)
39
+ };
40
+ }
41
+ catch (error) {
42
+ console.error('Git analysis failed:', error);
43
+ return null;
44
+ }
45
+ }
46
+ }
47
+ exports.GitService = GitService;
package/functions.png ADDED
Binary file
package/graph.png ADDED
Binary file
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "projectify-cli",
3
+ "version": "1.0.0",
4
+ "description": "Project Analyzer using LangChain",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "projectify": "dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist",
11
+ "package.json",
12
+ "README.md",
13
+ "graph.png",
14
+ "functions.png"
15
+ ],
16
+ "scripts": {
17
+ "prepublishOnly": "npm run build",
18
+ "build": "tsc && echo '#!/usr/bin/env node' | cat - dist/index.js > dist/index.js.tmp && mv dist/index.js.tmp dist/index.js && chmod +x dist/index.js",
19
+ "start": "node dist/index.js",
20
+ "test": "jest",
21
+ "dev": "ts-node src/index.ts"
22
+ },
23
+ "keywords": [
24
+ "analysis",
25
+ "langchain",
26
+ "code-analysis"
27
+ ],
28
+ "author": "GreenHacker",
29
+ "license": "ISC",
30
+ "dependencies": {
31
+ "@babel/parser": "^7.24.4",
32
+ "@babel/traverse": "^7.24.1",
33
+ "@google/generative-ai": "^0.24.1",
34
+ "@langchain/core": "^1.1.8",
35
+ "@langchain/langgraph": "^1.0.7",
36
+ "@langchain/ollama": "^1.1.0",
37
+ "@langchain/openai": "^0.0.28",
38
+ "chalk": "^4.1.2",
39
+ "commander": "^11.1.0",
40
+ "fast-glob": "^3.3.2",
41
+ "fs-extra": "^11.2.0",
42
+ "graphology": "^0.25.4",
43
+ "langchain": "^0.1.36",
44
+ "ora": "^5.4.1",
45
+ "simple-git": "^3.30.0",
46
+ "type-fest": "^5.3.1"
47
+ },
48
+ "devDependencies": {
49
+ "@types/fs-extra": "^11.0.4",
50
+ "@types/jest": "^29.5.12",
51
+ "@types/node": "^20.12.7",
52
+ "jest": "^29.7.0",
53
+ "ts-jest": "^29.1.2",
54
+ "ts-node": "^10.9.2",
55
+ "typescript": "^5.4.5"
56
+ }
57
+ }