@vybestack/llxprt-code-storage 0.10.0-nightly.260613.1adad3b34

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.
Files changed (41) hide show
  1. package/dist/.last_build +0 -0
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.js +2 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/src/config/storage.d.ts +39 -0
  6. package/dist/src/config/storage.js +118 -0
  7. package/dist/src/config/storage.js.map +1 -0
  8. package/dist/src/conversation/ConversationFileWriter.d.ts +27 -0
  9. package/dist/src/conversation/ConversationFileWriter.js +78 -0
  10. package/dist/src/conversation/ConversationFileWriter.js.map +1 -0
  11. package/dist/src/index.d.ts +12 -0
  12. package/dist/src/index.js +14 -0
  13. package/dist/src/index.js.map +1 -0
  14. package/dist/src/secure-store/provider-key-storage.d.ts +53 -0
  15. package/dist/src/secure-store/provider-key-storage.js +117 -0
  16. package/dist/src/secure-store/provider-key-storage.js.map +1 -0
  17. package/dist/src/secure-store/secure-store.d.ts +69 -0
  18. package/dist/src/secure-store/secure-store.js +606 -0
  19. package/dist/src/secure-store/secure-store.js.map +1 -0
  20. package/dist/src/services/fileDiscoveryService.d.ts +48 -0
  21. package/dist/src/services/fileDiscoveryService.js +154 -0
  22. package/dist/src/services/fileDiscoveryService.js.map +1 -0
  23. package/dist/src/services/fileSystemService.d.ts +33 -0
  24. package/dist/src/services/fileSystemService.js +25 -0
  25. package/dist/src/services/fileSystemService.js.map +1 -0
  26. package/dist/src/session/sessionTypes.d.ts +39 -0
  27. package/dist/src/session/sessionTypes.js +10 -0
  28. package/dist/src/session/sessionTypes.js.map +1 -0
  29. package/dist/src/testing.d.ts +1 -0
  30. package/dist/src/testing.js +4 -0
  31. package/dist/src/testing.js.map +1 -0
  32. package/dist/src/types/logger.d.ts +17 -0
  33. package/dist/src/types/logger.js +17 -0
  34. package/dist/src/types/logger.js.map +1 -0
  35. package/dist/src/utils/gitIgnoreParser.d.ts +29 -0
  36. package/dist/src/utils/gitIgnoreParser.js +199 -0
  37. package/dist/src/utils/gitIgnoreParser.js.map +1 -0
  38. package/dist/src/utils/gitUtils.d.ts +17 -0
  39. package/dist/src/utils/gitUtils.js +68 -0
  40. package/dist/src/utils/gitUtils.js.map +1 -0
  41. package/package.json +77 -0
@@ -0,0 +1,68 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import * as fs from 'fs';
7
+ import * as path from 'path';
8
+ /**
9
+ * Checks if a directory is within a git repository
10
+ * @param directory The directory to check
11
+ * @returns true if the directory is in a git repository, false otherwise
12
+ */
13
+ export function isGitRepository(directory) {
14
+ try {
15
+ let currentDir = path.resolve(directory);
16
+ let searching = true;
17
+ while (searching) {
18
+ const gitDir = path.join(currentDir, '.git');
19
+ // Check if .git exists (either as directory or file for worktrees)
20
+ if (fs.existsSync(gitDir)) {
21
+ return true;
22
+ }
23
+ const parentDir = path.dirname(currentDir);
24
+ // If we've reached the root directory, stop searching
25
+ if (parentDir === currentDir) {
26
+ searching = false;
27
+ }
28
+ if (searching) {
29
+ currentDir = parentDir;
30
+ }
31
+ }
32
+ return false;
33
+ }
34
+ catch {
35
+ // Filesystem error; assume not a git repo.
36
+ return false;
37
+ }
38
+ }
39
+ /**
40
+ * Finds the root directory of a git repository
41
+ * @param directory Starting directory to search from
42
+ * @returns The git repository root path, or null if not in a git repository
43
+ */
44
+ export function findGitRoot(directory) {
45
+ try {
46
+ let currentDir = path.resolve(directory);
47
+ let searching = true;
48
+ while (searching) {
49
+ const gitDir = path.join(currentDir, '.git');
50
+ if (fs.existsSync(gitDir)) {
51
+ return currentDir;
52
+ }
53
+ const parentDir = path.dirname(currentDir);
54
+ if (parentDir === currentDir) {
55
+ searching = false;
56
+ }
57
+ if (searching) {
58
+ currentDir = parentDir;
59
+ }
60
+ }
61
+ return null;
62
+ }
63
+ catch {
64
+ // Filesystem error; return null.
65
+ return null;
66
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AAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;YAE7C,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC1B,OAAO,UAAU,CAAC;YACpB,CAAC;YAED,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAE3C,IAAI,SAAS,KAAK,UAAU,EAAE,CAAC;gBAC7B,SAAS,GAAG,KAAK,CAAC;YACpB,CAAC;YAED,IAAI,SAAS,EAAE,CAAC;gBACd,UAAU,GAAG,SAAS,CAAC;YACzB,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,iCAAiC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
package/package.json ADDED
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "@vybestack/llxprt-code-storage",
3
+ "version": "0.10.0-nightly.260613.1adad3b34",
4
+ "description": "LLxprt Code Storage",
5
+ "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/vybestack/llxprt-code.git"
9
+ },
10
+ "type": "module",
11
+ "main": "dist/index.js",
12
+ "types": "dist/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js"
17
+ },
18
+ "./config/storage.js": {
19
+ "types": "./dist/src/config/storage.d.ts",
20
+ "import": "./dist/src/config/storage.js"
21
+ },
22
+ "./services/fileSystemService.js": {
23
+ "types": "./dist/src/services/fileSystemService.d.ts",
24
+ "import": "./dist/src/services/fileSystemService.js"
25
+ },
26
+ "./services/fileDiscoveryService.js": {
27
+ "types": "./dist/src/services/fileDiscoveryService.d.ts",
28
+ "import": "./dist/src/services/fileDiscoveryService.js"
29
+ },
30
+ "./storage/secure-store.js": {
31
+ "types": "./dist/src/secure-store/secure-store.d.ts",
32
+ "import": "./dist/src/secure-store/secure-store.js"
33
+ },
34
+ "./storage/provider-key-storage.js": {
35
+ "types": "./dist/src/secure-store/provider-key-storage.d.ts",
36
+ "import": "./dist/src/secure-store/provider-key-storage.js"
37
+ },
38
+ "./storage/sessionTypes.js": {
39
+ "types": "./dist/src/session/sessionTypes.d.ts",
40
+ "import": "./dist/src/session/sessionTypes.js"
41
+ },
42
+ "./storage/ConversationFileWriter.js": {
43
+ "types": "./dist/src/conversation/ConversationFileWriter.d.ts",
44
+ "import": "./dist/src/conversation/ConversationFileWriter.js"
45
+ },
46
+ "./testing": {
47
+ "types": "./dist/src/testing.d.ts",
48
+ "import": "./dist/src/testing.js"
49
+ }
50
+ },
51
+ "scripts": {
52
+ "build": "node ../../scripts/build_package.js",
53
+ "lint": "eslint . --ext .ts,.tsx",
54
+ "format": "prettier --write .",
55
+ "test": "vitest run",
56
+ "test:ci": "vitest run",
57
+ "typecheck": "tsc --noEmit"
58
+ },
59
+ "files": [
60
+ "dist"
61
+ ],
62
+ "dependencies": {
63
+ "env-paths": "^4.0.0",
64
+ "ignore": "^7.0.0"
65
+ },
66
+ "optionalDependencies": {
67
+ "@napi-rs/keyring": "^1.2.0"
68
+ },
69
+ "devDependencies": {
70
+ "@types/node": "^24.2.1",
71
+ "typescript": "^5.3.3",
72
+ "vitest": "^3.1.1"
73
+ },
74
+ "engines": {
75
+ "node": ">=20"
76
+ }
77
+ }