@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,94 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitLab Release Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides functions for creating GitLab releases with proper formatting,
|
|
5
|
-
* changelog extraction, and artifact linking.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Extract version from tag name (removes 'v' prefix if present)
|
|
9
|
-
*
|
|
10
|
-
* @param tag - Git tag name (e.g., "v1.2.3" or "1.2.3")
|
|
11
|
-
* @returns Version string without 'v' prefix (e.g., "1.2.3")
|
|
12
|
-
*/
|
|
13
|
-
export declare function extractVersion(tag: string): string;
|
|
14
|
-
/**
|
|
15
|
-
* Format release title according to GitLab release conventions.
|
|
16
|
-
*
|
|
17
|
-
* Format: "Release v{version}"
|
|
18
|
-
* Example: "Release v1.2.3"
|
|
19
|
-
*
|
|
20
|
-
* @param tag - Git tag name (e.g., "v1.2.3" or "1.2.3")
|
|
21
|
-
* @returns Formatted release title
|
|
22
|
-
*/
|
|
23
|
-
export declare function formatReleaseTitle(tag: string): string;
|
|
24
|
-
/**
|
|
25
|
-
* Read and extract changelog content for the release.
|
|
26
|
-
*
|
|
27
|
-
* Extracts the most recent version section from CHANGELOG.md.
|
|
28
|
-
* The function looks for content between the first ## heading and the next ## heading.
|
|
29
|
-
*
|
|
30
|
-
* @param changelogPath - Path to CHANGELOG.md file (defaults to ./CHANGELOG.md)
|
|
31
|
-
* @returns Changelog content for the most recent version, or default message if not found
|
|
32
|
-
*/
|
|
33
|
-
export declare function getChangelogContent(changelogPath?: string): string;
|
|
34
|
-
/**
|
|
35
|
-
* Create artifact link for dist/ directory.
|
|
36
|
-
*
|
|
37
|
-
* Creates a GitLab release asset link that points to the job artifacts download URL.
|
|
38
|
-
*
|
|
39
|
-
* @param projectUrl - GitLab project URL (e.g., "https://gitlab.com/user/project")
|
|
40
|
-
* @param jobId - GitLab CI job ID
|
|
41
|
-
* @returns Asset link object for GitLab Release API
|
|
42
|
-
*/
|
|
43
|
-
export declare function createArtifactLink(projectUrl: string, jobId: string): {
|
|
44
|
-
name: string;
|
|
45
|
-
url: string;
|
|
46
|
-
link_type: string;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* GitLab Release API payload structure
|
|
50
|
-
*/
|
|
51
|
-
export interface GitLabReleasePayload {
|
|
52
|
-
tag_name: string;
|
|
53
|
-
name: string;
|
|
54
|
-
description: string;
|
|
55
|
-
assets: {
|
|
56
|
-
links: Array<{
|
|
57
|
-
name: string;
|
|
58
|
-
url: string;
|
|
59
|
-
link_type: string;
|
|
60
|
-
}>;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Create GitLab release payload.
|
|
65
|
-
*
|
|
66
|
-
* Constructs the payload object for the GitLab Release API.
|
|
67
|
-
*
|
|
68
|
-
* @param tagName - Git tag name (e.g., "v1.2.3")
|
|
69
|
-
* @param releaseName - Release title (e.g., "Release v1.2.3")
|
|
70
|
-
* @param description - Release description (changelog content)
|
|
71
|
-
* @param assetLinks - Array of asset links
|
|
72
|
-
* @returns GitLab Release API payload
|
|
73
|
-
*/
|
|
74
|
-
export declare function createReleasePayload(tagName: string, releaseName: string, description: string, assetLinks: Array<{
|
|
75
|
-
name: string;
|
|
76
|
-
url: string;
|
|
77
|
-
link_type: string;
|
|
78
|
-
}>): GitLabReleasePayload;
|
|
79
|
-
/**
|
|
80
|
-
* Create GitLab release using the API.
|
|
81
|
-
*
|
|
82
|
-
* Makes a POST request to the GitLab Release API to create a new release.
|
|
83
|
-
* Handles common error cases including duplicate releases, authentication failures,
|
|
84
|
-
* and not found errors.
|
|
85
|
-
*
|
|
86
|
-
* @param apiUrl - GitLab API v4 URL (e.g., "https://gitlab.com/api/v4")
|
|
87
|
-
* @param projectId - GitLab project ID
|
|
88
|
-
* @param token - GitLab authentication token (CI_JOB_TOKEN)
|
|
89
|
-
* @param payload - Release payload object
|
|
90
|
-
* @returns Promise that resolves when release is created
|
|
91
|
-
* @throws Error if release creation fails
|
|
92
|
-
*/
|
|
93
|
-
export declare function createRelease(apiUrl: string, projectId: string, token: string, payload: GitLabReleasePayload): Promise<void>;
|
|
94
|
-
//# sourceMappingURL=release-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"release-utils.d.ts","sourceRoot":"","sources":["../../src/version/release-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CA6ClE;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,GACZ;IACD,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;CACnB,CAMA;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE;QACN,KAAK,EAAE,KAAK,CAAC;YACX,IAAI,EAAE,MAAM,CAAC;YACb,GAAG,EAAE,MAAM,CAAC;YACZ,SAAS,EAAE,MAAM,CAAC;SACnB,CAAC,CAAC;KACJ,CAAC;CACH;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,GAClE,oBAAoB,CAStB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAiDf"}
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitLab Release Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides functions for creating GitLab releases with proper formatting,
|
|
5
|
-
* changelog extraction, and artifact linking.
|
|
6
|
-
*/
|
|
7
|
-
import { readFileSync } from 'node:fs';
|
|
8
|
-
import { resolve } from 'node:path';
|
|
9
|
-
/**
|
|
10
|
-
* Extract version from tag name (removes 'v' prefix if present)
|
|
11
|
-
*
|
|
12
|
-
* @param tag - Git tag name (e.g., "v1.2.3" or "1.2.3")
|
|
13
|
-
* @returns Version string without 'v' prefix (e.g., "1.2.3")
|
|
14
|
-
*/
|
|
15
|
-
export function extractVersion(tag) {
|
|
16
|
-
return tag.startsWith('v') ? tag.substring(1) : tag;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Format release title according to GitLab release conventions.
|
|
20
|
-
*
|
|
21
|
-
* Format: "Release v{version}"
|
|
22
|
-
* Example: "Release v1.2.3"
|
|
23
|
-
*
|
|
24
|
-
* @param tag - Git tag name (e.g., "v1.2.3" or "1.2.3")
|
|
25
|
-
* @returns Formatted release title
|
|
26
|
-
*/
|
|
27
|
-
export function formatReleaseTitle(tag) {
|
|
28
|
-
const version = extractVersion(tag);
|
|
29
|
-
return `Release v${version}`;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Read and extract changelog content for the release.
|
|
33
|
-
*
|
|
34
|
-
* Extracts the most recent version section from CHANGELOG.md.
|
|
35
|
-
* The function looks for content between the first ## heading and the next ## heading.
|
|
36
|
-
*
|
|
37
|
-
* @param changelogPath - Path to CHANGELOG.md file (defaults to ./CHANGELOG.md)
|
|
38
|
-
* @returns Changelog content for the most recent version, or default message if not found
|
|
39
|
-
*/
|
|
40
|
-
export function getChangelogContent(changelogPath) {
|
|
41
|
-
const path = changelogPath || resolve(process.cwd(), 'CHANGELOG.md');
|
|
42
|
-
try {
|
|
43
|
-
const content = readFileSync(path, 'utf-8');
|
|
44
|
-
// Extract the first version section (most recent)
|
|
45
|
-
// Look for content between the first ## heading and the next ## heading
|
|
46
|
-
const lines = content.split('\n');
|
|
47
|
-
const releaseLines = [];
|
|
48
|
-
let inReleaseSection = false;
|
|
49
|
-
let foundFirstHeading = false;
|
|
50
|
-
for (const line of lines) {
|
|
51
|
-
// Skip the main title (# Changelog)
|
|
52
|
-
if (line.startsWith('# ')) {
|
|
53
|
-
continue;
|
|
54
|
-
}
|
|
55
|
-
// Start capturing when we hit the first ## heading
|
|
56
|
-
if (line.startsWith('## ')) {
|
|
57
|
-
if (!foundFirstHeading) {
|
|
58
|
-
foundFirstHeading = true;
|
|
59
|
-
inReleaseSection = true;
|
|
60
|
-
releaseLines.push(line);
|
|
61
|
-
continue;
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
// Stop when we hit the second ## heading
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
if (inReleaseSection) {
|
|
69
|
-
releaseLines.push(line);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
if (releaseLines.length === 0) {
|
|
73
|
-
return 'Release notes not available.';
|
|
74
|
-
}
|
|
75
|
-
return releaseLines.join('\n').trim();
|
|
76
|
-
}
|
|
77
|
-
catch {
|
|
78
|
-
return 'Release notes not available.';
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Create artifact link for dist/ directory.
|
|
83
|
-
*
|
|
84
|
-
* Creates a GitLab release asset link that points to the job artifacts download URL.
|
|
85
|
-
*
|
|
86
|
-
* @param projectUrl - GitLab project URL (e.g., "https://gitlab.com/user/project")
|
|
87
|
-
* @param jobId - GitLab CI job ID
|
|
88
|
-
* @returns Asset link object for GitLab Release API
|
|
89
|
-
*/
|
|
90
|
-
export function createArtifactLink(projectUrl, jobId) {
|
|
91
|
-
return {
|
|
92
|
-
name: 'dist',
|
|
93
|
-
url: `${projectUrl}/-/jobs/${jobId}/artifacts/download`,
|
|
94
|
-
link_type: 'package',
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Create GitLab release payload.
|
|
99
|
-
*
|
|
100
|
-
* Constructs the payload object for the GitLab Release API.
|
|
101
|
-
*
|
|
102
|
-
* @param tagName - Git tag name (e.g., "v1.2.3")
|
|
103
|
-
* @param releaseName - Release title (e.g., "Release v1.2.3")
|
|
104
|
-
* @param description - Release description (changelog content)
|
|
105
|
-
* @param assetLinks - Array of asset links
|
|
106
|
-
* @returns GitLab Release API payload
|
|
107
|
-
*/
|
|
108
|
-
export function createReleasePayload(tagName, releaseName, description, assetLinks) {
|
|
109
|
-
return {
|
|
110
|
-
tag_name: tagName,
|
|
111
|
-
name: releaseName,
|
|
112
|
-
description: description,
|
|
113
|
-
assets: {
|
|
114
|
-
links: assetLinks,
|
|
115
|
-
},
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Create GitLab release using the API.
|
|
120
|
-
*
|
|
121
|
-
* Makes a POST request to the GitLab Release API to create a new release.
|
|
122
|
-
* Handles common error cases including duplicate releases, authentication failures,
|
|
123
|
-
* and not found errors.
|
|
124
|
-
*
|
|
125
|
-
* @param apiUrl - GitLab API v4 URL (e.g., "https://gitlab.com/api/v4")
|
|
126
|
-
* @param projectId - GitLab project ID
|
|
127
|
-
* @param token - GitLab authentication token (CI_JOB_TOKEN)
|
|
128
|
-
* @param payload - Release payload object
|
|
129
|
-
* @returns Promise that resolves when release is created
|
|
130
|
-
* @throws Error if release creation fails
|
|
131
|
-
*/
|
|
132
|
-
export async function createRelease(apiUrl, projectId, token, payload) {
|
|
133
|
-
const releaseUrl = `${apiUrl}/projects/${encodeURIComponent(projectId)}/releases`;
|
|
134
|
-
const response = await fetch(releaseUrl, {
|
|
135
|
-
method: 'POST',
|
|
136
|
-
headers: {
|
|
137
|
-
'Content-Type': 'application/json',
|
|
138
|
-
'JOB-TOKEN': token,
|
|
139
|
-
},
|
|
140
|
-
body: JSON.stringify(payload),
|
|
141
|
-
});
|
|
142
|
-
if (!response.ok) {
|
|
143
|
-
const errorText = await response.text();
|
|
144
|
-
// Check for duplicate release (409 Conflict) - this is idempotent
|
|
145
|
-
if (response.status === 409) {
|
|
146
|
-
// Don't throw error for duplicate - just return silently
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
// Check for authentication errors
|
|
150
|
-
if (response.status === 401 || response.status === 403) {
|
|
151
|
-
throw new Error(`Authentication failed: ${response.status} ${response.statusText}\n` +
|
|
152
|
-
'Possible causes:\n' +
|
|
153
|
-
' - Invalid or expired CI_JOB_TOKEN\n' +
|
|
154
|
-
' - Insufficient permissions to create releases\n' +
|
|
155
|
-
' - Token does not have api scope');
|
|
156
|
-
}
|
|
157
|
-
// Check for not found (invalid project or tag)
|
|
158
|
-
if (response.status === 404) {
|
|
159
|
-
throw new Error(`Not found: ${response.status} ${response.statusText}\n` +
|
|
160
|
-
'Possible causes:\n' +
|
|
161
|
-
` - Project ID ${projectId} does not exist\n` +
|
|
162
|
-
` - Tag ${payload.tag_name} does not exist\n` +
|
|
163
|
-
' - Insufficient permissions to access the project');
|
|
164
|
-
}
|
|
165
|
-
// Generic error
|
|
166
|
-
throw new Error(`Failed to create release: ${response.status} ${response.statusText}\n` +
|
|
167
|
-
`Response: ${errorText}`);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
//# sourceMappingURL=release-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"release-utils.js","sourceRoot":"","sources":["../../src/version/release-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,OAAO,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AACtD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAW;IAC5C,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,YAAY,OAAO,EAAE,CAAC;AAC/B,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,aAAsB;IACxD,MAAM,IAAI,GAAG,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC;IAErE,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE5C,kDAAkD;QAClD,wEAAwE;QACxE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAClC,MAA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gBACpB,kBAAkB,SAAS,mBAAmB;gBAC9C,WAAW,OAAO,CAAC,QAAQ,mBAAmB;gBAC9C,oDAAoD,CACvD,CAAC;QACJ,CAAC;QAED,gBAAgB;QAChB,MAAM,IAAI,KAAK,CACb,6BAA6B,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,IAAI;YACrE,aAAa,SAAS,EAAE,CAC3B,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rollback Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides functions for rolling back to previous versions.
|
|
5
|
-
* Validates: Requirements 11.1, 11.2, 11.3, 11.5
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Result of a rollback validation
|
|
9
|
-
*/
|
|
10
|
-
export interface RollbackValidationResult {
|
|
11
|
-
valid: boolean;
|
|
12
|
-
error?: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Validates a rollback version string.
|
|
16
|
-
*
|
|
17
|
-
* Checks:
|
|
18
|
-
* - Version format is valid
|
|
19
|
-
* - Version is not the current version
|
|
20
|
-
*
|
|
21
|
-
* @param rollbackVersion - The version to rollback to
|
|
22
|
-
* @param currentVersion - The current version
|
|
23
|
-
* @returns Validation result with error message if invalid
|
|
24
|
-
*
|
|
25
|
-
* Validates: Requirements 11.1, 11.2
|
|
26
|
-
*/
|
|
27
|
-
export declare function validateRollbackVersion(rollbackVersion: string, currentVersion: string): RollbackValidationResult;
|
|
28
|
-
/**
|
|
29
|
-
* Formats a rollback changelog entry.
|
|
30
|
-
*
|
|
31
|
-
* @param version - The version being rolled back to
|
|
32
|
-
* @param reason - Optional reason for the rollback
|
|
33
|
-
* @returns Formatted changelog entry
|
|
34
|
-
*
|
|
35
|
-
* Validates: Requirements 11.5
|
|
36
|
-
*/
|
|
37
|
-
export declare function formatRollbackChangelogEntry(version: string, reason?: string): string;
|
|
38
|
-
/**
|
|
39
|
-
* Generates a Git tag name for a rollback.
|
|
40
|
-
*
|
|
41
|
-
* @param version - The version being rolled back to
|
|
42
|
-
* @returns Git tag name (e.g., "v1.2.3")
|
|
43
|
-
*
|
|
44
|
-
* Validates: Requirements 11.3
|
|
45
|
-
*/
|
|
46
|
-
export declare function generateRollbackTag(version: string): string;
|
|
47
|
-
//# sourceMappingURL=rollback-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rollback-utils.d.ts","sourceRoot":"","sources":["../../src/version/rollback-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,MAAM,EACvB,cAAc,EAAE,MAAM,GACrB,wBAAwB,CAqB1B;AAED;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CAeR;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAG3D"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rollback Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides functions for rolling back to previous versions.
|
|
5
|
-
* Validates: Requirements 11.1, 11.2, 11.3, 11.5
|
|
6
|
-
*/
|
|
7
|
-
import { isValidVersion } from './version-manager.js';
|
|
8
|
-
/**
|
|
9
|
-
* Validates a rollback version string.
|
|
10
|
-
*
|
|
11
|
-
* Checks:
|
|
12
|
-
* - Version format is valid
|
|
13
|
-
* - Version is not the current version
|
|
14
|
-
*
|
|
15
|
-
* @param rollbackVersion - The version to rollback to
|
|
16
|
-
* @param currentVersion - The current version
|
|
17
|
-
* @returns Validation result with error message if invalid
|
|
18
|
-
*
|
|
19
|
-
* Validates: Requirements 11.1, 11.2
|
|
20
|
-
*/
|
|
21
|
-
export function validateRollbackVersion(rollbackVersion, currentVersion) {
|
|
22
|
-
// Check version format
|
|
23
|
-
if (!isValidVersion(rollbackVersion)) {
|
|
24
|
-
return {
|
|
25
|
-
valid: false,
|
|
26
|
-
error: `Invalid version format: ${rollbackVersion}. Expected format: MAJOR.MINOR.PATCH`,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
// Check not rolling back to current version
|
|
30
|
-
const cleanRollback = rollbackVersion.startsWith('v') ? rollbackVersion.slice(1) : rollbackVersion;
|
|
31
|
-
const cleanCurrent = currentVersion.startsWith('v') ? currentVersion.slice(1) : currentVersion;
|
|
32
|
-
if (cleanRollback === cleanCurrent) {
|
|
33
|
-
return {
|
|
34
|
-
valid: false,
|
|
35
|
-
error: `Cannot rollback to current version: ${rollbackVersion}`,
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
return { valid: true };
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Formats a rollback changelog entry.
|
|
42
|
-
*
|
|
43
|
-
* @param version - The version being rolled back to
|
|
44
|
-
* @param reason - Optional reason for the rollback
|
|
45
|
-
* @returns Formatted changelog entry
|
|
46
|
-
*
|
|
47
|
-
* Validates: Requirements 11.5
|
|
48
|
-
*/
|
|
49
|
-
export function formatRollbackChangelogEntry(version, reason) {
|
|
50
|
-
const date = new Date().toISOString().split('T')[0];
|
|
51
|
-
const cleanVersion = version.startsWith('v') ? version.slice(1) : version;
|
|
52
|
-
let entry = `## ${cleanVersion} (${date})\n\n`;
|
|
53
|
-
entry += `### Rollback\n\n`;
|
|
54
|
-
entry += `* Rolled back to version ${cleanVersion}\n`;
|
|
55
|
-
if (reason) {
|
|
56
|
-
entry += `* Reason: ${reason}\n`;
|
|
57
|
-
}
|
|
58
|
-
entry += '\n';
|
|
59
|
-
return entry;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Generates a Git tag name for a rollback.
|
|
63
|
-
*
|
|
64
|
-
* @param version - The version being rolled back to
|
|
65
|
-
* @returns Git tag name (e.g., "v1.2.3")
|
|
66
|
-
*
|
|
67
|
-
* Validates: Requirements 11.3
|
|
68
|
-
*/
|
|
69
|
-
export function generateRollbackTag(version) {
|
|
70
|
-
const cleanVersion = version.startsWith('v') ? version.slice(1) : version;
|
|
71
|
-
return `v${cleanVersion}`;
|
|
72
|
-
}
|
|
73
|
-
//# sourceMappingURL=rollback-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rollback-utils.js","sourceRoot":"","sources":["../../src/version/rollback-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAUtD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,uBAAuB,CACrC,eAAuB,EACvB,cAAsB;IAEtB,uBAAuB;IACvB,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,CAAC;QACrC,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,2BAA2B,eAAe,sCAAsC;SACxF,CAAC;IACJ,CAAC;IAED,4CAA4C;IAC5C,MAAM,aAAa,GAAG,eAAe,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC;IACnG,MAAM,YAAY,GAAG,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC;IAE/F,IAAI,aAAa,KAAK,YAAY,EAAE,CAAC;QACnC,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,uCAAuC,eAAe,EAAE;SAChE,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACzB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,4BAA4B,CAC1C,OAAe,EACf,MAAe;IAEf,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAE1E,IAAI,KAAK,GAAG,MAAM,YAAY,KAAK,IAAI,OAAO,CAAC;IAC/C,KAAK,IAAI,kBAAkB,CAAC;IAC5B,KAAK,IAAI,4BAA4B,YAAY,IAAI,CAAC;IAEtD,IAAI,MAAM,EAAE,CAAC;QACX,KAAK,IAAI,aAAa,MAAM,IAAI,CAAC;IACnC,CAAC;IAED,KAAK,IAAI,IAAI,CAAC;IAEd,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAe;IACjD,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAC1E,OAAO,IAAI,YAAY,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Version Management Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides functions for parsing, validating, and bumping semantic versions.
|
|
5
|
-
* Follows semantic versioning specification (semver.org).
|
|
6
|
-
*/
|
|
7
|
-
export type ReleaseType = 'patch' | 'minor' | 'major';
|
|
8
|
-
export interface SemanticVersion {
|
|
9
|
-
major: number;
|
|
10
|
-
minor: number;
|
|
11
|
-
patch: number;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Parses a semantic version string into its components.
|
|
15
|
-
*
|
|
16
|
-
* @param version - Version string in format "MAJOR.MINOR.PATCH" or "vMAJOR.MINOR.PATCH"
|
|
17
|
-
* @returns Parsed semantic version object
|
|
18
|
-
* @throws Error if version format is invalid
|
|
19
|
-
*/
|
|
20
|
-
export declare function parseVersion(version: string): SemanticVersion;
|
|
21
|
-
/**
|
|
22
|
-
* Validates a semantic version string format.
|
|
23
|
-
*
|
|
24
|
-
* @param version - Version string to validate
|
|
25
|
-
* @returns true if valid, false otherwise
|
|
26
|
-
*/
|
|
27
|
-
export declare function isValidVersion(version: string): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Formats a semantic version object as a string.
|
|
30
|
-
*
|
|
31
|
-
* @param version - Semantic version object
|
|
32
|
-
* @returns Formatted version string "MAJOR.MINOR.PATCH"
|
|
33
|
-
*/
|
|
34
|
-
export declare function formatVersion(version: SemanticVersion): string;
|
|
35
|
-
/**
|
|
36
|
-
* Increments a semantic version according to the specified release type.
|
|
37
|
-
*
|
|
38
|
-
* Rules:
|
|
39
|
-
* - patch: Increments PATCH version
|
|
40
|
-
* - minor: Increments MINOR version, resets PATCH to 0
|
|
41
|
-
* - major: Increments MAJOR version, resets MINOR and PATCH to 0
|
|
42
|
-
*
|
|
43
|
-
* @param version - Current semantic version
|
|
44
|
-
* @param releaseType - Type of release (patch, minor, or major)
|
|
45
|
-
* @returns New semantic version after increment
|
|
46
|
-
*/
|
|
47
|
-
export declare function bumpVersion(version: SemanticVersion, releaseType: ReleaseType): SemanticVersion;
|
|
48
|
-
/**
|
|
49
|
-
* Increments a version string according to the specified release type.
|
|
50
|
-
*
|
|
51
|
-
* @param versionString - Current version string
|
|
52
|
-
* @param releaseType - Type of release (patch, minor, or major)
|
|
53
|
-
* @returns New version string after increment
|
|
54
|
-
* @throws Error if version string is invalid
|
|
55
|
-
*/
|
|
56
|
-
export declare function bumpVersionString(versionString: string, releaseType: ReleaseType): string;
|
|
57
|
-
/**
|
|
58
|
-
* Environment types for npm publishing
|
|
59
|
-
*/
|
|
60
|
-
export type Environment = 'staging' | 'production';
|
|
61
|
-
/**
|
|
62
|
-
* npm distribution tags
|
|
63
|
-
*/
|
|
64
|
-
export type NpmTag = 'beta' | 'latest';
|
|
65
|
-
/**
|
|
66
|
-
* Selects the appropriate npm distribution tag based on the environment.
|
|
67
|
-
*
|
|
68
|
-
* Rules:
|
|
69
|
-
* - staging environment → "beta" tag
|
|
70
|
-
* - production environment → "latest" tag
|
|
71
|
-
*
|
|
72
|
-
* @param environment - The deployment environment (staging or production)
|
|
73
|
-
* @returns The npm distribution tag to use for publishing
|
|
74
|
-
*/
|
|
75
|
-
export declare function selectNpmTag(environment: Environment): NpmTag;
|
|
76
|
-
/**
|
|
77
|
-
* Result of a dry run version calculation
|
|
78
|
-
*/
|
|
79
|
-
export interface DryRunVersionResult {
|
|
80
|
-
currentVersion: string;
|
|
81
|
-
newVersion: string;
|
|
82
|
-
releaseType: ReleaseType;
|
|
83
|
-
isDryRun: true;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Calculates what the new version would be without modifying any files.
|
|
87
|
-
*
|
|
88
|
-
* This function is used in dry run mode to preview version changes.
|
|
89
|
-
*
|
|
90
|
-
* @param currentVersion - The current version string
|
|
91
|
-
* @param releaseType - Type of release (patch, minor, or major)
|
|
92
|
-
* @returns Dry run result with current and calculated new version
|
|
93
|
-
* @throws Error if version string is invalid
|
|
94
|
-
*
|
|
95
|
-
* Validates: Requirements 15.2
|
|
96
|
-
*/
|
|
97
|
-
export declare function calculateDryRunVersion(currentVersion: string, releaseType: ReleaseType): DryRunVersionResult;
|
|
98
|
-
//# sourceMappingURL=version-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version-manager.d.ts","sourceRoot":"","sources":["../../src/version/version-manager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,CAiC7D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAOvD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAE9D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,GAAG,eAAe,CAuB/F;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,GAAG,MAAM,CAIzF;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,YAAY,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEvC;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAO7D;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,IAAI,CAAC;CAChB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CACpC,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,WAAW,GACvB,mBAAmB,CAarB"}
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Version Management Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides functions for parsing, validating, and bumping semantic versions.
|
|
5
|
-
* Follows semantic versioning specification (semver.org).
|
|
6
|
-
*/
|
|
7
|
-
import { isDryRunEnabled, logDryRunAction } from './dry-run-utils.js';
|
|
8
|
-
/**
|
|
9
|
-
* Parses a semantic version string into its components.
|
|
10
|
-
*
|
|
11
|
-
* @param version - Version string in format "MAJOR.MINOR.PATCH" or "vMAJOR.MINOR.PATCH"
|
|
12
|
-
* @returns Parsed semantic version object
|
|
13
|
-
* @throws Error if version format is invalid
|
|
14
|
-
*/
|
|
15
|
-
export function parseVersion(version) {
|
|
16
|
-
// Remove leading 'v' if present
|
|
17
|
-
const cleanVersion = version.startsWith('v') ? version.slice(1) : version;
|
|
18
|
-
// Split into components
|
|
19
|
-
const parts = cleanVersion.split('.');
|
|
20
|
-
if (parts.length !== 3) {
|
|
21
|
-
throw new Error(`Invalid version format: ${version}. Expected format: MAJOR.MINOR.PATCH`);
|
|
22
|
-
}
|
|
23
|
-
const [majorStr, minorStr, patchStr] = parts;
|
|
24
|
-
// Parse each component as integer
|
|
25
|
-
const major = parseInt(majorStr, 10);
|
|
26
|
-
const minor = parseInt(minorStr, 10);
|
|
27
|
-
const patch = parseInt(patchStr, 10);
|
|
28
|
-
// Validate that all parts are valid non-negative integers
|
|
29
|
-
if (isNaN(major) || isNaN(minor) || isNaN(patch)) {
|
|
30
|
-
throw new Error(`Invalid version format: ${version}. All components must be integers`);
|
|
31
|
-
}
|
|
32
|
-
if (major < 0 || minor < 0 || patch < 0) {
|
|
33
|
-
throw new Error(`Invalid version format: ${version}. All components must be non-negative`);
|
|
34
|
-
}
|
|
35
|
-
// Validate that the string representation matches (no leading zeros except for "0")
|
|
36
|
-
if (majorStr !== major.toString() || minorStr !== minor.toString() || patchStr !== patch.toString()) {
|
|
37
|
-
throw new Error(`Invalid version format: ${version}. Components must not have leading zeros`);
|
|
38
|
-
}
|
|
39
|
-
return { major, minor, patch };
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Validates a semantic version string format.
|
|
43
|
-
*
|
|
44
|
-
* @param version - Version string to validate
|
|
45
|
-
* @returns true if valid, false otherwise
|
|
46
|
-
*/
|
|
47
|
-
export function isValidVersion(version) {
|
|
48
|
-
try {
|
|
49
|
-
parseVersion(version);
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
catch {
|
|
53
|
-
return false;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Formats a semantic version object as a string.
|
|
58
|
-
*
|
|
59
|
-
* @param version - Semantic version object
|
|
60
|
-
* @returns Formatted version string "MAJOR.MINOR.PATCH"
|
|
61
|
-
*/
|
|
62
|
-
export function formatVersion(version) {
|
|
63
|
-
return `${version.major}.${version.minor}.${version.patch}`;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Increments a semantic version according to the specified release type.
|
|
67
|
-
*
|
|
68
|
-
* Rules:
|
|
69
|
-
* - patch: Increments PATCH version
|
|
70
|
-
* - minor: Increments MINOR version, resets PATCH to 0
|
|
71
|
-
* - major: Increments MAJOR version, resets MINOR and PATCH to 0
|
|
72
|
-
*
|
|
73
|
-
* @param version - Current semantic version
|
|
74
|
-
* @param releaseType - Type of release (patch, minor, or major)
|
|
75
|
-
* @returns New semantic version after increment
|
|
76
|
-
*/
|
|
77
|
-
export function bumpVersion(version, releaseType) {
|
|
78
|
-
switch (releaseType) {
|
|
79
|
-
case 'patch':
|
|
80
|
-
return {
|
|
81
|
-
major: version.major,
|
|
82
|
-
minor: version.minor,
|
|
83
|
-
patch: version.patch + 1,
|
|
84
|
-
};
|
|
85
|
-
case 'minor':
|
|
86
|
-
return {
|
|
87
|
-
major: version.major,
|
|
88
|
-
minor: version.minor + 1,
|
|
89
|
-
patch: 0,
|
|
90
|
-
};
|
|
91
|
-
case 'major':
|
|
92
|
-
return {
|
|
93
|
-
major: version.major + 1,
|
|
94
|
-
minor: 0,
|
|
95
|
-
patch: 0,
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Increments a version string according to the specified release type.
|
|
101
|
-
*
|
|
102
|
-
* @param versionString - Current version string
|
|
103
|
-
* @param releaseType - Type of release (patch, minor, or major)
|
|
104
|
-
* @returns New version string after increment
|
|
105
|
-
* @throws Error if version string is invalid
|
|
106
|
-
*/
|
|
107
|
-
export function bumpVersionString(versionString, releaseType) {
|
|
108
|
-
const version = parseVersion(versionString);
|
|
109
|
-
const bumped = bumpVersion(version, releaseType);
|
|
110
|
-
return formatVersion(bumped);
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Selects the appropriate npm distribution tag based on the environment.
|
|
114
|
-
*
|
|
115
|
-
* Rules:
|
|
116
|
-
* - staging environment → "beta" tag
|
|
117
|
-
* - production environment → "latest" tag
|
|
118
|
-
*
|
|
119
|
-
* @param environment - The deployment environment (staging or production)
|
|
120
|
-
* @returns The npm distribution tag to use for publishing
|
|
121
|
-
*/
|
|
122
|
-
export function selectNpmTag(environment) {
|
|
123
|
-
switch (environment) {
|
|
124
|
-
case 'staging':
|
|
125
|
-
return 'beta';
|
|
126
|
-
case 'production':
|
|
127
|
-
return 'latest';
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Calculates what the new version would be without modifying any files.
|
|
132
|
-
*
|
|
133
|
-
* This function is used in dry run mode to preview version changes.
|
|
134
|
-
*
|
|
135
|
-
* @param currentVersion - The current version string
|
|
136
|
-
* @param releaseType - Type of release (patch, minor, or major)
|
|
137
|
-
* @returns Dry run result with current and calculated new version
|
|
138
|
-
* @throws Error if version string is invalid
|
|
139
|
-
*
|
|
140
|
-
* Validates: Requirements 15.2
|
|
141
|
-
*/
|
|
142
|
-
export function calculateDryRunVersion(currentVersion, releaseType) {
|
|
143
|
-
const newVersion = bumpVersionString(currentVersion, releaseType);
|
|
144
|
-
if (isDryRunEnabled()) {
|
|
145
|
-
logDryRunAction(`Bump version from ${currentVersion} to ${newVersion} (${releaseType})`);
|
|
146
|
-
}
|
|
147
|
-
return {
|
|
148
|
-
currentVersion,
|
|
149
|
-
newVersion,
|
|
150
|
-
releaseType,
|
|
151
|
-
isDryRun: true,
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
//# sourceMappingURL=version-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version-manager.js","sourceRoot":"","sources":["../../src/version/version-manager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAUtE;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,gCAAgC;IAChC,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAE1E,wBAAwB;IACxB,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEtC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,2BAA2B,OAAO,sCAAsC,CAAC,CAAC;IAC5F,CAAC;IAED,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC;IAE7C,kCAAkC;IAClC,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACrC,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACrC,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAErC,0DAA0D;IAC1D,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,MAAM,IAAI,KAAK,CAAC,2BAA2B,OAAO,mCA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