@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,255 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SecretsManager — resolves, caches, and injects secrets into framework configuration.
|
|
3
|
+
*
|
|
4
|
+
* Responsibilities:
|
|
5
|
+
* - Resolves which provider to use based on `secrets.provider` in the config
|
|
6
|
+
* - Fetches secrets from the configured provider backend with timeout enforcement
|
|
7
|
+
* - Caches all fetched secrets for the entire test runner invocation (singleton)
|
|
8
|
+
* - Injects resolved secret values into FrameworkConfig via key mappings
|
|
9
|
+
* - Throws SecretsError for unrecognized providers, fetch failures, timeouts, or invalid mappings
|
|
10
|
+
*/
|
|
11
|
+
import { SecretsError } from '../errors.js';
|
|
12
|
+
const DEFAULT_TIMEOUT_MS = 10_000;
|
|
13
|
+
/**
|
|
14
|
+
* Wraps a promise with a timeout. Rejects with SecretsError if the timeout is exceeded.
|
|
15
|
+
*/
|
|
16
|
+
function withTimeout(promise, timeoutMs, providerName, secretKey) {
|
|
17
|
+
return new Promise((resolve, reject) => {
|
|
18
|
+
const timer = setTimeout(() => {
|
|
19
|
+
reject(new SecretsError(providerName, 'timeout', secretKey, {
|
|
20
|
+
timeoutMs,
|
|
21
|
+
}));
|
|
22
|
+
}, timeoutMs);
|
|
23
|
+
promise
|
|
24
|
+
.then((value) => {
|
|
25
|
+
clearTimeout(timer);
|
|
26
|
+
resolve(value);
|
|
27
|
+
})
|
|
28
|
+
.catch((error) => {
|
|
29
|
+
clearTimeout(timer);
|
|
30
|
+
reject(error);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Sets a value at a dot-notation path in an object.
|
|
36
|
+
* Throws SecretsError with operation 'mapping' if the path is invalid.
|
|
37
|
+
*/
|
|
38
|
+
function setNestedValue(obj, path, value, providerName, secretKey) {
|
|
39
|
+
const parts = path.split('.');
|
|
40
|
+
let current = obj;
|
|
41
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
42
|
+
const part = parts[i];
|
|
43
|
+
const next = current[part];
|
|
44
|
+
if (next === undefined || next === null) {
|
|
45
|
+
throw new SecretsError(providerName, 'mapping', secretKey, {
|
|
46
|
+
invalidField: path,
|
|
47
|
+
reason: `Path segment "${part}" does not exist in config`,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
if (typeof next !== 'object' || Array.isArray(next)) {
|
|
51
|
+
throw new SecretsError(providerName, 'mapping', secretKey, {
|
|
52
|
+
invalidField: path,
|
|
53
|
+
reason: `Path segment "${part}" is not an object`,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
current = next;
|
|
57
|
+
}
|
|
58
|
+
const finalKey = parts[parts.length - 1];
|
|
59
|
+
// Validate that the final key exists in the target object (the field must be defined)
|
|
60
|
+
if (!(finalKey in current)) {
|
|
61
|
+
throw new SecretsError(providerName, 'mapping', secretKey, {
|
|
62
|
+
invalidField: path,
|
|
63
|
+
reason: `Field "${finalKey}" does not exist at path "${path}"`,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
current[finalKey] = value;
|
|
67
|
+
}
|
|
68
|
+
export class SecretsManager {
|
|
69
|
+
providers = new Map();
|
|
70
|
+
cache = new Map();
|
|
71
|
+
/**
|
|
72
|
+
* Register a secrets provider backend.
|
|
73
|
+
* The provider's name is used to match against `secrets.provider` in config.
|
|
74
|
+
*/
|
|
75
|
+
registerProvider(provider) {
|
|
76
|
+
this.providers.set(provider.name, provider);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Resolve secrets and inject them into the framework configuration.
|
|
80
|
+
*
|
|
81
|
+
* 1. Determines the provider from `config.secrets.provider`
|
|
82
|
+
* 2. Fetches all secrets defined in `keyMappings`
|
|
83
|
+
* 3. Injects fetched values into the config at the mapped paths
|
|
84
|
+
*
|
|
85
|
+
* @param config - The framework configuration to resolve secrets for
|
|
86
|
+
* @returns The config with secrets injected
|
|
87
|
+
* @throws SecretsError if provider is unrecognized, fetch fails, or mapping is invalid
|
|
88
|
+
*/
|
|
89
|
+
async resolve(config) {
|
|
90
|
+
const secretsConfig = config.secrets;
|
|
91
|
+
if (!secretsConfig) {
|
|
92
|
+
return config;
|
|
93
|
+
}
|
|
94
|
+
const provider = this.getProvider(secretsConfig.provider);
|
|
95
|
+
const keyMappings = secretsConfig.keyMappings;
|
|
96
|
+
if (!keyMappings || Object.keys(keyMappings).length === 0) {
|
|
97
|
+
return config;
|
|
98
|
+
}
|
|
99
|
+
const timeout = secretsConfig.timeout ?? DEFAULT_TIMEOUT_MS;
|
|
100
|
+
const secretKeys = Object.keys(keyMappings);
|
|
101
|
+
// Fetch all required secrets (uses cache where available)
|
|
102
|
+
const secrets = await this.fetchSecrets(secretKeys, provider, timeout);
|
|
103
|
+
// Inject secrets into config at mapped paths
|
|
104
|
+
const resolvedConfig = structuredClone(config);
|
|
105
|
+
for (const [secretKey, configPath] of Object.entries(keyMappings)) {
|
|
106
|
+
const value = secrets.get(secretKey);
|
|
107
|
+
if (value !== undefined) {
|
|
108
|
+
setNestedValue(resolvedConfig, configPath, value, provider.name, secretKey);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return resolvedConfig;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Fetch a single secret value by key.
|
|
115
|
+
* Returns cached value if available; otherwise fetches from the provider.
|
|
116
|
+
*
|
|
117
|
+
* @param key - The secret key to retrieve
|
|
118
|
+
* @param providerName - Optional provider name override (defaults to first registered)
|
|
119
|
+
* @param timeout - Optional timeout in ms (defaults to 10s)
|
|
120
|
+
* @returns The secret value
|
|
121
|
+
*/
|
|
122
|
+
async getSecret(key, providerName, timeout = DEFAULT_TIMEOUT_MS) {
|
|
123
|
+
// Return cached value if available
|
|
124
|
+
const cached = this.cache.get(key);
|
|
125
|
+
if (cached !== undefined) {
|
|
126
|
+
return cached;
|
|
127
|
+
}
|
|
128
|
+
const provider = this.getProvider(providerName);
|
|
129
|
+
try {
|
|
130
|
+
const value = await withTimeout(provider.getSecret(key), timeout, provider.name, key);
|
|
131
|
+
this.cache.set(key, value);
|
|
132
|
+
return value;
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
if (error instanceof SecretsError) {
|
|
136
|
+
throw error;
|
|
137
|
+
}
|
|
138
|
+
throw new SecretsError(provider.name, 'fetch', key, { reason: error.message }, error);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Fetch multiple secret values by keys.
|
|
143
|
+
* Returns cached values where available; fetches remaining from the provider.
|
|
144
|
+
*
|
|
145
|
+
* @param keys - Array of secret keys to retrieve
|
|
146
|
+
* @param providerName - Optional provider name override (defaults to first registered)
|
|
147
|
+
* @param timeout - Optional timeout in ms (defaults to 10s)
|
|
148
|
+
* @returns A map of key → secret value pairs
|
|
149
|
+
*/
|
|
150
|
+
async getSecrets(keys, providerName, timeout = DEFAULT_TIMEOUT_MS) {
|
|
151
|
+
const result = new Map();
|
|
152
|
+
const uncachedKeys = [];
|
|
153
|
+
// Collect cached values and identify uncached keys
|
|
154
|
+
for (const key of keys) {
|
|
155
|
+
const cached = this.cache.get(key);
|
|
156
|
+
if (cached !== undefined) {
|
|
157
|
+
result.set(key, cached);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
uncachedKeys.push(key);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// If all keys are cached, return immediately
|
|
164
|
+
if (uncachedKeys.length === 0) {
|
|
165
|
+
return result;
|
|
166
|
+
}
|
|
167
|
+
const provider = this.getProvider(providerName);
|
|
168
|
+
try {
|
|
169
|
+
const fetched = await withTimeout(provider.getSecrets(uncachedKeys), timeout, provider.name);
|
|
170
|
+
// Cache and collect fetched values
|
|
171
|
+
for (const [key, value] of fetched) {
|
|
172
|
+
this.cache.set(key, value);
|
|
173
|
+
result.set(key, value);
|
|
174
|
+
}
|
|
175
|
+
return result;
|
|
176
|
+
}
|
|
177
|
+
catch (error) {
|
|
178
|
+
if (error instanceof SecretsError) {
|
|
179
|
+
throw error;
|
|
180
|
+
}
|
|
181
|
+
throw new SecretsError(provider.name, 'fetch', undefined, {
|
|
182
|
+
keys: uncachedKeys,
|
|
183
|
+
reason: error.message,
|
|
184
|
+
}, error);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Get the list of registered provider names.
|
|
189
|
+
*/
|
|
190
|
+
getRegisteredProviders() {
|
|
191
|
+
return Array.from(this.providers.keys());
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Fetch secrets using cache-first strategy.
|
|
195
|
+
* Only fetches uncached keys from the provider.
|
|
196
|
+
*/
|
|
197
|
+
async fetchSecrets(keys, provider, timeout) {
|
|
198
|
+
const result = new Map();
|
|
199
|
+
const uncachedKeys = [];
|
|
200
|
+
for (const key of keys) {
|
|
201
|
+
const cached = this.cache.get(key);
|
|
202
|
+
if (cached !== undefined) {
|
|
203
|
+
result.set(key, cached);
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
uncachedKeys.push(key);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
if (uncachedKeys.length === 0) {
|
|
210
|
+
return result;
|
|
211
|
+
}
|
|
212
|
+
try {
|
|
213
|
+
const fetched = await withTimeout(provider.getSecrets(uncachedKeys), timeout, provider.name);
|
|
214
|
+
for (const [key, value] of fetched) {
|
|
215
|
+
this.cache.set(key, value);
|
|
216
|
+
result.set(key, value);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
catch (error) {
|
|
220
|
+
if (error instanceof SecretsError) {
|
|
221
|
+
throw error;
|
|
222
|
+
}
|
|
223
|
+
throw new SecretsError(provider.name, 'fetch', undefined, {
|
|
224
|
+
keys: uncachedKeys,
|
|
225
|
+
reason: error.message,
|
|
226
|
+
}, error);
|
|
227
|
+
}
|
|
228
|
+
return result;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Get a provider by name. Throws SecretsError if not found.
|
|
232
|
+
*/
|
|
233
|
+
getProvider(name) {
|
|
234
|
+
if (!name) {
|
|
235
|
+
// If no name specified, use the first registered provider
|
|
236
|
+
const first = this.providers.values().next().value;
|
|
237
|
+
if (!first) {
|
|
238
|
+
throw new SecretsError('unknown', 'resolve', undefined, {
|
|
239
|
+
reason: 'No providers registered',
|
|
240
|
+
availableProviders: [],
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
return first;
|
|
244
|
+
}
|
|
245
|
+
const provider = this.providers.get(name);
|
|
246
|
+
if (!provider) {
|
|
247
|
+
throw new SecretsError(name, 'resolve', undefined, {
|
|
248
|
+
reason: `Provider "${name}" is not registered`,
|
|
249
|
+
availableProviders: this.getRegisteredProviders(),
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
return provider;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
//# sourceMappingURL=secrets-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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D,IAAI,CAAC,KAAK,EAAE,CAAC;gBACT,MAAM,IAAI,YAAY,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE;oBACpD,MAAM,EAAE,yBAAyB;oBACjC,kBAAkB,EAAE,EAAE;iBACzB,CAAC,CAAC;YACP,CAAC;YACD,OAAO,KAAK,CAAC;QACjB,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,MAAM,IAAI,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE;gBAC/C,MAAM,EAAE,aAAa,IAAI,qBAAqB;gBAC9C,kBAAkB,EAAE,IAAI,CAAC,sBAAsB,EAAE;aACpD,CAAC,CAAC;QACP,CAAC;QACD,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AMQP Step Class
|
|
3
|
+
*
|
|
4
|
+
* Reusable steps for RabbitMQ / AMQP 0-9-1: publish a message, listen on an
|
|
5
|
+
* exchange for what the application publishes, and check queues. Each method
|
|
6
|
+
* runs inside `test.step()`, so it shows up as one step in reports and traces.
|
|
7
|
+
*/
|
|
8
|
+
import type { AmqpBody, AmqpClient, AmqpConsumeOptions, AmqpListener, AmqpListenOptions, AmqpMessage, AmqpPublishOptions, AmqpWaitOptions } from '../fixtures/amqp.fixture.js';
|
|
9
|
+
export type { AmqpClient, AmqpListener, AmqpMessage } from '../fixtures/amqp.fixture.js';
|
|
10
|
+
export declare class AmqpSteps {
|
|
11
|
+
private amqpClient;
|
|
12
|
+
constructor(amqpClient: AmqpClient);
|
|
13
|
+
/** Publishes to an exchange and waits for the broker's confirm. */
|
|
14
|
+
publish(description: string, exchange: string, routingKey: string, message: AmqpBody, options?: AmqpPublishOptions): Promise<void>;
|
|
15
|
+
/** Publishes straight to a queue. */
|
|
16
|
+
sendToQueue(description: string, queue: string, message: AmqpBody, options?: AmqpPublishOptions): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Starts listening on an exchange. Call it before the action that
|
|
19
|
+
* publishes: only messages published after this step are received.
|
|
20
|
+
*/
|
|
21
|
+
listen(description: string, exchange: string, bindingKey?: string, options?: AmqpListenOptions): Promise<AmqpListener>;
|
|
22
|
+
/**
|
|
23
|
+
* Waits for a message matching `predicate` on the listener and returns it.
|
|
24
|
+
* Parallel tests share exchanges, so match on something unique to this
|
|
25
|
+
* test (an order ID, a correlation ID).
|
|
26
|
+
*/
|
|
27
|
+
expectMessage(description: string, listener: AmqpListener, predicate?: (message: AmqpMessage) => boolean, options?: AmqpWaitOptions): Promise<AmqpMessage>;
|
|
28
|
+
/** Checks that no message matching `predicate` arrives within `timeout` ms (default 2000). */
|
|
29
|
+
expectNoMessage(description: string, listener: AmqpListener, predicate?: (message: AmqpMessage) => boolean, timeout?: number): Promise<void>;
|
|
30
|
+
/** Takes `count` messages (default 1) from a queue and checks that they all arrived. */
|
|
31
|
+
consumeExpectMessages(description: string, queue: string, options?: AmqpConsumeOptions): Promise<AmqpMessage[]>;
|
|
32
|
+
/** Waits until a queue holds `count` ready messages (default timeout 10000 ms). */
|
|
33
|
+
expectQueueDepth(description: string, queue: string, count: number, timeout?: number): Promise<void>;
|
|
34
|
+
/** Empties a queue; returns how many messages it removed. */
|
|
35
|
+
purge(description: string, queue: string): Promise<number>;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=amqp.steps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amqp.steps.d.ts","sourceRoot":"","sources":["../../../src/steps/amqp.steps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EACR,QAAQ,EACR,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,eAAe,EAClB,MAAM,6BAA6B,CAAC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AmF;IAC7E,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CASzG;IAED,6DAA6D;IACvD,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAM/D;CACJ"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AMQP Step Class
|
|
3
|
+
*
|
|
4
|
+
* Reusable steps for RabbitMQ / AMQP 0-9-1: publish a message, listen on an
|
|
5
|
+
* exchange for what the application publishes, and check queues. Each method
|
|
6
|
+
* runs inside `test.step()`, so it shows up as one step in reports and traces.
|
|
7
|
+
*/
|
|
8
|
+
import { test, expect } from '../index.js';
|
|
9
|
+
export class AmqpSteps {
|
|
10
|
+
amqpClient;
|
|
11
|
+
constructor(amqpClient) {
|
|
12
|
+
this.amqpClient = amqpClient;
|
|
13
|
+
}
|
|
14
|
+
/** Publishes to an exchange and waits for the broker's confirm. */
|
|
15
|
+
async publish(description, exchange, routingKey, message, options) {
|
|
16
|
+
await test.step(`Step: ${description}`, async () => {
|
|
17
|
+
await this.amqpClient.publish(exchange, routingKey, message, options);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/** Publishes straight to a queue. */
|
|
21
|
+
async sendToQueue(description, queue, message, options) {
|
|
22
|
+
await test.step(`Step: ${description}`, async () => {
|
|
23
|
+
await this.amqpClient.sendToQueue(queue, message, options);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Starts listening on an exchange. Call it before the action that
|
|
28
|
+
* publishes: only messages published after this step are received.
|
|
29
|
+
*/
|
|
30
|
+
async listen(description, exchange, bindingKey = '#', options) {
|
|
31
|
+
let listener;
|
|
32
|
+
await test.step(`Step: ${description}`, async () => {
|
|
33
|
+
listener = await this.amqpClient.listen(exchange, bindingKey, options);
|
|
34
|
+
});
|
|
35
|
+
return listener;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Waits for a message matching `predicate` on the listener and returns it.
|
|
39
|
+
* Parallel tests share exchanges, so match on something unique to this
|
|
40
|
+
* test (an order ID, a correlation ID).
|
|
41
|
+
*/
|
|
42
|
+
async expectMessage(description, listener, predicate, options) {
|
|
43
|
+
let message;
|
|
44
|
+
await test.step(`Step: ${description}`, async () => {
|
|
45
|
+
message = await listener.waitForMessage(predicate, options);
|
|
46
|
+
});
|
|
47
|
+
return message;
|
|
48
|
+
}
|
|
49
|
+
/** Checks that no message matching `predicate` arrives within `timeout` ms (default 2000). */
|
|
50
|
+
async expectNoMessage(description, listener, predicate = () => true, timeout = 2000) {
|
|
51
|
+
await test.step(`Step: ${description}`, async () => {
|
|
52
|
+
await new Promise((resolve) => setTimeout(resolve, timeout));
|
|
53
|
+
const unexpected = listener.received.filter(predicate);
|
|
54
|
+
expect(unexpected.map((m) => `${m.routingKey}: ${m.body}`)).toEqual([]);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/** Takes `count` messages (default 1) from a queue and checks that they all arrived. */
|
|
58
|
+
async consumeExpectMessages(description, queue, options) {
|
|
59
|
+
let messages = [];
|
|
60
|
+
await test.step(`Step: ${description}`, async () => {
|
|
61
|
+
messages = await this.amqpClient.consume(queue, options);
|
|
62
|
+
expect(messages.length, `messages taken from queue "${queue}"`).toBe(options?.count ?? 1);
|
|
63
|
+
});
|
|
64
|
+
return messages;
|
|
65
|
+
}
|
|
66
|
+
/** Waits until a queue holds `count` ready messages (default timeout 10000 ms). */
|
|
67
|
+
async expectQueueDepth(description, queue, count, timeout = 10_000) {
|
|
68
|
+
await test.step(`Step: ${description}`, async () => {
|
|
69
|
+
await expect
|
|
70
|
+
.poll(async () => (await this.amqpClient.checkQueue(queue))?.messageCount ?? null, {
|
|
71
|
+
message: `ready messages in queue "${queue}"`,
|
|
72
|
+
timeout,
|
|
73
|
+
})
|
|
74
|
+
.toBe(count);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/** Empties a queue; returns how many messages it removed. */
|
|
78
|
+
async purge(description, queue) {
|
|
79
|
+
let removed = 0;
|
|
80
|
+
await test.step(`Step: ${description}`, async () => {
|
|
81
|
+
removed = await this.amqpClient.purge(queue);
|
|
82
|
+
});
|
|
83
|
+
return removed;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=amqp.steps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amqp.steps.js","sourceRoot":"","sources":["../../../src/steps/amqp.steps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAc3C,MAAM,OAAO,SAAS;IACE,UAAU;IAA9B,YAAoB,UAAsB;0BAAtB,UAAU;IAAe,CAAC;IAE9C,mEAAmE;IACnE,KAAK,CAAC,OAAO,CAAC,WAAmB,EAAE,QAAgB,EAAE,UAAkB,EAAE,OAAiB,EAAE,OAA4B;QACpH,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,WAAW,EAAE,EAAE,KAAK,IAAI,EAAE;YAC/C,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC1E,CAAC,CAAC,CAAC;IACP,CAAC;IAED,qCAAqC;IACrC,KAAK,CAAC,WAAW,CAAC,WAAmB,EAAE,KAAa,EAAE,OAAiB,EAAE,OAA4B;QACjG,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,WAAW,EAAE,EAAE,KAAK,IAAI,EAAE;YAC/C,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;OAGG;IACH,KAAK,C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,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Appium Step Class
|
|
3
|
+
*
|
|
4
|
+
* Reusable step sequences for Appium tests (local Appium, grids, cloud farms, GADS).
|
|
5
|
+
* Every method wraps its work in test.step() so it shows up in reports and traces.
|
|
6
|
+
*
|
|
7
|
+
* Selectors are WebdriverIO selectors:
|
|
8
|
+
* '~login' accessibility id
|
|
9
|
+
* 'id=com.example:id/email' resource id (Android) / name (iOS)
|
|
10
|
+
* '//XCUIElementTypeButton[@name="OK"]' xpath
|
|
11
|
+
* 'android=new UiSelector().text("OK")' UiAutomator
|
|
12
|
+
* '-ios predicate string:label == "OK"' iOS predicate
|
|
13
|
+
* '-ios class chain:**\/XCUIElementTypeCell' iOS class chain
|
|
14
|
+
*/
|
|
15
|
+
import type { AppiumDriver } from '../fixtures/appium.fixture.js';
|
|
16
|
+
export type { AppiumDriver } from '../fixtures/appium.fixture.js';
|
|
17
|
+
export declare class AppiumSteps {
|
|
18
|
+
private driver;
|
|
19
|
+
constructor(driver: AppiumDriver);
|
|
20
|
+
/**
|
|
21
|
+
* Brings an installed app to the foreground (bundle ID on iOS, package name on Android).
|
|
22
|
+
*/
|
|
23
|
+
launchApp(description: string, appId: string): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Stops a running app (bundle ID on iOS, package name on Android).
|
|
26
|
+
*/
|
|
27
|
+
terminateApp(description: string, appId: string): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Opens a URL or deep link on the device.
|
|
30
|
+
*/
|
|
31
|
+
openUrl(description: string, url: string): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Waits for an element to be displayed and taps it.
|
|
34
|
+
*/
|
|
35
|
+
tap(description: string, selector: string, timeout?: number): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Waits for an input, replaces its value with `text`.
|
|
38
|
+
*/
|
|
39
|
+
fill(description: string, selector: string, text: string, timeout?: number): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Asserts an element becomes displayed within `timeout`.
|
|
42
|
+
*/
|
|
43
|
+
expectVisible(description: string, selector: string, timeout?: number): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Waits for an element and asserts its text.
|
|
46
|
+
*/
|
|
47
|
+
expectText(description: string, selector: string, expected: string | RegExp, timeout?: number): Promise<string>;
|
|
48
|
+
/**
|
|
49
|
+
* Takes a screenshot and attaches it to the test report.
|
|
50
|
+
*/
|
|
51
|
+
attachScreenshot(description: string, name?: string): Promise<Buffer>;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=appium.steps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appium.steps.d.ts","sourceRoot":"","sources":["../../../src/steps/appium.steps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,YAAY,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAKlE,qBAAa,WAAW;IACR,OAAO,CAAC,MAAM;IAA1B,YAAoB,MAAM,EAAE,YAAY,EAAI;IAE5C;;OAEG;IACG,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIjE;IAED;;OAEG;IACG,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIpE;IAED;;OAEG;IACG,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI7D;IAED;;OAEG;IACG,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,MAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAM9F;IAED;;OAEG;IACG,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,MAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAO7G;IAED;;OAEG;IACG,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,MAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAMxG;IAED;;OAEG;IACG,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,GAAE,MAAqB,GAAG,OAAO,CAAC,MAAM,CAAC,CAelI;IAED;;OAEG;IACG,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,GAAE,MAA4B,GAAG,OAAO,CAAC,MAAM,CAAC,CAU/F;CACJ"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Appium Step Class
|
|
3
|
+
*
|
|
4
|
+
* Reusable step sequences for Appium tests (local Appium, grids, cloud farms, GADS).
|
|
5
|
+
* Every method wraps its work in test.step() so it shows up in reports and traces.
|
|
6
|
+
*
|
|
7
|
+
* Selectors are WebdriverIO selectors:
|
|
8
|
+
* '~login' accessibility id
|
|
9
|
+
* 'id=com.example:id/email' resource id (Android) / name (iOS)
|
|
10
|
+
* '//XCUIElementTypeButton[@name="OK"]' xpath
|
|
11
|
+
* 'android=new UiSelector().text("OK")' UiAutomator
|
|
12
|
+
* '-ios predicate string:label == "OK"' iOS predicate
|
|
13
|
+
* '-ios class chain:**\/XCUIElementTypeCell' iOS class chain
|
|
14
|
+
*/
|
|
15
|
+
import { test, expect } from '../index.js';
|
|
16
|
+
/** Default wait for elements to appear (ms). */
|
|
17
|
+
const DEFAULT_WAIT = 10_000;
|
|
18
|
+
export class AppiumSteps {
|
|
19
|
+
driver;
|
|
20
|
+
constructor(driver) {
|
|
21
|
+
this.driver = driver;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Brings an installed app to the foreground (bundle ID on iOS, package name on Android).
|
|
25
|
+
*/
|
|
26
|
+
async launchApp(description, appId) {
|
|
27
|
+
await test.step(`Step: ${description}`, async () => {
|
|
28
|
+
await this.driver.execute('mobile: activateApp', { bundleId: appId, appId });
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Stops a running app (bundle ID on iOS, package name on Android).
|
|
33
|
+
*/
|
|
34
|
+
async terminateApp(description, appId) {
|
|
35
|
+
await test.step(`Step: ${description}`, async () => {
|
|
36
|
+
await this.driver.execute('mobile: terminateApp', { bundleId: appId, appId });
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Opens a URL or deep link on the device.
|
|
41
|
+
*/
|
|
42
|
+
async openUrl(description, url) {
|
|
43
|
+
await test.step(`Step: ${description}`, async () => {
|
|
44
|
+
await this.driver.url(url);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Waits for an element to be displayed and taps it.
|
|
49
|
+
*/
|
|
50
|
+
async tap(description, selector, timeout = DEFAULT_WAIT) {
|
|
51
|
+
await test.step(`Step: ${description}`, async () => {
|
|
52
|
+
const el = this.driver.$(selector);
|
|
53
|
+
await el.waitForDisplayed({ timeout });
|
|
54
|
+
await el.click();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Waits for an input, replaces its value with `text`.
|
|
59
|
+
*/
|
|
60
|
+
async fill(description, selector, text, timeout = DEFAULT_WAIT) {
|
|
61
|
+
await test.step(`Step: ${description}`, async () => {
|
|
62
|
+
const el = this.driver.$(selector);
|
|
63
|
+
await el.waitForDisplayed({ timeout });
|
|
64
|
+
await el.clearValue();
|
|
65
|
+
await el.setValue(text);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Asserts an element becomes displayed within `timeout`.
|
|
70
|
+
*/
|
|
71
|
+
async expectVisible(description, selector, timeout = DEFAULT_WAIT) {
|
|
72
|
+
await test.step(`Step: ${description}`, async () => {
|
|
73
|
+
const el = this.driver.$(selector);
|
|
74
|
+
await el.waitForDisplayed({ timeout });
|
|
75
|
+
expect(await el.isDisplayed()).toBe(true);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Waits for an element and asserts its text.
|
|
80
|
+
*/
|
|
81
|
+
async expectText(description, selector, expected, timeout = DEFAULT_WAIT) {
|
|
82
|
+
let text = '';
|
|
83
|
+
await test.step(`Step: ${description}`, async () => {
|
|
84
|
+
const el = this.driver.$(selector);
|
|
85
|
+
await el.waitForDisplayed({ timeout });
|
|
86
|
+
text = await el.getText();
|
|
87
|
+
if (typeof expected === 'string') {
|
|
88
|
+
expect(text).toBe(expected);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
expect(text).toMatch(expected);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
return text;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Takes a screenshot and attaches it to the test report.
|
|
98
|
+
*/
|
|
99
|
+
async attachScreenshot(description, name = 'appium-screenshot') {
|
|
100
|
+
let png = Buffer.alloc(0);
|
|
101
|
+
await test.step(`Step: ${description}`, async () => {
|
|
102
|
+
png = Buffer.from(await this.driver.takeScreenshot(), 'base64');
|
|
103
|
+
expect(png.length).toBeGreaterThan(0);
|
|
104
|
+
await test.info().attach(name, { body: png, contentType: 'image/png' });
|
|
105
|
+
});
|
|
106
|
+
return png;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=appium.steps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appium.steps.js","sourceRoot":"","sources":["../../../src/steps/appium.steps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,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AWS Step Classes
|
|
3
|
+
*
|
|
4
|
+
* Reusable steps for S3 (`S3Steps`) and SQS/SNS (`SqsSteps`). Each method runs
|
|
5
|
+
* inside `test.step()`, so it shows up as one step in reports and traces.
|
|
6
|
+
*/
|
|
7
|
+
import type { S3BucketOption, S3Client, S3Object, S3PutOptions, S3WaitOptions } from '../fixtures/s3.fixture.js';
|
|
8
|
+
import type { SnsListener, SnsListenOptions, SnsMessage, SnsPublishOptions, SnsWaitOptions, SqsClient, SqsMessage, SqsReceiveOptions, SqsSendOptions } from '../fixtures/sqs.fixture.js';
|
|
9
|
+
import type { AwsBody } from '../fixtures/aws.js';
|
|
10
|
+
export type { S3Client, S3Object } from '../fixtures/s3.fixture.js';
|
|
11
|
+
export type { SqsClient, SqsMessage, SnsListener, SnsMessage } from '../fixtures/sqs.fixture.js';
|
|
12
|
+
export declare class S3Steps {
|
|
13
|
+
private s3Client;
|
|
14
|
+
constructor(s3Client: S3Client);
|
|
15
|
+
/** Writes an object (undone after the test). */
|
|
16
|
+
putObject(description: string, key: string, body: AwsBody, options?: S3PutOptions): Promise<void>;
|
|
17
|
+
/** Waits until the object exists and returns it. */
|
|
18
|
+
expectObject(description: string, key: string, options?: S3WaitOptions): Promise<S3Object>;
|
|
19
|
+
/** Waits for the object and checks its JSON body contains `expected` (toMatchObject). */
|
|
20
|
+
expectJsonObject(description: string, key: string, expected: Record<string, unknown> | unknown[], options?: S3WaitOptions): Promise<S3Object>;
|
|
21
|
+
/** Checks that the object doesn't exist. */
|
|
22
|
+
expectNoObject(description: string, key: string, options?: S3BucketOption): Promise<void>;
|
|
23
|
+
/** Checks the keys under a prefix (default: the test's prefix), sorted. */
|
|
24
|
+
expectKeys(description: string, keys: string[], prefix?: string, options?: S3BucketOption): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
export declare class SqsSteps {
|
|
27
|
+
private sqsClient;
|
|
28
|
+
constructor(sqsClient: SqsClient);
|
|
29
|
+
/** Sends a message to a queue; returns its message ID. */
|
|
30
|
+
send(description: string, queue: string, body: AwsBody, options?: SqsSendOptions): Promise<string>;
|
|
31
|
+
/** Receives `count` messages (default 1) and checks they all arrived. */
|
|
32
|
+
receiveExpectMessages(description: string, queue: string, options?: SqsReceiveOptions): Promise<SqsMessage[]>;
|
|
33
|
+
/** Waits until a queue holds `count` visible messages (default timeout 10000 ms). */
|
|
34
|
+
expectQueueDepth(description: string, queue: string, count: number, timeout?: number): Promise<void>;
|
|
35
|
+
/** Publishes to an SNS topic; returns the message ID. */
|
|
36
|
+
publish(description: string, topic: string, body: AwsBody, options?: SnsPublishOptions): Promise<string>;
|
|
37
|
+
/** Subscribes a temporary queue to a topic. Call it before the action that publishes. */
|
|
38
|
+
listen(description: string, topic: string, options?: SnsListenOptions): Promise<SnsListener>;
|
|
39
|
+
/**
|
|
40
|
+
* Waits for a topic message matching `predicate`. Parallel tests share
|
|
41
|
+
* topics, so match on something unique to this test.
|
|
42
|
+
*/
|
|
43
|
+
expectMessage(description: string, listener: SnsListener, predicate?: (message: SnsMessage) => boolean, options?: SnsWaitOptions): Promise<SnsMessage>;
|
|
44
|
+
/** Checks that no topic message matching `predicate` arrives within `timeout` ms (default 2000). */
|
|
45
|
+
expectNoMessage(description: string, listener: SnsListener, predicate?: (message: SnsMessage) => boolean, timeout?: number): Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=aws.steps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aws.steps.d.ts","sourceRoot":"","sources":["../../../src/steps/aws.steps.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACjH,OAAO,KAAK,EACR,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,SAAS,EAC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