@inluxc/propmaster 0.0.0-stage → 1.0.1
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 +696 -2
- package/dist/src/annotations/index.d.ts +11 -0
- package/dist/src/annotations/index.d.ts.map +1 -0
- package/dist/src/annotations/index.js +11 -0
- package/dist/src/annotations/index.js.map +1 -0
- package/dist/src/annotations/recorder.d.ts +57 -0
- package/dist/src/annotations/recorder.d.ts.map +1 -0
- package/dist/src/annotations/recorder.js +100 -0
- package/dist/src/annotations/recorder.js.map +1 -0
- package/dist/src/annotations/truncation.d.ts +34 -0
- package/dist/src/annotations/truncation.d.ts.map +1 -0
- package/dist/src/annotations/truncation.js +54 -0
- package/dist/src/annotations/truncation.js.map +1 -0
- package/dist/src/auth/apply.d.ts +15 -0
- package/dist/src/auth/apply.d.ts.map +1 -0
- package/dist/src/auth/apply.js +21 -0
- package/dist/src/auth/apply.js.map +1 -0
- package/dist/src/auth/setup.d.ts +56 -0
- package/dist/src/auth/setup.d.ts.map +1 -0
- package/dist/src/auth/setup.js +79 -0
- package/dist/src/auth/setup.js.map +1 -0
- package/dist/src/auth/state-file.d.ts +8 -0
- package/dist/src/auth/state-file.d.ts.map +1 -0
- package/dist/src/auth/state-file.js +13 -0
- package/dist/src/auth/state-file.js.map +1 -0
- package/dist/src/auth/token-manager.d.ts +61 -0
- package/dist/src/auth/token-manager.d.ts.map +1 -0
- package/dist/src/auth/token-manager.js +200 -0
- package/dist/src/auth/token-manager.js.map +1 -0
- package/dist/src/cli/banner.d.ts +23 -0
- package/dist/src/cli/banner.d.ts.map +1 -0
- package/dist/src/cli/banner.js +67 -0
- package/dist/src/cli/banner.js.map +1 -0
- package/dist/src/cli/check-tests.d.ts +143 -0
- package/dist/src/cli/check-tests.d.ts.map +1 -0
- package/dist/src/cli/check-tests.js +541 -0
- package/dist/src/cli/check-tests.js.map +1 -0
- package/dist/src/cli/coverage.d.ts +14 -0
- package/dist/src/cli/coverage.d.ts.map +1 -0
- package/dist/src/cli/coverage.js +97 -0
- package/dist/src/cli/coverage.js.map +1 -0
- package/dist/src/cli/doctor.d.ts +82 -0
- package/dist/src/cli/doctor.d.ts.map +1 -0
- package/dist/src/cli/doctor.js +656 -0
- package/dist/src/cli/doctor.js.map +1 -0
- package/dist/src/cli/env.d.ts +76 -0
- package/dist/src/cli/env.d.ts.map +1 -0
- package/dist/src/cli/env.js +344 -0
- package/dist/src/cli/env.js.map +1 -0
- package/dist/src/cli/failures.d.ts +29 -0
- package/dist/src/cli/failures.d.ts.map +1 -0
- package/dist/src/cli/failures.js +114 -0
- package/dist/src/cli/failures.js.map +1 -0
- package/dist/src/cli/fixture-catalog.d.ts +83 -0
- package/dist/src/cli/fixture-catalog.d.ts.map +1 -0
- package/dist/src/cli/fixture-catalog.js +773 -0
- package/dist/src/cli/fixture-catalog.js.map +1 -0
- package/dist/src/cli/fixture.d.ts +149 -0
- package/dist/src/cli/fixture.d.ts.map +1 -0
- package/dist/src/cli/fixture.js +742 -0
- package/dist/src/cli/fixture.js.map +1 -0
- package/dist/src/cli/flaky.d.ts +25 -0
- package/dist/src/cli/flaky.d.ts.map +1 -0
- package/dist/src/cli/flaky.js +96 -0
- package/dist/src/cli/flaky.js.map +1 -0
- package/dist/src/cli/generate.d.ts +37 -0
- package/dist/src/cli/generate.d.ts.map +1 -0
- package/dist/src/cli/generate.js +230 -0
- package/dist/src/cli/generate.js.map +1 -0
- package/dist/src/cli/init.d.ts +36 -0
- package/dist/src/cli/init.d.ts.map +1 -0
- package/dist/src/cli/init.js +1039 -0
- package/dist/src/cli/init.js.map +1 -0
- package/dist/src/cli/json-edit.d.ts +58 -0
- package/dist/src/cli/json-edit.d.ts.map +1 -0
- package/dist/src/cli/json-edit.js +250 -0
- package/dist/src/cli/json-edit.js.map +1 -0
- package/dist/src/cli/layout.d.ts +31 -0
- package/dist/src/cli/layout.d.ts.map +1 -0
- package/dist/src/cli/layout.js +175 -0
- package/dist/src/cli/layout.js.map +1 -0
- package/dist/src/cli/mcp-setup.d.ts +141 -0
- package/dist/src/cli/mcp-setup.d.ts.map +1 -0
- package/dist/src/cli/mcp-setup.js +548 -0
- package/dist/src/cli/mcp-setup.js.map +1 -0
- package/dist/src/cli/organize.d.ts +136 -0
- package/dist/src/cli/organize.d.ts.map +1 -0
- package/dist/src/cli/organize.js +467 -0
- package/dist/src/cli/organize.js.map +1 -0
- package/dist/src/cli/prompts.d.ts +102 -0
- package/dist/src/cli/prompts.d.ts.map +1 -0
- package/dist/src/cli/prompts.js +346 -0
- package/dist/src/cli/prompts.js.map +1 -0
- package/dist/src/cli/standards.d.ts +160 -0
- package/dist/src/cli/standards.d.ts.map +1 -0
- package/dist/src/cli/standards.js +389 -0
- package/dist/src/cli/standards.js.map +1 -0
- package/dist/src/cli/style.d.ts +28 -0
- package/dist/src/cli/style.d.ts.map +1 -0
- package/dist/src/cli/style.js +57 -0
- package/dist/src/cli/style.js.map +1 -0
- package/dist/src/config/env-loader.d.ts +33 -0
- package/dist/src/config/env-loader.d.ts.map +1 -0
- package/dist/src/config/env-loader.js +72 -0
- package/dist/src/config/env-loader.js.map +1 -0
- package/dist/src/config/index.d.ts +10 -0
- package/dist/src/config/index.d.ts.map +1 -0
- package/dist/src/config/index.js +10 -0
- package/dist/src/config/index.js.map +1 -0
- package/dist/src/config/loader.d.ts +66 -0
- package/dist/src/config/loader.d.ts.map +1 -0
- package/dist/src/config/loader.js +810 -0
- package/dist/src/config/loader.js.map +1 -0
- package/dist/src/config/schema.d.ts +596 -0
- package/dist/src/config/schema.d.ts.map +1 -0
- package/dist/src/config/schema.js +9 -0
- package/dist/src/config/schema.js.map +1 -0
- package/dist/src/containers/container-manager.d.ts +157 -0
- package/dist/src/containers/container-manager.d.ts.map +1 -0
- package/dist/src/containers/container-manager.js +627 -0
- package/dist/src/containers/container-manager.js.map +1 -0
- package/dist/src/coverage/code-coverage.d.ts +89 -0
- package/dist/src/coverage/code-coverage.d.ts.map +1 -0
- package/dist/src/coverage/code-coverage.js +395 -0
- package/dist/src/coverage/code-coverage.js.map +1 -0
- package/dist/src/coverage/inventory.d.ts +80 -0
- package/dist/src/coverage/inventory.d.ts.map +1 -0
- package/dist/src/coverage/inventory.js +417 -0
- package/dist/src/coverage/inventory.js.map +1 -0
- package/dist/src/coverage/languages.d.ts +34 -0
- package/dist/src/coverage/languages.d.ts.map +1 -0
- package/dist/src/coverage/languages.js +156 -0
- package/dist/src/coverage/languages.js.map +1 -0
- package/dist/src/coverage/report.d.ts +128 -0
- package/dist/src/coverage/report.d.ts.map +1 -0
- package/dist/src/coverage/report.js +472 -0
- package/dist/src/coverage/report.js.map +1 -0
- package/dist/src/errors.d.ts +164 -0
- package/dist/src/errors.d.ts.map +1 -0
- package/dist/src/errors.js +267 -0
- package/dist/src/errors.js.map +1 -0
- package/dist/src/fixtures/amqp.fixture.d.ts +163 -0
- package/dist/src/fixtures/amqp.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/amqp.fixture.js +494 -0
- package/dist/src/fixtures/amqp.fixture.js.map +1 -0
- package/dist/src/fixtures/appium.fixture.d.ts +112 -0
- package/dist/src/fixtures/appium.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/appium.fixture.js +309 -0
- package/dist/src/fixtures/appium.fixture.js.map +1 -0
- package/dist/src/fixtures/aws.d.ts +44 -0
- package/dist/src/fixtures/aws.d.ts.map +1 -0
- package/dist/src/fixtures/aws.js +93 -0
- package/dist/src/fixtures/aws.js.map +1 -0
- package/dist/src/fixtures/cassandra.fixture.d.ts +179 -0
- package/dist/src/fixtures/cassandra.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/cassandra.fixture.js +489 -0
- package/dist/src/fixtures/cassandra.fixture.js.map +1 -0
- package/dist/src/fixtures/clickhouse.fixture.d.ts +171 -0
- package/dist/src/fixtures/clickhouse.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/clickhouse.fixture.js +514 -0
- package/dist/src/fixtures/clickhouse.fixture.js.map +1 -0
- package/dist/src/fixtures/database.fixture.d.ts +63 -0
- package/dist/src/fixtures/database.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/database.fixture.js +407 -0
- package/dist/src/fixtures/database.fixture.js.map +1 -0
- package/dist/src/fixtures/dynamodb.fixture.d.ts +243 -0
- package/dist/src/fixtures/dynamodb.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/dynamodb.fixture.js +580 -0
- package/dist/src/fixtures/dynamodb.fixture.js.map +1 -0
- package/dist/src/fixtures/graphql.fixture.d.ts +107 -0
- package/dist/src/fixtures/graphql.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/graphql.fixture.js +158 -0
- package/dist/src/fixtures/graphql.fixture.js.map +1 -0
- package/dist/src/fixtures/grpc.fixture.d.ts +167 -0
- package/dist/src/fixtures/grpc.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/grpc.fixture.js +635 -0
- package/dist/src/fixtures/grpc.fixture.js.map +1 -0
- package/dist/src/fixtures/inbox.fixture.d.ts +136 -0
- package/dist/src/fixtures/inbox.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/inbox.fixture.js +239 -0
- package/dist/src/fixtures/inbox.fixture.js.map +1 -0
- package/dist/src/fixtures/index.d.ts +174 -0
- package/dist/src/fixtures/index.d.ts.map +1 -0
- package/dist/src/fixtures/index.js +379 -0
- package/dist/src/fixtures/index.js.map +1 -0
- package/dist/src/fixtures/kafka-driver.d.ts +108 -0
- package/dist/src/fixtures/kafka-driver.d.ts.map +1 -0
- package/dist/src/fixtures/kafka-driver.js +113 -0
- package/dist/src/fixtures/kafka-driver.js.map +1 -0
- package/dist/src/fixtures/kafka.fixture.d.ts +75 -0
- package/dist/src/fixtures/kafka.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/kafka.fixture.js +188 -0
- package/dist/src/fixtures/kafka.fixture.js.map +1 -0
- package/dist/src/fixtures/mock-server.fixture.d.ts +142 -0
- package/dist/src/fixtures/mock-server.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/mock-server.fixture.js +271 -0
- package/dist/src/fixtures/mock-server.fixture.js.map +1 -0
- package/dist/src/fixtures/mongodb.fixture.d.ts +121 -0
- package/dist/src/fixtures/mongodb.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/mongodb.fixture.js +258 -0
- package/dist/src/fixtures/mongodb.fixture.js.map +1 -0
- package/dist/src/fixtures/neo4j.fixture.d.ts +72 -0
- package/dist/src/fixtures/neo4j.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/neo4j.fixture.js +202 -0
- package/dist/src/fixtures/neo4j.fixture.js.map +1 -0
- package/dist/src/fixtures/openapi.fixture.d.ts +101 -0
- package/dist/src/fixtures/openapi.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/openapi.fixture.js +266 -0
- package/dist/src/fixtures/openapi.fixture.js.map +1 -0
- package/dist/src/fixtures/optional-package.d.ts +54 -0
- package/dist/src/fixtures/optional-package.d.ts.map +1 -0
- package/dist/src/fixtures/optional-package.js +79 -0
- package/dist/src/fixtures/optional-package.js.map +1 -0
- package/dist/src/fixtures/otp.fixture.d.ts +60 -0
- package/dist/src/fixtures/otp.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/otp.fixture.js +101 -0
- package/dist/src/fixtures/otp.fixture.js.map +1 -0
- package/dist/src/fixtures/realtime.fixture.d.ts +205 -0
- package/dist/src/fixtures/realtime.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/realtime.fixture.js +606 -0
- package/dist/src/fixtures/realtime.fixture.js.map +1 -0
- package/dist/src/fixtures/redis.fixture.d.ts +55 -0
- package/dist/src/fixtures/redis.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/redis.fixture.js +209 -0
- package/dist/src/fixtures/redis.fixture.js.map +1 -0
- package/dist/src/fixtures/s3.fixture.d.ts +126 -0
- package/dist/src/fixtures/s3.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/s3.fixture.js +296 -0
- package/dist/src/fixtures/s3.fixture.js.map +1 -0
- package/dist/src/fixtures/search.fixture.d.ts +178 -0
- package/dist/src/fixtures/search.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/search.fixture.js +472 -0
- package/dist/src/fixtures/search.fixture.js.map +1 -0
- package/dist/src/fixtures/sqs.fixture.d.ts +172 -0
- package/dist/src/fixtures/sqs.fixture.d.ts.map +1 -0
- package/dist/src/fixtures/sqs.fixture.js +428 -0
- package/dist/src/fixtures/sqs.fixture.js.map +1 -0
- package/dist/src/index.d.ts +43 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +48 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/mcp/guards.d.ts +21 -0
- package/dist/src/mcp/guards.d.ts.map +1 -0
- package/dist/src/mcp/guards.js +118 -0
- package/dist/src/mcp/guards.js.map +1 -0
- package/dist/src/mcp/project-tools.d.ts +14 -0
- package/dist/src/mcp/project-tools.d.ts.map +1 -0
- package/dist/src/mcp/project-tools.js +252 -0
- package/dist/src/mcp/project-tools.js.map +1 -0
- package/dist/src/mcp/protocol.d.ts +116 -0
- package/dist/src/mcp/protocol.d.ts.map +1 -0
- package/dist/src/mcp/protocol.js +199 -0
- package/dist/src/mcp/protocol.js.map +1 -0
- package/dist/src/mcp/server.d.ts +43 -0
- package/dist/src/mcp/server.d.ts.map +1 -0
- package/dist/src/mcp/server.js +244 -0
- package/dist/src/mcp/server.js.map +1 -0
- package/dist/src/mcp/test-tools.d.ts +65 -0
- package/dist/src/mcp/test-tools.d.ts.map +1 -0
- package/dist/src/mcp/test-tools.js +380 -0
- package/dist/src/mcp/test-tools.js.map +1 -0
- package/dist/src/mcp/tools.d.ts +49 -0
- package/dist/src/mcp/tools.d.ts.map +1 -0
- package/dist/src/mcp/tools.js +726 -0
- package/dist/src/mcp/tools.js.map +1 -0
- package/dist/src/network-error.d.ts +11 -0
- package/dist/src/network-error.d.ts.map +1 -0
- package/dist/src/network-error.js +34 -0
- package/dist/src/network-error.js.map +1 -0
- package/dist/src/openapi/contract.d.ts +98 -0
- package/dist/src/openapi/contract.d.ts.map +1 -0
- package/dist/src/openapi/contract.js +407 -0
- package/dist/src/openapi/contract.js.map +1 -0
- package/dist/src/openapi/generate.d.ts +89 -0
- package/dist/src/openapi/generate.d.ts.map +1 -0
- package/dist/src/openapi/generate.js +607 -0
- package/dist/src/openapi/generate.js.map +1 -0
- package/dist/src/openapi/load.d.ts +8 -0
- package/dist/src/openapi/load.d.ts.map +1 -0
- package/dist/src/openapi/load.js +26 -0
- package/dist/src/openapi/load.js.map +1 -0
- package/dist/src/package-manager.d.ts +58 -0
- package/dist/src/package-manager.d.ts.map +1 -0
- package/dist/src/package-manager.js +137 -0
- package/dist/src/package-manager.js.map +1 -0
- package/dist/src/reporter/history.d.ts +85 -0
- package/dist/src/reporter/history.d.ts.map +1 -0
- package/dist/src/reporter/history.js +147 -0
- package/dist/src/reporter/history.js.map +1 -0
- package/dist/src/reporter/index.d.ts +59 -0
- package/dist/src/reporter/index.d.ts.map +1 -0
- package/dist/src/reporter/index.js +201 -0
- package/dist/src/reporter/index.js.map +1 -0
- package/dist/src/reporter/last-run.d.ts +88 -0
- package/dist/src/reporter/last-run.d.ts.map +1 -0
- package/dist/src/reporter/last-run.js +133 -0
- package/dist/src/reporter/last-run.js.map +1 -0
- package/dist/src/reporter/quarantine.d.ts +62 -0
- package/dist/src/reporter/quarantine.d.ts.map +1 -0
- package/dist/src/reporter/quarantine.js +148 -0
- package/dist/src/reporter/quarantine.js.map +1 -0
- package/dist/src/secrets/index.d.ts +4 -0
- package/dist/src/secrets/index.d.ts.map +1 -0
- package/dist/src/secrets/index.js +3 -0
- package/dist/src/secrets/index.js.map +1 -0
- package/dist/src/secrets/provider.interface.d.ts +30 -0
- package/dist/src/secrets/provider.interface.d.ts.map +1 -0
- package/dist/src/secrets/provider.interface.js +2 -0
- package/dist/src/secrets/provider.interface.js.map +1 -0
- package/dist/src/secrets/providers/aws.provider.d.ts +33 -0
- package/dist/src/secrets/providers/aws.provider.d.ts.map +1 -0
- package/dist/src/secrets/providers/aws.provider.js +88 -0
- package/dist/src/secrets/providers/aws.provider.js.map +1 -0
- package/dist/src/secrets/providers/azure.provider.d.ts +26 -0
- package/dist/src/secrets/providers/azure.provider.d.ts.map +1 -0
- package/dist/src/secrets/providers/azure.provider.js +71 -0
- package/dist/src/secrets/providers/azure.provider.js.map +1 -0
- package/dist/src/secrets/providers/env-file.provider.d.ts +29 -0
- package/dist/src/secrets/providers/env-file.provider.d.ts.map +1 -0
- package/dist/src/secrets/providers/env-file.provider.js +56 -0
- package/dist/src/secrets/providers/env-file.provider.js.map +1 -0
- package/dist/src/secrets/providers/gitlab.provider.d.ts +26 -0
- package/dist/src/secrets/providers/gitlab.provider.d.ts.map +1 -0
- package/dist/src/secrets/providers/gitlab.provider.js +67 -0
- package/dist/src/secrets/providers/gitlab.provider.js.map +1 -0
- package/dist/src/secrets/providers/index.d.ts +52 -0
- package/dist/src/secrets/providers/index.d.ts.map +1 -0
- package/dist/src/secrets/providers/index.js +81 -0
- package/dist/src/secrets/providers/index.js.map +1 -0
- package/dist/src/secrets/providers/openbao.provider.d.ts +28 -0
- package/dist/src/secrets/providers/openbao.provider.d.ts.map +1 -0
- package/dist/src/secrets/providers/openbao.provider.js +29 -0
- package/dist/src/secrets/providers/openbao.provider.js.map +1 -0
- package/dist/src/secrets/providers/vault-compatible.d.ts +140 -0
- package/dist/src/secrets/providers/vault-compatible.d.ts.map +1 -0
- package/dist/src/secrets/providers/vault-compatible.js +405 -0
- package/dist/src/secrets/providers/vault-compatible.js.map +1 -0
- package/dist/src/secrets/providers/vault.provider.d.ts +27 -0
- package/dist/src/secrets/providers/vault.provider.d.ts.map +1 -0
- package/dist/src/secrets/providers/vault.provider.js +23 -0
- package/dist/src/secrets/providers/vault.provider.js.map +1 -0
- package/dist/src/secrets/secrets-manager.d.ts +67 -0
- package/dist/src/secrets/secrets-manager.d.ts.map +1 -0
- package/dist/src/secrets/secrets-manager.js +255 -0
- package/dist/src/secrets/secrets-manager.js.map +1 -0
- package/dist/src/steps/amqp.steps.d.ts +37 -0
- package/dist/src/steps/amqp.steps.d.ts.map +1 -0
- package/dist/src/steps/amqp.steps.js +86 -0
- package/dist/src/steps/amqp.steps.js.map +1 -0
- package/dist/src/steps/appium.steps.d.ts +53 -0
- package/dist/src/steps/appium.steps.d.ts.map +1 -0
- package/dist/src/steps/appium.steps.js +109 -0
- package/dist/src/steps/appium.steps.js.map +1 -0
- package/dist/src/steps/aws.steps.d.ts +47 -0
- package/dist/src/steps/aws.steps.d.ts.map +1 -0
- package/dist/src/steps/aws.steps.js +116 -0
- package/dist/src/steps/aws.steps.js.map +1 -0
- package/dist/src/steps/browser.steps.d.ts +54 -0
- package/dist/src/steps/browser.steps.d.ts.map +1 -0
- package/dist/src/steps/browser.steps.js +102 -0
- package/dist/src/steps/browser.steps.js.map +1 -0
- package/dist/src/steps/cassandra.steps.d.ts +32 -0
- package/dist/src/steps/cassandra.steps.d.ts.map +1 -0
- package/dist/src/steps/cassandra.steps.js +81 -0
- package/dist/src/steps/cassandra.steps.js.map +1 -0
- package/dist/src/steps/clickhouse.steps.d.ts +30 -0
- package/dist/src/steps/clickhouse.steps.d.ts.map +1 -0
- package/dist/src/steps/clickhouse.steps.js +73 -0
- package/dist/src/steps/clickhouse.steps.js.map +1 -0
- package/dist/src/steps/database.steps.d.ts +43 -0
- package/dist/src/steps/database.steps.d.ts.map +1 -0
- package/dist/src/steps/database.steps.js +79 -0
- package/dist/src/steps/database.steps.js.map +1 -0
- package/dist/src/steps/dynamodb.steps.d.ts +32 -0
- package/dist/src/steps/dynamodb.steps.d.ts.map +1 -0
- package/dist/src/steps/dynamodb.steps.js +89 -0
- package/dist/src/steps/dynamodb.steps.js.map +1 -0
- package/dist/src/steps/graphql.steps.d.ts +60 -0
- package/dist/src/steps/graphql.steps.d.ts.map +1 -0
- package/dist/src/steps/graphql.steps.js +76 -0
- package/dist/src/steps/graphql.steps.js.map +1 -0
- package/dist/src/steps/grpc.steps.d.ts +29 -0
- package/dist/src/steps/grpc.steps.d.ts.map +1 -0
- package/dist/src/steps/grpc.steps.js +68 -0
- package/dist/src/steps/grpc.steps.js.map +1 -0
- package/dist/src/steps/inbox.steps.d.ts +30 -0
- package/dist/src/steps/inbox.steps.d.ts.map +1 -0
- package/dist/src/steps/inbox.steps.js +72 -0
- package/dist/src/steps/inbox.steps.js.map +1 -0
- package/dist/src/steps/index.d.ts +43 -0
- package/dist/src/steps/index.d.ts.map +1 -0
- package/dist/src/steps/index.js +26 -0
- package/dist/src/steps/index.js.map +1 -0
- package/dist/src/steps/kafka.steps.d.ts +56 -0
- package/dist/src/steps/kafka.steps.d.ts.map +1 -0
- package/dist/src/steps/kafka.steps.js +61 -0
- package/dist/src/steps/kafka.steps.js.map +1 -0
- package/dist/src/steps/mock-server.steps.d.ts +21 -0
- package/dist/src/steps/mock-server.steps.d.ts.map +1 -0
- package/dist/src/steps/mock-server.steps.js +45 -0
- package/dist/src/steps/mock-server.steps.js.map +1 -0
- package/dist/src/steps/mongodb.steps.d.ts +107 -0
- package/dist/src/steps/mongodb.steps.d.ts.map +1 -0
- package/dist/src/steps/mongodb.steps.js +117 -0
- package/dist/src/steps/mongodb.steps.js.map +1 -0
- package/dist/src/steps/openapi.steps.d.ts +49 -0
- package/dist/src/steps/openapi.steps.d.ts.map +1 -0
- package/dist/src/steps/openapi.steps.js +113 -0
- package/dist/src/steps/openapi.steps.js.map +1 -0
- package/dist/src/steps/otp.steps.d.ts +43 -0
- package/dist/src/steps/otp.steps.d.ts.map +1 -0
- package/dist/src/steps/otp.steps.js +83 -0
- package/dist/src/steps/otp.steps.js.map +1 -0
- package/dist/src/steps/realtime.steps.d.ts +40 -0
- package/dist/src/steps/realtime.steps.d.ts.map +1 -0
- package/dist/src/steps/realtime.steps.js +116 -0
- package/dist/src/steps/realtime.steps.js.map +1 -0
- package/dist/src/steps/redis.steps.d.ts +54 -0
- package/dist/src/steps/redis.steps.d.ts.map +1 -0
- package/dist/src/steps/redis.steps.js +89 -0
- package/dist/src/steps/redis.steps.js.map +1 -0
- package/dist/src/steps/search.steps.d.ts +23 -0
- package/dist/src/steps/search.steps.d.ts.map +1 -0
- package/dist/src/steps/search.steps.js +54 -0
- package/dist/src/steps/search.steps.js.map +1 -0
- package/dist/src/test-data/factory.d.ts +82 -0
- package/dist/src/test-data/factory.d.ts.map +1 -0
- package/dist/src/test-data/factory.js +116 -0
- package/dist/src/test-data/factory.js.map +1 -0
- package/dist/src/test-data/index.d.ts +4 -0
- package/dist/src/test-data/index.d.ts.map +1 -0
- package/dist/src/test-data/index.js +4 -0
- package/dist/src/test-data/index.js.map +1 -0
- package/dist/src/test-data/registry.d.ts +37 -0
- package/dist/src/test-data/registry.d.ts.map +1 -0
- package/dist/src/test-data/registry.js +51 -0
- package/dist/src/test-data/registry.js.map +1 -0
- package/dist/src/test-data/tracking.d.ts +47 -0
- package/dist/src/test-data/tracking.d.ts.map +1 -0
- package/dist/src/test-data/tracking.js +166 -0
- package/dist/src/test-data/tracking.js.map +1 -0
- package/environments.json +263 -0
- package/package.json +299 -5
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAPI Client Fixture for Playwright.
|
|
3
|
+
*
|
|
4
|
+
* Provides an initialized openapi-client-axios instance as a Playwright fixture.
|
|
5
|
+
* Loads an OpenAPI spec from a local file or remote URL, initializes the client
|
|
6
|
+
* with operation methods, and supports base URL override from config.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* import { test } from '../fixtures';
|
|
10
|
+
* test('my api test', async ({ openApiClient }) => {
|
|
11
|
+
* const response = await openApiClient.client.someOperation();
|
|
12
|
+
* });
|
|
13
|
+
*/
|
|
14
|
+
import { readFile } from 'node:fs/promises';
|
|
15
|
+
import { extname, isAbsolute, resolve } from 'node:path';
|
|
16
|
+
import { loadOptional } from './optional-package.js';
|
|
17
|
+
import { authApplies, bearerSource } from '../auth/apply.js';
|
|
18
|
+
import { FixtureInitError, MissingPackageError, formatViolation } from '../errors.js';
|
|
19
|
+
import { ConfigLoader } from '../config/loader.js';
|
|
20
|
+
import { ContractValidator, assertContract } from '../openapi/contract.js';
|
|
21
|
+
function wants(config, kind) {
|
|
22
|
+
const option = config?.contract;
|
|
23
|
+
if (option === false)
|
|
24
|
+
return false;
|
|
25
|
+
return option?.[kind] !== false;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Records a contract mismatch on the test (an annotation plus a JSON
|
|
29
|
+
* attachment), then throws a ContractError unless `mode` is 'warn'.
|
|
30
|
+
*/
|
|
31
|
+
async function reportContract(result, mode, testInfo, cause) {
|
|
32
|
+
if (!result.violations.length)
|
|
33
|
+
return;
|
|
34
|
+
const op = result.operation;
|
|
35
|
+
const name = `${result.kind} ${op?.operationId ?? `${op?.method.toUpperCase()} ${op?.path}`}`;
|
|
36
|
+
if (testInfo) {
|
|
37
|
+
testInfo.annotations.push({
|
|
38
|
+
type: mode === 'warn' ? 'contract-warning' : 'contract-violation',
|
|
39
|
+
description: `${name}: ${result.violations.map(formatViolation).join('; ')}`,
|
|
40
|
+
});
|
|
41
|
+
await testInfo.attach(`contract ${name}`, { body: JSON.stringify(result, null, 2), contentType: 'application/json' });
|
|
42
|
+
}
|
|
43
|
+
if (mode !== 'warn')
|
|
44
|
+
assertContract(result, cause);
|
|
45
|
+
}
|
|
46
|
+
/** Builds the contract validator once, the first time a check needs it. */
|
|
47
|
+
function lazyContract(api) {
|
|
48
|
+
let pending;
|
|
49
|
+
return () => (pending ??= ContractValidator.create(api.document));
|
|
50
|
+
}
|
|
51
|
+
function toResponseInput(response, operationId) {
|
|
52
|
+
return {
|
|
53
|
+
method: response.config?.method ?? 'get',
|
|
54
|
+
url: response.config?.url ?? '/',
|
|
55
|
+
status: response.status,
|
|
56
|
+
headers: response.headers,
|
|
57
|
+
data: response.data,
|
|
58
|
+
operationId,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/** Default timeout for remote spec retrieval (ms). */
|
|
62
|
+
const DEFAULT_SPEC_TIMEOUT = 10_000;
|
|
63
|
+
/** Default timeout for client initialization (ms). */
|
|
64
|
+
const DEFAULT_INIT_TIMEOUT = 30_000;
|
|
65
|
+
/**
|
|
66
|
+
* Creates a promise that rejects after the specified timeout.
|
|
67
|
+
*/
|
|
68
|
+
function createTimeout(ms, label) {
|
|
69
|
+
let timer;
|
|
70
|
+
const promise = new Promise((_, reject) => {
|
|
71
|
+
timer = setTimeout(() => {
|
|
72
|
+
reject(new Error(`${label} timed out after ${ms}ms`));
|
|
73
|
+
}, ms);
|
|
74
|
+
});
|
|
75
|
+
const clear = () => clearTimeout(timer);
|
|
76
|
+
return { promise, clear };
|
|
77
|
+
}
|
|
78
|
+
const loadJsYaml = () => loadOptional('js-yaml', 'openApiClient (YAML spec)');
|
|
79
|
+
/** Parses spec text: YAML for `.yaml`/`.yml` files (loading js-yaml), JSON otherwise. */
|
|
80
|
+
async function parseSpec(raw, filePath, loadYaml) {
|
|
81
|
+
const ext = extname(filePath).toLowerCase();
|
|
82
|
+
if (ext === '.yaml' || ext === '.yml') {
|
|
83
|
+
const yaml = await loadYaml();
|
|
84
|
+
return yaml.load(raw, { filename: filePath });
|
|
85
|
+
}
|
|
86
|
+
return JSON.parse(raw);
|
|
87
|
+
}
|
|
88
|
+
/** True when `specPath` is an http(s) URL that openapi-client-axios should fetch itself. */
|
|
89
|
+
export function isRemoteSpec(specPath) {
|
|
90
|
+
return /^https?:\/\//i.test(specPath.trim());
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Resolves `specPath` to the `definition` passed to openapi-client-axios.
|
|
94
|
+
*
|
|
95
|
+
* - http(s) URLs are returned unchanged; openapi-client-axios fetches them.
|
|
96
|
+
* - Anything else is a local file: resolved against `cwd` (the project root)
|
|
97
|
+
* when relative, read from disk, and parsed as YAML (`.yaml`/`.yml`, which
|
|
98
|
+
* needs js-yaml installed) or JSON (anything else).
|
|
99
|
+
*
|
|
100
|
+
* A YAML spec without js-yaml installed throws `MissingPackageError`.
|
|
101
|
+
* Throws `FixtureInitError('openApiClient', 'init', { specPath, reason })` when
|
|
102
|
+
* the file is missing, unreadable, or does not parse to an object.
|
|
103
|
+
*/
|
|
104
|
+
export async function resolveSpecDefinition(specPath, cwd = process.cwd(), loadYaml = loadJsYaml) {
|
|
105
|
+
if (isRemoteSpec(specPath)) {
|
|
106
|
+
return specPath;
|
|
107
|
+
}
|
|
108
|
+
const filePath = isAbsolute(specPath) ? specPath : resolve(cwd, specPath);
|
|
109
|
+
let raw;
|
|
110
|
+
try {
|
|
111
|
+
raw = await readFile(filePath, 'utf8');
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
const code = error.code;
|
|
115
|
+
const reason = code === 'ENOENT'
|
|
116
|
+
? `OpenAPI spec file not found: ${filePath}`
|
|
117
|
+
: `Could not read OpenAPI spec file ${filePath}: ${error instanceof Error ? error.message : String(error)}`;
|
|
118
|
+
throw new FixtureInitError('openApiClient', 'init', { specPath, reason }, error instanceof Error ? error : undefined);
|
|
119
|
+
}
|
|
120
|
+
let parsed;
|
|
121
|
+
try {
|
|
122
|
+
parsed = await parseSpec(raw, filePath, loadYaml);
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
if (error instanceof MissingPackageError)
|
|
126
|
+
throw error;
|
|
127
|
+
throw new FixtureInitError('openApiClient', 'init', {
|
|
128
|
+
specPath,
|
|
129
|
+
reason: `Could not parse OpenAPI spec file ${filePath} as ${/\.ya?ml$/i.test(filePath) ? 'YAML' : 'JSON'}: ${error instanceof Error ? error.message : String(error)}`,
|
|
130
|
+
}, error instanceof Error ? error : undefined);
|
|
131
|
+
}
|
|
132
|
+
if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) {
|
|
133
|
+
throw new FixtureInitError('openApiClient', 'init', {
|
|
134
|
+
specPath,
|
|
135
|
+
reason: `OpenAPI spec file ${filePath} does not contain an OpenAPI document (expected an object)`,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
return parsed;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* OpenAPI fixture definition for use with Playwright's test.extend().
|
|
142
|
+
*
|
|
143
|
+
* Spread this into your fixture registry:
|
|
144
|
+
* export const test = base.extend({ ...openApiFixture });
|
|
145
|
+
*/
|
|
146
|
+
export const openApiFixture = {
|
|
147
|
+
openApiClient: [
|
|
148
|
+
async ({ openapi, authConfig, authRole, authTokens, }, use, testInfo) => {
|
|
149
|
+
// Use config from project `use` block if provided, otherwise fall back to ConfigLoader
|
|
150
|
+
let openapiConfig = openapi;
|
|
151
|
+
if (!openapiConfig) {
|
|
152
|
+
const configLoader = new ConfigLoader();
|
|
153
|
+
const config = configLoader.load();
|
|
154
|
+
openapiConfig = config.openapi;
|
|
155
|
+
}
|
|
156
|
+
if (!openapiConfig || !openapiConfig.specPath) {
|
|
157
|
+
throw new FixtureInitError('openApiClient', 'init', {
|
|
158
|
+
reason: 'OpenAPI configuration is missing or specPath is not defined',
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
const specPath = openapiConfig.specPath;
|
|
162
|
+
const baseUrl = openapiConfig.baseUrl;
|
|
163
|
+
const specTimeout = openapiConfig.specTimeout ?? DEFAULT_SPEC_TIMEOUT;
|
|
164
|
+
const initTimeout = openapiConfig.initTimeout ?? DEFAULT_INIT_TIMEOUT;
|
|
165
|
+
// openapi-client-axios is an optional peer dependency, loaded on first use.
|
|
166
|
+
const { OpenAPIClientAxios: OpenAPIClientAxiosClass } = await loadOptional('openapi-client-axios', 'openApiClient');
|
|
167
|
+
// Local files are read and parsed here; a string definition would be
|
|
168
|
+
// fetched over HTTP (relative to the API base URL) by openapi-client-axios.
|
|
169
|
+
const definition = await resolveSpecDefinition(specPath);
|
|
170
|
+
let api;
|
|
171
|
+
let client;
|
|
172
|
+
try {
|
|
173
|
+
// Build OpenAPIClientAxios options
|
|
174
|
+
const opts = {
|
|
175
|
+
definition,
|
|
176
|
+
axiosConfigDefaults: {
|
|
177
|
+
timeout: specTimeout,
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
// If a base URL override is provided, set it via axiosConfigDefaults
|
|
181
|
+
if (baseUrl) {
|
|
182
|
+
opts.axiosConfigDefaults = {
|
|
183
|
+
...opts.axiosConfigDefaults,
|
|
184
|
+
baseURL: baseUrl,
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
api = new OpenAPIClientAxiosClass(opts);
|
|
188
|
+
// Initialize with timeout
|
|
189
|
+
const timeout = createTimeout(initTimeout, 'OpenAPI client initialization');
|
|
190
|
+
try {
|
|
191
|
+
client = await Promise.race([api.init(), timeout.promise]);
|
|
192
|
+
}
|
|
193
|
+
finally {
|
|
194
|
+
timeout.clear();
|
|
195
|
+
}
|
|
196
|
+
// Apply base URL override after init (ensures it takes precedence over spec servers)
|
|
197
|
+
if (baseUrl) {
|
|
198
|
+
client.defaults.baseURL = baseUrl;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
catch (error) {
|
|
202
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
203
|
+
throw new FixtureInitError('openApiClient', 'init', {
|
|
204
|
+
specPath,
|
|
205
|
+
reason,
|
|
206
|
+
timeout: initTimeout,
|
|
207
|
+
}, error instanceof Error ? error : undefined);
|
|
208
|
+
}
|
|
209
|
+
// Auth helpers: send the role's bearer token on every request, unless the call sets its own.
|
|
210
|
+
if (authApplies(authConfig, 'openapi')) {
|
|
211
|
+
const token = bearerSource(authTokens, authConfig, authRole);
|
|
212
|
+
client.interceptors.request.use(async (request) => {
|
|
213
|
+
if (!request.headers.has('Authorization'))
|
|
214
|
+
request.headers.set('Authorization', `Bearer ${await token()}`);
|
|
215
|
+
return request;
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
// Contract checks: requests and responses against the spec (Ajv, loaded on first use).
|
|
219
|
+
const contract = lazyContract(api);
|
|
220
|
+
const requestMode = openapiConfig.validateRequests ?? false;
|
|
221
|
+
const responseMode = openapiConfig.validateResponses ?? false;
|
|
222
|
+
if (requestMode || responseMode)
|
|
223
|
+
await contract(); // a missing ajv fails here, not mid-test
|
|
224
|
+
if (requestMode) {
|
|
225
|
+
client.interceptors.request.use(async (request) => {
|
|
226
|
+
if (!wants(request, 'request'))
|
|
227
|
+
return request;
|
|
228
|
+
const result = (await contract()).checkRequest({
|
|
229
|
+
method: request.method ?? 'get',
|
|
230
|
+
url: request.url ?? '/',
|
|
231
|
+
contentType: request.headers?.get?.('Content-Type')?.toString() ?? undefined,
|
|
232
|
+
data: request.data,
|
|
233
|
+
}, request.baseURL);
|
|
234
|
+
await reportContract(result, requestMode, testInfo);
|
|
235
|
+
return request;
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
if (responseMode) {
|
|
239
|
+
const check = async (response, cause) => {
|
|
240
|
+
if (!wants(response.config, 'response'))
|
|
241
|
+
return;
|
|
242
|
+
const result = (await contract()).checkResponse(toResponseInput(response), response.config?.baseURL);
|
|
243
|
+
await reportContract(result, responseMode, testInfo, cause);
|
|
244
|
+
};
|
|
245
|
+
client.interceptors.response.use(async (response) => {
|
|
246
|
+
await check(response);
|
|
247
|
+
return response;
|
|
248
|
+
}, async (error) => {
|
|
249
|
+
// Non-2xx responses are checked too: a 404 body is part of the contract.
|
|
250
|
+
if (error?.response)
|
|
251
|
+
await check(error.response, error);
|
|
252
|
+
throw error;
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
const checkResponse = async (response, operationId) => (await contract()).checkResponse(toResponseInput(response, operationId), response.config?.baseURL ?? client.defaults.baseURL);
|
|
256
|
+
// Provide the client to the test
|
|
257
|
+
await use({ client, api, checkResponse });
|
|
258
|
+
// Teardown: clear internal references
|
|
259
|
+
api.instance = null;
|
|
260
|
+
api.document = null;
|
|
261
|
+
api.definition = null;
|
|
262
|
+
},
|
|
263
|
+
{ scope: 'test' },
|
|
264
|
+
],
|
|
265
|
+
};
|
|
266
|
+
//# sourceMappingURL=openapi.fixture.js.map
|
|
@@ -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AM,KAAK,CAAC;gBAChB,CAAC,CACJ,CAAC;YACN,CAAC;YAED,MAAM,aAAa,GAAG,KAAK,EAAE,QAA2B,EAAE,WAAoB,EAAE,EAAE,CAC9E,CAAC,MAAM,QAAQ,EAAE,CAAC,CAAC,aAAa,CAAC,eAAe,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAElI,iCAAiC;YACjC,MAAM,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,CAAC,CAAC;YAE1C,sCAAsC;YACrC,GAAW,CAAC,QAAQ,GAAG,IAAI,CAAC;YAC5B,GAAW,CAAC,QAAQ,GAAG,IAAI,CAAC;YAC5B,GAAW,CAAC,UAAU,GAAG,IAAI,CAAC;QACnC,CAAC;QACD,EAAE,KAAK,EAAE,MAAM,EAAE;KACpB;CACJ,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loads a fixture's driver package on first use.
|
|
3
|
+
*
|
|
4
|
+
* Drivers (pg, kafkajs, webdriverio, ...) are optional peer dependencies:
|
|
5
|
+
* a project installs only the ones for the fixtures it uses. Importing
|
|
6
|
+
* `@inluxc/propmaster` loads none of them; each fixture loads its own the
|
|
7
|
+
* first time a test requests it, and a missing one becomes a
|
|
8
|
+
* MissingPackageError that names the package and the install command.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* The packages to install for each fixture. Keep in sync with
|
|
12
|
+
* `peerDependencies` in package.json.
|
|
13
|
+
*/
|
|
14
|
+
export declare const FIXTURE_PACKAGES: {
|
|
15
|
+
readonly openApiClient: readonly ["openapi-client-axios"];
|
|
16
|
+
readonly 'openApiClient (YAML spec)': readonly ["js-yaml"];
|
|
17
|
+
readonly 'openApiClient (contract checks)': readonly ["ajv", "ajv-formats"];
|
|
18
|
+
readonly graphqlClient: readonly ["graphql-request", "graphql"];
|
|
19
|
+
readonly grpcClient: readonly ["@grpc/grpc-js", "@grpc/proto-loader"];
|
|
20
|
+
readonly 'realtimeClient (WebSocket)': readonly ["ws"];
|
|
21
|
+
readonly 'databaseClient (postgresql)': readonly ["pg"];
|
|
22
|
+
readonly 'databaseClient (mysql)': readonly ["mysql2"];
|
|
23
|
+
readonly 'databaseClient (mssql)': readonly ["mssql"];
|
|
24
|
+
readonly 'databaseClient (sqlite)': readonly ["better-sqlite3"];
|
|
25
|
+
readonly mongoDbClient: readonly ["mongodb"];
|
|
26
|
+
readonly neo4jClient: readonly ["neo4j-driver"];
|
|
27
|
+
readonly cassandraClient: readonly ["cassandra-driver"];
|
|
28
|
+
readonly clickHouseClient: readonly ["@clickhouse/client"];
|
|
29
|
+
readonly kafkaClient: readonly ["kafkajs"];
|
|
30
|
+
readonly 'kafkaClient (confluent)': readonly ["@confluentinc/kafka-javascript"];
|
|
31
|
+
readonly amqpClient: readonly ["amqplib"];
|
|
32
|
+
readonly s3Client: readonly ["@aws-sdk/client-s3"];
|
|
33
|
+
readonly sqsClient: readonly ["@aws-sdk/client-sqs"];
|
|
34
|
+
readonly 'sqsClient (SNS)': readonly ["@aws-sdk/client-sns"];
|
|
35
|
+
readonly dynamoDbClient: readonly ["@aws-sdk/client-dynamodb", "@aws-sdk/lib-dynamodb"];
|
|
36
|
+
readonly redisClient: readonly ["ioredis"];
|
|
37
|
+
readonly otpClient: readonly ["otplib"];
|
|
38
|
+
readonly 'testData (faker)': readonly ["@faker-js/faker"];
|
|
39
|
+
readonly appiumDriver: readonly ["webdriverio"];
|
|
40
|
+
readonly 'any backend with `container: true`': readonly ["testcontainers"];
|
|
41
|
+
};
|
|
42
|
+
/** The package name a specifier belongs to: `mysql2/promise` → `mysql2`, `@scope/pkg/x` → `@scope/pkg`. */
|
|
43
|
+
export declare function packageNameOf(specifier: string): string;
|
|
44
|
+
/** True when `err` says `pkg` itself can't be found (not one of its own imports failing). */
|
|
45
|
+
export declare function isMissingPackage(err: unknown, pkg: string): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Imports `specifier` for `fixtureName`, once per process. Throws
|
|
48
|
+
* MissingPackageError when the package isn't installed; any other failure
|
|
49
|
+
* (a broken install, a native build error) is rethrown unchanged.
|
|
50
|
+
*
|
|
51
|
+
* @param install packages to suggest installing, when more than the one imported
|
|
52
|
+
*/
|
|
53
|
+
export declare function loadOptional<T>(specifier: string, fixtureName: string, install?: readonly string[]): Promise<T>;
|
|
54
|
+
//# sourceMappingURL=optional-package.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optional-package.d.ts","sourceRoot":"","sources":["../../../src/fixtures/optional-package.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2ByB,CAAC;AAIvD,2GAA2G;AAC3G,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGvD;AAED,6FAA6F;AAC7F,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAKnE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAc/G"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loads a fixture's driver package on first use.
|
|
3
|
+
*
|
|
4
|
+
* Drivers (pg, kafkajs, webdriverio, ...) are optional peer dependencies:
|
|
5
|
+
* a project installs only the ones for the fixtures it uses. Importing
|
|
6
|
+
* `@inluxc/propmaster` loads none of them; each fixture loads its own the
|
|
7
|
+
* first time a test requests it, and a missing one becomes a
|
|
8
|
+
* MissingPackageError that names the package and the install command.
|
|
9
|
+
*/
|
|
10
|
+
import { MissingPackageError } from '../errors.js';
|
|
11
|
+
/**
|
|
12
|
+
* The packages to install for each fixture. Keep in sync with
|
|
13
|
+
* `peerDependencies` in package.json.
|
|
14
|
+
*/
|
|
15
|
+
export const FIXTURE_PACKAGES = {
|
|
16
|
+
openApiClient: ['openapi-client-axios'],
|
|
17
|
+
'openApiClient (YAML spec)': ['js-yaml'],
|
|
18
|
+
'openApiClient (contract checks)': ['ajv', 'ajv-formats'],
|
|
19
|
+
graphqlClient: ['graphql-request', 'graphql'],
|
|
20
|
+
grpcClient: ['@grpc/grpc-js', '@grpc/proto-loader'],
|
|
21
|
+
'realtimeClient (WebSocket)': ['ws'],
|
|
22
|
+
'databaseClient (postgresql)': ['pg'],
|
|
23
|
+
'databaseClient (mysql)': ['mysql2'],
|
|
24
|
+
'databaseClient (mssql)': ['mssql'],
|
|
25
|
+
'databaseClient (sqlite)': ['better-sqlite3'],
|
|
26
|
+
mongoDbClient: ['mongodb'],
|
|
27
|
+
neo4jClient: ['neo4j-driver'],
|
|
28
|
+
cassandraClient: ['cassandra-driver'],
|
|
29
|
+
clickHouseClient: ['@clickhouse/client'],
|
|
30
|
+
kafkaClient: ['kafkajs'],
|
|
31
|
+
'kafkaClient (confluent)': ['@confluentinc/kafka-javascript'],
|
|
32
|
+
amqpClient: ['amqplib'],
|
|
33
|
+
s3Client: ['@aws-sdk/client-s3'],
|
|
34
|
+
sqsClient: ['@aws-sdk/client-sqs'],
|
|
35
|
+
'sqsClient (SNS)': ['@aws-sdk/client-sns'],
|
|
36
|
+
dynamoDbClient: ['@aws-sdk/client-dynamodb', '@aws-sdk/lib-dynamodb'],
|
|
37
|
+
redisClient: ['ioredis'],
|
|
38
|
+
otpClient: ['otplib'],
|
|
39
|
+
'testData (faker)': ['@faker-js/faker'],
|
|
40
|
+
appiumDriver: ['webdriverio'],
|
|
41
|
+
'any backend with `container: true`': ['testcontainers'],
|
|
42
|
+
};
|
|
43
|
+
const cache = new Map();
|
|
44
|
+
/** The package name a specifier belongs to: `mysql2/promise` → `mysql2`, `@scope/pkg/x` → `@scope/pkg`. */
|
|
45
|
+
export function packageNameOf(specifier) {
|
|
46
|
+
const parts = specifier.split('/');
|
|
47
|
+
return specifier.startsWith('@') ? parts.slice(0, 2).join('/') : parts[0];
|
|
48
|
+
}
|
|
49
|
+
/** True when `err` says `pkg` itself can't be found (not one of its own imports failing). */
|
|
50
|
+
export function isMissingPackage(err, pkg) {
|
|
51
|
+
const e = err;
|
|
52
|
+
if (!e || (e.code !== 'ERR_MODULE_NOT_FOUND' && e.code !== 'MODULE_NOT_FOUND'))
|
|
53
|
+
return false;
|
|
54
|
+
const message = String(e.message ?? '');
|
|
55
|
+
return message.includes(`'${pkg}'`) || message.includes(`"${pkg}"`);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Imports `specifier` for `fixtureName`, once per process. Throws
|
|
59
|
+
* MissingPackageError when the package isn't installed; any other failure
|
|
60
|
+
* (a broken install, a native build error) is rethrown unchanged.
|
|
61
|
+
*
|
|
62
|
+
* @param install packages to suggest installing, when more than the one imported
|
|
63
|
+
*/
|
|
64
|
+
export function loadOptional(specifier, fixtureName, install) {
|
|
65
|
+
let pending = cache.get(specifier);
|
|
66
|
+
if (!pending) {
|
|
67
|
+
const pkg = packageNameOf(specifier);
|
|
68
|
+
pending = import(specifier).catch((err) => {
|
|
69
|
+
cache.delete(specifier); // let a later test retry after the package is installed
|
|
70
|
+
if (isMissingPackage(err, pkg)) {
|
|
71
|
+
throw new MissingPackageError(fixtureName, pkg, [...(install ?? [pkg])], { cause: err });
|
|
72
|
+
}
|
|
73
|
+
throw err;
|
|
74
|
+
});
|
|
75
|
+
cache.set(specifier, pending);
|
|
76
|
+
}
|
|
77
|
+
return pending;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=optional-package.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optional-package.js","sourceRoot":"","sources":["../../../src/fixtures/optional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G,EAAE,GAAG,CAAC,EAAE,CAAC;gBAC7B,MAAM,IAAI,mBAAmB,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;YAC7F,CAAC;YACD,MAAM,GAAG,CAAC;QACd,CAAC,CAAC,CAAC;QACH,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,OAAqB,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OTP (One-Time Password) fixture for the Playwright Framework Template.
|
|
3
|
+
*
|
|
4
|
+
* Provides TOTP and HOTP generation/verification using otplib v13.
|
|
5
|
+
* Useful for testing 2FA/MFA flows where time-based or counter-based
|
|
6
|
+
* one-time passwords need to be generated during test execution.
|
|
7
|
+
*
|
|
8
|
+
* @requirements 8.1, 8.2, 8.3
|
|
9
|
+
*/
|
|
10
|
+
type Otplib = typeof import('otplib');
|
|
11
|
+
import type { OtpFixtureConfig } from '../config/schema.js';
|
|
12
|
+
/**
|
|
13
|
+
* OTP client interface exposed to tests.
|
|
14
|
+
*/
|
|
15
|
+
export interface OtpClient {
|
|
16
|
+
/**
|
|
17
|
+
* Generate a TOTP token for the configured or provided secret.
|
|
18
|
+
* Uses the current system time.
|
|
19
|
+
*/
|
|
20
|
+
generateTotp(secret?: string): Promise<string>;
|
|
21
|
+
/**
|
|
22
|
+
* Verify a TOTP token against the configured or provided secret.
|
|
23
|
+
* Accounts for time drift within the configured window.
|
|
24
|
+
*/
|
|
25
|
+
verifyTotp(token: string, secret?: string): Promise<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* Generate an HOTP token for the given counter value.
|
|
28
|
+
*/
|
|
29
|
+
generateHotp(counter: number, secret?: string): Promise<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Verify an HOTP token against the given counter value.
|
|
32
|
+
*/
|
|
33
|
+
verifyHotp(token: string, counter: number, secret?: string): Promise<boolean>;
|
|
34
|
+
/**
|
|
35
|
+
* Generate a new random secret (base32 encoded).
|
|
36
|
+
* Useful for test setup when provisioning 2FA for a user.
|
|
37
|
+
*/
|
|
38
|
+
generateSecret(): string;
|
|
39
|
+
/**
|
|
40
|
+
* Generate an otpauth:// URI for QR code provisioning.
|
|
41
|
+
*/
|
|
42
|
+
generateKeyUri(accountName: string, issuer?: string, secret?: string): string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Creates an OTP client configured with the provided options.
|
|
46
|
+
*/
|
|
47
|
+
export declare function createOtpClient(config: OtpFixtureConfig, { TOTP, HOTP, NobleCryptoPlugin, ScureBase32Plugin }: Otplib): OtpClient;
|
|
48
|
+
/**
|
|
49
|
+
* OTP fixture definition for Playwright's test.extend() pattern.
|
|
50
|
+
*
|
|
51
|
+
* Setup: Creates OTP client with configured algorithm, digits, period, and window.
|
|
52
|
+
* Teardown: No cleanup needed (stateless).
|
|
53
|
+
*/
|
|
54
|
+
export declare const otpFixture: {
|
|
55
|
+
otpClient: ({ otpConfig }: {
|
|
56
|
+
otpConfig: OtpFixtureConfig;
|
|
57
|
+
}, use: (client: OtpClient) => Promise<void>) => Promise<void>;
|
|
58
|
+
};
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=otp.fixture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otp.fixture.d.ts","sourceRoot":"","sources":["../../../src/fixtures/otp.fixture.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,KAAK,MAAM,GAAG,cAAc,QAAQ,CAAC,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB;;;OAGG;IACH,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE/C;;;OAGG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE7D;;OAEG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEhE;;OAEG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE9E;;;OAGG;IACH,cAAc,IAAI,MAAM,CAAC;IAEzB;;OAEG;IACH,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACjF;AAeD;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,gBAAgB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,EAAE,MAAM,GAAG,SAAS,CAsEjI;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU;IACnB,SAAS,kBACU;QAAE,SAAS,EAAE,gBAAgB,CAAA;KAAE,OACzC,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC;CAMhD,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OTP (One-Time Password) fixture for the Playwright Framework Template.
|
|
3
|
+
*
|
|
4
|
+
* Provides TOTP and HOTP generation/verification using otplib v13.
|
|
5
|
+
* Useful for testing 2FA/MFA flows where time-based or counter-based
|
|
6
|
+
* one-time passwords need to be generated during test execution.
|
|
7
|
+
*
|
|
8
|
+
* @requirements 8.1, 8.2, 8.3
|
|
9
|
+
*/
|
|
10
|
+
import { loadOptional } from './optional-package.js';
|
|
11
|
+
import { FixtureInitError } from '../errors.js';
|
|
12
|
+
/**
|
|
13
|
+
* Resolves the secret, throwing a descriptive error if none is available.
|
|
14
|
+
*/
|
|
15
|
+
function resolveSecret(secret, defaultSecret, method) {
|
|
16
|
+
const s = secret ?? defaultSecret;
|
|
17
|
+
if (!s) {
|
|
18
|
+
throw new FixtureInitError('otp', 'init', {
|
|
19
|
+
reason: `No secret provided. Pass a secret to ${method}() or configure one in the OTP fixture config.`,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return s;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Creates an OTP client configured with the provided options.
|
|
26
|
+
*/
|
|
27
|
+
export function createOtpClient(config, { TOTP, HOTP, NobleCryptoPlugin, ScureBase32Plugin }) {
|
|
28
|
+
const crypto = new NobleCryptoPlugin();
|
|
29
|
+
const base32 = new ScureBase32Plugin();
|
|
30
|
+
const totpInstance = new TOTP({
|
|
31
|
+
crypto,
|
|
32
|
+
base32,
|
|
33
|
+
secret: config.secret,
|
|
34
|
+
digits: config.digits,
|
|
35
|
+
period: config.period,
|
|
36
|
+
algorithm: config.algorithm,
|
|
37
|
+
issuer: config.issuer,
|
|
38
|
+
});
|
|
39
|
+
const hotpInstance = new HOTP({
|
|
40
|
+
crypto,
|
|
41
|
+
base32,
|
|
42
|
+
secret: config.secret,
|
|
43
|
+
digits: config.digits,
|
|
44
|
+
algorithm: config.algorithm,
|
|
45
|
+
issuer: config.issuer,
|
|
46
|
+
});
|
|
47
|
+
const defaultSecret = config.secret;
|
|
48
|
+
// Compute epochTolerance from window config
|
|
49
|
+
// window=1 with period=30 means ±30 seconds tolerance
|
|
50
|
+
const epochTolerance = config.window !== undefined
|
|
51
|
+
? (config.window * (config.period ?? 30))
|
|
52
|
+
: undefined;
|
|
53
|
+
return {
|
|
54
|
+
async generateTotp(secret) {
|
|
55
|
+
const s = resolveSecret(secret, defaultSecret, 'generateTotp');
|
|
56
|
+
return totpInstance.generate({ secret: s });
|
|
57
|
+
},
|
|
58
|
+
async verifyTotp(token, secret) {
|
|
59
|
+
const s = resolveSecret(secret, defaultSecret, 'verifyTotp');
|
|
60
|
+
const result = await totpInstance.verify(token, {
|
|
61
|
+
secret: s,
|
|
62
|
+
...(epochTolerance !== undefined ? { epochTolerance } : {}),
|
|
63
|
+
});
|
|
64
|
+
return result.valid;
|
|
65
|
+
},
|
|
66
|
+
async generateHotp(counter, secret) {
|
|
67
|
+
const s = resolveSecret(secret, defaultSecret, 'generateHotp');
|
|
68
|
+
return hotpInstance.generate(counter, { secret: s });
|
|
69
|
+
},
|
|
70
|
+
async verifyHotp(token, counter, secret) {
|
|
71
|
+
const s = resolveSecret(secret, defaultSecret, 'verifyHotp');
|
|
72
|
+
const result = await hotpInstance.verify({ token, counter }, { secret: s });
|
|
73
|
+
return result.valid;
|
|
74
|
+
},
|
|
75
|
+
generateSecret() {
|
|
76
|
+
return totpInstance.generateSecret();
|
|
77
|
+
},
|
|
78
|
+
generateKeyUri(accountName, issuer, secret) {
|
|
79
|
+
const s = resolveSecret(secret, defaultSecret, 'generateKeyUri');
|
|
80
|
+
return totpInstance.toURI({
|
|
81
|
+
label: accountName,
|
|
82
|
+
issuer: issuer ?? config.issuer,
|
|
83
|
+
secret: s,
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* OTP fixture definition for Playwright's test.extend() pattern.
|
|
90
|
+
*
|
|
91
|
+
* Setup: Creates OTP client with configured algorithm, digits, period, and window.
|
|
92
|
+
* Teardown: No cleanup needed (stateless).
|
|
93
|
+
*/
|
|
94
|
+
export const otpFixture = {
|
|
95
|
+
otpClient: async ({ otpConfig }, use) => {
|
|
96
|
+
// otplib is an optional peer dependency, loaded on first use.
|
|
97
|
+
const client = createOtpClient(otpConfig, await loadOptional('otplib', 'otpClient'));
|
|
98
|
+
await use(client);
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
//# sourceM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