@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
|
@@ -1,290 +1,163 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as os from 'node:os';
|
|
3
|
-
import * as path from 'node:path';
|
|
4
|
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
|
|
1
|
+
import { afterAll, beforeAll, expect, it } from 'vitest';
|
|
5
2
|
import { searchDefinitions } from '../../../lib/file-operations/search-definitions.js';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return (...args: Parameters<T>) => {
|
|
73
|
-
clearTimeout(timeoutId);
|
|
74
|
-
timeoutId = setTimeout(() => fn(...args), delay);
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export interface DateOptions {
|
|
79
|
-
locale?: string;
|
|
80
|
-
timezone?: string;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export type DateFormatter = (date: Date, options?: DateOptions) => string;
|
|
84
|
-
`);
|
|
85
|
-
await fs.writeFile(path.join(testDir, 'src', 'types', 'index.ts'), `export interface ApiResponse<T> {
|
|
86
|
-
data: T;
|
|
87
|
-
status: number;
|
|
88
|
-
message?: string;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export type ApiError = {
|
|
92
|
-
code: string;
|
|
93
|
-
message: string;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
97
|
-
|
|
98
|
-
export const enum HttpStatus {
|
|
99
|
-
OK = 200,
|
|
100
|
-
Created = 201,
|
|
101
|
-
BadRequest = 400,
|
|
102
|
-
NotFound = 404,
|
|
103
|
-
}
|
|
104
|
-
`);
|
|
3
|
+
import { createFixtureDirectory, removeFixture, writeFixtureFiles, } from './search-definitions.fixtures.js';
|
|
4
|
+
let testDir = '';
|
|
5
|
+
beforeAll(async () => {
|
|
6
|
+
testDir = await createFixtureDirectory();
|
|
7
|
+
await writeFixtureFiles(testDir);
|
|
8
|
+
});
|
|
9
|
+
afterAll(async () => {
|
|
10
|
+
await removeFixture(testDir);
|
|
11
|
+
});
|
|
12
|
+
it('finds a class by name', async () => {
|
|
13
|
+
const result = await searchDefinitions({
|
|
14
|
+
path: testDir,
|
|
15
|
+
name: 'UserService',
|
|
16
|
+
type: 'class',
|
|
17
|
+
});
|
|
18
|
+
expect(result.definitions).toHaveLength(1);
|
|
19
|
+
expect(result.definitions[0]).toMatchObject({
|
|
20
|
+
name: 'UserService',
|
|
21
|
+
definitionType: 'class',
|
|
22
|
+
exported: true,
|
|
23
|
+
});
|
|
24
|
+
expect(result.definitions[0]?.file).toContain('user-service.ts');
|
|
25
|
+
});
|
|
26
|
+
it('finds a function by name', async () => {
|
|
27
|
+
const result = await searchDefinitions({
|
|
28
|
+
path: testDir,
|
|
29
|
+
name: 'createUser',
|
|
30
|
+
});
|
|
31
|
+
const createUserDef = result.definitions.find((d) => d.name === 'createUser');
|
|
32
|
+
expect(createUserDef).toBeDefined();
|
|
33
|
+
expect(createUserDef?.definitionType).toBe('function');
|
|
34
|
+
expect(createUserDef?.exported).toBe(true);
|
|
35
|
+
});
|
|
36
|
+
it('finds an interface by name', async () => {
|
|
37
|
+
const result = await searchDefinitions({
|
|
38
|
+
path: testDir,
|
|
39
|
+
name: 'User',
|
|
40
|
+
type: 'interface',
|
|
41
|
+
});
|
|
42
|
+
const match = result.definitions.find((d) => d.name === 'User' && d.definitionType === 'interface');
|
|
43
|
+
expect(match).toBeDefined();
|
|
44
|
+
});
|
|
45
|
+
it('finds a type alias by name', async () => {
|
|
46
|
+
const result = await searchDefinitions({
|
|
47
|
+
path: testDir,
|
|
48
|
+
name: 'UserId',
|
|
49
|
+
type: 'type',
|
|
50
|
+
});
|
|
51
|
+
expect(result.definitions).toHaveLength(1);
|
|
52
|
+
expect(result.definitions[0]).toMatchObject({
|
|
53
|
+
name: 'UserId',
|
|
54
|
+
definitionType: 'type',
|
|
55
|
+
exported: true,
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
it('finds an enum by name', async () => {
|
|
59
|
+
const result = await searchDefinitions({
|
|
60
|
+
path: testDir,
|
|
61
|
+
name: 'UserRole',
|
|
62
|
+
type: 'enum',
|
|
63
|
+
});
|
|
64
|
+
expect(result.definitions).toHaveLength(1);
|
|
65
|
+
expect(result.definitions[0]).toMatchObject({
|
|
66
|
+
name: 'UserRole',
|
|
67
|
+
definitionType: 'enum',
|
|
68
|
+
exported: true,
|
|
105
69
|
});
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
catch {
|
|
112
|
-
// Ignore cleanup errors
|
|
113
|
-
}
|
|
70
|
+
});
|
|
71
|
+
it('finds all classes when searching by type', async () => {
|
|
72
|
+
const result = await searchDefinitions({
|
|
73
|
+
path: testDir,
|
|
74
|
+
type: 'class',
|
|
114
75
|
});
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
expect(result.definitions).toHaveLength(1);
|
|
123
|
-
expect(result.definitions[0]).toMatchObject({
|
|
124
|
-
name: 'UserService',
|
|
125
|
-
definitionType: 'class',
|
|
126
|
-
exported: true,
|
|
127
|
-
});
|
|
128
|
-
expect(result.definitions[0]?.file).toContain('user-service.ts');
|
|
129
|
-
});
|
|
130
|
-
it('should find a function by name', async () => {
|
|
131
|
-
const result = await searchDefinitions({
|
|
132
|
-
path: testDir,
|
|
133
|
-
name: 'createUser',
|
|
134
|
-
});
|
|
135
|
-
expect(result.definitions.length).toBeGreaterThanOrEqual(1);
|
|
136
|
-
const createUserDef = result.definitions.find((d) => d.name === 'createUser');
|
|
137
|
-
expect(createUserDef).toBeDefined();
|
|
138
|
-
expect(createUserDef?.definitionType).toBe('function');
|
|
139
|
-
expect(createUserDef?.exported).toBe(true);
|
|
140
|
-
});
|
|
141
|
-
it('should find an interface by name', async () => {
|
|
142
|
-
const result = await searchDefinitions({
|
|
143
|
-
path: testDir,
|
|
144
|
-
name: 'User',
|
|
145
|
-
type: 'interface',
|
|
146
|
-
});
|
|
147
|
-
expect(result.definitions.length).toBeGreaterThanOrEqual(1);
|
|
148
|
-
const userInterface = result.definitions.find((d) => d.name === 'User' && d.definitionType === 'interface');
|
|
149
|
-
expect(userInterface).toBeDefined();
|
|
150
|
-
});
|
|
151
|
-
it('should find a type alias by name', async () => {
|
|
152
|
-
const result = await searchDefinitions({
|
|
153
|
-
path: testDir,
|
|
154
|
-
name: 'UserId',
|
|
155
|
-
type: 'type',
|
|
156
|
-
});
|
|
157
|
-
expect(result.definitions).toHaveLength(1);
|
|
158
|
-
expect(result.definitions[0]).toMatchObject({
|
|
159
|
-
name: 'UserId',
|
|
160
|
-
definitionType: 'type',
|
|
161
|
-
exported: true,
|
|
162
|
-
});
|
|
163
|
-
});
|
|
164
|
-
it('should find an enum by name', async () => {
|
|
165
|
-
const result = await searchDefinitions({
|
|
166
|
-
path: testDir,
|
|
167
|
-
name: 'UserRole',
|
|
168
|
-
type: 'enum',
|
|
169
|
-
});
|
|
170
|
-
expect(result.definitions).toHaveLength(1);
|
|
171
|
-
expect(result.definitions[0]).toMatchObject({
|
|
172
|
-
name: 'UserRole',
|
|
173
|
-
definitionType: 'enum',
|
|
174
|
-
exported: true,
|
|
175
|
-
});
|
|
176
|
-
});
|
|
76
|
+
expect(result.definitions.length).toBeGreaterThanOrEqual(1);
|
|
77
|
+
expect(result.definitions.every((d) => d.definitionType === 'class')).toBe(true);
|
|
78
|
+
});
|
|
79
|
+
it('finds all interfaces when searching by type', async () => {
|
|
80
|
+
const result = await searchDefinitions({
|
|
81
|
+
path: testDir,
|
|
82
|
+
type: 'interface',
|
|
177
83
|
});
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
it('should find all interfaces', async () => {
|
|
188
|
-
const result = await searchDefinitions({
|
|
189
|
-
path: testDir,
|
|
190
|
-
type: 'interface',
|
|
191
|
-
});
|
|
192
|
-
expect(result.definitions.length).toBeGreaterThanOrEqual(3);
|
|
193
|
-
const names = result.definitions.map((d) => d.name);
|
|
194
|
-
expect(names).toContain('User');
|
|
195
|
-
expect(names).toContain('DateOptions');
|
|
196
|
-
expect(names).toContain('ApiResponse');
|
|
197
|
-
});
|
|
198
|
-
it('should find all type aliases', async () => {
|
|
199
|
-
const result = await searchDefinitions({
|
|
200
|
-
path: testDir,
|
|
201
|
-
type: 'type',
|
|
202
|
-
});
|
|
203
|
-
expect(result.definitions.length).toBeGreaterThanOrEqual(3);
|
|
204
|
-
const names = result.definitions.map((d) => d.name);
|
|
205
|
-
expect(names).toContain('UserId');
|
|
206
|
-
expect(names).toContain('DateFormatter');
|
|
207
|
-
expect(names).toContain('ApiError');
|
|
208
|
-
});
|
|
209
|
-
it('should find all enums', async () => {
|
|
210
|
-
const result = await searchDefinitions({
|
|
211
|
-
path: testDir,
|
|
212
|
-
type: 'enum',
|
|
213
|
-
});
|
|
214
|
-
expect(result.definitions.length).toBeGreaterThanOrEqual(2);
|
|
215
|
-
const names = result.definitions.map((d) => d.name);
|
|
216
|
-
expect(names).toContain('UserRole');
|
|
217
|
-
expect(names).toContain('HttpStatus');
|
|
218
|
-
});
|
|
84
|
+
const names = result.definitions.map((d) => d.name);
|
|
85
|
+
expect(names).toContain('User');
|
|
86
|
+
expect(names).toContain('DateOptions');
|
|
87
|
+
expect(names).toContain('ApiResponse');
|
|
88
|
+
});
|
|
89
|
+
it('finds all type aliases when searching by type', async () => {
|
|
90
|
+
const result = await searchDefinitions({
|
|
91
|
+
path: testDir,
|
|
92
|
+
type: 'type',
|
|
219
93
|
});
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
expect(result.definitions[0]?.contextBefore).toBeDefined();
|
|
230
|
-
expect(result.definitions[0]?.contextAfter).toBeDefined();
|
|
231
|
-
});
|
|
232
|
-
it('should respect maxResults limit', async () => {
|
|
233
|
-
const result = await searchDefinitions({
|
|
234
|
-
path: testDir,
|
|
235
|
-
type: 'interface',
|
|
236
|
-
maxResults: 2,
|
|
237
|
-
});
|
|
238
|
-
expect(result.definitions.length).toBeLessThanOrEqual(2);
|
|
239
|
-
});
|
|
240
|
-
it('should detect exported vs non-exported definitions', async () => {
|
|
241
|
-
// Search for functions - will include both regular functions and arrow functions
|
|
242
|
-
const result = await searchDefinitions({
|
|
243
|
-
path: testDir,
|
|
244
|
-
type: 'function',
|
|
245
|
-
});
|
|
246
|
-
const exported = result.definitions.filter((d) => d.exported);
|
|
247
|
-
const nonExported = result.definitions.filter((d) => !d.exported);
|
|
248
|
-
// Should have exported functions like createUser, formatDate
|
|
249
|
-
expect(exported.length).toBeGreaterThan(0);
|
|
250
|
-
// Note: internalHelper is an arrow function, so it may or may not be found
|
|
251
|
-
// depending on the search pattern. The key test is that exported/non-exported
|
|
252
|
-
// detection works for definitions that are found.
|
|
253
|
-
if (nonExported.length > 0) {
|
|
254
|
-
expect(nonExported[0]?.exported).toBe(false);
|
|
255
|
-
}
|
|
256
|
-
if (exported.length > 0) {
|
|
257
|
-
expect(exported[0]?.exported).toBe(true);
|
|
258
|
-
}
|
|
259
|
-
});
|
|
94
|
+
const names = result.definitions.map((d) => d.name);
|
|
95
|
+
expect(names).toContain('UserId');
|
|
96
|
+
expect(names).toContain('DateFormatter');
|
|
97
|
+
expect(names).toContain('ApiError');
|
|
98
|
+
});
|
|
99
|
+
it('finds all enums when searching by type', async () => {
|
|
100
|
+
const result = await searchDefinitions({
|
|
101
|
+
path: testDir,
|
|
102
|
+
type: 'enum',
|
|
260
103
|
});
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
104
|
+
const names = result.definitions.map((d) => d.name);
|
|
105
|
+
expect(names).toContain('UserRole');
|
|
106
|
+
expect(names).toContain('HttpStatus');
|
|
107
|
+
});
|
|
108
|
+
it('includes context lines when requested', async () => {
|
|
109
|
+
const result = await searchDefinitions({
|
|
110
|
+
path: testDir,
|
|
111
|
+
name: 'UserService',
|
|
112
|
+
type: 'class',
|
|
113
|
+
contextLines: 2,
|
|
114
|
+
});
|
|
115
|
+
expect(result.definitions).toHaveLength(1);
|
|
116
|
+
expect(result.definitions[0]?.contextBefore).toBeDefined();
|
|
117
|
+
expect(result.definitions[0]?.contextAfter).toBeDefined();
|
|
118
|
+
});
|
|
119
|
+
it('respects maxResults', async () => {
|
|
120
|
+
const result = await searchDefinitions({
|
|
121
|
+
path: testDir,
|
|
122
|
+
type: 'interface',
|
|
123
|
+
maxResults: 2,
|
|
276
124
|
});
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
125
|
+
expect(result.definitions.length).toBeLessThanOrEqual(2);
|
|
126
|
+
});
|
|
127
|
+
it('detects exported vs non-exported definitions', async () => {
|
|
128
|
+
const result = await searchDefinitions({
|
|
129
|
+
path: testDir,
|
|
130
|
+
type: 'function',
|
|
131
|
+
});
|
|
132
|
+
const exported = result.definitions.filter((d) => d.exported);
|
|
133
|
+
const nonExported = result.definitions.filter((d) => !d.exported);
|
|
134
|
+
expect(exported.length).toBeGreaterThan(0);
|
|
135
|
+
if (nonExported.length > 0) {
|
|
136
|
+
expect(nonExported[0]?.exported).toBe(false);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
it('throws when neither name nor type is provided', async () => {
|
|
140
|
+
await expect(searchDefinitions({
|
|
141
|
+
path: testDir,
|
|
142
|
+
})).rejects.toThrow(/name or type/i);
|
|
143
|
+
});
|
|
144
|
+
it('returns empty results for non-existent symbol', async () => {
|
|
145
|
+
const result = await searchDefinitions({
|
|
146
|
+
path: testDir,
|
|
147
|
+
name: 'NonExistentClass',
|
|
148
|
+
type: 'class',
|
|
149
|
+
});
|
|
150
|
+
expect(result.definitions).toHaveLength(0);
|
|
151
|
+
expect(result.summary.totalDefinitions).toBe(0);
|
|
152
|
+
});
|
|
153
|
+
it('includes summary statistics', async () => {
|
|
154
|
+
const result = await searchDefinitions({
|
|
155
|
+
path: testDir,
|
|
156
|
+
type: 'interface',
|
|
288
157
|
});
|
|
158
|
+
expect(result.summary.filesScanned).toBeGreaterThan(0);
|
|
159
|
+
expect(result.summary.filesMatched).toBeGreaterThan(0);
|
|
160
|
+
expect(result.summary.totalDefinitions).toBe(result.definitions.length);
|
|
161
|
+
expect(typeof result.summary.truncated).toBe('boolean');
|
|
289
162
|
});
|
|
290
163
|
//# sourceMappingURL=search-definitions.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-definitions.test.js","sourceRoot":"","sources":["../../../../src/__tests__/lib/file-operations/search-definitions.test.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"search-definitions.test.js","sourceRoot":"","sources":["../../../../src/__tests__/lib/file-operations/search-definitions.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,iBAAiB,GAClB,MAAM,kCAAkC,CAAC;AAE1C,IAAI,OAAO,GAAG,EAAE,CAAC;AAEjB,SAAS,CAAC,KAAK,IAAI,EAAE;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C,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,+CAA+C,EAAE,KAAK,IAAI,EAAE;IAC7D,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC;QACrC,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,OAAO;KACd,CAAC,CAAC;IAEH,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAC3C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClD,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,6BAA6B,EAAE,KAAK,IAAI,EAAE;IAC3C,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC;QACrC,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,WAAW;KAClB,CAAC,CAAC;IAEH,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IACvD,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IACvD,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACxE,MAAM,CAAC,OAAO,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC1D,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sorting.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/lib/file-operations/sorting.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { expect, it } from 'vitest';
|
|
2
|
+
import { sortByField, sortSearchResults, } from '../../../lib/file-operations/sorting.js';
|
|
3
|
+
it('sortByField uses path as a deterministic tie-breaker for name sort', () => {
|
|
4
|
+
const items = [
|
|
5
|
+
{ name: 'file.txt', path: '/b/file.txt' },
|
|
6
|
+
{ name: 'file.txt', path: '/a/file.txt' },
|
|
7
|
+
];
|
|
8
|
+
sortByField(items, 'name');
|
|
9
|
+
expect(items.map((item) => item.path)).toEqual([
|
|
10
|
+
'/a/file.txt',
|
|
11
|
+
'/b/file.txt',
|
|
12
|
+
]);
|
|
13
|
+
});
|
|
14
|
+
it('sortSearchResults uses path as a deterministic tie-breaker for name sort', () => {
|
|
15
|
+
const results = [{ path: '/b/file.txt' }, { path: '/a/file.txt' }];
|
|
16
|
+
sortSearchResults(results, 'name');
|
|
17
|
+
expect(results.map((item) => item.path)).toEqual([
|
|
18
|
+
'/a/file.txt',
|
|
19
|
+
'/b/file.txt',
|
|
20
|
+
]);
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=sorting.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sorting.test.js","sourceRoot":"","sources":["../../../../src/__tests__/lib/file-operations/sorting.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EACL,WAAW,EACX,iBAAiB,GAClB,MAAM,yCAAyC,CAAC;AAEjD,EAAE,CAAC,oEAAoE,EAAE,GAAG,EAAE;IAC5E,MAAM,KAAK,GAAG;QACZ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE;QACzC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE;KAC1C,CAAC;IAEF,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAE3B,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;QAC7C,aAAa;QACb,aAAa;KACd,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,0EAA0E,EAAE,GAAG,EAAE;IAClF,MAAM,OAAO,GAAG,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC;IAEnE,iBAAiB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAEnC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;QAC/C,aAAa;QACb,aAAa;KACd,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utf8.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/lib/fs-helpers/utf8.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as fs from 'node:fs/promises';
|
|
2
|
+
import * as os from 'node:os';
|
|
3
|
+
import * as path from 'node:path';
|
|
4
|
+
import { afterAll, beforeAll, expect, it } from 'vitest';
|
|
5
|
+
import { findUTF8Boundary } from '../../../lib/fs-helpers/readers/utf8.js';
|
|
6
|
+
const EURO_CHAR = '\u20AC';
|
|
7
|
+
const HAN_CHAR = '\u4E2D';
|
|
8
|
+
const CONTENT = `A${EURO_CHAR}B${HAN_CHAR}C`;
|
|
9
|
+
let tempDir = '';
|
|
10
|
+
let filePath = '';
|
|
11
|
+
let handle = null;
|
|
12
|
+
beforeAll(async () => {
|
|
13
|
+
tempDir = await fs.mkdtemp(path.join(os.tmpdir(), 'mcp-utf8-'));
|
|
14
|
+
filePath = path.join(tempDir, 'utf8.txt');
|
|
15
|
+
await fs.writeFile(filePath, CONTENT, 'utf-8');
|
|
16
|
+
handle = await fs.open(filePath, 'r');
|
|
17
|
+
});
|
|
18
|
+
afterAll(async () => {
|
|
19
|
+
await handle?.close().catch(() => { });
|
|
20
|
+
await fs.rm(tempDir, { recursive: true, force: true });
|
|
21
|
+
});
|
|
22
|
+
it('returns 0 for non-positive positions', async () => {
|
|
23
|
+
if (!handle)
|
|
24
|
+
throw new Error('Missing file handle');
|
|
25
|
+
expect(await findUTF8Boundary(handle, 0)).toBe(0);
|
|
26
|
+
});
|
|
27
|
+
it('aligns to the start of a multibyte sequence', async () => {
|
|
28
|
+
if (!handle)
|
|
29
|
+
throw new Error('Missing file handle');
|
|
30
|
+
const buffer = Buffer.from(CONTENT, 'utf8');
|
|
31
|
+
const euroStart = buffer.indexOf(Buffer.from(EURO_CHAR));
|
|
32
|
+
const insideEuro = euroStart + 1;
|
|
33
|
+
expect(await findUTF8Boundary(handle, insideEuro)).toBe(euroStart);
|
|
34
|
+
});
|
|
35
|
+
it('returns the previous boundary when positioned at a later character', async () => {
|
|
36
|
+
if (!handle)
|
|
37
|
+
throw new Error('Missing file handle');
|
|
38
|
+
const buffer = Buffer.from(CONTENT, 'utf8');
|
|
39
|
+
const asciiPos = buffer.indexOf(Buffer.from('B'));
|
|
40
|
+
const euroStart = buffer.indexOf(Buffer.from(EURO_CHAR));
|
|
41
|
+
expect(await findUTF8Boundary(handle, asciiPos)).toBe(euroStart);
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=utf8.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utf8.test.js","sourceRoot":"","sources":["../../../../src/__tests__/lib/fs-helpers/utf8.test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EA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AC,6CAA6C,EAAE,KAAK,IAAI,EAAE;IAC3D,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IACzD,MAAM,UAAU,GAAG,SAAS,GAAG,CAAC,CAAC;IAEjC,MAAM,CAAC,MAAM,gBAAgB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACrE,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,oEAAoE,EAAE,KAAK,IAAI,EAAE;IAClF,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC5C,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAEzD,MAAM,CAAC,MAAM,gBAAgB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACnE,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-validation-errors.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/lib/path-validation-errors.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as os from 'node:os';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { afterEach, expect, it } from 'vitest';
|
|
4
|
+
import { ErrorCode } from '../../lib/errors.js';
|
|
5
|
+
import { normalizePath } from '../../lib/path-utils.js';
|
|
6
|
+
import { setAllowedDirectories } from '../../lib/path-validation.js';
|
|
7
|
+
import { toAccessDeniedWithHint, toMcpError, } from '../../lib/path-validation/errors.js';
|
|
8
|
+
afterEach(() => {
|
|
9
|
+
setAllowedDirectories([]);
|
|
10
|
+
});
|
|
11
|
+
it('toMcpError maps known Node error codes', () => {
|
|
12
|
+
const error = Object.assign(new Error('Missing'), { code: 'ENOENT' });
|
|
13
|
+
const result = toMcpError('/missing', error);
|
|
14
|
+
expect(result.code).toBe(ErrorCode.E_NOT_FOUND);
|
|
15
|
+
expect(result.message).toContain('/missing');
|
|
16
|
+
expect(result.details?.originalCode).toBe('ENOENT');
|
|
17
|
+
});
|
|
18
|
+
it('toMcpError falls back for unknown codes', () => {
|
|
19
|
+
const error = Object.assign(new Error('Boom'), { code: 'EUNKNOWN' });
|
|
20
|
+
const result = toMcpError('/path', error);
|
|
21
|
+
expect(result.code).toBe(ErrorCode.E_NOT_FOUND);
|
|
22
|
+
expect(result.details?.originalCode).toBe('EUNKNOWN');
|
|
23
|
+
expect(result.details?.originalMessage).toBe('Boom');
|
|
24
|
+
});
|
|
25
|
+
it('toAccessDeniedWithHint includes allowed directories', () => {
|
|
26
|
+
const allowed = normalizePath(path.join(os.tmpdir(), 'allowed'));
|
|
27
|
+
setAllowedDirectories([allowed]);
|
|
28
|
+
const result = toAccessDeniedWithHint('/requested', '/resolved', allowed);
|
|
29
|
+
expect(result.code).toBe(ErrorCode.E_ACCESS_DENIED);
|
|
30
|
+
expect(result.message).toContain('Allowed:');
|
|
31
|
+
expect(result.message).toContain(allowed);
|
|
32
|
+
expect(result.details?.resolvedPath).toBe('/resolved');
|
|
33
|
+
expect(result.details?.normalizedResolvedPath).toBe(allowed);
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=path-validation-errors.test.js.map
|
|
@@ -0,0 +1 @@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