@colbymchenry/codegraph-darwin-arm64 0.9.3 → 0.9.5

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 (208) hide show
  1. package/lib/dist/bin/codegraph.d.ts +3 -0
  2. package/lib/dist/bin/codegraph.d.ts.map +1 -1
  3. package/lib/dist/bin/codegraph.js +250 -0
  4. package/lib/dist/bin/codegraph.js.map +1 -1
  5. package/lib/dist/context/index.d.ts +13 -0
  6. package/lib/dist/context/index.d.ts.map +1 -1
  7. package/lib/dist/context/index.js +120 -1
  8. package/lib/dist/context/index.js.map +1 -1
  9. package/lib/dist/db/index.d.ts +18 -0
  10. package/lib/dist/db/index.d.ts.map +1 -1
  11. package/lib/dist/db/index.js +31 -0
  12. package/lib/dist/db/index.js.map +1 -1
  13. package/lib/dist/db/queries.d.ts +16 -0
  14. package/lib/dist/db/queries.d.ts.map +1 -1
  15. package/lib/dist/db/queries.js +80 -27
  16. package/lib/dist/db/queries.js.map +1 -1
  17. package/lib/dist/extraction/grammars.d.ts +6 -0
  18. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  19. package/lib/dist/extraction/grammars.js +31 -1
  20. package/lib/dist/extraction/grammars.js.map +1 -1
  21. package/lib/dist/extraction/index.d.ts +15 -2
  22. package/lib/dist/extraction/index.d.ts.map +1 -1
  23. package/lib/dist/extraction/index.js +170 -78
  24. package/lib/dist/extraction/index.js.map +1 -1
  25. package/lib/dist/extraction/languages/index.d.ts.map +1 -1
  26. package/lib/dist/extraction/languages/index.js +2 -0
  27. package/lib/dist/extraction/languages/index.js.map +1 -1
  28. package/lib/dist/extraction/languages/objc.d.ts +3 -0
  29. package/lib/dist/extraction/languages/objc.d.ts.map +1 -0
  30. package/lib/dist/extraction/languages/objc.js +133 -0
  31. package/lib/dist/extraction/languages/objc.js.map +1 -0
  32. package/lib/dist/extraction/tree-sitter-types.d.ts +4 -0
  33. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  34. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  35. package/lib/dist/extraction/tree-sitter.js +155 -9
  36. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  37. package/lib/dist/extraction/wasm-runtime-flags.d.ts +12 -0
  38. package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
  39. package/lib/dist/extraction/wasm-runtime-flags.js +14 -2
  40. package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -1
  41. package/lib/dist/graph/traversal.d.ts.map +1 -1
  42. package/lib/dist/graph/traversal.js +71 -36
  43. package/lib/dist/graph/traversal.js.map +1 -1
  44. package/lib/dist/index.d.ts +21 -2
  45. package/lib/dist/index.d.ts.map +1 -1
  46. package/lib/dist/index.js +42 -0
  47. package/lib/dist/index.js.map +1 -1
  48. package/lib/dist/installer/instructions-template.d.ts +2 -2
  49. package/lib/dist/installer/instructions-template.d.ts.map +1 -1
  50. package/lib/dist/installer/instructions-template.js +3 -2
  51. package/lib/dist/installer/instructions-template.js.map +1 -1
  52. package/lib/dist/mcp/daemon-paths.d.ts +46 -0
  53. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -0
  54. package/lib/dist/mcp/daemon-paths.js +125 -0
  55. package/lib/dist/mcp/daemon-paths.js.map +1 -0
  56. package/lib/dist/mcp/daemon.d.ts +161 -0
  57. package/lib/dist/mcp/daemon.d.ts.map +1 -0
  58. package/lib/dist/mcp/daemon.js +403 -0
  59. package/lib/dist/mcp/daemon.js.map +1 -0
  60. package/lib/dist/mcp/engine.d.ts +100 -0
  61. package/lib/dist/mcp/engine.d.ts.map +1 -0
  62. package/lib/dist/mcp/engine.js +291 -0
  63. package/lib/dist/mcp/engine.js.map +1 -0
  64. package/lib/dist/mcp/index.d.ts +67 -52
  65. package/lib/dist/mcp/index.d.ts.map +1 -1
  66. package/lib/dist/mcp/index.js +347 -330
  67. package/lib/dist/mcp/index.js.map +1 -1
  68. package/lib/dist/mcp/proxy.d.ts +46 -0
  69. package/lib/dist/mcp/proxy.d.ts.map +1 -0
  70. package/lib/dist/mcp/proxy.js +276 -0
  71. package/lib/dist/mcp/proxy.js.map +1 -0
  72. package/lib/dist/mcp/server-instructions.d.ts +1 -1
  73. package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
  74. package/lib/dist/mcp/server-instructions.js +3 -1
  75. package/lib/dist/mcp/server-instructions.js.map +1 -1
  76. package/lib/dist/mcp/session.d.ts +67 -0
  77. package/lib/dist/mcp/session.d.ts.map +1 -0
  78. package/lib/dist/mcp/session.js +276 -0
  79. package/lib/dist/mcp/session.js.map +1 -0
  80. package/lib/dist/mcp/tools.d.ts +130 -2
  81. package/lib/dist/mcp/tools.d.ts.map +1 -1
  82. package/lib/dist/mcp/tools.js +902 -37
  83. package/lib/dist/mcp/tools.js.map +1 -1
  84. package/lib/dist/mcp/transport.d.ts +111 -29
  85. package/lib/dist/mcp/transport.d.ts.map +1 -1
  86. package/lib/dist/mcp/transport.js +181 -71
  87. package/lib/dist/mcp/transport.js.map +1 -1
  88. package/lib/dist/mcp/version.d.ts +19 -0
  89. package/lib/dist/mcp/version.d.ts.map +1 -0
  90. package/lib/dist/mcp/version.js +71 -0
  91. package/lib/dist/mcp/version.js.map +1 -0
  92. package/lib/dist/resolution/callback-synthesizer.d.ts +10 -0
  93. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -0
  94. package/lib/dist/resolution/callback-synthesizer.js +847 -0
  95. package/lib/dist/resolution/callback-synthesizer.js.map +1 -0
  96. package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
  97. package/lib/dist/resolution/frameworks/csharp.js +36 -8
  98. package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
  99. package/lib/dist/resolution/frameworks/drupal.d.ts.map +1 -1
  100. package/lib/dist/resolution/frameworks/drupal.js +44 -12
  101. package/lib/dist/resolution/frameworks/drupal.js.map +1 -1
  102. package/lib/dist/resolution/frameworks/expo-modules.d.ts +3 -0
  103. package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -0
  104. package/lib/dist/resolution/frameworks/expo-modules.js +143 -0
  105. package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -0
  106. package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
  107. package/lib/dist/resolution/frameworks/express.js +102 -19
  108. package/lib/dist/resolution/frameworks/express.js.map +1 -1
  109. package/lib/dist/resolution/frameworks/fabric.d.ts +3 -0
  110. package/lib/dist/resolution/frameworks/fabric.d.ts.map +1 -0
  111. package/lib/dist/resolution/frameworks/fabric.js +354 -0
  112. package/lib/dist/resolution/frameworks/fabric.js.map +1 -0
  113. package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
  114. package/lib/dist/resolution/frameworks/go.js +6 -3
  115. package/lib/dist/resolution/frameworks/go.js.map +1 -1
  116. package/lib/dist/resolution/frameworks/index.d.ts +5 -0
  117. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  118. package/lib/dist/resolution/frameworks/index.js +25 -1
  119. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  120. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
  121. package/lib/dist/resolution/frameworks/java.js +70 -12
  122. package/lib/dist/resolution/frameworks/java.js.map +1 -1
  123. package/lib/dist/resolution/frameworks/laravel.d.ts.map +1 -1
  124. package/lib/dist/resolution/frameworks/laravel.js +17 -8
  125. package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
  126. package/lib/dist/resolution/frameworks/play.d.ts +19 -0
  127. package/lib/dist/resolution/frameworks/play.d.ts.map +1 -0
  128. package/lib/dist/resolution/frameworks/play.js +111 -0
  129. package/lib/dist/resolution/frameworks/play.js.map +1 -0
  130. package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
  131. package/lib/dist/resolution/frameworks/python.js +134 -16
  132. package/lib/dist/resolution/frameworks/python.js.map +1 -1
  133. package/lib/dist/resolution/frameworks/react-native.d.ts +3 -0
  134. package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -0
  135. package/lib/dist/resolution/frameworks/react-native.js +360 -0
  136. package/lib/dist/resolution/frameworks/react-native.js.map +1 -0
  137. package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
  138. package/lib/dist/resolution/frameworks/react.js +96 -3
  139. package/lib/dist/resolution/frameworks/react.js.map +1 -1
  140. package/lib/dist/resolution/frameworks/ruby.d.ts.map +1 -1
  141. package/lib/dist/resolution/frameworks/ruby.js +106 -2
  142. package/lib/dist/resolution/frameworks/ruby.js.map +1 -1
  143. package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -1
  144. package/lib/dist/resolution/frameworks/rust.js +102 -5
  145. package/lib/dist/resolution/frameworks/rust.js.map +1 -1
  146. package/lib/dist/resolution/frameworks/swift-objc.d.ts +37 -0
  147. package/lib/dist/resolution/frameworks/swift-objc.d.ts.map +1 -0
  148. package/lib/dist/resolution/frameworks/swift-objc.js +252 -0
  149. package/lib/dist/resolution/frameworks/swift-objc.js.map +1 -0
  150. package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
  151. package/lib/dist/resolution/frameworks/swift.js +30 -6
  152. package/lib/dist/resolution/frameworks/swift.js.map +1 -1
  153. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  154. package/lib/dist/resolution/import-resolver.js +1 -0
  155. package/lib/dist/resolution/import-resolver.js.map +1 -1
  156. package/lib/dist/resolution/index.d.ts.map +1 -1
  157. package/lib/dist/resolution/index.js +61 -9
  158. package/lib/dist/resolution/index.js.map +1 -1
  159. package/lib/dist/resolution/lru-cache.d.ts +24 -0
  160. package/lib/dist/resolution/lru-cache.d.ts.map +1 -0
  161. package/lib/dist/resolution/lru-cache.js +62 -0
  162. package/lib/dist/resolution/lru-cache.js.map +1 -0
  163. package/lib/dist/resolution/swift-objc-bridge.d.ts +134 -0
  164. package/lib/dist/resolution/swift-objc-bridge.d.ts.map +1 -0
  165. package/lib/dist/resolution/swift-objc-bridge.js +256 -0
  166. package/lib/dist/resolution/swift-objc-bridge.js.map +1 -0
  167. package/lib/dist/resolution/types.d.ts +8 -0
  168. package/lib/dist/resolution/types.d.ts.map +1 -1
  169. package/lib/dist/sync/index.d.ts +3 -1
  170. package/lib/dist/sync/index.d.ts.map +1 -1
  171. package/lib/dist/sync/index.js +7 -1
  172. package/lib/dist/sync/index.js.map +1 -1
  173. package/lib/dist/sync/watcher.d.ts +109 -7
  174. package/lib/dist/sync/watcher.d.ts.map +1 -1
  175. package/lib/dist/sync/watcher.js +215 -33
  176. package/lib/dist/sync/watcher.js.map +1 -1
  177. package/lib/dist/sync/worktree.d.ts +54 -0
  178. package/lib/dist/sync/worktree.d.ts.map +1 -0
  179. package/lib/dist/sync/worktree.js +136 -0
  180. package/lib/dist/sync/worktree.js.map +1 -0
  181. package/lib/dist/types.d.ts +1 -1
  182. package/lib/dist/types.d.ts.map +1 -1
  183. package/lib/dist/types.js +1 -0
  184. package/lib/dist/types.js.map +1 -1
  185. package/lib/dist/utils.js +1 -1
  186. package/lib/node_modules/.package-lock.json +29 -1
  187. package/lib/node_modules/chokidar/LICENSE +21 -0
  188. package/lib/node_modules/chokidar/README.md +305 -0
  189. package/lib/node_modules/chokidar/esm/handler.d.ts +90 -0
  190. package/lib/node_modules/chokidar/esm/handler.js +629 -0
  191. package/lib/node_modules/chokidar/esm/index.d.ts +215 -0
  192. package/lib/node_modules/chokidar/esm/index.js +798 -0
  193. package/lib/node_modules/chokidar/esm/package.json +1 -0
  194. package/lib/node_modules/chokidar/handler.d.ts +90 -0
  195. package/lib/node_modules/chokidar/handler.js +635 -0
  196. package/lib/node_modules/chokidar/index.d.ts +215 -0
  197. package/lib/node_modules/chokidar/index.js +804 -0
  198. package/lib/node_modules/chokidar/package.json +69 -0
  199. package/lib/node_modules/readdirp/LICENSE +21 -0
  200. package/lib/node_modules/readdirp/README.md +120 -0
  201. package/lib/node_modules/readdirp/esm/index.d.ts +108 -0
  202. package/lib/node_modules/readdirp/esm/index.js +257 -0
  203. package/lib/node_modules/readdirp/esm/package.json +1 -0
  204. package/lib/node_modules/readdirp/index.d.ts +108 -0
  205. package/lib/node_modules/readdirp/index.js +263 -0
  206. package/lib/node_modules/readdirp/package.json +70 -0
  207. package/lib/package.json +2 -1
  208. package/package.json +1 -1
@@ -0,0 +1,263 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReaddirpStream = exports.EntryTypes = void 0;
4
+ exports.readdirp = readdirp;
5
+ exports.readdirpPromise = readdirpPromise;
6
+ const promises_1 = require("node:fs/promises");
7
+ const node_stream_1 = require("node:stream");
8
+ const node_path_1 = require("node:path");
9
+ exports.EntryTypes = {
10
+ FILE_TYPE: 'files',
11
+ DIR_TYPE: 'directories',
12
+ FILE_DIR_TYPE: 'files_directories',
13
+ EVERYTHING_TYPE: 'all',
14
+ };
15
+ const defaultOptions = {
16
+ root: '.',
17
+ fileFilter: (_entryInfo) => true,
18
+ directoryFilter: (_entryInfo) => true,
19
+ type: exports.EntryTypes.FILE_TYPE,
20
+ lstat: false,
21
+ depth: 2147483648,
22
+ alwaysStat: false,
23
+ highWaterMark: 4096,
24
+ };
25
+ Object.freeze(defaultOptions);
26
+ const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR';
27
+ const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]);
28
+ const ALL_TYPES = [
29
+ exports.EntryTypes.DIR_TYPE,
30
+ exports.EntryTypes.EVERYTHING_TYPE,
31
+ exports.EntryTypes.FILE_DIR_TYPE,
32
+ exports.EntryTypes.FILE_TYPE,
33
+ ];
34
+ const DIR_TYPES = new Set([
35
+ exports.EntryTypes.DIR_TYPE,
36
+ exports.EntryTypes.EVERYTHING_TYPE,
37
+ exports.EntryTypes.FILE_DIR_TYPE,
38
+ ]);
39
+ const FILE_TYPES = new Set([
40
+ exports.EntryTypes.EVERYTHING_TYPE,
41
+ exports.EntryTypes.FILE_DIR_TYPE,
42
+ exports.EntryTypes.FILE_TYPE,
43
+ ]);
44
+ const isNormalFlowError = (error) => NORMAL_FLOW_ERRORS.has(error.code);
45
+ const wantBigintFsStats = process.platform === 'win32';
46
+ const emptyFn = (_entryInfo) => true;
47
+ const normalizeFilter = (filter) => {
48
+ if (filter === undefined)
49
+ return emptyFn;
50
+ if (typeof filter === 'function')
51
+ return filter;
52
+ if (typeof filter === 'string') {
53
+ const fl = filter.trim();
54
+ return (entry) => entry.basename === fl;
55
+ }
56
+ if (Array.isArray(filter)) {
57
+ const trItems = filter.map((item) => item.trim());
58
+ return (entry) => trItems.some((f) => entry.basename === f);
59
+ }
60
+ return emptyFn;
61
+ };
62
+ /** Readable readdir stream, emitting new files as they're being listed. */
63
+ class ReaddirpStream extends node_stream_1.Readable {
64
+ constructor(options = {}) {
65
+ super({
66
+ objectMode: true,
67
+ autoDestroy: true,
68
+ highWaterMark: options.highWaterMark,
69
+ });
70
+ const opts = { ...defaultOptions, ...options };
71
+ const { root, type } = opts;
72
+ this._fileFilter = normalizeFilter(opts.fileFilter);
73
+ this._directoryFilter = normalizeFilter(opts.directoryFilter);
74
+ const statMethod = opts.lstat ? promises_1.lstat : promises_1.stat;
75
+ // Use bigint stats if it's windows and stat() supports options (node 10+).
76
+ if (wantBigintFsStats) {
77
+ this._stat = (path) => statMethod(path, { bigint: true });
78
+ }
79
+ else {
80
+ this._stat = statMethod;
81
+ }
82
+ this._maxDepth = opts.depth ?? defaultOptions.depth;
83
+ this._wantsDir = type ? DIR_TYPES.has(type) : false;
84
+ this._wantsFile = type ? FILE_TYPES.has(type) : false;
85
+ this._wantsEverything = type === exports.EntryTypes.EVERYTHING_TYPE;
86
+ this._root = (0, node_path_1.resolve)(root);
87
+ this._isDirent = !opts.alwaysStat;
88
+ this._statsProp = this._isDirent ? 'dirent' : 'stats';
89
+ this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent };
90
+ // Launch stream with one parent, the root dir.
91
+ this.parents = [this._exploreDir(root, 1)];
92
+ this.reading = false;
93
+ this.parent = undefined;
94
+ }
95
+ async _read(batch) {
96
+ if (this.reading)
97
+ return;
98
+ this.reading = true;
99
+ try {
100
+ while (!this.destroyed && batch > 0) {
101
+ const par = this.parent;
102
+ const fil = par && par.files;
103
+ if (fil && fil.length > 0) {
104
+ const { path, depth } = par;
105
+ const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path));
106
+ const awaited = await Promise.all(slice);
107
+ for (const entry of awaited) {
108
+ if (!entry)
109
+ continue;
110
+ if (this.destroyed)
111
+ return;
112
+ const entryType = await this._getEntryType(entry);
113
+ if (entryType === 'directory' && this._directoryFilter(entry)) {
114
+ if (depth <= this._maxDepth) {
115
+ this.parents.push(this._exploreDir(entry.fullPath, depth + 1));
116
+ }
117
+ if (this._wantsDir) {
118
+ this.push(entry);
119
+ batch--;
120
+ }
121
+ }
122
+ else if ((entryType === 'file' || this._includeAsFile(entry)) &&
123
+ this._fileFilter(entry)) {
124
+ if (this._wantsFile) {
125
+ this.push(entry);
126
+ batch--;
127
+ }
128
+ }
129
+ }
130
+ }
131
+ else {
132
+ const parent = this.parents.pop();
133
+ if (!parent) {
134
+ this.push(null);
135
+ break;
136
+ }
137
+ this.parent = await parent;
138
+ if (this.destroyed)
139
+ return;
140
+ }
141
+ }
142
+ }
143
+ catch (error) {
144
+ this.destroy(error);
145
+ }
146
+ finally {
147
+ this.reading = false;
148
+ }
149
+ }
150
+ async _exploreDir(path, depth) {
151
+ let files;
152
+ try {
153
+ files = await (0, promises_1.readdir)(path, this._rdOptions);
154
+ }
155
+ catch (error) {
156
+ this._onError(error);
157
+ }
158
+ return { files, depth, path };
159
+ }
160
+ async _formatEntry(dirent, path) {
161
+ let entry;
162
+ const basename = this._isDirent ? dirent.name : dirent;
163
+ try {
164
+ const fullPath = (0, node_path_1.resolve)((0, node_path_1.join)(path, basename));
165
+ entry = { path: (0, node_path_1.relative)(this._root, fullPath), fullPath, basename };
166
+ entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
167
+ }
168
+ catch (err) {
169
+ this._onError(err);
170
+ return;
171
+ }
172
+ return entry;
173
+ }
174
+ _onError(err) {
175
+ if (isNormalFlowError(err) && !this.destroyed) {
176
+ this.emit('warn', err);
177
+ }
178
+ else {
179
+ this.destroy(err);
180
+ }
181
+ }
182
+ async _getEntryType(entry) {
183
+ // entry may be undefined, because a warning or an error were emitted
184
+ // and the statsProp is undefined
185
+ if (!entry && this._statsProp in entry) {
186
+ return '';
187
+ }
188
+ const stats = entry[this._statsProp];
189
+ if (stats.isFile())
190
+ return 'file';
191
+ if (stats.isDirectory())
192
+ return 'directory';
193
+ if (stats && stats.isSymbolicLink()) {
194
+ const full = entry.fullPath;
195
+ try {
196
+ const entryRealPath = await (0, promises_1.realpath)(full);
197
+ const entryRealPathStats = await (0, promises_1.lstat)(entryRealPath);
198
+ if (entryRealPathStats.isFile()) {
199
+ return 'file';
200
+ }
201
+ if (entryRealPathStats.isDirectory()) {
202
+ const len = entryRealPath.length;
203
+ if (full.startsWith(entryRealPath) && full.substr(len, 1) === node_path_1.sep) {
204
+ const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
205
+ // @ts-ignore
206
+ recursiveError.code = RECURSIVE_ERROR_CODE;
207
+ return this._onError(recursiveError);
208
+ }
209
+ return 'directory';
210
+ }
211
+ }
212
+ catch (error) {
213
+ this._onError(error);
214
+ return '';
215
+ }
216
+ }
217
+ }
218
+ _includeAsFile(entry) {
219
+ const stats = entry && entry[this._statsProp];
220
+ return stats && this._wantsEverything && !stats.isDirectory();
221
+ }
222
+ }
223
+ exports.ReaddirpStream = ReaddirpStream;
224
+ /**
225
+ * Streaming version: Reads all files and directories in given root recursively.
226
+ * Consumes ~constant small amount of RAM.
227
+ * @param root Root directory
228
+ * @param options Options to specify root (start directory), filters and recursion depth
229
+ */
230
+ function readdirp(root, options = {}) {
231
+ // @ts-ignore
232
+ let type = options.entryType || options.type;
233
+ if (type === 'both')
234
+ type = exports.EntryTypes.FILE_DIR_TYPE; // backwards-compatibility
235
+ if (type)
236
+ options.type = type;
237
+ if (!root) {
238
+ throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)');
239
+ }
240
+ else if (typeof root !== 'string') {
241
+ throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)');
242
+ }
243
+ else if (type && !ALL_TYPES.includes(type)) {
244
+ throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`);
245
+ }
246
+ options.root = root;
247
+ return new ReaddirpStream(options);
248
+ }
249
+ /**
250
+ * Promise version: Reads all files and directories in given root recursively.
251
+ * Compared to streaming version, will consume a lot of RAM e.g. when 1 million files are listed.
252
+ * @returns array of paths and their entry infos
253
+ */
254
+ function readdirpPromise(root, options = {}) {
255
+ return new Promise((resolve, reject) => {
256
+ const files = [];
257
+ readdirp(root, options)
258
+ .on('data', (entry) => files.push(entry))
259
+ .on('end', () => resolve(files))
260
+ .on('error', (error) => reject(error));
261
+ });
262
+ }
263
+ exports.default = readdirp;
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "readdirp",
3
+ "description": "Recursive version of fs.readdir with small RAM & CPU footprint.",
4
+ "version": "4.1.2",
5
+ "homepage": "https://github.com/paulmillr/readdirp",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git://github.com/paulmillr/readdirp.git"
9
+ },
10
+ "license": "MIT",
11
+ "bugs": {
12
+ "url": "https://github.com/paulmillr/readdirp/issues"
13
+ },
14
+ "author": "Thorsten Lorenz <thlorenz@gmx.de> (thlorenz.com)",
15
+ "contributors": [
16
+ "Thorsten Lorenz <thlorenz@gmx.de> (thlorenz.com)",
17
+ "Paul Miller (https://paulmillr.com)"
18
+ ],
19
+ "engines": {
20
+ "node": ">= 14.18.0"
21
+ },
22
+ "files": [
23
+ "index.js",
24
+ "index.d.ts",
25
+ "index.d.ts.map",
26
+ "index.js.map",
27
+ "esm"
28
+ ],
29
+ "main": "./index.js",
30
+ "module": "./esm/index.js",
31
+ "types": "./index.d.ts",
32
+ "exports": {
33
+ ".": {
34
+ "import": "./esm/index.js",
35
+ "require": "./index.js"
36
+ }
37
+ },
38
+ "sideEffects": false,
39
+ "keywords": [
40
+ "recursive",
41
+ "fs",
42
+ "stream",
43
+ "streams",
44
+ "readdir",
45
+ "filesystem",
46
+ "find",
47
+ "filter"
48
+ ],
49
+ "scripts": {
50
+ "build": "tsc && tsc -p tsconfig.cjs.json",
51
+ "lint": "prettier --check index.ts test/index.test.js",
52
+ "format": "prettier --write index.ts test/index.test.js",
53
+ "test": "node test/index.test.js",
54
+ "test:coverage": "c8 node test/index.test.js"
55
+ },
56
+ "devDependencies": {
57
+ "@paulmillr/jsbt": "0.3.1",
58
+ "@types/node": "20.14.8",
59
+ "c8": "10.1.3",
60
+ "chai": "4.3.4",
61
+ "chai-subset": "1.6.0",
62
+ "micro-should": "0.5.0",
63
+ "prettier": "3.1.1",
64
+ "typescript": "5.5.2"
65
+ },
66
+ "funding": {
67
+ "type": "individual",
68
+ "url": "https://paulmillr.com/funding/"
69
+ }
70
+ }
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colbymchenry/codegraph",
3
- "version": "0.9.3",
3
+ "version": "0.9.5",
4
4
  "description": "Supercharge Claude Code with semantic code intelligence. 94% fewer tool calls • 77% faster exploration • 100% local.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -33,6 +33,7 @@
33
33
  "license": "MIT",
34
34
  "dependencies": {
35
35
  "@clack/prompts": "^1.3.0",
36
+ "chokidar": "^4.0.3",
36
37
  "commander": "^14.0.2",
37
38
  "fast-string-width": "^3.0.2",
38
39
  "fast-wrap-ansi": "^0.2.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colbymchenry/codegraph-darwin-arm64",
3
- "version": "0.9.3",
3
+ "version": "0.9.5",
4
4
  "description": "CodeGraph self-contained bundle for darwin-arm64",
5
5
  "os": [
6
6
  "darwin"