@unispechq/unispec-core 0.3.2 → 0.3.4
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/cache/cache-factory.d.ts +2 -2
- package/dist/cache/cache-factory.js +1 -1
- package/dist/cache/cache-manager.d.ts +2 -2
- package/dist/cache/cache-manager.js +9 -7
- package/dist/cache/hash-utils.d.ts +1 -11
- package/dist/cache/hash-utils.js +1 -21
- package/dist/cache/hashing.d.ts +15 -6
- package/dist/cache/hashing.js +8 -12
- package/dist/cache/index.d.ts +6 -6
- package/dist/cache/index.js +5 -5
- package/dist/cache/lru-cache.d.ts +1 -13
- package/dist/cache/lru-cache.js +3 -24
- package/dist/cjs/cache/cache-factory.js +1 -1
- package/dist/cjs/cache/cache-manager.js +9 -7
- package/dist/cjs/cache/hash-utils.js +1 -23
- package/dist/cjs/cache/hashing.js +7 -13
- package/dist/cjs/cache/index.js +6 -8
- package/dist/cjs/cache/lru-cache.js +3 -24
- package/dist/cjs/diff/annotators.js +3 -2
- package/dist/cjs/diff/core.js +2 -2
- package/dist/cjs/diff/enhanced-diff.js +7 -21
- package/dist/cjs/diff/index.js +8 -8
- package/dist/cjs/errors/config-error.js +1 -1
- package/dist/cjs/errors/error-factory.js +7 -7
- package/dist/cjs/errors/index.js +8 -8
- package/dist/cjs/errors/loader-error.js +1 -1
- package/dist/cjs/errors/reference-error.js +1 -1
- package/dist/cjs/errors/schema-error.js +1 -1
- package/dist/cjs/errors/security-error.js +1 -1
- package/dist/cjs/errors/semantic-error.js +1 -1
- package/dist/cjs/index.js +13 -13
- package/dist/cjs/loader/index.js +4 -4
- package/dist/cjs/loader/security-validator.js +1 -1
- package/dist/cjs/loader/unispec-loader.js +3 -3
- package/dist/cjs/loader/yaml-loader.js +1 -1
- package/dist/cjs/normalizer/core.js +11 -6
- package/dist/cjs/normalizer/index.js +1 -1
- package/dist/cjs/normalizer/utils.js +23 -7
- package/dist/cjs/optimizer/core.js +35 -10
- package/dist/cjs/optimizer/index.js +3 -3
- package/dist/cjs/optimizer/optimization-functions.js +2 -2
- package/dist/cjs/schemas/dedupe.js +27 -14
- package/dist/cjs/schemas/index.js +3 -3
- package/dist/cjs/schemas/resolver.js +3 -2
- package/dist/cjs/validator/ajv-validator.js +1 -1
- package/dist/cjs/validator/config-validator-main.js +4 -4
- package/dist/cjs/validator/config-validator.js +1 -1
- package/dist/cjs/validator/index.js +7 -7
- package/dist/cjs/validator/reference-validator.js +1 -1
- package/dist/cjs/validator/tests-validator.js +2 -2
- package/dist/cjs/validator/unispec-validator.js +7 -11
- package/dist/cjs/validator/validator-factory.js +1 -1
- package/dist/diff/annotators.d.ts +1 -1
- package/dist/diff/annotators.js +3 -2
- package/dist/diff/change-reports.d.ts +1 -1
- package/dist/diff/core.d.ts +2 -2
- package/dist/diff/core.js +2 -2
- package/dist/diff/enhanced-diff.d.ts +3 -3
- package/dist/diff/enhanced-diff.js +7 -21
- package/dist/diff/impact-strategies-refactored.d.ts +2 -2
- package/dist/diff/impact-strategies.d.ts +2 -2
- package/dist/diff/index.d.ts +8 -8
- package/dist/diff/index.js +8 -8
- package/dist/diff/metrics-calculator.d.ts +1 -1
- package/dist/diff/risk-calculator.d.ts +1 -1
- package/dist/diff/suggestion-generator.d.ts +2 -2
- package/dist/errors/config-error.d.ts +1 -1
- package/dist/errors/config-error.js +1 -1
- package/dist/errors/error-factory.d.ts +7 -7
- package/dist/errors/error-factory.js +7 -7
- package/dist/errors/index.d.ts +8 -8
- package/dist/errors/index.js +8 -8
- package/dist/errors/loader-error.d.ts +1 -1
- package/dist/errors/loader-error.js +1 -1
- package/dist/errors/reference-error.d.ts +1 -1
- package/dist/errors/reference-error.js +1 -1
- package/dist/errors/schema-error.d.ts +1 -1
- package/dist/errors/schema-error.js +1 -1
- package/dist/errors/security-error.d.ts +1 -1
- package/dist/errors/security-error.js +1 -1
- package/dist/errors/semantic-error.d.ts +1 -1
- package/dist/errors/semantic-error.js +1 -1
- package/dist/index.cjs +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +13 -13
- package/dist/loader/index.d.ts +5 -5
- package/dist/loader/index.js +4 -4
- package/dist/loader/security-validator.d.ts +1 -1
- package/dist/loader/security-validator.js +1 -1
- package/dist/loader/unispec-loader.d.ts +2 -2
- package/dist/loader/unispec-loader.js +3 -3
- package/dist/loader/yaml-loader.d.ts +1 -1
- package/dist/loader/yaml-loader.js +1 -1
- package/dist/normalizer/core.d.ts +2 -2
- package/dist/normalizer/core.js +11 -6
- package/dist/normalizer/graphql-normalizer.d.ts +1 -1
- package/dist/normalizer/index.d.ts +2 -2
- package/dist/normalizer/index.js +1 -1
- package/dist/normalizer/rest-normalizer.d.ts +1 -1
- package/dist/normalizer/types.d.ts +1 -1
- package/dist/normalizer/utils.d.ts +6 -3
- package/dist/normalizer/utils.js +23 -7
- package/dist/normalizer/websocket-normalizer.d.ts +1 -1
- package/dist/optimizer/core.d.ts +2 -2
- package/dist/optimizer/core.js +35 -10
- package/dist/optimizer/index.d.ts +4 -4
- package/dist/optimizer/index.js +3 -3
- package/dist/optimizer/optimization-functions.d.ts +2 -2
- package/dist/optimizer/optimization-functions.js +2 -2
- package/dist/optimizer/types.d.ts +1 -1
- package/dist/schemas/dedupe.d.ts +1 -1
- package/dist/schemas/dedupe.js +27 -14
- package/dist/schemas/index.d.ts +3 -3
- package/dist/schemas/index.js +3 -3
- package/dist/schemas/resolver.d.ts +1 -1
- package/dist/schemas/resolver.js +3 -2
- package/dist/types/index.d.ts +2 -1
- package/dist/validator/ajv-validator.d.ts +1 -1
- package/dist/validator/ajv-validator.js +1 -1
- package/dist/validator/config-validator-main.d.ts +2 -2
- package/dist/validator/config-validator-main.js +4 -4
- package/dist/validator/config-validator.d.ts +1 -1
- package/dist/validator/config-validator.js +1 -1
- package/dist/validator/index.d.ts +10 -10
- package/dist/validator/index.js +7 -7
- package/dist/validator/reference-validator.d.ts +1 -1
- package/dist/validator/reference-validator.js +1 -1
- package/dist/validator/schema-references.d.ts +1 -1
- package/dist/validator/semantic-validator.d.ts +1 -1
- package/dist/validator/tests-validator.d.ts +2 -2
- package/dist/validator/tests-validator.js +2 -2
- package/dist/validator/types.d.ts +3 -3
- package/dist/validator/unispec-validator.d.ts +2 -2
- package/dist/validator/unispec-validator.js +7 -11
- package/dist/validator/validator-factory.d.ts +3 -3
- package/dist/validator/validator-factory.js +1 -1
- package/package.json +3 -3
- package/dist/cjs/src/cache/cache-factory.js +0 -72
- package/dist/cjs/src/cache/cache-manager.js +0 -128
- package/dist/cjs/src/cache/constants.js +0 -25
- package/dist/cjs/src/cache/hash-utils.js +0 -19
- package/dist/cjs/src/cache/hashing.js +0 -230
- package/dist/cjs/src/cache/index.js +0 -24
- package/dist/cjs/src/cache/lru-cache.js +0 -144
- package/dist/cjs/src/cache/types.js +0 -5
- package/dist/cjs/src/diff/annotators.js +0 -160
- package/dist/cjs/src/diff/change-reports.js +0 -369
- package/dist/cjs/src/diff/core.js +0 -158
- package/dist/cjs/src/diff/enhanced-diff.js +0 -65
- package/dist/cjs/src/diff/impact-strategies-refactored.js +0 -230
- package/dist/cjs/src/diff/impact-strategies.js +0 -219
- package/dist/cjs/src/diff/index.js +0 -27
- package/dist/cjs/src/diff/metrics-calculator.js +0 -69
- package/dist/cjs/src/diff/risk-calculator.js +0 -58
- package/dist/cjs/src/diff/suggestion-generator.js +0 -78
- package/dist/cjs/src/diff/types.js +0 -11
- package/dist/cjs/src/errors/base-error.js +0 -33
- package/dist/cjs/src/errors/config-error.js +0 -11
- package/dist/cjs/src/errors/error-factory.js +0 -48
- package/dist/cjs/src/errors/index.js +0 -19
- package/dist/cjs/src/errors/loader-error.js +0 -11
- package/dist/cjs/src/errors/reference-error.js +0 -11
- package/dist/cjs/src/errors/schema-error.js +0 -11
- package/dist/cjs/src/errors/security-error.js +0 -11
- package/dist/cjs/src/errors/semantic-error.js +0 -11
- package/dist/cjs/src/generated-schemas.js +0 -2100
- package/dist/cjs/src/index.js +0 -59
- package/dist/cjs/src/loader/index.js +0 -13
- package/dist/cjs/src/loader/security-validator.js +0 -53
- package/dist/cjs/src/loader/types.js +0 -11
- package/dist/cjs/src/loader/unispec-loader.js +0 -84
- package/dist/cjs/src/loader/yaml-loader.js +0 -76
- package/dist/cjs/src/normalizer/core.js +0 -37
- package/dist/cjs/src/normalizer/graphql-normalizer.js +0 -67
- package/dist/cjs/src/normalizer/index.js +0 -7
- package/dist/cjs/src/normalizer/rest-normalizer.js +0 -51
- package/dist/cjs/src/normalizer/types.js +0 -2
- package/dist/cjs/src/normalizer/utils.js +0 -49
- package/dist/cjs/src/normalizer/websocket-normalizer.js +0 -81
- package/dist/cjs/src/optimizer/core.js +0 -140
- package/dist/cjs/src/optimizer/index.js +0 -17
- package/dist/cjs/src/optimizer/optimization-functions.js +0 -185
- package/dist/cjs/src/optimizer/types.js +0 -2
- package/dist/cjs/src/optimizer/utils.js +0 -32
- package/dist/cjs/src/schemas/dedupe.js +0 -113
- package/dist/cjs/src/schemas/index.js +0 -14
- package/dist/cjs/src/schemas/resolver.js +0 -42
- package/dist/cjs/src/schemas/utils.js +0 -53
- package/dist/cjs/src/types/index.js +0 -2
- package/dist/cjs/src/validator/ajv-validator.js +0 -82
- package/dist/cjs/src/validator/config-validator-main.js +0 -34
- package/dist/cjs/src/validator/config-validator.js +0 -17
- package/dist/cjs/src/validator/index.js +0 -23
- package/dist/cjs/src/validator/object-traversal.js +0 -112
- package/dist/cjs/src/validator/reference-validator.js +0 -233
- package/dist/cjs/src/validator/schema-references.js +0 -116
- package/dist/cjs/src/validator/semantic-validator.js +0 -328
- package/dist/cjs/src/validator/tests-validator.js +0 -16
- package/dist/cjs/src/validator/types.js +0 -2
- package/dist/cjs/src/validator/unispec-validator.js +0 -80
- package/dist/cjs/src/validator/validator-factory.js +0 -77
- package/dist/cjs/src/versions.js +0 -147
- package/dist/cjs/tests/cache/cache.test.js +0 -274
- package/dist/cjs/tests/cache/utils.js +0 -32
- package/dist/cjs/tests/concurrency-normalizer-optimizer.test.js +0 -1
- package/dist/cjs/tests/diff/diff-annotators.test.js +0 -280
- package/dist/cjs/tests/diff/diff-comprehensive.test.js +0 -262
- package/dist/cjs/tests/diff/diff-extended.test.js +0 -235
- package/dist/cjs/tests/diff/diff.test.js +0 -189
- package/dist/cjs/tests/diff/utils.js +0 -8
- package/dist/cjs/tests/errors/errors-integration.test.js +0 -173
- package/dist/cjs/tests/errors/errors.test.js +0 -280
- package/dist/cjs/tests/errors/utils.js +0 -7
- package/dist/cjs/tests/loader/integration.test.js +0 -216
- package/dist/cjs/tests/loader/loader.test.js +0 -341
- package/dist/cjs/tests/normalizer/normalizer-comprehensive.test.js +0 -648
- package/dist/cjs/tests/normalizer/normalizer-invalid.test.js +0 -258
- package/dist/cjs/tests/normalizer/normalizer-valid.test.js +0 -238
- package/dist/cjs/tests/normalizer/utils.js +0 -47
- package/dist/cjs/tests/optimizer/compress-references.test.js +0 -304
- package/dist/cjs/tests/optimizer/deduplication.test.js +0 -132
- package/dist/cjs/tests/optimizer/integration.test.js +0 -131
- package/dist/cjs/tests/optimizer/optimization-report.test.js +0 -222
- package/dist/cjs/tests/optimizer/optimize-document.test.js +0 -187
- package/dist/cjs/tests/optimizer/orphaned-schemas.test.js +0 -194
- package/dist/cjs/tests/optimizer/sort-schemas.test.js +0 -131
- package/dist/cjs/tests/optimizer/utils.js +0 -209
- package/dist/cjs/tests/schemas/schemas-edge-cases.test.js +0 -223
- package/dist/cjs/tests/schemas/schemas.test.js +0 -400
- package/dist/cjs/tests/schemas/utils.js +0 -7
- package/dist/cjs/tests/utils.js +0 -131
- package/dist/cjs/tests/validator/config-validator.test.js +0 -78
- package/dist/cjs/tests/validator/debug-config.js +0 -1
- package/dist/cjs/tests/validator/debug-missing-service.js +0 -1
- package/dist/cjs/tests/validator/debug-other-configs.js +0 -1
- package/dist/cjs/tests/validator/debug-references.js +0 -1
- package/dist/cjs/tests/validator/unispec-validator.test.js +0 -103
- package/dist/cjs/tests/validator/utils.js +0 -25
- package/dist/src/cache/cache-factory.d.ts +0 -31
- package/dist/src/cache/cache-factory.js +0 -65
- package/dist/src/cache/cache-manager.d.ts +0 -62
- package/dist/src/cache/cache-manager.js +0 -124
- package/dist/src/cache/constants.d.ts +0 -21
- package/dist/src/cache/constants.js +0 -22
- package/dist/src/cache/hash-utils.d.ts +0 -11
- package/dist/src/cache/hash-utils.js +0 -15
- package/dist/src/cache/hashing.d.ts +0 -28
- package/dist/src/cache/hashing.js +0 -193
- package/dist/src/cache/index.d.ts +0 -6
- package/dist/src/cache/index.js +0 -10
- package/dist/src/cache/lru-cache.d.ts +0 -44
- package/dist/src/cache/lru-cache.js +0 -140
- package/dist/src/cache/types.d.ts +0 -24
- package/dist/src/cache/types.js +0 -4
- package/dist/src/diff/annotators.d.ts +0 -4
- package/dist/src/diff/annotators.js +0 -155
- package/dist/src/diff/change-reports.d.ts +0 -37
- package/dist/src/diff/change-reports.js +0 -366
- package/dist/src/diff/core.d.ts +0 -26
- package/dist/src/diff/core.js +0 -155
- package/dist/src/diff/enhanced-diff.d.ts +0 -51
- package/dist/src/diff/enhanced-diff.js +0 -62
- package/dist/src/diff/impact-strategies-refactored.d.ts +0 -69
- package/dist/src/diff/impact-strategies-refactored.js +0 -223
- package/dist/src/diff/impact-strategies.d.ts +0 -41
- package/dist/src/diff/impact-strategies.js +0 -212
- package/dist/src/diff/index.d.ts +0 -8
- package/dist/src/diff/index.js +0 -11
- package/dist/src/diff/metrics-calculator.d.ts +0 -23
- package/dist/src/diff/metrics-calculator.js +0 -65
- package/dist/src/diff/risk-calculator.d.ts +0 -23
- package/dist/src/diff/risk-calculator.js +0 -55
- package/dist/src/diff/suggestion-generator.d.ts +0 -18
- package/dist/src/diff/suggestion-generator.js +0 -74
- package/dist/src/diff/types.d.ts +0 -24
- package/dist/src/diff/types.js +0 -8
- package/dist/src/errors/base-error.d.ts +0 -20
- package/dist/src/errors/base-error.js +0 -29
- package/dist/src/errors/config-error.d.ts +0 -4
- package/dist/src/errors/config-error.js +0 -7
- package/dist/src/errors/error-factory.d.ts +0 -22
- package/dist/src/errors/error-factory.js +0 -45
- package/dist/src/errors/index.d.ts +0 -8
- package/dist/src/errors/index.js +0 -8
- package/dist/src/errors/loader-error.d.ts +0 -4
- package/dist/src/errors/loader-error.js +0 -7
- package/dist/src/errors/reference-error.d.ts +0 -4
- package/dist/src/errors/reference-error.js +0 -7
- package/dist/src/errors/schema-error.d.ts +0 -4
- package/dist/src/errors/schema-error.js +0 -7
- package/dist/src/errors/security-error.d.ts +0 -4
- package/dist/src/errors/security-error.js +0 -7
- package/dist/src/errors/semantic-error.d.ts +0 -4
- package/dist/src/errors/semantic-error.js +0 -7
- package/dist/src/generated-schemas.d.ts +0 -2073
- package/dist/src/generated-schemas.js +0 -2097
- package/dist/src/index.d.ts +0 -13
- package/dist/src/index.js +0 -43
- package/dist/src/loader/index.d.ts +0 -5
- package/dist/src/loader/index.js +0 -5
- package/dist/src/loader/security-validator.d.ts +0 -5
- package/dist/src/loader/security-validator.js +0 -50
- package/dist/src/loader/types.d.ts +0 -30
- package/dist/src/loader/types.js +0 -8
- package/dist/src/loader/unispec-loader.d.ts +0 -10
- package/dist/src/loader/unispec-loader.js +0 -81
- package/dist/src/loader/yaml-loader.d.ts +0 -10
- package/dist/src/loader/yaml-loader.js +0 -39
- package/dist/src/normalizer/core.d.ts +0 -24
- package/dist/src/normalizer/core.js +0 -34
- package/dist/src/normalizer/graphql-normalizer.d.ts +0 -8
- package/dist/src/normalizer/graphql-normalizer.js +0 -64
- package/dist/src/normalizer/index.d.ts +0 -2
- package/dist/src/normalizer/index.js +0 -3
- package/dist/src/normalizer/rest-normalizer.d.ts +0 -8
- package/dist/src/normalizer/rest-normalizer.js +0 -48
- package/dist/src/normalizer/types.d.ts +0 -7
- package/dist/src/normalizer/types.js +0 -1
- package/dist/src/normalizer/utils.d.ts +0 -17
- package/dist/src/normalizer/utils.js +0 -45
- package/dist/src/normalizer/websocket-normalizer.d.ts +0 -8
- package/dist/src/normalizer/websocket-normalizer.js +0 -78
- package/dist/src/optimizer/core.d.ts +0 -17
- package/dist/src/optimizer/core.js +0 -136
- package/dist/src/optimizer/index.d.ts +0 -4
- package/dist/src/optimizer/index.js +0 -7
- package/dist/src/optimizer/optimization-functions.d.ts +0 -32
- package/dist/src/optimizer/optimization-functions.js +0 -179
- package/dist/src/optimizer/types.d.ts +0 -28
- package/dist/src/optimizer/types.js +0 -1
- package/dist/src/optimizer/utils.d.ts +0 -7
- package/dist/src/optimizer/utils.js +0 -29
- package/dist/src/schemas/dedupe.d.ts +0 -9
- package/dist/src/schemas/dedupe.js +0 -110
- package/dist/src/schemas/index.d.ts +0 -3
- package/dist/src/schemas/index.js +0 -6
- package/dist/src/schemas/resolver.d.ts +0 -19
- package/dist/src/schemas/resolver.js +0 -38
- package/dist/src/schemas/utils.d.ts +0 -20
- package/dist/src/schemas/utils.js +0 -49
- package/dist/src/types/index.d.ts +0 -434
- package/dist/src/types/index.js +0 -1
- package/dist/src/validator/ajv-validator.d.ts +0 -15
- package/dist/src/validator/ajv-validator.js +0 -75
- package/dist/src/validator/config-validator-main.d.ts +0 -10
- package/dist/src/validator/config-validator-main.js +0 -31
- package/dist/src/validator/config-validator.d.ts +0 -5
- package/dist/src/validator/config-validator.js +0 -14
- package/dist/src/validator/index.d.ts +0 -10
- package/dist/src/validator/index.js +0 -11
- package/dist/src/validator/object-traversal.d.ts +0 -52
- package/dist/src/validator/object-traversal.js +0 -104
- package/dist/src/validator/reference-validator.d.ts +0 -31
- package/dist/src/validator/reference-validator.js +0 -230
- package/dist/src/validator/schema-references.d.ts +0 -23
- package/dist/src/validator/schema-references.js +0 -111
- package/dist/src/validator/semantic-validator.d.ts +0 -26
- package/dist/src/validator/semantic-validator.js +0 -325
- package/dist/src/validator/tests-validator.d.ts +0 -9
- package/dist/src/validator/tests-validator.js +0 -13
- package/dist/src/validator/types.d.ts +0 -29
- package/dist/src/validator/types.js +0 -1
- package/dist/src/validator/unispec-validator.d.ts +0 -15
- package/dist/src/validator/unispec-validator.js +0 -77
- package/dist/src/validator/validator-factory.d.ts +0 -10
- package/dist/src/validator/validator-factory.js +0 -73
- package/dist/src/versions.d.ts +0 -10
- package/dist/src/versions.js +0 -143
- package/dist/tests/cache/cache.test.d.ts +0 -1
- package/dist/tests/cache/cache.test.js +0 -269
- package/dist/tests/cache/utils.d.ts +0 -4
- package/dist/tests/cache/utils.js +0 -24
- package/dist/tests/concurrency-normalizer-optimizer.test.d.ts +0 -0
- package/dist/tests/concurrency-normalizer-optimizer.test.js +0 -1
- package/dist/tests/diff/diff-annotators.test.d.ts +0 -1
- package/dist/tests/diff/diff-annotators.test.js +0 -275
- package/dist/tests/diff/diff-comprehensive.test.d.ts +0 -1
- package/dist/tests/diff/diff-comprehensive.test.js +0 -257
- package/dist/tests/diff/diff-extended.test.d.ts +0 -1
- package/dist/tests/diff/diff-extended.test.js +0 -230
- package/dist/tests/diff/diff.test.d.ts +0 -1
- package/dist/tests/diff/diff.test.js +0 -184
- package/dist/tests/diff/utils.d.ts +0 -2
- package/dist/tests/diff/utils.js +0 -3
- package/dist/tests/errors/errors-integration.test.d.ts +0 -1
- package/dist/tests/errors/errors-integration.test.js +0 -168
- package/dist/tests/errors/errors.test.d.ts +0 -1
- package/dist/tests/errors/errors.test.js +0 -275
- package/dist/tests/errors/utils.d.ts +0 -2
- package/dist/tests/errors/utils.js +0 -3
- package/dist/tests/loader/integration.test.d.ts +0 -1
- package/dist/tests/loader/integration.test.js +0 -211
- package/dist/tests/loader/loader.test.d.ts +0 -1
- package/dist/tests/loader/loader.test.js +0 -336
- package/dist/tests/normalizer/normalizer-comprehensive.test.d.ts +0 -1
- package/dist/tests/normalizer/normalizer-comprehensive.test.js +0 -643
- package/dist/tests/normalizer/normalizer-invalid.test.d.ts +0 -1
- package/dist/tests/normalizer/normalizer-invalid.test.js +0 -253
- package/dist/tests/normalizer/normalizer-valid.test.d.ts +0 -1
- package/dist/tests/normalizer/normalizer-valid.test.js +0 -233
- package/dist/tests/normalizer/utils.d.ts +0 -18
- package/dist/tests/normalizer/utils.js +0 -36
- package/dist/tests/optimizer/compress-references.test.d.ts +0 -1
- package/dist/tests/optimizer/compress-references.test.js +0 -299
- package/dist/tests/optimizer/deduplication.test.d.ts +0 -1
- package/dist/tests/optimizer/deduplication.test.js +0 -127
- package/dist/tests/optimizer/integration.test.d.ts +0 -1
- package/dist/tests/optimizer/integration.test.js +0 -126
- package/dist/tests/optimizer/optimization-report.test.d.ts +0 -1
- package/dist/tests/optimizer/optimization-report.test.js +0 -217
- package/dist/tests/optimizer/optimize-document.test.d.ts +0 -1
- package/dist/tests/optimizer/optimize-document.test.js +0 -182
- package/dist/tests/optimizer/orphaned-schemas.test.d.ts +0 -1
- package/dist/tests/optimizer/orphaned-schemas.test.js +0 -189
- package/dist/tests/optimizer/sort-schemas.test.d.ts +0 -1
- package/dist/tests/optimizer/sort-schemas.test.js +0 -126
- package/dist/tests/optimizer/utils.d.ts +0 -8
- package/dist/tests/optimizer/utils.js +0 -199
- package/dist/tests/schemas/schemas-edge-cases.test.d.ts +0 -1
- package/dist/tests/schemas/schemas-edge-cases.test.js +0 -218
- package/dist/tests/schemas/schemas.test.d.ts +0 -1
- package/dist/tests/schemas/schemas.test.js +0 -395
- package/dist/tests/schemas/utils.d.ts +0 -2
- package/dist/tests/schemas/utils.js +0 -3
- package/dist/tests/utils.d.ts +0 -10
- package/dist/tests/utils.js +0 -118
- package/dist/tests/validator/config-validator.test.d.ts +0 -1
- package/dist/tests/validator/config-validator.test.js +0 -73
- package/dist/tests/validator/debug-config.d.ts +0 -0
- package/dist/tests/validator/debug-config.js +0 -1
- package/dist/tests/validator/debug-missing-service.d.ts +0 -0
- package/dist/tests/validator/debug-missing-service.js +0 -1
- package/dist/tests/validator/debug-other-configs.d.ts +0 -0
- package/dist/tests/validator/debug-other-configs.js +0 -1
- package/dist/tests/validator/debug-references.d.ts +0 -0
- package/dist/tests/validator/debug-references.js +0 -1
- package/dist/tests/validator/unispec-validator.test.d.ts +0 -1
- package/dist/tests/validator/unispec-validator.test.js +0 -98
- package/dist/tests/validator/utils.d.ts +0 -6
- package/dist/tests/validator/utils.js +0 -20
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateUniSpec = validateUniSpec;
|
|
4
|
-
const errors_1 = require("
|
|
5
|
-
const ajv_validator_1 = require("./ajv-validator
|
|
6
|
-
const reference_validator_1 = require("./reference-validator
|
|
7
|
-
const semantic_validator_1 = require("./semantic-validator
|
|
8
|
-
const validator_factory_1 = require("./validator-factory
|
|
4
|
+
const errors_1 = require("@/errors");
|
|
5
|
+
const ajv_validator_1 = require("./ajv-validator");
|
|
6
|
+
const reference_validator_1 = require("./reference-validator");
|
|
7
|
+
const semantic_validator_1 = require("./semantic-validator");
|
|
8
|
+
const validator_factory_1 = require("./validator-factory");
|
|
9
9
|
/**
|
|
10
10
|
* Validate a UniSpec document with optional extended validation.
|
|
11
11
|
*
|
|
@@ -56,12 +56,8 @@ async function validateUniSpec(doc, options = {}) {
|
|
|
56
56
|
async function validateUniSpecBase(doc, options = {}) {
|
|
57
57
|
try {
|
|
58
58
|
const { validateUniSpecFn } = await (0, ajv_validator_1.getValidator)(options);
|
|
59
|
-
//
|
|
60
|
-
const
|
|
61
|
-
unispecVersion: doc.unispecVersion || "1.0.0",
|
|
62
|
-
service: doc.service,
|
|
63
|
-
};
|
|
64
|
-
const valid = validateUniSpecFn(docForValidation);
|
|
59
|
+
// Validate the document as-is to ensure all required fields are present
|
|
60
|
+
const valid = validateUniSpecFn(doc);
|
|
65
61
|
const schemaErrors = (0, validator_factory_1.mapAjvErrors)(validateUniSpecFn.errors);
|
|
66
62
|
if (valid) {
|
|
67
63
|
return {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createValidator = createValidator;
|
|
4
4
|
exports.mapAjvErrors = mapAjvErrors;
|
|
5
|
-
const errors_1 = require("
|
|
5
|
+
const errors_1 = require("@/errors");
|
|
6
6
|
/**
|
|
7
7
|
* Generic validator factory to reduce code duplication.
|
|
8
8
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UniSpecChange } from "./types
|
|
1
|
+
import type { UniSpecChange } from "./types";
|
|
2
2
|
export declare function annotateRestChange(change: UniSpecChange): UniSpecChange;
|
|
3
3
|
export declare function annotateWebSocketChange(change: UniSpecChange): UniSpecChange;
|
|
4
4
|
export declare function annotateGraphQLChange(change: UniSpecChange): UniSpecChange;
|
package/dist/diff/annotators.js
CHANGED
|
@@ -125,7 +125,7 @@ export function annotateGraphQLChange(change) {
|
|
|
125
125
|
const singularMap = {
|
|
126
126
|
queries: "query",
|
|
127
127
|
mutations: "mutation",
|
|
128
|
-
subscriptions: "subscription"
|
|
128
|
+
subscriptions: "subscription",
|
|
129
129
|
};
|
|
130
130
|
const operationKind = `graphql.${singularMap[operationType]}`;
|
|
131
131
|
// Check for specific changes first, then general ones
|
|
@@ -136,7 +136,8 @@ export function annotateGraphQLChange(change) {
|
|
|
136
136
|
annotated.severity = "breaking";
|
|
137
137
|
}
|
|
138
138
|
else if (change.path.includes("/args") &&
|
|
139
|
-
(change.description === "Item added" ||
|
|
139
|
+
(change.description === "Item added" ||
|
|
140
|
+
change.description === "Item removed")) {
|
|
140
141
|
// Argument changes
|
|
141
142
|
const action = change.description === "Item added" ? "added" : "removed";
|
|
142
143
|
annotated.kind = `${operationKind}.argument_${action}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EnhancedDiffResult, EnhancedUniSpecChange } from "./enhanced-diff
|
|
1
|
+
import type { EnhancedDiffResult, EnhancedUniSpecChange } from "./enhanced-diff";
|
|
2
2
|
export interface ReportOptions {
|
|
3
3
|
format: "markdown" | "html" | "json";
|
|
4
4
|
includeSuggestions?: boolean;
|
package/dist/diff/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { UniSpecDocument } from "
|
|
2
|
-
import { type DiffOptions, type DiffResult } from "./types
|
|
1
|
+
import type { UniSpecDocument } from "@/types";
|
|
2
|
+
import { type DiffOptions, type DiffResult } from "./types";
|
|
3
3
|
/**
|
|
4
4
|
* Compare two UniSpec documents and return detected changes.
|
|
5
5
|
*
|
package/dist/diff/core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { annotateGraphQLChange, annotateRestChange, annotateWebSocketChange, } from "./annotators
|
|
2
|
-
import { DEFAULT_NAMED_COLLECTION_PATHS, } from "./types
|
|
1
|
+
import { annotateGraphQLChange, annotateRestChange, annotateWebSocketChange, } from "./annotators";
|
|
2
|
+
import { DEFAULT_NAMED_COLLECTION_PATHS, } from "./types";
|
|
3
3
|
/**
|
|
4
4
|
* Check if a value is a plain object (not array, null, or other object types).
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { UniSpecDocument } from "
|
|
2
|
-
import { type RiskLevel } from "./risk-calculator
|
|
3
|
-
import type { UniSpecChange } from "./types
|
|
1
|
+
import type { UniSpecDocument } from "@/types";
|
|
2
|
+
import { type RiskLevel } from "./risk-calculator";
|
|
3
|
+
import type { UniSpecChange } from "./types";
|
|
4
4
|
export interface ChangeImpact {
|
|
5
5
|
backwardCompatibility: "compatible" | "incompatible" | "unknown";
|
|
6
6
|
clientImpact: "none" | "low" | "medium" | "high";
|
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
import { diffUniSpec } from "./core
|
|
2
|
-
import { ImpactAnalysisStrategyFactory } from "./impact-strategies-refactored
|
|
3
|
-
import { MetricsCalculatorService } from "./metrics-calculator
|
|
4
|
-
import { RiskLevelCalculator } from "./risk-calculator
|
|
5
|
-
import { SuggestionGeneratorService } from "./suggestion-generator
|
|
1
|
+
import { diffUniSpec } from "./core";
|
|
2
|
+
import { ImpactAnalysisStrategyFactory } from "./impact-strategies-refactored";
|
|
3
|
+
import { MetricsCalculatorService } from "./metrics-calculator";
|
|
4
|
+
import { RiskLevelCalculator } from "./risk-calculator";
|
|
5
|
+
import { SuggestionGeneratorService } from "./suggestion-generator";
|
|
6
6
|
/**
|
|
7
7
|
* Service instances for better separation of concerns.
|
|
8
8
|
*/
|
|
9
9
|
const suggestionGenerator = new SuggestionGeneratorService();
|
|
10
10
|
const metricsCalculator = new MetricsCalculatorService();
|
|
11
|
-
/**
|
|
12
|
-
* Generate migration suggestions based on change impact.
|
|
13
|
-
* @deprecated Use SuggestionGeneratorService.generateSuggestions instead
|
|
14
|
-
*/
|
|
15
|
-
function generateSuggestions(change, impact) {
|
|
16
|
-
return suggestionGenerator.generateSuggestions(change, impact);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Calculate compatibility metrics from enhanced changes.
|
|
20
|
-
* @deprecated Use MetricsCalculatorService.calculateMetrics instead
|
|
21
|
-
*/
|
|
22
|
-
function calculateMetrics(changes) {
|
|
23
|
-
return metricsCalculator.calculateMetrics(changes);
|
|
24
|
-
}
|
|
25
11
|
/**
|
|
26
12
|
* Perform enhanced diff analysis with impact assessment and compatibility metrics.
|
|
27
13
|
*
|
|
@@ -45,7 +31,7 @@ export function diffUniSpecEnhanced(oldDoc, newDoc) {
|
|
|
45
31
|
// Analyze impact using strategy
|
|
46
32
|
const impact = strategy.analyze(change);
|
|
47
33
|
// Generate suggestions
|
|
48
|
-
const suggestions = generateSuggestions(change, impact);
|
|
34
|
+
const suggestions = suggestionGenerator.generateSuggestions(change, impact);
|
|
49
35
|
// Calculate risk level using calculator
|
|
50
36
|
const riskLevel = RiskLevelCalculator.calculate(impact);
|
|
51
37
|
return {
|
|
@@ -56,7 +42,7 @@ export function diffUniSpecEnhanced(oldDoc, newDoc) {
|
|
|
56
42
|
};
|
|
57
43
|
});
|
|
58
44
|
// Calculate metrics
|
|
59
|
-
const metrics = calculateMetrics(enhancedChanges);
|
|
45
|
+
const metrics = metricsCalculator.calculateMetrics(enhancedChanges);
|
|
60
46
|
// Generate summary
|
|
61
47
|
const summary = {
|
|
62
48
|
totalChanges: enhancedChanges.length,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ChangeImpact } from "./enhanced-diff
|
|
2
|
-
import type { UniSpecChange } from "./types
|
|
1
|
+
import type { ChangeImpact } from "./enhanced-diff";
|
|
2
|
+
import type { UniSpecChange } from "./types";
|
|
3
3
|
/**
|
|
4
4
|
* Strategy interface for analyzing change impact.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ChangeImpact } from "./enhanced-diff
|
|
2
|
-
import type { UniSpecChange } from "./types
|
|
1
|
+
import type { ChangeImpact } from "./enhanced-diff";
|
|
2
|
+
import type { UniSpecChange } from "./types";
|
|
3
3
|
/**
|
|
4
4
|
* Strategy interface for analyzing change impact.
|
|
5
5
|
*/
|
package/dist/diff/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./change-reports
|
|
2
|
-
export * from "./core
|
|
3
|
-
export * from "./enhanced-diff
|
|
4
|
-
export * from "./impact-strategies-refactored
|
|
5
|
-
export * from "./metrics-calculator
|
|
6
|
-
export * from "./risk-calculator
|
|
7
|
-
export * from "./suggestion-generator
|
|
8
|
-
export * from "./types
|
|
1
|
+
export * from "./change-reports";
|
|
2
|
+
export * from "./core";
|
|
3
|
+
export * from "./enhanced-diff";
|
|
4
|
+
export * from "./impact-strategies-refactored";
|
|
5
|
+
export * from "./metrics-calculator";
|
|
6
|
+
export * from "./risk-calculator";
|
|
7
|
+
export * from "./suggestion-generator";
|
|
8
|
+
export * from "./types";
|
package/dist/diff/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// Export types
|
|
2
|
-
export * from "./change-reports
|
|
2
|
+
export * from "./change-reports";
|
|
3
3
|
// Export core functionality
|
|
4
|
-
export * from "./core
|
|
4
|
+
export * from "./core";
|
|
5
5
|
// Export enhanced functionality
|
|
6
|
-
export * from "./enhanced-diff
|
|
7
|
-
export * from "./impact-strategies-refactored
|
|
8
|
-
export * from "./metrics-calculator
|
|
9
|
-
export * from "./risk-calculator
|
|
10
|
-
export * from "./suggestion-generator
|
|
11
|
-
export * from "./types
|
|
6
|
+
export * from "./enhanced-diff";
|
|
7
|
+
export * from "./impact-strategies-refactored";
|
|
8
|
+
export * from "./metrics-calculator";
|
|
9
|
+
export * from "./risk-calculator";
|
|
10
|
+
export * from "./suggestion-generator";
|
|
11
|
+
export * from "./types";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ChangeImpact } from "./enhanced-diff
|
|
2
|
-
import type { UniSpecChange } from "./index
|
|
1
|
+
import type { ChangeImpact } from "./enhanced-diff";
|
|
2
|
+
import type { UniSpecChange } from "./index";
|
|
3
3
|
/**
|
|
4
4
|
* Service for generating migration suggestions based on change impact.
|
|
5
5
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UniSpecValidationError } from "./base-error
|
|
1
|
+
import { UniSpecValidationError } from "./base-error";
|
|
2
2
|
export declare class UniSpecConfigError extends UniSpecValidationError {
|
|
3
3
|
constructor(message: string, path?: string, details?: Record<string, unknown>);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UniSpecValidationError } from "./base-error
|
|
1
|
+
import { UniSpecValidationError } from "./base-error";
|
|
2
2
|
export class UniSpecConfigError extends UniSpecValidationError {
|
|
3
3
|
constructor(message, path = "", details) {
|
|
4
4
|
super(message, "config_error", path, "error", details);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { UniSpecValidationError } from "./base-error
|
|
2
|
-
import { UniSpecConfigError } from "./config-error
|
|
3
|
-
import { UniSpecLoaderError } from "./loader-error
|
|
4
|
-
import { UniSpecReferenceError } from "./reference-error
|
|
5
|
-
import { UniSpecSchemaError } from "./schema-error
|
|
6
|
-
import { UniSpecSecurityError } from "./security-error
|
|
7
|
-
import { UniSpecSemanticError } from "./semantic-error
|
|
1
|
+
import { UniSpecValidationError } from "./base-error";
|
|
2
|
+
import { UniSpecConfigError } from "./config-error";
|
|
3
|
+
import { UniSpecLoaderError } from "./loader-error";
|
|
4
|
+
import { UniSpecReferenceError } from "./reference-error";
|
|
5
|
+
import { UniSpecSchemaError } from "./schema-error";
|
|
6
|
+
import { UniSpecSecurityError } from "./security-error";
|
|
7
|
+
import { UniSpecSemanticError } from "./semantic-error";
|
|
8
8
|
/**
|
|
9
9
|
* Error factory for creating specific error types.
|
|
10
10
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { UniSpecValidationError } from "./base-error
|
|
2
|
-
import { UniSpecConfigError } from "./config-error
|
|
3
|
-
import { UniSpecLoaderError } from "./loader-error
|
|
4
|
-
import { UniSpecReferenceError } from "./reference-error
|
|
5
|
-
import { UniSpecSchemaError } from "./schema-error
|
|
6
|
-
import { UniSpecSecurityError } from "./security-error
|
|
7
|
-
import { UniSpecSemanticError } from "./semantic-error
|
|
1
|
+
import { UniSpecValidationError } from "./base-error";
|
|
2
|
+
import { UniSpecConfigError } from "./config-error";
|
|
3
|
+
import { UniSpecLoaderError } from "./loader-error";
|
|
4
|
+
import { UniSpecReferenceError } from "./reference-error";
|
|
5
|
+
import { UniSpecSchemaError } from "./schema-error";
|
|
6
|
+
import { UniSpecSecurityError } from "./security-error";
|
|
7
|
+
import { UniSpecSemanticError } from "./semantic-error";
|
|
8
8
|
/**
|
|
9
9
|
* Error factory for creating specific error types.
|
|
10
10
|
*/
|
package/dist/errors/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { UniSpecValidationError } from "./base-error
|
|
2
|
-
export { UniSpecConfigError } from "./config-error
|
|
3
|
-
export { ErrorFactory } from "./error-factory
|
|
4
|
-
export { UniSpecLoaderError } from "./loader-error
|
|
5
|
-
export { UniSpecReferenceError } from "./reference-error
|
|
6
|
-
export { UniSpecSchemaError } from "./schema-error
|
|
7
|
-
export { UniSpecSecurityError } from "./security-error
|
|
8
|
-
export { UniSpecSemanticError } from "./semantic-error
|
|
1
|
+
export { UniSpecValidationError } from "./base-error";
|
|
2
|
+
export { UniSpecConfigError } from "./config-error";
|
|
3
|
+
export { ErrorFactory } from "./error-factory";
|
|
4
|
+
export { UniSpecLoaderError } from "./loader-error";
|
|
5
|
+
export { UniSpecReferenceError } from "./reference-error";
|
|
6
|
+
export { UniSpecSchemaError } from "./schema-error";
|
|
7
|
+
export { UniSpecSecurityError } from "./security-error";
|
|
8
|
+
export { UniSpecSemanticError } from "./semantic-error";
|
package/dist/errors/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { UniSpecValidationError } from "./base-error
|
|
2
|
-
export { UniSpecConfigError } from "./config-error
|
|
3
|
-
export { ErrorFactory } from "./error-factory
|
|
4
|
-
export { UniSpecLoaderError } from "./loader-error
|
|
5
|
-
export { UniSpecReferenceError } from "./reference-error
|
|
6
|
-
export { UniSpecSchemaError } from "./schema-error
|
|
7
|
-
export { UniSpecSecurityError } from "./security-error
|
|
8
|
-
export { UniSpecSemanticError } from "./semantic-error
|
|
1
|
+
export { UniSpecValidationError } from "./base-error";
|
|
2
|
+
export { UniSpecConfigError } from "./config-error";
|
|
3
|
+
export { ErrorFactory } from "./error-factory";
|
|
4
|
+
export { UniSpecLoaderError } from "./loader-error";
|
|
5
|
+
export { UniSpecReferenceError } from "./reference-error";
|
|
6
|
+
export { UniSpecSchemaError } from "./schema-error";
|
|
7
|
+
export { UniSpecSecurityError } from "./security-error";
|
|
8
|
+
export { UniSpecSemanticError } from "./semantic-error";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UniSpecValidationError } from "./base-error
|
|
1
|
+
import { UniSpecValidationError } from "./base-error";
|
|
2
2
|
export declare class UniSpecLoaderError extends UniSpecValidationError {
|
|
3
3
|
constructor(message: string, path?: string, details?: Record<string, unknown>);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UniSpecValidationError } from "./base-error
|
|
1
|
+
import { UniSpecValidationError } from "./base-error";
|
|
2
2
|
export class UniSpecLoaderError extends UniSpecValidationError {
|
|
3
3
|
constructor(message, path = "", details) {
|
|
4
4
|
super(message, "loader_error", path, "error", details);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UniSpecValidationError } from "./base-error
|
|
1
|
+
import { UniSpecValidationError } from "./base-error";
|
|
2
2
|
export declare class UniSpecReferenceError extends UniSpecValidationError {
|
|
3
3
|
constructor(message: string, path?: string, details?: Record<string, unknown>);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UniSpecValidationError } from "./base-error
|
|
1
|
+
import { UniSpecValidationError } from "./base-error";
|
|
2
2
|
export class UniSpecReferenceError extends UniSpecValidationError {
|
|
3
3
|
constructor(message, path = "", details) {
|
|
4
4
|
super(message, "reference_error", path, "error", details);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UniSpecValidationError } from "./base-error
|
|
1
|
+
import { UniSpecValidationError } from "./base-error";
|
|
2
2
|
export declare class UniSpecSchemaError extends UniSpecValidationError {
|
|
3
3
|
constructor(message: string, path?: string, details?: Record<string, unknown>);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UniSpecValidationError } from "./base-error
|
|
1
|
+
import { UniSpecValidationError } from "./base-error";
|
|
2
2
|
export class UniSpecSchemaError extends UniSpecValidationError {
|
|
3
3
|
constructor(message, path = "", details) {
|
|
4
4
|
super(message, "schema_error", path, "error", details);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UniSpecValidationError } from "./base-error
|
|
1
|
+
import { UniSpecValidationError } from "./base-error";
|
|
2
2
|
export declare class UniSpecSecurityError extends UniSpecValidationError {
|
|
3
3
|
constructor(message: string, path?: string, details?: Record<string, unknown>);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UniSpecValidationError } from "./base-error
|
|
1
|
+
import { UniSpecValidationError } from "./base-error";
|
|
2
2
|
export class UniSpecSecurityError extends UniSpecValidationError {
|
|
3
3
|
constructor(message, path = "", details) {
|
|
4
4
|
super(message, "security_error", path, "error", details);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UniSpecValidationError } from "./base-error
|
|
1
|
+
import { UniSpecValidationError } from "./base-error";
|
|
2
2
|
export declare class UniSpecSemanticError extends UniSpecValidationError {
|
|
3
3
|
constructor(message: string, path?: string, details?: Record<string, unknown>);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UniSpecValidationError } from "./base-error
|
|
1
|
+
import { UniSpecValidationError } from "./base-error";
|
|
2
2
|
export class UniSpecSemanticError extends UniSpecValidationError {
|
|
3
3
|
constructor(message, path = "", details) {
|
|
4
4
|
super(message, "semantic_error", path, "error", details);
|
package/dist/index.cjs
CHANGED
|
@@ -20,40 +20,40 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
20
20
|
// ============================================================================
|
|
21
21
|
// CACHING SYSTEM
|
|
22
22
|
// ============================================================================
|
|
23
|
-
__exportStar(require("./cache
|
|
23
|
+
__exportStar(require("./cache"), exports);
|
|
24
24
|
// ============================================================================
|
|
25
25
|
// DIFF AND CHANGE ANALYSIS
|
|
26
26
|
// ============================================================================
|
|
27
|
-
__exportStar(require("./diff
|
|
27
|
+
__exportStar(require("./diff"), exports);
|
|
28
28
|
// ============================================================================
|
|
29
29
|
// DOCUMENT LOADING AND PARSING
|
|
30
30
|
// ============================================================================
|
|
31
|
-
__exportStar(require("./loader
|
|
31
|
+
__exportStar(require("./loader"), exports);
|
|
32
32
|
// ============================================================================
|
|
33
33
|
// DOCUMENT NORMALIZATION
|
|
34
34
|
// ============================================================================
|
|
35
|
-
__exportStar(require("./normalizer
|
|
35
|
+
__exportStar(require("./normalizer"), exports);
|
|
36
36
|
// ============================================================================
|
|
37
37
|
// DOCUMENT OPTIMIZATION
|
|
38
38
|
// ============================================================================
|
|
39
|
-
__exportStar(require("./optimizer
|
|
39
|
+
__exportStar(require("./optimizer"), exports);
|
|
40
40
|
// ============================================================================
|
|
41
41
|
// SCHEMA MANAGEMENT
|
|
42
42
|
// ============================================================================
|
|
43
|
-
__exportStar(require("./schemas
|
|
44
|
-
__exportStar(require("./types
|
|
43
|
+
__exportStar(require("./schemas"), exports);
|
|
44
|
+
__exportStar(require("./types"), exports);
|
|
45
45
|
// ============================================================================
|
|
46
46
|
// VALIDATION SYSTEM
|
|
47
47
|
// ============================================================================
|
|
48
|
-
__exportStar(require("./validator
|
|
48
|
+
__exportStar(require("./validator"), exports);
|
|
49
49
|
// ============================================================================
|
|
50
50
|
// UTILITY FUNCTIONS
|
|
51
51
|
// ============================================================================
|
|
52
|
-
__exportStar(require("./validator/object-traversal
|
|
53
|
-
__exportStar(require("./validator/reference-validator
|
|
54
|
-
__exportStar(require("./validator/schema-references
|
|
55
|
-
__exportStar(require("./validator/semantic-validator
|
|
52
|
+
__exportStar(require("./validator/object-traversal"), exports);
|
|
53
|
+
__exportStar(require("./validator/reference-validator"), exports);
|
|
54
|
+
__exportStar(require("./validator/schema-references"), exports);
|
|
55
|
+
__exportStar(require("./validator/semantic-validator"), exports);
|
|
56
56
|
// ============================================================================
|
|
57
57
|
// VERSION INFORMATION
|
|
58
58
|
// ============================================================================
|
|
59
|
-
__exportStar(require("./versions
|
|
59
|
+
__exportStar(require("./versions"), exports);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export * from "./cache
|
|
2
|
-
export * from "./diff
|
|
3
|
-
export * from "./loader
|
|
4
|
-
export * from "./normalizer
|
|
5
|
-
export * from "./optimizer
|
|
6
|
-
export * from "./schemas
|
|
7
|
-
export * from "./types
|
|
8
|
-
export * from "./validator
|
|
9
|
-
export * from "./validator/object-traversal
|
|
10
|
-
export * from "./validator/reference-validator
|
|
11
|
-
export * from "./validator/schema-references
|
|
12
|
-
export * from "./validator/semantic-validator
|
|
13
|
-
export * from "./versions
|
|
1
|
+
export * from "./cache";
|
|
2
|
+
export * from "./diff";
|
|
3
|
+
export * from "./loader";
|
|
4
|
+
export * from "./normalizer";
|
|
5
|
+
export * from "./optimizer";
|
|
6
|
+
export * from "./schemas";
|
|
7
|
+
export * from "./types";
|
|
8
|
+
export * from "./validator";
|
|
9
|
+
export * from "./validator/object-traversal";
|
|
10
|
+
export * from "./validator/reference-validator";
|
|
11
|
+
export * from "./validator/schema-references";
|
|
12
|
+
export * from "./validator/semantic-validator";
|
|
13
|
+
export * from "./versions";
|
package/dist/index.js
CHANGED
|
@@ -4,40 +4,40 @@
|
|
|
4
4
|
// ============================================================================
|
|
5
5
|
// CACHING SYSTEM
|
|
6
6
|
// ============================================================================
|
|
7
|
-
export * from "./cache
|
|
7
|
+
export * from "./cache";
|
|
8
8
|
// ============================================================================
|
|
9
9
|
// DIFF AND CHANGE ANALYSIS
|
|
10
10
|
// ============================================================================
|
|
11
|
-
export * from "./diff
|
|
11
|
+
export * from "./diff";
|
|
12
12
|
// ============================================================================
|
|
13
13
|
// DOCUMENT LOADING AND PARSING
|
|
14
14
|
// ============================================================================
|
|
15
|
-
export * from "./loader
|
|
15
|
+
export * from "./loader";
|
|
16
16
|
// ============================================================================
|
|
17
17
|
// DOCUMENT NORMALIZATION
|
|
18
18
|
// ============================================================================
|
|
19
|
-
export * from "./normalizer
|
|
19
|
+
export * from "./normalizer";
|
|
20
20
|
// ============================================================================
|
|
21
21
|
// DOCUMENT OPTIMIZATION
|
|
22
22
|
// ============================================================================
|
|
23
|
-
export * from "./optimizer
|
|
23
|
+
export * from "./optimizer";
|
|
24
24
|
// ============================================================================
|
|
25
25
|
// SCHEMA MANAGEMENT
|
|
26
26
|
// ============================================================================
|
|
27
|
-
export * from "./schemas
|
|
28
|
-
export * from "./types
|
|
27
|
+
export * from "./schemas";
|
|
28
|
+
export * from "./types";
|
|
29
29
|
// ============================================================================
|
|
30
30
|
// VALIDATION SYSTEM
|
|
31
31
|
// ============================================================================
|
|
32
|
-
export * from "./validator
|
|
32
|
+
export * from "./validator";
|
|
33
33
|
// ============================================================================
|
|
34
34
|
// UTILITY FUNCTIONS
|
|
35
35
|
// ============================================================================
|
|
36
|
-
export * from "./validator/object-traversal
|
|
37
|
-
export * from "./validator/reference-validator
|
|
38
|
-
export * from "./validator/schema-references
|
|
39
|
-
export * from "./validator/semantic-validator
|
|
36
|
+
export * from "./validator/object-traversal";
|
|
37
|
+
export * from "./validator/reference-validator";
|
|
38
|
+
export * from "./validator/schema-references";
|
|
39
|
+
export * from "./validator/semantic-validator";
|
|
40
40
|
// ============================================================================
|
|
41
41
|
// VERSION INFORMATION
|
|
42
42
|
// ============================================================================
|
|
43
|
-
export * from "./versions
|
|
43
|
+
export * from "./versions";
|
package/dist/loader/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { validateDocumentSecurity } from "./security-validator
|
|
2
|
-
export type { LoadOptions, SecureLoadOptions } from "./types
|
|
3
|
-
export { ALLOWED_YAML_MODULES } from "./types
|
|
4
|
-
export { loadUniSpec } from "./unispec-loader
|
|
5
|
-
export { getYamlModule, validateYamlModule } from "./yaml-loader
|
|
1
|
+
export { validateDocumentSecurity } from "./security-validator";
|
|
2
|
+
export type { LoadOptions, SecureLoadOptions } from "./types";
|
|
3
|
+
export { ALLOWED_YAML_MODULES } from "./types";
|
|
4
|
+
export { loadUniSpec } from "./unispec-loader";
|
|
5
|
+
export { getYamlModule, validateYamlModule } from "./yaml-loader";
|
package/dist/loader/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Export all loader functionality
|
|
2
|
-
export { validateDocumentSecurity } from "./security-validator
|
|
3
|
-
export { ALLOWED_YAML_MODULES } from "./types
|
|
4
|
-
export { loadUniSpec } from "./unispec-loader
|
|
5
|
-
export { getYamlModule, validateYamlModule } from "./yaml-loader
|
|
2
|
+
export { validateDocumentSecurity } from "./security-validator";
|
|
3
|
+
export { ALLOWED_YAML_MODULES } from "./types";
|
|
4
|
+
export { loadUniSpec } from "./unispec-loader";
|
|
5
|
+
export { getYamlModule, validateYamlModule } from "./yaml-loader";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { UniSpecDocument } from "
|
|
2
|
-
import type { LoadOptions } from "./types
|
|
1
|
+
import type { UniSpecDocument } from "@/types";
|
|
2
|
+
import type { LoadOptions } from "./types";
|
|
3
3
|
/**
|
|
4
4
|
* Load a UniSpec document from a raw input value.
|
|
5
5
|
* Supports:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ErrorFactory } from "
|
|
2
|
-
import { validateDocumentSecurity } from "./security-validator
|
|
3
|
-
import { getYamlModule } from "./yaml-loader
|
|
1
|
+
import { ErrorFactory } from "@/errors/index";
|
|
2
|
+
import { validateDocumentSecurity } from "./security-validator";
|
|
3
|
+
import { getYamlModule } from "./yaml-loader";
|
|
4
4
|
/**
|
|
5
5
|
* Load a UniSpec document from a raw input value.
|
|
6
6
|
* Supports:
|