@eui/mcp 1.5.1 → 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 +540 -209
- package/package.json +3 -2
- 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 -27
- 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 -85
- 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 -192
- 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 -250
- package/dist/loader/remote-documentation-source.js.map +0 -1
- package/dist/main.d.ts +0 -2
- 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 -226
- 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 -33
- 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 -33
- 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 -34
- 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 -136
- 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 -90
- 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 -201
- 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 -24
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -55
- 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 -195
- 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 -200
- 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 -128
- 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,258 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Property-based tests for documentation loader
|
|
3
|
-
* Feature: eui-compodoc-mcp, Property 17: Invalid JSON error reporting
|
|
4
|
-
* Validates: Requirements 6.2
|
|
5
|
-
*/
|
|
6
|
-
import { describe, it, expect, beforeEach, afterEach } from '@jest/globals';
|
|
7
|
-
import * as fc from 'fast-check';
|
|
8
|
-
import * as fs from 'fs';
|
|
9
|
-
import * as path from 'path';
|
|
10
|
-
import * as os from 'os';
|
|
11
|
-
import { DocumentationLoader, loadDocumentation } from '../documentation-loader.js';
|
|
12
|
-
describe('Documentation Loader Property Tests', () => {
|
|
13
|
-
let tempDir;
|
|
14
|
-
let tempFile;
|
|
15
|
-
beforeEach(() => {
|
|
16
|
-
// Create a temporary directory for test files
|
|
17
|
-
tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'compodoc-test-'));
|
|
18
|
-
tempFile = path.join(tempDir, 'documentation.json');
|
|
19
|
-
});
|
|
20
|
-
afterEach(async () => {
|
|
21
|
-
// Clean up temporary files
|
|
22
|
-
if (fs.existsSync(tempDir)) {
|
|
23
|
-
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
describe('Property 17: Invalid JSON error reporting', () => {
|
|
27
|
-
it('should produce clear error messages for malformed JSON', async () => {
|
|
28
|
-
await fc.assert(fc.asyncProperty(
|
|
29
|
-
// Generate invalid JSON strings
|
|
30
|
-
fc.oneof(fc.constant('{ invalid json }'), fc.constant('{ "key": }'), fc.constant('{ "key": "value"'), fc.constant('not json at all'), fc.constant('[1, 2, 3,]'), fc.constant('{ "key": undefined }')), async (invalidJson) => {
|
|
31
|
-
// Write invalid JSON to file
|
|
32
|
-
fs.writeFileSync(tempFile, invalidJson, 'utf-8');
|
|
33
|
-
// When attempting to load invalid JSON
|
|
34
|
-
const result = await loadDocumentation(tempFile);
|
|
35
|
-
// Then it should fail
|
|
36
|
-
expect(result.success).toBe(false);
|
|
37
|
-
// And provide a clear error message
|
|
38
|
-
expect(result.error).toBeDefined();
|
|
39
|
-
expect(typeof result.error).toBe('string');
|
|
40
|
-
expect(result.error.length).toBeGreaterThan(0);
|
|
41
|
-
expect(result.error).toContain('parse');
|
|
42
|
-
}), { numRuns: 100 });
|
|
43
|
-
});
|
|
44
|
-
it('should produce clear error messages for invalid documentation structure', async () => {
|
|
45
|
-
await fc.assert(fc.asyncProperty(
|
|
46
|
-
// Generate JSON with invalid structure
|
|
47
|
-
fc.oneof(
|
|
48
|
-
// components is not an array
|
|
49
|
-
fc.constant({ components: 'not an array', pipes: [], directives: [] }),
|
|
50
|
-
// pipes is not an array
|
|
51
|
-
fc.constant({ components: [], pipes: { invalid: true }, directives: [] }),
|
|
52
|
-
// directives is not an array
|
|
53
|
-
fc.constant({ components: [], pipes: [], directives: 'string' })), async (invalidStructure) => {
|
|
54
|
-
// Write invalid structure to file
|
|
55
|
-
fs.writeFileSync(tempFile, JSON.stringify(invalidStructure), 'utf-8');
|
|
56
|
-
// When attempting to load invalid structure
|
|
57
|
-
const result = await loadDocumentation(tempFile);
|
|
58
|
-
// Then it should fail
|
|
59
|
-
expect(result.success).toBe(false);
|
|
60
|
-
// And provide a clear error message about the structure
|
|
61
|
-
expect(result.error).toBeDefined();
|
|
62
|
-
expect(typeof result.error).toBe('string');
|
|
63
|
-
expect(result.error.length).toBeGreaterThan(0);
|
|
64
|
-
expect(result.error).toMatch(/must be an array/i);
|
|
65
|
-
}), { numRuns: 100 });
|
|
66
|
-
});
|
|
67
|
-
it('should successfully load valid documentation structures', async () => {
|
|
68
|
-
await fc.assert(fc.asyncProperty(
|
|
69
|
-
// Generate valid documentation structures
|
|
70
|
-
fc.record({
|
|
71
|
-
pipes: fc.array(fc.record({
|
|
72
|
-
name: fc.string({ minLength: 1 }),
|
|
73
|
-
id: fc.string(),
|
|
74
|
-
file: fc.string(),
|
|
75
|
-
type: fc.constant('pipe'),
|
|
76
|
-
deprecated: fc.boolean(),
|
|
77
|
-
deprecationMessage: fc.string(),
|
|
78
|
-
})),
|
|
79
|
-
components: fc.array(fc.record({
|
|
80
|
-
name: fc.string({ minLength: 1 }),
|
|
81
|
-
id: fc.string(),
|
|
82
|
-
file: fc.string(),
|
|
83
|
-
type: fc.constant('component'),
|
|
84
|
-
selector: fc.string(),
|
|
85
|
-
deprecated: fc.boolean(),
|
|
86
|
-
deprecationMessage: fc.string(),
|
|
87
|
-
})),
|
|
88
|
-
directives: fc.array(fc.record({
|
|
89
|
-
name: fc.string({ minLength: 1 }),
|
|
90
|
-
id: fc.string(),
|
|
91
|
-
file: fc.string(),
|
|
92
|
-
type: fc.constant('directive'),
|
|
93
|
-
deprecated: fc.boolean(),
|
|
94
|
-
deprecationMessage: fc.string(),
|
|
95
|
-
})),
|
|
96
|
-
injectables: fc.array(fc.record({
|
|
97
|
-
name: fc.string({ minLength: 1 }),
|
|
98
|
-
id: fc.string(),
|
|
99
|
-
file: fc.string(),
|
|
100
|
-
type: fc.constant('injectable'),
|
|
101
|
-
deprecated: fc.boolean(),
|
|
102
|
-
deprecationMessage: fc.string(),
|
|
103
|
-
})),
|
|
104
|
-
interfaces: fc.constant([]),
|
|
105
|
-
classes: fc.constant([]),
|
|
106
|
-
modules: fc.constant([]),
|
|
107
|
-
}), async (validDoc) => {
|
|
108
|
-
// Write valid documentation to file
|
|
109
|
-
fs.writeFileSync(tempFile, JSON.stringify(validDoc), 'utf-8');
|
|
110
|
-
// When loading valid documentation
|
|
111
|
-
const result = await loadDocumentation(tempFile);
|
|
112
|
-
// Then it should succeed
|
|
113
|
-
expect(result.success).toBe(true);
|
|
114
|
-
expect(result.data).toBeDefined();
|
|
115
|
-
// And preserve all the data
|
|
116
|
-
if (result.data) {
|
|
117
|
-
expect(result.data.pipes).toHaveLength(validDoc.pipes.length);
|
|
118
|
-
expect(result.data.components).toHaveLength(validDoc.components.length);
|
|
119
|
-
expect(result.data.directives).toHaveLength(validDoc.directives.length);
|
|
120
|
-
expect(result.data.injectables).toHaveLength(validDoc.injectables.length);
|
|
121
|
-
}
|
|
122
|
-
}), { numRuns: 100 });
|
|
123
|
-
});
|
|
124
|
-
it('should handle file not found errors gracefully', async () => {
|
|
125
|
-
await fc.assert(fc.asyncProperty(
|
|
126
|
-
// Generate random non-existent file paths
|
|
127
|
-
fc.string({ minLength: 1 }).map((s) => path.join(tempDir, `nonexistent-${s}.json`)), async (nonExistentPath) => {
|
|
128
|
-
// When attempting to load non-existent file
|
|
129
|
-
const result = await loadDocumentation(nonExistentPath);
|
|
130
|
-
// Then it should fail
|
|
131
|
-
expect(result.success).toBe(false);
|
|
132
|
-
// And provide a clear error message
|
|
133
|
-
expect(result.error).toBeDefined();
|
|
134
|
-
expect(result.error).toContain('not found');
|
|
135
|
-
}), { numRuns: 100 });
|
|
136
|
-
});
|
|
137
|
-
it('should handle empty files gracefully', async () => {
|
|
138
|
-
// Write empty file
|
|
139
|
-
fs.writeFileSync(tempFile, '', 'utf-8');
|
|
140
|
-
// When attempting to load empty file
|
|
141
|
-
const result = await loadDocumentation(tempFile);
|
|
142
|
-
// Then it should fail with parse error
|
|
143
|
-
expect(result.success).toBe(false);
|
|
144
|
-
expect(result.error).toBeDefined();
|
|
145
|
-
expect(result.error).toContain('parse');
|
|
146
|
-
});
|
|
147
|
-
it('should preserve all component data through load cycle', async () => {
|
|
148
|
-
await fc.assert(fc.asyncProperty(
|
|
149
|
-
// Generate a component with various properties
|
|
150
|
-
fc.record({
|
|
151
|
-
name: fc.string({ minLength: 1 }),
|
|
152
|
-
id: fc.string(),
|
|
153
|
-
file: fc.string(),
|
|
154
|
-
type: fc.constant('component'),
|
|
155
|
-
selector: fc.string(),
|
|
156
|
-
deprecated: fc.boolean(),
|
|
157
|
-
deprecationMessage: fc.string(),
|
|
158
|
-
description: fc.string(),
|
|
159
|
-
standalone: fc.boolean(),
|
|
160
|
-
inputs: fc.array(fc.record({
|
|
161
|
-
name: fc.string({ minLength: 1 }),
|
|
162
|
-
type: fc.string(),
|
|
163
|
-
optional: fc.boolean(),
|
|
164
|
-
deprecated: fc.boolean(),
|
|
165
|
-
deprecationMessage: fc.string(),
|
|
166
|
-
})),
|
|
167
|
-
outputs: fc.array(fc.record({
|
|
168
|
-
name: fc.string({ minLength: 1 }),
|
|
169
|
-
type: fc.string(),
|
|
170
|
-
deprecated: fc.boolean(),
|
|
171
|
-
deprecationMessage: fc.string(),
|
|
172
|
-
})),
|
|
173
|
-
}), async (component) => {
|
|
174
|
-
// Create documentation with this component
|
|
175
|
-
const doc = {
|
|
176
|
-
pipes: [],
|
|
177
|
-
components: [component],
|
|
178
|
-
directives: [],
|
|
179
|
-
injectables: [],
|
|
180
|
-
interfaces: [],
|
|
181
|
-
classes: [],
|
|
182
|
-
modules: [],
|
|
183
|
-
};
|
|
184
|
-
// Write to file
|
|
185
|
-
fs.writeFileSync(tempFile, JSON.stringify(doc), 'utf-8');
|
|
186
|
-
// Load it back
|
|
187
|
-
const result = await loadDocumentation(tempFile);
|
|
188
|
-
// Verify all data is preserved
|
|
189
|
-
expect(result.success).toBe(true);
|
|
190
|
-
expect(result.data).toBeDefined();
|
|
191
|
-
if (result.data) {
|
|
192
|
-
expect(result.data.components).toHaveLength(1);
|
|
193
|
-
const loadedComponent = result.data.components[0];
|
|
194
|
-
expect(loadedComponent.name).toBe(component.name);
|
|
195
|
-
expect(loadedComponent.selector).toBe(component.selector);
|
|
196
|
-
expect(loadedComponent.deprecated).toBe(component.deprecated);
|
|
197
|
-
expect(loadedComponent.standalone).toBe(component.standalone);
|
|
198
|
-
expect(loadedComponent.inputs).toHaveLength(component.inputs.length);
|
|
199
|
-
expect(loadedComponent.outputs).toHaveLength(component.outputs.length);
|
|
200
|
-
}
|
|
201
|
-
}), { numRuns: 100 });
|
|
202
|
-
});
|
|
203
|
-
});
|
|
204
|
-
describe('File watching', () => {
|
|
205
|
-
it.skip('should detect file changes when watching is enabled', async () => {
|
|
206
|
-
// Create initial valid documentation
|
|
207
|
-
const initialDoc = {
|
|
208
|
-
pipes: [],
|
|
209
|
-
components: [],
|
|
210
|
-
directives: [],
|
|
211
|
-
injectables: [],
|
|
212
|
-
interfaces: [],
|
|
213
|
-
classes: [],
|
|
214
|
-
modules: [],
|
|
215
|
-
};
|
|
216
|
-
fs.writeFileSync(tempFile, JSON.stringify(initialDoc), 'utf-8');
|
|
217
|
-
// Track reload calls
|
|
218
|
-
let reloadCount = 0;
|
|
219
|
-
let lastReloadedData;
|
|
220
|
-
const loader = new DocumentationLoader({
|
|
221
|
-
path: tempFile,
|
|
222
|
-
watchForChanges: true,
|
|
223
|
-
reloadDebounce: 100,
|
|
224
|
-
onReload: (data) => {
|
|
225
|
-
reloadCount++;
|
|
226
|
-
lastReloadedData = data;
|
|
227
|
-
},
|
|
228
|
-
});
|
|
229
|
-
// Load initial
|
|
230
|
-
const initialResult = await loader.load();
|
|
231
|
-
expect(initialResult.success).toBe(true);
|
|
232
|
-
// Modify the file
|
|
233
|
-
const updatedDoc = {
|
|
234
|
-
...initialDoc,
|
|
235
|
-
components: [
|
|
236
|
-
{
|
|
237
|
-
name: 'TestComponent',
|
|
238
|
-
id: 'test-id',
|
|
239
|
-
file: 'test.ts',
|
|
240
|
-
type: 'component',
|
|
241
|
-
deprecated: false,
|
|
242
|
-
deprecationMessage: '',
|
|
243
|
-
},
|
|
244
|
-
],
|
|
245
|
-
};
|
|
246
|
-
fs.writeFileSync(tempFile, JSON.stringify(updatedDoc), 'utf-8');
|
|
247
|
-
// Wait for debounce and reload (increased timeout for CI environments)
|
|
248
|
-
await new Promise((resolve) => setTimeout(resolve, 1500));
|
|
249
|
-
// Verify reload was triggered
|
|
250
|
-
expect(reloadCount).toBeGreaterThan(0);
|
|
251
|
-
expect(lastReloadedData).toBeDefined();
|
|
252
|
-
expect(lastReloadedData?.components).toHaveLength(1);
|
|
253
|
-
// Clean up
|
|
254
|
-
await loader.dispose();
|
|
255
|
-
}, 10000);
|
|
256
|
-
});
|
|
257
|
-
});
|
|
258
|
-
//# sourceMappingURL=documentation-loader.property.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"documentation-loader.property.test.js","sourceRoot":"","sources":["../../../src/loader/__tests__/documentation-loader.property.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAGpF,QAAQ,CAAC,qCAAqC,EAAE,GAAG,EAAE;IACnD,IAAI,OAAe,CAAC;IACpB,IAAI,QAAgB,CAAC;IAErB,UAAU,CAAC,GAAG,EAAE;QACd,8CAA8C;QAC9C,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC;QACnE,QAAQ,GAAG,IAA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QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,CAAC;YAEhE,uEAAuE;YACvE,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;YAE1D,8BAA8B;YAC9B,MAAM,CAAC,WAAW,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;YACvC,MAAM,CAAC,gBAAgB,CAAC,CAAC,WAAW,EAAE,CAAC;YACvC,MAAM,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YAErD,WAAW;YACX,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;QACzB,CAAC,EAAE,KAAK,CAAC,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.test.d.ts","sourceRoot":"","sources":["../../../src/loader/__tests__/errors.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for loader error classes
|
|
3
|
-
*/
|
|
4
|
-
import { describe, it, expect } from '@jest/globals';
|
|
5
|
-
import { NetworkError, TimeoutError, HttpError, ParseError, } from '../errors.js';
|
|
6
|
-
describe('Loader Error Classes', () => {
|
|
7
|
-
describe('NetworkError', () => {
|
|
8
|
-
it('should create a NetworkError with message and URL', () => {
|
|
9
|
-
const error = new NetworkError('Connection failed', 'https://example.com');
|
|
10
|
-
expect(error.message).toBe('Connection failed');
|
|
11
|
-
expect(error.url).toBe('https://example.com');
|
|
12
|
-
expect(error.name).toBe('NetworkError');
|
|
13
|
-
expect(error.cause).toBeUndefined();
|
|
14
|
-
expect(error).toBeInstanceOf(Error);
|
|
15
|
-
expect(error).toBeInstanceOf(NetworkError);
|
|
16
|
-
});
|
|
17
|
-
it('should create a NetworkError with a cause', () => {
|
|
18
|
-
const cause = new Error('DNS resolution failed');
|
|
19
|
-
const error = new NetworkError('Connection failed', 'https://example.com', cause);
|
|
20
|
-
expect(error.message).toBe('Connection failed');
|
|
21
|
-
expect(error.url).toBe('https://example.com');
|
|
22
|
-
expect(error.cause).toBe(cause);
|
|
23
|
-
expect(error.name).toBe('NetworkError');
|
|
24
|
-
});
|
|
25
|
-
it('should maintain proper stack trace', () => {
|
|
26
|
-
const error = new NetworkError('Test error', 'https://example.com');
|
|
27
|
-
expect(error.stack).toBeDefined();
|
|
28
|
-
expect(error.stack).toContain('NetworkError');
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
describe('TimeoutError', () => {
|
|
32
|
-
it('should create a TimeoutError with URL and timeout', () => {
|
|
33
|
-
const error = new TimeoutError('https://example.com', 5000);
|
|
34
|
-
expect(error.message).toBe('Request timeout after 5000ms');
|
|
35
|
-
expect(error.url).toBe('https://example.com');
|
|
36
|
-
expect(error.timeout).toBe(5000);
|
|
37
|
-
expect(error.name).toBe('TimeoutError');
|
|
38
|
-
expect(error).toBeInstanceOf(Error);
|
|
39
|
-
expect(error).toBeInstanceOf(NetworkError);
|
|
40
|
-
expect(error).toBeInstanceOf(TimeoutError);
|
|
41
|
-
});
|
|
42
|
-
it('should format timeout message correctly for different durations', () => {
|
|
43
|
-
const error1 = new TimeoutError('https://example.com', 1000);
|
|
44
|
-
const error2 = new TimeoutError('https://example.com', 30000);
|
|
45
|
-
expect(error1.message).toBe('Request timeout after 1000ms');
|
|
46
|
-
expect(error2.message).toBe('Request timeout after 30000ms');
|
|
47
|
-
});
|
|
48
|
-
it('should maintain proper stack trace', () => {
|
|
49
|
-
const error = new TimeoutError('https://example.com', 5000);
|
|
50
|
-
expect(error.stack).toBeDefined();
|
|
51
|
-
expect(error.stack).toContain('TimeoutError');
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
describe('HttpError', () => {
|
|
55
|
-
it('should create an HttpError with all properties', () => {
|
|
56
|
-
const error = new HttpError('Server error', 'https://example.com', 500, 'Internal Server Error');
|
|
57
|
-
expect(error.message).toBe('Server error');
|
|
58
|
-
expect(error.url).toBe('https://example.com');
|
|
59
|
-
expect(error.statusCode).toBe(500);
|
|
60
|
-
expect(error.statusText).toBe('Internal Server Error');
|
|
61
|
-
expect(error.name).toBe('HttpError');
|
|
62
|
-
expect(error).toBeInstanceOf(Error);
|
|
63
|
-
expect(error).toBeInstanceOf(NetworkError);
|
|
64
|
-
expect(error).toBeInstanceOf(HttpError);
|
|
65
|
-
});
|
|
66
|
-
it('should handle different HTTP status codes', () => {
|
|
67
|
-
const error404 = new HttpError('Not found', 'https://example.com', 404, 'Not Found');
|
|
68
|
-
const error503 = new HttpError('Service unavailable', 'https://example.com', 503, 'Service Unavailable');
|
|
69
|
-
expect(error404.statusCode).toBe(404);
|
|
70
|
-
expect(error404.statusText).toBe('Not Found');
|
|
71
|
-
expect(error503.statusCode).toBe(503);
|
|
72
|
-
expect(error503.statusText).toBe('Service Unavailable');
|
|
73
|
-
});
|
|
74
|
-
it('should maintain proper stack trace', () => {
|
|
75
|
-
const error = new HttpError('Test error', 'https://example.com', 500, 'Internal Server Error');
|
|
76
|
-
expect(error.stack).toBeDefined();
|
|
77
|
-
expect(error.stack).toContain('HttpError');
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
describe('ParseError', () => {
|
|
81
|
-
it('should create a ParseError with message and content', () => {
|
|
82
|
-
const content = '{ invalid json }';
|
|
83
|
-
const error = new ParseError('Failed to parse JSON', content);
|
|
84
|
-
expect(error.message).toBe('Failed to parse JSON');
|
|
85
|
-
expect(error.content).toBe(content);
|
|
86
|
-
expect(error.name).toBe('ParseError');
|
|
87
|
-
expect(error).toBeInstanceOf(Error);
|
|
88
|
-
expect(error).toBeInstanceOf(ParseError);
|
|
89
|
-
});
|
|
90
|
-
it('should handle different content types', () => {
|
|
91
|
-
const htmlContent = '<html><body>Not JSON</body></html>';
|
|
92
|
-
const emptyContent = '';
|
|
93
|
-
const malformedJson = '{"key": value}';
|
|
94
|
-
const error1 = new ParseError('Expected JSON', htmlContent);
|
|
95
|
-
const error2 = new ParseError('Empty response', emptyContent);
|
|
96
|
-
const error3 = new ParseError('Invalid JSON syntax', malformedJson);
|
|
97
|
-
expect(error1.content).toBe(htmlContent);
|
|
98
|
-
expect(error2.content).toBe(emptyContent);
|
|
99
|
-
expect(error3.content).toBe(malformedJson);
|
|
100
|
-
});
|
|
101
|
-
it('should maintain proper stack trace', () => {
|
|
102
|
-
const error = new ParseError('Test error', 'content');
|
|
103
|
-
expect(error.stack).toBeDefined();
|
|
104
|
-
expect(error.stack).toContain('ParseError');
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
describe('Error inheritance', () => {
|
|
108
|
-
it('should maintain proper inheritance chain for TimeoutError', () => {
|
|
109
|
-
const error = new TimeoutError('https://example.com', 5000);
|
|
110
|
-
expect(error instanceof Error).toBe(true);
|
|
111
|
-
expect(error instanceof NetworkError).toBe(true);
|
|
112
|
-
expect(error instanceof TimeoutError).toBe(true);
|
|
113
|
-
expect(error instanceof HttpError).toBe(false);
|
|
114
|
-
expect(error instanceof ParseError).toBe(false);
|
|
115
|
-
});
|
|
116
|
-
it('should maintain proper inheritance chain for HttpError', () => {
|
|
117
|
-
const error = new HttpError('Error', 'https://example.com', 500, 'Server Error');
|
|
118
|
-
expect(error instanceof Error).toBe(true);
|
|
119
|
-
expect(error instanceof NetworkError).toBe(true);
|
|
120
|
-
expect(error instanceof HttpError).toBe(true);
|
|
121
|
-
expect(error instanceof TimeoutError).toBe(false);
|
|
122
|
-
expect(error instanceof ParseError).toBe(false);
|
|
123
|
-
});
|
|
124
|
-
it('should maintain proper inheritance chain for ParseError', () => {
|
|
125
|
-
const error = new ParseError('Error', 'content');
|
|
126
|
-
expect(error instanceof Error).toBe(true);
|
|
127
|
-
expect(error instanceof ParseError).toBe(true);
|
|
128
|
-
expect(error instanceof NetworkError).toBe(false);
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
//# sourceMappingURL=errors.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.test.js","sourceRoot":"","sources":["../../../src/loader/__tests__/errors.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,UAAU,GACX,MAAM,cAAc,CAAC;AAEtB,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;QAC5B,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;YAC3D,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,mBAAmB,EAAE,qBAAqB,CAAC,CAAC;YAE3E,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;YAChD,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;YAC9C,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YACxC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,aAAa,EAAE,CAAC;YACpC,MAAM,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;YACpC,MAAM,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;YACnD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;YACjD,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,mBAAmB,EAAE,qBAAqB,EAAE,KAAK,CAAC,CAAC;YAElF,MAAM,CAAC,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1C,MAAM,CAAC,KAAK,YAAY,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjD,MAAM,CAAC,KAAK,YAAY,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC9C,MAAM,CAAC,KAAK,YAAY,YAAY,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAClD,MAAM,CAAC,KAAK,YAAY,UAAU,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;YACjE,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YAEjD,MAAM,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1C,MAAM,CAAC,KAAK,YAAY,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC/C,MAAM,CAAC,KAAK,YAAY,YAAY,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-client.property.test.d.ts","sourceRoot":"","sources":["../../../src/loader/__tests__/http-client.property.test.ts"],"names":[],"mappings":""}
|