@eui/mcp 1.5.0 → 1.5.2
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/dist/main.js +539 -208
- package/package.json +9 -6
- package/dist/config/__tests__/schema.property.test.d.ts +0 -2
- package/dist/config/__tests__/schema.property.test.d.ts.map +0 -1
- package/dist/config/__tests__/schema.property.test.js +0 -203
- package/dist/config/__tests__/schema.property.test.js.map +0 -1
- package/dist/config/__tests__/schema.test.d.ts +0 -2
- package/dist/config/__tests__/schema.test.d.ts.map +0 -1
- package/dist/config/__tests__/schema.test.js +0 -454
- package/dist/config/__tests__/schema.test.js.map +0 -1
- package/dist/config/index.d.ts +0 -6
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -6
- package/dist/config/index.js.map +0 -1
- package/dist/config/loader.d.ts +0 -27
- package/dist/config/loader.d.ts.map +0 -1
- package/dist/config/loader.js +0 -224
- package/dist/config/loader.js.map +0 -1
- package/dist/config/schema.d.ts +0 -171
- package/dist/config/schema.d.ts.map +0 -1
- package/dist/config/schema.js +0 -100
- package/dist/config/schema.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -45
- package/dist/index.js.map +0 -1
- package/dist/loader/__tests__/cache-manager.property.test.d.ts +0 -2
- package/dist/loader/__tests__/cache-manager.property.test.d.ts.map +0 -1
- package/dist/loader/__tests__/cache-manager.property.test.js +0 -245
- package/dist/loader/__tests__/cache-manager.property.test.js.map +0 -1
- package/dist/loader/__tests__/cache-manager.test.d.ts +0 -2
- package/dist/loader/__tests__/cache-manager.test.d.ts.map +0 -1
- package/dist/loader/__tests__/cache-manager.test.js +0 -256
- package/dist/loader/__tests__/cache-manager.test.js.map +0 -1
- package/dist/loader/__tests__/documentation-loader.integration.test.d.ts +0 -2
- package/dist/loader/__tests__/documentation-loader.integration.test.d.ts.map +0 -1
- package/dist/loader/__tests__/documentation-loader.integration.test.js +0 -498
- package/dist/loader/__tests__/documentation-loader.integration.test.js.map +0 -1
- package/dist/loader/__tests__/documentation-loader.property.test.d.ts +0 -2
- package/dist/loader/__tests__/documentation-loader.property.test.d.ts.map +0 -1
- package/dist/loader/__tests__/documentation-loader.property.test.js +0 -258
- package/dist/loader/__tests__/documentation-loader.property.test.js.map +0 -1
- package/dist/loader/__tests__/errors.test.d.ts +0 -2
- package/dist/loader/__tests__/errors.test.d.ts.map +0 -1
- package/dist/loader/__tests__/errors.test.js +0 -132
- package/dist/loader/__tests__/errors.test.js.map +0 -1
- package/dist/loader/__tests__/http-client.property.test.d.ts +0 -2
- package/dist/loader/__tests__/http-client.property.test.d.ts.map +0 -1
- package/dist/loader/__tests__/http-client.property.test.js +0 -288
- package/dist/loader/__tests__/http-client.property.test.js.map +0 -1
- package/dist/loader/__tests__/http-client.test.d.ts +0 -2
- package/dist/loader/__tests__/http-client.test.d.ts.map +0 -1
- package/dist/loader/__tests__/http-client.test.js +0 -497
- package/dist/loader/__tests__/http-client.test.js.map +0 -1
- package/dist/loader/__tests__/local-documentation-source.property.test.d.ts +0 -2
- package/dist/loader/__tests__/local-documentation-source.property.test.d.ts.map +0 -1
- package/dist/loader/__tests__/local-documentation-source.property.test.js +0 -373
- package/dist/loader/__tests__/local-documentation-source.property.test.js.map +0 -1
- package/dist/loader/__tests__/local-documentation-source.test.d.ts +0 -2
- package/dist/loader/__tests__/local-documentation-source.test.d.ts.map +0 -1
- package/dist/loader/__tests__/local-documentation-source.test.js +0 -544
- package/dist/loader/__tests__/local-documentation-source.test.js.map +0 -1
- package/dist/loader/__tests__/path-type-detector.property.test.d.ts +0 -2
- package/dist/loader/__tests__/path-type-detector.property.test.d.ts.map +0 -1
- package/dist/loader/__tests__/path-type-detector.property.test.js +0 -245
- package/dist/loader/__tests__/path-type-detector.property.test.js.map +0 -1
- package/dist/loader/__tests__/path-type-detector.test.d.ts +0 -2
- package/dist/loader/__tests__/path-type-detector.test.d.ts.map +0 -1
- package/dist/loader/__tests__/path-type-detector.test.js +0 -390
- package/dist/loader/__tests__/path-type-detector.test.js.map +0 -1
- package/dist/loader/__tests__/remote-documentation-source.property.test.d.ts +0 -2
- package/dist/loader/__tests__/remote-documentation-source.property.test.d.ts.map +0 -1
- package/dist/loader/__tests__/remote-documentation-source.property.test.js +0 -462
- package/dist/loader/__tests__/remote-documentation-source.property.test.js.map +0 -1
- package/dist/loader/__tests__/remote-documentation-source.test.d.ts +0 -2
- package/dist/loader/__tests__/remote-documentation-source.test.d.ts.map +0 -1
- package/dist/loader/__tests__/remote-documentation-source.test.js +0 -707
- package/dist/loader/__tests__/remote-documentation-source.test.js.map +0 -1
- package/dist/loader/cache-manager.d.ts +0 -74
- package/dist/loader/cache-manager.d.ts.map +0 -1
- package/dist/loader/cache-manager.js +0 -107
- package/dist/loader/cache-manager.js.map +0 -1
- package/dist/loader/documentation-loader.d.ts +0 -57
- package/dist/loader/documentation-loader.d.ts.map +0 -1
- package/dist/loader/documentation-loader.js +0 -81
- package/dist/loader/documentation-loader.js.map +0 -1
- package/dist/loader/documentation-source.d.ts +0 -37
- package/dist/loader/documentation-source.d.ts.map +0 -1
- package/dist/loader/documentation-source.js +0 -2
- package/dist/loader/documentation-source.js.map +0 -1
- package/dist/loader/errors.d.ts +0 -34
- package/dist/loader/errors.d.ts.map +0 -1
- package/dist/loader/errors.js +0 -65
- package/dist/loader/errors.js.map +0 -1
- package/dist/loader/http-client.d.ts +0 -43
- package/dist/loader/http-client.d.ts.map +0 -1
- package/dist/loader/http-client.js +0 -144
- package/dist/loader/http-client.js.map +0 -1
- package/dist/loader/index.d.ts +0 -6
- package/dist/loader/index.d.ts.map +0 -1
- package/dist/loader/index.js +0 -5
- package/dist/loader/index.js.map +0 -1
- package/dist/loader/local-documentation-source.d.ts +0 -62
- package/dist/loader/local-documentation-source.d.ts.map +0 -1
- package/dist/loader/local-documentation-source.js +0 -190
- package/dist/loader/local-documentation-source.js.map +0 -1
- package/dist/loader/path-type-detector.d.ts +0 -34
- package/dist/loader/path-type-detector.d.ts.map +0 -1
- package/dist/loader/path-type-detector.js +0 -78
- package/dist/loader/path-type-detector.js.map +0 -1
- package/dist/loader/remote-documentation-source.d.ts +0 -108
- package/dist/loader/remote-documentation-source.d.ts.map +0 -1
- package/dist/loader/remote-documentation-source.js +0 -249
- package/dist/loader/remote-documentation-source.js.map +0 -1
- package/dist/main.d.ts +0 -3
- package/dist/main.d.ts.map +0 -1
- package/dist/main.js.map +0 -1
- package/dist/mcp/__tests__/server.property.test.d.ts +0 -2
- package/dist/mcp/__tests__/server.property.test.d.ts.map +0 -1
- package/dist/mcp/__tests__/server.property.test.js +0 -286
- package/dist/mcp/__tests__/server.property.test.js.map +0 -1
- package/dist/mcp/__tests__/server.test.d.ts +0 -2
- package/dist/mcp/__tests__/server.test.d.ts.map +0 -1
- package/dist/mcp/__tests__/server.test.js +0 -101
- package/dist/mcp/__tests__/server.test.js.map +0 -1
- package/dist/mcp/index.d.ts +0 -5
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/index.js +0 -5
- package/dist/mcp/index.js.map +0 -1
- package/dist/mcp/server.d.ts +0 -65
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/mcp/server.js +0 -242
- package/dist/mcp/server.js.map +0 -1
- package/dist/publish/__tests__/publish-utils.test.d.ts +0 -5
- package/dist/publish/__tests__/publish-utils.test.d.ts.map +0 -1
- package/dist/publish/__tests__/publish-utils.test.js +0 -189
- package/dist/publish/__tests__/publish-utils.test.js.map +0 -1
- package/dist/publish/index.d.ts +0 -8
- package/dist/publish/index.d.ts.map +0 -1
- package/dist/publish/index.js +0 -8
- package/dist/publish/index.js.map +0 -1
- package/dist/publish/publish-utils.d.ts +0 -74
- package/dist/publish/publish-utils.d.ts.map +0 -1
- package/dist/publish/publish-utils.js +0 -170
- package/dist/publish/publish-utils.js.map +0 -1
- package/dist/query/__tests__/deprecation-parser.test.d.ts +0 -2
- package/dist/query/__tests__/deprecation-parser.test.d.ts.map +0 -1
- package/dist/query/__tests__/deprecation-parser.test.js +0 -154
- package/dist/query/__tests__/deprecation-parser.test.js.map +0 -1
- package/dist/query/__tests__/deprecation-query.test.d.ts +0 -2
- package/dist/query/__tests__/deprecation-query.test.d.ts.map +0 -1
- package/dist/query/__tests__/deprecation-query.test.js +0 -199
- package/dist/query/__tests__/deprecation-query.test.js.map +0 -1
- package/dist/query/__tests__/index-builder-debug.test.d.ts +0 -2
- package/dist/query/__tests__/index-builder-debug.test.d.ts.map +0 -1
- package/dist/query/__tests__/index-builder-debug.test.js +0 -34
- package/dist/query/__tests__/index-builder-debug.test.js.map +0 -1
- package/dist/query/__tests__/index-builder.property.test.d.ts +0 -2
- package/dist/query/__tests__/index-builder.property.test.d.ts.map +0 -1
- package/dist/query/__tests__/index-builder.property.test.js +0 -422
- package/dist/query/__tests__/index-builder.property.test.js.map +0 -1
- package/dist/query/__tests__/index-builder.test.d.ts +0 -2
- package/dist/query/__tests__/index-builder.test.d.ts.map +0 -1
- package/dist/query/__tests__/index-builder.test.js +0 -55
- package/dist/query/__tests__/index-builder.test.js.map +0 -1
- package/dist/query/__tests__/result-formatter-deprecation.test.d.ts +0 -2
- package/dist/query/__tests__/result-formatter-deprecation.test.d.ts.map +0 -1
- package/dist/query/__tests__/result-formatter-deprecation.test.js +0 -159
- package/dist/query/__tests__/result-formatter-deprecation.test.js.map +0 -1
- package/dist/query/__tests__/result-formatter.integration.test.d.ts +0 -2
- package/dist/query/__tests__/result-formatter.integration.test.d.ts.map +0 -1
- package/dist/query/__tests__/result-formatter.integration.test.js +0 -140
- package/dist/query/__tests__/result-formatter.integration.test.js.map +0 -1
- package/dist/query/__tests__/result-formatter.property.test.d.ts +0 -2
- package/dist/query/__tests__/result-formatter.property.test.d.ts.map +0 -1
- package/dist/query/__tests__/result-formatter.property.test.js +0 -163
- package/dist/query/__tests__/result-formatter.property.test.js.map +0 -1
- package/dist/query/__tests__/result-formatter.test.d.ts +0 -2
- package/dist/query/__tests__/result-formatter.test.d.ts.map +0 -1
- package/dist/query/__tests__/result-formatter.test.js +0 -85
- package/dist/query/__tests__/result-formatter.test.js.map +0 -1
- package/dist/query/__tests__/search-engine.property.test.d.ts +0 -2
- package/dist/query/__tests__/search-engine.property.test.d.ts.map +0 -1
- package/dist/query/__tests__/search-engine.property.test.js +0 -389
- package/dist/query/__tests__/search-engine.property.test.js.map +0 -1
- package/dist/query/component-query.d.ts +0 -33
- package/dist/query/component-query.d.ts.map +0 -1
- package/dist/query/component-query.js +0 -63
- package/dist/query/component-query.js.map +0 -1
- package/dist/query/deprecation-parser.d.ts +0 -46
- package/dist/query/deprecation-parser.d.ts.map +0 -1
- package/dist/query/deprecation-parser.js +0 -81
- package/dist/query/deprecation-parser.js.map +0 -1
- package/dist/query/deprecation-query.d.ts +0 -19
- package/dist/query/deprecation-query.d.ts.map +0 -1
- package/dist/query/deprecation-query.js +0 -73
- package/dist/query/deprecation-query.js.map +0 -1
- package/dist/query/index-builder.d.ts +0 -79
- package/dist/query/index-builder.d.ts.map +0 -1
- package/dist/query/index-builder.js +0 -217
- package/dist/query/index-builder.js.map +0 -1
- package/dist/query/index.d.ts +0 -5
- package/dist/query/index.d.ts.map +0 -1
- package/dist/query/index.js +0 -6
- package/dist/query/index.js.map +0 -1
- package/dist/query/result-formatter.d.ts +0 -135
- package/dist/query/result-formatter.d.ts.map +0 -1
- package/dist/query/result-formatter.js +0 -224
- package/dist/query/result-formatter.js.map +0 -1
- package/dist/query/search-engine.d.ts +0 -54
- package/dist/query/search-engine.d.ts.map +0 -1
- package/dist/query/search-engine.js +0 -178
- package/dist/query/search-engine.js.map +0 -1
- package/dist/tools/__tests__/deprecation-tools.test.d.ts +0 -2
- package/dist/tools/__tests__/deprecation-tools.test.d.ts.map +0 -1
- package/dist/tools/__tests__/deprecation-tools.test.js +0 -178
- package/dist/tools/__tests__/deprecation-tools.test.js.map +0 -1
- package/dist/tools/__tests__/get-component-docs.property.test.d.ts +0 -2
- package/dist/tools/__tests__/get-component-docs.property.test.d.ts.map +0 -1
- package/dist/tools/__tests__/get-component-docs.property.test.js +0 -594
- package/dist/tools/__tests__/get-component-docs.property.test.js.map +0 -1
- package/dist/tools/__tests__/get-component-docs.test.d.ts +0 -2
- package/dist/tools/__tests__/get-component-docs.test.d.ts.map +0 -1
- package/dist/tools/__tests__/get-component-docs.test.js +0 -137
- package/dist/tools/__tests__/get-component-docs.test.js.map +0 -1
- package/dist/tools/__tests__/get-component-examples.property.test.d.ts +0 -2
- package/dist/tools/__tests__/get-component-examples.property.test.d.ts.map +0 -1
- package/dist/tools/__tests__/get-component-examples.property.test.js +0 -245
- package/dist/tools/__tests__/get-component-examples.property.test.js.map +0 -1
- package/dist/tools/__tests__/get-component-examples.test.d.ts +0 -2
- package/dist/tools/__tests__/get-component-examples.test.d.ts.map +0 -1
- package/dist/tools/__tests__/get-component-examples.test.js +0 -128
- package/dist/tools/__tests__/get-component-examples.test.js.map +0 -1
- package/dist/tools/__tests__/get-component-inputs.property.test.d.ts +0 -2
- package/dist/tools/__tests__/get-component-inputs.property.test.d.ts.map +0 -1
- package/dist/tools/__tests__/get-component-inputs.property.test.js +0 -310
- package/dist/tools/__tests__/get-component-inputs.property.test.js.map +0 -1
- package/dist/tools/__tests__/get-component-inputs.test.d.ts +0 -2
- package/dist/tools/__tests__/get-component-inputs.test.d.ts.map +0 -1
- package/dist/tools/__tests__/get-component-inputs.test.js +0 -245
- package/dist/tools/__tests__/get-component-inputs.test.js.map +0 -1
- package/dist/tools/__tests__/get-component-outputs.property.test.d.ts +0 -2
- package/dist/tools/__tests__/get-component-outputs.property.test.d.ts.map +0 -1
- package/dist/tools/__tests__/get-component-outputs.property.test.js +0 -227
- package/dist/tools/__tests__/get-component-outputs.property.test.js.map +0 -1
- package/dist/tools/__tests__/get-component-outputs.test.d.ts +0 -2
- package/dist/tools/__tests__/get-component-outputs.test.d.ts.map +0 -1
- package/dist/tools/__tests__/get-component-outputs.test.js +0 -189
- package/dist/tools/__tests__/get-component-outputs.test.js.map +0 -1
- package/dist/tools/__tests__/get-library-version.property.test.d.ts +0 -2
- package/dist/tools/__tests__/get-library-version.property.test.d.ts.map +0 -1
- package/dist/tools/__tests__/get-library-version.property.test.js +0 -115
- package/dist/tools/__tests__/get-library-version.property.test.js.map +0 -1
- package/dist/tools/__tests__/get-library-version.test.d.ts +0 -2
- package/dist/tools/__tests__/get-library-version.test.d.ts.map +0 -1
- package/dist/tools/__tests__/get-library-version.test.js +0 -97
- package/dist/tools/__tests__/get-library-version.test.js.map +0 -1
- package/dist/tools/__tests__/list-components.property.test.d.ts +0 -2
- package/dist/tools/__tests__/list-components.property.test.d.ts.map +0 -1
- package/dist/tools/__tests__/list-components.property.test.js +0 -241
- package/dist/tools/__tests__/list-components.property.test.js.map +0 -1
- package/dist/tools/__tests__/list-components.test.d.ts +0 -2
- package/dist/tools/__tests__/list-components.test.d.ts.map +0 -1
- package/dist/tools/__tests__/list-components.test.js +0 -170
- package/dist/tools/__tests__/list-components.test.js.map +0 -1
- package/dist/tools/__tests__/search-components.test.d.ts +0 -2
- package/dist/tools/__tests__/search-components.test.d.ts.map +0 -1
- package/dist/tools/__tests__/search-components.test.js +0 -239
- package/dist/tools/__tests__/search-components.test.js.map +0 -1
- package/dist/tools/get-component-docs.d.ts +0 -43
- package/dist/tools/get-component-docs.d.ts.map +0 -1
- package/dist/tools/get-component-docs.js +0 -55
- package/dist/tools/get-component-docs.js.map +0 -1
- package/dist/tools/get-component-examples.d.ts +0 -45
- package/dist/tools/get-component-examples.d.ts.map +0 -1
- package/dist/tools/get-component-examples.js +0 -56
- package/dist/tools/get-component-examples.js.map +0 -1
- package/dist/tools/get-component-inputs.d.ts +0 -44
- package/dist/tools/get-component-inputs.d.ts.map +0 -1
- package/dist/tools/get-component-inputs.js +0 -55
- package/dist/tools/get-component-inputs.js.map +0 -1
- package/dist/tools/get-component-outputs.d.ts +0 -44
- package/dist/tools/get-component-outputs.d.ts.map +0 -1
- package/dist/tools/get-component-outputs.js +0 -55
- package/dist/tools/get-component-outputs.js.map +0 -1
- package/dist/tools/get-deprecation-info.d.ts +0 -42
- package/dist/tools/get-deprecation-info.d.ts.map +0 -1
- package/dist/tools/get-deprecation-info.js +0 -55
- package/dist/tools/get-deprecation-info.js.map +0 -1
- package/dist/tools/get-eui-cli-guide.d.ts +0 -32
- package/dist/tools/get-eui-cli-guide.d.ts.map +0 -1
- package/dist/tools/get-eui-cli-guide.js +0 -160
- package/dist/tools/get-eui-cli-guide.js.map +0 -1
- package/dist/tools/get-eui-cli-instructions.d.ts +0 -32
- package/dist/tools/get-eui-cli-instructions.d.ts.map +0 -1
- package/dist/tools/get-eui-cli-instructions.js +0 -375
- package/dist/tools/get-eui-cli-instructions.js.map +0 -1
- package/dist/tools/get-library-version.d.ts +0 -33
- package/dist/tools/get-library-version.d.ts.map +0 -1
- package/dist/tools/get-library-version.js +0 -62
- package/dist/tools/get-library-version.js.map +0 -1
- package/dist/tools/index.d.ts +0 -12
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -13
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/list-components.d.ts +0 -69
- package/dist/tools/list-components.d.ts.map +0 -1
- package/dist/tools/list-components.js +0 -84
- package/dist/tools/list-components.js.map +0 -1
- package/dist/tools/list-deprecated.d.ts +0 -47
- package/dist/tools/list-deprecated.d.ts.map +0 -1
- package/dist/tools/list-deprecated.js +0 -56
- package/dist/tools/list-deprecated.js.map +0 -1
- package/dist/tools/search-components.d.ts +0 -69
- package/dist/tools/search-components.d.ts.map +0 -1
- package/dist/tools/search-components.js +0 -98
- package/dist/tools/search-components.js.map +0 -1
- package/dist/types/compodoc.d.ts +0 -262
- package/dist/types/compodoc.d.ts.map +0 -1
- package/dist/types/compodoc.js +0 -5
- package/dist/types/compodoc.js.map +0 -1
- package/dist/types/deprecation.d.ts +0 -33
- package/dist/types/deprecation.d.ts.map +0 -1
- package/dist/types/deprecation.js +0 -5
- package/dist/types/deprecation.js.map +0 -1
- package/dist/types/index.d.ts +0 -5
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -5
- package/dist/types/index.js.map +0 -1
- package/dist/utils/__tests__/credential-masking.property.test.d.ts +0 -2
- package/dist/utils/__tests__/credential-masking.property.test.d.ts.map +0 -1
- package/dist/utils/__tests__/credential-masking.property.test.js +0 -145
- package/dist/utils/__tests__/credential-masking.property.test.js.map +0 -1
- package/dist/utils/__tests__/credential-masking.test.d.ts +0 -2
- package/dist/utils/__tests__/credential-masking.test.d.ts.map +0 -1
- package/dist/utils/__tests__/credential-masking.test.js +0 -188
- package/dist/utils/__tests__/credential-masking.test.js.map +0 -1
- package/dist/utils/__tests__/errors.test.d.ts +0 -2
- package/dist/utils/__tests__/errors.test.d.ts.map +0 -1
- package/dist/utils/__tests__/errors.test.js +0 -110
- package/dist/utils/__tests__/errors.test.js.map +0 -1
- package/dist/utils/__tests__/integration.test.d.ts +0 -2
- package/dist/utils/__tests__/integration.test.d.ts.map +0 -1
- package/dist/utils/__tests__/integration.test.js +0 -142
- package/dist/utils/__tests__/integration.test.js.map +0 -1
- package/dist/utils/__tests__/logger.test.d.ts +0 -2
- package/dist/utils/__tests__/logger.test.d.ts.map +0 -1
- package/dist/utils/__tests__/logger.test.js +0 -119
- package/dist/utils/__tests__/logger.test.js.map +0 -1
- package/dist/utils/__tests__/retry.test.d.ts +0 -2
- package/dist/utils/__tests__/retry.test.d.ts.map +0 -1
- package/dist/utils/__tests__/retry.test.js +0 -84
- package/dist/utils/__tests__/retry.test.js.map +0 -1
- package/dist/utils/circuit-breaker.d.ts +0 -91
- package/dist/utils/circuit-breaker.d.ts.map +0 -1
- package/dist/utils/circuit-breaker.js +0 -186
- package/dist/utils/circuit-breaker.js.map +0 -1
- package/dist/utils/credential-masking.d.ts +0 -90
- package/dist/utils/credential-masking.d.ts.map +0 -1
- package/dist/utils/credential-masking.js +0 -202
- package/dist/utils/credential-masking.js.map +0 -1
- package/dist/utils/error-handler.d.ts +0 -68
- package/dist/utils/error-handler.d.ts.map +0 -1
- package/dist/utils/error-handler.js +0 -184
- package/dist/utils/error-handler.js.map +0 -1
- package/dist/utils/errors.d.ts +0 -156
- package/dist/utils/errors.d.ts.map +0 -1
- package/dist/utils/errors.js +0 -242
- package/dist/utils/errors.js.map +0 -1
- package/dist/utils/index.d.ts +0 -10
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -16
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -76
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -150
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/retry.d.ts +0 -19
- package/dist/utils/retry.d.ts.map +0 -1
- package/dist/utils/retry.js +0 -81
- package/dist/utils/retry.js.map +0 -1
- package/dist/version/__tests__/changelog-commit-grouping.property.test.d.ts +0 -2
- package/dist/version/__tests__/changelog-commit-grouping.property.test.d.ts.map +0 -1
- package/dist/version/__tests__/changelog-commit-grouping.property.test.js +0 -297
- package/dist/version/__tests__/changelog-commit-grouping.property.test.js.map +0 -1
- package/dist/version/__tests__/changelog-commit-parsing.property.test.d.ts +0 -2
- package/dist/version/__tests__/changelog-commit-parsing.property.test.d.ts.map +0 -1
- package/dist/version/__tests__/changelog-commit-parsing.property.test.js +0 -396
- package/dist/version/__tests__/changelog-commit-parsing.property.test.js.map +0 -1
- package/dist/version/__tests__/changelog-file-updates.property.test.d.ts +0 -11
- package/dist/version/__tests__/changelog-file-updates.property.test.d.ts.map +0 -1
- package/dist/version/__tests__/changelog-file-updates.property.test.js +0 -452
- package/dist/version/__tests__/changelog-file-updates.property.test.js.map +0 -1
- package/dist/version/__tests__/dry-run-action.property.test.d.ts +0 -8
- package/dist/version/__tests__/dry-run-action.property.test.d.ts.map +0 -1
- package/dist/version/__tests__/dry-run-action.property.test.js +0 -50
- package/dist/version/__tests__/dry-run-action.property.test.js.map +0 -1
- package/dist/version/__tests__/dry-run-changelog.property.test.d.ts +0 -8
- package/dist/version/__tests__/dry-run-changelog.property.test.d.ts.map +0 -1
- package/dist/version/__tests__/dry-run-changelog.property.test.js +0 -53
- package/dist/version/__tests__/dry-run-changelog.property.test.js.map +0 -1
- package/dist/version/__tests__/dry-run-utils.test.d.ts +0 -7
- package/dist/version/__tests__/dry-run-utils.test.d.ts.map +0 -1
- package/dist/version/__tests__/dry-run-utils.test.js +0 -205
- package/dist/version/__tests__/dry-run-utils.test.js.map +0 -1
- package/dist/version/__tests__/dry-run-version.property.test.d.ts +0 -8
- package/dist/version/__tests__/dry-run-version.property.test.d.ts.map +0 -1
- package/dist/version/__tests__/dry-run-version.property.test.js +0 -59
- package/dist/version/__tests__/dry-run-version.property.test.js.map +0 -1
- package/dist/version/__tests__/git-tag-annotation.property.test.d.ts +0 -11
- package/dist/version/__tests__/git-tag-annotation.property.test.d.ts.map +0 -1
- package/dist/version/__tests__/git-tag-annotation.property.test.js +0 -271
- package/dist/version/__tests__/git-tag-annotation.property.test.js.map +0 -1
- package/dist/version/__tests__/git-tag-format.property.test.d.ts +0 -11
- package/dist/version/__tests__/git-tag-format.property.test.d.ts.map +0 -1
- package/dist/version/__tests__/git-tag-format.property.test.js +0 -411
- package/dist/version/__tests__/git-tag-format.property.test.js.map +0 -1
- package/dist/version/__tests__/git-tag-utils.test.d.ts +0 -2
- package/dist/version/__tests__/git-tag-utils.test.d.ts.map +0 -1
- package/dist/version/__tests__/git-tag-utils.test.js +0 -142
- package/dist/version/__tests__/git-tag-utils.test.js.map +0 -1
- package/dist/version/__tests__/npm-tag-selection.property.test.d.ts +0 -2
- package/dist/version/__tests__/npm-tag-selection.property.test.d.ts.map +0 -1
- package/dist/version/__tests__/npm-tag-selection.property.test.js +0 -79
- package/dist/version/__tests__/npm-tag-selection.property.test.js.map +0 -1
- package/dist/version/__tests__/release-title-format.property.test.d.ts +0 -11
- package/dist/version/__tests__/release-title-format.property.test.d.ts.map +0 -1
- package/dist/version/__tests__/release-title-format.property.test.js +0 -422
- package/dist/version/__tests__/release-title-format.property.test.js.map +0 -1
- package/dist/version/__tests__/release-utils.test.d.ts +0 -7
- package/dist/version/__tests__/release-utils.test.d.ts.map +0 -1
- package/dist/version/__tests__/release-utils.test.js +0 -176
- package/dist/version/__tests__/release-utils.test.js.map +0 -1
- package/dist/version/__tests__/rollback-changelog.property.test.d.ts +0 -8
- package/dist/version/__tests__/rollback-changelog.property.test.d.ts.map +0 -1
- package/dist/version/__tests__/rollback-changelog.property.test.js +0 -61
- package/dist/version/__tests__/rollback-changelog.property.test.js.map +0 -1
- package/dist/version/__tests__/rollback-utils.test.d.ts +0 -7
- package/dist/version/__tests__/rollback-utils.test.d.ts.map +0 -1
- package/dist/version/__tests__/rollback-utils.test.js +0 -74
- package/dist/version/__tests__/rollback-utils.test.js.map +0 -1
- package/dist/version/__tests__/version-manager.property.test.d.ts +0 -2
- package/dist/version/__tests__/version-manager.property.test.d.ts.map +0 -1
- package/dist/version/__tests__/version-manager.property.test.js +0 -143
- package/dist/version/__tests__/version-manager.property.test.js.map +0 -1
- package/dist/version/__tests__/version-manager.test.d.ts +0 -2
- package/dist/version/__tests__/version-manager.test.d.ts.map +0 -1
- package/dist/version/__tests__/version-manager.test.js +0 -203
- package/dist/version/__tests__/version-manager.test.js.map +0 -1
- package/dist/version/changelog-file-utils.d.ts +0 -69
- package/dist/version/changelog-file-utils.d.ts.map +0 -1
- package/dist/version/changelog-file-utils.js +0 -161
- package/dist/version/changelog-file-utils.js.map +0 -1
- package/dist/version/changelog-utils.d.ts +0 -98
- package/dist/version/changelog-utils.d.ts.map +0 -1
- package/dist/version/changelog-utils.js +0 -198
- package/dist/version/changelog-utils.js.map +0 -1
- package/dist/version/dry-run-utils.d.ts +0 -108
- package/dist/version/dry-run-utils.d.ts.map +0 -1
- package/dist/version/dry-run-utils.js +0 -126
- package/dist/version/dry-run-utils.js.map +0 -1
- package/dist/version/git-tag-utils.d.ts +0 -50
- package/dist/version/git-tag-utils.d.ts.map +0 -1
- package/dist/version/git-tag-utils.js +0 -66
- package/dist/version/git-tag-utils.js.map +0 -1
- package/dist/version/index.d.ts +0 -11
- package/dist/version/index.d.ts.map +0 -1
- package/dist/version/index.js +0 -11
- package/dist/version/index.js.map +0 -1
- package/dist/version/release-utils.d.ts +0 -94
- package/dist/version/release-utils.d.ts.map +0 -1
- package/dist/version/release-utils.js +0 -170
- package/dist/version/release-utils.js.map +0 -1
- package/dist/version/rollback-utils.d.ts +0 -47
- package/dist/version/rollback-utils.d.ts.map +0 -1
- package/dist/version/rollback-utils.js +0 -73
- package/dist/version/rollback-utils.js.map +0 -1
- package/dist/version/version-manager.d.ts +0 -98
- package/dist/version/version-manager.d.ts.map +0 -1
- package/dist/version/version-manager.js +0 -154
- package/dist/version/version-manager.js.map +0 -1
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ResultFormatter class
|
|
3
|
-
* Formats query results into structured responses
|
|
4
|
-
*/
|
|
5
|
-
export class ResultFormatter {
|
|
6
|
-
/**
|
|
7
|
-
* Get the preferred description, favoring rawdescription over description
|
|
8
|
-
* @param obj - Object that may contain description and/or rawdescription properties
|
|
9
|
-
* @returns The preferred description string, or empty string if neither exists
|
|
10
|
-
*/
|
|
11
|
-
getPreferredDescription(obj) {
|
|
12
|
-
return obj.rawdescription ?? obj.description ?? '';
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Format a list of documents as summaries
|
|
16
|
-
*/
|
|
17
|
-
formatList(docs, includeDeprecated = false) {
|
|
18
|
-
return docs
|
|
19
|
-
.filter((doc) => includeDeprecated || !doc.deprecated)
|
|
20
|
-
.map((doc) => this.formatSummary(doc));
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Format a single document as a summary
|
|
24
|
-
*/
|
|
25
|
-
formatSummary(doc) {
|
|
26
|
-
// Map 'injectable' to 'service' for output
|
|
27
|
-
const type = doc.type === 'injectable' ? 'service' : doc.type;
|
|
28
|
-
return {
|
|
29
|
-
name: doc.name,
|
|
30
|
-
type: type,
|
|
31
|
-
selector: 'selector' in doc ? doc.selector : undefined,
|
|
32
|
-
description: this.getPreferredDescription(doc),
|
|
33
|
-
deprecated: doc.deprecated,
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Format a document with full details
|
|
38
|
-
*/
|
|
39
|
-
formatDetails(doc) {
|
|
40
|
-
const inputs = this.formatInputs(doc);
|
|
41
|
-
const outputs = this.formatOutputs(doc);
|
|
42
|
-
const methods = this.formatMethods(doc);
|
|
43
|
-
const examples = this.formatExamples(doc);
|
|
44
|
-
// Map 'injectable' to 'service' for output
|
|
45
|
-
const type = doc.type === 'injectable' ? 'service' : doc.type;
|
|
46
|
-
return {
|
|
47
|
-
name: doc.name,
|
|
48
|
-
type: type,
|
|
49
|
-
selector: 'selector' in doc ? doc.selector : undefined,
|
|
50
|
-
description: this.getPreferredDescription(doc),
|
|
51
|
-
inputs,
|
|
52
|
-
outputs,
|
|
53
|
-
methods,
|
|
54
|
-
examples,
|
|
55
|
-
deprecated: doc.deprecated,
|
|
56
|
-
deprecationMessage: doc.deprecationMessage,
|
|
57
|
-
standalone: 'standalone' in doc ? doc.standalone : undefined,
|
|
58
|
-
imports: 'imports' in doc ? doc.imports : undefined,
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Format inputs as property summaries
|
|
63
|
-
* Checks both 'inputs' (metadata inputs) and 'inputsClass' (modern @Input() decorator)
|
|
64
|
-
*/
|
|
65
|
-
formatInputs(doc) {
|
|
66
|
-
const inputs = [];
|
|
67
|
-
// Check metadata inputs (defined in @Component decorator)
|
|
68
|
-
if ('inputs' in doc && doc.inputs) {
|
|
69
|
-
inputs.push(...doc.inputs.map((input) => this.formatProperty(input)));
|
|
70
|
-
}
|
|
71
|
-
// Check class inputs (modern @Input() decorator)
|
|
72
|
-
if ('inputsClass' in doc && doc.inputsClass) {
|
|
73
|
-
inputs.push(...doc.inputsClass.map((input) => this.formatProperty(input)));
|
|
74
|
-
}
|
|
75
|
-
return inputs;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Format outputs as property summaries
|
|
79
|
-
* Checks both 'outputs' (metadata outputs) and 'outputsClass' (modern @Output() decorator)
|
|
80
|
-
*/
|
|
81
|
-
formatOutputs(doc) {
|
|
82
|
-
const outputs = [];
|
|
83
|
-
// Check metadata outputs (defined in @Component/@Directive decorator)
|
|
84
|
-
if ('outputs' in doc && doc.outputs) {
|
|
85
|
-
outputs.push(...doc.outputs.map((output) => this.formatProperty(output)));
|
|
86
|
-
}
|
|
87
|
-
// Check class outputs (modern @Output() decorator)
|
|
88
|
-
if ('outputsClass' in doc && doc.outputsClass) {
|
|
89
|
-
outputs.push(...doc.outputsClass.map((output) => this.formatProperty(output)));
|
|
90
|
-
}
|
|
91
|
-
return outputs;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Format a property
|
|
95
|
-
*/
|
|
96
|
-
formatProperty(prop) {
|
|
97
|
-
return {
|
|
98
|
-
name: prop.name,
|
|
99
|
-
type: prop.type || 'any',
|
|
100
|
-
required: !prop.optional,
|
|
101
|
-
description: this.getPreferredDescription(prop),
|
|
102
|
-
defaultValue: prop.defaultValue,
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Format methods as method summaries
|
|
107
|
-
*/
|
|
108
|
-
formatMethods(doc) {
|
|
109
|
-
if (!('methods' in doc) || !doc.methods) {
|
|
110
|
-
return [];
|
|
111
|
-
}
|
|
112
|
-
return doc.methods.map((method) => this.formatMethod(method));
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Format a method
|
|
116
|
-
*/
|
|
117
|
-
formatMethod(method) {
|
|
118
|
-
const parameters = (method.args || []).map((arg) => ({
|
|
119
|
-
name: arg.name,
|
|
120
|
-
type: arg.type || 'any',
|
|
121
|
-
optional: arg.optional || false,
|
|
122
|
-
defaultValue: arg.defaultValue,
|
|
123
|
-
}));
|
|
124
|
-
const paramSignature = parameters
|
|
125
|
-
.map((p) => {
|
|
126
|
-
const optional = p.optional ? '?' : '';
|
|
127
|
-
const defaultVal = p.defaultValue ? ` = ${p.defaultValue}` : '';
|
|
128
|
-
return `${p.name}${optional}: ${p.type}${defaultVal}`;
|
|
129
|
-
})
|
|
130
|
-
.join(', ');
|
|
131
|
-
const signature = `${method.name}(${paramSignature}): ${method.returnType || 'void'}`;
|
|
132
|
-
return {
|
|
133
|
-
name: method.name,
|
|
134
|
-
signature,
|
|
135
|
-
description: this.getPreferredDescription(method),
|
|
136
|
-
parameters,
|
|
137
|
-
returnType: method.returnType || 'void',
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Format examples
|
|
142
|
-
*/
|
|
143
|
-
formatExamples(doc) {
|
|
144
|
-
if (!('examples' in doc) || !doc.examples) {
|
|
145
|
-
return [];
|
|
146
|
-
}
|
|
147
|
-
return doc.examples;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Format search results
|
|
151
|
-
*/
|
|
152
|
-
formatSearchResults(results) {
|
|
153
|
-
return results.map((result) => {
|
|
154
|
-
// Map 'injectable' to 'service' for output
|
|
155
|
-
const type = result.doc.type === 'injectable' ? 'service' : result.doc.type;
|
|
156
|
-
return {
|
|
157
|
-
name: result.doc.name,
|
|
158
|
-
type: type,
|
|
159
|
-
selector: 'selector' in result.doc ? result.doc.selector : undefined,
|
|
160
|
-
description: this.getPreferredDescription(result.doc),
|
|
161
|
-
deprecated: result.doc.deprecated,
|
|
162
|
-
relevanceScore: result.relevanceScore,
|
|
163
|
-
};
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Format as JSON string
|
|
168
|
-
*/
|
|
169
|
-
toJSON(data) {
|
|
170
|
-
return JSON.stringify(data, null, 2);
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Formats a list of deprecated items
|
|
174
|
-
*/
|
|
175
|
-
formatDeprecatedList(items, includeReplacements) {
|
|
176
|
-
if (items.length === 0) {
|
|
177
|
-
return 'No deprecated items found.';
|
|
178
|
-
}
|
|
179
|
-
const grouped = items.reduce((acc, item) => {
|
|
180
|
-
if (!acc[item.type]) {
|
|
181
|
-
acc[item.type] = [];
|
|
182
|
-
}
|
|
183
|
-
acc[item.type].push(item);
|
|
184
|
-
return acc;
|
|
185
|
-
}, {});
|
|
186
|
-
let output = `Found ${items.length} deprecated item(s):\n\n`;
|
|
187
|
-
for (const [type, typeItems] of Object.entries(grouped)) {
|
|
188
|
-
output += `## ${type.charAt(0).toUpperCase() + type.slice(1)}s\n\n`;
|
|
189
|
-
for (const item of typeItems) {
|
|
190
|
-
output += `### ${item.name}\n`;
|
|
191
|
-
output += `- **Message**: ${item.deprecationMessage}\n`;
|
|
192
|
-
if (item.versionDeprecated) {
|
|
193
|
-
output += `- **Deprecated in**: v${item.versionDeprecated}\n`;
|
|
194
|
-
}
|
|
195
|
-
if (includeReplacements && item.replacementSuggestion) {
|
|
196
|
-
output += `- **Replacement**: ${item.replacementSuggestion}\n`;
|
|
197
|
-
}
|
|
198
|
-
output += '\n';
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
return output;
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Formats detailed deprecation information
|
|
205
|
-
*/
|
|
206
|
-
formatDeprecationInfo(info) {
|
|
207
|
-
if (!info.isDeprecated) {
|
|
208
|
-
return `${info.name} (${info.type}) is not deprecated.`;
|
|
209
|
-
}
|
|
210
|
-
let output = `# ${info.name} (${info.type})\n\n`;
|
|
211
|
-
output += `**Status**: DEPRECATED\n\n`;
|
|
212
|
-
if (info.deprecationMessage) {
|
|
213
|
-
output += `**Message**: ${info.deprecationMessage}\n\n`;
|
|
214
|
-
}
|
|
215
|
-
if (info.versionDeprecated) {
|
|
216
|
-
output += `**Deprecated in**: v${info.versionDeprecated}\n\n`;
|
|
217
|
-
}
|
|
218
|
-
if (info.replacementSuggestion) {
|
|
219
|
-
output += `**Recommended replacement**: ${info.replacementSuggestion}\n\n`;
|
|
220
|
-
}
|
|
221
|
-
return output;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
//# sourceMappingURL=result-formatter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"result-formatter.js","sourceRoot":"","sources":["../../src/query/result-formatter.ts"],"names":[],"mappings":"AA8DA;;;GAGG;AACH,MAAM,OAAO,eAAe;IAC1B;;;;OAIG;IACK,uBAAuB,CAAC,GAAsD;QACpF,OAAO,GAAG,CAAC,cAAc,IAAI,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC;IACrD,CAAC;IAED;;OAEG;IACH,UAAU,CAAC,IAAoB,EAAE,oBAA6B,KAAK;QACjE,OAAO,IAAI;aACR,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,iBAAiB,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC;aACrD,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3C,CAAC;IAED;;OAEG;IACH,aAAa,CAAC,GAAiB;QAC7B,2CAA2C;QAC3C,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;QAE9D,OAAO;YACL,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,IAAI,EAAE,IAAsD;YAC5D,QAAQ,EAAE,UAAU,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;YACtD,WAAW,EAAE,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC;YAC9C,UAAU,EAAE,GAAG,CAAC,UAAU;SAC3B,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,aAAa,CAAC,GAAiB;QAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,GAA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ChB,CAAC;IAED;;OAEG;IACH,qBAAqB,CAAC,IAOrB;QACC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACvB,OAAO,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,sBAAsB,CAAC;QAC1D,CAAC;QAED,IAAI,MAAM,GAAG,KAAK,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,OAAO,CAAC;QACjD,MAAM,IAAI,4BAA4B,CAAC;QAEvC,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC5B,MAAM,IAAI,gBAAgB,IAAI,CAAC,kBAAkB,MAAM,CAAC;QAC1D,CAAC;QAED,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC3B,MAAM,IAAI,uBAAuB,IAAI,CAAC,iBAAiB,MAAM,CAAC;QAChE,CAAC;QAED,IAAI,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAC/B,MAAM,IAAI,gCAAgC,IAAI,CAAC,qBAAqB,MAAM,CAAC;QAC7E,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SearchEngine - Implements search and relevance scoring
|
|
3
|
-
*/
|
|
4
|
-
import { ComponentIndex, IndexableDoc } from './index-builder.js';
|
|
5
|
-
export interface SearchOptions {
|
|
6
|
-
query: string;
|
|
7
|
-
types?: Array<'component' | 'directive' | 'pipe' | 'service'>;
|
|
8
|
-
includeDeprecated?: boolean;
|
|
9
|
-
limit?: number;
|
|
10
|
-
offset?: number;
|
|
11
|
-
}
|
|
12
|
-
export interface SearchResultItem {
|
|
13
|
-
doc: IndexableDoc;
|
|
14
|
-
relevanceScore: number;
|
|
15
|
-
}
|
|
16
|
-
export interface SearchResult {
|
|
17
|
-
items: SearchResultItem[];
|
|
18
|
-
total: number;
|
|
19
|
-
hasMore: boolean;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* SearchEngine class
|
|
23
|
-
* Implements search with relevance scoring and ranking
|
|
24
|
-
*/
|
|
25
|
-
export declare class SearchEngine {
|
|
26
|
-
private index;
|
|
27
|
-
constructor(index: ComponentIndex);
|
|
28
|
-
/**
|
|
29
|
-
* Search for components matching the query
|
|
30
|
-
*/
|
|
31
|
-
search(options: SearchOptions): SearchResult;
|
|
32
|
-
/**
|
|
33
|
-
* Get candidate documents for search
|
|
34
|
-
* Uses the inverted index to find documents containing query words
|
|
35
|
-
*/
|
|
36
|
-
private getCandidates;
|
|
37
|
-
/**
|
|
38
|
-
* Calculate relevance score for a document
|
|
39
|
-
* Based on the design document's scoring algorithm:
|
|
40
|
-
* - Exact name match: 100 points
|
|
41
|
-
* - Selector match: 80 points
|
|
42
|
-
* - Name starts with query: 60 points
|
|
43
|
-
* - Description contains query: 40 points
|
|
44
|
-
* - Input/output name match: 30 points
|
|
45
|
-
* - Method name match: 20 points
|
|
46
|
-
* - Deprecated penalty: 50% reduction
|
|
47
|
-
*/
|
|
48
|
-
private calculateRelevanceScore;
|
|
49
|
-
/**
|
|
50
|
-
* Update the index
|
|
51
|
-
*/
|
|
52
|
-
updateIndex(index: ComponentIndex): void;
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=search-engine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-engine.d.ts","sourceRoot":"","sources":["../../src/query/search-engine.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;IAC9D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,YAAY,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAAiB;gBAElB,KAAK,EAAE,cAAc;IAIjC;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,YAAY;IAoD5C;;;OAGG;IACH,OAAO,CAAC,aAAa;IAkDrB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,uBAAuB;IA4E/B;;OAEG;IACH,WAAW,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI;CAGzC"}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SearchEngine class
|
|
3
|
-
* Implements search with relevance scoring and ranking
|
|
4
|
-
*/
|
|
5
|
-
export class SearchEngine {
|
|
6
|
-
index;
|
|
7
|
-
constructor(index) {
|
|
8
|
-
this.index = index;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Search for components matching the query
|
|
12
|
-
*/
|
|
13
|
-
search(options) {
|
|
14
|
-
const { query, types, includeDeprecated = false, limit = 50, offset = 0, } = options;
|
|
15
|
-
// Normalize query to lowercase for case-insensitive search
|
|
16
|
-
const normalizedQuery = query.toLowerCase().trim();
|
|
17
|
-
if (normalizedQuery.length === 0) {
|
|
18
|
-
return {
|
|
19
|
-
items: [],
|
|
20
|
-
total: 0,
|
|
21
|
-
hasMore: false,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
// Get candidate documents
|
|
25
|
-
const candidates = this.getCandidates(normalizedQuery, types);
|
|
26
|
-
// Score and filter candidates
|
|
27
|
-
const scoredResults = [];
|
|
28
|
-
for (const doc of candidates) {
|
|
29
|
-
// Skip deprecated if not included
|
|
30
|
-
if (!includeDeprecated && doc.deprecated) {
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
const score = this.calculateRelevanceScore(doc, normalizedQuery);
|
|
34
|
-
if (score > 0) {
|
|
35
|
-
scoredResults.push({ doc, relevanceScore: score });
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
// Sort by relevance score (descending)
|
|
39
|
-
scoredResults.sort((a, b) => b.relevanceScore - a.relevanceScore);
|
|
40
|
-
// Apply pagination
|
|
41
|
-
const total = scoredResults.length;
|
|
42
|
-
const paginatedItems = scoredResults.slice(offset, offset + limit);
|
|
43
|
-
const hasMore = offset + limit < total;
|
|
44
|
-
return {
|
|
45
|
-
items: paginatedItems,
|
|
46
|
-
total,
|
|
47
|
-
hasMore,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Get candidate documents for search
|
|
52
|
-
* Uses the inverted index to find documents containing query words
|
|
53
|
-
*/
|
|
54
|
-
getCandidates(normalizedQuery, types) {
|
|
55
|
-
// Extract words from query
|
|
56
|
-
const queryWords = normalizedQuery
|
|
57
|
-
.split(/[^a-z0-9]+/)
|
|
58
|
-
.filter((word) => word.length > 0);
|
|
59
|
-
// Find all documents that contain any query word
|
|
60
|
-
const candidateNames = new Set();
|
|
61
|
-
for (const word of queryWords) {
|
|
62
|
-
// Check for exact word match
|
|
63
|
-
if (this.index.searchIndex.has(word)) {
|
|
64
|
-
const names = this.index.searchIndex.get(word);
|
|
65
|
-
for (const name of names) {
|
|
66
|
-
candidateNames.add(name);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
// Check for partial word matches (word starts with query word)
|
|
70
|
-
for (const [indexWord, names] of this.index.searchIndex.entries()) {
|
|
71
|
-
if (indexWord.startsWith(word)) {
|
|
72
|
-
for (const name of names) {
|
|
73
|
-
candidateNames.add(name);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
// Convert names to documents
|
|
79
|
-
const candidates = [];
|
|
80
|
-
for (const name of candidateNames) {
|
|
81
|
-
const doc = this.index.byName.get(name);
|
|
82
|
-
if (doc) {
|
|
83
|
-
// Filter by type if specified
|
|
84
|
-
if (types && types.length > 0) {
|
|
85
|
-
if (types.includes(doc.type)) {
|
|
86
|
-
candidates.push(doc);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
candidates.push(doc);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return candidates;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Calculate relevance score for a document
|
|
98
|
-
* Based on the design document's scoring algorithm:
|
|
99
|
-
* - Exact name match: 100 points
|
|
100
|
-
* - Selector match: 80 points
|
|
101
|
-
* - Name starts with query: 60 points
|
|
102
|
-
* - Description contains query: 40 points
|
|
103
|
-
* - Input/output name match: 30 points
|
|
104
|
-
* - Method name match: 20 points
|
|
105
|
-
* - Deprecated penalty: 50% reduction
|
|
106
|
-
*/
|
|
107
|
-
calculateRelevanceScore(doc, normalizedQuery) {
|
|
108
|
-
let score = 0;
|
|
109
|
-
const nameLower = doc.name.toLowerCase();
|
|
110
|
-
// Exact name match: 100 points
|
|
111
|
-
if (nameLower === normalizedQuery) {
|
|
112
|
-
score += 100;
|
|
113
|
-
}
|
|
114
|
-
// Selector match: 80 points
|
|
115
|
-
if ('selector' in doc && doc.selector) {
|
|
116
|
-
const selectorLower = doc.selector.toLowerCase();
|
|
117
|
-
if (selectorLower === normalizedQuery || selectorLower.includes(normalizedQuery)) {
|
|
118
|
-
score += 80;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
// Name starts with query: 60 points
|
|
122
|
-
if (nameLower.startsWith(normalizedQuery)) {
|
|
123
|
-
score += 60;
|
|
124
|
-
}
|
|
125
|
-
// Name contains query (but doesn't start with it): 30 points
|
|
126
|
-
if (!nameLower.startsWith(normalizedQuery) && nameLower.includes(normalizedQuery)) {
|
|
127
|
-
score += 30;
|
|
128
|
-
}
|
|
129
|
-
// Description contains query: 40 points
|
|
130
|
-
if (doc.description) {
|
|
131
|
-
const descriptionLower = doc.description.toLowerCase();
|
|
132
|
-
if (descriptionLower.includes(normalizedQuery)) {
|
|
133
|
-
score += 40;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
// Input/output name match: 30 points
|
|
137
|
-
if ('inputs' in doc && doc.inputs) {
|
|
138
|
-
for (const input of doc.inputs) {
|
|
139
|
-
const inputNameLower = input.name.toLowerCase();
|
|
140
|
-
if (inputNameLower.includes(normalizedQuery)) {
|
|
141
|
-
score += 30;
|
|
142
|
-
break; // Only count once
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
if ('outputs' in doc && doc.outputs) {
|
|
147
|
-
for (const output of doc.outputs) {
|
|
148
|
-
const outputNameLower = output.name.toLowerCase();
|
|
149
|
-
if (outputNameLower.includes(normalizedQuery)) {
|
|
150
|
-
score += 30;
|
|
151
|
-
break; // Only count once
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
// Method name match: 20 points
|
|
156
|
-
if ('methods' in doc && doc.methods) {
|
|
157
|
-
for (const method of doc.methods) {
|
|
158
|
-
const methodNameLower = method.name.toLowerCase();
|
|
159
|
-
if (methodNameLower.includes(normalizedQuery)) {
|
|
160
|
-
score += 20;
|
|
161
|
-
break; // Only count once
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
// Deprecated penalty: 50% reduction
|
|
166
|
-
if (doc.deprecated) {
|
|
167
|
-
score = Math.floor(score * 0.5);
|
|
168
|
-
}
|
|
169
|
-
return score;
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Update the index
|
|
173
|
-
*/
|
|
174
|
-
updateIndex(index) {
|
|
175
|
-
this.index = index;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
//# sourceMappingURL=search-engine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-engine.js","sourceRoot":"","sources":["../../src/query/search-engine.ts"],"names":[],"mappings":"AAwBA;;;GAGG;AACH,MAAM,OAAO,YAAY;IACf,KAAK,CAAiB;IAE9B,YAAY,KAAqB;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,OAAsB;QAC3B,MAAM,EACJ,KAAK,EACL,KAAK,EACL,iBAAiB,GAAG,KAAK,EACzB,KAAK,GAAG,EAAE,EACV,MAAM,GAAG,CAAC,GACX,GAAG,OAAO,CAAC;QAEZ,2DAA2D;QAC3D,MAAM,eAAe,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;QAEnD,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACjC,OAAO;gBACL,KAAK,EAAE,EAAE;gBACT,KAAK,EAAE,CAAC;gBACR,OAAO,EAAE,KAAK;aACf,CAAC;QACJ,CAAC;QAED,0BAA0B;QAC1B,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QAE9D,8BAA8B;QAC9B,MAAM,aAAa,GAAuB,EAAE,CAAC;QAC7C,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;YAC7B,kCAAkC;YAClC,IAAI,CAAC,iBAAiB,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC;gBACzC,SAAS;YACX,CAAC;YAED,MAAM,KAAK,GAAG,IAAI,CAAC,uBAAuB,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC;YACjE,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;gBACd,aAAa,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,CAAC;YACrD,CAAC;QACH,CAAC;QAED,uCAAuC;QACvC,aAAa,CAAC,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E,CAAC;oBACZ,MAAM,CAAC,kBAAkB;gBAC3B,CAAC;YACH,CAAC;QACH,CAAC;QAED,+BAA+B;QAC/B,IAAI,SAAS,IAAI,GAAG,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;YACpC,KAAK,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;gBACjC,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;gBAClD,IAAI,eAAe,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;oBAC9C,KAAK,IAAI,EAAE,CAAC;oBACZ,MAAM,CAAC,kBAAkB;gBAC3B,CAAC;YACH,CAAC;QACH,CAAC;QAED,oCAAoC;QACpC,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC;YACnB,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC;QAClC,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,KAAqB;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deprecation-tools.test.d.ts","sourceRoot":"","sources":["../../../src/tools/__tests__/deprecation-tools.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { ListDeprecatedTool } from '../list-deprecated';
|
|
2
|
-
import { GetDeprecationInfoTool } from '../get-deprecation-info';
|
|
3
|
-
import { ResultFormatter } from '../../query/result-formatter';
|
|
4
|
-
describe('Deprecation Tools Integration', () => {
|
|
5
|
-
let mockIndex;
|
|
6
|
-
let formatter;
|
|
7
|
-
beforeEach(() => {
|
|
8
|
-
mockIndex = {
|
|
9
|
-
byName: new Map(),
|
|
10
|
-
bySelector: new Map(),
|
|
11
|
-
searchIndex: new Map(),
|
|
12
|
-
components: [],
|
|
13
|
-
directives: [],
|
|
14
|
-
pipes: [],
|
|
15
|
-
services: [],
|
|
16
|
-
lastUpdated: new Date(),
|
|
17
|
-
totalCount: 0,
|
|
18
|
-
};
|
|
19
|
-
formatter = new ResultFormatter();
|
|
20
|
-
});
|
|
21
|
-
describe('ListDeprecatedTool', () => {
|
|
22
|
-
it('should have correct tool definition', () => {
|
|
23
|
-
const definition = ListDeprecatedTool.getToolDefinition();
|
|
24
|
-
expect(definition.name).toBe('list-deprecated');
|
|
25
|
-
expect(definition.description).toContain('deprecated items');
|
|
26
|
-
expect(definition.inputSchema.properties).toHaveProperty('type');
|
|
27
|
-
expect(definition.inputSchema.properties).toHaveProperty('includeReplacements');
|
|
28
|
-
});
|
|
29
|
-
it('should execute and return formatted results', () => {
|
|
30
|
-
mockIndex.components = [
|
|
31
|
-
{
|
|
32
|
-
name: 'OldButton',
|
|
33
|
-
type: 'component',
|
|
34
|
-
id: '1',
|
|
35
|
-
file: 'old-button.ts',
|
|
36
|
-
deprecated: true,
|
|
37
|
-
deprecationMessage: 'Use NewButton instead',
|
|
38
|
-
},
|
|
39
|
-
];
|
|
40
|
-
const tool = new ListDeprecatedTool(mockIndex, formatter);
|
|
41
|
-
const result = tool.execute({});
|
|
42
|
-
expect(result.content).toHaveLength(1);
|
|
43
|
-
expect(result.content[0].type).toBe('text');
|
|
44
|
-
expect(result.content[0].text).toContain('OldButton');
|
|
45
|
-
});
|
|
46
|
-
it('should handle type filter parameter', () => {
|
|
47
|
-
mockIndex.components = [
|
|
48
|
-
{
|
|
49
|
-
name: 'OldButton',
|
|
50
|
-
type: 'component',
|
|
51
|
-
id: '1',
|
|
52
|
-
file: 'old-button.ts',
|
|
53
|
-
deprecated: true,
|
|
54
|
-
deprecationMessage: 'Deprecated',
|
|
55
|
-
},
|
|
56
|
-
];
|
|
57
|
-
mockIndex.pipes = [
|
|
58
|
-
{
|
|
59
|
-
name: 'OldPipe',
|
|
60
|
-
type: 'pipe',
|
|
61
|
-
id: '2',
|
|
62
|
-
file: 'old-pipe.ts',
|
|
63
|
-
deprecated: true,
|
|
64
|
-
deprecationMessage: 'Deprecated',
|
|
65
|
-
},
|
|
66
|
-
];
|
|
67
|
-
const tool = new ListDeprecatedTool(mockIndex, formatter);
|
|
68
|
-
const result = tool.execute({ type: 'component' });
|
|
69
|
-
expect(result.content[0].text).toContain('OldButton');
|
|
70
|
-
expect(result.content[0].text).not.toContain('OldPipe');
|
|
71
|
-
});
|
|
72
|
-
it('should handle includeReplacements parameter', () => {
|
|
73
|
-
mockIndex.components = [
|
|
74
|
-
{
|
|
75
|
-
name: 'OldButton',
|
|
76
|
-
type: 'component',
|
|
77
|
-
id: '1',
|
|
78
|
-
file: 'old-button.ts',
|
|
79
|
-
deprecated: true,
|
|
80
|
-
jsdoctags: [
|
|
81
|
-
{
|
|
82
|
-
tagName: { text: 'deprecated' },
|
|
83
|
-
comment: 'Use NewButton instead',
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
},
|
|
87
|
-
];
|
|
88
|
-
const tool = new ListDeprecatedTool(mockIndex, formatter);
|
|
89
|
-
const resultWithReplacement = tool.execute({ includeReplacements: true });
|
|
90
|
-
const resultWithoutReplacement = tool.execute({ includeReplacements: false });
|
|
91
|
-
expect(resultWithReplacement.content[0].text).toContain('- **Replacement**: NewButton');
|
|
92
|
-
expect(resultWithoutReplacement.content[0].text).not.toContain('- **Replacement**');
|
|
93
|
-
});
|
|
94
|
-
it('should return empty message when no deprecated items', () => {
|
|
95
|
-
mockIndex.components = [
|
|
96
|
-
{
|
|
97
|
-
name: 'ActiveButton',
|
|
98
|
-
type: 'component',
|
|
99
|
-
id: '1',
|
|
100
|
-
file: 'active-button.ts',
|
|
101
|
-
deprecated: false,
|
|
102
|
-
},
|
|
103
|
-
];
|
|
104
|
-
const tool = new ListDeprecatedTool(mockIndex, formatter);
|
|
105
|
-
const result = tool.execute({});
|
|
106
|
-
expect(result.content[0].text).toContain('No deprecated items found');
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
describe('GetDeprecationInfoTool', () => {
|
|
110
|
-
it('should have correct tool definition', () => {
|
|
111
|
-
const definition = GetDeprecationInfoTool.getToolDefinition();
|
|
112
|
-
expect(definition.name).toBe('get-deprecation-info');
|
|
113
|
-
expect(definition.description).toContain('deprecation information');
|
|
114
|
-
expect(definition.inputSchema.properties).toHaveProperty('componentName');
|
|
115
|
-
expect(definition.inputSchema.required).toContain('componentName');
|
|
116
|
-
});
|
|
117
|
-
it('should execute and return deprecation info', () => {
|
|
118
|
-
const component = {
|
|
119
|
-
name: 'OldButton',
|
|
120
|
-
type: 'component',
|
|
121
|
-
id: '1',
|
|
122
|
-
file: 'old-button.ts',
|
|
123
|
-
deprecated: true,
|
|
124
|
-
deprecationMessage: 'Use NewButton instead',
|
|
125
|
-
};
|
|
126
|
-
mockIndex.byName.set('OldButton', component);
|
|
127
|
-
const tool = new GetDeprecationInfoTool(mockIndex, formatter);
|
|
128
|
-
const result = tool.execute({ componentName: 'OldButton' });
|
|
129
|
-
expect(result.content).toHaveLength(1);
|
|
130
|
-
expect(result.content[0].type).toBe('text');
|
|
131
|
-
expect(result.content[0].text).toContain('OldButton');
|
|
132
|
-
expect(result.content[0].text).toContain('DEPRECATED');
|
|
133
|
-
});
|
|
134
|
-
it('should handle non-deprecated component', () => {
|
|
135
|
-
const component = {
|
|
136
|
-
name: 'ActiveButton',
|
|
137
|
-
type: 'component',
|
|
138
|
-
id: '1',
|
|
139
|
-
file: 'active-button.ts',
|
|
140
|
-
deprecated: false,
|
|
141
|
-
};
|
|
142
|
-
mockIndex.byName.set('ActiveButton', component);
|
|
143
|
-
const tool = new GetDeprecationInfoTool(mockIndex, formatter);
|
|
144
|
-
const result = tool.execute({ componentName: 'ActiveButton' });
|
|
145
|
-
expect(result.content[0].text).toContain('is not deprecated');
|
|
146
|
-
});
|
|
147
|
-
it('should throw error for non-existent component', () => {
|
|
148
|
-
const tool = new GetDeprecationInfoTool(mockIndex, formatter);
|
|
149
|
-
expect(() => {
|
|
150
|
-
tool.execute({ componentName: 'NonExistent' });
|
|
151
|
-
}).toThrow('not found in documentation');
|
|
152
|
-
});
|
|
153
|
-
it('should validate component name parameter', () => {
|
|
154
|
-
const tool = new GetDeprecationInfoTool(mockIndex, formatter);
|
|
155
|
-
expect(() => {
|
|
156
|
-
tool.execute({ componentName: '' });
|
|
157
|
-
}).toThrow('Component name is required');
|
|
158
|
-
expect(() => {
|
|
159
|
-
tool.execute({ componentName: ' ' });
|
|
160
|
-
}).toThrow('Component name is required');
|
|
161
|
-
});
|
|
162
|
-
it('should trim component name', () => {
|
|
163
|
-
const component = {
|
|
164
|
-
name: 'OldButton',
|
|
165
|
-
type: 'component',
|
|
166
|
-
id: '1',
|
|
167
|
-
file: 'old-button.ts',
|
|
168
|
-
deprecated: true,
|
|
169
|
-
deprecationMessage: 'Deprecated',
|
|
170
|
-
};
|
|
171
|
-
mockIndex.byName.set('OldButton', component);
|
|
172
|
-
const tool = new GetDeprecationInfoTool(mockIndex, formatter);
|
|
173
|
-
const result = tool.execute({ componentName: ' OldButton ' });
|
|
174
|
-
expect(result.content[0].text).toContain('OldButton');
|
|
175
|
-
});
|
|
176
|
-
});
|
|
177
|
-
});
|
|
178
|
-
//# sourceMappingURL=deprecation-tools.test.js.map
|