@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 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api-request/schema-validation/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAA;AAC3D,YAAY,EACV,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAGzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Secure File Loading for Schema Validation
|
|
3
|
+
*
|
|
4
|
+
* This module provides secure file loading capabilities for schema files
|
|
5
|
+
* with built-in security validations and format detection.
|
|
6
|
+
*
|
|
7
|
+
* @module FileLoader
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Load schema from file path with comprehensive security validations
|
|
11
|
+
*
|
|
12
|
+
* This function provides secure file loading with multiple security checks:
|
|
13
|
+
* - File extension validation (only .json, .yaml, .yml allowed)
|
|
14
|
+
* - Path resolution to prevent directory traversal
|
|
15
|
+
* - Safe YAML parsing (no code execution)
|
|
16
|
+
* - Comprehensive error handling
|
|
17
|
+
*
|
|
18
|
+
* @param filePath - Path to the schema file (relative or absolute)
|
|
19
|
+
* @returns Parsed schema object
|
|
20
|
+
* @throws Error if file is not found, has invalid extension, or parsing fails
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* // Load JSON schema
|
|
25
|
+
* const jsonSchema = await loadSchemaFromFile('./schemas/user.json')
|
|
26
|
+
*
|
|
27
|
+
* // Load YAML OpenAPI spec
|
|
28
|
+
* const yamlSchema = await loadSchemaFromFile('./openapi/api.yaml')
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @security
|
|
32
|
+
* - Only allows specific file extensions to prevent arbitrary file reading
|
|
33
|
+
* - Uses path.resolve() to prevent directory traversal attacks
|
|
34
|
+
* - YAML parsing is safe by default (no code execution in js-yaml v4+)
|
|
35
|
+
*/
|
|
36
|
+
export declare function loadSchemaFromFile(filePath: string): Promise<object>;
|
|
37
|
+
/**
|
|
38
|
+
* Check if a file path has a valid schema file extension
|
|
39
|
+
*
|
|
40
|
+
* @param filePath - File path to validate
|
|
41
|
+
* @returns True if the file has a valid schema extension
|
|
42
|
+
*/
|
|
43
|
+
export declare function isValidSchemaFile(filePath: string): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Get the list of allowed file extensions for schema files
|
|
46
|
+
*
|
|
47
|
+
* @returns Array of allowed file extensions
|
|
48
|
+
*/
|
|
49
|
+
export declare function getAllowedExtensions(): readonly string[];
|
|
50
|
+
//# sourceMappingURL=file-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-loader.d.ts","sourceRoot":"","sources":["../../../../../src/api-request/schema-validation/internal/file-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAWH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAoC1E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAK3D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,SAAS,MAAM,EAAE,CAExD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAPI Schema Handler
|
|
3
|
+
*
|
|
4
|
+
* This module handles OpenAPI specification parsing, schema extraction,
|
|
5
|
+
* and $ref resolution for API response validation.
|
|
6
|
+
*
|
|
7
|
+
* @module OpenApiHandler
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Resolve $ref references in OpenAPI schema
|
|
11
|
+
*
|
|
12
|
+
* @param ref - Reference string (e.g., "#/components/schemas/User")
|
|
13
|
+
* @param openApiSpec - Complete OpenAPI specification object
|
|
14
|
+
* @returns Resolved schema object
|
|
15
|
+
* @throws Error if reference is external or not found
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveOpenApiRef(ref: string, openApiSpec: Record<string, unknown>): object;
|
|
18
|
+
/**
|
|
19
|
+
* Extract schema from OpenAPI spec for specific endpoint
|
|
20
|
+
*
|
|
21
|
+
* This function navigates through the OpenAPI specification to find
|
|
22
|
+
* the response schema for a specific endpoint, method, and status code.
|
|
23
|
+
* It handles parameterized paths and $ref resolution.
|
|
24
|
+
*
|
|
25
|
+
* @param openApiSpec - Complete OpenAPI specification object
|
|
26
|
+
* @param endpoint - API endpoint path (e.g., "/users/{id}")
|
|
27
|
+
* @param method - HTTP method (GET, POST, etc.)
|
|
28
|
+
* @param status - HTTP status code (defaults to 200)
|
|
29
|
+
* @returns JSON Schema object for validation
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```typescript
|
|
33
|
+
* const schema = extractOpenApiSchema(
|
|
34
|
+
* openApiSpec,
|
|
35
|
+
* "/users/{id}",
|
|
36
|
+
* "GET",
|
|
37
|
+
* 200
|
|
38
|
+
* )
|
|
39
|
+
* // Returns the JSON schema for GET /users/{id} 200 response
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function extractOpenApiSchema(openApiSpec: Record<string, unknown>, endpoint?: string, method?: string, status?: number): object;
|
|
43
|
+
//# sourceMappingURL=openapi-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi-handler.d.ts","sourceRoot":"","sources":["../../../../../src/api-request/schema-validation/internal/openapi-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAoFH;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACnC,MAAM,CAkBR;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,QAAQ,CAAC,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,SAAM,GACX,MAAM,CAqCR"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Promise extension to add validateSchema method to promises */
|
|
2
|
+
import type { SupportedSchema, ValidateSchemaOptions, ValidatedApiResponse } from '../types';
|
|
3
|
+
import type { EnhancedApiResponse } from './response-extension';
|
|
4
|
+
/** Enhanced Promise with validateSchema method */
|
|
5
|
+
export interface EnhancedApiPromise<T = unknown> extends Promise<EnhancedApiResponse<T>> {
|
|
6
|
+
validateSchema<TValidated = T>(schema: SupportedSchema, options?: ValidateSchemaOptions): Promise<ValidatedApiResponse<TValidated>>;
|
|
7
|
+
}
|
|
8
|
+
/** Create enhanced promise with validateSchema method */
|
|
9
|
+
export declare function createEnhancedPromise<T>(promise: Promise<EnhancedApiResponse<T>>): EnhancedApiPromise<T>;
|
|
10
|
+
//# sourceMappingURL=promise-extension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promise-extension.d.ts","sourceRoot":"","sources":["../../../../../src/api-request/schema-validation/internal/promise-extension.ts"],"names":[],"mappings":"AAAA,iEAAiE;AAEjE,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE/D,kDAAkD;AAClD,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,OAAO,CAC7C,SAAQ,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;IACvC,cAAc,CAAC,UAAU,GAAG,CAAC,EAC3B,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAA;CAC7C;AAED,yDAAyD;AACzD,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,OAAO,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,GACvC,kBAAkB,CAAC,CAAC,CAAC,CAYvB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Response extension with validateSchema method */
|
|
2
|
+
import type { SupportedSchema, ValidateSchemaOptions, ValidatedApiResponse } from '../types';
|
|
3
|
+
import type { ApiRequestResponse } from '../../api-request';
|
|
4
|
+
import type { Page } from '@playwright/test';
|
|
5
|
+
/** Enhanced API response with validateSchema method */
|
|
6
|
+
export interface EnhancedApiResponse<T = unknown> extends ApiRequestResponse<T> {
|
|
7
|
+
validateSchema<TValidated = T>(schema: SupportedSchema, options?: ValidateSchemaOptions): Promise<ValidatedApiResponse<TValidated>>;
|
|
8
|
+
}
|
|
9
|
+
/** Create enhanced response with validateSchema method */
|
|
10
|
+
export declare function createEnhancedResponse<T>(originalResponse: ApiRequestResponse<T>, requestContext?: {
|
|
11
|
+
method: string;
|
|
12
|
+
path: string;
|
|
13
|
+
body?: unknown;
|
|
14
|
+
headers?: Record<string, string>;
|
|
15
|
+
page?: Page;
|
|
16
|
+
uiMode?: boolean;
|
|
17
|
+
}): EnhancedApiResponse<T>;
|
|
18
|
+
//# sourceMappingURL=response-extension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-extension.d.ts","sourceRoot":"","sources":["../../../../../src/api-request/schema-validation/internal/response-extension.ts"],"names":[],"mappings":"AAAA,oDAAoD;AAWpD,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EAErB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAM3D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAqB5C,uDAAuD;AACvD,MAAM,WAAW,mBAAmB,CAAC,CAAC,GAAG,OAAO,CAC9C,SAAQ,kBAAkB,CAAC,CAAC,CAAC;IAC7B,cAAc,CAAC,UAAU,GAAG,CAAC,EAC3B,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAA;CAC7C;AAmID,0DAA0D;AAC1D,wBAAgB,sBAAsB,CAAC,CAAC,EACtC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC,CAAC,EACvC,cAAc,CAAC,EAAE;IACf,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,GACA,mBAAmB,CAAC,CAAC,CAAC,CAoFxB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation Result Builder
|
|
3
|
+
*
|
|
4
|
+
* This module provides utilities for building consistent validation results
|
|
5
|
+
* with proper formatting, logging, and UI data generation.
|
|
6
|
+
*
|
|
7
|
+
* @module ResultBuilder
|
|
8
|
+
*/
|
|
9
|
+
import type { ValidationResult, ValidationErrorDetail } from '../types';
|
|
10
|
+
/**
|
|
11
|
+
* Build a successful validation result
|
|
12
|
+
*
|
|
13
|
+
* @param validationErrors - Array of validation errors (should be empty for success)
|
|
14
|
+
* @param schemaFormat - Format of the schema that was validated
|
|
15
|
+
* @param validationTime - Time taken for validation in milliseconds
|
|
16
|
+
* @param schema - The processed schema object
|
|
17
|
+
* @returns Complete validation result object
|
|
18
|
+
*/
|
|
19
|
+
export declare function buildValidationResult(validationErrors: ValidationErrorDetail[], schemaFormat: ValidationResult['schemaFormat'], validationTime: number, schema?: object): ValidationResult;
|
|
20
|
+
/**
|
|
21
|
+
* Build an error validation result for when validation setup fails
|
|
22
|
+
*
|
|
23
|
+
* @param error - The error that occurred during validation setup
|
|
24
|
+
* @param schemaFormat - Format of the schema that was being validated
|
|
25
|
+
* @param validationTime - Time taken before the error occurred
|
|
26
|
+
* @returns Complete validation result object with error information
|
|
27
|
+
*/
|
|
28
|
+
export declare function buildErrorResult(error: unknown, schemaFormat: ValidationResult['schemaFormat'], validationTime: number): ValidationResult;
|
|
29
|
+
/**
|
|
30
|
+
* Create a validation error object with consistent formatting
|
|
31
|
+
*
|
|
32
|
+
* @param path - JSON path to the invalid property
|
|
33
|
+
* @param message - Human-readable error message
|
|
34
|
+
* @param expected - Expected value or type
|
|
35
|
+
* @param actual - Actual value or type that failed validation
|
|
36
|
+
* @returns Formatted validation error object
|
|
37
|
+
*/
|
|
38
|
+
export declare function createValidationError(path: string, message: string, expected: unknown, actual: unknown): ValidationErrorDetail;
|
|
39
|
+
/**
|
|
40
|
+
* Format validation time with appropriate units
|
|
41
|
+
*
|
|
42
|
+
* @param milliseconds - Time in milliseconds
|
|
43
|
+
* @returns Formatted time string with units
|
|
44
|
+
*/
|
|
45
|
+
export declare function formatValidationTime(milliseconds: number): string;
|
|
46
|
+
/**
|
|
47
|
+
* Generate UI-friendly status icon based on validation result
|
|
48
|
+
*
|
|
49
|
+
* @param success - Whether validation was successful
|
|
50
|
+
* @param hasWarnings - Whether there are warnings (future use)
|
|
51
|
+
* @returns Appropriate status icon
|
|
52
|
+
*/
|
|
53
|
+
export declare function getStatusIcon(success: boolean, hasWarnings?: boolean): string;
|
|
54
|
+
/**
|
|
55
|
+
* Generate a summary of validation errors for UI display
|
|
56
|
+
*
|
|
57
|
+
* @param errors - Array of validation errors
|
|
58
|
+
* @param maxErrors - Maximum number of errors to include in summary
|
|
59
|
+
* @returns Array of formatted error strings for UI display
|
|
60
|
+
*/
|
|
61
|
+
export declare function summarizeErrors(errors: ValidationErrorDetail[], maxErrors?: number): string[];
|
|
62
|
+
//# sourceMappingURL=result-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result-builder.d.ts","sourceRoot":"","sources":["../../../../../src/api-request/schema-validation/internal/result-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAIvE;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,gBAAgB,EAAE,qBAAqB,EAAE,EACzC,YAAY,EAAE,gBAAgB,CAAC,cAAc,CAAC,EAC9C,cAAc,EAAE,MAAM,EACtB,MAAM,CAAC,EAAE,MAAM,GACd,gBAAgB,CAuBlB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,OAAO,EACd,YAAY,EAAE,gBAAgB,CAAC,cAAc,CAAC,EAC9C,cAAc,EAAE,MAAM,GACrB,gBAAgB,CAyBlB;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,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAMjE;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,UAAQ,GAAG,MAAM,CAK3E;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,qBAAqB,EAAE,EAC/B,SAAS,SAAK,GACb,MAAM,EAAE,CAUV"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Safe Error Serialization Utility
|
|
3
|
+
*
|
|
4
|
+
* Provides defensive error serialization that handles all edge cases:
|
|
5
|
+
* - String messages (normal case)
|
|
6
|
+
* - Symbol values (error case)
|
|
7
|
+
* - Undefined/null values
|
|
8
|
+
* - Objects that need JSON stringification
|
|
9
|
+
* - Circular references
|
|
10
|
+
* - Functions and other non-serializable types
|
|
11
|
+
*
|
|
12
|
+
* This utility ensures error serialization never throws and preserves
|
|
13
|
+
* as much error context as possible.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Safely serialize any value to a string, handling all edge cases
|
|
17
|
+
*
|
|
18
|
+
* @param value - The value to serialize
|
|
19
|
+
* @param fallbackPrefix - Prefix for fallback messages
|
|
20
|
+
* @returns A safe string representation
|
|
21
|
+
*/
|
|
22
|
+
export declare function safeStringify(value: unknown, fallbackPrefix?: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Safely extract and serialize error messages from validation errors
|
|
25
|
+
*
|
|
26
|
+
* @param errors - Array of validation errors that may contain Symbol values
|
|
27
|
+
* @param maxLength - Maximum length of the combined error message
|
|
28
|
+
* @returns Safe string representation of all error messages
|
|
29
|
+
*/
|
|
30
|
+
export declare function safeErrorMessage(errors: Array<{
|
|
31
|
+
message?: unknown;
|
|
32
|
+
path?: unknown;
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
}>, maxLength?: number): string;
|
|
35
|
+
/**
|
|
36
|
+
* Create a safe error message for ValidationError constructor
|
|
37
|
+
*
|
|
38
|
+
* @param errors - Array of validation errors
|
|
39
|
+
* @param context - Additional context for the error
|
|
40
|
+
* @returns Safe error message string
|
|
41
|
+
*/
|
|
42
|
+
export declare function createValidationErrorMessage(errors: Array<{
|
|
43
|
+
message?: unknown;
|
|
44
|
+
path?: unknown;
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
}>, context?: string): string;
|
|
47
|
+
/**
|
|
48
|
+
* Safe utility to extract error details for UI display
|
|
49
|
+
*
|
|
50
|
+
* @param errors - Array of validation errors
|
|
51
|
+
* @returns Array of safe string representations
|
|
52
|
+
*/
|
|
53
|
+
export declare function safeErrorDetails(errors: Array<{
|
|
54
|
+
message?: unknown;
|
|
55
|
+
path?: unknown;
|
|
56
|
+
[key: string]: unknown;
|
|
57
|
+
}>): string[];
|
|
58
|
+
//# sourceMappingURL=safe-error-serializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe-error-serializer.d.ts","sourceRoot":"","sources":["../../../../../src/api-request/schema-validation/internal/safe-error-serializer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAiFH;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,OAAO,EACd,cAAc,SAAqB,GAClC,MAAM,CAwBR;AAKD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,KAAK,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC,EAC5E,SAAS,SAAO,GACf,MAAM,CAyCR;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,KAAK,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC,EAC5E,OAAO,CAAC,EAAE,MAAM,GACf,MAAM,CAUR;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,KAAK,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC,GAC3E,MAAM,EAAE,CAkBV"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema Processing Strategies
|
|
3
|
+
*
|
|
4
|
+
* This module implements the Strategy pattern for processing different schema formats.
|
|
5
|
+
* Each processor handles a specific schema type and validation logic.
|
|
6
|
+
*
|
|
7
|
+
* @module SchemaProcessors
|
|
8
|
+
*/
|
|
9
|
+
import type { ValidationErrorDetail, SupportedSchema } from '../types';
|
|
10
|
+
/**
|
|
11
|
+
* Common options for schema processing
|
|
12
|
+
*/
|
|
13
|
+
export interface SchemaProcessingOptions {
|
|
14
|
+
shape?: unknown;
|
|
15
|
+
path?: string;
|
|
16
|
+
endpoint?: string;
|
|
17
|
+
method?: string;
|
|
18
|
+
status?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Result of schema processing
|
|
22
|
+
*/
|
|
23
|
+
export interface SchemaProcessingResult {
|
|
24
|
+
validationErrors: ValidationErrorDetail[];
|
|
25
|
+
processedSchema: object;
|
|
26
|
+
schemaForResult?: object;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Base interface for schema processors
|
|
30
|
+
*/
|
|
31
|
+
export interface SchemaProcessor {
|
|
32
|
+
validate(data: unknown, schema: SupportedSchema, options: SchemaProcessingOptions): Promise<SchemaProcessingResult>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Convenience function to process any schema type
|
|
36
|
+
*/
|
|
37
|
+
export declare function processSchema(data: unknown, schema: SupportedSchema, schemaFormat: string, options?: SchemaProcessingOptions): Promise<SchemaProcessingResult>;
|
|
38
|
+
//# sourceMappingURL=schema-processors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-processors.d.ts","sourceRoot":"","sources":["../../../../../src/api-request/schema-validation/internal/schema-processors.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAKtE;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,EAAE,qBAAqB,EAAE,CAAA;IACzC,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAOD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CACN,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,sBAAsB,CAAC,CAAA;CACnC;AAuYD;;GAEG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,eAAe,EACvB,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,sBAAsB,CAAC,CAcjC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shape Validation Engine
|
|
3
|
+
*
|
|
4
|
+
* This module provides advanced shape validation capabilities for API responses,
|
|
5
|
+
* allowing flexible validation patterns including nested objects, functions, and
|
|
6
|
+
* direct value comparisons.
|
|
7
|
+
*
|
|
8
|
+
* @module ShapeValidator
|
|
9
|
+
*/
|
|
10
|
+
import type { ValidationErrorDetail, ShapeAssertion } from '../types';
|
|
11
|
+
/**
|
|
12
|
+
* Execute shape validation assertions against data
|
|
13
|
+
*
|
|
14
|
+
* Shape validation provides a flexible way to validate data structure and values
|
|
15
|
+
* without requiring formal schemas. It supports:
|
|
16
|
+
* - Direct value comparisons
|
|
17
|
+
* - Function-based validators
|
|
18
|
+
* - Nested object validation
|
|
19
|
+
* - Custom validation logic
|
|
20
|
+
*
|
|
21
|
+
* @param data - Data to validate against shape assertions
|
|
22
|
+
* @param shapeAssertion - Shape validation rules
|
|
23
|
+
* @param basePath - Base path for error reporting (used internally for nesting)
|
|
24
|
+
* @returns Array of validation errors (empty if valid)
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* // Direct value validation
|
|
29
|
+
* const errors = await validateShape(
|
|
30
|
+
* { status: 200, name: "test" },
|
|
31
|
+
* { status: 200, name: (value) => typeof value === 'string' }
|
|
32
|
+
* )
|
|
33
|
+
*
|
|
34
|
+
* // Nested validation
|
|
35
|
+
* const errors = await validateShape(
|
|
36
|
+
* { user: { id: 123, name: "John" } },
|
|
37
|
+
* { user: { id: 123, name: (value) => value.length > 0 } }
|
|
38
|
+
* )
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function validateShape(data: unknown, shapeAssertion: ShapeAssertion, basePath?: string): Promise<ValidationErrorDetail[]>;
|
|
42
|
+
/**
|
|
43
|
+
* Create a shape validator function for common validation patterns
|
|
44
|
+
*
|
|
45
|
+
* @param validatorFn - Function that returns true if value is valid
|
|
46
|
+
* @param errorMessage - Custom error message for validation failures
|
|
47
|
+
* @returns Shape validator function
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```typescript
|
|
51
|
+
* const emailValidator = createShapeValidator(
|
|
52
|
+
* (value) => typeof value === 'string' && value.includes('@'),
|
|
53
|
+
* 'Must be a valid email address'
|
|
54
|
+
* )
|
|
55
|
+
*
|
|
56
|
+
* const errors = await validateShape(
|
|
57
|
+
* { email: 'invalid-email' },
|
|
58
|
+
* { email: emailValidator }
|
|
59
|
+
* )
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export declare function createShapeValidator(validatorFn: (value: unknown) => boolean, errorMessage: string): (value: unknown) => boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Common shape validators for typical validation scenarios
|
|
65
|
+
*/
|
|
66
|
+
export declare const ShapeValidators: {
|
|
67
|
+
/**
|
|
68
|
+
* Validates that a value is a non-empty string
|
|
69
|
+
*/
|
|
70
|
+
readonly nonEmptyString: (value: unknown) => boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Validates that a value is a positive number
|
|
73
|
+
*/
|
|
74
|
+
readonly positiveNumber: (value: unknown) => boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Validates that a value is a non-empty array
|
|
77
|
+
*/
|
|
78
|
+
readonly nonEmptyArray: (value: unknown) => boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Validates that a value exists (not null or undefined)
|
|
81
|
+
*/
|
|
82
|
+
readonly exists: (value: unknown) => value is {};
|
|
83
|
+
/**
|
|
84
|
+
* Creates a validator for string length constraints
|
|
85
|
+
*/
|
|
86
|
+
readonly stringLength: (min: number, max?: number) => (value: unknown) => boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Creates a validator for numeric range constraints
|
|
89
|
+
*/
|
|
90
|
+
readonly numberRange: (min: number, max: number) => (value: unknown) => boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Creates a validator that checks if value matches one of the allowed values
|
|
93
|
+
*/
|
|
94
|
+
readonly oneOf: <T>(...allowedValues: T[]) => (value: unknown) => value is T;
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=shape-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shape-validator.d.ts","sourceRoot":"","sources":["../../../../../src/api-request/schema-validation/internal/shape-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,OAAO,EACb,cAAc,EAAE,cAAc,EAC9B,QAAQ,SAAK,GACZ,OAAO,CAAC,qBAAqB,EAAE,CAAC,CA+DlC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,EACxC,YAAY,EAAE,MAAM,GACnB,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAQ7B;AAED;;GAEG;AACH,eAAO,MAAM,eAAe;IAC1B;;OAEG;qCACqB,OAAO;IAG/B;;OAEG;qCACqB,OAAO;IAE/B;;OAEG;oCACoB,OAAO;IAE9B;;OAEG;6BACa,OAAO;IAEvB;;OAEG;iCACiB,MAAM,QAAQ,MAAM,aAAa,OAAO;IAO5D;;OAEG;gCACgB,MAAM,OAAO,MAAM,aAAa,OAAO;IAK1D;;OAEG;qBAEA,CAAC,oBAAoB,CAAC,EAAE,aACjB,OAAO,KAAG,KAAK,IAAI,CAAC;CAGtB,CAAA"}
|
|
@@ -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,92 @@
|
|
|
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,oBAAoB;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,gCAAgC;AAChC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,gCAAgC;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,mDAAmD;IACnD,MAAM,EAAE,qBAAqB,EAAE,CAAA;IAC/B,kCAAkC;IAClC,YAAY,EAAE,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,cAAc,CAAA;IAC5E,gDAAgD;IAChD,cAAc,EAAE,MAAM,CAAA;IACtB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,2CAA2C;IAC3C,MAAM,CAAC,EAAE;QACP,UAAU,EAAE,GAAG,GAAG,GAAG,CAAA;QACrB,iBAAiB,EAAE,MAAM,CAAA;QACzB,UAAU,EAAE,MAAM,CAAA;QAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;KACxB,CAAA;CACF,CAAA;AAED,mDAAmD;AACnD,MAAM,MAAM,oBAAoB,CAAC,CAAC,GAAG,OAAO,IAAI,kBAAkB,CAAC,CAAC,CAAC,GAAG;IACtE,gCAAgC;IAChC,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,0CAA0C;IAC1C,gBAAgB,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAA;CACxC,CAAA;AAED,2DAA2D;AAC3D,qBAAa,eAAgB,SAAQ,KAAK;aAGtB,gBAAgB,EAAE,gBAAgB;aAClC,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;aACe,eAAe,CAAC,EAAE;QAChC,MAAM,EAAE,MAAM,CAAA;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,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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility to apply user authentication to a browser context
|
|
3
|
+
*
|
|
4
|
+
* This utility takes a user's token and applies it to a browser context
|
|
5
|
+
* without persisting it to disk, making it ideal for ephemeral test users.
|
|
6
|
+
*/
|
|
7
|
+
import type { BrowserContext } from '@playwright/test';
|
|
8
|
+
/**
|
|
9
|
+
* Apply a user's authentication token to a browser context
|
|
10
|
+
* Uses the auth provider to extract and apply cookies to a browser context
|
|
11
|
+
*
|
|
12
|
+
* @param context The browser context to apply the auth token to
|
|
13
|
+
* @param tokenData The storage state object or user data containing the token
|
|
14
|
+
* @returns The context with auth applied
|
|
15
|
+
*/
|
|
16
|
+
export declare function applyUserCookiesToBrowserContext(context: BrowserContext, tokenData: Record<string, unknown>): Promise<BrowserContext>;
|
|
17
|
+
//# sourceMappingURL=apply-user-cookies-to-browser-context.d.ts.map
|