brch 0.0.1 → 0.0.3
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/.brchignore +3 -0
- package/COMMANDS.md +8 -0
- package/README.md +195 -1
- package/dist/commands/commitCommand.d.ts +2 -0
- package/dist/commands/diffCommand.d.ts +2 -0
- package/dist/commands/logCommand.d.ts +2 -0
- package/dist/commands/statusCommand.d.ts +2 -0
- package/dist/index.js +3059 -82
- package/dist/services/commitService.d.ts +1 -0
- package/dist/services/configService.d.ts +1 -1
- package/dist/services/diffService.d.ts +1 -0
- package/dist/services/logService.d.ts +3 -0
- package/dist/services/statusService.d.ts +1 -0
- package/dist/utils/constants.d.ts +14 -4
- package/dist/utils/date.d.ts +1 -0
- package/dist/utils/hash.d.ts +1 -0
- package/dist/utils/head.d.ts +2 -0
- package/dist/utils/objectPath.d.ts +12 -0
- package/package.json +4 -2
- package/test/sample.txt +1 -0
- package/.env +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const commitChanges: (message: string) => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const diff: (filePaths?: string[]) => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const status: () => Promise<void>;
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
export declare const VCS_NAME = "brch";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const VCS_DIR = ".brch";
|
|
3
|
+
export declare const VCS_PATH: string;
|
|
4
|
+
export declare const OBJECTS_PATH = ".brch/objects";
|
|
5
|
+
export declare const REFS_PATH = ".brch/refs";
|
|
6
|
+
export declare const REFS_HEAD_PATH = ".brch/refs/heads";
|
|
7
|
+
export declare const HEAD_FILE = "HEAD";
|
|
8
|
+
export declare const HEAD_PATH = ".brch/HEAD";
|
|
9
|
+
export declare const GLOBAL_CONFIG_FILE = ".brchconfig";
|
|
3
10
|
export declare const HOME_DIR: string;
|
|
4
11
|
export declare const GLOBAL_CONFIG_PATH: string;
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
12
|
+
export declare const LOCAL_CONFIG_FILE = "config";
|
|
13
|
+
export declare const LOCAL_CONFIG_PATH: string;
|
|
14
|
+
export declare const INDEX_FILE = "index.json";
|
|
15
|
+
export declare const INDEX_PATH: string;
|
|
16
|
+
export declare const IGNORE_FILE = ".brchignore";
|
|
17
|
+
export declare const IGNORE_PATH: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatDateLog: (isoDateString: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const hashContent: (content: string | Buffer) => string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates object directory and file paths from a hash.
|
|
3
|
+
* Uses a two-level directory structure: objectsDir/hash[0:2]/hash[2:]
|
|
4
|
+
*
|
|
5
|
+
* @param hash - The hash string (typically SHA-1)
|
|
6
|
+
* @param objectsDir - The base objects directory path
|
|
7
|
+
* @returns An object containing objectDir and objectPath
|
|
8
|
+
*/
|
|
9
|
+
export declare const getObjectPath: (hash: string, objectsDir: string) => {
|
|
10
|
+
objectDir: string;
|
|
11
|
+
objectPath: string;
|
|
12
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brch",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "A simple
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "brch - A simple version control system for tracking changes in your project",
|
|
5
5
|
"author": "vishalkrsharma",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
"@types/ini": "^4.1.1",
|
|
36
36
|
"chalk": "^5.6.2",
|
|
37
37
|
"commander": "^14.0.2",
|
|
38
|
+
"date-fns": "^4.1.0",
|
|
39
|
+
"diff": "^8.0.2",
|
|
38
40
|
"ini": "^6.0.0"
|
|
39
41
|
}
|
|
40
42
|
}
|
package/test/sample.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
vishal kumar sharma
|
package/.env
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
NPM_TOKEN=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
|