From 263c1cdcd0aa5daed971c1acb2b85c0ea1d0b04a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20Sch=C3=B6dl?= Date: Thu, 2 Jul 2026 21:16:45 +0200 Subject: [PATCH 1/2] add schemathesis contract tests for genai services Verify py-recipe-service and py-help-service responses conform to the internal OpenAPI contract, run in-process over ASGI with the LLM stubbed. Both service CI workflows now also trigger on api/openapi-internal.yaml. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/build-help-service.yml | 1 + .github/workflows/build-recipe-service.yml | 1 + services/py-help-service/dev-requirements.txt | 3 +- .../py-help-service/tests/test_contract.py | 49 +++++++++++++++++ .../py-recipe-service/dev-requirements.txt | 3 +- .../py-recipe-service/tests/test_contract.py | 55 +++++++++++++++++++ 6 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 services/py-help-service/tests/test_contract.py create mode 100644 services/py-recipe-service/tests/test_contract.py diff --git a/.github/workflows/build-help-service.yml b/.github/workflows/build-help-service.yml index 1e9c390..4ba202e 100644 --- a/.github/workflows/build-help-service.yml +++ b/.github/workflows/build-help-service.yml @@ -4,6 +4,7 @@ on: push: paths: - 'services/py-help-service/**' + - 'api/openapi-internal.yaml' - '.github/workflows/build-help-service.yml' workflow_dispatch: workflow_call: diff --git a/.github/workflows/build-recipe-service.yml b/.github/workflows/build-recipe-service.yml index b2e183c..282f6d6 100644 --- a/.github/workflows/build-recipe-service.yml +++ b/.github/workflows/build-recipe-service.yml @@ -4,6 +4,7 @@ on: push: paths: - 'services/py-recipe-service/**' + - 'api/openapi-internal.yaml' - '.github/workflows/build-recipe-service.yml' workflow_dispatch: workflow_call: diff --git a/services/py-help-service/dev-requirements.txt b/services/py-help-service/dev-requirements.txt index fe04e0b..2cde754 100644 --- a/services/py-help-service/dev-requirements.txt +++ b/services/py-help-service/dev-requirements.txt @@ -3,4 +3,5 @@ pytest pytest-cov httpx pytest-asyncio -pytest-env \ No newline at end of file +pytest-env +schemathesis==4.22.3 diff --git a/services/py-help-service/tests/test_contract.py b/services/py-help-service/tests/test_contract.py new file mode 100644 index 0000000..0ff25a5 --- /dev/null +++ b/services/py-help-service/tests/test_contract.py @@ -0,0 +1,49 @@ +"""OpenAPI contract-conformance test for py-help-service using Schemathesis. + +Verifies that the service's live responses conform to the internal contract in +`api/openapi-internal.yaml`. +""" + +import pathlib +from unittest.mock import AsyncMock, MagicMock + +import pytest +import schemathesis + +from main import app, get_llm, verify_internal_hmac, LocalHelpResponse + +_CONTRACT = ( + pathlib.Path(__file__).resolve().parents[3] / "api" / "openapi-internal.yaml" +) +app.openapi_schema = schemathesis.openapi.from_path(_CONTRACT).raw_schema + +# /ai/recipes belongs to py-recipe-service +schema = schemathesis.openapi.from_asgi("/openapi.json", app).exclude( + path="/ai/recipes" +) + +# Happy path only. Auth rejection (missing/invalid HMAC headers) is covered in test_help_service.py. +schema.config.generation.update(modes=[schemathesis.GenerationMode.POSITIVE]) +schema.config.phases.update(phases=["examples", "fuzzing"]) + + +@pytest.fixture(autouse=True) +def _stub_provider_dependencies(): + app.dependency_overrides[verify_internal_hmac] = lambda: None + + conforming = LocalHelpResponse( + response="Add a pinch of salt to balance the flavour." + ) + structured_runnable = AsyncMock() + structured_runnable.ainvoke.return_value = conforming + llm = MagicMock() + llm.with_structured_output.return_value = structured_runnable + app.dependency_overrides[get_llm] = lambda: llm + + yield + app.dependency_overrides.clear() + + +@schema.parametrize() +def test_openapi_conformance(case): + case.call_and_validate() diff --git a/services/py-recipe-service/dev-requirements.txt b/services/py-recipe-service/dev-requirements.txt index fe04e0b..2cde754 100644 --- a/services/py-recipe-service/dev-requirements.txt +++ b/services/py-recipe-service/dev-requirements.txt @@ -3,4 +3,5 @@ pytest pytest-cov httpx pytest-asyncio -pytest-env \ No newline at end of file +pytest-env +schemathesis==4.22.3 diff --git a/services/py-recipe-service/tests/test_contract.py b/services/py-recipe-service/tests/test_contract.py new file mode 100644 index 0000000..d517b87 --- /dev/null +++ b/services/py-recipe-service/tests/test_contract.py @@ -0,0 +1,55 @@ +"""OpenAPI contract-conformance test for py-recipe-service using Schemathesis. + +Verifies that the service's live responses conform to the internal contract in +`api/openapi-internal.yaml`. +""" + +import pathlib +from unittest.mock import AsyncMock, MagicMock + +import pytest +import schemathesis + +from main import app, get_llm, verify_internal_hmac, RecipeListWrapper, LocalRecipeInput + +_CONTRACT = ( + pathlib.Path(__file__).resolve().parents[3] / "api" / "openapi-internal.yaml" +) +app.openapi_schema = schemathesis.openapi.from_path(_CONTRACT).raw_schema + +# /ai/help belongs to py-help-service +schema = schemathesis.openapi.from_asgi("/openapi.json", app).exclude(path="/ai/help") + +# Happy path only. Auth rejection (missing/invalid HMAC headers) is covered in test_recipe_service.py. +schema.config.generation.update(modes=[schemathesis.GenerationMode.POSITIVE]) +schema.config.phases.update(phases=["examples", "fuzzing"]) + + +@pytest.fixture(autouse=True) +def _stub_provider_dependencies(): + app.dependency_overrides[verify_internal_hmac] = lambda: None + + conforming = RecipeListWrapper( + recipes=[ + LocalRecipeInput( + title="Test Recipe", + ingredients=[{"quantity": 1.0, "unit": "cup", "name": "Flour"}], + instructions=["Mix.", "Bake."], + portions=2.0, + nutrients={"calories": 200, "protein": 5, "fat": 3, "carbs": 35}, + ) + ] + ) + structured_runnable = AsyncMock() + structured_runnable.ainvoke.return_value = conforming + llm = MagicMock() + llm.with_structured_output.return_value = structured_runnable + app.dependency_overrides[get_llm] = lambda: llm + + yield + app.dependency_overrides.clear() + + +@schema.parametrize() +def test_openapi_conformance(case): + case.call_and_validate() From 1fd4805570230b5a87ffcb9dee71d0119a4a04f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20Sch=C3=B6dl?= Date: Thu, 2 Jul 2026 21:17:14 +0200 Subject: [PATCH 2/2] add pact contract tests for web-client and spring-api Consumer-driven Pact over the public REST boundary: the web-client consumer test generates web-client/pacts/, which the spring-api provider test verifies against the real app (JWT auth real, Python GenAI clients mocked). Covers every route the client uses, happy and error paths. The committed pact is the filesystem handoff; spring-api CI triggers on it. Co-Authored-By: Claude Opus 4.8 (1M context) --- .gitattributes | 3 + .github/workflows/build-spring-api.yml | 1 + services/spring-api/build.gradle.kts | 95 +- .../pact/SpringApiProviderPactTest.kt | 197 ++ web-client/package-lock.json | 1847 ++++++++++++++++- web-client/package.json | 1 + web-client/pacts/web-client-spring-api.json | 1100 ++++++++++ web-client/tests/pact/spring-api.pact.test.ts | 314 +++ 8 files changed, 3466 insertions(+), 92 deletions(-) create mode 100644 services/spring-api/src/test/kotlin/org/openapitools/pact/SpringApiProviderPactTest.kt create mode 100644 web-client/pacts/web-client-spring-api.json create mode 100644 web-client/tests/pact/spring-api.pact.test.ts diff --git a/.gitattributes b/.gitattributes index 878035c..000253f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -16,3 +16,6 @@ services/spring-api/.openapi-generator-ignore linguist-generated=true # openapi-typescript output web-client/src/api.ts linguist-generated=true + +# Pact contract (generated by the web-client consumer test, verified by spring-api) +web-client/pacts/** linguist-generated=true diff --git a/.github/workflows/build-spring-api.yml b/.github/workflows/build-spring-api.yml index 2b7ed46..a5c3795 100644 --- a/.github/workflows/build-spring-api.yml +++ b/.github/workflows/build-spring-api.yml @@ -4,6 +4,7 @@ on: push: paths: - 'services/spring-api/**' + - 'web-client/pacts/**' - '.github/workflows/build-spring-api.yml' workflow_dispatch: workflow_call: diff --git a/services/spring-api/build.gradle.kts b/services/spring-api/build.gradle.kts index 834f40a..9515c03 100644 --- a/services/spring-api/build.gradle.kts +++ b/services/spring-api/build.gradle.kts @@ -20,35 +20,35 @@ repositories { } kotlin { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_17) - freeCompilerArgs.add("-Xannotation-default-target=param-property") - } - - sourceSets { - getByName("test") { - kotlin.srcDir("src/test/kotlin") - } - } + compilerOptions { + jvmTarget.set(JvmTarget.JVM_17) + freeCompilerArgs.add("-Xannotation-default-target=param-property") + } + + sourceSets { + getByName("test") { + kotlin.srcDir("src/test/kotlin") + } + } } tasks.test { - useJUnitPlatform() - - jvmArgs("-XX:+EnableDynamicAgentLoading") - - reports { - junitXml.required.set(true) - html.required.set(true) - } - - testLogging { - events("passed", "skipped", "failed") - exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL - showExceptions = true - showCauses = true - } - finalizedBy(tasks.jacocoTestReport) + useJUnitPlatform() + + jvmArgs("-XX:+EnableDynamicAgentLoading") + + reports { + junitXml.required.set(true) + html.required.set(true) + } + + testLogging { + events("passed", "skipped", "failed") + exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL + showExceptions = true + showCauses = true + } + finalizedBy(tasks.jacocoTestReport) } tasks.jacocoTestReport { @@ -94,24 +94,27 @@ dependencies { runtimeOnly("io.jsonwebtoken:jjwt-impl:0.12.6") runtimeOnly("io.jsonwebtoken:jjwt-jackson:0.12.6") - // Tests - testImplementation("org.jetbrains.kotlin:kotlin-test-junit5") - testImplementation("org.springframework.boot:spring-boot-starter-test") { - exclude(module = "junit") - } - testImplementation("org.mockito.kotlin:mockito-kotlin:5.4.0") - testImplementation("org.springframework.boot:spring-boot-webmvc-test") - testImplementation("org.springframework.security:spring-security-test") - - // Retrofit - implementation("com.squareup.retrofit2:retrofit:2.11.0") - implementation("com.squareup.retrofit2:converter-jackson:2.11.0") - - // OkHttp - implementation("com.squareup.okhttp3:okhttp:4.12.0") - - // JSON multiplatform runtime - implementation("com.squareup.moshi:moshi:1.15.1") - implementation("com.squareup.moshi:moshi-kotlin:1.15.1") - implementation("com.squareup.retrofit2:converter-moshi:2.11.0") + // Tests + testImplementation("org.jetbrains.kotlin:kotlin-test-junit5") + testImplementation("org.springframework.boot:spring-boot-starter-test") { + exclude(module = "junit") + } + testImplementation("org.mockito.kotlin:mockito-kotlin:5.4.0") + testImplementation("org.springframework.boot:spring-boot-webmvc-test") + testImplementation("org.springframework.security:spring-security-test") + + // Pact provider-side contract verification (web-client -> spring-api) + testImplementation("au.com.dius.pact.provider:junit5:4.6.17") + + // Retrofit + implementation("com.squareup.retrofit2:retrofit:2.11.0") + implementation("com.squareup.retrofit2:converter-jackson:2.11.0") + + // OkHttp + implementation("com.squareup.okhttp3:okhttp:4.12.0") + + // JSON multiplatform runtime + implementation("com.squareup.moshi:moshi:1.15.1") + implementation("com.squareup.moshi:moshi-kotlin:1.15.1") + implementation("com.squareup.retrofit2:converter-moshi:2.11.0") } diff --git a/services/spring-api/src/test/kotlin/org/openapitools/pact/SpringApiProviderPactTest.kt b/services/spring-api/src/test/kotlin/org/openapitools/pact/SpringApiProviderPactTest.kt new file mode 100644 index 0000000..e2c4736 --- /dev/null +++ b/services/spring-api/src/test/kotlin/org/openapitools/pact/SpringApiProviderPactTest.kt @@ -0,0 +1,197 @@ +package org.openapitools.pact + +import au.com.dius.pact.provider.junit5.HttpTestTarget +import au.com.dius.pact.provider.junit5.PactVerificationContext +import au.com.dius.pact.provider.junit5.PactVerificationInvocationContextProvider +import au.com.dius.pact.provider.junitsupport.Provider +import au.com.dius.pact.provider.junitsupport.State +import au.com.dius.pact.provider.junitsupport.loader.PactFolder +import org.apache.hc.core5.http.HttpRequest +import org.junit.jupiter.api.BeforeEach +import org.junit.jupiter.api.TestTemplate +import org.junit.jupiter.api.extension.ExtendWith +import org.mockito.Mockito +import org.mockito.kotlin.any +import org.mockito.kotlin.whenever +import org.openapitools.entity.RecipeEntity +import org.openapitools.entity.UserEntity +import org.openapitools.internal.client.HelpServiceApi +import org.openapitools.internal.client.RecipeServiceApi +import org.openapitools.internal.model.RecipeIngredient +import org.openapitools.internal.model.RecipeInput +import org.openapitools.internal.model.RecipeNutrients +import org.openapitools.repository.RecipeRepository +import org.openapitools.repository.TokenBlocklistRepository +import org.openapitools.repository.UserRepository +import org.openapitools.security.JwtUtils +import org.springframework.beans.factory.annotation.Autowired +import org.springframework.beans.factory.annotation.Value +import org.springframework.boot.test.context.SpringBootTest +import org.springframework.boot.test.context.TestConfiguration +import org.springframework.context.annotation.Bean +import org.springframework.context.annotation.Import +import org.springframework.jdbc.core.JdbcTemplate +import org.springframework.security.crypto.password.PasswordEncoder +import org.springframework.test.context.TestPropertySource +import retrofit2.Call +import retrofit2.Response +import java.math.BigDecimal +import org.openapitools.internal.model.HelpResponse as InternalHelpResponse + +/** + * Provider-side verification of the web-client → spring-api pact. + * + * Replays the consumer contract (web-client/pacts/) against the real Spring app over HTTP. + * The downstream Python GenAI clients are mocked. + */ +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@TestPropertySource( + properties = [ + "ai.hmac.secret=test-secret-for-testing", + "spring.main.allow-bean-definition-overriding=true", + ], +) +@Import(SpringApiProviderPactTest.MockAiClients::class) +@Provider("spring-api") +@PactFolder("../../web-client/pacts") +class SpringApiProviderPactTest { + @TestConfiguration + class MockAiClients { + @Bean + fun recipeServiceApi(): RecipeServiceApi = Mockito.mock(RecipeServiceApi::class.java) + + @Bean + fun helpServiceApi(): HelpServiceApi = Mockito.mock(HelpServiceApi::class.java) + } + + @Value("\${local.server.port}") + private var port: Int = 0 + + @Autowired + private lateinit var userRepository: UserRepository + + @Autowired + private lateinit var recipeRepository: RecipeRepository + + @Autowired + private lateinit var tokenBlocklist: TokenBlocklistRepository + + @Autowired + private lateinit var passwordEncoder: PasswordEncoder + + @Autowired + private lateinit var jwtUtils: JwtUtils + + @Autowired + private lateinit var jdbcTemplate: JdbcTemplate + + @Autowired + private lateinit var recipeServiceApi: RecipeServiceApi + + @Autowired + private lateinit var helpServiceApi: HelpServiceApi + + /** Bearer token for the current interaction, set when a state creates a user. */ + private var bearerToken: String? = null + + @BeforeEach + fun before(context: PactVerificationContext) { + recipeRepository.deleteAll() + tokenBlocklist.deleteAll() + userRepository.deleteAll() + bearerToken = null + stubAiClients() + context.target = HttpTestTarget("localhost", port) + } + + @State("no user testuser exists") + fun noUser() { + // Database is already emptied in before(); nothing to set up. + } + + @State("a user testuser exists") + fun aUserExists() { + createUserAndToken() + } + + @State("no authenticated user") + fun noAuthenticatedUser() { + // No user created and no token injected → the request stays unauthenticated → 401. + } + + @State("username taken is registered to another user") + fun usernameTaken() { + createUserAndToken() + userRepository.save( + UserEntity(username = "taken", password = passwordEncoder.encode("another-password")!!), + ) + } + + @State("a user testuser has a recipe") + fun aUserHasARecipe() { + val user = createUserAndToken() + // The pact requests /recipes/1, so pin the identity: the table was just + // emptied in before(), so the next insert takes id = 1. + jdbcTemplate.execute("ALTER TABLE recipes ALTER COLUMN id RESTART WITH 1") + recipeRepository.save( + RecipeEntity( + title = "Pancakes", + ingredients = """[{"quantity":1,"unit":"cup","name":"Flour"}]""", + instructions = """["Mix the batter.","Cook on a griddle."]""", + portions = BigDecimal("2"), + nutrientKcal = 200, + nutrientCarb = 35, + nutrientProt = 5, + nutrientFat = 3, + user = user, + ), + ) + } + + @TestTemplate + @ExtendWith(PactVerificationInvocationContextProvider::class) + fun verifyPact( + context: PactVerificationContext, + request: HttpRequest, + ) { + bearerToken?.let { request.setHeader("Authorization", "Bearer $it") } + context.verifyInteraction() + } + + private fun createUserAndToken(): UserEntity { + val user = + userRepository.save( + UserEntity(username = "testuser", password = passwordEncoder.encode("testpass1234")!!), + ) + bearerToken = jwtUtils.generateToken(user.id) + return user + } + + private fun stubAiClients() { + Mockito.reset(recipeServiceApi, helpServiceApi) + + val recipesCall = + mockCall( + listOf( + RecipeInput( + title = "Pancakes", + ingredients = listOf(RecipeIngredient(quantity = 1.0, unit = "cup", name = "Flour")), + instructions = listOf("Mix the batter.", "Cook on a griddle."), + portions = 2.0, + nutrients = RecipeNutrients(calories = 200, protein = 5, fat = 3, carbs = 35), + ), + ), + ) + whenever(recipeServiceApi.aiRecipesPost(any(), any(), any())).thenReturn(recipesCall) + + val helpCall = mockCall(InternalHelpResponse(response = "Grease the pan well.")) + whenever(helpServiceApi.aiHelpPost(any(), any(), any())).thenReturn(helpCall) + } + + private fun mockCall(body: T): Call { + @Suppress("UNCHECKED_CAST") + val call = Mockito.mock(Call::class.java) as Call + whenever(call.execute()).thenReturn(Response.success(body)) + return call + } +} diff --git a/web-client/package-lock.json b/web-client/package-lock.json index 7d70001..193ba36 100644 --- a/web-client/package-lock.json +++ b/web-client/package-lock.json @@ -19,6 +19,7 @@ }, "devDependencies": { "@eslint/js": "^10.0.1", + "@pact-foundation/pact": "^17.0.1", "@playwright/test": "^1.60.0", "@tailwindcss/vite": "^4.2.4", "@testing-library/jest-dom": "^6.9.1", @@ -1266,6 +1267,188 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@pact-foundation/pact": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/@pact-foundation/pact/-/pact-17.0.1.tgz", + "integrity": "sha512-Gnzy9fMK0Wu6UB8u0fYcso5fiEZk+Tu2lG9zR5DoJiwWBanb/9/pOmRrBWtOHn5EdgvEvzIF1huB39sZIc27Rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pact-foundation/pact-core": "^19.2.0", + "@scarf/scarf": "^1.4.0", + "axios": "^1.12.2", + "body-parser": "^2.2.0", + "chalk": "4.1.2", + "express": "^5.1.0", + "graphql": "^16.11.0", + "graphql-tag": "^2.12.6", + "http-proxy": "^1.18.1", + "https-proxy-agent": "^7.0.6", + "js-base64": "^3.7.8", + "lodash": "^4.17.21", + "ramda": "^0.32.0", + "randexp": "^0.5.3", + "router": "^2.2.0", + "stack-utils": "^2.0.6" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@pact-foundation/pact-core": { + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/@pact-foundation/pact-core/-/pact-core-19.2.0.tgz", + "integrity": "sha512-7EB2e850hmBzGnwOYTRj4TCFCJQa9zaOy53bK+ybzEDx801olf0gVlYqMYHt1EsHUZzmtS5uDybpr9UMcZQxgg==", + "cpu": [ + "x64", + "ia32", + "arm64" + ], + "dev": true, + "license": "MIT", + "os": [ + "darwin", + "linux", + "win32" + ], + "dependencies": { + "check-types": "11.2.3", + "detect-libc": "^2.0.3", + "node-gyp-build": "^4.6.0", + "pino": "^10.0.0", + "pino-pretty": "^13.1.1", + "underscore": "1.13.8" + }, + "engines": { + "node": ">=20" + }, + "optionalDependencies": { + "@pact-foundation/pact-core-darwin-arm64": "19.2.0", + "@pact-foundation/pact-core-darwin-x64": "19.2.0", + "@pact-foundation/pact-core-linux-arm64-glibc": "19.2.0", + "@pact-foundation/pact-core-linux-arm64-musl": "19.2.0", + "@pact-foundation/pact-core-linux-x64-glibc": "19.2.0", + "@pact-foundation/pact-core-linux-x64-musl": "19.2.0", + "@pact-foundation/pact-core-windows-x64": "19.2.0" + } + }, + "node_modules/@pact-foundation/pact-core-darwin-arm64": { + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/@pact-foundation/pact-core-darwin-arm64/-/pact-core-darwin-arm64-19.2.0.tgz", + "integrity": "sha512-cQvvWfJKS7iMzkunzh/kdgmyVLhAxyr/BQ8fOnMco2M/1+GHR+sOXvhrR1tes+NAYd1xjE3fbg1K2Flno8aDBw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@pact-foundation/pact-core-darwin-x64": { + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/@pact-foundation/pact-core-darwin-x64/-/pact-core-darwin-x64-19.2.0.tgz", + "integrity": "sha512-UltPXDZ+h1r3JqgIpEBP16bQzB90otd1QbcoeM3XakF9khCrYhW4y9llSuaosyqPFYwCk+mLaZTl/4iitJJaow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@pact-foundation/pact-core-linux-arm64-glibc": { + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/@pact-foundation/pact-core-linux-arm64-glibc/-/pact-core-linux-arm64-glibc-19.2.0.tgz", + "integrity": "sha512-amiv4COurH1FRa7DSH3ks4UPQCb5J3x4GKrArf8UsTOkNhVGFUWVl83LOELj9Gtk67GwJ96iF7/fQps8I/iFIA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@pact-foundation/pact-core-linux-arm64-musl": { + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/@pact-foundation/pact-core-linux-arm64-musl/-/pact-core-linux-arm64-musl-19.2.0.tgz", + "integrity": "sha512-tGWF7dP72Ho1A1PApyUqUMRI/e+gfbPxfaXxwWMXNh8JLK2jQQnP4bWymGwHQ4vxL7wn8ayx8I5y6x1vk/2+rA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@pact-foundation/pact-core-linux-x64-glibc": { + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/@pact-foundation/pact-core-linux-x64-glibc/-/pact-core-linux-x64-glibc-19.2.0.tgz", + "integrity": "sha512-/ZNuWKuFJSBRZH09t7FXqKLy5koCaMIZ4RdbockLYlNo8uWF2ALfRCllj+SbXPLK+T+lVnBrs5s94X2cu4Rc7A==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@pact-foundation/pact-core-linux-x64-musl": { + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/@pact-foundation/pact-core-linux-x64-musl/-/pact-core-linux-x64-musl-19.2.0.tgz", + "integrity": "sha512-n0m39CzVkq8J2alir1redm0rAdUVQzkKJqYBQdRmhEIa+QeGjUrJq+gmakUysoJxfSY4UthnJ9jS8SoyiZ+k6A==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@pact-foundation/pact-core-windows-x64": { + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/@pact-foundation/pact-core-windows-x64/-/pact-core-windows-x64-19.2.0.tgz", + "integrity": "sha512-WZSDBL1Sn8y5+YJTK+HDiS/Fn9th1M4QJW2dflQ8UFwoaIh6yb0TrJjtuWbDGIwNeD4Sv8CJ5jJOf1nyNjFLfg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@pinojs/redact": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@pinojs/redact/-/redact-0.4.0.tgz", + "integrity": "sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg==", + "dev": true, + "license": "MIT" + }, "node_modules/@playwright/test": { "version": "1.60.0", "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.60.0.tgz", @@ -1639,6 +1822,14 @@ "win32" ] }, + "node_modules/@scarf/scarf": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scarf/scarf/-/scarf-1.4.0.tgz", + "integrity": "sha512-xxeapPiUXdZAE3che6f3xogoJPeZgig6omHEy1rIY5WVsB3H2BHNnZH+gHG6x91SCWyQCzWGsuL2Hh3ClO5/qQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0" + }, "node_modules/@standard-schema/spec": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", @@ -2602,6 +2793,20 @@ "url": "https://opencollective.com/vitest" } }, + "node_modules/accepts": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/acorn": { "version": "8.16.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", @@ -2625,6 +2830,16 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, "node_modules/ajv": { "version": "6.15.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", @@ -2706,6 +2921,63 @@ "dev": true, "license": "MIT" }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/atomic-sleep": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", + "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/axios": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.18.1.tgz", + "integrity": "sha512-3nTvFlvpn9Zu/RkHUqtc7/+al4UpRW5az71ap5zccp6e8RAYEzhMTecX8Dz1wWDYrPpUoB1HAQEGEAEvUr7S9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.16.0", + "form-data": "^4.0.5", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" + } + }, + "node_modules/axios/node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/axios/node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/bail": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", @@ -2749,6 +3021,31 @@ "require-from-string": "^2.0.2" } }, + "node_modules/body-parser": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.3.0.tgz", + "integrity": "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "^3.1.2", + "content-type": "^2.0.0", + "debug": "^4.4.3", + "http-errors": "^2.0.1", + "iconv-lite": "^0.7.2", + "on-finished": "^2.4.1", + "qs": "^6.15.2", + "raw-body": "^3.0.2", + "type-is": "^2.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/brace-expansion": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", @@ -2796,6 +3093,47 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/caniuse-lite": { "version": "1.0.30001791", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001791.tgz", @@ -2837,6 +3175,39 @@ "node": ">=18" } }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/character-entities": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", @@ -2877,6 +3248,53 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/check-types": { + "version": "11.2.3", + "resolved": "https://registry.npmjs.org/check-types/-/check-types-11.2.3.tgz", + "integrity": "sha512-+67P1GkJRaxQD6PKK0Et9DhwQB+vGg3PM5+aavopCpZT1lj9jeqfvpgTLAWErNj8qApkkmXlu/Ug74kmhagkXg==", + "dev": true, + "license": "MIT" + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/comma-separated-tokens": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", @@ -2887,6 +3305,34 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/content-disposition": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz", + "integrity": "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/content-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz", + "integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -2907,8 +3353,18 @@ "url": "https://opencollective.com/express" } }, - "node_modules/cross-spawn": { - "version": "7.0.6", + "node_modules/cookie-signature": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.6.0" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, @@ -2975,6 +3431,16 @@ "node": "^20.19.0 || ^22.12.0 || >=24.0.0" } }, + "node_modules/dateformat": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", + "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -3019,6 +3485,26 @@ "dev": true, "license": "MIT" }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/dequal": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", @@ -3059,6 +3545,38 @@ "license": "MIT", "peer": true }, + "node_modules/drange": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/drange/-/drange-1.1.1.tgz", + "integrity": "sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true, + "license": "MIT" + }, "node_modules/electron-to-chromium": { "version": "1.5.349", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.349.tgz", @@ -3066,6 +3584,26 @@ "dev": true, "license": "ISC" }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, "node_modules/enhanced-resolve": { "version": "5.21.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.21.0.tgz", @@ -3093,6 +3631,26 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-module-lexer": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.1.0.tgz", @@ -3100,6 +3658,35 @@ "dev": true, "license": "MIT" }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/esbuild": { "version": "0.27.7", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", @@ -3152,6 +3739,13 @@ "node": ">=6" } }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true, + "license": "MIT" + }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -3367,6 +3961,23 @@ "node": ">=0.10.0" } }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true, + "license": "MIT" + }, "node_modules/expect-type": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", @@ -3377,12 +3988,83 @@ "node": ">=12.0.0" } }, + "node_modules/express": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", + "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "accepts": "^2.0.0", + "body-parser": "^2.2.1", + "content-disposition": "^1.0.0", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.2.1", + "debug": "^4.4.0", + "depd": "^2.0.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "finalhandler": "^2.1.0", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "merge-descriptors": "^2.0.0", + "mime-types": "^3.0.0", + "on-finished": "^2.4.1", + "once": "^1.4.0", + "parseurl": "^1.3.3", + "proxy-addr": "^2.0.7", + "qs": "^6.14.0", + "range-parser": "^1.2.1", + "router": "^2.2.0", + "send": "^1.1.0", + "serve-static": "^2.2.0", + "statuses": "^2.0.1", + "type-is": "^2.0.1", + "vary": "^1.1.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express/node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express/node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "license": "MIT" }, + "node_modules/fast-copy": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-4.0.3.tgz", + "integrity": "sha512-58apWr0GUiDFM8+3afrO6eYwJBn9ZAhDOzG3L+/9llab/haCARS2UIfffmOurYLwbgDRs8n0rfr6qAAPEAuAQw==", + "dev": true, + "license": "MIT" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -3404,6 +4086,13 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "dev": true, + "license": "MIT" + }, "node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", @@ -3435,6 +4124,28 @@ "node": ">=16.0.0" } }, + "node_modules/finalhandler": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz", + "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -3473,6 +4184,87 @@ "dev": true, "license": "ISC" }, + "node_modules/follow-redirects": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", + "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.4", + "mime-types": "^2.1.35" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/form-data/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/form-data/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -3488,6 +4280,16 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -3498,6 +4300,45 @@ "node": ">=6.9.0" } }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -3524,6 +4365,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -3531,6 +4385,32 @@ "dev": true, "license": "ISC" }, + "node_modules/graphql": { + "version": "16.14.2", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.14.2.tgz", + "integrity": "sha512-Chq1s4CY7jmh8gO2qvLIJyfCDIN+EHLFW/9iShnp1z8FjBQMoodWP1kDC36VAMXXIvAjj4ARa7ntfAV2BrjsbA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" + } + }, + "node_modules/graphql-tag": { + "version": "2.12.7", + "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.7.tgz", + "integrity": "sha512-xnE/NFzy+0eIesvAsREJZ284zTl/wYuBAvpsFSDhRGRdRHdnE90M21Q3xAWyYInb0J756c6x0pIQ62+vtvOs1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -3541,6 +4421,48 @@ "node": ">=8" } }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/hast-util-to-jsx-runtime": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.6.tgz", @@ -3581,6 +4503,13 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/help-me": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/help-me/-/help-me-5.0.0.tgz", + "integrity": "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==", + "dev": true, + "license": "MIT" + }, "node_modules/hermes-estree": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz", @@ -3627,14 +4556,64 @@ "void-elements": "3.1.0" } }, - "node_modules/html-url-attributes": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.1.tgz", - "integrity": "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==", + "node_modules/html-url-attributes": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.1.tgz", + "integrity": "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/http-proxy": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dev": true, "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" } }, "node_modules/i18next": { @@ -3665,6 +4644,23 @@ } } }, + "node_modules/iconv-lite": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -3695,12 +4691,29 @@ "node": ">=8" } }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, "node_modules/inline-style-parser": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.7.tgz", "integrity": "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==", "license": "MIT" }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, "node_modules/is-alphabetical": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", @@ -3787,6 +4800,13 @@ "dev": true, "license": "MIT" }, + "node_modules/is-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "dev": true, + "license": "MIT" + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -3843,6 +4863,23 @@ "jiti": "lib/jiti-cli.mjs" } }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/js-base64": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.8.0.tgz", + "integrity": "sha512-65kvbemyZhj+ExQt1PEFyBEjL5vAHysu1lJdW1AwhhChkO8ZBPizYk/m9GVrpbS2Je1hF+UYZ+6KywqtZV8mHw==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -4249,6 +5286,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "dev": true, + "license": "MIT" + }, "node_modules/longest-streak": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", @@ -4331,6 +5375,16 @@ "node": ">=10" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/mdast-util-from-markdown": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.3.tgz", @@ -4491,6 +5545,29 @@ "dev": true, "license": "CC0-1.0" }, + "node_modules/media-typer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/merge-descriptors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/micromark": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz", @@ -4933,6 +6010,33 @@ ], "license": "MIT" }, + "node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", @@ -4959,6 +6063,16 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -4991,6 +6105,28 @@ "dev": true, "license": "MIT" }, + "node_modules/negotiator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "dev": true, + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, "node_modules/node-releases": { "version": "2.0.38", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.38.tgz", @@ -4998,6 +6134,19 @@ "dev": true, "license": "MIT" }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/obug": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.1.tgz", @@ -5009,6 +6158,39 @@ ], "license": "MIT" }, + "node_modules/on-exit-leak-free": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz", + "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -5097,6 +6279,16 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -5117,6 +6309,17 @@ "node": ">=8" } }, + "node_modules/path-to-regexp": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz", + "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/pathe": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", @@ -5144,6 +6347,71 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pino": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/pino/-/pino-10.3.1.tgz", + "integrity": "sha512-r34yH/GlQpKZbU1BvFFqOjhISRo1MNx1tWYsYvmj6KIRHSPMT2+yHOEb1SG6NMvRoHRF0a07kCOox/9yakl1vg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pinojs/redact": "^0.4.0", + "atomic-sleep": "^1.0.0", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^3.0.0", + "pino-std-serializers": "^7.0.0", + "process-warning": "^5.0.0", + "quick-format-unescaped": "^4.0.3", + "real-require": "^0.2.0", + "safe-stable-stringify": "^2.3.1", + "sonic-boom": "^4.0.1", + "thread-stream": "^4.0.0" + }, + "bin": { + "pino": "bin.js" + } + }, + "node_modules/pino-abstract-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-3.0.0.tgz", + "integrity": "sha512-wlfUczU+n7Hy/Ha5j9a/gZNy7We5+cXp8YL+X+PG8S0KXxw7n/JXA3c46Y0zQznIJ83URJiwy7Lh56WLokNuxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "split2": "^4.0.0" + } + }, + "node_modules/pino-pretty": { + "version": "13.1.3", + "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-13.1.3.tgz", + "integrity": "sha512-ttXRkkOz6WWC95KeY9+xxWL6AtImwbyMHrL1mSwqwW9u+vLp/WIElvHvCSDg0xO/Dzrggz1zv3rN5ovTRVowKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "colorette": "^2.0.7", + "dateformat": "^4.6.3", + "fast-copy": "^4.0.0", + "fast-safe-stringify": "^2.1.1", + "help-me": "^5.0.0", + "joycon": "^3.1.1", + "minimist": "^1.2.6", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^3.0.0", + "pump": "^3.0.0", + "secure-json-parse": "^4.0.0", + "sonic-boom": "^4.0.1", + "strip-json-comments": "^5.0.2" + }, + "bin": { + "pino-pretty": "bin.js" + } + }, + "node_modules/pino-std-serializers": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-7.1.0.tgz", + "integrity": "sha512-BndPH67/JxGExRgiX1dX0w1FvZck5Wa4aal9198SrRhZjH3GxKQUKIBnYJTdj2HDN3UQAS06HlfcSbQj2OHmaw==", + "dev": true, + "license": "MIT" + }, "node_modules/playwright": { "version": "1.60.0", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.60.0.tgz", @@ -5217,66 +6485,197 @@ "source-map-js": "^1.2.1" }, "engines": { - "node": "^10 || ^12 || >=14" + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", + "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/process-warning": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-5.0.0.tgz", + "integrity": "sha512-a39t9ApHNx2L4+HBnQKqxxHNs1r7KF+Intd8Q/g1bUh6q0WIp9voPXJ/x0j+ZL45KF1pJd9+q2jLIRMfvEshkA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "MIT" + }, + "node_modules/property-information": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.1.0.tgz", + "integrity": "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/pump": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", + "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" } }, - "node_modules/postcss-selector-parser": { - "version": "6.0.10", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", - "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", - "license": "MIT", + "node_modules/qs": { + "version": "6.15.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz", + "integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==", + "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" + "es-define-property": "^1.0.1", + "side-channel": "^1.1.1" }, "engines": { - "node": ">=4" + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "node_modules/quick-format-unescaped": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", + "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==", + "dev": true, + "license": "MIT" + }, + "node_modules/ramda": { + "version": "0.32.0", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.32.0.tgz", + "integrity": "sha512-GQWAHhxhxWBWA8oIBr1XahFVjQ9Fic6MK9ikijfd4TZHfE2+urfk+irVlR5VOn48uwMgM+loRRBJd6Yjsbc0zQ==", "dev": true, "license": "MIT", - "engines": { - "node": ">= 0.8.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ramda" } }, - "node_modules/pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "node_modules/randexp": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.5.3.tgz", + "integrity": "sha512-U+5l2KrcMNOUPYvazA3h5ekF80FHTUG+87SEAmHZmolh1M+i/WyTCxVzmi+tidIa1tM4BSe8g2Y/D3loWDjj+w==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "drange": "^1.0.2", + "ret": "^0.2.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=4" } }, - "node_modules/property-information": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.1.0.tgz", - "integrity": "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==", + "node_modules/range-parser": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.3.0.tgz", + "integrity": "sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw==", + "dev": true, "license": "MIT", + "engines": { + "node": ">= 0.6" + }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "type": "opencollective", + "url": "https://opencollective.com/express" } }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "node_modules/raw-body": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", + "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", "dev": true, "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.7.0", + "unpipe": "~1.0.0" + }, "engines": { - "node": ">=6" + "node": ">= 0.10" } }, "node_modules/react": { @@ -5410,6 +6809,16 @@ "react-dom": ">=18" } }, + "node_modules/real-require": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", + "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12.13.0" + } + }, "node_modules/redent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", @@ -5467,6 +6876,23 @@ "node": ">=0.10.0" } }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/ret": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.2.2.tgz", + "integrity": "sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/rollup": { "version": "4.60.2", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.2.tgz", @@ -5512,6 +6938,40 @@ "fsevents": "~2.3.2" } }, + "node_modules/router": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "depd": "^2.0.0", + "is-promise": "^4.0.0", + "parseurl": "^1.3.3", + "path-to-regexp": "^8.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/safe-stable-stringify": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, "node_modules/saxes": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", @@ -5531,6 +6991,23 @@ "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", "license": "MIT" }, + "node_modules/secure-json-parse": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-4.1.0.tgz", + "integrity": "sha512-l4KnYfEyqYJxDwlNVyRfO2E4NTHfMKAWdUuA8J0yve2Dz/E/PdBepY03RvyJpssIpRFwJoCD55wA+mEDs6ByWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -5541,12 +7018,66 @@ "semver": "bin/semver.js" } }, + "node_modules/send": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz", + "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.4.3", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.1", + "mime-types": "^3.0.2", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/serve-static": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz", + "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "parseurl": "^1.3.3", + "send": "^1.2.0" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/set-cookie-parser": { "version": "2.7.2", "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz", "integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==", "license": "MIT" }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true, + "license": "ISC" + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -5570,6 +7101,82 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz", + "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.4", + "side-channel-list": "^1.0.1", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", + "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/siginfo": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", @@ -5577,6 +7184,16 @@ "dev": true, "license": "ISC" }, + "node_modules/sonic-boom": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.2.1.tgz", + "integrity": "sha512-w6AxtubXa2wTXAUsZMMWERrsIRAdrK0Sc+FUytWvYAhBJLyuI4llrMIC1DtlNSdI99EI86KZum2MMq3EAZlF9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "atomic-sleep": "^1.0.0" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -5597,6 +7214,39 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -5604,6 +7254,16 @@ "dev": true, "license": "MIT" }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/std-env": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.1.0.tgz", @@ -5638,6 +7298,19 @@ "node": ">=8" } }, + "node_modules/strip-json-comments": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-5.0.3.tgz", + "integrity": "sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/style-to-js": { "version": "1.1.21", "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.21.tgz", @@ -5696,6 +7369,26 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/thread-stream": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-4.2.0.tgz", + "integrity": "sha512-e2zZ96wSChazBsbENf/Pcm/4swHt2cEKQ92rhUjkL9GCKiTDJIaTBenjE/m9DXi0QBmTMDkFDdOomUy20A1tDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "real-require": "^1.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/thread-stream/node_modules/real-require": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-1.0.0.tgz", + "integrity": "sha512-P4nbQYQfePJxRSmY+v/KINxVucm4NF3p3s7pJveMTtom52FR4YGltUQLB8idDXwDDWW+eYrWDFbuzUnjoWHF7g==", + "dev": true, + "license": "MIT" + }, "node_modules/tinybench": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", @@ -5760,6 +7453,16 @@ "dev": true, "license": "MIT" }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, "node_modules/tough-cookie": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.1.tgz", @@ -5824,8 +7527,7 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "dev": true, - "license": "0BSD", - "optional": true + "license": "0BSD" }, "node_modules/type-check": { "version": "0.4.0", @@ -5840,6 +7542,25 @@ "node": ">= 0.8.0" } }, + "node_modules/type-is": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.1.0.tgz", + "integrity": "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==", + "dev": true, + "license": "MIT", + "dependencies": { + "content-type": "^2.0.0", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/typescript": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", @@ -5878,6 +7599,13 @@ "typescript": ">=4.8.4 <6.1.0" } }, + "node_modules/underscore": { + "version": "1.13.8", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.8.tgz", + "integrity": "sha512-DXtD3ZtEQzc7M8m4cXotyHR+FAS18C64asBYY5vqZexfYryNNnDc02W4hKg3rdQuqOYas1jkseX0+nZXjTXnvQ==", + "dev": true, + "license": "MIT" + }, "node_modules/undici": { "version": "7.26.0", "resolved": "https://registry.npmjs.org/undici/-/undici-7.26.0.tgz", @@ -5982,6 +7710,16 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/update-browserslist-db": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", @@ -6038,6 +7776,16 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "license": "MIT" }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/vfile": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", @@ -6331,6 +8079,13 @@ "node": ">=0.10.0" } }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, "node_modules/xml-name-validator": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", diff --git a/web-client/package.json b/web-client/package.json index b3ce6c3..2a61848 100644 --- a/web-client/package.json +++ b/web-client/package.json @@ -24,6 +24,7 @@ }, "devDependencies": { "@eslint/js": "^10.0.1", + "@pact-foundation/pact": "^17.0.1", "@playwright/test": "^1.60.0", "@tailwindcss/vite": "^4.2.4", "@testing-library/jest-dom": "^6.9.1", diff --git a/web-client/pacts/web-client-spring-api.json b/web-client/pacts/web-client-spring-api.json new file mode 100644 index 0000000..3ec817d --- /dev/null +++ b/web-client/pacts/web-client-spring-api.json @@ -0,0 +1,1100 @@ +{ + "consumer": { + "name": "web-client" + }, + "interactions": [ + { + "description": "a registration request", + "providerStates": [ + { + "name": "no user testuser exists" + } + ], + "request": { + "body": { + "password": "testpass1234", + "username": "testuser" + }, + "headers": { + "Content-Type": "application/json" + }, + "method": "POST", + "path": "/api/v1/users/register" + }, + "response": { + "status": 201 + } + }, + { + "description": "a valid login request", + "providerStates": [ + { + "name": "a user testuser exists" + } + ], + "request": { + "body": { + "password": "testpass1234", + "username": "testuser" + }, + "headers": { + "Content-Type": "application/json" + }, + "method": "POST", + "path": "/api/v1/users/login" + }, + "response": { + "body": { + "token": "header.payload.signature" + }, + "headers": { + "Content-Type": "application/json", + "content-type": "application/json" + }, + "matchingRules": { + "body": { + "$.token": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + } + }, + "header": { + "content-type": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "application/json.*" + } + ] + } + } + }, + "status": 200 + } + }, + { + "description": "a logout request", + "providerStates": [ + { + "name": "a user testuser exists" + } + ], + "request": { + "headers": { + "authorization": "Bearer header.payload.signature" + }, + "matchingRules": { + "header": { + "authorization": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "Bearer .+" + } + ] + } + } + }, + "method": "POST", + "path": "/api/v1/users/logout" + }, + "response": { + "status": 200 + } + }, + { + "description": "an authenticated request for the current user profile", + "providerStates": [ + { + "name": "a user testuser exists" + } + ], + "request": { + "headers": { + "authorization": "Bearer header.payload.signature" + }, + "matchingRules": { + "header": { + "authorization": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "Bearer .+" + } + ] + } + } + }, + "method": "GET", + "path": "/api/v1/users/profile" + }, + "response": { + "body": { + "preferences": {}, + "username": "testuser" + }, + "headers": { + "Content-Type": "application/json", + "content-type": "application/json" + }, + "matchingRules": { + "body": { + "$": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + } + }, + "header": { + "content-type": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "application/json.*" + } + ] + } + } + }, + "status": 200 + } + }, + { + "description": "a profile update", + "providerStates": [ + { + "name": "a user testuser exists" + } + ], + "request": { + "body": { + "preferences": { + "language": "EN" + } + }, + "headers": { + "Content-Type": "application/json", + "authorization": "Bearer header.payload.signature" + }, + "matchingRules": { + "header": { + "authorization": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "Bearer .+" + } + ] + } + } + }, + "method": "PUT", + "path": "/api/v1/users/profile" + }, + "response": { + "status": 200 + } + }, + { + "description": "a profile deletion", + "providerStates": [ + { + "name": "a user testuser exists" + } + ], + "request": { + "headers": { + "authorization": "Bearer header.payload.signature" + }, + "matchingRules": { + "header": { + "authorization": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "Bearer .+" + } + ] + } + } + }, + "method": "DELETE", + "path": "/api/v1/users/profile" + }, + "response": { + "status": 204 + } + }, + { + "description": "a request for the user's recipes", + "providerStates": [ + { + "name": "a user testuser has a recipe" + } + ], + "request": { + "headers": { + "authorization": "Bearer header.payload.signature" + }, + "matchingRules": { + "header": { + "authorization": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "Bearer .+" + } + ] + } + } + }, + "method": "GET", + "path": "/api/v1/recipes" + }, + "response": { + "body": [ + { + "createdAt": "2024-01-01T00:00:00Z", + "editedAt": "2024-01-01T00:00:00Z", + "id": 1, + "ingredients": [ + { + "name": "Flour", + "quantity": 1, + "unit": "cup" + } + ], + "instructions": [ + "Mix the batter." + ], + "nutrients": { + "calories": 200, + "carbs": 35, + "fat": 3, + "protein": 5 + }, + "portions": 2, + "title": "Pancakes" + } + ], + "headers": { + "Content-Type": "application/json", + "content-type": "application/json" + }, + "matchingRules": { + "body": { + "$": { + "combine": "AND", + "matchers": [ + { + "match": "type", + "min": 1 + } + ] + }, + "$[*].createdAt": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$[*].editedAt": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$[*].id": { + "combine": "AND", + "matchers": [ + { + "match": "integer" + } + ] + }, + "$[*].ingredients": { + "combine": "AND", + "matchers": [ + { + "match": "type", + "min": 1 + } + ] + }, + "$[*].ingredients[*].name": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$[*].ingredients[*].quantity": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$[*].ingredients[*].unit": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$[*].instructions": { + "combine": "AND", + "matchers": [ + { + "match": "type", + "min": 1 + } + ] + }, + "$[*].nutrients": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$[*].portions": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$[*].title": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + } + }, + "header": { + "content-type": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "application/json.*" + } + ] + } + } + }, + "status": 200 + } + }, + { + "description": "a request to save a recipe", + "providerStates": [ + { + "name": "a user testuser exists" + } + ], + "request": { + "body": { + "ingredients": [ + { + "name": "Flour", + "quantity": 1, + "unit": "cup" + } + ], + "instructions": [ + "Mix the batter.", + "Cook on a griddle." + ], + "nutrients": { + "calories": 200, + "carbs": 35, + "fat": 3, + "protein": 5 + }, + "portions": 2, + "title": "Pancakes" + }, + "headers": { + "Content-Type": "application/json", + "authorization": "Bearer header.payload.signature" + }, + "matchingRules": { + "header": { + "authorization": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "Bearer .+" + } + ] + } + } + }, + "method": "POST", + "path": "/api/v1/recipes" + }, + "response": { + "body": { + "id": 1 + }, + "headers": { + "Content-Type": "application/json", + "content-type": "application/json" + }, + "matchingRules": { + "body": { + "$.id": { + "combine": "AND", + "matchers": [ + { + "match": "integer" + } + ] + } + }, + "header": { + "content-type": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "application/json.*" + } + ] + } + } + }, + "status": 201 + } + }, + { + "description": "a request for a single recipe by id", + "providerStates": [ + { + "name": "a user testuser has a recipe" + } + ], + "request": { + "headers": { + "authorization": "Bearer header.payload.signature" + }, + "matchingRules": { + "header": { + "authorization": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "Bearer .+" + } + ] + } + } + }, + "method": "GET", + "path": "/api/v1/recipes/1" + }, + "response": { + "body": { + "createdAt": "2024-01-01T00:00:00Z", + "editedAt": "2024-01-01T00:00:00Z", + "id": 1, + "ingredients": [ + { + "name": "Flour", + "quantity": 1, + "unit": "cup" + } + ], + "instructions": [ + "Mix the batter." + ], + "nutrients": { + "calories": 200, + "carbs": 35, + "fat": 3, + "protein": 5 + }, + "portions": 2, + "title": "Pancakes" + }, + "headers": { + "Content-Type": "application/json", + "content-type": "application/json" + }, + "matchingRules": { + "body": { + "$": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$.createdAt": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$.editedAt": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$.id": { + "combine": "AND", + "matchers": [ + { + "match": "integer" + } + ] + }, + "$.ingredients": { + "combine": "AND", + "matchers": [ + { + "match": "type", + "min": 1 + } + ] + }, + "$.ingredients[*].name": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$.ingredients[*].quantity": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$.ingredients[*].unit": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$.instructions": { + "combine": "AND", + "matchers": [ + { + "match": "type", + "min": 1 + } + ] + }, + "$.nutrients": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$.portions": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$.title": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + } + }, + "header": { + "content-type": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "application/json.*" + } + ] + } + } + }, + "status": 200 + } + }, + { + "description": "a request to delete a recipe by id", + "providerStates": [ + { + "name": "a user testuser has a recipe" + } + ], + "request": { + "headers": { + "authorization": "Bearer header.payload.signature" + }, + "matchingRules": { + "header": { + "authorization": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "Bearer .+" + } + ] + } + } + }, + "method": "DELETE", + "path": "/api/v1/recipes/1" + }, + "response": { + "status": 204 + } + }, + { + "description": "a request to generate recipes", + "providerStates": [ + { + "name": "a user testuser exists" + } + ], + "request": { + "body": { + "language": "EN", + "prompt": "something quick with flour" + }, + "headers": { + "Content-Type": "application/json", + "authorization": "Bearer header.payload.signature" + }, + "matchingRules": { + "header": { + "authorization": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "Bearer .+" + } + ] + } + } + }, + "method": "POST", + "path": "/api/v1/ai/recipes" + }, + "response": { + "body": [ + { + "ingredients": [ + { + "name": "Flour", + "quantity": 1, + "unit": "cup" + } + ], + "instructions": [ + "Mix the batter." + ], + "nutrients": { + "calories": 200, + "carbs": 35, + "fat": 3, + "protein": 5 + }, + "portions": 2, + "title": "Pancakes" + } + ], + "headers": { + "Content-Type": "application/json", + "content-type": "application/json" + }, + "matchingRules": { + "body": { + "$": { + "combine": "AND", + "matchers": [ + { + "match": "type", + "min": 1 + } + ] + }, + "$[*].ingredients": { + "combine": "AND", + "matchers": [ + { + "match": "type", + "min": 1 + } + ] + }, + "$[*].ingredients[*].name": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$[*].ingredients[*].quantity": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$[*].ingredients[*].unit": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$[*].instructions": { + "combine": "AND", + "matchers": [ + { + "match": "type", + "min": 1 + } + ] + }, + "$[*].nutrients": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$[*].portions": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$[*].title": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + } + }, + "header": { + "content-type": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "application/json.*" + } + ] + } + } + }, + "status": 200 + } + }, + { + "description": "a request for cooking help", + "providerStates": [ + { + "name": "a user testuser exists" + } + ], + "request": { + "body": { + "prompt": "How do I stop it sticking?", + "recipe": { + "ingredients": [ + { + "name": "Flour", + "quantity": 1, + "unit": "cup" + } + ], + "instructions": [ + "Mix the batter.", + "Cook on a griddle." + ], + "nutrients": { + "calories": 200, + "carbs": 35, + "fat": 3, + "protein": 5 + }, + "portions": 2, + "title": "Pancakes" + } + }, + "headers": { + "Content-Type": "application/json", + "authorization": "Bearer header.payload.signature" + }, + "matchingRules": { + "header": { + "authorization": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "Bearer .+" + } + ] + } + } + }, + "method": "POST", + "path": "/api/v1/ai/help" + }, + "response": { + "body": { + "response": "Grease the pan well." + }, + "headers": { + "Content-Type": "application/json", + "content-type": "application/json" + }, + "matchingRules": { + "body": { + "$": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + } + }, + "header": { + "content-type": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "application/json.*" + } + ] + } + } + }, + "status": 200 + } + }, + { + "description": "an unauthenticated profile request", + "providerStates": [ + { + "name": "no authenticated user" + } + ], + "request": { + "method": "GET", + "path": "/api/v1/users/profile" + }, + "response": { + "status": 401 + } + }, + { + "description": "a request for a recipe that does not exist", + "providerStates": [ + { + "name": "a user testuser exists" + } + ], + "request": { + "headers": { + "authorization": "Bearer header.payload.signature" + }, + "matchingRules": { + "header": { + "authorization": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "Bearer .+" + } + ] + } + } + }, + "method": "GET", + "path": "/api/v1/recipes/999" + }, + "response": { + "status": 404 + } + }, + { + "description": "a profile update to an already-taken username", + "providerStates": [ + { + "name": "username taken is registered to another user" + } + ], + "request": { + "body": { + "username": "taken" + }, + "headers": { + "Content-Type": "application/json", + "authorization": "Bearer header.payload.signature" + }, + "matchingRules": { + "header": { + "authorization": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "Bearer .+" + } + ] + } + } + }, + "method": "PUT", + "path": "/api/v1/users/profile" + }, + "response": { + "body": { + "message": "Username already taken" + }, + "headers": { + "Content-Type": "application/json", + "content-type": "application/json" + }, + "matchingRules": { + "body": { + "$": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + } + }, + "header": { + "content-type": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "application/json.*" + } + ] + } + } + }, + "status": 409 + } + }, + { + "description": "a profile update with an invalid username", + "providerStates": [ + { + "name": "a user testuser exists" + } + ], + "request": { + "body": { + "username": "invalid name" + }, + "headers": { + "Content-Type": "application/json", + "authorization": "Bearer header.payload.signature" + }, + "matchingRules": { + "header": { + "authorization": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "Bearer .+" + } + ] + } + } + }, + "method": "PUT", + "path": "/api/v1/users/profile" + }, + "response": { + "status": 400 + } + } + ], + "metadata": { + "pact-js": { + "version": "17.0.1" + }, + "pactRust": { + "ffi": "0.5.4", + "models": "1.3.11" + }, + "pactSpecification": { + "version": "3.0.0" + } + }, + "provider": { + "name": "spring-api" + } +} diff --git a/web-client/tests/pact/spring-api.pact.test.ts b/web-client/tests/pact/spring-api.pact.test.ts new file mode 100644 index 0000000..dce72eb --- /dev/null +++ b/web-client/tests/pact/spring-api.pact.test.ts @@ -0,0 +1,314 @@ +/** + * Consumer-driven contract test: web-client → spring-api (public REST boundary). + * + * Exercises the real client code against a Pact mock + * server for every route the client uses, and generates a pact. The pact + * (web-client/pacts/) is later replayed against the running Spring provider. + */ +import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest' +import { act, renderHook } from '@testing-library/react' +import { MatchersV3, PactV3 } from '@pact-foundation/pact' + +const { like, eachLike, integer, regex } = MatchersV3 + +const MOCK_PORT = 9200 + +// Loaded after the env is stubbed so the client's base URL points at the mock. +let auth: typeof import('../../src/auth') +let api: typeof import('../../src/useApi') + +const pact = new PactV3({ + consumer: 'web-client', + provider: 'spring-api', + dir: 'pacts', + port: MOCK_PORT, +}) + +// Reusable example shapes matching the OpenAPI schemas. +const bearer = { authorization: regex('Bearer .+', 'Bearer header.payload.signature') } +const jsonHeaders = { 'content-type': 'application/json' } +const jsonResponse = { 'content-type': regex('application/json.*', 'application/json') } + +const recipeInputBody = { + title: 'Pancakes', + ingredients: [{ quantity: 1, unit: 'cup', name: 'Flour' }], + instructions: ['Mix the batter.', 'Cook on a griddle.'], + portions: 2, + nutrients: { calories: 200, protein: 5, fat: 3, carbs: 35 }, +} + +const recipeResponseShape = { + id: integer(1), + title: like('Pancakes'), + ingredients: eachLike({ quantity: like(1), unit: like('cup'), name: like('Flour') }), + instructions: eachLike('Mix the batter.'), + portions: like(2), + nutrients: like({ calories: 200, protein: 5, fat: 3, carbs: 35 }), + createdAt: like('2024-01-01T00:00:00Z'), + editedAt: like('2024-01-01T00:00:00Z'), +} + +beforeAll(async () => { + vi.stubEnv('VITE_API_BASE', `http://127.0.0.1:${MOCK_PORT}`) + auth = await import('../../src/auth') + api = await import('../../src/useApi') +}) + +afterAll(() => { + vi.unstubAllEnvs() +}) + +describe('web-client → spring-api pact', () => { + it('covers every route the web-client uses', async () => { + // --- Auth --- + pact + .given('no user testuser exists') + .uponReceiving('a registration request') + .withRequest({ + method: 'POST', + path: '/api/v1/users/register', + headers: jsonHeaders, + body: { username: 'testuser', password: 'testpass1234' }, + }) + .willRespondWith({ status: 201 }) + + pact + .given('a user testuser exists') + .uponReceiving('a valid login request') + .withRequest({ + method: 'POST', + path: '/api/v1/users/login', + headers: jsonHeaders, + body: { username: 'testuser', password: 'testpass1234' }, + }) + .willRespondWith({ + status: 200, + headers: jsonResponse, + body: { token: like('header.payload.signature') }, + }) + + pact + .given('a user testuser exists') + .uponReceiving('a logout request') + .withRequest({ method: 'POST', path: '/api/v1/users/logout', headers: bearer }) + .willRespondWith({ status: 200 }) + + // --- Profile --- + pact + .given('a user testuser exists') + .uponReceiving('an authenticated request for the current user profile') + .withRequest({ method: 'GET', path: '/api/v1/users/profile', headers: bearer }) + .willRespondWith({ + status: 200, + headers: jsonResponse, + body: like({ username: 'testuser', preferences: {} }), + }) + + pact + .given('a user testuser exists') + .uponReceiving('a profile update') + .withRequest({ + method: 'PUT', + path: '/api/v1/users/profile', + headers: { ...bearer, ...jsonHeaders }, + body: { preferences: { language: 'EN' } }, + }) + .willRespondWith({ status: 200 }) + + pact + .given('a user testuser exists') + .uponReceiving('a profile deletion') + .withRequest({ method: 'DELETE', path: '/api/v1/users/profile', headers: bearer }) + .willRespondWith({ status: 204 }) + + // --- Recipes --- + pact + .given('a user testuser has a recipe') + .uponReceiving("a request for the user's recipes") + .withRequest({ method: 'GET', path: '/api/v1/recipes', headers: bearer }) + .willRespondWith({ status: 200, headers: jsonResponse, body: eachLike(recipeResponseShape) }) + + pact + .given('a user testuser exists') + .uponReceiving('a request to save a recipe') + .withRequest({ + method: 'POST', + path: '/api/v1/recipes', + headers: { ...bearer, ...jsonHeaders }, + body: recipeInputBody, + }) + .willRespondWith({ status: 201, headers: jsonResponse, body: { id: integer(1) } }) + + pact + .given('a user testuser has a recipe') + .uponReceiving('a request for a single recipe by id') + .withRequest({ + method: 'GET', + path: '/api/v1/recipes/1', + headers: bearer, + }) + .willRespondWith({ status: 200, headers: jsonResponse, body: like(recipeResponseShape) }) + + pact + .given('a user testuser has a recipe') + .uponReceiving('a request to delete a recipe by id') + .withRequest({ + method: 'DELETE', + path: '/api/v1/recipes/1', + headers: bearer, + }) + .willRespondWith({ status: 204 }) + + // --- GenAI (via the gateway) --- + pact + .given('a user testuser exists') + .uponReceiving('a request to generate recipes') + .withRequest({ + method: 'POST', + path: '/api/v1/ai/recipes', + headers: { ...bearer, ...jsonHeaders }, + body: { prompt: 'something quick with flour', language: 'EN' }, + }) + .willRespondWith({ + status: 200, + headers: jsonResponse, + body: eachLike({ + title: like('Pancakes'), + ingredients: eachLike({ quantity: like(1), unit: like('cup'), name: like('Flour') }), + instructions: eachLike('Mix the batter.'), + portions: like(2), + nutrients: like({ calories: 200, protein: 5, fat: 3, carbs: 35 }), + }), + }) + + pact + .given('a user testuser exists') + .uponReceiving('a request for cooking help') + .withRequest({ + method: 'POST', + path: '/api/v1/ai/help', + headers: { ...bearer, ...jsonHeaders }, + body: { recipe: recipeInputBody, prompt: 'How do I stop it sticking?' }, + }) + .willRespondWith({ + status: 200, + headers: jsonResponse, + body: like({ response: 'Grease the pan well.' }), + }) + + // --- Error responses the client branches on --- + // 401: useApi signs the user out. Distinguishable from the happy path by the + // absence of a token (Pact can't tell two identical requests apart by state). + pact + .given('no authenticated user') + .uponReceiving('an unauthenticated profile request') + .withRequest({ method: 'GET', path: '/api/v1/users/profile' }) + .willRespondWith({ status: 401 }) + + // 404: RecipePage renders a "not found" state. + pact + .given('a user testuser exists') + .uponReceiving('a request for a recipe that does not exist') + .withRequest({ method: 'GET', path: '/api/v1/recipes/999', headers: bearer }) + .willRespondWith({ status: 404 }) + + // 409: ProfilePage shows "username taken". + pact + .given('username taken is registered to another user') + .uponReceiving('a profile update to an already-taken username') + .withRequest({ + method: 'PUT', + path: '/api/v1/users/profile', + headers: { ...bearer, ...jsonHeaders }, + body: { username: 'taken' }, + }) + .willRespondWith({ status: 409, headers: jsonResponse, body: like({ message: 'Username already taken' }) }) + + // 400: ProfilePage shows "invalid request". + pact + .given('a user testuser exists') + .uponReceiving('a profile update with an invalid username') + .withRequest({ + method: 'PUT', + path: '/api/v1/users/profile', + headers: { ...bearer, ...jsonHeaders }, + body: { username: 'invalid name' }, + }) + .willRespondWith({ status: 400 }) + + await pact.executeTest(async () => { + // Unauthenticated request (no token yet) — the client rejects with SessionExpiredError. + localStorage.clear() + const noAuthCall = renderHook(() => api.useApi(), { wrapper: auth.AuthProvider }).result.current + await expect(noAuthCall('/users/profile')).rejects.toThrow() + + // Register auto-logs in and persists the JWT (covers register + login). + const authHook = renderHook(() => auth.useAuth(), { wrapper: auth.AuthProvider }) + await act(async () => { + await authHook.result.current.register('testuser', 'testpass1234') + }) + expect(authHook.result.current.token).toBeTruthy() + + // Authenticated client reads the persisted token and sends it as Bearer. + const call = renderHook(() => api.useApi(), { wrapper: auth.AuthProvider }).result.current + + // Profile + expect((await call('/users/profile')).status).toBe(200) + await call('/users/profile', { + method: 'PUT', + headers: jsonHeaders, + body: JSON.stringify({ preferences: { language: 'EN' } }), + }) + + // Recipes + expect((await call('/recipes')).status).toBe(200) + const created = await call('/recipes', { + method: 'POST', + headers: jsonHeaders, + body: JSON.stringify(recipeInputBody), + }) + expect((await created.json()).id).toBeGreaterThan(0) + expect((await call('/recipes/1')).status).toBe(200) + expect((await call('/recipes/1', { method: 'DELETE' })).status).toBe(204) + + // GenAI + const gen = await call('/ai/recipes', { + method: 'POST', + headers: jsonHeaders, + body: JSON.stringify({ prompt: 'something quick with flour', language: 'EN' }), + }) + expect(Array.isArray(await gen.json())).toBe(true) + const help = await call('/ai/help', { + method: 'POST', + headers: jsonHeaders, + body: JSON.stringify({ recipe: recipeInputBody, prompt: 'How do I stop it sticking?' }), + }) + expect((await help.json()).response).toBeTruthy() + + // Error responses (useApi only throws on 401/403, so these return normally). + expect((await call('/recipes/999')).status).toBe(404) + expect( + ( + await call('/users/profile', { + method: 'PUT', + headers: jsonHeaders, + body: JSON.stringify({ username: 'taken' }), + }) + ).status, + ).toBe(409) + expect( + ( + await call('/users/profile', { + method: 'PUT', + headers: jsonHeaders, + body: JSON.stringify({ username: 'invalid name' }), + }) + ).status, + ).toBe(400) + + // Logout and account deletion last (deletion removes the user). + await call('/users/logout', { method: 'POST' }) + expect((await call('/users/profile', { method: 'DELETE' })).status).toBe(204) + }) + }) +})