@selvakumaresra/specship 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -7
- package/scripts/sync-shim-version.mjs +64 -0
- package/dist/bin/node-version-check.d.ts +0 -37
- package/dist/bin/node-version-check.d.ts.map +0 -1
- package/dist/bin/node-version-check.js +0 -79
- package/dist/bin/node-version-check.js.map +0 -1
- package/dist/bin/specship.d.ts +0 -25
- package/dist/bin/specship.d.ts.map +0 -1
- package/dist/bin/specship.js +0 -2018
- package/dist/bin/specship.js.map +0 -1
- package/dist/bin/uninstall.d.ts +0 -13
- package/dist/bin/uninstall.d.ts.map +0 -1
- package/dist/bin/uninstall.js +0 -35
- package/dist/bin/uninstall.js.map +0 -1
- package/dist/context/formatter.d.ts +0 -30
- package/dist/context/formatter.d.ts.map +0 -1
- package/dist/context/formatter.js +0 -263
- package/dist/context/formatter.js.map +0 -1
- package/dist/context/index.d.ts +0 -119
- package/dist/context/index.d.ts.map +0 -1
- package/dist/context/index.js +0 -1289
- package/dist/context/index.js.map +0 -1
- package/dist/context/markers.d.ts +0 -19
- package/dist/context/markers.d.ts.map +0 -1
- package/dist/context/markers.js +0 -22
- package/dist/context/markers.js.map +0 -1
- package/dist/db/index.d.ts +0 -101
- package/dist/db/index.d.ts.map +0 -1
- package/dist/db/index.js +0 -276
- package/dist/db/index.js.map +0 -1
- package/dist/db/migrations.d.ts +0 -44
- package/dist/db/migrations.d.ts.map +0 -1
- package/dist/db/migrations.js +0 -427
- package/dist/db/migrations.js.map +0 -1
- package/dist/db/queries.d.ts +0 -357
- package/dist/db/queries.d.ts.map +0 -1
- package/dist/db/queries.js +0 -1504
- package/dist/db/queries.js.map +0 -1
- package/dist/db/schema.sql +0 -410
- package/dist/db/spec-queries.d.ts +0 -101
- package/dist/db/spec-queries.d.ts.map +0 -1
- package/dist/db/spec-queries.js +0 -675
- package/dist/db/spec-queries.js.map +0 -1
- package/dist/db/sqlite-adapter.d.ts +0 -65
- package/dist/db/sqlite-adapter.d.ts.map +0 -1
- package/dist/db/sqlite-adapter.js +0 -214
- package/dist/db/sqlite-adapter.js.map +0 -1
- package/dist/directory.d.ts +0 -57
- package/dist/directory.d.ts.map +0 -1
- package/dist/directory.js +0 -253
- package/dist/directory.js.map +0 -1
- package/dist/errors.d.ts +0 -136
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -219
- package/dist/errors.js.map +0 -1
- package/dist/extraction/dfm-extractor.d.ts +0 -31
- package/dist/extraction/dfm-extractor.d.ts.map +0 -1
- package/dist/extraction/dfm-extractor.js +0 -151
- package/dist/extraction/dfm-extractor.js.map +0 -1
- package/dist/extraction/generated-detection.d.ts +0 -30
- package/dist/extraction/generated-detection.d.ts.map +0 -1
- package/dist/extraction/generated-detection.js +0 -80
- package/dist/extraction/generated-detection.js.map +0 -1
- package/dist/extraction/grammars.d.ts +0 -100
- package/dist/extraction/grammars.d.ts.map +0 -1
- package/dist/extraction/grammars.js +0 -426
- package/dist/extraction/grammars.js.map +0 -1
- package/dist/extraction/index.d.ts +0 -138
- package/dist/extraction/index.d.ts.map +0 -1
- package/dist/extraction/index.js +0 -1394
- package/dist/extraction/index.js.map +0 -1
- package/dist/extraction/languages/c-cpp.d.ts +0 -4
- package/dist/extraction/languages/c-cpp.d.ts.map +0 -1
- package/dist/extraction/languages/c-cpp.js +0 -171
- package/dist/extraction/languages/c-cpp.js.map +0 -1
- package/dist/extraction/languages/csharp.d.ts +0 -3
- package/dist/extraction/languages/csharp.d.ts.map +0 -1
- package/dist/extraction/languages/csharp.js +0 -73
- package/dist/extraction/languages/csharp.js.map +0 -1
- package/dist/extraction/languages/dart.d.ts +0 -3
- package/dist/extraction/languages/dart.d.ts.map +0 -1
- package/dist/extraction/languages/dart.js +0 -192
- package/dist/extraction/languages/dart.js.map +0 -1
- package/dist/extraction/languages/go.d.ts +0 -3
- package/dist/extraction/languages/go.d.ts.map +0 -1
- package/dist/extraction/languages/go.js +0 -74
- package/dist/extraction/languages/go.js.map +0 -1
- package/dist/extraction/languages/index.d.ts +0 -10
- package/dist/extraction/languages/index.d.ts.map +0 -1
- package/dist/extraction/languages/index.js +0 -51
- package/dist/extraction/languages/index.js.map +0 -1
- package/dist/extraction/languages/java.d.ts +0 -3
- package/dist/extraction/languages/java.d.ts.map +0 -1
- package/dist/extraction/languages/java.js +0 -70
- package/dist/extraction/languages/java.js.map +0 -1
- package/dist/extraction/languages/javascript.d.ts +0 -3
- package/dist/extraction/languages/javascript.d.ts.map +0 -1
- package/dist/extraction/languages/javascript.js +0 -90
- package/dist/extraction/languages/javascript.js.map +0 -1
- package/dist/extraction/languages/kotlin.d.ts +0 -3
- package/dist/extraction/languages/kotlin.d.ts.map +0 -1
- package/dist/extraction/languages/kotlin.js +0 -259
- package/dist/extraction/languages/kotlin.js.map +0 -1
- package/dist/extraction/languages/lua.d.ts +0 -3
- package/dist/extraction/languages/lua.d.ts.map +0 -1
- package/dist/extraction/languages/lua.js +0 -150
- package/dist/extraction/languages/lua.js.map +0 -1
- package/dist/extraction/languages/luau.d.ts +0 -3
- package/dist/extraction/languages/luau.d.ts.map +0 -1
- package/dist/extraction/languages/luau.js +0 -37
- package/dist/extraction/languages/luau.js.map +0 -1
- package/dist/extraction/languages/objc.d.ts +0 -3
- package/dist/extraction/languages/objc.d.ts.map +0 -1
- package/dist/extraction/languages/objc.js +0 -133
- package/dist/extraction/languages/objc.js.map +0 -1
- package/dist/extraction/languages/pascal.d.ts +0 -3
- package/dist/extraction/languages/pascal.d.ts.map +0 -1
- package/dist/extraction/languages/pascal.js +0 -66
- package/dist/extraction/languages/pascal.js.map +0 -1
- package/dist/extraction/languages/php.d.ts +0 -3
- package/dist/extraction/languages/php.d.ts.map +0 -1
- package/dist/extraction/languages/php.js +0 -107
- package/dist/extraction/languages/php.js.map +0 -1
- package/dist/extraction/languages/python.d.ts +0 -3
- package/dist/extraction/languages/python.d.ts.map +0 -1
- package/dist/extraction/languages/python.js +0 -56
- package/dist/extraction/languages/python.js.map +0 -1
- package/dist/extraction/languages/ruby.d.ts +0 -3
- package/dist/extraction/languages/ruby.d.ts.map +0 -1
- package/dist/extraction/languages/ruby.js +0 -114
- package/dist/extraction/languages/ruby.js.map +0 -1
- package/dist/extraction/languages/rust.d.ts +0 -3
- package/dist/extraction/languages/rust.d.ts.map +0 -1
- package/dist/extraction/languages/rust.js +0 -109
- package/dist/extraction/languages/rust.js.map +0 -1
- package/dist/extraction/languages/scala.d.ts +0 -3
- package/dist/extraction/languages/scala.d.ts.map +0 -1
- package/dist/extraction/languages/scala.js +0 -139
- package/dist/extraction/languages/scala.js.map +0 -1
- package/dist/extraction/languages/swift.d.ts +0 -3
- package/dist/extraction/languages/swift.d.ts.map +0 -1
- package/dist/extraction/languages/swift.js +0 -91
- package/dist/extraction/languages/swift.js.map +0 -1
- package/dist/extraction/languages/typescript.d.ts +0 -3
- package/dist/extraction/languages/typescript.d.ts.map +0 -1
- package/dist/extraction/languages/typescript.js +0 -129
- package/dist/extraction/languages/typescript.js.map +0 -1
- package/dist/extraction/liquid-extractor.d.ts +0 -52
- package/dist/extraction/liquid-extractor.d.ts.map +0 -1
- package/dist/extraction/liquid-extractor.js +0 -313
- package/dist/extraction/liquid-extractor.js.map +0 -1
- package/dist/extraction/mybatis-extractor.d.ts +0 -48
- package/dist/extraction/mybatis-extractor.d.ts.map +0 -1
- package/dist/extraction/mybatis-extractor.js +0 -198
- package/dist/extraction/mybatis-extractor.js.map +0 -1
- package/dist/extraction/parse-worker.d.ts +0 -8
- package/dist/extraction/parse-worker.d.ts.map +0 -1
- package/dist/extraction/parse-worker.js +0 -94
- package/dist/extraction/parse-worker.js.map +0 -1
- package/dist/extraction/specs/markdown-spec-extractor.d.ts +0 -59
- package/dist/extraction/specs/markdown-spec-extractor.d.ts.map +0 -1
- package/dist/extraction/specs/markdown-spec-extractor.js +0 -327
- package/dist/extraction/specs/markdown-spec-extractor.js.map +0 -1
- package/dist/extraction/specs/types.d.ts +0 -39
- package/dist/extraction/specs/types.d.ts.map +0 -1
- package/dist/extraction/specs/types.js +0 -8
- package/dist/extraction/specs/types.js.map +0 -1
- package/dist/extraction/svelte-extractor.d.ts +0 -56
- package/dist/extraction/svelte-extractor.d.ts.map +0 -1
- package/dist/extraction/svelte-extractor.js +0 -272
- package/dist/extraction/svelte-extractor.js.map +0 -1
- package/dist/extraction/tree-sitter-helpers.d.ts +0 -28
- package/dist/extraction/tree-sitter-helpers.d.ts.map +0 -1
- package/dist/extraction/tree-sitter-helpers.js +0 -103
- package/dist/extraction/tree-sitter-helpers.js.map +0 -1
- package/dist/extraction/tree-sitter-types.d.ts +0 -193
- package/dist/extraction/tree-sitter-types.d.ts.map +0 -1
- package/dist/extraction/tree-sitter-types.js +0 -10
- package/dist/extraction/tree-sitter-types.js.map +0 -1
- package/dist/extraction/tree-sitter.d.ts +0 -317
- package/dist/extraction/tree-sitter.d.ts.map +0 -1
- package/dist/extraction/tree-sitter.js +0 -3092
- package/dist/extraction/tree-sitter.js.map +0 -1
- package/dist/extraction/vue-extractor.d.ts +0 -51
- package/dist/extraction/vue-extractor.d.ts.map +0 -1
- package/dist/extraction/vue-extractor.js +0 -251
- package/dist/extraction/vue-extractor.js.map +0 -1
- package/dist/extraction/wasm/tree-sitter-lua.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-luau.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
- package/dist/extraction/wasm-runtime-flags.d.ts +0 -38
- package/dist/extraction/wasm-runtime-flags.d.ts.map +0 -1
- package/dist/extraction/wasm-runtime-flags.js +0 -106
- package/dist/extraction/wasm-runtime-flags.js.map +0 -1
- package/dist/graph/index.d.ts +0 -8
- package/dist/graph/index.d.ts.map +0 -1
- package/dist/graph/index.js +0 -13
- package/dist/graph/index.js.map +0 -1
- package/dist/graph/queries.d.ts +0 -106
- package/dist/graph/queries.d.ts.map +0 -1
- package/dist/graph/queries.js +0 -366
- package/dist/graph/queries.js.map +0 -1
- package/dist/graph/traversal.d.ts +0 -127
- package/dist/graph/traversal.d.ts.map +0 -1
- package/dist/graph/traversal.js +0 -531
- package/dist/graph/traversal.js.map +0 -1
- package/dist/index.d.ts +0 -551
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -1165
- package/dist/index.js.map +0 -1
- package/dist/installer/config-writer.d.ts +0 -28
- package/dist/installer/config-writer.d.ts.map +0 -1
- package/dist/installer/config-writer.js +0 -91
- package/dist/installer/config-writer.js.map +0 -1
- package/dist/installer/index.d.ts +0 -87
- package/dist/installer/index.d.ts.map +0 -1
- package/dist/installer/index.js +0 -409
- package/dist/installer/index.js.map +0 -1
- package/dist/installer/instructions-template.d.ts +0 -18
- package/dist/installer/instructions-template.d.ts.map +0 -1
- package/dist/installer/instructions-template.js +0 -21
- package/dist/installer/instructions-template.js.map +0 -1
- package/dist/installer/targets/claude.d.ts +0 -88
- package/dist/installer/targets/claude.d.ts.map +0 -1
- package/dist/installer/targets/claude.js +0 -582
- package/dist/installer/targets/claude.js.map +0 -1
- package/dist/installer/targets/registry.d.ts +0 -19
- package/dist/installer/targets/registry.d.ts.map +0 -1
- package/dist/installer/targets/registry.js +0 -31
- package/dist/installer/targets/registry.js.map +0 -1
- package/dist/installer/targets/shared.d.ts +0 -62
- package/dist/installer/targets/shared.d.ts.map +0 -1
- package/dist/installer/targets/shared.js +0 -207
- package/dist/installer/targets/shared.js.map +0 -1
- package/dist/installer/targets/types.d.ts +0 -76
- package/dist/installer/targets/types.d.ts.map +0 -1
- package/dist/installer/targets/types.js +0 -12
- package/dist/installer/targets/types.js.map +0 -1
- package/dist/isolation/worktree.d.ts +0 -65
- package/dist/isolation/worktree.d.ts.map +0 -1
- package/dist/isolation/worktree.js +0 -231
- package/dist/isolation/worktree.js.map +0 -1
- package/dist/mcp/daemon-paths.d.ts +0 -46
- package/dist/mcp/daemon-paths.d.ts.map +0 -1
- package/dist/mcp/daemon-paths.js +0 -125
- package/dist/mcp/daemon-paths.js.map +0 -1
- package/dist/mcp/daemon.d.ts +0 -161
- package/dist/mcp/daemon.d.ts.map +0 -1
- package/dist/mcp/daemon.js +0 -403
- package/dist/mcp/daemon.js.map +0 -1
- package/dist/mcp/engine.d.ts +0 -105
- package/dist/mcp/engine.d.ts.map +0 -1
- package/dist/mcp/engine.js +0 -270
- package/dist/mcp/engine.js.map +0 -1
- package/dist/mcp/index.d.ts +0 -112
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/index.js +0 -477
- package/dist/mcp/index.js.map +0 -1
- package/dist/mcp/proxy.d.ts +0 -81
- package/dist/mcp/proxy.d.ts.map +0 -1
- package/dist/mcp/proxy.js +0 -510
- package/dist/mcp/proxy.js.map +0 -1
- package/dist/mcp/server-instructions.d.ts +0 -18
- package/dist/mcp/server-instructions.d.ts.map +0 -1
- package/dist/mcp/server-instructions.js +0 -77
- package/dist/mcp/server-instructions.js.map +0 -1
- package/dist/mcp/session.d.ts +0 -77
- package/dist/mcp/session.d.ts.map +0 -1
- package/dist/mcp/session.js +0 -294
- package/dist/mcp/session.js.map +0 -1
- package/dist/mcp/spec-tools.d.ts +0 -39
- package/dist/mcp/spec-tools.d.ts.map +0 -1
- package/dist/mcp/spec-tools.js +0 -326
- package/dist/mcp/spec-tools.js.map +0 -1
- package/dist/mcp/tools.d.ts +0 -404
- package/dist/mcp/tools.d.ts.map +0 -1
- package/dist/mcp/tools.js +0 -3066
- package/dist/mcp/tools.js.map +0 -1
- package/dist/mcp/transport.d.ts +0 -188
- package/dist/mcp/transport.d.ts.map +0 -1
- package/dist/mcp/transport.js +0 -343
- package/dist/mcp/transport.js.map +0 -1
- package/dist/mcp/version.d.ts +0 -19
- package/dist/mcp/version.d.ts.map +0 -1
- package/dist/mcp/version.js +0 -71
- package/dist/mcp/version.js.map +0 -1
- package/dist/resolution/callback-synthesizer.d.ts +0 -10
- package/dist/resolution/callback-synthesizer.d.ts.map +0 -1
- package/dist/resolution/callback-synthesizer.js +0 -1300
- package/dist/resolution/callback-synthesizer.js.map +0 -1
- package/dist/resolution/frameworks/cargo-workspace.d.ts +0 -18
- package/dist/resolution/frameworks/cargo-workspace.d.ts.map +0 -1
- package/dist/resolution/frameworks/cargo-workspace.js +0 -225
- package/dist/resolution/frameworks/cargo-workspace.js.map +0 -1
- package/dist/resolution/frameworks/csharp.d.ts +0 -8
- package/dist/resolution/frameworks/csharp.d.ts.map +0 -1
- package/dist/resolution/frameworks/csharp.js +0 -241
- package/dist/resolution/frameworks/csharp.js.map +0 -1
- package/dist/resolution/frameworks/drupal.d.ts +0 -51
- package/dist/resolution/frameworks/drupal.d.ts.map +0 -1
- package/dist/resolution/frameworks/drupal.js +0 -367
- package/dist/resolution/frameworks/drupal.js.map +0 -1
- package/dist/resolution/frameworks/expo-modules.d.ts +0 -3
- package/dist/resolution/frameworks/expo-modules.d.ts.map +0 -1
- package/dist/resolution/frameworks/expo-modules.js +0 -143
- package/dist/resolution/frameworks/expo-modules.js.map +0 -1
- package/dist/resolution/frameworks/express.d.ts +0 -8
- package/dist/resolution/frameworks/express.d.ts.map +0 -1
- package/dist/resolution/frameworks/express.js +0 -308
- package/dist/resolution/frameworks/express.js.map +0 -1
- package/dist/resolution/frameworks/fabric.d.ts +0 -3
- package/dist/resolution/frameworks/fabric.d.ts.map +0 -1
- package/dist/resolution/frameworks/fabric.js +0 -354
- package/dist/resolution/frameworks/fabric.js.map +0 -1
- package/dist/resolution/frameworks/go.d.ts +0 -8
- package/dist/resolution/frameworks/go.d.ts.map +0 -1
- package/dist/resolution/frameworks/go.js +0 -161
- package/dist/resolution/frameworks/go.js.map +0 -1
- package/dist/resolution/frameworks/index.d.ts +0 -48
- package/dist/resolution/frameworks/index.d.ts.map +0 -1
- package/dist/resolution/frameworks/index.js +0 -161
- package/dist/resolution/frameworks/index.js.map +0 -1
- package/dist/resolution/frameworks/java.d.ts +0 -8
- package/dist/resolution/frameworks/java.d.ts.map +0 -1
- package/dist/resolution/frameworks/java.js +0 -504
- package/dist/resolution/frameworks/java.js.map +0 -1
- package/dist/resolution/frameworks/laravel.d.ts +0 -13
- package/dist/resolution/frameworks/laravel.d.ts.map +0 -1
- package/dist/resolution/frameworks/laravel.js +0 -257
- package/dist/resolution/frameworks/laravel.js.map +0 -1
- package/dist/resolution/frameworks/nestjs.d.ts +0 -26
- package/dist/resolution/frameworks/nestjs.d.ts.map +0 -1
- package/dist/resolution/frameworks/nestjs.js +0 -698
- package/dist/resolution/frameworks/nestjs.js.map +0 -1
- package/dist/resolution/frameworks/play.d.ts +0 -19
- package/dist/resolution/frameworks/play.d.ts.map +0 -1
- package/dist/resolution/frameworks/play.js +0 -111
- package/dist/resolution/frameworks/play.js.map +0 -1
- package/dist/resolution/frameworks/python.d.ts +0 -10
- package/dist/resolution/frameworks/python.d.ts.map +0 -1
- package/dist/resolution/frameworks/python.js +0 -396
- package/dist/resolution/frameworks/python.js.map +0 -1
- package/dist/resolution/frameworks/react-native.d.ts +0 -3
- package/dist/resolution/frameworks/react-native.d.ts.map +0 -1
- package/dist/resolution/frameworks/react-native.js +0 -360
- package/dist/resolution/frameworks/react-native.js.map +0 -1
- package/dist/resolution/frameworks/react.d.ts +0 -8
- package/dist/resolution/frameworks/react.d.ts.map +0 -1
- package/dist/resolution/frameworks/react.js +0 -365
- package/dist/resolution/frameworks/react.js.map +0 -1
- package/dist/resolution/frameworks/ruby.d.ts +0 -8
- package/dist/resolution/frameworks/ruby.d.ts.map +0 -1
- package/dist/resolution/frameworks/ruby.js +0 -302
- package/dist/resolution/frameworks/ruby.js.map +0 -1
- package/dist/resolution/frameworks/rust.d.ts +0 -8
- package/dist/resolution/frameworks/rust.d.ts.map +0 -1
- package/dist/resolution/frameworks/rust.js +0 -304
- package/dist/resolution/frameworks/rust.js.map +0 -1
- package/dist/resolution/frameworks/svelte.d.ts +0 -9
- package/dist/resolution/frameworks/svelte.d.ts.map +0 -1
- package/dist/resolution/frameworks/svelte.js +0 -249
- package/dist/resolution/frameworks/svelte.js.map +0 -1
- package/dist/resolution/frameworks/swift-objc.d.ts +0 -37
- package/dist/resolution/frameworks/swift-objc.d.ts.map +0 -1
- package/dist/resolution/frameworks/swift-objc.js +0 -252
- package/dist/resolution/frameworks/swift-objc.js.map +0 -1
- package/dist/resolution/frameworks/swift.d.ts +0 -10
- package/dist/resolution/frameworks/swift.d.ts.map +0 -1
- package/dist/resolution/frameworks/swift.js +0 -400
- package/dist/resolution/frameworks/swift.js.map +0 -1
- package/dist/resolution/frameworks/vue.d.ts +0 -9
- package/dist/resolution/frameworks/vue.d.ts.map +0 -1
- package/dist/resolution/frameworks/vue.js +0 -306
- package/dist/resolution/frameworks/vue.js.map +0 -1
- package/dist/resolution/go-module.d.ts +0 -26
- package/dist/resolution/go-module.d.ts.map +0 -1
- package/dist/resolution/go-module.js +0 -78
- package/dist/resolution/go-module.js.map +0 -1
- package/dist/resolution/import-resolver.d.ts +0 -68
- package/dist/resolution/import-resolver.d.ts.map +0 -1
- package/dist/resolution/import-resolver.js +0 -1275
- package/dist/resolution/import-resolver.js.map +0 -1
- package/dist/resolution/index.d.ts +0 -117
- package/dist/resolution/index.d.ts.map +0 -1
- package/dist/resolution/index.js +0 -895
- package/dist/resolution/index.js.map +0 -1
- package/dist/resolution/lru-cache.d.ts +0 -24
- package/dist/resolution/lru-cache.d.ts.map +0 -1
- package/dist/resolution/lru-cache.js +0 -62
- package/dist/resolution/lru-cache.js.map +0 -1
- package/dist/resolution/name-matcher.d.ts +0 -32
- package/dist/resolution/name-matcher.d.ts.map +0 -1
- package/dist/resolution/name-matcher.js +0 -596
- package/dist/resolution/name-matcher.js.map +0 -1
- package/dist/resolution/path-aliases.d.ts +0 -68
- package/dist/resolution/path-aliases.d.ts.map +0 -1
- package/dist/resolution/path-aliases.js +0 -238
- package/dist/resolution/path-aliases.js.map +0 -1
- package/dist/resolution/spec-link-resolver.d.ts +0 -103
- package/dist/resolution/spec-link-resolver.d.ts.map +0 -1
- package/dist/resolution/spec-link-resolver.js +0 -259
- package/dist/resolution/spec-link-resolver.js.map +0 -1
- package/dist/resolution/strip-comments.d.ts +0 -27
- package/dist/resolution/strip-comments.d.ts.map +0 -1
- package/dist/resolution/strip-comments.js +0 -441
- package/dist/resolution/strip-comments.js.map +0 -1
- package/dist/resolution/swift-objc-bridge.d.ts +0 -134
- package/dist/resolution/swift-objc-bridge.d.ts.map +0 -1
- package/dist/resolution/swift-objc-bridge.js +0 -256
- package/dist/resolution/swift-objc-bridge.js.map +0 -1
- package/dist/resolution/types.d.ts +0 -216
- package/dist/resolution/types.d.ts.map +0 -1
- package/dist/resolution/types.js +0 -8
- package/dist/resolution/types.js.map +0 -1
- package/dist/resolution/workspace-packages.d.ts +0 -48
- package/dist/resolution/workspace-packages.d.ts.map +0 -1
- package/dist/resolution/workspace-packages.js +0 -208
- package/dist/resolution/workspace-packages.js.map +0 -1
- package/dist/search/query-parser.d.ts +0 -57
- package/dist/search/query-parser.d.ts.map +0 -1
- package/dist/search/query-parser.js +0 -177
- package/dist/search/query-parser.js.map +0 -1
- package/dist/search/query-utils.d.ts +0 -71
- package/dist/search/query-utils.d.ts.map +0 -1
- package/dist/search/query-utils.js +0 -380
- package/dist/search/query-utils.js.map +0 -1
- package/dist/server/cli.js +0 -152
- package/dist/server/index.js +0 -12
- package/dist/server/ingest/index.js +0 -18
- package/dist/server/ingest/ingestor.js +0 -406
- package/dist/server/ingest/parser.js +0 -104
- package/dist/server/ingest/pricing.js +0 -78
- package/dist/server/ingest/types.js +0 -9
- package/dist/server/ingest/watcher.js +0 -77
- package/dist/server/package.json +0 -3
- package/dist/server/project-registry.js +0 -101
- package/dist/server/routes/claude.js +0 -480
- package/dist/server/routes/graph.js +0 -149
- package/dist/server/routes/memory.js +0 -272
- package/dist/server/routes/projects.js +0 -197
- package/dist/server/routes/spec.js +0 -105
- package/dist/server/routes/status.js +0 -35
- package/dist/server/routes/workflow.js +0 -184
- package/dist/server/server.js +0 -202
- package/dist/sync/git-hooks.d.ts +0 -45
- package/dist/sync/git-hooks.d.ts.map +0 -1
- package/dist/sync/git-hooks.js +0 -225
- package/dist/sync/git-hooks.js.map +0 -1
- package/dist/sync/index.d.ts +0 -19
- package/dist/sync/index.d.ts.map +0 -1
- package/dist/sync/index.js +0 -35
- package/dist/sync/index.js.map +0 -1
- package/dist/sync/watch-policy.d.ts +0 -48
- package/dist/sync/watch-policy.d.ts.map +0 -1
- package/dist/sync/watch-policy.js +0 -124
- package/dist/sync/watch-policy.js.map +0 -1
- package/dist/sync/watcher.d.ts +0 -283
- package/dist/sync/watcher.d.ts.map +0 -1
- package/dist/sync/watcher.js +0 -606
- package/dist/sync/watcher.js.map +0 -1
- package/dist/sync/worktree.d.ts +0 -54
- package/dist/sync/worktree.d.ts.map +0 -1
- package/dist/sync/worktree.js +0 -137
- package/dist/sync/worktree.js.map +0 -1
- package/dist/types.d.ts +0 -623
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -108
- package/dist/types.js.map +0 -1
- package/dist/ui/glyphs.d.ts +0 -42
- package/dist/ui/glyphs.d.ts.map +0 -1
- package/dist/ui/glyphs.js +0 -78
- package/dist/ui/glyphs.js.map +0 -1
- package/dist/ui/shimmer-progress.d.ts +0 -11
- package/dist/ui/shimmer-progress.d.ts.map +0 -1
- package/dist/ui/shimmer-progress.js +0 -90
- package/dist/ui/shimmer-progress.js.map +0 -1
- package/dist/ui/shimmer-worker.d.ts +0 -2
- package/dist/ui/shimmer-worker.d.ts.map +0 -1
- package/dist/ui/shimmer-worker.js +0 -118
- package/dist/ui/shimmer-worker.js.map +0 -1
- package/dist/ui/types.d.ts +0 -17
- package/dist/ui/types.d.ts.map +0 -1
- package/dist/ui/types.js +0 -3
- package/dist/ui/types.js.map +0 -1
- package/dist/utils.d.ts +0 -205
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -549
- package/dist/utils.js.map +0 -1
- package/dist/web/chunk-2YZXEHZ2.js +0 -1
- package/dist/web/chunk-3GIC555L.js +0 -18
- package/dist/web/chunk-3IIIGRMT.js +0 -1
- package/dist/web/chunk-47QYKLE5.js +0 -1
- package/dist/web/chunk-4LHBWWP7.js +0 -1
- package/dist/web/chunk-4OAZLD5W.js +0 -1
- package/dist/web/chunk-5OQKAJAE.js +0 -1
- package/dist/web/chunk-7B525GKQ.js +0 -1
- package/dist/web/chunk-BPDXCOOZ.js +0 -1
- package/dist/web/chunk-DT37HTZB.js +0 -1
- package/dist/web/chunk-EIMUHJND.js +0 -1
- package/dist/web/chunk-FTESTUEO.js +0 -1
- package/dist/web/chunk-GLJZV6MU.js +0 -1
- package/dist/web/chunk-I7LS67U5.js +0 -1
- package/dist/web/chunk-L4TVIPSR.js +0 -1
- package/dist/web/chunk-MASCULC2.js +0 -1
- package/dist/web/chunk-MW7ICSRM.js +0 -1
- package/dist/web/chunk-OI5VP2A3.js +0 -1
- package/dist/web/chunk-RA6EBF6I.js +0 -1
- package/dist/web/chunk-RP3WU5Y6.js +0 -1
- package/dist/web/chunk-RQDRMTXN.js +0 -1
- package/dist/web/chunk-TQMT6UDU.js +0 -1
- package/dist/web/chunk-U7IYOV7T.js +0 -1
- package/dist/web/chunk-UE227MWF.js +0 -1
- package/dist/web/chunk-WV573J4K.js +0 -1
- package/dist/web/chunk-WVCKOJZL.js +0 -4
- package/dist/web/chunk-XZKLVPHE.js +0 -1
- package/dist/web/chunk-ZABKKHJ3.js +0 -1
- package/dist/web/favicon-16.png +0 -0
- package/dist/web/favicon-180.png +0 -0
- package/dist/web/favicon-32.png +0 -0
- package/dist/web/favicon-512.png +0 -0
- package/dist/web/favicon-small.svg +0 -15
- package/dist/web/favicon.ico +0 -0
- package/dist/web/favicon.svg +0 -20
- package/dist/web/index.html +0 -145
- package/dist/web/main-RI5CO5Z4.js +0 -1
- package/dist/web/styles-CYN7IKT4.css +0 -1
- package/dist/workflows/condition-evaluator.d.ts +0 -75
- package/dist/workflows/condition-evaluator.d.ts.map +0 -1
- package/dist/workflows/condition-evaluator.js +0 -282
- package/dist/workflows/condition-evaluator.js.map +0 -1
- package/dist/workflows/defaults/index.d.ts +0 -26
- package/dist/workflows/defaults/index.d.ts.map +0 -1
- package/dist/workflows/defaults/index.js +0 -94
- package/dist/workflows/defaults/index.js.map +0 -1
- package/dist/workflows/defaults/spec-fix.yaml +0 -110
- package/dist/workflows/defaults/spec-implement.yaml +0 -150
- package/dist/workflows/defaults/spec-relink.yaml +0 -81
- package/dist/workflows/defaults/spec-verify.yaml +0 -51
- package/dist/workflows/discovery.d.ts +0 -46
- package/dist/workflows/discovery.d.ts.map +0 -1
- package/dist/workflows/discovery.js +0 -193
- package/dist/workflows/discovery.js.map +0 -1
- package/dist/workflows/executor.d.ts +0 -83
- package/dist/workflows/executor.d.ts.map +0 -1
- package/dist/workflows/executor.js +0 -623
- package/dist/workflows/executor.js.map +0 -1
- package/dist/workflows/runners/approval.d.ts +0 -18
- package/dist/workflows/runners/approval.d.ts.map +0 -1
- package/dist/workflows/runners/approval.js +0 -34
- package/dist/workflows/runners/approval.js.map +0 -1
- package/dist/workflows/runners/bash.d.ts +0 -13
- package/dist/workflows/runners/bash.d.ts.map +0 -1
- package/dist/workflows/runners/bash.js +0 -143
- package/dist/workflows/runners/bash.js.map +0 -1
- package/dist/workflows/runners/cancel.d.ts +0 -10
- package/dist/workflows/runners/cancel.d.ts.map +0 -1
- package/dist/workflows/runners/cancel.js +0 -19
- package/dist/workflows/runners/cancel.js.map +0 -1
- package/dist/workflows/runners/prompt.d.ts +0 -28
- package/dist/workflows/runners/prompt.d.ts.map +0 -1
- package/dist/workflows/runners/prompt.js +0 -212
- package/dist/workflows/runners/prompt.js.map +0 -1
- package/dist/workflows/runners/script.d.ts +0 -17
- package/dist/workflows/runners/script.d.ts.map +0 -1
- package/dist/workflows/runners/script.js +0 -155
- package/dist/workflows/runners/script.js.map +0 -1
- package/dist/workflows/runners/types.d.ts +0 -51
- package/dist/workflows/runners/types.d.ts.map +0 -1
- package/dist/workflows/runners/types.js +0 -13
- package/dist/workflows/runners/types.js.map +0 -1
- package/dist/workflows/schemas/workflow.d.ts +0 -166
- package/dist/workflows/schemas/workflow.d.ts.map +0 -1
- package/dist/workflows/schemas/workflow.js +0 -437
- package/dist/workflows/schemas/workflow.js.map +0 -1
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* JS/TS workspace (monorepo) package resolution.
|
|
4
|
-
*
|
|
5
|
-
* npm / yarn / bun read member packages from the root `package.json`
|
|
6
|
-
* `workspaces` field; pnpm from `pnpm-workspace.yaml`. A cross-package
|
|
7
|
-
* import like `@scope/ui/widgets` is LOCAL to the monorepo, but to a
|
|
8
|
-
* single-package resolver it looks exactly like a third-party npm
|
|
9
|
-
* specifier — so `isExternalImport` flags it external and the
|
|
10
|
-
* consumer↔definition edge is never created. For component barrels
|
|
11
|
-
* (`export { default as X } from './x.svelte'`) that surfaces as a false
|
|
12
|
-
* `0 callers` on a live component (issue #629).
|
|
13
|
-
*
|
|
14
|
-
* This module maps each member package's declared `name` to its
|
|
15
|
-
* directory so the resolver can rewrite `@scope/ui/widgets` →
|
|
16
|
-
* `packages/ui/widgets` and then run normal extension/index resolution.
|
|
17
|
-
*
|
|
18
|
-
* Scope deliberately small for v1 (mirrors path-aliases.ts):
|
|
19
|
-
* - reads `workspaces` (array OR `{ packages: [...] }`) from package.json,
|
|
20
|
-
* plus a minimal `pnpm-workspace.yaml` `packages:` list
|
|
21
|
-
* - expands one level of `*` / `**` globs (`packages/*`, `apps/*`)
|
|
22
|
-
* - subpath resolution is directory-based (`@scope/ui/sub` → `<ui>/sub`);
|
|
23
|
-
* it does NOT yet honour a member's `exports` map or `main` field
|
|
24
|
-
* - returns null when the project declares no workspaces, so single-
|
|
25
|
-
* package repos pay nothing and see no behaviour change.
|
|
26
|
-
*/
|
|
27
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
28
|
-
if (k2 === undefined) k2 = k;
|
|
29
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
30
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
31
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
32
|
-
}
|
|
33
|
-
Object.defineProperty(o, k2, desc);
|
|
34
|
-
}) : (function(o, m, k, k2) {
|
|
35
|
-
if (k2 === undefined) k2 = k;
|
|
36
|
-
o[k2] = m[k];
|
|
37
|
-
}));
|
|
38
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
39
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
40
|
-
}) : function(o, v) {
|
|
41
|
-
o["default"] = v;
|
|
42
|
-
});
|
|
43
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
44
|
-
var ownKeys = function(o) {
|
|
45
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
46
|
-
var ar = [];
|
|
47
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
48
|
-
return ar;
|
|
49
|
-
};
|
|
50
|
-
return ownKeys(o);
|
|
51
|
-
};
|
|
52
|
-
return function (mod) {
|
|
53
|
-
if (mod && mod.__esModule) return mod;
|
|
54
|
-
var result = {};
|
|
55
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
56
|
-
__setModuleDefault(result, mod);
|
|
57
|
-
return result;
|
|
58
|
-
};
|
|
59
|
-
})();
|
|
60
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61
|
-
exports.loadWorkspacePackages = loadWorkspacePackages;
|
|
62
|
-
exports.resolveWorkspaceImport = resolveWorkspaceImport;
|
|
63
|
-
const fs = __importStar(require("fs"));
|
|
64
|
-
const path = __importStar(require("path"));
|
|
65
|
-
const errors_1 = require("../errors");
|
|
66
|
-
/**
|
|
67
|
-
* Load workspace member packages for `projectRoot`. Returns `null` when
|
|
68
|
-
* the project declares no workspaces (the common single-package case) —
|
|
69
|
-
* callers then skip all workspace logic.
|
|
70
|
-
*
|
|
71
|
-
* Cheap to call repeatedly only via the resolver's per-instance cache;
|
|
72
|
-
* this function itself touches the filesystem, so the resolver memoises it
|
|
73
|
-
* the same way it does {@link loadProjectAliases} / {@link loadGoModule}.
|
|
74
|
-
*/
|
|
75
|
-
function loadWorkspacePackages(projectRoot) {
|
|
76
|
-
const patterns = readWorkspaceGlobs(projectRoot);
|
|
77
|
-
if (patterns.length === 0)
|
|
78
|
-
return null;
|
|
79
|
-
const byName = new Map();
|
|
80
|
-
for (const pattern of patterns) {
|
|
81
|
-
for (const dir of expandWorkspaceGlob(projectRoot, pattern)) {
|
|
82
|
-
const pkgName = readPackageName(path.join(projectRoot, dir));
|
|
83
|
-
// First declaration wins — workspace patterns are tried in order.
|
|
84
|
-
if (pkgName && !byName.has(pkgName))
|
|
85
|
-
byName.set(pkgName, dir);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
if (byName.size === 0)
|
|
89
|
-
return null;
|
|
90
|
-
(0, errors_1.logDebug)('workspace packages loaded', { count: byName.size });
|
|
91
|
-
return { byName };
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Rewrite a bare workspace import to a path relative to projectRoot,
|
|
95
|
-
* WITHOUT an extension — the caller applies the language's extension/index
|
|
96
|
-
* resolution. `@scope/ui/widgets` → `packages/ui/widgets`; the bare package
|
|
97
|
-
* name `@scope/ui` → its directory. Returns `null` when no member package
|
|
98
|
-
* name matches.
|
|
99
|
-
*/
|
|
100
|
-
function resolveWorkspaceImport(importPath, ws) {
|
|
101
|
-
// Longest matching package name wins, so `@scope/ui/core` prefers a
|
|
102
|
-
// `@scope/ui/core` package over a `@scope/ui` one when both exist.
|
|
103
|
-
let bestName = null;
|
|
104
|
-
for (const name of ws.byName.keys()) {
|
|
105
|
-
if (importPath === name || importPath.startsWith(name + '/')) {
|
|
106
|
-
if (!bestName || name.length > bestName.length)
|
|
107
|
-
bestName = name;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
if (!bestName)
|
|
111
|
-
return null;
|
|
112
|
-
const dir = ws.byName.get(bestName);
|
|
113
|
-
const subpath = importPath.slice(bestName.length); // '' or '/widgets'
|
|
114
|
-
return (dir + subpath).replace(/\/{2,}/g, '/');
|
|
115
|
-
}
|
|
116
|
-
/** Read workspace glob patterns from package.json + pnpm-workspace.yaml. */
|
|
117
|
-
function readWorkspaceGlobs(projectRoot) {
|
|
118
|
-
const out = [];
|
|
119
|
-
// package.json `workspaces` (npm / yarn / bun): array, or Yarn's
|
|
120
|
-
// `{ packages: [...], nohoist: [...] }` object form.
|
|
121
|
-
try {
|
|
122
|
-
const pkg = JSON.parse(fs.readFileSync(path.join(projectRoot, 'package.json'), 'utf-8'));
|
|
123
|
-
const ws = pkg?.workspaces;
|
|
124
|
-
if (Array.isArray(ws)) {
|
|
125
|
-
out.push(...ws.filter((w) => typeof w === 'string'));
|
|
126
|
-
}
|
|
127
|
-
else if (ws && Array.isArray(ws.packages)) {
|
|
128
|
-
out.push(...ws.packages.filter((w) => typeof w === 'string'));
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
catch {
|
|
132
|
-
/* no / invalid package.json — not a workspace root */
|
|
133
|
-
}
|
|
134
|
-
// pnpm-workspace.yaml `packages:` list. Parsed with a minimal line
|
|
135
|
-
// scanner so we don't pull in a YAML dependency.
|
|
136
|
-
try {
|
|
137
|
-
const yaml = fs.readFileSync(path.join(projectRoot, 'pnpm-workspace.yaml'), 'utf-8');
|
|
138
|
-
out.push(...parsePnpmPackages(yaml));
|
|
139
|
-
}
|
|
140
|
-
catch {
|
|
141
|
-
/* no pnpm-workspace.yaml */
|
|
142
|
-
}
|
|
143
|
-
return out;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Minimal pnpm-workspace.yaml `packages:` extractor. Handles the only shape
|
|
147
|
-
* pnpm actually uses:
|
|
148
|
-
* packages:
|
|
149
|
-
* - 'packages/*'
|
|
150
|
-
* - "apps/*"
|
|
151
|
-
* - tools/build
|
|
152
|
-
*/
|
|
153
|
-
function parsePnpmPackages(yaml) {
|
|
154
|
-
const out = [];
|
|
155
|
-
const lines = yaml.split(/\r?\n/);
|
|
156
|
-
let inPackages = false;
|
|
157
|
-
for (const line of lines) {
|
|
158
|
-
if (/^\s*packages\s*:/.test(line)) {
|
|
159
|
-
inPackages = true;
|
|
160
|
-
continue;
|
|
161
|
-
}
|
|
162
|
-
if (inPackages) {
|
|
163
|
-
const item = line.match(/^\s*-\s*(.+?)\s*$/);
|
|
164
|
-
if (item) {
|
|
165
|
-
out.push(item[1].replace(/^['"]|['"]$/g, ''));
|
|
166
|
-
continue;
|
|
167
|
-
}
|
|
168
|
-
// A non-list, non-blank line ends the `packages:` block.
|
|
169
|
-
if (line.trim() !== '' && !/^\s/.test(line))
|
|
170
|
-
inPackages = false;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
return out;
|
|
174
|
-
}
|
|
175
|
-
/** Expand one level of a `packages/*` / `apps/**` glob to member dirs. */
|
|
176
|
-
function expandWorkspaceGlob(projectRoot, pattern) {
|
|
177
|
-
const norm = pattern.replace(/\\/g, '/').replace(/\/+$/, '');
|
|
178
|
-
const star = norm.indexOf('*');
|
|
179
|
-
if (star === -1)
|
|
180
|
-
return [norm]; // exact directory
|
|
181
|
-
// Everything before the wildcard segment is the base to enumerate.
|
|
182
|
-
const base = norm.slice(0, star).replace(/\/+$/, '');
|
|
183
|
-
let entries;
|
|
184
|
-
try {
|
|
185
|
-
entries = fs.readdirSync(path.join(projectRoot, base), { withFileTypes: true });
|
|
186
|
-
}
|
|
187
|
-
catch {
|
|
188
|
-
return [];
|
|
189
|
-
}
|
|
190
|
-
const out = [];
|
|
191
|
-
for (const e of entries) {
|
|
192
|
-
if (!e.isDirectory() || e.name.startsWith('.') || e.name === 'node_modules')
|
|
193
|
-
continue;
|
|
194
|
-
out.push(base ? `${base}/${e.name}` : e.name);
|
|
195
|
-
}
|
|
196
|
-
return out;
|
|
197
|
-
}
|
|
198
|
-
/** Read the `name` field from a member directory's package.json. */
|
|
199
|
-
function readPackageName(dirAbs) {
|
|
200
|
-
try {
|
|
201
|
-
const pkg = JSON.parse(fs.readFileSync(path.join(dirAbs, 'package.json'), 'utf-8'));
|
|
202
|
-
return typeof pkg?.name === 'string' && pkg.name ? pkg.name : null;
|
|
203
|
-
}
|
|
204
|
-
catch {
|
|
205
|
-
return null;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
//# sourceMappingURL=workspace-packages.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-packages.js","sourceRoot":"","sources":["../../src/resolution/workspace-packages.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBH,sDAgBC;AASD,wDAgBC;AA3DD,uCAAyB;AACzB,2CAA6B;AAC7B,sCAAqC;AAOrC;;;;;;;;GAQG;AACH,SAAgB,qBAAqB,CAAC,WAAmB;IACvD,MAAM,QAAQ,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC;IACjD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAEvC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IACzC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,KAAK,MAAM,GAAG,IAAI,mBAAmB,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,CAAC;YAC5D,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC;YAC7D,kEAAkE;YAClE,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;gBAAE,MAAM,CAAC,GAAG,CAAC,OAAO,EA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AAC;IACZ,CAAC;IACD,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,cAAc;YAAE,SAAS;QACtF,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,oEAAoE;AACpE,SAAS,eAAe,CAAC,MAAc;IACrC,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;QACpF,OAAO,OAAO,GAAG,EAAE,IAAI,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACrE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Field-qualified search query parser.
|
|
3
|
-
*
|
|
4
|
-
* Splits a raw query like
|
|
5
|
-
*
|
|
6
|
-
* kind:function name:auth path:src/api authenticate
|
|
7
|
-
*
|
|
8
|
-
* into structured filters (kind=function, name="auth", path prefix
|
|
9
|
-
* "src/api") plus the free-text portion ("authenticate") that goes
|
|
10
|
-
* to FTS. Free-text and filters compose: filters narrow the result
|
|
11
|
-
* set, FTS scores within the narrowed set.
|
|
12
|
-
*
|
|
13
|
-
* Recognised fields (case-insensitive, value is the rest until
|
|
14
|
-
* whitespace):
|
|
15
|
-
*
|
|
16
|
-
* kind: one of function|method|class|interface|struct|...
|
|
17
|
-
* lang: one of typescript|python|go|... (alias: language:)
|
|
18
|
-
* path: case-insensitive substring of file_path
|
|
19
|
-
* name: case-insensitive substring of the symbol's name
|
|
20
|
-
*
|
|
21
|
-
* Unknown field prefixes (e.g. `foo:bar`) are passed through to FTS
|
|
22
|
-
* as plain text — that's how someone searching for `TODO:` gets a
|
|
23
|
-
* result instead of a parse error.
|
|
24
|
-
*
|
|
25
|
-
* Quoting:
|
|
26
|
-
* kind:function path:"src/some path/with spaces" → handled by stripping
|
|
27
|
-
* the surrounding double quotes from the value (single token only,
|
|
28
|
-
* no nested escapes).
|
|
29
|
-
*/
|
|
30
|
-
import type { NodeKind, Language } from '../types';
|
|
31
|
-
export interface ParsedQuery {
|
|
32
|
-
/** Free-text portion to feed to FTS / LIKE. May be empty. */
|
|
33
|
-
text: string;
|
|
34
|
-
/** kind: filters (OR'd). Empty when none specified. */
|
|
35
|
-
kinds: NodeKind[];
|
|
36
|
-
/** lang:/language: filters (OR'd). Empty when none specified. */
|
|
37
|
-
languages: Language[];
|
|
38
|
-
/** path: filters (OR'd, case-insensitive substring of file_path). Empty when none. */
|
|
39
|
-
pathFilters: string[];
|
|
40
|
-
/** name: filters (OR'd, case-insensitive substring of node.name). */
|
|
41
|
-
nameFilters: string[];
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Parse a raw query into structured filters + remaining text.
|
|
45
|
-
* Always returns a value; never throws.
|
|
46
|
-
*/
|
|
47
|
-
export declare function parseQuery(raw: string): ParsedQuery;
|
|
48
|
-
/**
|
|
49
|
-
* Damerau-Levenshtein-ish bounded edit distance. Returns `maxDist + 1`
|
|
50
|
-
* as soon as the distance is known to exceed `maxDist`; that early-exit
|
|
51
|
-
* makes the fuzzy fallback cheap even over tens of thousands of names.
|
|
52
|
-
*
|
|
53
|
-
* Pure DP, O(min(len(a), len(b))) memory. Compares case-folded inputs;
|
|
54
|
-
* callers should pass `lowercase(name)` strings.
|
|
55
|
-
*/
|
|
56
|
-
export declare function boundedEditDistance(a: string, b: string, maxDist: number): number;
|
|
57
|
-
//# sourceMappingURL=query-parser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query-parser.d.ts","sourceRoot":"","sources":["../../src/search/query-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEnD,MAAM,WAAW,WAAW;IAC1B,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,iEAAiE;IACjE,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,sFAAsF;IACtF,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,qEAAqE;IACrE,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAiBD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAiFnD;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CA2BjF"}
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Field-qualified search query parser.
|
|
4
|
-
*
|
|
5
|
-
* Splits a raw query like
|
|
6
|
-
*
|
|
7
|
-
* kind:function name:auth path:src/api authenticate
|
|
8
|
-
*
|
|
9
|
-
* into structured filters (kind=function, name="auth", path prefix
|
|
10
|
-
* "src/api") plus the free-text portion ("authenticate") that goes
|
|
11
|
-
* to FTS. Free-text and filters compose: filters narrow the result
|
|
12
|
-
* set, FTS scores within the narrowed set.
|
|
13
|
-
*
|
|
14
|
-
* Recognised fields (case-insensitive, value is the rest until
|
|
15
|
-
* whitespace):
|
|
16
|
-
*
|
|
17
|
-
* kind: one of function|method|class|interface|struct|...
|
|
18
|
-
* lang: one of typescript|python|go|... (alias: language:)
|
|
19
|
-
* path: case-insensitive substring of file_path
|
|
20
|
-
* name: case-insensitive substring of the symbol's name
|
|
21
|
-
*
|
|
22
|
-
* Unknown field prefixes (e.g. `foo:bar`) are passed through to FTS
|
|
23
|
-
* as plain text — that's how someone searching for `TODO:` gets a
|
|
24
|
-
* result instead of a parse error.
|
|
25
|
-
*
|
|
26
|
-
* Quoting:
|
|
27
|
-
* kind:function path:"src/some path/with spaces" → handled by stripping
|
|
28
|
-
* the surrounding double quotes from the value (single token only,
|
|
29
|
-
* no nested escapes).
|
|
30
|
-
*/
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.parseQuery = parseQuery;
|
|
33
|
-
exports.boundedEditDistance = boundedEditDistance;
|
|
34
|
-
const types_1 = require("../types");
|
|
35
|
-
// Derived from the canonical `NODE_KINDS` / `LANGUAGES` arrays in
|
|
36
|
-
// types.ts so adding a new kind or language doesn't silently fall
|
|
37
|
-
// through to plain text here.
|
|
38
|
-
const KIND_VALUES = new Set(types_1.NODE_KINDS);
|
|
39
|
-
const LANGUAGE_VALUES = new Set(types_1.LANGUAGES);
|
|
40
|
-
/**
|
|
41
|
-
* Strip a surrounding pair of double quotes from `s`. Allows users to
|
|
42
|
-
* keep whitespace in path filters: `path:"my dir/file"`.
|
|
43
|
-
*/
|
|
44
|
-
function unquote(s) {
|
|
45
|
-
if (s.length >= 2 && s.startsWith('"') && s.endsWith('"'))
|
|
46
|
-
return s.slice(1, -1);
|
|
47
|
-
return s;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Parse a raw query into structured filters + remaining text.
|
|
51
|
-
* Always returns a value; never throws.
|
|
52
|
-
*/
|
|
53
|
-
function parseQuery(raw) {
|
|
54
|
-
const out = {
|
|
55
|
-
text: '',
|
|
56
|
-
kinds: [],
|
|
57
|
-
languages: [],
|
|
58
|
-
pathFilters: [],
|
|
59
|
-
nameFilters: [],
|
|
60
|
-
};
|
|
61
|
-
// Tokenise on whitespace, preserving quoted spans as part of the
|
|
62
|
-
// current token. Quotes can appear at the start (`"…"`) OR mid-token
|
|
63
|
-
// (`path:"…"`); in both cases everything from the opening `"` to the
|
|
64
|
-
// matching `"` is included in the token, whitespace and all.
|
|
65
|
-
const tokens = [];
|
|
66
|
-
let i = 0;
|
|
67
|
-
while (i < raw.length) {
|
|
68
|
-
while (i < raw.length && /\s/.test(raw[i]))
|
|
69
|
-
i++;
|
|
70
|
-
if (i >= raw.length)
|
|
71
|
-
break;
|
|
72
|
-
const start = i;
|
|
73
|
-
while (i < raw.length && !/\s/.test(raw[i])) {
|
|
74
|
-
if (raw[i] === '"') {
|
|
75
|
-
const end = raw.indexOf('"', i + 1);
|
|
76
|
-
if (end === -1) {
|
|
77
|
-
// Unterminated quote — swallow the rest of the input as
|
|
78
|
-
// one token. Forgiving rather than throwing.
|
|
79
|
-
i = raw.length;
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
i = end + 1;
|
|
83
|
-
continue;
|
|
84
|
-
}
|
|
85
|
-
i++;
|
|
86
|
-
}
|
|
87
|
-
tokens.push(raw.slice(start, i));
|
|
88
|
-
}
|
|
89
|
-
const textParts = [];
|
|
90
|
-
for (const tok of tokens) {
|
|
91
|
-
const colon = tok.indexOf(':');
|
|
92
|
-
if (colon <= 0 || colon === tok.length - 1) {
|
|
93
|
-
textParts.push(tok);
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
const key = tok.slice(0, colon).toLowerCase();
|
|
97
|
-
const valueRaw = unquote(tok.slice(colon + 1));
|
|
98
|
-
if (!valueRaw) {
|
|
99
|
-
textParts.push(tok);
|
|
100
|
-
continue;
|
|
101
|
-
}
|
|
102
|
-
switch (key) {
|
|
103
|
-
case 'kind': {
|
|
104
|
-
if (KIND_VALUES.has(valueRaw)) {
|
|
105
|
-
out.kinds.push(valueRaw);
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
textParts.push(tok);
|
|
109
|
-
}
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
case 'lang':
|
|
113
|
-
case 'language': {
|
|
114
|
-
const lower = valueRaw.toLowerCase();
|
|
115
|
-
if (LANGUAGE_VALUES.has(lower)) {
|
|
116
|
-
out.languages.push(lower);
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
textParts.push(tok);
|
|
120
|
-
}
|
|
121
|
-
break;
|
|
122
|
-
}
|
|
123
|
-
case 'path':
|
|
124
|
-
out.pathFilters.push(valueRaw);
|
|
125
|
-
break;
|
|
126
|
-
case 'name':
|
|
127
|
-
out.nameFilters.push(valueRaw);
|
|
128
|
-
break;
|
|
129
|
-
default:
|
|
130
|
-
textParts.push(tok);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
out.text = textParts.join(' ').trim();
|
|
134
|
-
return out;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Damerau-Levenshtein-ish bounded edit distance. Returns `maxDist + 1`
|
|
138
|
-
* as soon as the distance is known to exceed `maxDist`; that early-exit
|
|
139
|
-
* makes the fuzzy fallback cheap even over tens of thousands of names.
|
|
140
|
-
*
|
|
141
|
-
* Pure DP, O(min(len(a), len(b))) memory. Compares case-folded inputs;
|
|
142
|
-
* callers should pass `lowercase(name)` strings.
|
|
143
|
-
*/
|
|
144
|
-
function boundedEditDistance(a, b, maxDist) {
|
|
145
|
-
if (a === b)
|
|
146
|
-
return 0;
|
|
147
|
-
const al = a.length;
|
|
148
|
-
const bl = b.length;
|
|
149
|
-
if (Math.abs(al - bl) > maxDist)
|
|
150
|
-
return maxDist + 1;
|
|
151
|
-
if (al === 0)
|
|
152
|
-
return bl;
|
|
153
|
-
if (bl === 0)
|
|
154
|
-
return al;
|
|
155
|
-
let prev = new Array(bl + 1);
|
|
156
|
-
let cur = new Array(bl + 1);
|
|
157
|
-
for (let j = 0; j <= bl; j++)
|
|
158
|
-
prev[j] = j;
|
|
159
|
-
for (let i = 1; i <= al; i++) {
|
|
160
|
-
cur[0] = i;
|
|
161
|
-
let rowMin = cur[0];
|
|
162
|
-
for (let j = 1; j <= bl; j++) {
|
|
163
|
-
const cost = a.charCodeAt(i - 1) === b.charCodeAt(j - 1) ? 0 : 1;
|
|
164
|
-
const insertion = cur[j - 1] + 1;
|
|
165
|
-
const deletion = prev[j] + 1;
|
|
166
|
-
const substitution = prev[j - 1] + cost;
|
|
167
|
-
cur[j] = Math.min(insertion, deletion, substitution);
|
|
168
|
-
if (cur[j] < rowMin)
|
|
169
|
-
rowMin = cur[j];
|
|
170
|
-
}
|
|
171
|
-
if (rowMin > maxDist)
|
|
172
|
-
return maxDist + 1;
|
|
173
|
-
[prev, cur] = [cur, prev];
|
|
174
|
-
}
|
|
175
|
-
return prev[bl];
|
|
176
|
-
}
|
|
177
|
-
//# sourceMappingURL=query-parser.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query-parser.js","sourceRoot":"","sources":["../../src/search/query-parser.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;;AAqCH,gCAiFC;AAUD,kDA2BC;AAzJD,oCAAiD;AAgBjD,kEAAkE;AAClE,kEAAkE;AAClE,8BAA8B;AAC9B,MAAM,WAAW,GAAwB,IAAI,GAAG,CAAW,kBAAU,CAAC,CAAC;AACvE,MAAM,eAAe,GAAwB,IAAI,GAAG,CAAW,iBAAS,CAAC,CAAC;AAE1E;;;GAGG;AACH,SAAS,OAAO,CAAC,CAAS;IACxB,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,EA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|
-
/**
|
|
8
|
-
* Common stop words to filter from search queries.
|
|
9
|
-
* Includes generic English + code-specific noise words.
|
|
10
|
-
*/
|
|
11
|
-
export declare const STOP_WORDS: Set<string>;
|
|
12
|
-
/**
|
|
13
|
-
* Generate stem variants of a search term by removing common English suffixes.
|
|
14
|
-
* Used for FTS query expansion so "caching" also finds "cache", "eviction" finds "evict", etc.
|
|
15
|
-
* Stems are used as PREFIX matches in FTS, so they don't need to be perfect English words.
|
|
16
|
-
*/
|
|
17
|
-
export declare function getStemVariants(term: string): string[];
|
|
18
|
-
/**
|
|
19
|
-
* Extract meaningful search terms from a natural language query.
|
|
20
|
-
* Splits camelCase, PascalCase, snake_case, SCREAMING_SNAKE, and dot.notation
|
|
21
|
-
* into individual tokens before filtering.
|
|
22
|
-
*
|
|
23
|
-
* Preserves original compound identifiers (e.g., "scrapeLoop") alongside
|
|
24
|
-
* their split parts so that FTS can match both the full symbol name and
|
|
25
|
-
* individual words within it.
|
|
26
|
-
*
|
|
27
|
-
* Also generates stem variants (e.g., "caching"→"cache", "eviction"→"evict")
|
|
28
|
-
* so FTS prefix matching can find related code symbols.
|
|
29
|
-
*/
|
|
30
|
-
export declare function extractSearchTerms(query: string, options?: {
|
|
31
|
-
stems?: boolean;
|
|
32
|
-
}): string[];
|
|
33
|
-
/**
|
|
34
|
-
* Score path relevance to a query
|
|
35
|
-
* Higher score = more relevant path
|
|
36
|
-
*/
|
|
37
|
-
export declare function scorePathRelevance(filePath: string, query: string): number;
|
|
38
|
-
/**
|
|
39
|
-
* Check if a file path looks like a test file
|
|
40
|
-
*/
|
|
41
|
-
export declare function isTestFile(filePath: string): boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Bonus when a node's name matches the search query.
|
|
44
|
-
* Exact matches get the largest boost; prefix matches get smaller boosts.
|
|
45
|
-
* Multi-word queries also check individual term matches against the name.
|
|
46
|
-
*/
|
|
47
|
-
export declare function nameMatchBonus(nodeName: string, query: string): number;
|
|
48
|
-
/**
|
|
49
|
-
* Kind-based bonus for search ranking
|
|
50
|
-
* Functions and classes are typically more relevant than variables/imports
|
|
51
|
-
*/
|
|
52
|
-
export declare function kindBonus(kind: Node['kind']): number;
|
|
53
|
-
/**
|
|
54
|
-
* Whether a query token looks like a code identifier the user deliberately typed
|
|
55
|
-
* (camelCase / PascalCase-with-internal-caps / snake_case / has a digit) rather
|
|
56
|
-
* than a plain dictionary word ("flat", "object", "screen").
|
|
57
|
-
*
|
|
58
|
-
* Used to decide whether an EXACT name match earns the "the user named this
|
|
59
|
-
* symbol" exemption from single-term dampening. A common English word that
|
|
60
|
-
* happens to exact-match an unrelated symbol — the query "flat object" matching
|
|
61
|
-
* a constant named `FLAT` — must NOT get that exemption, or the +exact-name
|
|
62
|
-
* bonus floats it to the top of a prose query on its own.
|
|
63
|
-
*
|
|
64
|
-
* Classifies the token AS THE USER TYPED IT, not the matched symbol's name:
|
|
65
|
-
* "flat" (lowercase, descriptive) is non-distinctive even though it matches
|
|
66
|
-
* `FLAT`. A leading-capital-only word ("Screen", "Zustand") is also treated as
|
|
67
|
-
* a plain word — sentence-start capitalization and proper nouns aren't reliable
|
|
68
|
-
* identifier signals.
|
|
69
|
-
*/
|
|
70
|
-
export declare function isDistinctiveIdentifier(token: string): boolean;
|
|
71
|
-
//# sourceMappingURL=query-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query-utils.d.ts","sourceRoot":"","sources":["../../src/search/query-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC;;;GAGG;AACH,eAAO,MAAM,UAAU,aAkBrB,CAAC;AAEH;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAyDtD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,EAAE,CA2DzF;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CA4B1E;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAuCpD;AAmBD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAuCtE;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,MAAM,CA0BpD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAQ9D"}
|