@j0hanz/filesystem-context-mcp 1.2.9 → 1.3.1
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/README.md +254 -453
- package/dist/__tests__/lib/file-operations/compute-checksums.test.d.ts +2 -0
- package/dist/__tests__/lib/file-operations/compute-checksums.test.d.ts.map +1 -0
- package/dist/__tests__/lib/file-operations/compute-checksums.test.js +59 -0
- package/dist/__tests__/lib/file-operations/compute-checksums.test.js.map +1 -0
- package/dist/__tests__/lib/file-operations/get-multiple-file-info.test.d.ts +2 -0
- package/dist/__tests__/lib/file-operations/get-multiple-file-info.test.d.ts.map +1 -0
- package/dist/__tests__/lib/file-operations/get-multiple-file-info.test.js +46 -0
- package/dist/__tests__/lib/file-operations/get-multiple-file-info.test.js.map +1 -0
- package/dist/__tests__/lib/file-operations/search-content-edge-cases.test.js +1 -1
- package/dist/__tests__/lib/file-operations/search-content-edge-cases.test.js.map +1 -1
- package/dist/__tests__/lib/file-operations/search-definitions-helpers.test.d.ts +2 -0
- package/dist/__tests__/lib/file-operations/search-definitions-helpers.test.d.ts.map +1 -0
- package/dist/__tests__/lib/file-operations/search-definitions-helpers.test.js +43 -0
- package/dist/__tests__/lib/file-operations/search-definitions-helpers.test.js.map +1 -0
- package/dist/__tests__/lib/file-operations/search-definitions.fixtures.d.ts +7 -0
- package/dist/__tests__/lib/file-operations/search-definitions.fixtures.d.ts.map +1 -0
- package/dist/__tests__/lib/file-operations/search-definitions.fixtures.js +113 -0
- package/dist/__tests__/lib/file-operations/search-definitions.fixtures.js.map +1 -0
- package/dist/__tests__/lib/file-operations/search-definitions.test.js +153 -280
- package/dist/__tests__/lib/file-operations/search-definitions.test.js.map +1 -1
- package/dist/__tests__/lib/file-operations/sorting.test.d.ts +2 -0
- package/dist/__tests__/lib/file-operations/sorting.test.d.ts.map +1 -0
- package/dist/__tests__/lib/file-operations/sorting.test.js +22 -0
- package/dist/__tests__/lib/file-operations/sorting.test.js.map +1 -0
- package/dist/__tests__/lib/fs-helpers/utf8.test.d.ts +2 -0
- package/dist/__tests__/lib/fs-helpers/utf8.test.d.ts.map +1 -0
- package/dist/__tests__/lib/fs-helpers/utf8.test.js +43 -0
- package/dist/__tests__/lib/fs-helpers/utf8.test.js.map +1 -0
- package/dist/__tests__/lib/path-validation-errors.test.d.ts +2 -0
- package/dist/__tests__/lib/path-validation-errors.test.d.ts.map +1 -0
- package/dist/__tests__/lib/path-validation-errors.test.js +35 -0
- package/dist/__tests__/lib/path-validation-errors.test.js.map +1 -0
- package/dist/__tests__/lib/path-validation-roots.test.d.ts +2 -0
- package/dist/__tests__/lib/path-validation-roots.test.d.ts.map +1 -0
- package/dist/__tests__/lib/path-validation-roots.test.js +42 -0
- package/dist/__tests__/lib/path-validation-roots.test.js.map +1 -0
- package/dist/__tests__/lib/path-validation.test.js +22 -0
- package/dist/__tests__/lib/path-validation.test.js.map +1 -1
- package/dist/__tests__/security/filesystem-boundary.test.js +20 -12
- package/dist/__tests__/security/filesystem-boundary.test.js.map +1 -1
- package/dist/config/formatting.d.ts +14 -0
- package/dist/config/formatting.d.ts.map +1 -0
- package/dist/config/formatting.js +34 -0
- package/dist/config/formatting.js.map +1 -0
- package/dist/config/types.d.ts +12 -75
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js.map +1 -1
- package/dist/index.js +26 -2
- package/dist/index.js.map +1 -1
- package/dist/instructions.md +159 -149
- package/dist/lib/constants.d.ts +1 -5
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +31 -11
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/errors.d.ts +0 -2
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +2 -30
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/file-operations/analyze-directory-helpers.d.ts +24 -0
- package/dist/lib/file-operations/analyze-directory-helpers.d.ts.map +1 -0
- package/dist/lib/file-operations/analyze-directory-helpers.js +50 -0
- package/dist/lib/file-operations/analyze-directory-helpers.js.map +1 -0
- package/dist/lib/file-operations/analyze-directory.d.ts +1 -0
- package/dist/lib/file-operations/analyze-directory.d.ts.map +1 -1
- package/dist/lib/file-operations/analyze-directory.js +11 -59
- package/dist/lib/file-operations/analyze-directory.js.map +1 -1
- package/dist/lib/file-operations/batch-results.d.ts +13 -0
- package/dist/lib/file-operations/batch-results.d.ts.map +1 -0
- package/dist/lib/file-operations/batch-results.js +23 -0
- package/dist/lib/file-operations/batch-results.js.map +1 -0
- package/dist/lib/file-operations/compute-checksums.d.ts +10 -0
- package/dist/lib/file-operations/compute-checksums.d.ts.map +1 -0
- package/dist/lib/file-operations/compute-checksums.js +134 -0
- package/dist/lib/file-operations/compute-checksums.js.map +1 -0
- package/dist/lib/file-operations/directory-helpers.d.ts.map +1 -1
- package/dist/lib/file-operations/directory-helpers.js +18 -10
- package/dist/lib/file-operations/directory-helpers.js.map +1 -1
- package/dist/lib/file-operations/directory-tree-builders.d.ts +7 -0
- package/dist/lib/file-operations/directory-tree-builders.d.ts.map +1 -0
- package/dist/lib/file-operations/directory-tree-builders.js +58 -0
- package/dist/lib/file-operations/directory-tree-builders.js.map +1 -0
- package/dist/lib/file-operations/directory-tree-helpers.d.ts +0 -5
- package/dist/lib/file-operations/directory-tree-helpers.d.ts.map +1 -1
- package/dist/lib/file-operations/directory-tree-helpers.js +21 -64
- package/dist/lib/file-operations/directory-tree-helpers.js.map +1 -1
- package/dist/lib/file-operations/directory-tree.d.ts +1 -0
- package/dist/lib/file-operations/directory-tree.d.ts.map +1 -1
- package/dist/lib/file-operations/directory-tree.js +5 -10
- package/dist/lib/file-operations/directory-tree.js.map +1 -1
- package/dist/lib/file-operations/file-info.d.ts +3 -1
- package/dist/lib/file-operations/file-info.d.ts.map +1 -1
- package/dist/lib/file-operations/file-info.js +16 -5
- package/dist/lib/file-operations/file-info.js.map +1 -1
- package/dist/lib/file-operations/get-multiple-file-info.d.ts +7 -0
- package/dist/lib/file-operations/get-multiple-file-info.d.ts.map +1 -0
- package/dist/lib/file-operations/get-multiple-file-info.js +57 -0
- package/dist/lib/file-operations/get-multiple-file-info.js.map +1 -0
- package/dist/lib/file-operations/list-directory-entry.d.ts +18 -0
- package/dist/lib/file-operations/list-directory-entry.d.ts.map +1 -0
- package/dist/lib/file-operations/list-directory-entry.js +93 -0
- package/dist/lib/file-operations/list-directory-entry.js.map +1 -0
- package/dist/lib/file-operations/list-directory-helpers.d.ts +6 -1
- package/dist/lib/file-operations/list-directory-helpers.d.ts.map +1 -1
- package/dist/lib/file-operations/list-directory-helpers.js +83 -97
- package/dist/lib/file-operations/list-directory-helpers.js.map +1 -1
- package/dist/lib/file-operations/list-directory.d.ts +2 -0
- package/dist/lib/file-operations/list-directory.d.ts.map +1 -1
- package/dist/lib/file-operations/list-directory.js +11 -11
- package/dist/lib/file-operations/list-directory.js.map +1 -1
- package/dist/lib/file-operations/read-media-file.d.ts.map +1 -1
- package/dist/lib/file-operations/read-media-file.js +5 -1
- package/dist/lib/file-operations/read-media-file.js.map +1 -1
- package/dist/lib/file-operations/read-multiple-files.d.ts +8 -0
- package/dist/lib/file-operations/read-multiple-files.d.ts.map +1 -1
- package/dist/lib/file-operations/read-multiple-files.js +15 -7
- package/dist/lib/file-operations/read-multiple-files.js.map +1 -1
- package/dist/lib/file-operations/search/engine-options.d.ts.map +1 -1
- package/dist/lib/file-operations/search/engine-options.js +1 -8
- package/dist/lib/file-operations/search/engine-options.js.map +1 -1
- package/dist/lib/file-operations/search/engine-stream.d.ts +1 -1
- package/dist/lib/file-operations/search/engine-stream.d.ts.map +1 -1
- package/dist/lib/file-operations/search/engine-stream.js +21 -5
- package/dist/lib/file-operations/search/engine-stream.js.map +1 -1
- package/dist/lib/file-operations/search/engine.d.ts +1 -1
- package/dist/lib/file-operations/search/engine.d.ts.map +1 -1
- package/dist/lib/file-operations/search/engine.js +43 -3
- package/dist/lib/file-operations/search/engine.js.map +1 -1
- package/dist/lib/file-operations/search/file-processor.d.ts.map +1 -1
- package/dist/lib/file-operations/search/file-processor.js +94 -54
- package/dist/lib/file-operations/search/file-processor.js.map +1 -1
- package/dist/lib/file-operations/search/match-strategy.d.ts.map +1 -1
- package/dist/lib/file-operations/search/match-strategy.js +2 -1
- package/dist/lib/file-operations/search/match-strategy.js.map +1 -1
- package/dist/lib/file-operations/search/types.d.ts +1 -0
- package/dist/lib/file-operations/search/types.d.ts.map +1 -1
- package/dist/lib/file-operations/search-content.d.ts +1 -0
- package/dist/lib/file-operations/search-content.d.ts.map +1 -1
- package/dist/lib/file-operations/search-content.js +1 -1
- package/dist/lib/file-operations/search-content.js.map +1 -1
- package/dist/lib/file-operations/search-definitions/matchers.d.ts +12 -0
- package/dist/lib/file-operations/search-definitions/matchers.d.ts.map +1 -0
- package/dist/lib/file-operations/search-definitions/matchers.js +122 -0
- package/dist/lib/file-operations/search-definitions/matchers.js.map +1 -0
- package/dist/lib/file-operations/search-definitions/patterns.d.ts +14 -0
- package/dist/lib/file-operations/search-definitions/patterns.d.ts.map +1 -0
- package/dist/lib/file-operations/search-definitions/patterns.js +83 -0
- package/dist/lib/file-operations/search-definitions/patterns.js.map +1 -0
- package/dist/lib/file-operations/search-definitions.d.ts.map +1 -1
- package/dist/lib/file-operations/search-definitions.js +25 -199
- package/dist/lib/file-operations/search-definitions.js.map +1 -1
- package/dist/lib/file-operations/search-files-helpers.d.ts +3 -27
- package/dist/lib/file-operations/search-files-helpers.d.ts.map +1 -1
- package/dist/lib/file-operations/search-files-helpers.js +18 -45
- package/dist/lib/file-operations/search-files-helpers.js.map +1 -1
- package/dist/lib/file-operations/search-files-options.d.ts +33 -0
- package/dist/lib/file-operations/search-files-options.d.ts.map +1 -0
- package/dist/lib/file-operations/search-files-options.js +33 -0
- package/dist/lib/file-operations/search-files-options.js.map +1 -0
- package/dist/lib/file-operations/search-files.d.ts +1 -1
- package/dist/lib/file-operations/search-files.d.ts.map +1 -1
- package/dist/lib/file-operations/search-files.js +9 -3
- package/dist/lib/file-operations/search-files.js.map +1 -1
- package/dist/lib/file-operations/sorting.d.ts.map +1 -1
- package/dist/lib/file-operations/sorting.js +39 -14
- package/dist/lib/file-operations/sorting.js.map +1 -1
- package/dist/lib/file-operations.d.ts +1 -4
- package/dist/lib/file-operations.d.ts.map +1 -1
- package/dist/lib/file-operations.js +1 -4
- package/dist/lib/file-operations.js.map +1 -1
- package/dist/lib/fs-helpers/binary-detect.d.ts.map +1 -1
- package/dist/lib/fs-helpers/binary-detect.js +13 -16
- package/dist/lib/fs-helpers/binary-detect.js.map +1 -1
- package/dist/lib/fs-helpers/concurrency.d.ts +1 -1
- package/dist/lib/fs-helpers/concurrency.d.ts.map +1 -1
- package/dist/lib/fs-helpers/concurrency.js +37 -3
- package/dist/lib/fs-helpers/concurrency.js.map +1 -1
- package/dist/lib/fs-helpers/readers/head-file.js +1 -1
- package/dist/lib/fs-helpers/readers/head-file.js.map +1 -1
- package/dist/lib/fs-helpers/readers/read-buffer.d.ts +2 -0
- package/dist/lib/fs-helpers/readers/read-buffer.d.ts.map +1 -0
- package/dist/lib/fs-helpers/readers/read-buffer.js +52 -0
- package/dist/lib/fs-helpers/readers/read-buffer.js.map +1 -0
- package/dist/lib/fs-helpers/readers/read-file-content.d.ts +36 -0
- package/dist/lib/fs-helpers/readers/read-file-content.d.ts.map +1 -0
- package/dist/lib/fs-helpers/readers/read-file-content.js +49 -0
- package/dist/lib/fs-helpers/readers/read-file-content.js.map +1 -0
- package/dist/lib/fs-helpers/readers/read-file.d.ts +9 -0
- package/dist/lib/fs-helpers/readers/read-file.d.ts.map +1 -1
- package/dist/lib/fs-helpers/readers/read-file.js +56 -36
- package/dist/lib/fs-helpers/readers/read-file.js.map +1 -1
- package/dist/lib/fs-helpers/readers/tail-file.js +1 -1
- package/dist/lib/fs-helpers/readers/tail-file.js.map +1 -1
- package/dist/lib/merge-defined.d.ts +2 -0
- package/dist/lib/merge-defined.d.ts.map +1 -0
- package/dist/lib/merge-defined.js +8 -0
- package/dist/lib/merge-defined.js.map +1 -0
- package/dist/lib/path-utils.d.ts +1 -0
- package/dist/lib/path-utils.d.ts.map +1 -1
- package/dist/lib/path-utils.js +12 -0
- package/dist/lib/path-utils.js.map +1 -1
- package/dist/lib/path-validation/allowed-directories.d.ts.map +1 -1
- package/dist/lib/path-validation/allowed-directories.js +2 -9
- package/dist/lib/path-validation/allowed-directories.js.map +1 -1
- package/dist/lib/path-validation/errors.js +2 -2
- package/dist/lib/path-validation/errors.js.map +1 -1
- package/dist/lib/path-validation/validators.d.ts.map +1 -1
- package/dist/lib/path-validation/validators.js +11 -1
- package/dist/lib/path-validation/validators.js.map +1 -1
- package/dist/schemas/common.d.ts +0 -18
- package/dist/schemas/common.d.ts.map +1 -1
- package/dist/schemas/common.js +0 -10
- package/dist/schemas/common.js.map +1 -1
- package/dist/schemas/index.d.ts +2 -2
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +2 -2
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/input-helpers.d.ts +1 -4
- package/dist/schemas/input-helpers.d.ts.map +1 -1
- package/dist/schemas/input-helpers.js +9 -33
- package/dist/schemas/input-helpers.js.map +1 -1
- package/dist/schemas/inputs/checksums.d.ts +8 -0
- package/dist/schemas/inputs/checksums.d.ts.map +1 -0
- package/dist/schemas/inputs/checksums.js +25 -0
- package/dist/schemas/inputs/checksums.js.map +1 -0
- package/dist/schemas/inputs/directory.d.ts +13 -0
- package/dist/schemas/inputs/directory.d.ts.map +1 -0
- package/dist/schemas/inputs/directory.js +33 -0
- package/dist/schemas/inputs/directory.js.map +1 -0
- package/dist/schemas/inputs/file-info.d.ts +9 -0
- package/dist/schemas/inputs/file-info.d.ts.map +1 -0
- package/dist/schemas/inputs/file-info.js +20 -0
- package/dist/schemas/inputs/file-info.js.map +1 -0
- package/dist/schemas/inputs/read.d.ts +22 -0
- package/dist/schemas/inputs/read.d.ts.map +1 -0
- package/dist/schemas/inputs/read.js +39 -0
- package/dist/schemas/inputs/read.js.map +1 -0
- package/dist/schemas/inputs/search.d.ts +33 -0
- package/dist/schemas/inputs/search.d.ts.map +1 -0
- package/dist/schemas/inputs/search.js +89 -0
- package/dist/schemas/inputs/search.js.map +1 -0
- package/dist/schemas/inputs.d.ts +4 -94
- package/dist/schemas/inputs.d.ts.map +1 -1
- package/dist/schemas/inputs.js +4 -227
- package/dist/schemas/inputs.js.map +1 -1
- package/dist/schemas/output-helpers.d.ts +59 -0
- package/dist/schemas/output-helpers.d.ts.map +1 -1
- package/dist/schemas/output-helpers.js +31 -0
- package/dist/schemas/output-helpers.js.map +1 -1
- package/dist/schemas/outputs/checksums.d.ts +93 -0
- package/dist/schemas/outputs/checksums.d.ts.map +1 -0
- package/dist/schemas/outputs/checksums.js +18 -0
- package/dist/schemas/outputs/checksums.js.map +1 -0
- package/dist/schemas/outputs/directory.d.ts +257 -0
- package/dist/schemas/outputs/directory.d.ts.map +1 -0
- package/dist/schemas/outputs/directory.js +63 -0
- package/dist/schemas/outputs/directory.js.map +1 -0
- package/dist/schemas/outputs/file-info.d.ts +270 -0
- package/dist/schemas/outputs/file-info.d.ts.map +1 -0
- package/dist/schemas/outputs/file-info.js +30 -0
- package/dist/schemas/outputs/file-info.js.map +1 -0
- package/dist/schemas/outputs/read.d.ts +282 -0
- package/dist/schemas/outputs/read.d.ts.map +1 -0
- package/dist/schemas/outputs/read.js +62 -0
- package/dist/schemas/outputs/read.js.map +1 -0
- package/dist/schemas/outputs/search.d.ts +370 -0
- package/dist/schemas/outputs/search.d.ts.map +1 -0
- package/dist/schemas/outputs/search.js +96 -0
- package/dist/schemas/outputs/search.js.map +1 -0
- package/dist/schemas/outputs.d.ts +4 -1059
- package/dist/schemas/outputs.d.ts.map +1 -1
- package/dist/schemas/outputs.js +4 -229
- package/dist/schemas/outputs.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +28 -15
- package/dist/server.js.map +1 -1
- package/dist/tools/analyze-directory.d.ts.map +1 -1
- package/dist/tools/analyze-directory.js +26 -28
- package/dist/tools/analyze-directory.js.map +1 -1
- package/dist/tools/compute-checksums.d.ts +3 -0
- package/dist/tools/compute-checksums.d.ts.map +1 -0
- package/dist/tools/compute-checksums.js +69 -0
- package/dist/tools/compute-checksums.js.map +1 -0
- package/dist/tools/directory-tree.d.ts.map +1 -1
- package/dist/tools/directory-tree.js +17 -11
- package/dist/tools/directory-tree.js.map +1 -1
- package/dist/tools/get-file-info.d.ts.map +1 -1
- package/dist/tools/get-file-info.js +8 -44
- package/dist/tools/get-file-info.js.map +1 -1
- package/dist/tools/get-multiple-file-info.d.ts +3 -0
- package/dist/tools/get-multiple-file-info.d.ts.map +1 -0
- package/dist/tools/get-multiple-file-info.js +53 -0
- package/dist/tools/get-multiple-file-info.js.map +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +2 -8
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/list-allowed-dirs.d.ts.map +1 -1
- package/dist/tools/list-allowed-dirs.js +46 -29
- package/dist/tools/list-allowed-dirs.js.map +1 -1
- package/dist/tools/list-directory.d.ts.map +1 -1
- package/dist/tools/list-directory.js +83 -77
- package/dist/tools/list-directory.js.map +1 -1
- package/dist/tools/read-file.d.ts.map +1 -1
- package/dist/tools/read-file.js +57 -37
- package/dist/tools/read-file.js.map +1 -1
- package/dist/tools/read-media-file.d.ts.map +1 -1
- package/dist/tools/read-media-file.js +8 -6
- package/dist/tools/read-media-file.js.map +1 -1
- package/dist/tools/read-multiple-files.d.ts.map +1 -1
- package/dist/tools/read-multiple-files.js +58 -23
- package/dist/tools/read-multiple-files.js.map +1 -1
- package/dist/tools/search-content.d.ts.map +1 -1
- package/dist/tools/search-content.js +14 -16
- package/dist/tools/search-content.js.map +1 -1
- package/dist/tools/search-definitions.d.ts.map +1 -1
- package/dist/tools/search-definitions.js +59 -42
- package/dist/tools/search-definitions.js.map +1 -1
- package/dist/tools/search-files.d.ts.map +1 -1
- package/dist/tools/search-files.js +65 -45
- package/dist/tools/search-files.js.map +1 -1
- package/dist/tools/shared/file-info.d.ts +17 -0
- package/dist/tools/shared/file-info.d.ts.map +1 -0
- package/dist/tools/shared/file-info.js +40 -0
- package/dist/tools/shared/file-info.js.map +1 -0
- package/dist/tools/shared/formatting.d.ts +5 -0
- package/dist/tools/shared/formatting.d.ts.map +1 -1
- package/dist/tools/shared/formatting.js +21 -1
- package/dist/tools/shared/formatting.js.map +1 -1
- package/dist/tools/shared/read-range.d.ts +7 -0
- package/dist/tools/shared/read-range.d.ts.map +1 -0
- package/dist/tools/shared/read-range.js +22 -0
- package/dist/tools/shared/read-range.js.map +1 -0
- package/dist/tools/shared/search-formatting.d.ts.map +1 -1
- package/dist/tools/shared/search-formatting.js +57 -29
- package/dist/tools/shared/search-formatting.js.map +1 -1
- package/dist/tools/tool-response.d.ts +22 -0
- package/dist/tools/tool-response.d.ts.map +1 -1
- package/dist/tools/tool-response.js +30 -0
- package/dist/tools/tool-response.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import * as pathModule from 'node:path';
|
|
2
|
+
const ARROW_FUNCTION_REGEX = /=\s*(?:async\s+)?(?:\([^)]*\)|[^=])\s*=>/u;
|
|
3
|
+
const LINE_TYPE_PATTERNS = [
|
|
4
|
+
[/\bclass\s+/u, 'class'],
|
|
5
|
+
[/\binterface\s+/u, 'interface'],
|
|
6
|
+
[/\btype\s+\w+\s*=/u, 'type'],
|
|
7
|
+
[/\benum\s+/u, 'enum'],
|
|
8
|
+
[/\bfunction\s+/u, 'function'],
|
|
9
|
+
[ARROW_FUNCTION_REGEX, 'function'],
|
|
10
|
+
];
|
|
11
|
+
const NAME_EXTRACTORS = [
|
|
12
|
+
[/\bclass\s+([A-Za-z_$][A-Za-z0-9_$]*)/u, ['class']],
|
|
13
|
+
[/\binterface\s+([A-Za-z_$][A-Za-z0-9_$]*)/u, ['interface']],
|
|
14
|
+
[/\btype\s+([A-Za-z_$][A-Za-z0-9_$]*)\s*=/u, ['type']],
|
|
15
|
+
[/\benum\s+([A-Za-z_$][A-Za-z0-9_$]*)/u, ['enum']],
|
|
16
|
+
[/\bfunction\s+([A-Za-z_$][A-Za-z0-9_$]*)/u, ['function']],
|
|
17
|
+
[
|
|
18
|
+
/\b(?:const|let|var)\s+([A-Za-z_$][A-Za-z0-9_$]*)/u,
|
|
19
|
+
['variable', 'function'],
|
|
20
|
+
],
|
|
21
|
+
];
|
|
22
|
+
function isArrowFunction(content) {
|
|
23
|
+
return ARROW_FUNCTION_REGEX.test(content);
|
|
24
|
+
}
|
|
25
|
+
function resolveEffectiveType(detectedType, searchType, content) {
|
|
26
|
+
if (searchType !== 'function')
|
|
27
|
+
return detectedType;
|
|
28
|
+
if (detectedType !== 'variable')
|
|
29
|
+
return detectedType;
|
|
30
|
+
return isArrowFunction(content) ? 'function' : detectedType;
|
|
31
|
+
}
|
|
32
|
+
function isNameMatch(name, searchName, caseSensitive) {
|
|
33
|
+
if (!searchName)
|
|
34
|
+
return true;
|
|
35
|
+
return caseSensitive
|
|
36
|
+
? name === searchName
|
|
37
|
+
: name.toLowerCase() === searchName.toLowerCase();
|
|
38
|
+
}
|
|
39
|
+
function isTypeMatch(searchType, effectiveType) {
|
|
40
|
+
if (!searchType)
|
|
41
|
+
return true;
|
|
42
|
+
return effectiveType === searchType;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Classify a line of code to determine the definition type
|
|
46
|
+
*/
|
|
47
|
+
function classifyLine(content) {
|
|
48
|
+
const trimmed = content.trim();
|
|
49
|
+
for (const [pattern, type] of LINE_TYPE_PATTERNS) {
|
|
50
|
+
if (pattern.test(trimmed))
|
|
51
|
+
return type;
|
|
52
|
+
}
|
|
53
|
+
return 'variable';
|
|
54
|
+
}
|
|
55
|
+
function getExtractorCandidates(searchType) {
|
|
56
|
+
if (!searchType)
|
|
57
|
+
return NAME_EXTRACTORS;
|
|
58
|
+
return NAME_EXTRACTORS.filter(([, types]) => types.includes(searchType));
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Extract the definition name from a line of code
|
|
62
|
+
*/
|
|
63
|
+
function extractName(content, searchType) {
|
|
64
|
+
const trimmed = content.trim();
|
|
65
|
+
const candidates = getExtractorCandidates(searchType);
|
|
66
|
+
for (const [pattern] of candidates) {
|
|
67
|
+
const match = pattern.exec(trimmed);
|
|
68
|
+
if (match?.[1])
|
|
69
|
+
return match[1];
|
|
70
|
+
}
|
|
71
|
+
return 'unknown';
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Check if a definition is exported
|
|
75
|
+
*/
|
|
76
|
+
function isExported(content) {
|
|
77
|
+
return /\bexport\b/u.test(content);
|
|
78
|
+
}
|
|
79
|
+
function resolveDefinitionMeta(content, searchName, searchType, caseSensitive = true) {
|
|
80
|
+
const detectedType = classifyLine(content);
|
|
81
|
+
const name = extractName(content, searchType);
|
|
82
|
+
if (name === 'unknown')
|
|
83
|
+
return null;
|
|
84
|
+
const effectiveType = resolveEffectiveType(detectedType, searchType, content);
|
|
85
|
+
if (!isTypeMatch(searchType, effectiveType))
|
|
86
|
+
return null;
|
|
87
|
+
if (!isNameMatch(name, searchName, caseSensitive))
|
|
88
|
+
return null;
|
|
89
|
+
return {
|
|
90
|
+
name,
|
|
91
|
+
effectiveType,
|
|
92
|
+
exported: isExported(content),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function buildDefinitionMatch(match, basePath, searchName, searchType, caseSensitive = true) {
|
|
96
|
+
const meta = resolveDefinitionMeta(match.content, searchName, searchType, caseSensitive);
|
|
97
|
+
if (!meta)
|
|
98
|
+
return null;
|
|
99
|
+
return {
|
|
100
|
+
file: pathModule.relative(basePath, match.file),
|
|
101
|
+
line: match.line,
|
|
102
|
+
definitionType: searchType ?? meta.effectiveType,
|
|
103
|
+
name: meta.name,
|
|
104
|
+
content: match.content,
|
|
105
|
+
contextBefore: match.contextBefore,
|
|
106
|
+
contextAfter: match.contextAfter,
|
|
107
|
+
exported: meta.exported,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Filter and classify matches into definition results
|
|
112
|
+
*/
|
|
113
|
+
export function processMatches(matches, basePath, searchName, searchType, caseSensitive) {
|
|
114
|
+
const results = [];
|
|
115
|
+
for (const match of matches) {
|
|
116
|
+
const result = buildDefinitionMatch(match, basePath, searchName, searchType, caseSensitive ?? true);
|
|
117
|
+
if (result)
|
|
118
|
+
results.push(result);
|
|
119
|
+
}
|
|
120
|
+
return results;
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=matchers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchers.js","sourceRoot":"","sources":["../../../../src/lib/file-operations/search-definitions/matchers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,WAAW,CAAC;AAIxC,MAAM,oBAAoB,GAAG,2CAA2C,CAAC;AAEzE,MAAM,kBAAkB,GAAwC;IAC9D,CAAC,aAAa,EAAE,OAAO,CAAC;IACxB,CAAC,iBAAiB,EAAE,WAAW,CAAC;IAChC,CAAC,mBAAmB,EAAE,MAAM,CAAC;IAC7B,CAAC,YAAY,EAAE,MAAM,CAAC;IACtB,CAAC,gBAAgB,EAAE,UAAU,CAAC;IAC9B,CAAC,oBAAoB,EAAE,UAAU,CAAC;CACnC,CAAC;AAEF,MAAM,eAAe,GAAmD;IACtE,CAAC,uCAAuC,EAAE,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC,2CAA2C,EAAE,CAAC,WAAW,CAAC,CAAC;IAC5D,CAAC,0CAA0C,EAAE,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC,sCAAsC,EAAE,CAAC,MAAM,CAAC,CAAC;IAClD,CAAC,0CAA0C,EAAE,CAAC,UAAU,CAAC,CAAC;IAC1D;QACE,mDAAmD;QACnD,CAAC,UAAU,EAAE,UAAU,CAAC;KACzB;CACF,CAAC;AAEF,SAAS,eAAe,CAAC,OAAe;IACtC,OAAO,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,oBAAoB,CAC3B,YAA4B,EAC5B,UAAsC,EACtC,OAAe;IAEf,IAAI,UAAU,KAAK,UAAU;QAAE,OAAO,YAAY,CAAC;IACnD,IAAI,YAAY,KAAK,UAAU;QAAE,OAAO,YAAY,CAAC;IACrD,OAAO,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC;AAC9D,CAAC;AAED,SAAS,WAAW,CAClB,IAAY,EACZ,UAA8B,EAC9B,aAAsB;IAEtB,IAAI,CAAC,UAAU;QAAE,OAAO,IAAI,CAAC;IAC7B,OAAO,aAAa;QAClB,CAAC,CAAC,IAAI,KAAK,UAAU;QACrB,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,UAAU,CAAC,WAAW,EAAE,CAAC;AACtD,CAAC;AAED,SAAS,WAAW,CAClB,UAAsC,EACtC,aAA6B;IAE7B,IAAI,CAAC,UAAU;QAAE,OAAO,IAAI,CAAC;IAC7B,OAAO,aAAa,KAAK,UAAU,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,SAAS,YAAY,CAAC,OAAe;IACnC,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC/B,KAAK,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,kBAAkB,EAAE,CAAC;QACjD,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;YAAE,OAAO,IAAI,CAAC;IACzC,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,SAAS,sBAAsB,CAC7B,UAA2B;IAE3B,IAAI,CAAC,UAAU;QAAE,OAAO,eAAe,CAAC;IACxC,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;AAC3E,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,OAAe,EAAE,UAA2B;IAC/D,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC/B,MAAM,UAAU,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;IACtD,KAAK,MAAM,CAAC,OAAO,CAAC,IAAI,UAAU,EAAE,CAAC;QACnC,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC;YAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,SAAS,UAAU,CAAC,OAAe;IACjC,OAAO,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,qBAAqB,CAC5B,OAAe,EACf,UAAmB,EACnB,UAA2B,EAC3B,aAAa,GAAG,IAAI;IAEpB,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,IAAI,GAAG,WAAW,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC9C,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IAEpC,MAAM,aAAa,GAAG,oBAAoB,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAE9E,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,aAAa,CAAC;QAAE,OAAO,IAAI,CAAC;IACzD,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,CAAC;QAAE,OAAO,IAAI,CAAC;IAE/D,OAAO;QACL,IAAI;QACJ,aAAa;QACb,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC;KAC9B,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAC3B,KAMC,EACD,QAAgB,EAChB,UAAmB,EACnB,UAA2B,EAC3B,aAAa,GAAG,IAAI;IAEpB,MAAM,IAAI,GAAG,qBAAqB,CAChC,KAAK,CAAC,OAAO,EACb,UAAU,EACV,UAAU,EACV,aAAa,CACd,CAAC;IACF,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvB,OAAO;QACL,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC;QAC/C,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,cAAc,EAAE,UAAU,IAAI,IAAI,CAAC,aAAa;QAChD,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,QAAQ,EAAE,IAAI,CAAC,QAAQ;KACxB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAC5B,OAMG,EACH,QAAgB,EAChB,UAAmB,EACnB,UAA2B,EAC3B,aAAuB;IAEvB,MAAM,OAAO,GAAsB,EAAE,CAAC;IAEtC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAG,oBAAoB,CACjC,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,EACV,aAAa,IAAI,IAAI,CACtB,CAAC;QACF,IAAI,MAAM;YAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SearchDefinitionsOptions } from '../../../config/types.js';
|
|
2
|
+
export declare function getMaxResults(options: SearchDefinitionsOptions): number;
|
|
3
|
+
export declare function buildCombinedPattern(options: SearchDefinitionsOptions): string;
|
|
4
|
+
export declare function buildSearchOptions(options: SearchDefinitionsOptions, maxResults: number): {
|
|
5
|
+
filePattern: string;
|
|
6
|
+
caseSensitive: boolean;
|
|
7
|
+
maxResults: number;
|
|
8
|
+
excludePatterns?: string[];
|
|
9
|
+
contextLines: number;
|
|
10
|
+
includeHidden: boolean;
|
|
11
|
+
isLiteral: false;
|
|
12
|
+
wholeWord: false;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=patterns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patterns.d.ts","sourceRoot":"","sources":["../../../../src/lib/file-operations/search-definitions/patterns.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,wBAAwB,EACzB,MAAM,0BAA0B,CAAC;AAmElC,wBAAgB,aAAa,CAAC,OAAO,EAAE,wBAAwB,GAAG,MAAM,CAEvE;AAOD,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,wBAAwB,GAChC,MAAM,CAKR;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,wBAAwB,EACjC,UAAU,EAAE,MAAM,GACjB;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,KAAK,CAAC;IACjB,SAAS,EAAE,KAAK,CAAC;CAClB,CAWA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript/JavaScript file extensions for definition search
|
|
3
|
+
*/
|
|
4
|
+
const TS_JS_FILE_PATTERN = '**/*.{ts,tsx,js,jsx,mts,cts,mjs,cjs}';
|
|
5
|
+
const SIMPLE_TYPE_PATTERNS = {
|
|
6
|
+
class: '\\bclass\\s+[A-Za-z_$]',
|
|
7
|
+
function: '\\bfunction\\s+[A-Za-z_$]',
|
|
8
|
+
interface: '\\binterface\\s+[A-Za-z_$]',
|
|
9
|
+
type: '\\btype\\s+[A-Za-z_$]',
|
|
10
|
+
enum: '\\benum\\s+[A-Za-z_$]',
|
|
11
|
+
variable: '\\b(?:const|let|var)\\s+[A-Za-z_$]',
|
|
12
|
+
};
|
|
13
|
+
const KEYWORD_BY_TYPE = {
|
|
14
|
+
class: 'class',
|
|
15
|
+
function: 'function',
|
|
16
|
+
interface: 'interface',
|
|
17
|
+
type: 'type',
|
|
18
|
+
enum: 'enum',
|
|
19
|
+
variable: '(?:const|let|var)',
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Escape special regex characters in a string
|
|
23
|
+
*/
|
|
24
|
+
function escapeRegex(value) {
|
|
25
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get simplified search patterns for definition types.
|
|
29
|
+
* These patterns are safe for regex engines and we filter results post-search.
|
|
30
|
+
*/
|
|
31
|
+
function getSimpleTypePattern(type) {
|
|
32
|
+
return SIMPLE_TYPE_PATTERNS[type];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Get the primary keyword for a definition type
|
|
36
|
+
*/
|
|
37
|
+
function getKeywordForType(type) {
|
|
38
|
+
return KEYWORD_BY_TYPE[type];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Build a safe search pattern based on name and/or type
|
|
42
|
+
*/
|
|
43
|
+
function buildPattern(name, type) {
|
|
44
|
+
if (name && type) {
|
|
45
|
+
const keyword = getKeywordForType(type);
|
|
46
|
+
return `\\b${keyword}\\s+${escapeRegex(name)}\\b`;
|
|
47
|
+
}
|
|
48
|
+
if (name) {
|
|
49
|
+
return `\\b(?:class|interface|type|function|enum|const|let|var)\\s+${escapeRegex(name)}\\b`;
|
|
50
|
+
}
|
|
51
|
+
if (type) {
|
|
52
|
+
return getSimpleTypePattern(type);
|
|
53
|
+
}
|
|
54
|
+
return '\\b(?:class|interface|type|function|enum|const|let|var)\\s+[A-Za-z_$]';
|
|
55
|
+
}
|
|
56
|
+
export function getMaxResults(options) {
|
|
57
|
+
return options.maxResults ?? 100;
|
|
58
|
+
}
|
|
59
|
+
function buildAdditionalPatterns(options) {
|
|
60
|
+
if (options.type !== 'function' || !options.name)
|
|
61
|
+
return [];
|
|
62
|
+
return [`\\b(?:const|let)\\s+${escapeRegex(options.name)}\\s*=`];
|
|
63
|
+
}
|
|
64
|
+
export function buildCombinedPattern(options) {
|
|
65
|
+
const pattern = buildPattern(options.name, options.type);
|
|
66
|
+
const additional = buildAdditionalPatterns(options);
|
|
67
|
+
if (additional.length === 0)
|
|
68
|
+
return pattern;
|
|
69
|
+
return `${pattern}|${additional.join('|')}`;
|
|
70
|
+
}
|
|
71
|
+
export function buildSearchOptions(options, maxResults) {
|
|
72
|
+
return {
|
|
73
|
+
filePattern: TS_JS_FILE_PATTERN,
|
|
74
|
+
caseSensitive: options.caseSensitive ?? true,
|
|
75
|
+
maxResults: maxResults * 3,
|
|
76
|
+
excludePatterns: options.excludePatterns,
|
|
77
|
+
contextLines: options.contextLines ?? 2,
|
|
78
|
+
includeHidden: options.includeHidden ?? false,
|
|
79
|
+
isLiteral: false,
|
|
80
|
+
wholeWord: false,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=patterns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patterns.js","sourceRoot":"","sources":["../../../../src/lib/file-operations/search-definitions/patterns.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,kBAAkB,GAAG,sCAAsC,CAAC;AAElE,MAAM,oBAAoB,GAA6C;IACrE,KAAK,EAAE,wBAAwB;IAC/B,QAAQ,EAAE,2BAA2B;IACrC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE,uBAAuB;IAC7B,QAAQ,EAAE,oCAAoC;CACtC,CAAC;AAEX,MAAM,eAAe,GAA6C;IAChE,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,mBAAmB;CACrB,CAAC;AAEX;;GAEG;AACH,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC;AAED;;;GAGG;AACH,SAAS,oBAAoB,CAAC,IAAoB;IAChD,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,IAAoB;IAC7C,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,SAAS,YAAY,CAAC,IAAa,EAAE,IAAqB;IACxD,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjB,MAAM,OAAO,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACxC,OAAO,MAAM,OAAO,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;IACpD,CAAC;IAED,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,8DAA8D,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;IAC9F,CAAC;IAED,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,uEAAuE,CAAC;AACjF,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,OAAiC;IAC7D,OAAO,OAAO,CAAC,UAAU,IAAI,GAAG,CAAC;AACnC,CAAC;AAED,SAAS,uBAAuB,CAAC,OAAiC;IAChE,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU,IAAI,CAAC,OAAO,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IAC5D,OAAO,CAAC,uBAAuB,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,OAAiC;IAEjC,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,MAAM,UAAU,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;IACpD,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC;IAC5C,OAAO,GAAG,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,OAAiC,EACjC,UAAkB;IAWlB,OAAO;QACL,WAAW,EAAE,kBAAkB;QAC/B,aAAa,EAAE,OAAO,CAAC,aAAa,IAAI,IAAI;QAC5C,UAAU,EAAE,UAAU,GAAG,CAAC;QAC1B,eAAe,EAAE,OAAO,CAAC,eAAe;QACxC,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,CAAC;QACvC,aAAa,EAAE,OAAO,CAAC,aAAa,IAAI,KAAK;QAC7C,SAAS,EAAE,KAAK;QAChB,SAAS,EAAE,KAAK;KACjB,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-definitions.d.ts","sourceRoot":"","sources":["../../../src/lib/file-operations/search-definitions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"search-definitions.d.ts","sourceRoot":"","sources":["../../../src/lib/file-operations/search-definitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAmC/B;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,uBAAuB,CAAC,CAyClC"}
|
|
@@ -1,168 +1,23 @@
|
|
|
1
|
-
import * as pathModule from 'node:path';
|
|
2
1
|
import { ErrorCode, McpError } from '../errors.js';
|
|
3
2
|
import { validateExistingDirectory } from '../path-validation.js';
|
|
3
|
+
import { processMatches } from './search-definitions/matchers.js';
|
|
4
|
+
import { buildCombinedPattern, buildSearchOptions, getMaxResults, } from './search-definitions/patterns.js';
|
|
4
5
|
import { executeSearch } from './search/engine.js';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// Use simple keyword patterns that are safe for regex
|
|
21
|
-
switch (type) {
|
|
22
|
-
case 'class':
|
|
23
|
-
return '\\bclass\\s+[A-Za-z_$]';
|
|
24
|
-
case 'function':
|
|
25
|
-
return '\\bfunction\\s+[A-Za-z_$]';
|
|
26
|
-
case 'interface':
|
|
27
|
-
return '\\binterface\\s+[A-Za-z_$]';
|
|
28
|
-
case 'type':
|
|
29
|
-
return '\\btype\\s+[A-Za-z_$]';
|
|
30
|
-
case 'enum':
|
|
31
|
-
return '\\benum\\s+[A-Za-z_$]';
|
|
32
|
-
case 'variable':
|
|
33
|
-
return '\\b(?:const|let|var)\\s+[A-Za-z_$]';
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Build a safe search pattern based on name and/or type
|
|
38
|
-
*/
|
|
39
|
-
function buildPattern(name, type) {
|
|
40
|
-
if (name && type) {
|
|
41
|
-
// Search for specific name with type hint - use simple keyword + name
|
|
42
|
-
const keyword = getKeywordForType(type);
|
|
43
|
-
return `\\b${keyword}\\s+${escapeRegex(name)}\\b`;
|
|
44
|
-
}
|
|
45
|
-
if (name) {
|
|
46
|
-
// Search for any definition with this name - simple approach
|
|
47
|
-
return `\\b(?:class|interface|type|function|enum|const|let|var)\\s+${escapeRegex(name)}\\b`;
|
|
48
|
-
}
|
|
49
|
-
// Discovery mode: find all definitions of the given type
|
|
50
|
-
if (type) {
|
|
51
|
-
return getSimpleTypePattern(type);
|
|
52
|
-
}
|
|
53
|
-
// Fallback
|
|
54
|
-
return '\\b(?:class|interface|type|function|enum|const|let|var)\\s+[A-Za-z_$]';
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Get the primary keyword for a definition type
|
|
58
|
-
*/
|
|
59
|
-
function getKeywordForType(type) {
|
|
60
|
-
switch (type) {
|
|
61
|
-
case 'class':
|
|
62
|
-
return 'class';
|
|
63
|
-
case 'function':
|
|
64
|
-
return 'function';
|
|
65
|
-
case 'interface':
|
|
66
|
-
return 'interface';
|
|
67
|
-
case 'type':
|
|
68
|
-
return 'type';
|
|
69
|
-
case 'enum':
|
|
70
|
-
return 'enum';
|
|
71
|
-
case 'variable':
|
|
72
|
-
return '(?:const|let|var)';
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Classify a line of code to determine the definition type
|
|
77
|
-
*/
|
|
78
|
-
function classifyLine(content) {
|
|
79
|
-
const trimmed = content.trim();
|
|
80
|
-
if (/\bclass\s+/u.test(trimmed))
|
|
81
|
-
return 'class';
|
|
82
|
-
if (/\binterface\s+/u.test(trimmed))
|
|
83
|
-
return 'interface';
|
|
84
|
-
if (/\btype\s+\w+\s*=/u.test(trimmed))
|
|
85
|
-
return 'type';
|
|
86
|
-
if (/\benum\s+/u.test(trimmed))
|
|
87
|
-
return 'enum';
|
|
88
|
-
if (/\bfunction\s+/u.test(trimmed) ||
|
|
89
|
-
/=\s*(?:async\s+)?(?:\([^)]*\)|[^=])\s*=>/u.test(trimmed)) {
|
|
90
|
-
return 'function';
|
|
91
|
-
}
|
|
92
|
-
return 'variable';
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Extract the definition name from a line of code
|
|
96
|
-
*/
|
|
97
|
-
function extractName(content, searchType) {
|
|
98
|
-
const trimmed = content.trim();
|
|
99
|
-
// Try specific patterns based on type
|
|
100
|
-
const patterns = [
|
|
101
|
-
[/\bclass\s+([A-Za-z_$][A-Za-z0-9_$]*)/u, ['class']],
|
|
102
|
-
[/\binterface\s+([A-Za-z_$][A-Za-z0-9_$]*)/u, ['interface']],
|
|
103
|
-
[/\btype\s+([A-Za-z_$][A-Za-z0-9_$]*)\s*=/u, ['type']],
|
|
104
|
-
[/\benum\s+([A-Za-z_$][A-Za-z0-9_$]*)/u, ['enum']],
|
|
105
|
-
[/\bfunction\s+([A-Za-z_$][A-Za-z0-9_$]*)/u, ['function']],
|
|
106
|
-
[
|
|
107
|
-
/\b(?:const|let|var)\s+([A-Za-z_$][A-Za-z0-9_$]*)/u,
|
|
108
|
-
['variable', 'function'],
|
|
109
|
-
],
|
|
110
|
-
];
|
|
111
|
-
for (const [pattern, types] of patterns) {
|
|
112
|
-
if (searchType && !types.includes(searchType))
|
|
113
|
-
continue;
|
|
114
|
-
const match = pattern.exec(trimmed);
|
|
115
|
-
if (match?.[1])
|
|
116
|
-
return match[1];
|
|
117
|
-
}
|
|
118
|
-
return 'unknown';
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Check if a definition is exported
|
|
122
|
-
*/
|
|
123
|
-
function isExported(content) {
|
|
124
|
-
return /\bexport\b/u.test(content);
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Filter and classify matches into definition results
|
|
128
|
-
*/
|
|
129
|
-
function processMatches(matches, basePath, searchName, searchType, caseSensitive) {
|
|
130
|
-
const results = [];
|
|
131
|
-
for (const match of matches) {
|
|
132
|
-
const detectedType = classifyLine(match.content);
|
|
133
|
-
const name = extractName(match.content, searchType);
|
|
134
|
-
// Skip if we can't extract a name
|
|
135
|
-
if (name === 'unknown')
|
|
136
|
-
continue;
|
|
137
|
-
// For function type, also accept arrow functions declared with const/let
|
|
138
|
-
const effectiveType = searchType === 'function' &&
|
|
139
|
-
detectedType === 'variable' &&
|
|
140
|
-
/=\s*(?:async\s+)?(?:\([^)]*\)|[^=])\s*=>/u.test(match.content)
|
|
141
|
-
? 'function'
|
|
142
|
-
: detectedType;
|
|
143
|
-
// Filter by type if specified
|
|
144
|
-
if (searchType && effectiveType !== searchType)
|
|
145
|
-
continue;
|
|
146
|
-
// Filter by name if specified
|
|
147
|
-
if (searchName) {
|
|
148
|
-
const nameMatches = caseSensitive
|
|
149
|
-
? name === searchName
|
|
150
|
-
: name.toLowerCase() === searchName.toLowerCase();
|
|
151
|
-
if (!nameMatches)
|
|
152
|
-
continue;
|
|
153
|
-
}
|
|
154
|
-
results.push({
|
|
155
|
-
file: pathModule.relative(basePath, match.file),
|
|
156
|
-
line: match.line,
|
|
157
|
-
definitionType: searchType ?? effectiveType,
|
|
158
|
-
name,
|
|
159
|
-
content: match.content,
|
|
160
|
-
contextBefore: match.contextBefore,
|
|
161
|
-
contextAfter: match.contextAfter,
|
|
162
|
-
exported: isExported(match.content),
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
return results;
|
|
6
|
+
function buildSearchResult(validPath, options, definitions, summary, maxResults) {
|
|
7
|
+
const limitedDefinitions = definitions.slice(0, maxResults);
|
|
8
|
+
const truncated = summary.truncated || definitions.length > maxResults;
|
|
9
|
+
return {
|
|
10
|
+
basePath: validPath,
|
|
11
|
+
searchName: options.name,
|
|
12
|
+
searchType: options.type,
|
|
13
|
+
definitions: limitedDefinitions,
|
|
14
|
+
summary: {
|
|
15
|
+
filesScanned: summary.filesScanned,
|
|
16
|
+
filesMatched: summary.filesMatched,
|
|
17
|
+
totalDefinitions: limitedDefinitions.length,
|
|
18
|
+
truncated,
|
|
19
|
+
},
|
|
20
|
+
};
|
|
166
21
|
}
|
|
167
22
|
/**
|
|
168
23
|
* Search for code definitions in TypeScript/JavaScript files
|
|
@@ -173,44 +28,15 @@ export async function searchDefinitions(options) {
|
|
|
173
28
|
throw new McpError(ErrorCode.E_INVALID_INPUT, 'Must provide either name or type (or both) to search for definitions', options.path);
|
|
174
29
|
}
|
|
175
30
|
const validPath = await validateExistingDirectory(options.path);
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
const
|
|
179
|
-
if (options.type === 'function' && options.name) {
|
|
180
|
-
// Also search for arrow function declarations
|
|
181
|
-
additionalPatterns.push(`\\b(?:const|let)\\s+${escapeRegex(options.name)}\\s*=`);
|
|
182
|
-
}
|
|
183
|
-
// Combine patterns if needed
|
|
184
|
-
const combinedPattern = additionalPatterns.length > 0
|
|
185
|
-
? `${pattern}|${additionalPatterns.join('|')}`
|
|
186
|
-
: pattern;
|
|
187
|
-
const searchResult = await executeSearch(validPath, combinedPattern, {
|
|
188
|
-
filePattern: TS_JS_FILE_PATTERN,
|
|
189
|
-
caseSensitive: options.caseSensitive ?? true,
|
|
190
|
-
maxResults: (options.maxResults ?? 100) * 3, // Get more results to filter
|
|
191
|
-
excludePatterns: options.excludePatterns,
|
|
192
|
-
contextLines: options.contextLines ?? 2,
|
|
193
|
-
includeHidden: options.includeHidden ?? false,
|
|
194
|
-
isLiteral: false,
|
|
195
|
-
wholeWord: false,
|
|
196
|
-
});
|
|
31
|
+
const combinedPattern = buildCombinedPattern(options);
|
|
32
|
+
const maxResults = getMaxResults(options);
|
|
33
|
+
const searchResult = await executeSearch(validPath, combinedPattern, buildSearchOptions(options, maxResults), options.signal);
|
|
197
34
|
// Process and filter matches
|
|
198
35
|
const definitions = processMatches(searchResult.matches, validPath, options.name, options.type, options.caseSensitive ?? true);
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
basePath: validPath,
|
|
205
|
-
searchName: options.name,
|
|
206
|
-
searchType: options.type,
|
|
207
|
-
definitions: limitedDefinitions,
|
|
208
|
-
summary: {
|
|
209
|
-
filesScanned: searchResult.summary.filesScanned,
|
|
210
|
-
filesMatched: searchResult.summary.filesMatched,
|
|
211
|
-
totalDefinitions: limitedDefinitions.length,
|
|
212
|
-
truncated,
|
|
213
|
-
},
|
|
214
|
-
};
|
|
36
|
+
return buildSearchResult(validPath, options, definitions, {
|
|
37
|
+
filesScanned: searchResult.summary.filesScanned,
|
|
38
|
+
filesMatched: searchResult.summary.filesMatched,
|
|
39
|
+
truncated: searchResult.summary.truncated,
|
|
40
|
+
}, maxResults);
|
|
215
41
|
}
|
|
216
42
|
//# sourceMappingURL=search-definitions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-definitions.js","sourceRoot":"","sources":["../../../src/lib/file-operations/search-definitions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"search-definitions.js","sourceRoot":"","sources":["../../../src/lib/file-operations/search-definitions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,GACd,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,SAAS,iBAAiB,CACxB,SAAiB,EACjB,OAAiC,EACjC,WAA8B,EAC9B,OAA2E,EAC3E,UAAkB;IAElB,MAAM,kBAAkB,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;IAC5D,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,WAAW,CAAC,MAAM,GAAG,UAAU,CAAC;IAEvE,OAAO;QACL,QAAQ,EAAE,SAAS;QACnB,UAAU,EAAE,OAAO,CAAC,IAAI;QACxB,UAAU,EAAE,OAAO,CAAC,IAAI;QACxB,WAAW,EAAE,kBAAkB;QAC/B,OAAO,EAAE;YACP,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,gBAAgB,EAAE,kBAAkB,CAAC,MAAM;YAC3C,SAAS;SACV;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAAiC;IAEjC,4CAA4C;IAC5C,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACnC,MAAM,IAAI,QAAQ,CAChB,SAAS,CAAC,eAAe,EACzB,sEAAsE,EACtE,OAAO,CAAC,IAAI,CACb,CAAC;IACJ,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,yBAAyB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,MAAM,eAAe,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACtD,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IAE1C,MAAM,YAAY,GAAG,MAAM,aAAa,CACtC,SAAS,EACT,eAAe,EACf,kBAAkB,CAAC,OAAO,EAAE,UAAU,CAAC,EACvC,OAAO,CAAC,MAAM,CACf,CAAC;IAEF,6BAA6B;IAC7B,MAAM,WAAW,GAAG,cAAc,CAChC,YAAY,CAAC,OAAO,EACpB,SAAS,EACT,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,aAAa,IAAI,IAAI,CAC9B,CAAC;IAEF,OAAO,iBAAiB,CACtB,SAAS,EACT,OAAO,EACP,WAAW,EACX;QACE,YAAY,EAAE,YAAY,CAAC,OAAO,CAAC,YAAY;QAC/C,YAAY,EAAE,YAAY,CAAC,OAAO,CAAC,YAAY;QAC/C,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,SAAS;KAC1C,EACD,UAAU,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -1,44 +1,20 @@
|
|
|
1
1
|
import type { SearchFilesResult, SearchResult } from '../../config/types.js';
|
|
2
|
-
|
|
2
|
+
import type { SearchFilesOptions } from './search-files-options.js';
|
|
3
|
+
interface SearchFilesState {
|
|
3
4
|
results: SearchResult[];
|
|
4
5
|
skippedInaccessible: number;
|
|
5
6
|
truncated: boolean;
|
|
6
7
|
filesScanned: number;
|
|
7
8
|
stoppedReason?: SearchFilesResult['summary']['stoppedReason'];
|
|
8
9
|
}
|
|
9
|
-
export interface SearchFilesOptions {
|
|
10
|
-
maxResults?: number;
|
|
11
|
-
sortBy?: 'name' | 'size' | 'modified' | 'path';
|
|
12
|
-
maxDepth?: number;
|
|
13
|
-
maxFilesScanned?: number;
|
|
14
|
-
timeoutMs?: number;
|
|
15
|
-
baseNameMatch?: boolean;
|
|
16
|
-
skipSymlinks?: boolean;
|
|
17
|
-
includeHidden?: boolean;
|
|
18
|
-
}
|
|
19
10
|
interface ScanStreamOptions {
|
|
20
11
|
deadlineMs?: number;
|
|
21
12
|
maxFilesScanned?: number;
|
|
22
13
|
maxResults: number;
|
|
23
14
|
}
|
|
24
15
|
export declare function initSearchFilesState(): SearchFilesState;
|
|
25
|
-
export declare function scanStream(stream: AsyncIterable<string | Buffer>, state: SearchFilesState, options: ScanStreamOptions): Promise<void>;
|
|
16
|
+
export declare function scanStream(stream: AsyncIterable<string | Buffer>, state: SearchFilesState, options: ScanStreamOptions, signal?: AbortSignal): Promise<void>;
|
|
26
17
|
export declare function createSearchStream(basePath: string, pattern: string, excludePatterns: string[], maxDepth: number | undefined, baseNameMatch?: boolean, skipSymlinks?: boolean, includeHidden?: boolean): AsyncIterable<string | Buffer>;
|
|
27
|
-
export declare function normalizeSearchFilesOptions(options: SearchFilesOptions): {
|
|
28
|
-
effectiveMaxResults: number;
|
|
29
|
-
sortBy: 'name' | 'size' | 'modified' | 'path';
|
|
30
|
-
maxDepth?: number;
|
|
31
|
-
maxFilesScanned: number;
|
|
32
|
-
deadlineMs?: number;
|
|
33
|
-
baseNameMatch: boolean;
|
|
34
|
-
skipSymlinks: boolean;
|
|
35
|
-
includeHidden: boolean;
|
|
36
|
-
};
|
|
37
18
|
export declare function buildSearchFilesResult(basePath: string, pattern: string, state: SearchFilesState, sortBy: SearchFilesOptions['sortBy']): SearchFilesResult;
|
|
38
|
-
export declare function buildScanOptions(normalized: {
|
|
39
|
-
deadlineMs?: number;
|
|
40
|
-
maxFilesScanned: number;
|
|
41
|
-
effectiveMaxResults: number;
|
|
42
|
-
}): ScanStreamOptions;
|
|
43
19
|
export {};
|
|
44
20
|
//# sourceMappingURL=search-files-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-files-helpers.d.ts","sourceRoot":"","sources":["../../../src/lib/file-operations/search-files-helpers.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"search-files-helpers.d.ts","sourceRoot":"","sources":["../../../src/lib/file-operations/search-files-helpers.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAGpE,UAAU,gBAAgB;IACxB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CAAC;CAC/D;AAED,UAAU,iBAAiB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAID,wBAAgB,oBAAoB,IAAI,gBAAgB,CAQvD;AAiJD,wBAAsB,UAAU,CAC9B,MAAM,EAAE,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,EACtC,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,iBAAiB,EAC1B,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,IAAI,CAAC,CAaf;AAsBD,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,MAAM,EAAE,EACzB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,aAAa,UAAQ,EACrB,YAAY,UAAO,EACnB,aAAa,UAAQ,GACpB,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,CAYhC;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,gBAAgB,EACvB,MAAM,EAAE,kBAAkB,CAAC,QAAQ,CAAC,GACnC,iBAAiB,CAcnB"}
|