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.
@@ -0,0 +1 @@
1
+ export declare const commitChanges: (message: string) => Promise<void>;
@@ -5,4 +5,4 @@ export declare const setConfig: ({ scopeKey, value, isGlobal }: {
5
5
  }) => Promise<void>;
6
6
  export declare const readConfigFile: ({ isGlobal }: {
7
7
  isGlobal: boolean;
8
- }) => string;
8
+ }) => Promise<string>;
@@ -0,0 +1 @@
1
+ export declare const diff: (filePaths?: string[]) => Promise<void>;
@@ -0,0 +1,3 @@
1
+ export declare const log: (options?: {
2
+ limit?: string;
3
+ }) => 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 VCS_CONFIG = ".brchconfig";
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 VCS_DIR = ".brch";
6
- export declare const OBJECT_DIR = ".brch/objects";
7
- export declare const HEAD_FILE = ".brch/HEAD";
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,2 @@
1
+ export declare const getCurrentBranchName: () => Promise<string | null>;
2
+ export declare const getCurrentHead: () => Promise<string | null>;
@@ -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.1",
4
- "description": "A simple VCS",
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
  }
@@ -0,0 +1 @@
1
+ vishal kumar sharma
package/.env DELETED
@@ -1 +0,0 @@
1
- NPM_TOKEN=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