@seontechnologies/playwright-utils 3.10.0
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/LICENSE +21 -0
- package/README.md +727 -0
- package/dist/cjs/api-request/api-request-fixture.d.ts +47 -0
- package/dist/cjs/api-request/api-request-fixture.d.ts.map +1 -0
- package/dist/cjs/api-request/api-request-fixture.js +26 -0
- package/dist/cjs/api-request/api-request-fixture.js.map +1 -0
- package/dist/cjs/api-request/api-request.d.ts +108 -0
- package/dist/cjs/api-request/api-request.d.ts.map +1 -0
- package/dist/cjs/api-request/api-request.js +326 -0
- package/dist/cjs/api-request/api-request.js.map +1 -0
- package/dist/cjs/api-request/fixtures.d.ts +3 -0
- package/dist/cjs/api-request/fixtures.d.ts.map +1 -0
- package/dist/cjs/api-request/fixtures.js +13 -0
- package/dist/cjs/api-request/fixtures.js.map +1 -0
- package/dist/cjs/api-request/index.d.ts +7 -0
- package/dist/cjs/api-request/index.d.ts.map +1 -0
- package/dist/cjs/api-request/index.js +11 -0
- package/dist/cjs/api-request/index.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/core.d.ts +13 -0
- package/dist/cjs/api-request/schema-validation/core.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/core.js +55 -0
- package/dist/cjs/api-request/schema-validation/core.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/fixture.d.ts +20 -0
- package/dist/cjs/api-request/schema-validation/fixture.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/fixture.js +17 -0
- package/dist/cjs/api-request/schema-validation/fixture.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/index.d.ts +6 -0
- package/dist/cjs/api-request/schema-validation/index.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/index.js +13 -0
- package/dist/cjs/api-request/schema-validation/index.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/file-loader.d.ts +50 -0
- package/dist/cjs/api-request/schema-validation/internal/file-loader.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/file-loader.js +126 -0
- package/dist/cjs/api-request/schema-validation/internal/file-loader.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/openapi-handler.d.ts +43 -0
- package/dist/cjs/api-request/schema-validation/internal/openapi-handler.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/openapi-handler.js +147 -0
- package/dist/cjs/api-request/schema-validation/internal/openapi-handler.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/promise-extension.d.ts +10 -0
- package/dist/cjs/api-request/schema-validation/internal/promise-extension.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/promise-extension.js +14 -0
- package/dist/cjs/api-request/schema-validation/internal/promise-extension.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/response-extension.d.ts +18 -0
- package/dist/cjs/api-request/schema-validation/internal/response-extension.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/response-extension.js +212 -0
- package/dist/cjs/api-request/schema-validation/internal/response-extension.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/result-builder.d.ts +62 -0
- package/dist/cjs/api-request/schema-validation/internal/result-builder.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/result-builder.js +140 -0
- package/dist/cjs/api-request/schema-validation/internal/result-builder.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/safe-error-serializer.d.ts +58 -0
- package/dist/cjs/api-request/schema-validation/internal/safe-error-serializer.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/safe-error-serializer.js +221 -0
- package/dist/cjs/api-request/schema-validation/internal/safe-error-serializer.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/schema-processors.d.ts +38 -0
- package/dist/cjs/api-request/schema-validation/internal/schema-processors.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/schema-processors.js +341 -0
- package/dist/cjs/api-request/schema-validation/internal/schema-processors.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/shape-validator.d.ts +96 -0
- package/dist/cjs/api-request/schema-validation/internal/shape-validator.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/shape-validator.js +180 -0
- package/dist/cjs/api-request/schema-validation/internal/shape-validator.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/validation-engine.d.ts +63 -0
- package/dist/cjs/api-request/schema-validation/internal/validation-engine.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/validation-engine.js +395 -0
- package/dist/cjs/api-request/schema-validation/internal/validation-engine.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/types.d.ts +92 -0
- package/dist/cjs/api-request/schema-validation/types.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/types.js +16 -0
- package/dist/cjs/api-request/schema-validation/types.js.map +1 -0
- package/dist/cjs/api-request/ui-display.d.ts +42 -0
- package/dist/cjs/api-request/ui-display.d.ts.map +1 -0
- package/dist/cjs/api-request/ui-display.js +370 -0
- package/dist/cjs/api-request/ui-display.js.map +1 -0
- package/dist/cjs/auth-session/apply-user-cookies-to-browser-context.d.ts +17 -0
- package/dist/cjs/auth-session/apply-user-cookies-to-browser-context.d.ts.map +1 -0
- package/dist/cjs/auth-session/apply-user-cookies-to-browser-context.js +49 -0
- package/dist/cjs/auth-session/apply-user-cookies-to-browser-context.js.map +1 -0
- package/dist/cjs/auth-session/core.d.ts +56 -0
- package/dist/cjs/auth-session/core.d.ts.map +1 -0
- package/dist/cjs/auth-session/core.js +271 -0
- package/dist/cjs/auth-session/core.js.map +1 -0
- package/dist/cjs/auth-session/fixtures.d.ts +83 -0
- package/dist/cjs/auth-session/fixtures.d.ts.map +1 -0
- package/dist/cjs/auth-session/fixtures.js +147 -0
- package/dist/cjs/auth-session/fixtures.js.map +1 -0
- package/dist/cjs/auth-session/global-setup-helper.d.ts +18 -0
- package/dist/cjs/auth-session/global-setup-helper.d.ts.map +1 -0
- package/dist/cjs/auth-session/global-setup-helper.js +26 -0
- package/dist/cjs/auth-session/global-setup-helper.js.map +1 -0
- package/dist/cjs/auth-session/index.d.ts +15 -0
- package/dist/cjs/auth-session/index.d.ts.map +1 -0
- package/dist/cjs/auth-session/index.js +45 -0
- package/dist/cjs/auth-session/index.js.map +1 -0
- package/dist/cjs/auth-session/internal/auth-configure.d.ts +19 -0
- package/dist/cjs/auth-session/internal/auth-configure.d.ts.map +1 -0
- package/dist/cjs/auth-session/internal/auth-configure.js +117 -0
- package/dist/cjs/auth-session/internal/auth-configure.js.map +1 -0
- package/dist/cjs/auth-session/internal/auth-global-setup.d.ts +33 -0
- package/dist/cjs/auth-session/internal/auth-global-setup.d.ts.map +1 -0
- package/dist/cjs/auth-session/internal/auth-global-setup.js +152 -0
- package/dist/cjs/auth-session/internal/auth-global-setup.js.map +1 -0
- package/dist/cjs/auth-session/internal/auth-provider-validator.d.ts +36 -0
- package/dist/cjs/auth-session/internal/auth-provider-validator.d.ts.map +1 -0
- package/dist/cjs/auth-session/internal/auth-provider-validator.js +273 -0
- package/dist/cjs/auth-session/internal/auth-provider-validator.js.map +1 -0
- package/dist/cjs/auth-session/internal/auth-provider.d.ts +92 -0
- package/dist/cjs/auth-session/internal/auth-provider.d.ts.map +1 -0
- package/dist/cjs/auth-session/internal/auth-provider.js +40 -0
- package/dist/cjs/auth-session/internal/auth-provider.js.map +1 -0
- package/dist/cjs/auth-session/internal/auth-session.d.ts +76 -0
- package/dist/cjs/auth-session/internal/auth-session.d.ts.map +1 -0
- package/dist/cjs/auth-session/internal/auth-session.js +651 -0
- package/dist/cjs/auth-session/internal/auth-session.js.map +1 -0
- package/dist/cjs/auth-session/internal/auth-storage-utils.d.ts +62 -0
- package/dist/cjs/auth-session/internal/auth-storage-utils.d.ts.map +1 -0
- package/dist/cjs/auth-session/internal/auth-storage-utils.js +314 -0
- package/dist/cjs/auth-session/internal/auth-storage-utils.js.map +1 -0
- package/dist/cjs/auth-session/internal/cache-manager.d.ts +116 -0
- package/dist/cjs/auth-session/internal/cache-manager.d.ts.map +1 -0
- package/dist/cjs/auth-session/internal/cache-manager.js +267 -0
- package/dist/cjs/auth-session/internal/cache-manager.js.map +1 -0
- package/dist/cjs/auth-session/internal/types.d.ts +132 -0
- package/dist/cjs/auth-session/internal/types.d.ts.map +1 -0
- package/dist/cjs/auth-session/internal/types.js +4 -0
- package/dist/cjs/auth-session/internal/types.js.map +1 -0
- package/dist/cjs/burn-in/core/analyzer.d.ts +36 -0
- package/dist/cjs/burn-in/core/analyzer.d.ts.map +1 -0
- package/dist/cjs/burn-in/core/analyzer.js +329 -0
- package/dist/cjs/burn-in/core/analyzer.js.map +1 -0
- package/dist/cjs/burn-in/core/config.d.ts +4 -0
- package/dist/cjs/burn-in/core/config.d.ts.map +1 -0
- package/dist/cjs/burn-in/core/config.js +107 -0
- package/dist/cjs/burn-in/core/config.js.map +1 -0
- package/dist/cjs/burn-in/core/types.d.ts +24 -0
- package/dist/cjs/burn-in/core/types.d.ts.map +1 -0
- package/dist/cjs/burn-in/core/types.js +3 -0
- package/dist/cjs/burn-in/core/types.js.map +1 -0
- package/dist/cjs/burn-in/index.d.ts +3 -0
- package/dist/cjs/burn-in/index.d.ts.map +1 -0
- package/dist/cjs/burn-in/index.js +7 -0
- package/dist/cjs/burn-in/index.js.map +1 -0
- package/dist/cjs/burn-in/runner.d.ts +13 -0
- package/dist/cjs/burn-in/runner.d.ts.map +1 -0
- package/dist/cjs/burn-in/runner.js +61 -0
- package/dist/cjs/burn-in/runner.js.map +1 -0
- package/dist/cjs/file-utils/core/csv-reader.d.ts +35 -0
- package/dist/cjs/file-utils/core/csv-reader.d.ts.map +1 -0
- package/dist/cjs/file-utils/core/csv-reader.js +206 -0
- package/dist/cjs/file-utils/core/csv-reader.js.map +1 -0
- package/dist/cjs/file-utils/core/file-downloader.d.ts +19 -0
- package/dist/cjs/file-utils/core/file-downloader.d.ts.map +1 -0
- package/dist/cjs/file-utils/core/file-downloader.js +49 -0
- package/dist/cjs/file-utils/core/file-downloader.js.map +1 -0
- package/dist/cjs/file-utils/core/pdf-reader.d.ts +42 -0
- package/dist/cjs/file-utils/core/pdf-reader.d.ts.map +1 -0
- package/dist/cjs/file-utils/core/pdf-reader.js +135 -0
- package/dist/cjs/file-utils/core/pdf-reader.js.map +1 -0
- package/dist/cjs/file-utils/core/types.d.ts +138 -0
- package/dist/cjs/file-utils/core/types.d.ts.map +1 -0
- package/dist/cjs/file-utils/core/types.js +72 -0
- package/dist/cjs/file-utils/core/types.js.map +1 -0
- package/dist/cjs/file-utils/core/xlsx-reader.d.ts +31 -0
- package/dist/cjs/file-utils/core/xlsx-reader.d.ts.map +1 -0
- package/dist/cjs/file-utils/core/xlsx-reader.js +216 -0
- package/dist/cjs/file-utils/core/xlsx-reader.js.map +1 -0
- package/dist/cjs/file-utils/core/zip-reader.d.ts +26 -0
- package/dist/cjs/file-utils/core/zip-reader.d.ts.map +1 -0
- package/dist/cjs/file-utils/core/zip-reader.js +95 -0
- package/dist/cjs/file-utils/core/zip-reader.js.map +1 -0
- package/dist/cjs/file-utils/file-utils-fixture.d.ts +16 -0
- package/dist/cjs/file-utils/file-utils-fixture.d.ts.map +1 -0
- package/dist/cjs/file-utils/file-utils-fixture.js +65 -0
- package/dist/cjs/file-utils/file-utils-fixture.js.map +1 -0
- package/dist/cjs/file-utils/fixtures.d.ts +2 -0
- package/dist/cjs/file-utils/fixtures.d.ts.map +1 -0
- package/dist/cjs/file-utils/fixtures.js +6 -0
- package/dist/cjs/file-utils/fixtures.js.map +1 -0
- package/dist/cjs/file-utils/index.d.ts +9 -0
- package/dist/cjs/file-utils/index.d.ts.map +1 -0
- package/dist/cjs/file-utils/index.js +25 -0
- package/dist/cjs/file-utils/index.js.map +1 -0
- package/dist/cjs/index.d.ts +13 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +45 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/intercept-network-call/core/fulfill-network-call.d.ts +10 -0
- package/dist/cjs/intercept-network-call/core/fulfill-network-call.d.ts.map +1 -0
- package/dist/cjs/intercept-network-call/core/fulfill-network-call.js +88 -0
- package/dist/cjs/intercept-network-call/core/fulfill-network-call.js.map +1 -0
- package/dist/cjs/intercept-network-call/core/observe-network-call.d.ts +4 -0
- package/dist/cjs/intercept-network-call/core/observe-network-call.d.ts.map +1 -0
- package/dist/cjs/intercept-network-call/core/observe-network-call.js +56 -0
- package/dist/cjs/intercept-network-call/core/observe-network-call.js.map +1 -0
- package/dist/cjs/intercept-network-call/core/types.d.ts +28 -0
- package/dist/cjs/intercept-network-call/core/types.d.ts.map +1 -0
- package/dist/cjs/intercept-network-call/core/types.js +28 -0
- package/dist/cjs/intercept-network-call/core/types.js.map +1 -0
- package/dist/cjs/intercept-network-call/core/utils/matches-request.d.ts +9 -0
- package/dist/cjs/intercept-network-call/core/utils/matches-request.d.ts.map +1 -0
- package/dist/cjs/intercept-network-call/core/utils/matches-request.js +32 -0
- package/dist/cjs/intercept-network-call/core/utils/matches-request.js.map +1 -0
- package/dist/cjs/intercept-network-call/fixtures.d.ts +2 -0
- package/dist/cjs/intercept-network-call/fixtures.d.ts.map +1 -0
- package/dist/cjs/intercept-network-call/fixtures.js +6 -0
- package/dist/cjs/intercept-network-call/fixtures.js.map +1 -0
- package/dist/cjs/intercept-network-call/index.d.ts +5 -0
- package/dist/cjs/intercept-network-call/index.d.ts.map +1 -0
- package/dist/cjs/intercept-network-call/index.js +11 -0
- package/dist/cjs/intercept-network-call/index.js.map +1 -0
- package/dist/cjs/intercept-network-call/intercept-network-call-fixture.d.ts +7 -0
- package/dist/cjs/intercept-network-call/intercept-network-call-fixture.d.ts.map +1 -0
- package/dist/cjs/intercept-network-call/intercept-network-call-fixture.js +18 -0
- package/dist/cjs/intercept-network-call/intercept-network-call-fixture.js.map +1 -0
- package/dist/cjs/intercept-network-call/intercept-network-call.d.ts +21 -0
- package/dist/cjs/intercept-network-call/intercept-network-call.d.ts.map +1 -0
- package/dist/cjs/intercept-network-call/intercept-network-call.js +59 -0
- package/dist/cjs/intercept-network-call/intercept-network-call.js.map +1 -0
- package/dist/cjs/internal/index.d.ts +2 -0
- package/dist/cjs/internal/index.d.ts.map +1 -0
- package/dist/cjs/internal/index.js +18 -0
- package/dist/cjs/internal/index.js.map +1 -0
- package/dist/cjs/internal/logger.d.ts +25 -0
- package/dist/cjs/internal/logger.d.ts.map +1 -0
- package/dist/cjs/internal/logger.js +33 -0
- package/dist/cjs/internal/logger.js.map +1 -0
- package/dist/cjs/log/config.d.ts +28 -0
- package/dist/cjs/log/config.d.ts.map +1 -0
- package/dist/cjs/log/config.js +165 -0
- package/dist/cjs/log/config.js.map +1 -0
- package/dist/cjs/log/fixtures.d.ts +2 -0
- package/dist/cjs/log/fixtures.d.ts.map +1 -0
- package/dist/cjs/log/fixtures.js +6 -0
- package/dist/cjs/log/fixtures.js.map +1 -0
- package/dist/cjs/log/formatters/colors.d.ts +13 -0
- package/dist/cjs/log/formatters/colors.d.ts.map +1 -0
- package/dist/cjs/log/formatters/colors.js +16 -0
- package/dist/cjs/log/formatters/colors.js.map +1 -0
- package/dist/cjs/log/formatters/format-message-base.d.ts +57 -0
- package/dist/cjs/log/formatters/format-message-base.d.ts.map +1 -0
- package/dist/cjs/log/formatters/format-message-base.js +198 -0
- package/dist/cjs/log/formatters/format-message-base.js.map +1 -0
- package/dist/cjs/log/formatters/format-message.d.ts +13 -0
- package/dist/cjs/log/formatters/format-message.d.ts.map +1 -0
- package/dist/cjs/log/formatters/format-message.js +127 -0
- package/dist/cjs/log/formatters/format-message.js.map +1 -0
- package/dist/cjs/log/index.d.ts +4 -0
- package/dist/cjs/log/index.d.ts.map +1 -0
- package/dist/cjs/log/index.js +14 -0
- package/dist/cjs/log/index.js.map +1 -0
- package/dist/cjs/log/log-fixture.d.ts +5 -0
- package/dist/cjs/log/log-fixture.d.ts.map +1 -0
- package/dist/cjs/log/log-fixture.js +23 -0
- package/dist/cjs/log/log-fixture.js.map +1 -0
- package/dist/cjs/log/log-organizer.d.ts +17 -0
- package/dist/cjs/log/log-organizer.d.ts.map +1 -0
- package/dist/cjs/log/log-organizer.js +81 -0
- package/dist/cjs/log/log-organizer.js.map +1 -0
- package/dist/cjs/log/log.d.ts +20 -0
- package/dist/cjs/log/log.d.ts.map +1 -0
- package/dist/cjs/log/log.js +268 -0
- package/dist/cjs/log/log.js.map +1 -0
- package/dist/cjs/log/outputs/add-test-header.d.ts +14 -0
- package/dist/cjs/log/outputs/add-test-header.d.ts.map +1 -0
- package/dist/cjs/log/outputs/add-test-header.js +92 -0
- package/dist/cjs/log/outputs/add-test-header.js.map +1 -0
- package/dist/cjs/log/outputs/context.d.ts +73 -0
- package/dist/cjs/log/outputs/context.d.ts.map +1 -0
- package/dist/cjs/log/outputs/context.js +156 -0
- package/dist/cjs/log/outputs/context.js.map +1 -0
- package/dist/cjs/log/outputs/create-log-file-path.d.ts +6 -0
- package/dist/cjs/log/outputs/create-log-file-path.d.ts.map +1 -0
- package/dist/cjs/log/outputs/create-log-file-path.js +118 -0
- package/dist/cjs/log/outputs/create-log-file-path.js.map +1 -0
- package/dist/cjs/log/outputs/log-to-console.d.ts +4 -0
- package/dist/cjs/log/outputs/log-to-console.d.ts.map +1 -0
- package/dist/cjs/log/outputs/log-to-console.js +26 -0
- package/dist/cjs/log/outputs/log-to-console.js.map +1 -0
- package/dist/cjs/log/outputs/log-to-file.d.ts +23 -0
- package/dist/cjs/log/outputs/log-to-file.d.ts.map +1 -0
- package/dist/cjs/log/outputs/log-to-file.js +198 -0
- package/dist/cjs/log/outputs/log-to-file.js.map +1 -0
- package/dist/cjs/log/test-step.d.ts +42 -0
- package/dist/cjs/log/test-step.d.ts.map +1 -0
- package/dist/cjs/log/test-step.js +110 -0
- package/dist/cjs/log/test-step.js.map +1 -0
- package/dist/cjs/log/types.d.ts +81 -0
- package/dist/cjs/log/types.d.ts.map +1 -0
- package/dist/cjs/log/types.js +13 -0
- package/dist/cjs/log/types.js.map +1 -0
- package/dist/cjs/log/utils/async.d.ts +6 -0
- package/dist/cjs/log/utils/async.d.ts.map +1 -0
- package/dist/cjs/log/utils/async.js +15 -0
- package/dist/cjs/log/utils/async.js.map +1 -0
- package/dist/cjs/log/utils/flag.d.ts +12 -0
- package/dist/cjs/log/utils/flag.d.ts.map +1 -0
- package/dist/cjs/log/utils/flag.js +19 -0
- package/dist/cjs/log/utils/flag.js.map +1 -0
- package/dist/cjs/log/utils/options.d.ts +14 -0
- package/dist/cjs/log/utils/options.d.ts.map +1 -0
- package/dist/cjs/log/utils/options.js +86 -0
- package/dist/cjs/log/utils/options.js.map +1 -0
- package/dist/cjs/log/utils/playwright-step-utils.d.ts +5 -0
- package/dist/cjs/log/utils/playwright-step-utils.d.ts.map +1 -0
- package/dist/cjs/log/utils/playwright-step-utils.js +48 -0
- package/dist/cjs/log/utils/playwright-step-utils.js.map +1 -0
- package/dist/cjs/network-error-monitor/fixtures.d.ts +91 -0
- package/dist/cjs/network-error-monitor/fixtures.d.ts.map +1 -0
- package/dist/cjs/network-error-monitor/fixtures.js +299 -0
- package/dist/cjs/network-error-monitor/fixtures.js.map +1 -0
- package/dist/cjs/network-recorder/core/har-builder.d.ts +122 -0
- package/dist/cjs/network-recorder/core/har-builder.d.ts.map +1 -0
- package/dist/cjs/network-recorder/core/har-builder.js +159 -0
- package/dist/cjs/network-recorder/core/har-builder.js.map +1 -0
- package/dist/cjs/network-recorder/core/har-manager.d.ts +74 -0
- package/dist/cjs/network-recorder/core/har-manager.d.ts.map +1 -0
- package/dist/cjs/network-recorder/core/har-manager.js +243 -0
- package/dist/cjs/network-recorder/core/har-manager.js.map +1 -0
- package/dist/cjs/network-recorder/core/har-playback-handler.d.ts +10 -0
- package/dist/cjs/network-recorder/core/har-playback-handler.d.ts.map +1 -0
- package/dist/cjs/network-recorder/core/har-playback-handler.js +291 -0
- package/dist/cjs/network-recorder/core/har-playback-handler.js.map +1 -0
- package/dist/cjs/network-recorder/core/index.d.ts +9 -0
- package/dist/cjs/network-recorder/core/index.d.ts.map +1 -0
- package/dist/cjs/network-recorder/core/index.js +35 -0
- package/dist/cjs/network-recorder/core/index.js.map +1 -0
- package/dist/cjs/network-recorder/core/mode-detector.d.ts +64 -0
- package/dist/cjs/network-recorder/core/mode-detector.d.ts.map +1 -0
- package/dist/cjs/network-recorder/core/mode-detector.js +191 -0
- package/dist/cjs/network-recorder/core/mode-detector.js.map +1 -0
- package/dist/cjs/network-recorder/core/network-recorder.d.ts +90 -0
- package/dist/cjs/network-recorder/core/network-recorder.d.ts.map +1 -0
- package/dist/cjs/network-recorder/core/network-recorder.js +260 -0
- package/dist/cjs/network-recorder/core/network-recorder.js.map +1 -0
- package/dist/cjs/network-recorder/core/stateful-api-mock.d.ts +31 -0
- package/dist/cjs/network-recorder/core/stateful-api-mock.d.ts.map +1 -0
- package/dist/cjs/network-recorder/core/stateful-api-mock.js +160 -0
- package/dist/cjs/network-recorder/core/stateful-api-mock.js.map +1 -0
- package/dist/cjs/network-recorder/core/types.d.ts +192 -0
- package/dist/cjs/network-recorder/core/types.d.ts.map +1 -0
- package/dist/cjs/network-recorder/core/types.js +54 -0
- package/dist/cjs/network-recorder/core/types.js.map +1 -0
- package/dist/cjs/network-recorder/fixtures.d.ts +2 -0
- package/dist/cjs/network-recorder/fixtures.d.ts.map +1 -0
- package/dist/cjs/network-recorder/fixtures.js +6 -0
- package/dist/cjs/network-recorder/fixtures.js.map +1 -0
- package/dist/cjs/network-recorder/index.d.ts +6 -0
- package/dist/cjs/network-recorder/index.d.ts.map +1 -0
- package/dist/cjs/network-recorder/index.js +22 -0
- package/dist/cjs/network-recorder/index.js.map +1 -0
- package/dist/cjs/network-recorder/network-recorder-fixture.d.ts +78 -0
- package/dist/cjs/network-recorder/network-recorder-fixture.d.ts.map +1 -0
- package/dist/cjs/network-recorder/network-recorder-fixture.js +79 -0
- package/dist/cjs/network-recorder/network-recorder-fixture.js.map +1 -0
- package/dist/cjs/network-recorder/network-recorder.d.ts +11 -0
- package/dist/cjs/network-recorder/network-recorder.d.ts.map +1 -0
- package/dist/cjs/network-recorder/network-recorder.js +32 -0
- package/dist/cjs/network-recorder/network-recorder.js.map +1 -0
- package/dist/cjs/recurse/fixtures.d.ts +2 -0
- package/dist/cjs/recurse/fixtures.d.ts.map +1 -0
- package/dist/cjs/recurse/fixtures.js +6 -0
- package/dist/cjs/recurse/fixtures.js.map +1 -0
- package/dist/cjs/recurse/index.d.ts +2 -0
- package/dist/cjs/recurse/index.d.ts.map +1 -0
- package/dist/cjs/recurse/index.js +18 -0
- package/dist/cjs/recurse/index.js.map +1 -0
- package/dist/cjs/recurse/recurse-fixture.d.ts +35 -0
- package/dist/cjs/recurse/recurse-fixture.d.ts.map +1 -0
- package/dist/cjs/recurse/recurse-fixture.js +14 -0
- package/dist/cjs/recurse/recurse-fixture.js.map +1 -0
- package/dist/cjs/recurse/recurse.d.ts +108 -0
- package/dist/cjs/recurse/recurse.d.ts.map +1 -0
- package/dist/cjs/recurse/recurse.js +298 -0
- package/dist/cjs/recurse/recurse.js.map +1 -0
- package/dist/esm/api-request/api-request-fixture.d.ts +47 -0
- package/dist/esm/api-request/api-request-fixture.d.ts.map +1 -0
- package/dist/esm/api-request/api-request-fixture.js +26 -0
- package/dist/esm/api-request/api-request-fixture.js.map +1 -0
- package/dist/esm/api-request/api-request.d.ts +108 -0
- package/dist/esm/api-request/api-request.d.ts.map +1 -0
- package/dist/esm/api-request/api-request.js +326 -0
- package/dist/esm/api-request/api-request.js.map +1 -0
- package/dist/esm/api-request/fixtures.d.ts +3 -0
- package/dist/esm/api-request/fixtures.d.ts.map +1 -0
- package/dist/esm/api-request/fixtures.js +13 -0
- package/dist/esm/api-request/fixtures.js.map +1 -0
- package/dist/esm/api-request/index.d.ts +7 -0
- package/dist/esm/api-request/index.d.ts.map +1 -0
- package/dist/esm/api-request/index.js +11 -0
- package/dist/esm/api-request/index.js.map +1 -0
- package/dist/esm/api-request/schema-validation/core.d.ts +13 -0
- package/dist/esm/api-request/schema-validation/core.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/core.js +55 -0
- package/dist/esm/api-request/schema-validation/core.js.map +1 -0
- package/dist/esm/api-request/schema-validation/fixture.d.ts +20 -0
- package/dist/esm/api-request/schema-validation/fixture.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/fixture.js +17 -0
- package/dist/esm/api-request/schema-validation/fixture.js.map +1 -0
- package/dist/esm/api-request/schema-validation/index.d.ts +6 -0
- package/dist/esm/api-request/schema-validation/index.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/index.js +13 -0
- package/dist/esm/api-request/schema-validation/index.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/file-loader.d.ts +50 -0
- package/dist/esm/api-request/schema-validation/internal/file-loader.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/file-loader.js +126 -0
- package/dist/esm/api-request/schema-validation/internal/file-loader.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/openapi-handler.d.ts +43 -0
- package/dist/esm/api-request/schema-validation/internal/openapi-handler.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/openapi-handler.js +147 -0
- package/dist/esm/api-request/schema-validation/internal/openapi-handler.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/promise-extension.d.ts +10 -0
- package/dist/esm/api-request/schema-validation/internal/promise-extension.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/promise-extension.js +14 -0
- package/dist/esm/api-request/schema-validation/internal/promise-extension.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/response-extension.d.ts +18 -0
- package/dist/esm/api-request/schema-validation/internal/response-extension.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/response-extension.js +212 -0
- package/dist/esm/api-request/schema-validation/internal/response-extension.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/result-builder.d.ts +62 -0
- package/dist/esm/api-request/schema-validation/internal/result-builder.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/result-builder.js +140 -0
- package/dist/esm/api-request/schema-validation/internal/result-builder.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/safe-error-serializer.d.ts +58 -0
- package/dist/esm/api-request/schema-validation/internal/safe-error-serializer.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/safe-error-serializer.js +221 -0
- package/dist/esm/api-request/schema-validation/internal/safe-error-serializer.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/schema-processors.d.ts +38 -0
- package/dist/esm/api-request/schema-validation/internal/schema-processors.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/schema-processors.js +341 -0
- package/dist/esm/api-request/schema-validation/internal/schema-processors.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/shape-validator.d.ts +96 -0
- package/dist/esm/api-request/schema-validation/internal/shape-validator.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/shape-validator.js +180 -0
- package/dist/esm/api-request/schema-validation/internal/shape-validator.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/validation-engine.d.ts +63 -0
- package/dist/esm/api-request/schema-validation/internal/validation-engine.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/validation-engine.js +395 -0
- package/dist/esm/api-request/schema-validation/internal/validation-engine.js.map +1 -0
- package/dist/esm/api-request/schema-validation/types.d.ts +92 -0
- package/dist/esm/api-request/schema-validation/types.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/types.js +16 -0
- package/dist/esm/api-request/schema-validation/types.js.map +1 -0
- package/dist/esm/api-request/ui-display.d.ts +42 -0
- package/dist/esm/api-request/ui-display.d.ts.map +1 -0
- package/dist/esm/api-request/ui-display.js +370 -0
- package/dist/esm/api-request/ui-display.js.map +1 -0
- package/dist/esm/auth-session/apply-user-cookies-to-browser-context.d.ts +17 -0
- package/dist/esm/auth-session/apply-user-cookies-to-browser-context.d.ts.map +1 -0
- package/dist/esm/auth-session/apply-user-cookies-to-browser-context.js +49 -0
- package/dist/esm/auth-session/apply-user-cookies-to-browser-context.js.map +1 -0
- package/dist/esm/auth-session/core.d.ts +56 -0
- package/dist/esm/auth-session/core.d.ts.map +1 -0
- package/dist/esm/auth-session/core.js +271 -0
- package/dist/esm/auth-session/core.js.map +1 -0
- package/dist/esm/auth-session/fixtures.d.ts +83 -0
- package/dist/esm/auth-session/fixtures.d.ts.map +1 -0
- package/dist/esm/auth-session/fixtures.js +147 -0
- package/dist/esm/auth-session/fixtures.js.map +1 -0
- package/dist/esm/auth-session/global-setup-helper.d.ts +18 -0
- package/dist/esm/auth-session/global-setup-helper.d.ts.map +1 -0
- package/dist/esm/auth-session/global-setup-helper.js +26 -0
- package/dist/esm/auth-session/global-setup-helper.js.map +1 -0
- package/dist/esm/auth-session/index.d.ts +15 -0
- package/dist/esm/auth-session/index.d.ts.map +1 -0
- package/dist/esm/auth-session/index.js +45 -0
- package/dist/esm/auth-session/index.js.map +1 -0
- package/dist/esm/auth-session/internal/auth-configure.d.ts +19 -0
- package/dist/esm/auth-session/internal/auth-configure.d.ts.map +1 -0
- package/dist/esm/auth-session/internal/auth-configure.js +117 -0
- package/dist/esm/auth-session/internal/auth-configure.js.map +1 -0
- package/dist/esm/auth-session/internal/auth-global-setup.d.ts +33 -0
- package/dist/esm/auth-session/internal/auth-global-setup.d.ts.map +1 -0
- package/dist/esm/auth-session/internal/auth-global-setup.js +152 -0
- package/dist/esm/auth-session/internal/auth-global-setup.js.map +1 -0
- package/dist/esm/auth-session/internal/auth-provider-validator.d.ts +36 -0
- package/dist/esm/auth-session/internal/auth-provider-validator.d.ts.map +1 -0
- package/dist/esm/auth-session/internal/auth-provider-validator.js +240 -0
- package/dist/esm/auth-session/internal/auth-provider-validator.js.map +1 -0
- package/dist/esm/auth-session/internal/auth-provider.d.ts +92 -0
- package/dist/esm/auth-session/internal/auth-provider.d.ts.map +1 -0
- package/dist/esm/auth-session/internal/auth-provider.js +40 -0
- package/dist/esm/auth-session/internal/auth-provider.js.map +1 -0
- package/dist/esm/auth-session/internal/auth-session.d.ts +76 -0
- package/dist/esm/auth-session/internal/auth-session.d.ts.map +1 -0
- package/dist/esm/auth-session/internal/auth-session.js +651 -0
- package/dist/esm/auth-session/internal/auth-session.js.map +1 -0
- package/dist/esm/auth-session/internal/auth-storage-utils.d.ts +62 -0
- package/dist/esm/auth-session/internal/auth-storage-utils.d.ts.map +1 -0
- package/dist/esm/auth-session/internal/auth-storage-utils.js +314 -0
- package/dist/esm/auth-session/internal/auth-storage-utils.js.map +1 -0
- package/dist/esm/auth-session/internal/cache-manager.d.ts +116 -0
- package/dist/esm/auth-session/internal/cache-manager.d.ts.map +1 -0
- package/dist/esm/auth-session/internal/cache-manager.js +267 -0
- package/dist/esm/auth-session/internal/cache-manager.js.map +1 -0
- package/dist/esm/auth-session/internal/types.d.ts +132 -0
- package/dist/esm/auth-session/internal/types.d.ts.map +1 -0
- package/dist/esm/auth-session/internal/types.js +4 -0
- package/dist/esm/auth-session/internal/types.js.map +1 -0
- package/dist/esm/burn-in/core/analyzer.d.ts +36 -0
- package/dist/esm/burn-in/core/analyzer.d.ts.map +1 -0
- package/dist/esm/burn-in/core/analyzer.js +329 -0
- package/dist/esm/burn-in/core/analyzer.js.map +1 -0
- package/dist/esm/burn-in/core/config.d.ts +4 -0
- package/dist/esm/burn-in/core/config.d.ts.map +1 -0
- package/dist/esm/burn-in/core/config.js +107 -0
- package/dist/esm/burn-in/core/config.js.map +1 -0
- package/dist/esm/burn-in/core/types.d.ts +24 -0
- package/dist/esm/burn-in/core/types.d.ts.map +1 -0
- package/dist/esm/burn-in/core/types.js +3 -0
- package/dist/esm/burn-in/core/types.js.map +1 -0
- package/dist/esm/burn-in/index.d.ts +3 -0
- package/dist/esm/burn-in/index.d.ts.map +1 -0
- package/dist/esm/burn-in/index.js +7 -0
- package/dist/esm/burn-in/index.js.map +1 -0
- package/dist/esm/burn-in/runner.d.ts +13 -0
- package/dist/esm/burn-in/runner.d.ts.map +1 -0
- package/dist/esm/burn-in/runner.js +61 -0
- package/dist/esm/burn-in/runner.js.map +1 -0
- package/dist/esm/file-utils/core/csv-reader.d.ts +35 -0
- package/dist/esm/file-utils/core/csv-reader.d.ts.map +1 -0
- package/dist/esm/file-utils/core/csv-reader.js +206 -0
- package/dist/esm/file-utils/core/csv-reader.js.map +1 -0
- package/dist/esm/file-utils/core/file-downloader.d.ts +19 -0
- package/dist/esm/file-utils/core/file-downloader.d.ts.map +1 -0
- package/dist/esm/file-utils/core/file-downloader.js +49 -0
- package/dist/esm/file-utils/core/file-downloader.js.map +1 -0
- package/dist/esm/file-utils/core/pdf-reader.d.ts +42 -0
- package/dist/esm/file-utils/core/pdf-reader.d.ts.map +1 -0
- package/dist/esm/file-utils/core/pdf-reader.js +135 -0
- package/dist/esm/file-utils/core/pdf-reader.js.map +1 -0
- package/dist/esm/file-utils/core/types.d.ts +138 -0
- package/dist/esm/file-utils/core/types.d.ts.map +1 -0
- package/dist/esm/file-utils/core/types.js +72 -0
- package/dist/esm/file-utils/core/types.js.map +1 -0
- package/dist/esm/file-utils/core/xlsx-reader.d.ts +31 -0
- package/dist/esm/file-utils/core/xlsx-reader.d.ts.map +1 -0
- package/dist/esm/file-utils/core/xlsx-reader.js +216 -0
- package/dist/esm/file-utils/core/xlsx-reader.js.map +1 -0
- package/dist/esm/file-utils/core/zip-reader.d.ts +26 -0
- package/dist/esm/file-utils/core/zip-reader.d.ts.map +1 -0
- package/dist/esm/file-utils/core/zip-reader.js +95 -0
- package/dist/esm/file-utils/core/zip-reader.js.map +1 -0
- package/dist/esm/file-utils/file-utils-fixture.d.ts +16 -0
- package/dist/esm/file-utils/file-utils-fixture.d.ts.map +1 -0
- package/dist/esm/file-utils/file-utils-fixture.js +65 -0
- package/dist/esm/file-utils/file-utils-fixture.js.map +1 -0
- package/dist/esm/file-utils/fixtures.d.ts +2 -0
- package/dist/esm/file-utils/fixtures.d.ts.map +1 -0
- package/dist/esm/file-utils/fixtures.js +6 -0
- package/dist/esm/file-utils/fixtures.js.map +1 -0
- package/dist/esm/file-utils/index.d.ts +9 -0
- package/dist/esm/file-utils/index.d.ts.map +1 -0
- package/dist/esm/file-utils/index.js +25 -0
- package/dist/esm/file-utils/index.js.map +1 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +45 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/intercept-network-call/core/fulfill-network-call.d.ts +10 -0
- package/dist/esm/intercept-network-call/core/fulfill-network-call.d.ts.map +1 -0
- package/dist/esm/intercept-network-call/core/fulfill-network-call.js +88 -0
- package/dist/esm/intercept-network-call/core/fulfill-network-call.js.map +1 -0
- package/dist/esm/intercept-network-call/core/observe-network-call.d.ts +4 -0
- package/dist/esm/intercept-network-call/core/observe-network-call.d.ts.map +1 -0
- package/dist/esm/intercept-network-call/core/observe-network-call.js +56 -0
- package/dist/esm/intercept-network-call/core/observe-network-call.js.map +1 -0
- package/dist/esm/intercept-network-call/core/types.d.ts +28 -0
- package/dist/esm/intercept-network-call/core/types.d.ts.map +1 -0
- package/dist/esm/intercept-network-call/core/types.js +28 -0
- package/dist/esm/intercept-network-call/core/types.js.map +1 -0
- package/dist/esm/intercept-network-call/core/utils/matches-request.d.ts +9 -0
- package/dist/esm/intercept-network-call/core/utils/matches-request.d.ts.map +1 -0
- package/dist/esm/intercept-network-call/core/utils/matches-request.js +32 -0
- package/dist/esm/intercept-network-call/core/utils/matches-request.js.map +1 -0
- package/dist/esm/intercept-network-call/fixtures.d.ts +2 -0
- package/dist/esm/intercept-network-call/fixtures.d.ts.map +1 -0
- package/dist/esm/intercept-network-call/fixtures.js +6 -0
- package/dist/esm/intercept-network-call/fixtures.js.map +1 -0
- package/dist/esm/intercept-network-call/index.d.ts +5 -0
- package/dist/esm/intercept-network-call/index.d.ts.map +1 -0
- package/dist/esm/intercept-network-call/index.js +11 -0
- package/dist/esm/intercept-network-call/index.js.map +1 -0
- package/dist/esm/intercept-network-call/intercept-network-call-fixture.d.ts +7 -0
- package/dist/esm/intercept-network-call/intercept-network-call-fixture.d.ts.map +1 -0
- package/dist/esm/intercept-network-call/intercept-network-call-fixture.js +18 -0
- package/dist/esm/intercept-network-call/intercept-network-call-fixture.js.map +1 -0
- package/dist/esm/intercept-network-call/intercept-network-call.d.ts +21 -0
- package/dist/esm/intercept-network-call/intercept-network-call.d.ts.map +1 -0
- package/dist/esm/intercept-network-call/intercept-network-call.js +59 -0
- package/dist/esm/intercept-network-call/intercept-network-call.js.map +1 -0
- package/dist/esm/internal/index.d.ts +2 -0
- package/dist/esm/internal/index.d.ts.map +1 -0
- package/dist/esm/internal/index.js +18 -0
- package/dist/esm/internal/index.js.map +1 -0
- package/dist/esm/internal/logger.d.ts +25 -0
- package/dist/esm/internal/logger.d.ts.map +1 -0
- package/dist/esm/internal/logger.js +33 -0
- package/dist/esm/internal/logger.js.map +1 -0
- package/dist/esm/log/config.d.ts +28 -0
- package/dist/esm/log/config.d.ts.map +1 -0
- package/dist/esm/log/config.js +165 -0
- package/dist/esm/log/config.js.map +1 -0
- package/dist/esm/log/fixtures.d.ts +2 -0
- package/dist/esm/log/fixtures.d.ts.map +1 -0
- package/dist/esm/log/fixtures.js +6 -0
- package/dist/esm/log/fixtures.js.map +1 -0
- package/dist/esm/log/formatters/colors.d.ts +13 -0
- package/dist/esm/log/formatters/colors.d.ts.map +1 -0
- package/dist/esm/log/formatters/colors.js +16 -0
- package/dist/esm/log/formatters/colors.js.map +1 -0
- package/dist/esm/log/formatters/format-message-base.d.ts +57 -0
- package/dist/esm/log/formatters/format-message-base.d.ts.map +1 -0
- package/dist/esm/log/formatters/format-message-base.js +198 -0
- package/dist/esm/log/formatters/format-message-base.js.map +1 -0
- package/dist/esm/log/formatters/format-message.d.ts +13 -0
- package/dist/esm/log/formatters/format-message.d.ts.map +1 -0
- package/dist/esm/log/formatters/format-message.js +127 -0
- package/dist/esm/log/formatters/format-message.js.map +1 -0
- package/dist/esm/log/index.d.ts +4 -0
- package/dist/esm/log/index.d.ts.map +1 -0
- package/dist/esm/log/index.js +14 -0
- package/dist/esm/log/index.js.map +1 -0
- package/dist/esm/log/log-fixture.d.ts +5 -0
- package/dist/esm/log/log-fixture.d.ts.map +1 -0
- package/dist/esm/log/log-fixture.js +23 -0
- package/dist/esm/log/log-fixture.js.map +1 -0
- package/dist/esm/log/log-organizer.d.ts +17 -0
- package/dist/esm/log/log-organizer.d.ts.map +1 -0
- package/dist/esm/log/log-organizer.js +81 -0
- package/dist/esm/log/log-organizer.js.map +1 -0
- package/dist/esm/log/log.d.ts +20 -0
- package/dist/esm/log/log.d.ts.map +1 -0
- package/dist/esm/log/log.js +268 -0
- package/dist/esm/log/log.js.map +1 -0
- package/dist/esm/log/outputs/add-test-header.d.ts +14 -0
- package/dist/esm/log/outputs/add-test-header.d.ts.map +1 -0
- package/dist/esm/log/outputs/add-test-header.js +92 -0
- package/dist/esm/log/outputs/add-test-header.js.map +1 -0
- package/dist/esm/log/outputs/context.d.ts +73 -0
- package/dist/esm/log/outputs/context.d.ts.map +1 -0
- package/dist/esm/log/outputs/context.js +156 -0
- package/dist/esm/log/outputs/context.js.map +1 -0
- package/dist/esm/log/outputs/create-log-file-path.d.ts +6 -0
- package/dist/esm/log/outputs/create-log-file-path.d.ts.map +1 -0
- package/dist/esm/log/outputs/create-log-file-path.js +118 -0
- package/dist/esm/log/outputs/create-log-file-path.js.map +1 -0
- package/dist/esm/log/outputs/log-to-console.d.ts +4 -0
- package/dist/esm/log/outputs/log-to-console.d.ts.map +1 -0
- package/dist/esm/log/outputs/log-to-console.js +26 -0
- package/dist/esm/log/outputs/log-to-console.js.map +1 -0
- package/dist/esm/log/outputs/log-to-file.d.ts +23 -0
- package/dist/esm/log/outputs/log-to-file.d.ts.map +1 -0
- package/dist/esm/log/outputs/log-to-file.js +198 -0
- package/dist/esm/log/outputs/log-to-file.js.map +1 -0
- package/dist/esm/log/test-step.d.ts +42 -0
- package/dist/esm/log/test-step.d.ts.map +1 -0
- package/dist/esm/log/test-step.js +110 -0
- package/dist/esm/log/test-step.js.map +1 -0
- package/dist/esm/log/types.d.ts +81 -0
- package/dist/esm/log/types.d.ts.map +1 -0
- package/dist/esm/log/types.js +13 -0
- package/dist/esm/log/types.js.map +1 -0
- package/dist/esm/log/utils/async.d.ts +6 -0
- package/dist/esm/log/utils/async.d.ts.map +1 -0
- package/dist/esm/log/utils/async.js +15 -0
- package/dist/esm/log/utils/async.js.map +1 -0
- package/dist/esm/log/utils/flag.d.ts +12 -0
- package/dist/esm/log/utils/flag.d.ts.map +1 -0
- package/dist/esm/log/utils/flag.js +19 -0
- package/dist/esm/log/utils/flag.js.map +1 -0
- package/dist/esm/log/utils/options.d.ts +14 -0
- package/dist/esm/log/utils/options.d.ts.map +1 -0
- package/dist/esm/log/utils/options.js +86 -0
- package/dist/esm/log/utils/options.js.map +1 -0
- package/dist/esm/log/utils/playwright-step-utils.d.ts +5 -0
- package/dist/esm/log/utils/playwright-step-utils.d.ts.map +1 -0
- package/dist/esm/log/utils/playwright-step-utils.js +48 -0
- package/dist/esm/log/utils/playwright-step-utils.js.map +1 -0
- package/dist/esm/network-error-monitor/fixtures.d.ts +91 -0
- package/dist/esm/network-error-monitor/fixtures.d.ts.map +1 -0
- package/dist/esm/network-error-monitor/fixtures.js +299 -0
- package/dist/esm/network-error-monitor/fixtures.js.map +1 -0
- package/dist/esm/network-recorder/core/har-builder.d.ts +122 -0
- package/dist/esm/network-recorder/core/har-builder.d.ts.map +1 -0
- package/dist/esm/network-recorder/core/har-builder.js +159 -0
- package/dist/esm/network-recorder/core/har-builder.js.map +1 -0
- package/dist/esm/network-recorder/core/har-manager.d.ts +74 -0
- package/dist/esm/network-recorder/core/har-manager.d.ts.map +1 -0
- package/dist/esm/network-recorder/core/har-manager.js +243 -0
- package/dist/esm/network-recorder/core/har-manager.js.map +1 -0
- package/dist/esm/network-recorder/core/har-playback-handler.d.ts +10 -0
- package/dist/esm/network-recorder/core/har-playback-handler.d.ts.map +1 -0
- package/dist/esm/network-recorder/core/har-playback-handler.js +291 -0
- package/dist/esm/network-recorder/core/har-playback-handler.js.map +1 -0
- package/dist/esm/network-recorder/core/index.d.ts +9 -0
- package/dist/esm/network-recorder/core/index.d.ts.map +1 -0
- package/dist/esm/network-recorder/core/index.js +35 -0
- package/dist/esm/network-recorder/core/index.js.map +1 -0
- package/dist/esm/network-recorder/core/mode-detector.d.ts +64 -0
- package/dist/esm/network-recorder/core/mode-detector.d.ts.map +1 -0
- package/dist/esm/network-recorder/core/mode-detector.js +191 -0
- package/dist/esm/network-recorder/core/mode-detector.js.map +1 -0
- package/dist/esm/network-recorder/core/network-recorder.d.ts +90 -0
- package/dist/esm/network-recorder/core/network-recorder.d.ts.map +1 -0
- package/dist/esm/network-recorder/core/network-recorder.js +260 -0
- package/dist/esm/network-recorder/core/network-recorder.js.map +1 -0
- package/dist/esm/network-recorder/core/stateful-api-mock.d.ts +31 -0
- package/dist/esm/network-recorder/core/stateful-api-mock.d.ts.map +1 -0
- package/dist/esm/network-recorder/core/stateful-api-mock.js +160 -0
- package/dist/esm/network-recorder/core/stateful-api-mock.js.map +1 -0
- package/dist/esm/network-recorder/core/types.d.ts +192 -0
- package/dist/esm/network-recorder/core/types.d.ts.map +1 -0
- package/dist/esm/network-recorder/core/types.js +54 -0
- package/dist/esm/network-recorder/core/types.js.map +1 -0
- package/dist/esm/network-recorder/fixtures.d.ts +2 -0
- package/dist/esm/network-recorder/fixtures.d.ts.map +1 -0
- package/dist/esm/network-recorder/fixtures.js +6 -0
- package/dist/esm/network-recorder/fixtures.js.map +1 -0
- package/dist/esm/network-recorder/index.d.ts +6 -0
- package/dist/esm/network-recorder/index.d.ts.map +1 -0
- package/dist/esm/network-recorder/index.js +22 -0
- package/dist/esm/network-recorder/index.js.map +1 -0
- package/dist/esm/network-recorder/network-recorder-fixture.d.ts +78 -0
- package/dist/esm/network-recorder/network-recorder-fixture.d.ts.map +1 -0
- package/dist/esm/network-recorder/network-recorder-fixture.js +79 -0
- package/dist/esm/network-recorder/network-recorder-fixture.js.map +1 -0
- package/dist/esm/network-recorder/network-recorder.d.ts +11 -0
- package/dist/esm/network-recorder/network-recorder.d.ts.map +1 -0
- package/dist/esm/network-recorder/network-recorder.js +32 -0
- package/dist/esm/network-recorder/network-recorder.js.map +1 -0
- package/dist/esm/recurse/fixtures.d.ts +2 -0
- package/dist/esm/recurse/fixtures.d.ts.map +1 -0
- package/dist/esm/recurse/fixtures.js +6 -0
- package/dist/esm/recurse/fixtures.js.map +1 -0
- package/dist/esm/recurse/index.d.ts +2 -0
- package/dist/esm/recurse/index.d.ts.map +1 -0
- package/dist/esm/recurse/index.js +18 -0
- package/dist/esm/recurse/index.js.map +1 -0
- package/dist/esm/recurse/recurse-fixture.d.ts +35 -0
- package/dist/esm/recurse/recurse-fixture.d.ts.map +1 -0
- package/dist/esm/recurse/recurse-fixture.js +14 -0
- package/dist/esm/recurse/recurse-fixture.js.map +1 -0
- package/dist/esm/recurse/recurse.d.ts +108 -0
- package/dist/esm/recurse/recurse.d.ts.map +1 -0
- package/dist/esm/recurse/recurse.js +298 -0
- package/dist/esm/recurse/recurse.js.map +1 -0
- package/dist/types/api-request/api-request-fixture.d.ts +47 -0
- package/dist/types/api-request/api-request-fixture.d.ts.map +1 -0
- package/dist/types/api-request/api-request.d.ts +108 -0
- package/dist/types/api-request/api-request.d.ts.map +1 -0
- package/dist/types/api-request/fixtures.d.ts +3 -0
- package/dist/types/api-request/fixtures.d.ts.map +1 -0
- package/dist/types/api-request/index.d.ts +7 -0
- package/dist/types/api-request/index.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/core.d.ts +13 -0
- package/dist/types/api-request/schema-validation/core.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/fixture.d.ts +20 -0
- package/dist/types/api-request/schema-validation/fixture.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/index.d.ts +6 -0
- package/dist/types/api-request/schema-validation/index.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/file-loader.d.ts +50 -0
- package/dist/types/api-request/schema-validation/internal/file-loader.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/openapi-handler.d.ts +43 -0
- package/dist/types/api-request/schema-validation/internal/openapi-handler.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/promise-extension.d.ts +10 -0
- package/dist/types/api-request/schema-validation/internal/promise-extension.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/response-extension.d.ts +18 -0
- package/dist/types/api-request/schema-validation/internal/response-extension.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/result-builder.d.ts +62 -0
- package/dist/types/api-request/schema-validation/internal/result-builder.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/safe-error-serializer.d.ts +58 -0
- package/dist/types/api-request/schema-validation/internal/safe-error-serializer.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/schema-processors.d.ts +38 -0
- package/dist/types/api-request/schema-validation/internal/schema-processors.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/shape-validator.d.ts +96 -0
- package/dist/types/api-request/schema-validation/internal/shape-validator.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/validation-engine.d.ts +63 -0
- package/dist/types/api-request/schema-validation/internal/validation-engine.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/types.d.ts +92 -0
- package/dist/types/api-request/schema-validation/types.d.ts.map +1 -0
- package/dist/types/api-request/ui-display.d.ts +42 -0
- package/dist/types/api-request/ui-display.d.ts.map +1 -0
- package/dist/types/auth-session/apply-user-cookies-to-browser-context.d.ts +17 -0
- package/dist/types/auth-session/apply-user-cookies-to-browser-context.d.ts.map +1 -0
- package/dist/types/auth-session/core.d.ts +56 -0
- package/dist/types/auth-session/core.d.ts.map +1 -0
- package/dist/types/auth-session/fixtures.d.ts +83 -0
- package/dist/types/auth-session/fixtures.d.ts.map +1 -0
- package/dist/types/auth-session/global-setup-helper.d.ts +18 -0
- package/dist/types/auth-session/global-setup-helper.d.ts.map +1 -0
- package/dist/types/auth-session/index.d.ts +15 -0
- package/dist/types/auth-session/index.d.ts.map +1 -0
- package/dist/types/auth-session/internal/auth-configure.d.ts +19 -0
- package/dist/types/auth-session/internal/auth-configure.d.ts.map +1 -0
- package/dist/types/auth-session/internal/auth-global-setup.d.ts +33 -0
- package/dist/types/auth-session/internal/auth-global-setup.d.ts.map +1 -0
- package/dist/types/auth-session/internal/auth-provider-validator.d.ts +36 -0
- package/dist/types/auth-session/internal/auth-provider-validator.d.ts.map +1 -0
- package/dist/types/auth-session/internal/auth-provider.d.ts +92 -0
- package/dist/types/auth-session/internal/auth-provider.d.ts.map +1 -0
- package/dist/types/auth-session/internal/auth-session.d.ts +76 -0
- package/dist/types/auth-session/internal/auth-session.d.ts.map +1 -0
- package/dist/types/auth-session/internal/auth-storage-utils.d.ts +62 -0
- package/dist/types/auth-session/internal/auth-storage-utils.d.ts.map +1 -0
- package/dist/types/auth-session/internal/cache-manager.d.ts +116 -0
- package/dist/types/auth-session/internal/cache-manager.d.ts.map +1 -0
- package/dist/types/auth-session/internal/types.d.ts +132 -0
- package/dist/types/auth-session/internal/types.d.ts.map +1 -0
- package/dist/types/burn-in/core/analyzer.d.ts +36 -0
- package/dist/types/burn-in/core/analyzer.d.ts.map +1 -0
- package/dist/types/burn-in/core/config.d.ts +4 -0
- package/dist/types/burn-in/core/config.d.ts.map +1 -0
- package/dist/types/burn-in/core/types.d.ts +24 -0
- package/dist/types/burn-in/core/types.d.ts.map +1 -0
- package/dist/types/burn-in/index.d.ts +3 -0
- package/dist/types/burn-in/index.d.ts.map +1 -0
- package/dist/types/burn-in/runner.d.ts +13 -0
- package/dist/types/burn-in/runner.d.ts.map +1 -0
- package/dist/types/file-utils/core/csv-reader.d.ts +35 -0
- package/dist/types/file-utils/core/csv-reader.d.ts.map +1 -0
- package/dist/types/file-utils/core/file-downloader.d.ts +19 -0
- package/dist/types/file-utils/core/file-downloader.d.ts.map +1 -0
- package/dist/types/file-utils/core/pdf-reader.d.ts +42 -0
- package/dist/types/file-utils/core/pdf-reader.d.ts.map +1 -0
- package/dist/types/file-utils/core/types.d.ts +138 -0
- package/dist/types/file-utils/core/types.d.ts.map +1 -0
- package/dist/types/file-utils/core/xlsx-reader.d.ts +31 -0
- package/dist/types/file-utils/core/xlsx-reader.d.ts.map +1 -0
- package/dist/types/file-utils/core/zip-reader.d.ts +26 -0
- package/dist/types/file-utils/core/zip-reader.d.ts.map +1 -0
- package/dist/types/file-utils/file-utils-fixture.d.ts +16 -0
- package/dist/types/file-utils/file-utils-fixture.d.ts.map +1 -0
- package/dist/types/file-utils/fixtures.d.ts +2 -0
- package/dist/types/file-utils/fixtures.d.ts.map +1 -0
- package/dist/types/file-utils/index.d.ts +9 -0
- package/dist/types/file-utils/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/intercept-network-call/core/fulfill-network-call.d.ts +10 -0
- package/dist/types/intercept-network-call/core/fulfill-network-call.d.ts.map +1 -0
- package/dist/types/intercept-network-call/core/observe-network-call.d.ts +4 -0
- package/dist/types/intercept-network-call/core/observe-network-call.d.ts.map +1 -0
- package/dist/types/intercept-network-call/core/types.d.ts +28 -0
- package/dist/types/intercept-network-call/core/types.d.ts.map +1 -0
- package/dist/types/intercept-network-call/core/utils/matches-request.d.ts +9 -0
- package/dist/types/intercept-network-call/core/utils/matches-request.d.ts.map +1 -0
- package/dist/types/intercept-network-call/fixtures.d.ts +2 -0
- package/dist/types/intercept-network-call/fixtures.d.ts.map +1 -0
- package/dist/types/intercept-network-call/index.d.ts +5 -0
- package/dist/types/intercept-network-call/index.d.ts.map +1 -0
- package/dist/types/intercept-network-call/intercept-network-call-fixture.d.ts +7 -0
- package/dist/types/intercept-network-call/intercept-network-call-fixture.d.ts.map +1 -0
- package/dist/types/intercept-network-call/intercept-network-call.d.ts +21 -0
- package/dist/types/intercept-network-call/intercept-network-call.d.ts.map +1 -0
- package/dist/types/internal/index.d.ts +2 -0
- package/dist/types/internal/index.d.ts.map +1 -0
- package/dist/types/internal/logger.d.ts +25 -0
- package/dist/types/internal/logger.d.ts.map +1 -0
- package/dist/types/log/config.d.ts +28 -0
- package/dist/types/log/config.d.ts.map +1 -0
- package/dist/types/log/fixtures.d.ts +2 -0
- package/dist/types/log/fixtures.d.ts.map +1 -0
- package/dist/types/log/formatters/colors.d.ts +13 -0
- package/dist/types/log/formatters/colors.d.ts.map +1 -0
- package/dist/types/log/formatters/format-message-base.d.ts +57 -0
- package/dist/types/log/formatters/format-message-base.d.ts.map +1 -0
- package/dist/types/log/formatters/format-message.d.ts +13 -0
- package/dist/types/log/formatters/format-message.d.ts.map +1 -0
- package/dist/types/log/index.d.ts +4 -0
- package/dist/types/log/index.d.ts.map +1 -0
- package/dist/types/log/log-fixture.d.ts +5 -0
- package/dist/types/log/log-fixture.d.ts.map +1 -0
- package/dist/types/log/log-organizer.d.ts +17 -0
- package/dist/types/log/log-organizer.d.ts.map +1 -0
- package/dist/types/log/log.d.ts +20 -0
- package/dist/types/log/log.d.ts.map +1 -0
- package/dist/types/log/outputs/add-test-header.d.ts +14 -0
- package/dist/types/log/outputs/add-test-header.d.ts.map +1 -0
- package/dist/types/log/outputs/context.d.ts +73 -0
- package/dist/types/log/outputs/context.d.ts.map +1 -0
- package/dist/types/log/outputs/create-log-file-path.d.ts +6 -0
- package/dist/types/log/outputs/create-log-file-path.d.ts.map +1 -0
- package/dist/types/log/outputs/log-to-console.d.ts +4 -0
- package/dist/types/log/outputs/log-to-console.d.ts.map +1 -0
- package/dist/types/log/outputs/log-to-file.d.ts +23 -0
- package/dist/types/log/outputs/log-to-file.d.ts.map +1 -0
- package/dist/types/log/test-step.d.ts +42 -0
- package/dist/types/log/test-step.d.ts.map +1 -0
- package/dist/types/log/types.d.ts +81 -0
- package/dist/types/log/types.d.ts.map +1 -0
- package/dist/types/log/utils/async.d.ts +6 -0
- package/dist/types/log/utils/async.d.ts.map +1 -0
- package/dist/types/log/utils/flag.d.ts +12 -0
- package/dist/types/log/utils/flag.d.ts.map +1 -0
- package/dist/types/log/utils/options.d.ts +14 -0
- package/dist/types/log/utils/options.d.ts.map +1 -0
- package/dist/types/log/utils/playwright-step-utils.d.ts +5 -0
- package/dist/types/log/utils/playwright-step-utils.d.ts.map +1 -0
- package/dist/types/network-error-monitor/fixtures.d.ts +91 -0
- package/dist/types/network-error-monitor/fixtures.d.ts.map +1 -0
- package/dist/types/network-recorder/core/har-builder.d.ts +122 -0
- package/dist/types/network-recorder/core/har-builder.d.ts.map +1 -0
- package/dist/types/network-recorder/core/har-manager.d.ts +74 -0
- package/dist/types/network-recorder/core/har-manager.d.ts.map +1 -0
- package/dist/types/network-recorder/core/har-playback-handler.d.ts +10 -0
- package/dist/types/network-recorder/core/har-playback-handler.d.ts.map +1 -0
- package/dist/types/network-recorder/core/index.d.ts +9 -0
- package/dist/types/network-recorder/core/index.d.ts.map +1 -0
- package/dist/types/network-recorder/core/mode-detector.d.ts +64 -0
- package/dist/types/network-recorder/core/mode-detector.d.ts.map +1 -0
- package/dist/types/network-recorder/core/network-recorder.d.ts +90 -0
- package/dist/types/network-recorder/core/network-recorder.d.ts.map +1 -0
- package/dist/types/network-recorder/core/stateful-api-mock.d.ts +31 -0
- package/dist/types/network-recorder/core/stateful-api-mock.d.ts.map +1 -0
- package/dist/types/network-recorder/core/types.d.ts +192 -0
- package/dist/types/network-recorder/core/types.d.ts.map +1 -0
- package/dist/types/network-recorder/fixtures.d.ts +2 -0
- package/dist/types/network-recorder/fixtures.d.ts.map +1 -0
- package/dist/types/network-recorder/index.d.ts +6 -0
- package/dist/types/network-recorder/index.d.ts.map +1 -0
- package/dist/types/network-recorder/network-recorder-fixture.d.ts +78 -0
- package/dist/types/network-recorder/network-recorder-fixture.d.ts.map +1 -0
- package/dist/types/network-recorder/network-recorder.d.ts +11 -0
- package/dist/types/network-recorder/network-recorder.d.ts.map +1 -0
- package/dist/types/recurse/fixtures.d.ts +2 -0
- package/dist/types/recurse/fixtures.d.ts.map +1 -0
- package/dist/types/recurse/index.d.ts +2 -0
- package/dist/types/recurse/index.d.ts.map +1 -0
- package/dist/types/recurse/recurse-fixture.d.ts +35 -0
- package/dist/types/recurse/recurse-fixture.d.ts.map +1 -0
- package/dist/types/recurse/recurse.d.ts +108 -0
- package/dist/types/recurse/recurse.d.ts.map +1 -0
- package/package.json +238 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Advanced Schema Validation Engine
|
|
3
|
+
*
|
|
4
|
+
* This module provides comprehensive validation for JSON Schema objects with support for:
|
|
5
|
+
* - Complex schema patterns (anyOf, oneOf, allOf)
|
|
6
|
+
* - Required field validation
|
|
7
|
+
* - Property-level validation
|
|
8
|
+
* - Nested schema validation
|
|
9
|
+
* - AJV integration with caching
|
|
10
|
+
*
|
|
11
|
+
* @module ValidationEngine
|
|
12
|
+
*/
|
|
13
|
+
import type { ValidationErrorDetail } from '../types';
|
|
14
|
+
/**
|
|
15
|
+
* Main validation function with comprehensive anyOf/oneOf support
|
|
16
|
+
*
|
|
17
|
+
* This is the primary entry point for complex JSON Schema validation.
|
|
18
|
+
* It orchestrates all validation steps:
|
|
19
|
+
* 1. Basic structure validation (type checking)
|
|
20
|
+
* 2. Required field validation
|
|
21
|
+
* 3. Property-level validation with complex constraint support
|
|
22
|
+
*
|
|
23
|
+
* @param data - Data to validate against the schema
|
|
24
|
+
* @param schema - JSON Schema object with validation rules
|
|
25
|
+
* @param fullSpec - Complete schema specification for reference resolution
|
|
26
|
+
* @returns Array of validation errors (empty array means valid)
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* const schema = {
|
|
31
|
+
* type: 'object',
|
|
32
|
+
* required: ['name'],
|
|
33
|
+
* properties: {
|
|
34
|
+
* name: { type: 'string' },
|
|
35
|
+
* age: { anyOf: [{ type: 'number' }, { type: 'null' }] }
|
|
36
|
+
* }
|
|
37
|
+
* }
|
|
38
|
+
*
|
|
39
|
+
* const errors = validateWithAnyOfSupport(data, schema)
|
|
40
|
+
* if (errors.length === 0) {
|
|
41
|
+
* console.log('Data is valid!')
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare function validateWithAnyOfSupport(data: unknown, schema: any): ValidationErrorDetail[];
|
|
46
|
+
/**
|
|
47
|
+
* Helper function to create detailed validation error objects
|
|
48
|
+
*
|
|
49
|
+
* @param path - JSON path to the invalid property
|
|
50
|
+
* @param message - Human-readable error description
|
|
51
|
+
* @param expected - Expected value or type
|
|
52
|
+
* @param actual - Actual value or type that failed validation
|
|
53
|
+
* @returns Standardized validation error object
|
|
54
|
+
*/
|
|
55
|
+
export declare function createValidationError(path: string, message: string, expected: unknown, actual: unknown): ValidationErrorDetail;
|
|
56
|
+
/**
|
|
57
|
+
* Helper function to format validation errors for logging
|
|
58
|
+
*
|
|
59
|
+
* @param errors - Array of validation errors
|
|
60
|
+
* @returns Formatted error summary string
|
|
61
|
+
*/
|
|
62
|
+
export declare function formatValidationErrors(errors: ValidationErrorDetail[]): string;
|
|
63
|
+
//# sourceMappingURL=validation-engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-engine.d.ts","sourceRoot":"","sources":["../../../../../src/api-request/schema-validation/internal/validation-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AA0VrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,OAAO,EAEb,MAAM,EAAE,GAAG,GACV,qBAAqB,EAAE,CAsBzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,OAAO,GACd,qBAAqB,CAOvB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,qBAAqB,EAAE,GAC9B,MAAM,CAWR"}
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Advanced Schema Validation Engine
|
|
4
|
+
*
|
|
5
|
+
* This module provides comprehensive validation for JSON Schema objects with support for:
|
|
6
|
+
* - Complex schema patterns (anyOf, oneOf, allOf)
|
|
7
|
+
* - Required field validation
|
|
8
|
+
* - Property-level validation
|
|
9
|
+
* - Nested schema validation
|
|
10
|
+
* - AJV integration with caching
|
|
11
|
+
*
|
|
12
|
+
* @module ValidationEngine
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.validateWithAnyOfSupport = validateWithAnyOfSupport;
|
|
16
|
+
exports.createValidationError = createValidationError;
|
|
17
|
+
exports.formatValidationErrors = formatValidationErrors;
|
|
18
|
+
/**
|
|
19
|
+
* Schema compilation cache to avoid expensive recompilations
|
|
20
|
+
*/
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
+
const compilationCache = new Map();
|
|
23
|
+
const MAX_COMPILATION_CACHE_SIZE = 200;
|
|
24
|
+
/**
|
|
25
|
+
* Gets or creates an AJV instance for validation
|
|
26
|
+
*
|
|
27
|
+
* @returns AJV validation instance
|
|
28
|
+
*/
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30
|
+
function getAjvInstance() {
|
|
31
|
+
// Lazy load AJV only when needed
|
|
32
|
+
try {
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
34
|
+
const Ajv = require('ajv');
|
|
35
|
+
return new Ajv({
|
|
36
|
+
allErrors: true,
|
|
37
|
+
verbose: true,
|
|
38
|
+
strict: false
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
throw new Error('AJV is required for JSON Schema validation. Install with: npm install ajv');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Gets a cached validator for the given schema, creating one if needed
|
|
47
|
+
*
|
|
48
|
+
* @param schema - Schema to compile
|
|
49
|
+
* @param ajvInstance - AJV instance to use for compilation
|
|
50
|
+
* @returns Compiled validator function
|
|
51
|
+
*/
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
53
|
+
function getCachedValidator(schema, ajvInstance) {
|
|
54
|
+
const cacheKey = JSON.stringify(schema);
|
|
55
|
+
// Check if validator is already cached
|
|
56
|
+
if (compilationCache.has(cacheKey)) {
|
|
57
|
+
return compilationCache.get(cacheKey);
|
|
58
|
+
}
|
|
59
|
+
// Implement LRU-style eviction if cache is getting too large
|
|
60
|
+
if (compilationCache.size >= MAX_COMPILATION_CACHE_SIZE) {
|
|
61
|
+
// Remove the oldest entry (first key in the Map)
|
|
62
|
+
const firstKey = compilationCache.keys().next().value;
|
|
63
|
+
if (firstKey !== undefined) {
|
|
64
|
+
compilationCache.delete(firstKey);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
// Compile and cache the validator
|
|
68
|
+
const validator = ajvInstance.compile(schema);
|
|
69
|
+
compilationCache.set(cacheKey, validator);
|
|
70
|
+
return validator;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Validates basic data structure against schema type requirements
|
|
74
|
+
*
|
|
75
|
+
* Ensures the root data type matches the schema expectation before
|
|
76
|
+
* proceeding with detailed property validation.
|
|
77
|
+
*
|
|
78
|
+
* @param data - Data to validate
|
|
79
|
+
* @param schema - Schema with type definition
|
|
80
|
+
* @returns Validation error if structure is invalid, null if valid
|
|
81
|
+
*/
|
|
82
|
+
function validateBasicStructure(data,
|
|
83
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
84
|
+
schema) {
|
|
85
|
+
if (schema.type === 'object' && typeof data !== 'object') {
|
|
86
|
+
return {
|
|
87
|
+
path: 'root',
|
|
88
|
+
message: 'Expected object type',
|
|
89
|
+
expected: 'object',
|
|
90
|
+
actual: typeof data
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
if (schema.type === 'array' && !Array.isArray(data)) {
|
|
94
|
+
return {
|
|
95
|
+
path: 'root',
|
|
96
|
+
message: 'Expected array type',
|
|
97
|
+
expected: 'array',
|
|
98
|
+
actual: typeof data
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Validates required fields in the data object
|
|
105
|
+
*
|
|
106
|
+
* Checks that all fields listed in schema.required are present
|
|
107
|
+
* in the data object, regardless of their values.
|
|
108
|
+
*
|
|
109
|
+
* @param dataObj - Data object to check
|
|
110
|
+
* @param schema - Schema with required field definitions
|
|
111
|
+
* @returns Array of validation errors for missing required fields
|
|
112
|
+
*/
|
|
113
|
+
function validateRequiredFields(
|
|
114
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
115
|
+
dataObj,
|
|
116
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
117
|
+
schema) {
|
|
118
|
+
const errors = [];
|
|
119
|
+
if (!schema.required || !Array.isArray(schema.required)) {
|
|
120
|
+
return errors;
|
|
121
|
+
}
|
|
122
|
+
for (const field of schema.required) {
|
|
123
|
+
if (!(field in dataObj)) {
|
|
124
|
+
errors.push({
|
|
125
|
+
path: `/${field}`,
|
|
126
|
+
message: `Missing required field: ${field}`,
|
|
127
|
+
expected: field,
|
|
128
|
+
actual: 'undefined'
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return errors;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Validates a value against an anyOf schema constraint
|
|
136
|
+
*
|
|
137
|
+
* The anyOf constraint passes if the value matches at least one
|
|
138
|
+
* of the provided schema options. This is more flexible than oneOf
|
|
139
|
+
* which requires exactly one match.
|
|
140
|
+
*
|
|
141
|
+
* @param value - Value to validate
|
|
142
|
+
* @param prop - Property schema containing anyOf definitions
|
|
143
|
+
* @param key - Property name for error reporting
|
|
144
|
+
* @returns Validation error if no anyOf schemas match, null if valid
|
|
145
|
+
*/
|
|
146
|
+
function validateAnyOfProperty(value,
|
|
147
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
148
|
+
prop, key) {
|
|
149
|
+
// Skip validation if anyOf is not defined or value is undefined
|
|
150
|
+
if (!prop.anyOf || value === undefined) {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
// Test value against each anyOf option
|
|
154
|
+
for (const option of prop.anyOf) {
|
|
155
|
+
try {
|
|
156
|
+
const ajvInstance = getAjvInstance();
|
|
157
|
+
const validate = getCachedValidator(option, ajvInstance);
|
|
158
|
+
if (validate(value)) {
|
|
159
|
+
return null; // Value matches at least one schema
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
catch {
|
|
163
|
+
// Continue to next option if compilation fails
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return {
|
|
168
|
+
path: `/${key}`,
|
|
169
|
+
message: 'Value does not match any of the anyOf schemas',
|
|
170
|
+
expected: 'one or more of anyOf schemas',
|
|
171
|
+
actual: typeof value === 'object' ? JSON.stringify(value).substring(0, 50) : value
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Validates a value against a oneOf schema constraint
|
|
176
|
+
*
|
|
177
|
+
* The oneOf constraint passes if the value matches exactly one
|
|
178
|
+
* of the provided schema options. Matching zero or multiple
|
|
179
|
+
* schemas results in validation failure.
|
|
180
|
+
*
|
|
181
|
+
* @param value - Value to validate
|
|
182
|
+
* @param prop - Property schema containing oneOf definitions
|
|
183
|
+
* @param key - Property name for error reporting
|
|
184
|
+
* @returns Validation error if not exactly one oneOf schema matches, null if valid
|
|
185
|
+
*/
|
|
186
|
+
function validateOneOfProperty(value,
|
|
187
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
188
|
+
prop, key) {
|
|
189
|
+
if (!prop.oneOf || value === undefined) {
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
let matchCount = 0;
|
|
193
|
+
const matchingSchemas = [];
|
|
194
|
+
for (let i = 0; i < prop.oneOf.length; i++) {
|
|
195
|
+
const option = prop.oneOf[i];
|
|
196
|
+
try {
|
|
197
|
+
const ajvInstance = getAjvInstance();
|
|
198
|
+
const validate = getCachedValidator(option, ajvInstance);
|
|
199
|
+
if (validate(value)) {
|
|
200
|
+
matchCount++;
|
|
201
|
+
matchingSchemas.push(`schema-${i}`);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
catch {
|
|
205
|
+
// Schema compilation error - skip this option
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
// oneOf requires exactly one match
|
|
210
|
+
if (matchCount === 1) {
|
|
211
|
+
return null;
|
|
212
|
+
}
|
|
213
|
+
return {
|
|
214
|
+
path: `/${key}`,
|
|
215
|
+
message: matchCount === 0
|
|
216
|
+
? 'Value does not match any of the oneOf schemas'
|
|
217
|
+
: `Value matches ${matchCount} schemas (${matchingSchemas.join(', ')}), but should match exactly one`,
|
|
218
|
+
expected: 'exactly one of oneOf schemas',
|
|
219
|
+
actual: value
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Validates a value against a standard property schema
|
|
224
|
+
*
|
|
225
|
+
* Handles basic property validation using AJV compilation
|
|
226
|
+
* for properties that don't use complex constraints like
|
|
227
|
+
* anyOf or oneOf.
|
|
228
|
+
*
|
|
229
|
+
* @param value - Value to validate
|
|
230
|
+
* @param prop - Property schema definition
|
|
231
|
+
* @param key - Property name for error reporting
|
|
232
|
+
* @returns Validation error if property doesn't match schema, null if valid
|
|
233
|
+
*/
|
|
234
|
+
function validateStandardProperty(value,
|
|
235
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
236
|
+
prop, key) {
|
|
237
|
+
if (!prop.type || value === undefined) {
|
|
238
|
+
return null;
|
|
239
|
+
}
|
|
240
|
+
try {
|
|
241
|
+
const ajvInstance = getAjvInstance();
|
|
242
|
+
const validate = getCachedValidator(prop, ajvInstance);
|
|
243
|
+
if (validate(value)) {
|
|
244
|
+
return null;
|
|
245
|
+
}
|
|
246
|
+
// Extract meaningful error message from AJV
|
|
247
|
+
const ajvError = validate.errors?.[0];
|
|
248
|
+
const errorMessage = ajvError?.message || 'Validation failed';
|
|
249
|
+
const expectedValue = prop.type || 'valid value';
|
|
250
|
+
const actualValue = typeof value;
|
|
251
|
+
return {
|
|
252
|
+
path: `/${key}`,
|
|
253
|
+
message: `${key}: ${errorMessage}`,
|
|
254
|
+
expected: expectedValue,
|
|
255
|
+
actual: actualValue
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
catch (error) {
|
|
259
|
+
return {
|
|
260
|
+
path: `/${key}`,
|
|
261
|
+
message: `Schema compilation error: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
262
|
+
expected: 'valid schema',
|
|
263
|
+
actual: 'compilation failed'
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Validates all properties defined in a schema against corresponding data values
|
|
269
|
+
*
|
|
270
|
+
* This function orchestrates property-level validation by applying the appropriate
|
|
271
|
+
* validation strategy (anyOf, oneOf, or standard) for each property defined in
|
|
272
|
+
* the schema.
|
|
273
|
+
*
|
|
274
|
+
* @param dataObj - Data object containing values to validate
|
|
275
|
+
* @param schema - Schema object with property definitions
|
|
276
|
+
* @param fullSpec - Complete schema specification for context
|
|
277
|
+
* @returns Array of validation errors for invalid properties
|
|
278
|
+
*/
|
|
279
|
+
function validateSchemaProperties(
|
|
280
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
281
|
+
dataObj,
|
|
282
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
283
|
+
schema) {
|
|
284
|
+
const errors = [];
|
|
285
|
+
if (!schema.properties || typeof schema.properties !== 'object') {
|
|
286
|
+
return errors;
|
|
287
|
+
}
|
|
288
|
+
for (const [key, propSchema] of Object.entries(schema.properties)) {
|
|
289
|
+
const value = dataObj[key];
|
|
290
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
291
|
+
const prop = propSchema;
|
|
292
|
+
// Apply validation strategies in order of complexity
|
|
293
|
+
// 1. Try anyOf validation first (most flexible)
|
|
294
|
+
const anyOfError = validateAnyOfProperty(value, prop, key);
|
|
295
|
+
if (anyOfError) {
|
|
296
|
+
errors.push(anyOfError);
|
|
297
|
+
continue; // Skip other validations if anyOf fails
|
|
298
|
+
}
|
|
299
|
+
// 2. Try oneOf validation (strict single match)
|
|
300
|
+
const oneOfError = validateOneOfProperty(value, prop, key);
|
|
301
|
+
if (oneOfError) {
|
|
302
|
+
errors.push(oneOfError);
|
|
303
|
+
continue; // Skip standard validation if oneOf fails
|
|
304
|
+
}
|
|
305
|
+
// 3. Fall back to standard property validation
|
|
306
|
+
const standardError = validateStandardProperty(value, prop, key);
|
|
307
|
+
if (standardError) {
|
|
308
|
+
errors.push(standardError);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
return errors;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Main validation function with comprehensive anyOf/oneOf support
|
|
315
|
+
*
|
|
316
|
+
* This is the primary entry point for complex JSON Schema validation.
|
|
317
|
+
* It orchestrates all validation steps:
|
|
318
|
+
* 1. Basic structure validation (type checking)
|
|
319
|
+
* 2. Required field validation
|
|
320
|
+
* 3. Property-level validation with complex constraint support
|
|
321
|
+
*
|
|
322
|
+
* @param data - Data to validate against the schema
|
|
323
|
+
* @param schema - JSON Schema object with validation rules
|
|
324
|
+
* @param fullSpec - Complete schema specification for reference resolution
|
|
325
|
+
* @returns Array of validation errors (empty array means valid)
|
|
326
|
+
*
|
|
327
|
+
* @example
|
|
328
|
+
* ```typescript
|
|
329
|
+
* const schema = {
|
|
330
|
+
* type: 'object',
|
|
331
|
+
* required: ['name'],
|
|
332
|
+
* properties: {
|
|
333
|
+
* name: { type: 'string' },
|
|
334
|
+
* age: { anyOf: [{ type: 'number' }, { type: 'null' }] }
|
|
335
|
+
* }
|
|
336
|
+
* }
|
|
337
|
+
*
|
|
338
|
+
* const errors = validateWithAnyOfSupport(data, schema)
|
|
339
|
+
* if (errors.length === 0) {
|
|
340
|
+
* console.log('Data is valid!')
|
|
341
|
+
* }
|
|
342
|
+
* ```
|
|
343
|
+
*/
|
|
344
|
+
function validateWithAnyOfSupport(data,
|
|
345
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
346
|
+
schema) {
|
|
347
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
348
|
+
const dataObj = data;
|
|
349
|
+
// Step 1: Validate basic data structure
|
|
350
|
+
const structureError = validateBasicStructure(data, schema);
|
|
351
|
+
if (structureError) {
|
|
352
|
+
return [structureError]; // Early return for structural failures
|
|
353
|
+
}
|
|
354
|
+
// Step 2: Collect all validation errors
|
|
355
|
+
const errors = [];
|
|
356
|
+
// Step 3: Validate required fields
|
|
357
|
+
const requiredFieldErrors = validateRequiredFields(dataObj, schema);
|
|
358
|
+
errors.push(...requiredFieldErrors);
|
|
359
|
+
// Step 4: Validate all schema properties
|
|
360
|
+
const propertyErrors = validateSchemaProperties(dataObj, schema);
|
|
361
|
+
errors.push(...propertyErrors);
|
|
362
|
+
return errors;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Helper function to create detailed validation error objects
|
|
366
|
+
*
|
|
367
|
+
* @param path - JSON path to the invalid property
|
|
368
|
+
* @param message - Human-readable error description
|
|
369
|
+
* @param expected - Expected value or type
|
|
370
|
+
* @param actual - Actual value or type that failed validation
|
|
371
|
+
* @returns Standardized validation error object
|
|
372
|
+
*/
|
|
373
|
+
function createValidationError(path, message, expected, actual) {
|
|
374
|
+
return {
|
|
375
|
+
path,
|
|
376
|
+
message,
|
|
377
|
+
expected,
|
|
378
|
+
actual
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Helper function to format validation errors for logging
|
|
383
|
+
*
|
|
384
|
+
* @param errors - Array of validation errors
|
|
385
|
+
* @returns Formatted error summary string
|
|
386
|
+
*/
|
|
387
|
+
function formatValidationErrors(errors) {
|
|
388
|
+
if (errors.length === 0) {
|
|
389
|
+
return 'No validation errors';
|
|
390
|
+
}
|
|
391
|
+
return errors
|
|
392
|
+
.map((error) => `${error.path}: ${error.message} (expected: ${error.expected}, got: ${error.actual})`)
|
|
393
|
+
.join('\n');
|
|
394
|
+
}
|
|
395
|
+
//# sourceMappingURL=validation-engine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-engine.js","sourceRoot":"","sources":["../../../../../src/api-request/schema-validation/internal/validation-engine.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;AA2XH,4DA0BC;AAWD,sDAYC;AAQD,wDAaC;AA7bD;;GAEG;AACH,8DAA8D;AAC9D,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAe,CAAA;AAC/C,MAAM,0BAA0B,GAAG,GAAG,CAAA;AAEtC;;;;GAIG;AACH,8DAA8D;AAC9D,SAAS,cAAc;IACrB,iCAAiC;IACjC,IAAI,CAAC;QACH,8DAA8D;QAC9D,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAA;QAC1B,OAAO,IAAI,GAAG,CAAC;YACb,SAAS,EAAE,IAAI;YACf,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CACb,2EAA2E,CAC5E,CAAA;IACH,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,8DAA8D;AAC9D,SAAS,kBAAkB,CAAC,MAAW,EAAE,WAAgB;IACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;IAEvC,uCAAu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|
|
|
1
|
+
/** Schema validation types for API request responses */
|
|
2
|
+
import type { ZodSchema } from 'zod';
|
|
3
|
+
import type { ApiRequestResponse } from '../api-request';
|
|
4
|
+
/** Supported schema formats */
|
|
5
|
+
export type SupportedSchema = object | ZodSchema | string;
|
|
6
|
+
/** Validation mode - throw errors or return results */
|
|
7
|
+
export type ValidationMode = 'throw' | 'return';
|
|
8
|
+
/** Shape validation function for custom assertions */
|
|
9
|
+
export type ShapeValidator<T = unknown> = (value: T) => boolean | void;
|
|
10
|
+
/** Shape validation object with nested assertions */
|
|
11
|
+
export type ShapeAssertion = {
|
|
12
|
+
[key: string]: unknown | ShapeValidator | ShapeAssertion;
|
|
13
|
+
};
|
|
14
|
+
/** Options for validateSchema method */
|
|
15
|
+
export type ValidateSchemaOptions = {
|
|
16
|
+
/** Custom shape assertions to run alongside schema validation */
|
|
17
|
+
shape?: ShapeAssertion;
|
|
18
|
+
/** Validation mode - 'throw' (default) or 'return' */
|
|
19
|
+
mode?: ValidationMode;
|
|
20
|
+
/** Enable UI mode display for this validation */
|
|
21
|
+
uiMode?: boolean;
|
|
22
|
+
/** For OpenAPI schemas - target specific path (interchangeable with endpoint) */
|
|
23
|
+
path?: string;
|
|
24
|
+
/** For OpenAPI schemas - target specific endpoint (interchangeable with path) */
|
|
25
|
+
endpoint?: string;
|
|
26
|
+
/** For OpenAPI schemas - target specific HTTP method */
|
|
27
|
+
method?: string;
|
|
28
|
+
/** For OpenAPI schemas - target specific status code */
|
|
29
|
+
status?: number;
|
|
30
|
+
};
|
|
31
|
+
/** Validation error details */
|
|
32
|
+
export type ValidationErrorDetail = {
|
|
33
|
+
/** JSON path to the error location */
|
|
34
|
+
path: string;
|
|
35
|
+
/** Error message */
|
|
36
|
+
message: string;
|
|
37
|
+
/** Expected value or constraint */
|
|
38
|
+
expected?: unknown;
|
|
39
|
+
/** Actual value that failed validation */
|
|
40
|
+
actual?: unknown;
|
|
41
|
+
};
|
|
42
|
+
/** Validation result details */
|
|
43
|
+
export type ValidationResult = {
|
|
44
|
+
/** Whether validation passed */
|
|
45
|
+
success: boolean;
|
|
46
|
+
/** List of validation errors (empty if success) */
|
|
47
|
+
errors: ValidationErrorDetail[];
|
|
48
|
+
/** Schema format that was used */
|
|
49
|
+
schemaFormat: 'JSON Schema' | 'Zod Schema' | 'YAML OpenAPI' | 'JSON OpenAPI';
|
|
50
|
+
/** Validation execution time in milliseconds */
|
|
51
|
+
validationTime: number;
|
|
52
|
+
/** The actual schema used for validation (for debugging) */
|
|
53
|
+
schema?: object;
|
|
54
|
+
/** UI display data if uiMode is enabled */
|
|
55
|
+
uiData?: {
|
|
56
|
+
statusIcon: '✅' | '❌';
|
|
57
|
+
validationSummary: string;
|
|
58
|
+
schemaInfo: string;
|
|
59
|
+
errorDetails?: string[];
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
/** Enhanced API response with validation result */
|
|
63
|
+
export type ValidatedApiResponse<T = unknown> = ApiRequestResponse<T> & {
|
|
64
|
+
/** Validation result details */
|
|
65
|
+
validationResult: ValidationResult;
|
|
66
|
+
/** Original response before validation */
|
|
67
|
+
originalResponse: ApiRequestResponse<T>;
|
|
68
|
+
};
|
|
69
|
+
/** Validation error thrown when schema validation fails */
|
|
70
|
+
export declare class ValidationError extends Error {
|
|
71
|
+
readonly validationResult: ValidationResult;
|
|
72
|
+
readonly requestContext?: {
|
|
73
|
+
method: string;
|
|
74
|
+
path: string;
|
|
75
|
+
body?: unknown;
|
|
76
|
+
headers?: Record<string, string>;
|
|
77
|
+
} | undefined;
|
|
78
|
+
readonly responseContext?: {
|
|
79
|
+
status: number;
|
|
80
|
+
body: unknown;
|
|
81
|
+
} | undefined;
|
|
82
|
+
constructor(message: string, validationResult: ValidationResult, requestContext?: {
|
|
83
|
+
method: string;
|
|
84
|
+
path: string;
|
|
85
|
+
body?: unknown;
|
|
86
|
+
headers?: Record<string, string>;
|
|
87
|
+
} | undefined, responseContext?: {
|
|
88
|
+
status: number;
|
|
89
|
+
body: unknown;
|
|
90
|
+
} | undefined);
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/api-request/schema-validation/types.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACpC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAExD,+BAA+B;AAC/B,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,SAAS,GACT,MAAM,CAAA;AAEV,uDAAuD;AACvD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,CAAA;AAE/C,sDAAsD;AACtD,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,CAAA;AAEtE,qDAAqD;AACrD,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,cAAc,GAAG,cAAc,CAAA;CACzD,CAAA;AAED,wCAAwC;AACxC,MAAM,MAAM,qBAAqB,GAAG;IAClC,iEAAiE;IACjE,KAAK,CAAC,EAAE,cAAc,CAAA;IACtB,sDAAsD;IACtD,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,iDAAiD;IACjD,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,iFAAiF;IACjF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,+BAA+B;AAC/B,MAAM,MAAM,qBAAqB,GAAG;IAClC,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,oBA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A;QACd,IAAI,EAAE,OAAO,CAAA;KACd;gBAXD,OAAO,EAAE,MAAM,EACC,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,CAAC,EAAE;QAC/B,MAAM,EAAE,MAAM,CAAA;QACd,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,CAAC,EAAE,OAAO,CAAA;QACd,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KACjC,YAAA,EACe,eAAe,CAAC,EAAE;QAChC,MAAM,EAAE,MAAM,CAAA;QACd,IAAI,EAAE,OAAO,CAAA;KACd,YAAA;CAKJ"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/** Schema validation types for API request responses */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ValidationError = void 0;
|
|
5
|
+
/** Validation error thrown when schema validation fails */
|
|
6
|
+
class ValidationError extends Error {
|
|
7
|
+
constructor(message, validationResult, requestContext, responseContext) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.validationResult = validationResult;
|
|
10
|
+
this.requestContext = requestContext;
|
|
11
|
+
this.responseContext = responseContext;
|
|
12
|
+
this.name = 'ValidationError';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.ValidationError = ValidationError;
|
|
16
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api-request/schema-validation/types.ts"],"names":[],"mappings":";AAAA,wDAAwD;;;AAiFxD,2DAA2D;AAC3D,MAAa,eAAgB,SAAQ,KAAK;IACxC,YACE,OAAe,EACC,gBAAkC,EAClC,cAKf,EACe,eAGf;QAED,KAAK,CAAC,OAAO,CAAC,CAAA;QAZE,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,mBAAc,GAAd,cAAc,CAK7B;QACe,oBAAe,GAAf,eAAe,CAG9B;QAGD,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAA;IAC/B,CAAC;CACF;AAlBD,0CAkBC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI display functionality for API requests
|
|
3
|
+
* Adapted from pw-api-plugin to provide rich visual feedback in Playwright UI
|
|
4
|
+
*/
|
|
5
|
+
import { type Page } from '@playwright/test';
|
|
6
|
+
/** Request data interface for UI display */
|
|
7
|
+
export interface RequestDataInterface {
|
|
8
|
+
url: string;
|
|
9
|
+
method: string;
|
|
10
|
+
headers?: object;
|
|
11
|
+
data?: any;
|
|
12
|
+
params?: object;
|
|
13
|
+
otherOptions?: object;
|
|
14
|
+
validationInfo?: {
|
|
15
|
+
schemaFormat: string;
|
|
16
|
+
validationTime: number;
|
|
17
|
+
success: boolean;
|
|
18
|
+
errorCount: number;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/** Response data interface for UI display */
|
|
22
|
+
export interface ResponseDataInterface {
|
|
23
|
+
status: number;
|
|
24
|
+
statusClass: string;
|
|
25
|
+
statusText: string;
|
|
26
|
+
headers?: object;
|
|
27
|
+
body?: any;
|
|
28
|
+
duration?: number;
|
|
29
|
+
validationResult?: {
|
|
30
|
+
icon: '✅' | '❌';
|
|
31
|
+
summary: string;
|
|
32
|
+
schemaInfo: string;
|
|
33
|
+
errors?: string[];
|
|
34
|
+
schema?: object;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Adds an API card to the UI by updating the page content with the provided request and response data.
|
|
39
|
+
* Only works when a page context is available (UI tests)
|
|
40
|
+
*/
|
|
41
|
+
export declare const addApiCardToUI: (requestData: RequestDataInterface, responseData: ResponseDataInterface, page?: Page, uiMode?: boolean) => Promise<void>;
|
|
42
|
+
//# sourceMappingURL=ui-display.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-display.d.ts","sourceRoot":"","sources":["../../../src/api-request/ui-display.ts"],"names":[],"mappings":"AACA;;;GAGG;AAEH,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAGlD,4CAA4C;AAC5C,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,GAAG,CAAA;IACV,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE;QACf,YAAY,EAAE,MAAM,CAAA;QACpB,cAAc,EAAE,MAAM,CAAA;QACtB,OAAO,EAAE,OAAO,CAAA;QAChB,UAAU,EAAE,MAAM,CAAA;KACnB,CAAA;CACF;AAED,6CAA6C;AAC7C,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,GAAG,CAAA;IACV,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE;QACjB,IAAI,EAAE,GAAG,GAAG,GAAG,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;QACf,UAAU,EAAE,MAAM,CAAA;QAClB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;QACjB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;CACF;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,GACzB,aAAa,oBAAoB,EACjC,cAAc,qBAAqB,EACnC,OAAO,IAAI,EACX,SAAS,OAAO,KACf,OAAO,CAAC,IAAI,CAgCd,CAAA"}
|