diff --git a/.eslintignore b/.eslintignore index faed59562..38121682e 100644 --- a/.eslintignore +++ b/.eslintignore @@ -10,3 +10,4 @@ node_modules /spec/fixtures /scripts/**/*.js /protos/ +integration_test/scripts/generate.js \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index f225e5960..4655fcb71 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,6 +3,7 @@ module.exports = { es6: true, node: true, }, + ignorePatterns: ["integration_test/**/*"], extends: [ "eslint:recommended", "plugin:@typescript-eslint/recommended", diff --git a/integration_test/.gcloudignore b/integration_test/.gcloudignore new file mode 100644 index 000000000..34de70cb5 --- /dev/null +++ b/integration_test/.gcloudignore @@ -0,0 +1,24 @@ +# .gcloudignore for integration test Cloud Build +# Include all files needed for the build + +# Ignore node_modules as we'll install them fresh +node_modules/ +generated/ + +# Ignore local auth files (we'll use secrets instead) +sa.json +sa-v2.json +test-config.json + +# Ignore local test artifacts +test_failures.txt +*.log + +# Keep git info for reference +.git +.gitignore + +# Ignore temp files +*.tmp +*~ +.DS_Store \ No newline at end of file diff --git a/integration_test/.gitignore b/integration_test/.gitignore new file mode 100644 index 000000000..3cfa2c4e3 --- /dev/null +++ b/integration_test/.gitignore @@ -0,0 +1,8 @@ +node_modules/ +generated/ +.test-artifacts/ +*.log +.DS_Store +package-lock.json +firebase-debug.log +sa.json \ No newline at end of file diff --git a/integration_test/README.md b/integration_test/README.md index 3b0f5413f..d6c3f3824 100644 --- a/integration_test/README.md +++ b/integration_test/README.md @@ -1,22 +1,608 @@ -## How to Use +# Firebase Functions Declarative Integration Test Framework -**_ATTENTION_**: Running this test will wipe the contents of the Firebase project(s) you run it against. Make sure you use disposable Firebase project(s)! +## Overview -Run the integration test as follows: +This framework provides a declarative approach to Firebase Functions integration testing. It solves the critical issue of Firebase CLI's inability to discover dynamically-named functions by generating static function code from templates at build time rather than runtime. + +### Problem Solved + +The original integration tests used runtime TEST_RUN_ID injection for function isolation, which caused Firebase CLI deployment failures: + +- Dynamic CommonJS exports couldn't be re-exported through ES6 modules +- Firebase CLI requires static function names at deployment time +- Runtime function naming prevented proper function discovery + +### Solution + +This framework uses a template-based code generation approach where: + +1. Test suites are defined declaratively in YAML +2. Functions are generated from Handlebars templates with TEST_RUN_ID baked in +3. Generated code has static exports that Firebase CLI can discover +4. Each test run gets isolated function instances + +## Prerequisites + +Before running integration tests, ensure the Firebase Functions SDK is built and packaged: + +```bash +# From the root firebase-functions directory +npm run pack-for-integration-tests +``` + +This creates `integration_test/firebase-functions-local.tgz` which is used by all test suites. + +### Project Setup + +The integration tests require two Firebase projects: + +- **V1 Project**: For testing Firebase Functions v1 triggers +- **V2 Project**: For testing Firebase Functions v2 triggers + +#### Default Projects (Firebase Team) + +The framework uses these projects by default: + +- V1: `functions-integration-tests` +- V2: `functions-integration-tests-v2` + +#### Custom Projects (External Users) + +To use your own projects, you'll need to: + +1. **Create Firebase Projects**: + + ```bash + # Create V1 project + firebase projects:create your-v1-project-id + + # Create V2 project + firebase projects:create your-v2-project-id + ``` + +2. **Enable Required APIs**: + + ```bash + # Enable APIs for both projects + gcloud services enable cloudfunctions.googleapis.com --project=your-v1-project-id + gcloud services enable cloudfunctions.googleapis.com --project=your-v2-project-id + gcloud services enable cloudtasks.googleapis.com --project=your-v1-project-id + gcloud services enable cloudtasks.googleapis.com --project=your-v2-project-id + gcloud services enable cloudscheduler.googleapis.com --project=your-v2-project-id + gcloud services enable cloudtestservice.googleapis.com --project=your-v1-project-id + gcloud services enable cloudtestservice.googleapis.com --project=your-v2-project-id + ``` + +3. **Set Up Cloud Build Permissions** (if using Cloud Build): + + ```bash + # Get your Cloud Build project number + CLOUD_BUILD_PROJECT_NUMBER=$(gcloud projects describe YOUR_CLOUD_BUILD_PROJECT --format="value(projectNumber)") + + # Grant permissions to your V1 project + gcloud projects add-iam-policy-binding your-v1-project-id \ + --member="serviceAccount:${CLOUD_BUILD_PROJECT_NUMBER}@cloudbuild.gserviceaccount.com" \ + --role="roles/cloudtasks.admin" + + gcloud projects add-iam-policy-binding your-v1-project-id \ + --member="serviceAccount:${CLOUD_BUILD_PROJECT_NUMBER}@cloudbuild.gserviceaccount.com" \ + --role="roles/cloudscheduler.admin" + + gcloud projects add-iam-policy-binding your-v1-project-id \ + --member="serviceAccount:${CLOUD_BUILD_PROJECT_NUMBER}@cloudbuild.gserviceaccount.com" \ + --role="roles/cloudtestservice.testAdmin" + + gcloud projects add-iam-policy-binding your-v1-project-id \ + --member="serviceAccount:${CLOUD_BUILD_PROJECT_NUMBER}@cloudbuild.gserviceaccount.com" \ + --role="roles/firebase.admin" + + # Repeat for your V2 project + gcloud projects add-iam-policy-binding your-v2-project-id \ + --member="serviceAccount:${CLOUD_BUILD_PROJECT_NUMBER}@cloudbuild.gserviceaccount.com" \ + --role="roles/cloudtasks.admin" + + gcloud projects add-iam-policy-binding your-v2-project-id \ + --member="serviceAccount:${CLOUD_BUILD_PROJECT_NUMBER}@cloudbuild.gserviceaccount.com" \ + --role="roles/cloudscheduler.admin" + + gcloud projects add-iam-policy-binding your-v2-project-id \ + --member="serviceAccount:${CLOUD_BUILD_PROJECT_NUMBER}@cloudbuild.gserviceaccount.com" \ + --role="roles/cloudtestservice.testAdmin" + + gcloud projects add-iam-policy-binding your-v2-project-id \ + --member="serviceAccount:${CLOUD_BUILD_PROJECT_NUMBER}@cloudbuild.gserviceaccount.com" \ + --role="roles/firebase.admin" + ``` + +## Quick Start + +```bash +# Run all tests sequentially (recommended) +npm run test:all:sequential + +# Run all v1 tests sequentially +npm run test:v1:all + +# Run all v2 tests sequentially +npm run test:v2:all + +# Run tests in parallel (faster but may hit rate limits) +npm run test:v1:all:parallel +npm run test:v2:all:parallel + +# Run a single test suite +npm run test:firestore # Runs v1_firestore + +# Clean up after a test run +npm run cleanup + +# List saved test artifacts +npm run cleanup:list +``` + +## Configuration + +### Auth Tests Configuration + +Auth tests use Firebase client SDK configuration that is hardcoded in `tests/firebaseClientConfig.ts`. This configuration is safe to expose publicly as Firebase client SDK configuration is designed to be public. Security comes from Firebase Security Rules, not config secrecy. + +The configuration is automatically used by auth tests and no additional setup is required. + +### Auth Blocking Functions Limitation + +Firebase has a limitation where **only ONE blocking auth function can be deployed per project at any time**. This means: + +- You cannot deploy `beforeCreate` and `beforeSignIn` together +- You cannot run these tests in parallel with other test runs +- Each blocking function must be tested separately + +To work around this: + +- `npm run test:v1:all` - Runs all v1 tests with non-blocking auth functions only (onCreate, onDelete) +- `npm run test:v1:auth-before-create` - Tests ONLY the beforeCreate blocking function (run separately) +- `npm run test:v1:auth-before-signin` - Tests ONLY the beforeSignIn blocking function (run separately) + +**Important**: Run the blocking function tests one at a time, and ensure no other test deployments are running. + +### V2 Identity Platform Tests (Currently Skipped) + +The v2_identity tests are currently skipped due to issues with Identity Platform blocking functions not triggering correctly in the test environment. These tests deploy successfully but the blocking functions (beforeUserCreated, beforeUserSignedIn) don't execute when users are created programmatically, possibly due to: + +- Missing Identity Platform configuration in the test project +- Blocking functions requiring specific enablement steps +- Test authentication method not triggering blocking functions + +These tests remain in the codebase but are marked with `describe.skip()` until the underlying issue is resolved. + +## Architecture + +``` +integration_test/ +├── config/ +│ ├── v1/ +│ │ └── suites.yaml # All v1 suite definitions +│ ├── v2/ +│ │ └── suites.yaml # All v2 suite definitions +│ └── suites.schema.json # YAML schema definition +├── templates/ # Handlebars templates +│ └── functions/ +│ ├── package.json.hbs +│ ├── tsconfig.json.hbs +│ └── src/ +│ ├── v1/ # V1 function templates +│ └── v2/ # V2 function templates +├── generated/ # Generated code (git-ignored) +│ ├── functions/ # Generated function code +│ │ └── firebase-functions-local.tgz # SDK tarball (copied) +│ ├── firebase.json # Generated Firebase config +│ └── .metadata.json # Generation metadata +├── scripts/ +│ ├── generate.js # Template generation script +│ ├── run-tests.js # Unified test runner +│ ├── config-loader.js # YAML configuration loader +│ └── cleanup-suite.sh # Cleanup utilities +└── tests/ # Jest test files + ├── v1/ # V1 test suites + └── v2/ # V2 test suites +``` + +## How It Works + +### 1. Suite Definition (YAML) + +Each test suite is defined in a YAML file specifying: + +- Project ID for deployment +- Functions to generate +- Trigger types and paths + +```yaml +suite: + name: v1_firestore + projectId: functions-integration-tests + region: us-central1 + functions: + - name: firestoreDocumentOnCreateTests + trigger: onCreate + document: "tests/{testId}" +``` + +### 2. SDK Preparation + +The Firebase Functions SDK is packaged once: + +- Built from source in the parent directory +- Packed as `firebase-functions-local.tgz` +- Copied into each generated/functions directory during generation +- Referenced locally in package.json as `file:firebase-functions-local.tgz` + +This ensures the SDK is available during both local builds and Firebase cloud deployments. + +### 3. Code Generation + +The `generate.js` script: + +- Reads the suite YAML configuration from config/v1/ or config/v2/ +- Generates a unique TEST_RUN_ID +- Applies Handlebars templates with the configuration +- Outputs static TypeScript code with baked-in TEST_RUN_ID +- Copies the SDK tarball into the functions directory + +Generated functions have names like: `firestoreDocumentOnCreateTeststoi5krf7a` + +### 4. Deployment & Testing + +The `run-tests.js` script orchestrates: + +1. **Pack SDK**: Package the SDK once at the start (if not already done) +2. **Generate**: Create function code from templates for each suite +3. **Build**: Compile TypeScript to JavaScript +4. **Deploy**: Deploy to Firebase with unique function names +5. **Test**: Run Jest tests against deployed functions +6. **Cleanup**: Automatic cleanup after each suite (functions and generated files) + +### 5. Cleanup + +Functions and test data are automatically cleaned up: + +- After each suite completes (success or failure) +- Generated directory is cleared and recreated +- Deployed functions are deleted if deployment was successful +- Test data in Firestore/Database is cleaned up + +## Commands + +### Running Tests + +#### Local Testing + +```bash +# Run all tests sequentially +npm run test:all:sequential + +# Run specific version tests +npm run test:v1:all # All v1 tests sequentially +npm run test:v2:all # All v2 tests sequentially +npm run test:v1:all:parallel # All v1 tests in parallel +npm run test:v2:all:parallel # All v2 tests in parallel + +# Run individual suites +npm run test:firestore # Runs v1_firestore +npm run run-tests v1_database # Direct suite name + +# Run with options +npm run run-tests -- --sequential v1_firestore v1_database +npm run run-tests -- --filter=v2 --exclude=auth +``` + +#### Cloud Build Testing + +```bash +# Run V1 tests in Cloud Build +npm run cloudbuild:v1 + +# Run V2 tests in Cloud Build +npm run cloudbuild:v2 + +# Run both V1 and V2 tests in parallel +npm run cloudbuild:both +``` + +### Generate Functions Only ```bash -./run_tests.sh [] +npm run generate ``` -Test runs cycles of testing, once for Node.js 14 and another for Node.js 16. +- Generates function code without deployment +- Useful for debugging templates + +### Cleanup Functions + +```bash +# Clean up current test run +npm run cleanup + +# List saved test artifacts +npm run cleanup:list + +# Manual cleanup with cleanup-suite.sh +./scripts/cleanup-suite.sh +./scripts/cleanup-suite.sh --list-artifacts +./scripts/cleanup-suite.sh --clean-artifacts +``` + +## Adding New Test Suites + +### 1. Create Suite Configuration + +Create `config/suites/your_suite.yaml`: + +```yaml +suite: + name: your_suite + projectId: your-project-id + region: us-central1 + functions: + - name: yourFunctionName + trigger: yourTrigger + # Add trigger-specific configuration +``` + +### 2. Create Templates (if needed) + +Add templates in `config/templates/functions/` for new trigger types. + +### 3. Add Test File + +Create `tests/your_suite.test.ts` with Jest tests. + +### 4. Add Test File + +Create `tests/your_suite.test.ts` with Jest tests for your new suite. + +## Environment Variables + +- `PROJECT_ID`: Default project ID (overridden by suite config) +- `TEST_RUN_ID`: Unique identifier for test isolation (auto-generated) +- `GOOGLE_APPLICATION_CREDENTIALS`: Path to service account JSON + +## Authentication + +### Local Development + +Place your service account key at `sa.json` in the integration_test directory. This file is git-ignored. + +### Cloud Build + +Cloud Build uses Application Default Credentials (ADC) automatically. However, the Cloud Build service account requires specific permissions for the Google Cloud services used in tests: + +**Required IAM Roles for Cloud Build Service Account:** + +- `roles/cloudtasks.admin` - For Cloud Tasks integration tests +- `roles/cloudscheduler.admin` - For Cloud Scheduler integration tests +- `roles/cloudtestservice.testAdmin` - For Firebase Test Lab integration tests +- `roles/firebase.admin` - For Firebase services (already included) +- `roles/pubsub.publisher` - For Pub/Sub integration tests (already included) +- `roles/iam.serviceAccountUser` - For Firebase Functions deployment (Service Account User) + +**Multi-Project Setup:** +Tests deploy to multiple projects (V1 tests to `functions-integration-tests`, V2 tests to `functions-integration-tests-v2`). Each Cloud Build runs on its own project, so **no cross-project permissions are needed**. + +**V1 Project Setup:** + +```bash +# Grant permissions to V1 project (functions-integration-tests) +gcloud projects add-iam-policy-binding functions-integration-tests \ + --member="serviceAccount:CLOUD_BUILD_PROJECT_NUMBER@cloudbuild.gserviceaccount.com" \ + --role="roles/cloudtasks.admin" + +gcloud projects add-iam-policy-binding functions-integration-tests \ + --member="serviceAccount:CLOUD_BUILD_PROJECT_NUMBER@cloudbuild.gserviceaccount.com" \ + --role="roles/cloudscheduler.admin" + +gcloud projects add-iam-policy-binding functions-integration-tests \ + --member="serviceAccount:CLOUD_BUILD_PROJECT_NUMBER@cloudbuild.gserviceaccount.com" \ + --role="roles/cloudtestservice.testAdmin" + +gcloud projects add-iam-policy-binding functions-integration-tests \ + --member="serviceAccount:CLOUD_BUILD_PROJECT_NUMBER@cloudbuild.gserviceaccount.com" \ + --role="roles/firebase.admin" + +gcloud projects add-iam-policy-binding functions-integration-tests \ + --member="serviceAccount:CLOUD_BUILD_PROJECT_NUMBER@cloudbuild.gserviceaccount.com" \ + --role="roles/iam.serviceAccountUser" +``` + +**V2 Project Setup:** + +```bash +# Grant permissions to V2 project (functions-integration-tests-v2) +gcloud projects add-iam-policy-binding functions-integration-tests-v2 \ + --member="serviceAccount:CLOUD_BUILD_PROJECT_NUMBER@cloudbuild.gserviceaccount.com" \ + --role="roles/cloudtasks.admin" + +gcloud projects add-iam-policy-binding functions-integration-tests-v2 \ + --member="serviceAccount:CLOUD_BUILD_PROJECT_NUMBER@cloudbuild.gserviceaccount.com" \ + --role="roles/cloudscheduler.admin" + +gcloud projects add-iam-policy-binding functions-integration-tests-v2 \ + --member="serviceAccount:CLOUD_BUILD_PROJECT_NUMBER@cloudbuild.gserviceaccount.com" \ + --role="roles/cloudtestservice.testAdmin" + +gcloud projects add-iam-policy-binding functions-integration-tests-v2 \ + --member="serviceAccount:CLOUD_BUILD_PROJECT_NUMBER@cloudbuild.gserviceaccount.com" \ + --role="roles/firebase.admin" + +gcloud projects add-iam-policy-binding functions-integration-tests-v2 \ + --member="serviceAccount:CLOUD_BUILD_PROJECT_NUMBER@cloudbuild.gserviceaccount.com" \ + --role="roles/iam.serviceAccountUser" +``` + +Replace `CLOUD_BUILD_PROJECT_NUMBER` with the project number where Cloud Build runs. + +#### Running Cloud Build + +The integration tests use **separate Cloud Build configurations** for V1 and V2 tests to avoid cross-project permission complexity: + +**V1 Tests:** + +```bash +# Run V1 tests on functions-integration-tests project +gcloud builds submit --config=integration_test/cloudbuild-v1.yaml --project=functions-integration-tests +``` + +**V2 Tests:** + +```bash +# Run V2 tests on functions-integration-tests-v2 project +gcloud builds submit --config=integration_test/cloudbuild-v2.yaml --project=functions-integration-tests-v2 +``` + +**Both Tests (Parallel):** + +```bash +# Run both V1 and V2 tests simultaneously +gcloud builds submit --config=integration_test/cloudbuild-v1.yaml --project=functions-integration-tests & +gcloud builds submit --config=integration_test/cloudbuild-v2.yaml --project=functions-integration-tests-v2 & +wait +``` + +#### Running Cloud Build with Custom Projects + +To use your own projects, edit the YAML configuration files: + +1. **Edit V1 project ID**: Update `config/v1/suites.yaml`: + + ```yaml + defaults: + projectId: your-v1-project-id + ``` + +2. **Edit V2 project ID**: Update `config/v2/suites.yaml`: + + ```yaml + defaults: + projectId: your-v2-project-id + ``` + +3. **Run Cloud Build** (use the appropriate config for your target project): + + ```bash + # For V1 tests + gcloud builds submit --config=integration_test/cloudbuild-v1.yaml + + # For V2 tests + gcloud builds submit --config=integration_test/cloudbuild-v2.yaml + ``` + +**Default behavior (Firebase team):** +The YAML files are pre-configured with: + +- V1 tests: `functions-integration-tests` +- V2 tests: `functions-integration-tests-v2` + +## Test Isolation + +Each test run gets a unique TEST_RUN_ID that: + +- Is embedded in function names at generation time +- Isolates test data in collections/paths +- Enables parallel test execution +- Allows complete cleanup after tests + +Format: `t__` (e.g., `t_1757979490_xkyqun`) + +## Troubleshooting + +### SDK Tarball Not Found + +- Run `npm run pack-for-integration-tests` from the root firebase-functions directory +- This creates `integration_test/firebase-functions-local.tgz` +- The SDK is packed once and reused for all suites + +### Functions Not Deploying + +- Check that the SDK tarball exists and was copied to generated/functions/ +- Verify project ID in suite YAML configuration +- Ensure Firebase CLI is authenticated: `firebase projects:list` +- Check deployment logs for specific errors + +### Deployment Fails with "File not found" Error + +- The SDK tarball must be in generated/functions/ directory +- Package.json should reference `file:firebase-functions-local.tgz` (local path) +- Run `npm run generate ` to regenerate with correct paths + +### Tests Failing + +- Verify `sa.json` exists in integration_test/ directory +- Check that functions deployed successfully: `firebase functions:list --project ` +- Ensure TEST_RUN_ID environment variable is set +- Check test logs in logs/ directory + +### Permission Errors in Cloud Build + +If you see authentication errors like "Could not refresh access token" or "Permission denied": + +- Verify Cloud Build service account has required IAM roles on all target projects +- Check project numbers: `gcloud projects describe PROJECT_ID --format="value(projectNumber)"` +- Grant missing permissions to each target project: + + ```bash + # For Cloud Tasks + gcloud projects add-iam-policy-binding TARGET_PROJECT_ID \ + --member="serviceAccount:CLOUD_BUILD_PROJECT_NUMBER@cloudbuild.gserviceaccount.com" \ + --role="roles/cloudtasks.admin" + + # For Cloud Scheduler + gcloud projects add-iam-policy-binding TARGET_PROJECT_ID \ + --member="serviceAccount:CLOUD_BUILD_PROJECT_NUMBER@cloudbuild.gserviceaccount.com" \ + --role="roles/cloudscheduler.admin" + + # For Test Lab + gcloud projects add-iam-policy-binding TARGET_PROJECT_ID \ + --member="serviceAccount:CLOUD_BUILD_PROJECT_NUMBER@cloudbuild.gserviceaccount.com" \ + --role="roles/cloudtestservice.testAdmin" + + # For Firebase services + gcloud projects add-iam-policy-binding TARGET_PROJECT_ID \ + --member="serviceAccount:CLOUD_BUILD_PROJECT_NUMBER@cloudbuild.gserviceaccount.com" \ + --role="roles/firebase.admin" + + # For Service Account User (required for Functions deployment) + gcloud projects add-iam-policy-binding TARGET_PROJECT_ID \ + --member="serviceAccount:CLOUD_BUILD_PROJECT_NUMBER@cloudbuild.gserviceaccount.com" \ + --role="roles/iam.serviceAccountUser" + ``` + +### Cleanup Issues + +- Use `npm run cleanup:list` to find orphaned test runs +- Manual cleanup: `firebase functions:delete --project --force` +- Check for leftover test functions: `firebase functions:list --project PROJECT_ID | grep Test` +- Check Firestore/Database console for orphaned test data + +## Benefits + +1. **Reliable Deployment**: Static function names ensure Firebase CLI discovery +2. **Test Isolation**: Each run has unique function instances +3. **Automatic Cleanup**: No manual cleanup needed +4. **Declarative Configuration**: Easy to understand and maintain +5. **Template Reuse**: Common patterns extracted to templates +6. **Parallel Execution**: Multiple test runs can execute simultaneously + +## Limitations -Test uses locally installed firebase to invoke commands for deploying function. The test also requires that you have -gcloud CLI installed and authenticated (`gcloud auth login`). +- Templates must be created for each trigger type +- Function names include TEST_RUN_ID (longer names) +- Requires build step before deployment -Integration test is triggered by invoking HTTP function integrationTest which in turns invokes each function trigger -by issuing actions necessary to trigger it (e.g. write to storage bucket). +## Contributing -### Debugging +To add support for new Firebase features: -The status and result of each test is stored in RTDB of the project used for testing. You can also inspect Cloud Logging -for more clues. +1. Add trigger templates in `config/templates/functions/` +2. Update suite YAML schema as needed +3. Add corresponding test files +4. Update generation script if new patterns are needed diff --git a/integration_test/cloudbuild-v1.yaml b/integration_test/cloudbuild-v1.yaml new file mode 100644 index 000000000..7cf83a407 --- /dev/null +++ b/integration_test/cloudbuild-v1.yaml @@ -0,0 +1,65 @@ +# Cloud Build configuration for Firebase Functions V1 Integration Tests +# Runs all V1 test suites sequentially to avoid rate limits + +options: + machineType: "E2_HIGHCPU_8" + logging: CLOUD_LOGGING_ONLY + +timeout: "3600s" + +steps: + # Create storage bucket for test results if it doesn't exist + - name: "gcr.io/google.com/cloudsdktool/cloud-sdk:stable" + id: "create-bucket" + entrypoint: "bash" + args: + - "-c" + - | + # Create bucket for test results if it doesn't exist + BUCKET_NAME="gs://functions-integration-tests-test-results" + echo "Checking if bucket $$BUCKET_NAME exists..." + if ! gsutil ls "$$BUCKET_NAME" &>/dev/null; then + echo "Creating bucket $$BUCKET_NAME..." + gsutil mb -p "functions-integration-tests" "$$BUCKET_NAME" + else + echo "Bucket $$BUCKET_NAME already exists" + fi + + # Build SDK and run all V1 test suites sequentially + - name: "node:20" + id: "build-sdk-and-test-v1" + entrypoint: "bash" + args: + - "-c" + - | + # Step 1: Build and pack the firebase-functions SDK from source + echo "Building firebase-functions SDK from source..." + npm ci + npm run build + npm pack + # Move the tarball to where integration tests expect it + mv firebase-functions-*.tgz integration_test/firebase-functions-local.tgz + echo "SDK built and packed successfully" + + # Step 2: Run V1 integration tests with the local SDK + cd integration_test + echo "Installing test dependencies..." + npm ci + # Install firebase-tools globally + npm install -g firebase-tools + # gcloud is pre-installed in Cloud Build, no need to install + # Verify tools are installed + firebase --version + gcloud --version + # V1 tests use functions-integration-tests project + echo "Running V1 tests on project: functions-integration-tests" + # Use Application Default Credentials (Cloud Build service account) + # Run all V1 test suites sequentially + node scripts/run-tests.js --sequential --filter=v1 --use-published-sdk=file:firebase-functions-local.tgz + +# Artifacts to store +artifacts: + objects: + location: "gs://functions-integration-tests-test-results/${BUILD_ID}" + paths: + - "logs/**/*.log" diff --git a/integration_test/cloudbuild-v2.yaml b/integration_test/cloudbuild-v2.yaml new file mode 100644 index 000000000..eb1aa34df --- /dev/null +++ b/integration_test/cloudbuild-v2.yaml @@ -0,0 +1,80 @@ +# Cloud Build configuration for Firebase Functions V2 Integration Tests +# Runs all V2 test suites sequentially to avoid rate limits + +options: + machineType: "E2_HIGHCPU_8" + logging: CLOUD_LOGGING_ONLY + +timeout: "3600s" + +steps: + # Create storage bucket for test results if it doesn't exist + - name: "gcr.io/google.com/cloudsdktool/cloud-sdk:stable" + id: "create-bucket" + entrypoint: "bash" + args: + - "-c" + - | + # Create bucket for test results if it doesn't exist + BUCKET_NAME="gs://functions-integration-tests-v2-test-results" + echo "Checking if bucket $$BUCKET_NAME exists..." + if ! gsutil ls "$$BUCKET_NAME" &>/dev/null; then + echo "Creating bucket $$BUCKET_NAME..." + gsutil mb -p "functions-integration-tests-v2" "$$BUCKET_NAME" + else + echo "Bucket $$BUCKET_NAME already exists" + fi + + # Build SDK and run all V2 test suites sequentially + # Using the official Google Cloud SDK image which includes gcloud pre-installed + - name: "gcr.io/google.com/cloudsdktool/cloud-sdk:stable" + id: "build-sdk-and-test-v2" + entrypoint: "bash" + args: + - "-c" + - | + # Install Node.js 20.x + echo "Installing Node.js 20..." + apt-get update -qq + apt-get install -y -qq curl + curl -fsSL https://deb.nodesource.com/setup_20.x | bash - + apt-get install -y -qq nodejs + node --version + npm --version + + # Step 1: Build and pack the firebase-functions SDK from source + echo "Building firebase-functions SDK from source..." + pwd + ls -la + npm ci + npm run build + npm pack + # Move the tarball to where integration tests expect it + mv firebase-functions-*.tgz integration_test/firebase-functions-local.tgz + echo "SDK built and packed successfully" + + # Step 2: Run V2 integration tests with the local SDK + cd integration_test + echo "Installing test dependencies..." + npm ci + # Install firebase-tools globally + npm install -g firebase-tools + # gcloud is already available in this image + gcloud config set project functions-integration-tests-v2 + # Verify tools are installed + firebase --version + gcloud --version + # Verify gcloud project is set correctly + gcloud config get-value project + # V2 tests use functions-integration-tests-v2 project + echo "Running V2 tests on project: functions-integration-tests-v2" + # Use Application Default Credentials (Cloud Build service account) + # Run all V2 test suites sequentially + node scripts/run-tests.js --sequential --filter=v2 --use-published-sdk=file:firebase-functions-local.tgz + +# Artifacts to store +artifacts: + objects: + location: "gs://functions-integration-tests-v2-test-results/${BUILD_ID}" + paths: + - "logs/**/*.log" diff --git a/integration_test/config/suites.schema.json b/integration_test/config/suites.schema.json new file mode 100644 index 000000000..7c4655a16 --- /dev/null +++ b/integration_test/config/suites.schema.json @@ -0,0 +1,414 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://firebase.google.com/schemas/functions-integration-test-suites.json", + "title": "Firebase Functions Integration Test Suites Configuration", + "description": "Schema for the unified Firebase Functions integration test suite configuration", + "type": "object", + "required": ["defaults", "suites"], + "additionalProperties": false, + "properties": { + "defaults": { + "type": "object", + "description": "Default values applied to all suites unless overridden", + "required": ["projectId", "region", "timeout", "dependencies", "devDependencies"], + "additionalProperties": false, + "properties": { + "projectId": { + "type": "string", + "description": "Default Firebase project ID for deployments", + "pattern": "^[a-z0-9-]+$", + "minLength": 6, + "maxLength": 30, + "default": "functions-integration-tests" + }, + "region": { + "type": "string", + "description": "Default deployment region", + "enum": [ + "us-central1", + "us-east1", + "us-east4", + "us-west1", + "us-west2", + "us-west3", + "us-west4", + "europe-west1", + "europe-west2", + "europe-west3", + "europe-west6", + "europe-central2", + "asia-east1", + "asia-east2", + "asia-northeast1", + "asia-northeast2", + "asia-northeast3", + "asia-south1", + "asia-southeast1", + "asia-southeast2", + "australia-southeast1", + "northamerica-northeast1", + "southamerica-east1" + ], + "default": "us-central1" + }, + "timeout": { + "type": "integer", + "description": "Default function timeout in seconds", + "minimum": 1, + "maximum": 540, + "default": 540 + }, + "dependencies": { + "type": "object", + "description": "Default npm dependencies for generated functions", + "properties": { + "firebase-admin": { + "type": "string", + "description": "Firebase Admin SDK version", + "pattern": "^(\\^|~)?\\d+\\.\\d+\\.\\d+$|^\\{\\{sdkTarball\\}\\}$" + }, + "firebase-functions": { + "type": "string", + "description": "Firebase Functions SDK version or template variable", + "pattern": "^(\\^|~)?\\d+\\.\\d+\\.\\d+$|^\\{\\{sdkTarball\\}\\}$|^file:" + } + }, + "additionalProperties": { + "type": "string", + "description": "Additional dependency with version specification" + } + }, + "devDependencies": { + "type": "object", + "description": "Default npm dev dependencies for generated functions", + "properties": { + "typescript": { + "type": "string", + "description": "TypeScript version", + "pattern": "^(\\^|~)?\\d+\\.\\d+\\.\\d+$" + } + }, + "additionalProperties": { + "type": "string", + "description": "Additional dev dependency with version specification" + } + } + } + }, + "suites": { + "type": "array", + "description": "Array of test suite configurations", + "minItems": 1, + "items": { + "type": "object", + "required": ["name", "description", "version", "service", "functions"], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "Unique identifier for the test suite", + "pattern": "^v[12]_[a-z0-9_]+$", + "examples": ["v1_firestore", "v2_database", "v1_auth_nonblocking"] + }, + "projectId": { + "type": "string", + "description": "Override default project ID for this suite", + "pattern": "^[a-z0-9-]+$", + "minLength": 6, + "maxLength": 30 + }, + "region": { + "type": "string", + "description": "Override default region for this suite", + "enum": [ + "us-central1", + "us-east1", + "us-east4", + "us-west1", + "us-west2", + "us-west3", + "us-west4", + "europe-west1", + "europe-west2", + "europe-west3", + "europe-west6", + "europe-central2", + "asia-east1", + "asia-east2", + "asia-northeast1", + "asia-northeast2", + "asia-northeast3", + "asia-south1", + "asia-southeast1", + "asia-southeast2", + "australia-southeast1", + "northamerica-northeast1", + "southamerica-east1" + ] + }, + "description": { + "type": "string", + "description": "Human-readable description of the test suite", + "minLength": 1 + }, + "version": { + "type": "string", + "description": "Firebase Functions SDK version", + "enum": ["v1", "v2"] + }, + "service": { + "type": "string", + "description": "Firebase service being tested", + "enum": [ + "firestore", + "database", + "pubsub", + "storage", + "auth", + "tasks", + "remoteconfig", + "testlab", + "scheduler", + "identity", + "alerts", + "eventarc" + ] + }, + "dependencies": { + "type": "object", + "description": "Override default dependencies for this suite", + "additionalProperties": { + "type": "string", + "description": "Dependency with version specification" + } + }, + "devDependencies": { + "type": "object", + "description": "Override default dev dependencies for this suite", + "additionalProperties": { + "type": "string", + "description": "Dev dependency with version specification" + } + }, + "functions": { + "type": "array", + "description": "Array of function configurations for this suite", + "minItems": 1, + "items": { + "type": "object", + "required": ["name"], + "additionalProperties": true, + "properties": { + "name": { + "type": "string", + "description": "Function name (TEST_RUN_ID will be appended)", + "pattern": "^[a-zA-Z][a-zA-Z0-9]*$", + "minLength": 1, + "maxLength": 62 + }, + "trigger": { + "type": "string", + "description": "Trigger type for the function", + "minLength": 1 + }, + "type": { + "type": "string", + "description": "Type field for identity platform functions", + "enum": ["beforeUserCreated", "beforeUserSignedIn"] + }, + "timeout": { + "type": "integer", + "description": "Override default timeout for this function", + "minimum": 1, + "maximum": 540 + }, + "collection": { + "type": "string", + "description": "Firestore collection name (defaults to function name)", + "pattern": "^[a-zA-Z][a-zA-Z0-9]*$" + }, + "document": { + "type": "string", + "description": "Firestore document path pattern", + "examples": ["tests/{testId}", "users/{userId}/posts/{postId}"] + }, + "topic": { + "type": "string", + "description": "Pub/Sub topic name", + "pattern": "^[a-zA-Z][a-zA-Z0-9-_]*$" + }, + "schedule": { + "type": "string", + "description": "Cron schedule for scheduled functions", + "examples": ["every 10 hours", "every 5 minutes", "0 */12 * * *"] + }, + "bucket": { + "type": "string", + "description": "Storage bucket name" + }, + "queue": { + "type": "string", + "description": "Cloud Tasks queue name" + }, + "alertType": { + "type": "string", + "description": "Type of alert for alert triggers" + }, + "eventType": { + "type": "string", + "description": "Event type for EventArc triggers" + }, + "database": { + "type": "string", + "description": "Realtime Database instance URL" + }, + "path": { + "type": "string", + "description": "Database or storage path pattern" + }, + "blocking": { + "type": "boolean", + "description": "Whether this is a blocking auth function", + "default": false + } + }, + "allOf": [ + { + "if": { + "properties": { + "trigger": { + "enum": [ + "onDocumentCreated", + "onDocumentDeleted", + "onDocumentUpdated", + "onDocumentWritten" + ] + } + }, + "required": ["trigger"] + }, + "then": { + "required": ["document"] + } + }, + { + "if": { + "properties": { + "trigger": { + "enum": ["onCreate", "onDelete", "onUpdate", "onWrite"] + }, + "document": { + "type": "string" + } + }, + "required": ["trigger", "document"] + }, + "then": { + "required": ["document"] + } + }, + { + "if": { + "properties": { + "trigger": { + "enum": ["onCreate", "onDelete", "onUpdate", "onWrite"] + }, + "path": { + "type": "string" + } + }, + "required": ["trigger", "path"] + }, + "then": { + "required": ["path"] + } + }, + { + "if": { + "properties": { + "trigger": { + "enum": [ + "onValueCreated", + "onValueDeleted", + "onValueUpdated", + "onValueWritten" + ] + } + }, + "required": ["trigger"] + }, + "then": { + "required": ["path"] + } + }, + { + "if": { + "properties": { + "trigger": { + "enum": ["onPublish", "onMessagePublished"] + } + }, + "required": ["trigger"] + }, + "then": { + "required": ["topic"] + } + }, + { + "if": { + "properties": { + "trigger": { + "enum": ["onRun", "onSchedule"] + } + }, + "required": ["trigger"] + }, + "then": { + "required": ["schedule"] + } + } + ] + } + } + } + }, + "uniqueItems": true + } + }, + "definitions": { + "versionPattern": { + "type": "string", + "pattern": "^(\\^|~)?\\d+\\.\\d+\\.\\d+$", + "description": "Semantic version with optional range specifier" + }, + "firebaseRegion": { + "type": "string", + "enum": [ + "us-central1", + "us-east1", + "us-east4", + "us-west1", + "us-west2", + "us-west3", + "us-west4", + "europe-west1", + "europe-west2", + "europe-west3", + "europe-west6", + "europe-central2", + "asia-east1", + "asia-east2", + "asia-northeast1", + "asia-northeast2", + "asia-northeast3", + "asia-south1", + "asia-southeast1", + "asia-southeast2", + "australia-southeast1", + "northamerica-northeast1", + "southamerica-east1" + ], + "description": "Valid Firebase Functions deployment regions" + } + } +} diff --git a/integration_test/config/v1/suites.yaml b/integration_test/config/v1/suites.yaml new file mode 100644 index 000000000..233b28e63 --- /dev/null +++ b/integration_test/config/v1/suites.yaml @@ -0,0 +1,156 @@ +# Firebase Functions V1 Integration Test Suites Configuration +# This unified configuration consolidates all v1 test suite definitions +# Common values are defined in the defaults section to reduce duplication + +defaults: + projectId: functions-integration-tests + region: us-central1 + timeout: 540 + dependencies: + firebase-admin: "^12.0.0" + firebase-functions: "{{sdkTarball}}" + devDependencies: + typescript: "^4.9.5" + +suites: + # Firestore triggers + - name: v1_firestore + description: "V1 Firestore trigger tests" + version: v1 + service: firestore + functions: + - name: firestoreDocumentOnCreateTests + trigger: onCreate + document: "tests/{testId}" + - name: firestoreDocumentOnDeleteTests + trigger: onDelete + document: "tests/{testId}" + - name: firestoreDocumentOnUpdateTests + trigger: onUpdate + document: "tests/{testId}" + - name: firestoreDocumentOnWriteTests + trigger: onWrite + document: "tests/{testId}" + + # Realtime Database triggers + - name: v1_database + description: "V1 Realtime Database trigger tests" + version: v1 + service: database + functions: + - name: databaseRefOnCreateTests + trigger: onCreate + path: "dbTests/{testId}/start" + - name: databaseRefOnDeleteTests + trigger: onDelete + path: "dbTests/{testId}/start" + - name: databaseRefOnUpdateTests + trigger: onUpdate + path: "dbTests/{testId}/start" + - name: databaseRefOnWriteTests + trigger: onWrite + path: "dbTests/{testId}/start" + + # Pub/Sub triggers + - name: v1_pubsub + description: "V1 Pub/Sub trigger tests" + version: v1 + service: pubsub + functions: + - name: pubsubOnPublishTests + trigger: onPublish + topic: "pubsubTests" + - name: pubsubScheduleTests + trigger: onRun + schedule: "every 10 hours" + + # Storage triggers + - name: v1_storage + description: "V1 Storage trigger tests" + version: v1 + service: storage + functions: + - name: storageOnFinalizeTests + trigger: onFinalize + # Note: onDelete is commented out due to bug b/372315689 + # - name: storageOnDeleteTests + # trigger: onDelete + - name: storageOnMetadataUpdateTests + trigger: onMetadataUpdate + + # Auth triggers (all non-blocking functions) + - name: v1_auth + description: "V1 Auth trigger tests" + version: v1 + service: auth + functions: + - name: authUserOnCreateTests + trigger: onCreate + - name: authUserOnDeleteTests + trigger: onDelete + - name: authUserBeforeCreateTests + trigger: beforeCreate + collection: authBeforeCreateTests + - name: authUserBeforeSignInTests + trigger: beforeSignIn + collection: authBeforeSignInTests + + # Auth non-blocking only (for parallel execution) + - name: v1_auth_nonblocking + description: "V1 non-blocking Auth trigger tests" + version: v1 + service: auth + functions: + - name: authUserOnCreateTests + trigger: onCreate + - name: authUserOnDeleteTests + trigger: onDelete + + # Auth beforeCreate blocking function (must run separately) + # - name: v1_auth_before_create + # description: "V1 Auth beforeCreate blocking trigger test" + # version: v1 + # service: auth + # functions: + # - name: authUserBeforeCreateTests + # trigger: beforeCreate + # collection: authBeforeCreateTests + # blocking: true + + # Auth beforeSignIn blocking function (must run separately) + # - name: v1_auth_before_signin + # description: "V1 Auth beforeSignIn blocking trigger test" + # version: v1 + # service: auth + # functions: + # - name: authUserBeforeSignInTests + # trigger: beforeSignIn + # collection: authBeforeSignInTests + # blocking: true + + # Cloud Tasks triggers + # - name: v1_tasks + # description: "V1 Cloud Tasks trigger tests" + # version: v1 + # service: tasks + # functions: + # - name: tasksOnDispatchTests + # trigger: onDispatch + + # Remote Config triggers + - name: v1_remoteconfig + description: "V1 Remote Config trigger tests" + version: v1 + service: remoteconfig + functions: + - name: remoteConfigOnUpdateTests + trigger: onUpdate + + # Test Lab triggers + - name: v1_testlab + description: "V1 TestLab trigger tests" + version: v1 + service: testlab + functions: + - name: testLabOnCompleteTests + trigger: onComplete diff --git a/integration_test/config/v2/suites.yaml b/integration_test/config/v2/suites.yaml new file mode 100644 index 000000000..2306a0707 --- /dev/null +++ b/integration_test/config/v2/suites.yaml @@ -0,0 +1,176 @@ +# Firebase Functions V2 Integration Test Suites Configuration +# This unified configuration consolidates all v2 test suite definitions +# Common values are defined in the defaults section to reduce duplication + +defaults: + projectId: functions-integration-tests-v2 + region: us-central1 + timeout: 540 + dependencies: + firebase-admin: "^12.0.0" + firebase-functions: "{{sdkTarball}}" + devDependencies: + typescript: "^4.9.5" + +suites: + # Firestore triggers + - name: v2_firestore + description: "V2 Firestore trigger tests" + version: v2 + service: firestore + functions: + - name: firestoreOnDocumentCreatedTests + trigger: onDocumentCreated + document: "tests/{testId}" + - name: firestoreOnDocumentDeletedTests + trigger: onDocumentDeleted + document: "tests/{testId}" + - name: firestoreOnDocumentUpdatedTests + trigger: onDocumentUpdated + document: "tests/{testId}" + - name: firestoreOnDocumentWrittenTests + trigger: onDocumentWritten + document: "tests/{testId}" + + # Realtime Database triggers + - name: v2_database + description: "V2 Realtime Database trigger tests" + version: v2 + service: database + functions: + - name: databaseCreatedTests + trigger: onValueCreated + path: "databaseCreatedTests/{testId}/start" + - name: databaseDeletedTests + trigger: onValueDeleted + path: "databaseDeletedTests/{testId}/start" + - name: databaseUpdatedTests + trigger: onValueUpdated + path: "databaseUpdatedTests/{testId}/start" + - name: databaseWrittenTests + trigger: onValueWritten + path: "databaseWrittenTests/{testId}/start" + + # Pub/Sub triggers + - name: v2_pubsub + description: "V2 Pub/Sub trigger tests" + version: v2 + service: pubsub + functions: + - name: pubsubOnMessagePublishedTests + trigger: onMessagePublished + topic: "custom_message_tests" + + # Storage triggers + - name: v2_storage + description: "V2 Storage trigger tests" + version: v2 + service: storage + functions: + - name: storageOnObjectFinalizedTests + trigger: onObjectFinalized + - name: storageOnObjectDeletedTests + trigger: onObjectDeleted + - name: storageOnObjectMetadataUpdatedTests + trigger: onObjectMetadataUpdated + + # Cloud Tasks triggers + - name: v2_tasks + description: "V2 Cloud Tasks trigger tests" + version: v2 + service: tasks + functions: + - name: tasksOnTaskDispatchedTests + trigger: onTaskDispatched + + # Cloud Scheduler triggers + - name: v2_scheduler + description: "V2 Scheduler trigger tests" + version: v2 + service: scheduler + functions: + - name: schedule + trigger: onSchedule + schedule: "every 10 hours" + collection: schedulerOnScheduleV2Tests + + # Remote Config triggers + - name: v2_remoteconfig + description: "V2 Remote Config trigger tests" + version: v2 + service: remoteconfig + functions: + - name: remoteConfigOnConfigUpdatedTests + trigger: onConfigUpdated + + # Test Lab triggers + - name: v2_testlab + description: "V2 Test Lab trigger tests" + version: v2 + service: testlab + functions: + - name: testLabOnTestMatrixCompletedTests + trigger: onTestMatrixCompleted + + # Identity Platform triggers (replaces v1 auth blocking) + - name: v2_identity + description: "V2 Identity trigger tests" + version: v2 + service: identity + functions: + - name: identityBeforeUserCreatedTests + type: beforeUserCreated + collection: identityBeforeUserCreatedTests + - name: identityBeforeUserSignedInTests + type: beforeUserSignedIn + collection: identityBeforeUserSignedInTests + + # EventArc triggers + - name: v2_eventarc + description: "V2 Eventarc trigger tests" + version: v2 + service: eventarc + functions: + - name: eventarcOnCustomEventPublishedTests + eventType: achieved-leaderboard + + # Firebase Alerts triggers + - name: v2_alerts + description: "V2 Alerts trigger tests (deployment only)" + version: v2 + service: alerts + functions: + # Generic alert + - name: alertsGeneric + trigger: onAlertPublished + alertType: "crashlytics.newFatalIssue" + + # App Distribution alerts + - name: alertsInAppFeedback + trigger: onInAppFeedbackPublished + - name: alertsNewTesterIos + trigger: onNewTesterIosDevicePublished + + # Billing alerts + - name: alertsPlanAutoUpdate + trigger: onPlanAutomatedUpdatePublished + - name: alertsPlanUpdate + trigger: onPlanUpdatePublished + + # Crashlytics alerts + - name: alertsNewAnr + trigger: onNewAnrIssuePublished + - name: alertsNewFatal + trigger: onNewFatalIssuePublished + - name: alertsNewNonFatal + trigger: onNewNonfatalIssuePublished + - name: alertsRegression + trigger: onRegressionAlertPublished + - name: alertsStability + trigger: onStabilityDigestPublished + - name: alertsVelocity + trigger: onVelocityAlertPublished + + # Performance alerts + - name: alertsThreshold + trigger: onThresholdAlertPublished diff --git a/integration_test/database.rules.json b/integration_test/database.rules.json deleted file mode 100644 index 2ad59a69c..000000000 --- a/integration_test/database.rules.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "rules": { - "dbTests": { - "$testId": { - "adminOnly": { - ".validate": false - } - } - }, - ".read": "auth != null", - ".write": true - } -} diff --git a/integration_test/firebase.json b/integration_test/firebase.json deleted file mode 100644 index 9662aef03..000000000 --- a/integration_test/firebase.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "database": { - "rules": "database.rules.json" - }, - "firestore": { - "rules": "firestore.rules", - "indexes": "firestore.indexes.json" - }, - "functions": { - "source": "functions", - "codebase": "integration-tests", - "predeploy": ["npm --prefix \"$RESOURCE_DIR\" run build"] - } -} diff --git a/integration_test/firestore.indexes.json b/integration_test/firestore.indexes.json deleted file mode 100644 index 0e3f2d6b6..000000000 --- a/integration_test/firestore.indexes.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "indexes": [] -} diff --git a/integration_test/firestore.rules b/integration_test/firestore.rules deleted file mode 100644 index d9df6d5d1..000000000 --- a/integration_test/firestore.rules +++ /dev/null @@ -1,9 +0,0 @@ -rules_version = "2"; - -service cloud.firestore { - match /databases/{database}/documents { - match /{document=**} { - allow read, write: if request.auth != null; - } - } -} diff --git a/integration_test/functions/.npmrc b/integration_test/functions/.npmrc deleted file mode 100644 index 43c97e719..000000000 --- a/integration_test/functions/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false diff --git a/integration_test/functions/src/index.ts b/integration_test/functions/src/index.ts deleted file mode 100644 index 623b690c7..000000000 --- a/integration_test/functions/src/index.ts +++ /dev/null @@ -1,230 +0,0 @@ -import { PubSub } from "@google-cloud/pubsub"; -import { GoogleAuth } from "google-auth-library"; -import { Request, Response } from "express"; -import * as admin from "firebase-admin"; -import * as functions from "firebase-functions"; -import * as fs from "fs"; -import fetch from "node-fetch"; - -import * as v1 from "./v1"; -import * as v2 from "./v2"; -const getNumTests = (m: object): number => { - return Object.keys(m).filter((k) => ({}.hasOwnProperty.call(m[k], "__endpoint"))).length; -}; -const numTests = getNumTests(v1) + getNumTests(v2); -export { v1, v2 }; - -import { REGION } from "./region"; -import * as testLab from "./v1/testLab-utils"; - -const firebaseConfig = JSON.parse(process.env.FIREBASE_CONFIG); -admin.initializeApp(); - -// Re-enable no-unused-var check once callable functions are testable again. -// eslint-disable-next-line @typescript-eslint/no-unused-vars -async function callHttpsTrigger(name: string, data: any) { - const url = `https://${REGION}-${firebaseConfig.projectId}.cloudfunctions.net/${name}`; - const client = await new GoogleAuth().getIdTokenClient("32555940559.apps.googleusercontent.com"); - const resp = await client.request({ - url, - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ data }), - }); - if (resp.status > 200) { - throw Error(resp.statusText); - } -} - -// Re-enable no-unused-var check once callable functions are testable again. -// eslint-disable-next-line @typescript-eslint/no-unused-vars -async function callV2HttpsTrigger(name: string, data: any, accessToken: string) { - const getFnResp = await fetch( - `https://cloudfunctions.googleapis.com/v2beta/projects/${firebaseConfig.projectId}/locations/${REGION}/functions/${name}`, - { - headers: { - Authorization: `Bearer ${accessToken}`, - }, - } - ); - if (!getFnResp.ok) { - throw new Error(getFnResp.statusText); - } - const fn = await getFnResp.json(); - const uri = fn.serviceConfig?.uri; - if (!uri) { - throw new Error(`Cannot call v2 https trigger ${name} - no uri found`); - } - - const client = await new GoogleAuth().getIdTokenClient("32555940559.apps.googleusercontent.com"); - const invokeFnREsp = await client.request({ - url: uri, - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ data }), - }); - if (invokeFnREsp.status > 200) { - throw Error(invokeFnREsp.statusText); - } -} - -async function callScheduleTrigger(functionName: string, region: string, accessToken: string) { - const response = await fetch( - `https://cloudscheduler.googleapis.com/v1/projects/${firebaseConfig.projectId}/locations/us-central1/jobs/firebase-schedule-${functionName}-${region}:run`, - { - method: "POST", - headers: { - "Content-Type": "application/json", - Authorization: `Bearer ${accessToken}`, - }, - } - ); - if (!response.ok) { - throw new Error(`Failed request with status ${response.status}!`); - } - const data = await response.text(); - functions.logger.log(`Successfully scheduled function ${functionName}`, data); - return; -} - -async function callV2ScheduleTrigger(functionName: string, region: string, accessToken: string) { - const response = await fetch( - `https://cloudscheduler.googleapis.com/v1/projects/${firebaseConfig.projectId}/locations/us-central1/jobs/firebase-schedule-${functionName}-${region}:run`, - { - method: "POST", - headers: { - "Content-Type": "application/json", - Authorization: `Bearer ${accessToken}`, - }, - } - ); - if (!response.ok) { - throw new Error(`Failed request with status ${response.status}!`); - } - const data = await response.text(); - functions.logger.log(`Successfully scheduled v2 function ${functionName}`, data); - return; -} - -async function updateRemoteConfig(testId: string, accessToken: string): Promise { - const resp = await fetch( - `https://firebaseremoteconfig.googleapis.com/v1/projects/${firebaseConfig.projectId}/remoteConfig`, - { - method: "PUT", - headers: { - Authorization: `Bearer ${accessToken}`, - "Content-Type": "application/json; UTF-8", - "Accept-Encoding": "gzip", - "If-Match": "*", - }, - body: JSON.stringify({ version: { description: testId } }), - } - ); - if (!resp.ok) { - throw new Error(resp.statusText); - } -} - -function v1Tests(testId: string, accessToken: string): Array> { - return [ - // A database write to trigger the Firebase Realtime Database tests. - admin.database().ref(`dbTests/${testId}/start`).set({ ".sv": "timestamp" }), - // A Pub/Sub publish to trigger the Cloud Pub/Sub tests. - new PubSub().topic("pubsubTests").publish(Buffer.from(JSON.stringify({ testId }))), - // A user creation to trigger the Firebase Auth user creation tests. - admin - .auth() - .createUser({ - email: `${testId}@fake.com`, - password: "secret", - displayName: `${testId}`, - }) - .then(async (userRecord) => { - // A user deletion to trigger the Firebase Auth user deletion tests. - await admin.auth().deleteUser(userRecord.uid); - }), - // A firestore write to trigger the Cloud Firestore tests. - admin.firestore().collection("tests").doc(testId).set({ test: testId }), - // Invoke a callable HTTPS trigger. - // TODO: Temporarily disable - doesn't work unless running on projects w/ permission to create public functions. - // callHttpsTrigger("v1-callableTests", { foo: "bar", testId }), - // A Remote Config update to trigger the Remote Config tests. - updateRemoteConfig(testId, accessToken), - // A storage upload to trigger the Storage tests - admin - .storage() - .bucket() - .upload("/tmp/" + testId + ".txt"), - testLab.startTestRun(firebaseConfig.projectId, testId, accessToken), - // Invoke the schedule for our scheduled function to fire - callScheduleTrigger("v1-schedule", "us-central1", accessToken), - ]; -} - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function v2Tests(testId: string, accessToken: string): Array> { - return [ - // Invoke a callable HTTPS trigger. - // TODO: Temporarily disable - doesn't work unless running on projects w/ permission to create public functions. - // callV2HttpsTrigger("v2-callabletests", { foo: "bar", testId }, accessToken), - // Invoke a scheduled trigger. - callV2ScheduleTrigger("v2-schedule", "us-central1", accessToken), - ]; -} - -export const integrationTests: any = functions - .region(REGION) - .runWith({ - timeoutSeconds: 540, - invoker: "private", - }) - .https.onRequest(async (req: Request, resp: Response) => { - const testId = admin.database().ref().push().key; - await admin.database().ref(`testRuns/${testId}/timestamp`).set(Date.now()); - const testIdRef = admin.database().ref(`testRuns/${testId}`); - functions.logger.info("testId is: ", testId); - fs.writeFile(`/tmp/${testId}.txt`, "test", () => undefined); - try { - const accessToken = await admin.credential.applicationDefault().getAccessToken(); - await Promise.all([ - ...v1Tests(testId, accessToken.access_token), - ...v2Tests(testId, accessToken.access_token), - ]); - // On test completion, check that all tests pass and reply "PASS", or provide further details. - functions.logger.info("Waiting for all tests to report they pass..."); - await new Promise((resolve, reject) => { - setTimeout(() => reject(new Error("Timeout")), 5 * 60 * 1000); - let testsExecuted = 0; - testIdRef.on("child_added", (snapshot) => { - if (snapshot.key === "timestamp") { - return; - } - testsExecuted += 1; - if (!snapshot.val().passed) { - reject(new Error(`test ${snapshot.key} failed; see database for details.`)); - return; - } - functions.logger.info(`${snapshot.key} passed (${testsExecuted} of ${numTests})`); - if (testsExecuted < numTests) { - // Not all tests have completed. Wait longer. - return; - } - // All tests have passed! - resolve(); - }); - }); - functions.logger.info("All tests pass!"); - resp.status(200).send("PASS \n"); - } catch (err) { - functions.logger.info(`Some tests failed: ${err}`, err); - resp - .status(500) - .send(`FAIL - details at ${functions.firebaseConfig().databaseURL}/testRuns/${testId}`); - } finally { - testIdRef.off("child_added"); - } - }); diff --git a/integration_test/functions/src/region.ts b/integration_test/functions/src/region.ts deleted file mode 100644 index 4ce175234..000000000 --- a/integration_test/functions/src/region.ts +++ /dev/null @@ -1,2 +0,0 @@ -// TODO: Add back support for selecting region for integration test once params is ready. -export const REGION = "us-central1"; diff --git a/integration_test/functions/src/testing.ts b/integration_test/functions/src/testing.ts deleted file mode 100644 index 156e94242..000000000 --- a/integration_test/functions/src/testing.ts +++ /dev/null @@ -1,134 +0,0 @@ -import * as firebase from "firebase-admin"; -import * as functions from "firebase-functions"; - -export type TestCase = (data: T, context?: functions.EventContext) => any; -export interface TestCaseMap { - [key: string]: TestCase; -} - -export class TestSuite { - private name: string; - private tests: TestCaseMap; - - constructor(name: string, tests: TestCaseMap = {}) { - this.name = name; - this.tests = tests; - } - - it(name: string, testCase: TestCase): TestSuite { - this.tests[name] = testCase; - return this; - } - - run(testId: string, data: T, context?: functions.EventContext): Promise { - const running: Array> = []; - for (const testName in this.tests) { - if (!this.tests.hasOwnProperty(testName)) { - continue; - } - const run = Promise.resolve() - .then(() => this.tests[testName](data, context)) - .then( - (result) => { - functions.logger.info( - `${result ? "Passed" : "Failed with successful op"}: ${testName}` - ); - return { name: testName, passed: !!result }; - }, - (error) => { - console.error(`Failed: ${testName}`, error); - return { name: testName, passed: 0, error }; - } - ); - running.push(run); - } - return Promise.all(running).then((results) => { - let sum = 0; - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands - results.forEach((val) => (sum = sum + val.passed)); - const summary = `passed ${sum} of ${running.length}`; - const passed = sum === running.length; - functions.logger.info(summary); - const result = { passed, summary, tests: results }; - return firebase.database().ref(`testRuns/${testId}/${this.name}`).set(result); - }); - } -} - -export function success() { - return Promise.resolve().then(() => true); -} - -function failure(reason: string) { - return Promise.reject(reason); -} - -export function evaluate(value: boolean, errMsg: string) { - if (value) { - return success(); - } - return failure(errMsg); -} - -export function expectEq(left: any, right: any) { - return evaluate( - left === right, - JSON.stringify(left) + " does not equal " + JSON.stringify(right) - ); -} - -function deepEq(left: any, right: any) { - if (left === right) { - return true; - } - - if (!(left instanceof Object && right instanceof Object)) { - return false; - } - - if (Object.keys(left).length !== Object.keys(right).length) { - return false; - } - - for (const key in left) { - if (Object.prototype.hasOwnProperty.call(left, key)) { - if (!Object.prototype.hasOwnProperty.call(right, key)) { - return false; - } - if (!deepEq(left[key], right[key])) { - return false; - } - } - } - - return true; -} - -export function expectDeepEq(left: any, right: any) { - return evaluate( - deepEq(left, right), - `${JSON.stringify(left)} does not deep equal ${JSON.stringify(right)}` - ); -} - -export function expectMatches(input: string, regexp: RegExp) { - return evaluate( - input.match(regexp) !== null, - `Input '${input}' did not match regexp '${regexp}'` - ); -} - -export function expectReject(f: (e: EventType) => Promise) { - return async (event: EventType) => { - let rejected = false; - try { - await f(event); - } catch { - rejected = true; - } - - if (!rejected) { - throw new Error("Test should have returned a rejected promise"); - } - }; -} diff --git a/integration_test/functions/src/v1/auth-tests.ts b/integration_test/functions/src/v1/auth-tests.ts deleted file mode 100644 index 5d1b6188a..000000000 --- a/integration_test/functions/src/v1/auth-tests.ts +++ /dev/null @@ -1,65 +0,0 @@ -import * as admin from "firebase-admin"; -import * as functions from "firebase-functions"; -import { REGION } from "../region"; -import { expectEq, TestSuite } from "../testing"; -import UserMetadata = admin.auth.UserRecord; - -export const createUserTests: any = functions - .region(REGION) - .auth.user() - .onCreate((u, c) => { - const testId: string = u.displayName; - functions.logger.info(`testId is ${testId}`); - - return new TestSuite("auth user onCreate") - .it("should have a project as resource", (user, context) => - expectEq(context.resource.name, `projects/${process.env.GCLOUD_PROJECT}`) - ) - - .it("should not have a path", (user, context) => expectEq((context as any).path, undefined)) - - .it("should have the correct eventType", (user, context) => - expectEq(context.eventType, "google.firebase.auth.user.create") - ) - - .it("should have an eventId", (user, context) => context.eventId) - - .it("should have a timestamp", (user, context) => context.timestamp) - - .it("should not have auth", (user, context) => expectEq((context as any).auth, undefined)) - - .it("should not have action", (user, context) => expectEq((context as any).action, undefined)) - - .it("should have properly defined meta", (user) => user.metadata) - - .run(testId, u, c); - }); - -export const deleteUserTests: any = functions - .region(REGION) - .auth.user() - .onDelete((u, c) => { - const testId: string = u.displayName; - functions.logger.info(`testId is ${testId}`); - - return new TestSuite("auth user onDelete") - .it("should have a project as resource", (user, context) => - expectEq(context.resource.name, `projects/${process.env.GCLOUD_PROJECT}`) - ) - - .it("should not have a path", (user, context) => expectEq((context as any).path, undefined)) - - .it("should have the correct eventType", (user, context) => - expectEq(context.eventType, "google.firebase.auth.user.delete") - ) - - .it("should have an eventId", (user, context) => context.eventId) - - .it("should have a timestamp", (user, context) => context.timestamp) - - .it("should not have auth", (user, context) => expectEq((context as any).auth, undefined)) - - .it("should not have action", (user, context) => expectEq((context as any).action, undefined)) - - .run(testId, u, c); - }); diff --git a/integration_test/functions/src/v1/database-tests.ts b/integration_test/functions/src/v1/database-tests.ts deleted file mode 100644 index df9d3cdd2..000000000 --- a/integration_test/functions/src/v1/database-tests.ts +++ /dev/null @@ -1,75 +0,0 @@ -import * as admin from "firebase-admin"; -import * as functions from "firebase-functions"; -import { REGION } from "../region"; -import { expectEq, expectMatches, TestSuite } from "../testing"; -import DataSnapshot = admin.database.DataSnapshot; - -const testIdFieldName = "testId"; - -export const databaseTests: any = functions - .region(REGION) - .database.ref("dbTests/{testId}/start") - .onWrite((ch, ctx) => { - if (ch.after.val() === null) { - functions.logger.info( - `Event for ${ctx.params[testIdFieldName]} is null; presuming data cleanup, so skipping.` - ); - return; - } - - return new TestSuite>("database ref onWrite") - - .it("should not have event.app", (change, context) => !(context as any).app) - - .it("should give refs access to admin data", (change) => - change.after.ref.parent - .child("adminOnly") - .update({ allowed: 1 }) - .then(() => true) - ) - - .it("should have a correct ref url", (change) => { - const url = change.after.ref.toString(); - return Promise.resolve() - .then(() => { - return expectMatches( - url, - new RegExp( - `^https://${process.env.GCLOUD_PROJECT}(-default-rtdb)*.firebaseio.com/dbTests` - ) - ); - }) - .then(() => { - return expectMatches(url, /\/start$/); - }); - }) - - .it("should have refs resources", (change, context) => - expectMatches( - context.resource.name, - new RegExp( - `^projects/_/instances/${process.env.GCLOUD_PROJECT}(-default-rtdb)*/refs/dbTests/${context.params.testId}/start$` - ) - ) - ) - - .it("should not include path", (change, context) => - expectEq((context as any).path, undefined) - ) - - .it("should have the right eventType", (change, context) => - expectEq(context.eventType, "google.firebase.database.ref.write") - ) - - .it("should have eventId", (change, context) => context.eventId) - - .it("should have timestamp", (change, context) => context.timestamp) - - .it("should not have action", (change, context) => - expectEq((context as any).action, undefined) - ) - - .it("should have admin authType", (change, context) => expectEq(context.authType, "ADMIN")) - - .run(ctx.params[testIdFieldName], ch, ctx); - }); diff --git a/integration_test/functions/src/v1/firestore-tests.ts b/integration_test/functions/src/v1/firestore-tests.ts deleted file mode 100644 index b986ca06a..000000000 --- a/integration_test/functions/src/v1/firestore-tests.ts +++ /dev/null @@ -1,44 +0,0 @@ -import * as admin from "firebase-admin"; -import * as functions from "firebase-functions"; -import { REGION } from "../region"; -import { expectDeepEq, expectEq, TestSuite } from "../testing"; -import DocumentSnapshot = admin.firestore.DocumentSnapshot; - -const testIdFieldName = "documentId"; - -export const firestoreTests: any = functions - .runWith({ - timeoutSeconds: 540, - }) - .region(REGION) - .firestore.document("tests/{documentId}") - .onCreate((s, c) => { - return new TestSuite("firestore document onWrite") - - .it("should not have event.app", (snap, context) => !(context as any).app) - - .it("should give refs write access", (snap) => - snap.ref.set({ allowed: 1 }, { merge: true }).then(() => true) - ) - - .it("should have well-formatted resource", (snap, context) => - expectEq( - context.resource.name, - `projects/${process.env.GCLOUD_PROJECT}/databases/(default)/documents/tests/${context.params.documentId}` - ) - ) - - .it("should have the right eventType", (snap, context) => - expectEq(context.eventType, "google.firestore.document.create") - ) - - .it("should have eventId", (snap, context) => context.eventId) - - .it("should have timestamp", (snap, context) => context.timestamp) - - .it("should have the correct data", (snap, context) => - expectDeepEq(snap.data(), { test: context.params.documentId }) - ) - - .run(c.params[testIdFieldName], s, c); - }); diff --git a/integration_test/functions/src/v1/https-tests.ts b/integration_test/functions/src/v1/https-tests.ts deleted file mode 100644 index 5a74a1903..000000000 --- a/integration_test/functions/src/v1/https-tests.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as functions from "firebase-functions"; -import { REGION } from "../region"; -import { expectEq, TestSuite } from "../testing"; - -export const callableTests: any = functions - .runWith({ invoker: "private" }) - .region(REGION) - .https.onCall((d) => { - return new TestSuite("https onCall") - .it("should have the correct data", (data: any) => expectEq(data?.foo, "bar")) - .run(d.testId, d); - }); diff --git a/integration_test/functions/src/v1/index.ts b/integration_test/functions/src/v1/index.ts deleted file mode 100644 index 0a1a2a35f..000000000 --- a/integration_test/functions/src/v1/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from "./pubsub-tests"; -export * from "./database-tests"; -export * from "./auth-tests"; -export * from "./firestore-tests"; -// Temporarily disable http test - will not work unless running on projects w/ permission to create public functions. -// export * from "./https-tests"; -export * from "./remoteConfig-tests"; -export * from "./storage-tests"; -export * from "./testLab-tests"; diff --git a/integration_test/functions/src/v1/pubsub-tests.ts b/integration_test/functions/src/v1/pubsub-tests.ts deleted file mode 100644 index 152ad7b6a..000000000 --- a/integration_test/functions/src/v1/pubsub-tests.ts +++ /dev/null @@ -1,67 +0,0 @@ -import * as admin from "firebase-admin"; -import * as functions from "firebase-functions"; -import { REGION } from "../region"; -import { evaluate, expectEq, success, TestSuite } from "../testing"; -import PubsubMessage = functions.pubsub.Message; - -// TODO(inlined) use multiple queues to run inline. -// Expected message data: {"hello": "world"} -export const pubsubTests: any = functions - .region(REGION) - .pubsub.topic("pubsubTests") - .onPublish((m, c) => { - let testId: string; - try { - testId = m.json.testId; - } catch (e) { - /* Ignored. Covered in another test case that `event.data.json` works. */ - } - - return new TestSuite("pubsub onPublish") - .it("should have a topic as resource", (message, context) => - expectEq(context.resource.name, `projects/${process.env.GCLOUD_PROJECT}/topics/pubsubTests`) - ) - - .it("should not have a path", (message, context) => - expectEq((context as any).path, undefined) - ) - - .it("should have the correct eventType", (message, context) => - expectEq(context.eventType, "google.pubsub.topic.publish") - ) - - .it("should have an eventId", (message, context) => context.eventId) - - .it("should have a timestamp", (message, context) => context.timestamp) - - .it("should not have auth", (message, context) => expectEq((context as any).auth, undefined)) - - .it("should not have action", (message, context) => - expectEq((context as any).action, undefined) - ) - - .it("should have pubsub data", (message) => { - const decoded = new Buffer(message.data, "base64").toString(); - const parsed = JSON.parse(decoded); - return evaluate(parsed.hasOwnProperty("testId"), `Raw data was + ${message.data}`); - }) - - .it("should decode JSON payloads with the json helper", (message) => - evaluate(message.json.hasOwnProperty("testId"), message.json) - ) - - .run(testId, m, c); - }); - -export const schedule: any = functions - .region(REGION) - .pubsub.schedule("every 10 hours") // This is a dummy schedule, since we need to put a valid one in. - // For the test, the job is triggered by the jobs:run api - .onRun(async () => { - const db = admin.database(); - const snap = await db.ref("testRuns").orderByChild("timestamp").limitToLast(1).once("value"); - const testId = Object.keys(snap.val())[0]; - return new TestSuite("pubsub scheduleOnRun") - .it("should trigger when the scheduler fires", () => success()) - .run(testId, null); - }); diff --git a/integration_test/functions/src/v1/remoteConfig-tests.ts b/integration_test/functions/src/v1/remoteConfig-tests.ts deleted file mode 100644 index 416621774..000000000 --- a/integration_test/functions/src/v1/remoteConfig-tests.ts +++ /dev/null @@ -1,23 +0,0 @@ -import * as functions from "firebase-functions"; -import { REGION } from "../region"; -import { expectEq, TestSuite } from "../testing"; -import TemplateVersion = functions.remoteConfig.TemplateVersion; - -export const remoteConfigTests: any = functions.region(REGION).remoteConfig.onUpdate((v, c) => { - return new TestSuite("remoteConfig onUpdate") - .it("should have a project as resource", (version, context) => - expectEq(context.resource.name, `projects/${process.env.GCLOUD_PROJECT}`) - ) - - .it("should have the correct eventType", (version, context) => - expectEq(context.eventType, "google.firebase.remoteconfig.update") - ) - - .it("should have an eventId", (version, context) => context.eventId) - - .it("should have a timestamp", (version, context) => context.timestamp) - - .it("should not have auth", (version, context) => expectEq((context as any).auth, undefined)) - - .run(v.description, v, c); -}); diff --git a/integration_test/functions/src/v1/storage-tests.ts b/integration_test/functions/src/v1/storage-tests.ts deleted file mode 100644 index 6819c7a2a..000000000 --- a/integration_test/functions/src/v1/storage-tests.ts +++ /dev/null @@ -1,28 +0,0 @@ -import * as functions from "firebase-functions"; -import { REGION } from "../region"; -import { expectEq, TestSuite } from "../testing"; -import ObjectMetadata = functions.storage.ObjectMetadata; - -export const storageTests: any = functions - .runWith({ - timeoutSeconds: 540, - }) - .region(REGION) - .storage.bucket() - .object() - .onFinalize((s, c) => { - const testId = s.name.split(".")[0]; - return new TestSuite("storage object finalize") - - .it("should not have event.app", (data, context) => !(context as any).app) - - .it("should have the right eventType", (snap, context) => - expectEq(context.eventType, "google.storage.object.finalize") - ) - - .it("should have eventId", (snap, context) => context.eventId) - - .it("should have timestamp", (snap, context) => context.timestamp) - - .run(testId, s, c); - }); diff --git a/integration_test/functions/src/v1/testLab-tests.ts b/integration_test/functions/src/v1/testLab-tests.ts deleted file mode 100644 index 242cd21f6..000000000 --- a/integration_test/functions/src/v1/testLab-tests.ts +++ /dev/null @@ -1,23 +0,0 @@ -import * as functions from "firebase-functions"; -import { REGION } from "../region"; -import { expectEq, TestSuite } from "../testing"; -import TestMatrix = functions.testLab.TestMatrix; - -export const testLabTests: any = functions - .runWith({ - timeoutSeconds: 540, - }) - .region(REGION) - .testLab.testMatrix() - .onComplete((matrix, context) => { - return new TestSuite("test matrix complete") - .it("should have eventId", (snap, context) => context.eventId) - - .it("should have right eventType", (_, context) => - expectEq(context.eventType, "google.testing.testMatrix.complete") - ) - - .it("should be in state 'INVALID'", (matrix) => expectEq(matrix.state, "INVALID")) - - .run(matrix?.clientInfo?.details?.testId, matrix, context); - }); diff --git a/integration_test/functions/src/v1/testLab-utils.ts b/integration_test/functions/src/v1/testLab-utils.ts deleted file mode 100644 index 7ba32e112..000000000 --- a/integration_test/functions/src/v1/testLab-utils.ts +++ /dev/null @@ -1,112 +0,0 @@ -import * as admin from "firebase-admin"; -import fetch from "node-fetch"; - -interface AndroidDevice { - androidModelId: string; - androidVersionId: string; - locale: string; - orientation: string; -} - -const TESTING_API_SERVICE_NAME = "testing.googleapis.com"; - -/** - * Creates a new TestMatrix in Test Lab which is expected to be rejected as - * invalid. - * - * @param projectId Project for which the test run will be created - * @param testId Test id which will be encoded in client info details - * @param accessToken accessToken to attach to requested for authentication - */ -export async function startTestRun(projectId: string, testId: string, accessToken: string) { - const device = await fetchDefaultDevice(accessToken); - return await createTestMatrix(accessToken, projectId, testId, device); -} - -async function fetchDefaultDevice(accessToken: string): Promise { - const resp = await fetch( - `https://${TESTING_API_SERVICE_NAME}/v1/testEnvironmentCatalog/ANDROID`, - { - headers: { - Authorization: "Bearer " + accessToken, - "Content-Type": "application/json", - }, - } - ); - if (!resp.ok) { - throw new Error(resp.statusText); - } - const data = await resp.json(); - const models = data?.androidDeviceCatalog?.models || []; - const defaultModels = models.filter( - (m) => - m.tags !== undefined && - m.tags.indexOf("default") > -1 && - m.supportedVersionIds !== undefined && - m.supportedVersionIds.length > 0 - ); - - if (defaultModels.length === 0) { - throw new Error("No default device found"); - } - - const model = defaultModels[0]; - const versions = model.supportedVersionIds; - - return { - androidModelId: model.id, - androidVersionId: versions[versions.length - 1], - locale: "en", - orientation: "portrait", - } as AndroidDevice; -} - -async function createTestMatrix( - accessToken: string, - projectId: string, - testId: string, - device: AndroidDevice -): Promise { - const body = { - projectId, - testSpecification: { - androidRoboTest: { - appApk: { - gcsPath: "gs://path/to/non-existing-app.apk", - }, - }, - }, - environmentMatrix: { - androidDeviceList: { - androidDevices: [device], - }, - }, - resultStorage: { - googleCloudStorage: { - gcsPath: "gs://" + admin.storage().bucket().name, - }, - }, - clientInfo: { - name: "CloudFunctionsSDKIntegrationTest", - clientInfoDetails: { - key: "testId", - value: testId, - }, - }, - }; - const resp = await fetch( - `https://${TESTING_API_SERVICE_NAME}/v1/projects/${projectId}/testMatrices`, - { - method: "POST", - headers: { - Authorization: "Bearer " + accessToken, - "Content-Type": "application/json", - }, - body: JSON.stringify(body), - } - ); - if (!resp.ok) { - throw new Error(resp.statusText); - } - return; -} diff --git a/integration_test/functions/src/v2/https-tests.ts b/integration_test/functions/src/v2/https-tests.ts deleted file mode 100644 index b787ac602..000000000 --- a/integration_test/functions/src/v2/https-tests.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { onCall } from "firebase-functions/v2/https"; -import { expectEq, TestSuite } from "../testing"; - -export const callabletests = onCall({ invoker: "private" }, (req) => { - return new TestSuite("v2 https onCall") - .it("should have the correct data", (data: any) => expectEq(data?.foo, "bar")) - .run(req.data.testId, req.data); -}); diff --git a/integration_test/functions/src/v2/index.ts b/integration_test/functions/src/v2/index.ts deleted file mode 100644 index 38cde5f92..000000000 --- a/integration_test/functions/src/v2/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { setGlobalOptions } from "firebase-functions/v2"; -import { REGION } from "../region"; -setGlobalOptions({ region: REGION }); - -// TODO: Temporarily disable - doesn't work unless running on projects w/ permission to create public functions. -// export * from './https-tests'; -export * from "./scheduled-tests"; diff --git a/integration_test/functions/src/v2/scheduled-tests.ts b/integration_test/functions/src/v2/scheduled-tests.ts deleted file mode 100644 index cc13bed62..000000000 --- a/integration_test/functions/src/v2/scheduled-tests.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as admin from "firebase-admin"; -import { onSchedule } from "firebase-functions/v2/scheduler"; -import { REGION } from "../region"; -import { success, TestSuite } from "../testing"; - -export const schedule: any = onSchedule( - { - schedule: "every 10 hours", - region: REGION, - }, - async () => { - const db = admin.database(); - const snap = await db.ref("testRuns").orderByChild("timestamp").limitToLast(1).once("value"); - const testId = Object.keys(snap.val())[0]; - return new TestSuite("scheduler scheduleOnRun") - .it("should trigger when the scheduler fires", () => success()) - .run(testId, null); - } -); diff --git a/integration_test/jest.config.js b/integration_test/jest.config.js new file mode 100644 index 000000000..a49270be9 --- /dev/null +++ b/integration_test/jest.config.js @@ -0,0 +1,12 @@ +/** @type {import('jest').Config} */ +const config = { + preset: "ts-jest", + testEnvironment: "node", + testMatch: ["**/tests/**/*.test.ts"], + testTimeout: 120_000, + transform: { + "^.+\\.(t|j)s$": ["ts-jest", { tsconfig: "tsconfig.test.json" }], + }, +}; + +export default config; \ No newline at end of file diff --git a/integration_test/package-lock.json b/integration_test/package-lock.json new file mode 100644 index 000000000..711b6e4bc --- /dev/null +++ b/integration_test/package-lock.json @@ -0,0 +1,7395 @@ +{ + "name": "integration-test-declarative", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "integration-test-declarative", + "version": "1.0.0", + "dependencies": { + "@google-cloud/pubsub": "^4.0.0", + "ajv": "^8.17.1", + "chalk": "^4.1.2", + "firebase-admin": "^12.0.0" + }, + "devDependencies": { + "@google-cloud/tasks": "^6.2.0", + "@types/jest": "^29.5.11", + "@types/node": "^20.10.5", + "firebase": "^12.2.1", + "handlebars": "^4.7.8", + "jest": "^29.7.0", + "ts-jest": "^29.1.1", + "typescript": "^5.3.3", + "yaml": "^2.3.4" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.4.tgz", + "integrity": "sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.4.tgz", + "integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.3", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.28.3", + "@babel/helpers": "^7.28.4", + "@babel/parser": "^7.28.4", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.4", + "@babel/types": "^7.28.4", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz", + "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.28.3", + "@babel/types": "^7.28.2", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", + "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.28.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", + "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", + "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", + "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.4" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", + "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", + "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", + "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.4.tgz", + "integrity": "sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.3", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.4", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.4", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", + "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@fastify/busboy": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-3.2.0.tgz", + "integrity": "sha512-m9FVDXU3GT2ITSe0UaMA5rU3QkfC/UXtCU8y0gSN/GugTqtVldOBWIB5V6V3sbmenVZUIpU6f+mPEO2+m5iTaA==", + "license": "MIT" + }, + "node_modules/@firebase/ai": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@firebase/ai/-/ai-2.2.1.tgz", + "integrity": "sha512-0VWlkGB18oDhwMqsgxpt/usMsyjnH3a7hTvQPcAbk7VhFg0QZMDX60mQKfLTFKrB5VwmlaIdVsSZznsTY2S0wA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/app-check-interop-types": "0.3.3", + "@firebase/component": "0.7.0", + "@firebase/logger": "0.5.0", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x", + "@firebase/app-types": "0.x" + } + }, + "node_modules/@firebase/ai/node_modules/@firebase/app-check-interop-types": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@firebase/app-check-interop-types/-/app-check-interop-types-0.3.3.tgz", + "integrity": "sha512-gAlxfPLT2j8bTI/qfe3ahl2I2YcBQ8cFIBdhAQA4I2f3TndcO+22YizyGYuttLHPQEpWkhmpFW60VCFEPg4g5A==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@firebase/ai/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/ai/node_modules/@firebase/logger": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.5.0.tgz", + "integrity": "sha512-cGskaAvkrnh42b3BA3doDWeBmuHFO/Mx5A83rbRDYakPjO9bJtRL3dX7javzc2Rr/JHZf4HlterTW2lUkfeN4g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/ai/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/analytics": { + "version": "0.10.18", + "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.10.18.tgz", + "integrity": "sha512-iN7IgLvM06iFk8BeFoWqvVpRFW3Z70f+Qe2PfCJ7vPIgLPjHXDE774DhCT5Y2/ZU/ZbXPDPD60x/XPWEoZLNdg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/installations": "0.6.19", + "@firebase/logger": "0.5.0", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/analytics-compat": { + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.2.24.tgz", + "integrity": "sha512-jE+kJnPG86XSqGQGhXXYt1tpTbCTED8OQJ/PQ90SEw14CuxRxx/H+lFbWA1rlFtFSsTCptAJtgyRBwr/f00vsw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/analytics": "0.10.18", + "@firebase/analytics-types": "0.8.3", + "@firebase/component": "0.7.0", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/analytics-compat/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/analytics-compat/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/analytics-types": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/@firebase/analytics-types/-/analytics-types-0.8.3.tgz", + "integrity": "sha512-VrIp/d8iq2g501qO46uGz3hjbDb8xzYMrbu8Tp0ovzIzrvJZ2fvmj649gTjge/b7cCCcjT0H37g1gVtlNhnkbg==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@firebase/analytics/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/analytics/node_modules/@firebase/logger": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.5.0.tgz", + "integrity": "sha512-cGskaAvkrnh42b3BA3doDWeBmuHFO/Mx5A83rbRDYakPjO9bJtRL3dX7javzc2Rr/JHZf4HlterTW2lUkfeN4g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/analytics/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/app": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.14.2.tgz", + "integrity": "sha512-Ecx2ig/JLC9ayIQwZHqm41Tzlf4c1WUuFhFUZB1y+JIJqDRE579x7Uil7tKT8MwDpOPwrK5ZtpxdSsrfy/LF8Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/logger": "0.5.0", + "@firebase/util": "1.13.0", + "idb": "7.1.1", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/app-check": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.11.0.tgz", + "integrity": "sha512-XAvALQayUMBJo58U/rxW02IhsesaxxfWVmVkauZvGEz3vOAjMEQnzFlyblqkc2iAaO82uJ2ZVyZv9XzPfxjJ6w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/logger": "0.5.0", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/app-check-compat": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.4.0.tgz", + "integrity": "sha512-UfK2Q8RJNjYM/8MFORltZRG9lJj11k0nW84rrffiKvcJxLf1jf6IEjCIkCamykHE73C6BwqhVfhIBs69GXQV0g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/app-check": "0.11.0", + "@firebase/app-check-types": "0.5.3", + "@firebase/component": "0.7.0", + "@firebase/logger": "0.5.0", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/app-check-compat/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/app-check-compat/node_modules/@firebase/logger": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.5.0.tgz", + "integrity": "sha512-cGskaAvkrnh42b3BA3doDWeBmuHFO/Mx5A83rbRDYakPjO9bJtRL3dX7javzc2Rr/JHZf4HlterTW2lUkfeN4g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/app-check-compat/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/app-check-interop-types": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@firebase/app-check-interop-types/-/app-check-interop-types-0.3.2.tgz", + "integrity": "sha512-LMs47Vinv2HBMZi49C09dJxp0QT5LwDzFaVGf/+ITHe3BlIhUiLNttkATSXplc89A2lAaeTqjgqVkiRfUGyQiQ==", + "license": "Apache-2.0" + }, + "node_modules/@firebase/app-check-types": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@firebase/app-check-types/-/app-check-types-0.5.3.tgz", + "integrity": "sha512-hyl5rKSj0QmwPdsAxrI5x1otDlByQ7bvNvVt8G/XPO2CSwE++rmSVf3VEhaeOR4J8ZFaF0Z0NDSmLejPweZ3ng==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@firebase/app-check/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/app-check/node_modules/@firebase/logger": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.5.0.tgz", + "integrity": "sha512-cGskaAvkrnh42b3BA3doDWeBmuHFO/Mx5A83rbRDYakPjO9bJtRL3dX7javzc2Rr/JHZf4HlterTW2lUkfeN4g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/app-check/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/app-compat": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.5.2.tgz", + "integrity": "sha512-cn+U27GDaBS/irsbvrfnPZdcCzeZPRGKieSlyb7vV6LSOL6mdECnB86PgYjYGxSNg8+U48L/NeevTV1odU+mOQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/app": "0.14.2", + "@firebase/component": "0.7.0", + "@firebase/logger": "0.5.0", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/app-compat/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/app-compat/node_modules/@firebase/logger": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.5.0.tgz", + "integrity": "sha512-cGskaAvkrnh42b3BA3doDWeBmuHFO/Mx5A83rbRDYakPjO9bJtRL3dX7javzc2Rr/JHZf4HlterTW2lUkfeN4g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/app-compat/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/app-types": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.9.2.tgz", + "integrity": "sha512-oMEZ1TDlBz479lmABwWsWjzHwheQKiAgnuKxE0pz0IXCVx7/rtlkx1fQ6GfgK24WCrxDKMplZrT50Kh04iMbXQ==", + "license": "Apache-2.0" + }, + "node_modules/@firebase/app/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/app/node_modules/@firebase/logger": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.5.0.tgz", + "integrity": "sha512-cGskaAvkrnh42b3BA3doDWeBmuHFO/Mx5A83rbRDYakPjO9bJtRL3dX7javzc2Rr/JHZf4HlterTW2lUkfeN4g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/app/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/auth": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.11.0.tgz", + "integrity": "sha512-5j7+ua93X+IRcJ1oMDTClTo85l7Xe40WSkoJ+shzPrX7OISlVWLdE1mKC57PSD+/LfAbdhJmvKixINBw2ESK6w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/logger": "0.5.0", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x", + "@react-native-async-storage/async-storage": "^1.18.1" + }, + "peerDependenciesMeta": { + "@react-native-async-storage/async-storage": { + "optional": true + } + } + }, + "node_modules/@firebase/auth-compat": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.6.0.tgz", + "integrity": "sha512-J0lGSxXlG/lYVi45wbpPhcWiWUMXevY4fvLZsN1GHh+po7TZVng+figdHBVhFheaiipU8HZyc7ljw1jNojM2nw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/auth": "1.11.0", + "@firebase/auth-types": "0.13.0", + "@firebase/component": "0.7.0", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/auth-compat/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/auth-compat/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/auth-interop-types": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.2.3.tgz", + "integrity": "sha512-Fc9wuJGgxoxQeavybiuwgyi+0rssr76b+nHpj+eGhXFYAdudMWyfBHvFL/I5fEHniUM/UQdFzi9VXJK2iZF7FQ==", + "license": "Apache-2.0" + }, + "node_modules/@firebase/auth-types": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.13.0.tgz", + "integrity": "sha512-S/PuIjni0AQRLF+l9ck0YpsMOdE8GO2KU6ubmBB7P+7TJUCQDa3R1dlgYm9UzGbbePMZsp0xzB93f2b/CgxMOg==", + "dev": true, + "license": "Apache-2.0", + "peerDependencies": { + "@firebase/app-types": "0.x", + "@firebase/util": "1.x" + } + }, + "node_modules/@firebase/auth/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/auth/node_modules/@firebase/logger": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.5.0.tgz", + "integrity": "sha512-cGskaAvkrnh42b3BA3doDWeBmuHFO/Mx5A83rbRDYakPjO9bJtRL3dX7javzc2Rr/JHZf4HlterTW2lUkfeN4g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/auth/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/component": { + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.6.9.tgz", + "integrity": "sha512-gm8EUEJE/fEac86AvHn8Z/QW8BvR56TBw3hMW0O838J/1mThYQXAIQBgUv75EqlCZfdawpWLrKt1uXvp9ciK3Q==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.10.0", + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/data-connect": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@firebase/data-connect/-/data-connect-0.3.11.tgz", + "integrity": "sha512-G258eLzAD6im9Bsw+Qm1Z+P4x0PGNQ45yeUuuqe5M9B1rn0RJvvsQCRHXgE52Z+n9+WX1OJd/crcuunvOGc7Vw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/auth-interop-types": "0.2.4", + "@firebase/component": "0.7.0", + "@firebase/logger": "0.5.0", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/data-connect/node_modules/@firebase/auth-interop-types": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.2.4.tgz", + "integrity": "sha512-JPgcXKCuO+CWqGDnigBtvo09HeBs5u/Ktc2GaFj2m01hLarbxthLNm7Fk8iOP1aqAtXV+fnnGj7U28xmk7IwVA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@firebase/data-connect/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/data-connect/node_modules/@firebase/logger": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.5.0.tgz", + "integrity": "sha512-cGskaAvkrnh42b3BA3doDWeBmuHFO/Mx5A83rbRDYakPjO9bJtRL3dX7javzc2Rr/JHZf4HlterTW2lUkfeN4g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/data-connect/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/database": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@firebase/database/-/database-1.0.8.tgz", + "integrity": "sha512-dzXALZeBI1U5TXt6619cv0+tgEhJiwlUtQ55WNZY7vGAjv7Q1QioV969iYwt1AQQ0ovHnEW0YW9TiBfefLvErg==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/app-check-interop-types": "0.3.2", + "@firebase/auth-interop-types": "0.2.3", + "@firebase/component": "0.6.9", + "@firebase/logger": "0.4.2", + "@firebase/util": "1.10.0", + "faye-websocket": "0.11.4", + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/database-compat": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-1.0.8.tgz", + "integrity": "sha512-OpeWZoPE3sGIRPBKYnW9wLad25RaWbGyk7fFQe4xnJQKRzlynWeFBSRRAoLE2Old01WXwskUiucNqUUVlFsceg==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.6.9", + "@firebase/database": "1.0.8", + "@firebase/database-types": "1.0.5", + "@firebase/logger": "0.4.2", + "@firebase/util": "1.10.0", + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/database-types": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-1.0.5.tgz", + "integrity": "sha512-fTlqCNwFYyq/C6W7AJ5OCuq5CeZuBEsEwptnVxlNPkWCo5cTTyukzAHRSO/jaQcItz33FfYrrFk1SJofcu2AaQ==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/app-types": "0.9.2", + "@firebase/util": "1.10.0" + } + }, + "node_modules/@firebase/firestore": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.9.1.tgz", + "integrity": "sha512-PYVUTkhC9y8pydrqC3O1Oc4AMfkGSWdmuH9xgPJjiEbpUIUPQ4J8wJhyuash+o2u+axmyNRFP8ULNUKb+WzBzQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/logger": "0.5.0", + "@firebase/util": "1.13.0", + "@firebase/webchannel-wrapper": "1.0.4", + "@grpc/grpc-js": "~1.9.0", + "@grpc/proto-loader": "^0.7.8", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/firestore-compat": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.4.1.tgz", + "integrity": "sha512-BjalPTDh/K0vmR/M/DE148dpIqbcfvtFVTietbUDWDWYIl9YH0TTVp/EwXRbZwswPxyjx4GdHW61GB2AYVz1SQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/firestore": "4.9.1", + "@firebase/firestore-types": "3.0.3", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/firestore-compat/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/firestore-compat/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/firestore-types": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@firebase/firestore-types/-/firestore-types-3.0.3.tgz", + "integrity": "sha512-hD2jGdiWRxB/eZWF89xcK9gF8wvENDJkzpVFb4aGkzfEaKxVRD1kjz1t1Wj8VZEp2LCB53Yx1zD8mrhQu87R6Q==", + "dev": true, + "license": "Apache-2.0", + "peerDependencies": { + "@firebase/app-types": "0.x", + "@firebase/util": "1.x" + } + }, + "node_modules/@firebase/firestore/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/firestore/node_modules/@firebase/logger": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.5.0.tgz", + "integrity": "sha512-cGskaAvkrnh42b3BA3doDWeBmuHFO/Mx5A83rbRDYakPjO9bJtRL3dX7javzc2Rr/JHZf4HlterTW2lUkfeN4g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/firestore/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/firestore/node_modules/@grpc/grpc-js": { + "version": "1.9.15", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.15.tgz", + "integrity": "sha512-nqE7Hc0AzI+euzUwDAy0aY5hCp10r734gMGRdU+qOPX0XSceI2ULrcXB5U2xSc5VkWwalCj4M7GzCAygZl2KoQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@grpc/proto-loader": "^0.7.8", + "@types/node": ">=12.12.47" + }, + "engines": { + "node": "^8.13.0 || >=10.10.0" + } + }, + "node_modules/@firebase/functions": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.13.1.tgz", + "integrity": "sha512-sUeWSb0rw5T+6wuV2o9XNmh9yHxjFI9zVGFnjFi+n7drTEWpl7ZTz1nROgGrSu472r+LAaj+2YaSicD4R8wfbw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/app-check-interop-types": "0.3.3", + "@firebase/auth-interop-types": "0.2.4", + "@firebase/component": "0.7.0", + "@firebase/messaging-interop-types": "0.2.3", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/functions-compat": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.4.1.tgz", + "integrity": "sha512-AxxUBXKuPrWaVNQ8o1cG1GaCAtXT8a0eaTDfqgS5VsRYLAR0ALcfqDLwo/QyijZj1w8Qf8n3Qrfy/+Im245hOQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/functions": "0.13.1", + "@firebase/functions-types": "0.6.3", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/functions-compat/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/functions-compat/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/functions-types": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@firebase/functions-types/-/functions-types-0.6.3.tgz", + "integrity": "sha512-EZoDKQLUHFKNx6VLipQwrSMh01A1SaL3Wg6Hpi//x6/fJ6Ee4hrAeswK99I5Ht8roiniKHw4iO0B1Oxj5I4plg==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@firebase/functions/node_modules/@firebase/app-check-interop-types": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@firebase/app-check-interop-types/-/app-check-interop-types-0.3.3.tgz", + "integrity": "sha512-gAlxfPLT2j8bTI/qfe3ahl2I2YcBQ8cFIBdhAQA4I2f3TndcO+22YizyGYuttLHPQEpWkhmpFW60VCFEPg4g5A==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@firebase/functions/node_modules/@firebase/auth-interop-types": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.2.4.tgz", + "integrity": "sha512-JPgcXKCuO+CWqGDnigBtvo09HeBs5u/Ktc2GaFj2m01hLarbxthLNm7Fk8iOP1aqAtXV+fnnGj7U28xmk7IwVA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@firebase/functions/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/functions/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/installations": { + "version": "0.6.19", + "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.6.19.tgz", + "integrity": "sha512-nGDmiwKLI1lerhwfwSHvMR9RZuIH5/8E3kgUWnVRqqL7kGVSktjLTWEMva7oh5yxQ3zXfIlIwJwMcaM5bK5j8Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/util": "1.13.0", + "idb": "7.1.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/installations-compat": { + "version": "0.2.19", + "resolved": "https://registry.npmjs.org/@firebase/installations-compat/-/installations-compat-0.2.19.tgz", + "integrity": "sha512-khfzIY3EI5LePePo7vT19/VEIH1E3iYsHknI/6ek9T8QCozAZshWT9CjlwOzZrKvTHMeNcbpo/VSOSIWDSjWdQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/installations": "0.6.19", + "@firebase/installations-types": "0.5.3", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/installations-compat/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/installations-compat/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/installations-types": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@firebase/installations-types/-/installations-types-0.5.3.tgz", + "integrity": "sha512-2FJI7gkLqIE0iYsNQ1P751lO3hER+Umykel+TkLwHj6plzWVxqvfclPUZhcKFVQObqloEBTmpi2Ozn7EkCABAA==", + "dev": true, + "license": "Apache-2.0", + "peerDependencies": { + "@firebase/app-types": "0.x" + } + }, + "node_modules/@firebase/installations/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/installations/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/logger": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.4.2.tgz", + "integrity": "sha512-Q1VuA5M1Gjqrwom6I6NUU4lQXdo9IAQieXlujeHZWvRt1b7qQ0KwBaNAjgxG27jgF9/mUwsNmO8ptBCGVYhB0A==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/messaging": { + "version": "0.12.23", + "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.12.23.tgz", + "integrity": "sha512-cfuzv47XxqW4HH/OcR5rM+AlQd1xL/VhuaeW/wzMW1LFrsFcTn0GND/hak1vkQc2th8UisBcrkVcQAnOnKwYxg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/installations": "0.6.19", + "@firebase/messaging-interop-types": "0.2.3", + "@firebase/util": "1.13.0", + "idb": "7.1.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/messaging-compat": { + "version": "0.2.23", + "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.2.23.tgz", + "integrity": "sha512-SN857v/kBUvlQ9X/UjAqBoQ2FEaL1ZozpnmL1ByTe57iXkmnVVFm9KqAsTfmf+OEwWI4kJJe9NObtN/w22lUgg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/messaging": "0.12.23", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/messaging-compat/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/messaging-compat/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/messaging-interop-types": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@firebase/messaging-interop-types/-/messaging-interop-types-0.2.3.tgz", + "integrity": "sha512-xfzFaJpzcmtDjycpDeCUj0Ge10ATFi/VHVIvEEjDNc3hodVBQADZ7BWQU7CuFpjSHE+eLuBI13z5F/9xOoGX8Q==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@firebase/messaging/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/messaging/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/performance": { + "version": "0.7.9", + "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.7.9.tgz", + "integrity": "sha512-UzybENl1EdM2I1sjYm74xGt/0JzRnU/0VmfMAKo2LSpHJzaj77FCLZXmYQ4oOuE+Pxtt8Wy2BVJEENiZkaZAzQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/installations": "0.6.19", + "@firebase/logger": "0.5.0", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0", + "web-vitals": "^4.2.4" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/performance-compat": { + "version": "0.2.22", + "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.2.22.tgz", + "integrity": "sha512-xLKxaSAl/FVi10wDX/CHIYEUP13jXUjinL+UaNXT9ByIvxII5Ne5150mx6IgM8G6Q3V+sPiw9C8/kygkyHUVxg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/logger": "0.5.0", + "@firebase/performance": "0.7.9", + "@firebase/performance-types": "0.2.3", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/performance-compat/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/performance-compat/node_modules/@firebase/logger": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.5.0.tgz", + "integrity": "sha512-cGskaAvkrnh42b3BA3doDWeBmuHFO/Mx5A83rbRDYakPjO9bJtRL3dX7javzc2Rr/JHZf4HlterTW2lUkfeN4g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/performance-compat/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/performance-types": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@firebase/performance-types/-/performance-types-0.2.3.tgz", + "integrity": "sha512-IgkyTz6QZVPAq8GSkLYJvwSLr3LS9+V6vNPQr0x4YozZJiLF5jYixj0amDtATf1X0EtYHqoPO48a9ija8GocxQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@firebase/performance/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/performance/node_modules/@firebase/logger": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.5.0.tgz", + "integrity": "sha512-cGskaAvkrnh42b3BA3doDWeBmuHFO/Mx5A83rbRDYakPjO9bJtRL3dX7javzc2Rr/JHZf4HlterTW2lUkfeN4g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/performance/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/remote-config": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.6.6.tgz", + "integrity": "sha512-Yelp5xd8hM4NO1G1SuWrIk4h5K42mNwC98eWZ9YLVu6Z0S6hFk1mxotAdCRmH2luH8FASlYgLLq6OQLZ4nbnCA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/installations": "0.6.19", + "@firebase/logger": "0.5.0", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/remote-config-compat": { + "version": "0.2.19", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.2.19.tgz", + "integrity": "sha512-y7PZAb0l5+5oIgLJr88TNSelxuASGlXyAKj+3pUc4fDuRIdPNBoONMHaIUa9rlffBR5dErmaD2wUBJ7Z1a513Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/logger": "0.5.0", + "@firebase/remote-config": "0.6.6", + "@firebase/remote-config-types": "0.4.0", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/remote-config-compat/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/remote-config-compat/node_modules/@firebase/logger": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.5.0.tgz", + "integrity": "sha512-cGskaAvkrnh42b3BA3doDWeBmuHFO/Mx5A83rbRDYakPjO9bJtRL3dX7javzc2Rr/JHZf4HlterTW2lUkfeN4g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/remote-config-compat/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/remote-config-types": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-types/-/remote-config-types-0.4.0.tgz", + "integrity": "sha512-7p3mRE/ldCNYt8fmWMQ/MSGRmXYlJ15Rvs9Rk17t8p0WwZDbeK7eRmoI1tvCPaDzn9Oqh+yD6Lw+sGLsLg4kKg==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@firebase/remote-config/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/remote-config/node_modules/@firebase/logger": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.5.0.tgz", + "integrity": "sha512-cGskaAvkrnh42b3BA3doDWeBmuHFO/Mx5A83rbRDYakPjO9bJtRL3dX7javzc2Rr/JHZf4HlterTW2lUkfeN4g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/remote-config/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/storage": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.14.0.tgz", + "integrity": "sha512-xWWbb15o6/pWEw8H01UQ1dC5U3rf8QTAzOChYyCpafV6Xki7KVp3Yaw2nSklUwHEziSWE9KoZJS7iYeyqWnYFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/storage-compat": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.4.0.tgz", + "integrity": "sha512-vDzhgGczr1OfcOy285YAPur5pWDEvD67w4thyeCUh6Ys0izN9fNYtA1MJERmNBfqjqu0lg0FM5GLbw0Il21M+g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/storage": "0.14.0", + "@firebase/storage-types": "0.8.3", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/storage-compat/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/storage-compat/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/storage-types": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/@firebase/storage-types/-/storage-types-0.8.3.tgz", + "integrity": "sha512-+Muk7g9uwngTpd8xn9OdF/D48uiQ7I1Fae7ULsWPuKoCH3HU7bfFPhxtJYzyhjdniowhuDpQcfPmuNRAqZEfvg==", + "dev": true, + "license": "Apache-2.0", + "peerDependencies": { + "@firebase/app-types": "0.x", + "@firebase/util": "1.x" + } + }, + "node_modules/@firebase/storage/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/storage/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/util": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.10.0.tgz", + "integrity": "sha512-xKtx4A668icQqoANRxyDLBLz51TAbDP9KRfpbKGxiCAW346d0BeJe5vN6/hKxxmWwnZ0mautyv39JxviwwQMOQ==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/webchannel-wrapper": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-1.0.4.tgz", + "integrity": "sha512-6m8+P+dE/RPl4OPzjTxcTbQ0rGeRyeTvAi9KwIffBVCiAMKrfXfLZaqD1F+m8t4B5/Q5aHsMozOgirkH1F5oMQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@google-cloud/firestore": { + "version": "7.11.3", + "resolved": "https://registry.npmjs.org/@google-cloud/firestore/-/firestore-7.11.3.tgz", + "integrity": "sha512-qsM3/WHpawF07SRVvEJJVRwhYzM7o9qtuksyuqnrMig6fxIrwWnsezECWsG/D5TyYru51Fv5c/RTqNDQ2yU+4w==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@opentelemetry/api": "^1.3.0", + "fast-deep-equal": "^3.1.1", + "functional-red-black-tree": "^1.0.1", + "google-gax": "^4.3.3", + "protobufjs": "^7.2.6" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@google-cloud/paginator": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@google-cloud/paginator/-/paginator-5.0.2.tgz", + "integrity": "sha512-DJS3s0OVH4zFDB1PzjxAsHqJT6sKVbRwwML0ZBP9PbU7Yebtu/7SWMRzvO2J3nUi9pRNITCfu4LJeooM2w4pjg==", + "license": "Apache-2.0", + "dependencies": { + "arrify": "^2.0.0", + "extend": "^3.0.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@google-cloud/precise-date": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@google-cloud/precise-date/-/precise-date-4.0.0.tgz", + "integrity": "sha512-1TUx3KdaU3cN7nfCdNf+UVqA/PSX29Cjcox3fZZBtINlRrXVTmUkQnCKv2MbBUbCopbK4olAT1IHl76uZyCiVA==", + "license": "Apache-2.0", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@google-cloud/projectify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-4.0.0.tgz", + "integrity": "sha512-MmaX6HeSvyPbWGwFq7mXdo0uQZLGBYCwziiLIGq5JVX+/bdI3SAq6bP98trV5eTWfLuvsMcIC1YJOF2vfteLFA==", + "license": "Apache-2.0", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@google-cloud/promisify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-4.0.0.tgz", + "integrity": "sha512-Orxzlfb9c67A15cq2JQEyVc7wEsmFBmHjZWZYQMUyJ1qivXyMwdyNOs9odi79hze+2zqdTtu1E19IM/FtqZ10g==", + "license": "Apache-2.0", + "engines": { + "node": ">=14" + } + }, + "node_modules/@google-cloud/pubsub": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@google-cloud/pubsub/-/pubsub-4.11.0.tgz", + "integrity": "sha512-xWxJAlyUGd6OPp97u8maMcI3xVXuHjxfwh6Dr7P/P+6NK9o446slJobsbgsmK0xKY4nTK8m5uuJrhEKapfZSmQ==", + "license": "Apache-2.0", + "dependencies": { + "@google-cloud/paginator": "^5.0.0", + "@google-cloud/precise-date": "^4.0.0", + "@google-cloud/projectify": "^4.0.0", + "@google-cloud/promisify": "~4.0.0", + "@opentelemetry/api": "~1.9.0", + "@opentelemetry/semantic-conventions": "~1.30.0", + "arrify": "^2.0.0", + "extend": "^3.0.2", + "google-auth-library": "^9.3.0", + "google-gax": "^4.3.3", + "heap-js": "^2.2.0", + "is-stream-ended": "^0.1.4", + "lodash.snakecase": "^4.1.1", + "p-defer": "^3.0.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@google-cloud/storage": { + "version": "7.17.1", + "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-7.17.1.tgz", + "integrity": "sha512-2FMQbpU7qK+OtBPaegC6n+XevgZksobUGo6mGKnXNmeZpvLiAo1gTAE3oTKsrMGDV4VtL8Zzpono0YsK/Q7Iqg==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@google-cloud/paginator": "^5.0.0", + "@google-cloud/projectify": "^4.0.0", + "@google-cloud/promisify": "<4.1.0", + "abort-controller": "^3.0.0", + "async-retry": "^1.3.3", + "duplexify": "^4.1.3", + "fast-xml-parser": "^4.4.1", + "gaxios": "^6.0.2", + "google-auth-library": "^9.6.3", + "html-entities": "^2.5.2", + "mime": "^3.0.0", + "p-limit": "^3.0.1", + "retry-request": "^7.0.0", + "teeny-request": "^9.0.0", + "uuid": "^8.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@google-cloud/storage/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", + "optional": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@google-cloud/tasks": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@google-cloud/tasks/-/tasks-6.2.0.tgz", + "integrity": "sha512-LHnmkhaMWoVTU7mYMtlNy++Gva2273vATiHYbmxN4QJ8cHXcFHynYByZvCxUqW/ehANheQZ5d/JVS8Q21Gui8w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "google-gax": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@google-cloud/tasks/node_modules/@grpc/proto-loader": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.8.0.tgz", + "integrity": "sha512-rc1hOQtjIWGxcxpb9aHAfLpIctjEnsDehj0DAiVfBlmT84uvR0uUtN2hEi/ecvWVjXUGf5qPF4qEgiLOx1YIMQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.5.3", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@google-cloud/tasks/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/@google-cloud/tasks/node_modules/gaxios": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-7.1.1.tgz", + "integrity": "sha512-Odju3uBUJyVCkW64nLD4wKLhbh93bh6vIg/ZIXkWiLPBrdgtc65+tls/qml+un3pr6JqYVFDZbbmLDQT68rTOQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "extend": "^3.0.2", + "https-proxy-agent": "^7.0.1", + "node-fetch": "^3.3.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@google-cloud/tasks/node_modules/gcp-metadata": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-7.0.1.tgz", + "integrity": "sha512-UcO3kefx6dCcZkgcTGgVOTFb7b1LlQ02hY1omMjjrrBzkajRMCFgYOjs7J71WqnuG1k2b+9ppGL7FsOfhZMQKQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "gaxios": "^7.0.0", + "google-logging-utils": "^1.0.0", + "json-bigint": "^1.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@google-cloud/tasks/node_modules/google-auth-library": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-10.3.0.tgz", + "integrity": "sha512-ylSE3RlCRZfZB56PFJSfUCuiuPq83Fx8hqu1KPWGK8FVdSaxlp/qkeMMX/DT/18xkwXIHvXEXkZsljRwfrdEfQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "base64-js": "^1.3.0", + "ecdsa-sig-formatter": "^1.0.11", + "gaxios": "^7.0.0", + "gcp-metadata": "^7.0.0", + "google-logging-utils": "^1.0.0", + "gtoken": "^8.0.0", + "jws": "^4.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@google-cloud/tasks/node_modules/google-gax": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-5.0.3.tgz", + "integrity": "sha512-DkWybwgkV8HA9aIizNEHEUHd8ho1BzGGQ/YMGDsTt167dQ8pk/oMiwxpUFvh6Ta93m8ZN7KwdWmP3o46HWjV+A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@grpc/grpc-js": "^1.12.6", + "@grpc/proto-loader": "^0.8.0", + "abort-controller": "^3.0.0", + "duplexify": "^4.1.3", + "google-auth-library": "^10.1.0", + "google-logging-utils": "^1.1.1", + "node-fetch": "^3.3.2", + "object-hash": "^3.0.0", + "proto3-json-serializer": "^3.0.0", + "protobufjs": "^7.5.3", + "retry-request": "^8.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@google-cloud/tasks/node_modules/google-logging-utils": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-1.1.1.tgz", + "integrity": "sha512-rcX58I7nqpu4mbKztFeOAObbomBbHU2oIb/d3tJfF3dizGSApqtSwYJigGCooHdnMyQBIw8BrWyK96w3YXgr6A==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=14" + } + }, + "node_modules/@google-cloud/tasks/node_modules/gtoken": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-8.0.0.tgz", + "integrity": "sha512-+CqsMbHPiSTdtSO14O51eMNlrp9N79gmeqmXeouJOhfucAedHw9noVe/n5uJk3tbKE6a+6ZCQg3RPhVhHByAIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "gaxios": "^7.0.0", + "jws": "^4.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@google-cloud/tasks/node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/@google-cloud/tasks/node_modules/proto3-json-serializer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-3.0.2.tgz", + "integrity": "sha512-AnMIfnoK2Ml3F/ZVl5PxcwIoefMxj4U/lomJ5/B2eIGdxw4UkbV1YamtsMQsEkZATdMCKMbnI1iG9RQaJbxBGw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "protobufjs": "^7.4.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@google-cloud/tasks/node_modules/retry-request": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-8.0.2.tgz", + "integrity": "sha512-JzFPAfklk1kjR1w76f0QOIhoDkNkSqW8wYKT08n9yysTmZfB+RQ2QoXoTAeOi1HD9ZipTyTAZg3c4pM/jeqgSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend": "^3.0.2", + "teeny-request": "^10.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@google-cloud/tasks/node_modules/teeny-request": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-10.1.0.tgz", + "integrity": "sha512-3ZnLvgWF29jikg1sAQ1g0o+lr5JX6sVgYvfUJazn7ZjJroDBUTWp44/+cFVX0bULjv4vci+rBD+oGVAkWqhUbw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "node-fetch": "^3.3.2", + "stream-events": "^1.0.5" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@google-cloud/tasks/node_modules/teeny-request/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/@grpc/grpc-js": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.13.4.tgz", + "integrity": "sha512-GsFaMXCkMqkKIvwCQjCrwH+GHbPKBjhwo/8ZuUkWHqbI73Kky9I+pQltrlT0+MWpedCoosda53lgjYfyEPgxBg==", + "license": "Apache-2.0", + "dependencies": { + "@grpc/proto-loader": "^0.7.13", + "@js-sdsl/ordered-map": "^4.4.2" + }, + "engines": { + "node": ">=12.10.0" + } + }, + "node_modules/@grpc/proto-loader": { + "version": "0.7.15", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.15.tgz", + "integrity": "sha512-tMXdRCfYVixjuFK+Hk0Q1s38gV9zDiDJfWL3h1rv4Qc39oILCu1TRTDt7+fGUI8K4G1Fj125Hx/ru3azECWTyQ==", + "license": "Apache-2.0", + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.5", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@js-sdsl/ordered-map": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", + "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, + "node_modules/@opentelemetry/api": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", + "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", + "license": "Apache-2.0", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@opentelemetry/semantic-conventions": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.30.0.tgz", + "integrity": "sha512-4VlGgo32k2EQ2wcCY3vEU28A0O13aOtHz3Xt2/2U5FAh9EfhD6t6DqL5Z6yAnRCntbTFDU4YfbpyzSlHNWycPw==", + "license": "Apache-2.0", + "engines": { + "node": ">=14" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "license": "BSD-3-Clause" + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.6", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", + "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/caseless": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.5.tgz", + "integrity": "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==", + "license": "MIT" + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/express": { + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.23.tgz", + "integrity": "sha512-Crp6WY9aTYP3qPi2wGDo9iUe/rceX01UMhnF1jmwDcKCFM6cx7YhGP/Mpr3y9AASpfHixIG0E6azCcL5OcDHsQ==", + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.19.6", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz", + "integrity": "sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==", + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz", + "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==", + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.5.14", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "node_modules/@types/jsonwebtoken": { + "version": "9.0.10", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.10.tgz", + "integrity": "sha512-asx5hIG9Qmf/1oStypjanR7iKTv0gXQ1Ov/jfrX6kS/EO0OFni8orbmGCn0672NHR3kXHwpAwR+B368ZGN/2rA==", + "license": "MIT", + "dependencies": { + "@types/ms": "*", + "@types/node": "*" + } + }, + "node_modules/@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==", + "license": "MIT" + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "license": "MIT" + }, + "node_modules/@types/ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", + "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "20.19.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.15.tgz", + "integrity": "sha512-W3bqcbLsRdFDVcmAM5l6oLlcl67vjevn8j1FPZ4nx+K5jNoWCh+FC/btxFoBPnvQlrHHDwfjp1kjIEDfwJ0Mog==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/qs": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==", + "license": "MIT" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "license": "MIT" + }, + "node_modules/@types/request": { + "version": "2.48.13", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.13.tgz", + "integrity": "sha512-FGJ6udDNUCjd19pp0Q3iTiDkwhYup7J8hpMW9c4k53NrccQFFWKRho6hvtPPEhnXWKvukfwAlB6DbDz4yhH5Gg==", + "license": "MIT", + "dependencies": { + "@types/caseless": "*", + "@types/node": "*", + "@types/tough-cookie": "*", + "form-data": "^2.5.5" + } + }, + "node_modules/@types/send": { + "version": "0.17.5", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.5.tgz", + "integrity": "sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==", + "license": "MIT", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.8", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.8.tgz", + "integrity": "sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==", + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/tough-cookie": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", + "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", + "license": "MIT" + }, + "node_modules/@types/yargs": { + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "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==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/async-retry": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz", + "integrity": "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==", + "license": "MIT", + "optional": true, + "dependencies": { + "retry": "0.13.1" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", + "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/baseline-browser-mapping": { + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.4.tgz", + "integrity": "sha512-L+YvJwGAgwJBV1p6ffpSTa2KRc69EeeYGYjRVWKs0GKrK+LON0GC0gV+rKSNtALEDvMDqkvCFq9r1r94/Gjwxw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.js" + } + }, + "node_modules/bignumber.js": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", + "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.0.tgz", + "integrity": "sha512-P9go2WrP9FiPwLv3zqRD/Uoxo0RSHjzFCiQz7d4vbmwNqQFo9T9WCeP/Qn5EbcKQY6DBbkxEXNcpJOmncNrb7A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.8.2", + "caniuse-lite": "^1.0.30001741", + "electron-to-chromium": "^1.5.218", + "node-releases": "^2.0.21", + "update-browserslist-db": "^1.1.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "license": "BSD-3-Clause" + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "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==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001741", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001741.tgz", + "integrity": "sha512-QGUGitqsc8ARjLdgAfxETDhRbJ0REsP6O3I96TAth/mVjh2cYzN2u+3AzPP3aVSm2FehEItaJw1xd+IGBXWeSw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "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/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", + "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "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==", + "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==", + "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==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.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, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dedent": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", + "integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "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==", + "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/duplexify": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.3.tgz", + "integrity": "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==", + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.4.1", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1", + "stream-shift": "^1.0.2" + } + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.218", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.218.tgz", + "integrity": "sha512-uwwdN0TUHs8u6iRgN8vKeWZMRll4gBkz+QMqdS7DDe49uiK68/UX92lFb61oiFPrpYZNeZIqa4bA7O6Aiasnzg==", + "dev": true, + "license": "ISC" + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "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==", + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.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==", + "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==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "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==", + "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/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "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/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "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/farmhash-modern": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/farmhash-modern/-/farmhash-modern-1.1.0.tgz", + "integrity": "sha512-6ypT4XfgqJk/F3Yuv4SX26I3doUjt0GTG4a+JgWxXQpxXzTBq8fPUeGHfcYMMDPHJHm3yPOSjaeBwBGAHWXCdA==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/fast-xml-parser": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.3.tgz", + "integrity": "sha512-RKihhV+SHsIUGXObeVy9AXiBbFwkVk7Syp8XgwN5U3JV416+Gwp/GO9i0JYKmikykgz/UHRrrV4ROuZEo/T0ig==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "optional": true, + "dependencies": { + "strnum": "^1.1.1" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "node_modules/faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "license": "Apache-2.0", + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/firebase": { + "version": "12.2.1", + "resolved": "https://registry.npmjs.org/firebase/-/firebase-12.2.1.tgz", + "integrity": "sha512-UkuW2ZYaq/QuOQ24bfaqmkVqoBFhkA/ptATfPuRtc5vdm+zhwc3mfZBwFe6LqH9yrCN/6rAblgxKz2/0tDvA7w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/ai": "2.2.1", + "@firebase/analytics": "0.10.18", + "@firebase/analytics-compat": "0.2.24", + "@firebase/app": "0.14.2", + "@firebase/app-check": "0.11.0", + "@firebase/app-check-compat": "0.4.0", + "@firebase/app-compat": "0.5.2", + "@firebase/app-types": "0.9.3", + "@firebase/auth": "1.11.0", + "@firebase/auth-compat": "0.6.0", + "@firebase/data-connect": "0.3.11", + "@firebase/database": "1.1.0", + "@firebase/database-compat": "2.1.0", + "@firebase/firestore": "4.9.1", + "@firebase/firestore-compat": "0.4.1", + "@firebase/functions": "0.13.1", + "@firebase/functions-compat": "0.4.1", + "@firebase/installations": "0.6.19", + "@firebase/installations-compat": "0.2.19", + "@firebase/messaging": "0.12.23", + "@firebase/messaging-compat": "0.2.23", + "@firebase/performance": "0.7.9", + "@firebase/performance-compat": "0.2.22", + "@firebase/remote-config": "0.6.6", + "@firebase/remote-config-compat": "0.2.19", + "@firebase/storage": "0.14.0", + "@firebase/storage-compat": "0.4.0", + "@firebase/util": "1.13.0" + } + }, + "node_modules/firebase-admin": { + "version": "12.7.0", + "resolved": "https://registry.npmjs.org/firebase-admin/-/firebase-admin-12.7.0.tgz", + "integrity": "sha512-raFIrOyTqREbyXsNkSHyciQLfv8AUZazehPaQS1lZBSCDYW74FYXU0nQZa3qHI4K+hawohlDbywZ4+qce9YNxA==", + "license": "Apache-2.0", + "dependencies": { + "@fastify/busboy": "^3.0.0", + "@firebase/database-compat": "1.0.8", + "@firebase/database-types": "1.0.5", + "@types/node": "^22.0.1", + "farmhash-modern": "^1.1.0", + "jsonwebtoken": "^9.0.0", + "jwks-rsa": "^3.1.0", + "node-forge": "^1.3.1", + "uuid": "^10.0.0" + }, + "engines": { + "node": ">=14" + }, + "optionalDependencies": { + "@google-cloud/firestore": "^7.7.0", + "@google-cloud/storage": "^7.7.0" + } + }, + "node_modules/firebase-admin/node_modules/@types/node": { + "version": "22.18.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.18.4.tgz", + "integrity": "sha512-UJdblFqXymSBhmZf96BnbisoFIr8ooiiBRMolQgg77Ea+VM37jXw76C2LQr9n8wm9+i/OvlUlW6xSvqwzwqznw==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/firebase/node_modules/@firebase/app-check-interop-types": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@firebase/app-check-interop-types/-/app-check-interop-types-0.3.3.tgz", + "integrity": "sha512-gAlxfPLT2j8bTI/qfe3ahl2I2YcBQ8cFIBdhAQA4I2f3TndcO+22YizyGYuttLHPQEpWkhmpFW60VCFEPg4g5A==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/firebase/node_modules/@firebase/app-types": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.9.3.tgz", + "integrity": "sha512-kRVpIl4vVGJ4baogMDINbyrIOtOxqhkZQg4jTq3l8Lw6WSk0xfpEYzezFu+Kl4ve4fbPl79dvwRtaFqAC/ucCw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/firebase/node_modules/@firebase/auth-interop-types": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.2.4.tgz", + "integrity": "sha512-JPgcXKCuO+CWqGDnigBtvo09HeBs5u/Ktc2GaFj2m01hLarbxthLNm7Fk8iOP1aqAtXV+fnnGj7U28xmk7IwVA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/firebase/node_modules/@firebase/component": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.0.tgz", + "integrity": "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/firebase/node_modules/@firebase/database": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@firebase/database/-/database-1.1.0.tgz", + "integrity": "sha512-gM6MJFae3pTyNLoc9VcJNuaUDej0ctdjn3cVtILo3D5lpp0dmUHHLFN/pUKe7ImyeB1KAvRlEYxvIHNF04Filg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/app-check-interop-types": "0.3.3", + "@firebase/auth-interop-types": "0.2.4", + "@firebase/component": "0.7.0", + "@firebase/logger": "0.5.0", + "@firebase/util": "1.13.0", + "faye-websocket": "0.11.4", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/firebase/node_modules/@firebase/database-compat": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-2.1.0.tgz", + "integrity": "sha512-8nYc43RqxScsePVd1qe1xxvWNf0OBnbwHxmXJ7MHSuuTVYFO3eLyLW3PiCKJ9fHnmIz4p4LbieXwz+qtr9PZDg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.0", + "@firebase/database": "1.1.0", + "@firebase/database-types": "1.0.16", + "@firebase/logger": "0.5.0", + "@firebase/util": "1.13.0", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/firebase/node_modules/@firebase/database-types": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-1.0.16.tgz", + "integrity": "sha512-xkQLQfU5De7+SPhEGAXFBnDryUWhhlFXelEg2YeZOQMCdoe7dL64DDAd77SQsR+6uoXIZY5MB4y/inCs4GTfcw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@firebase/app-types": "0.9.3", + "@firebase/util": "1.13.0" + } + }, + "node_modules/firebase/node_modules/@firebase/logger": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.5.0.tgz", + "integrity": "sha512-cGskaAvkrnh42b3BA3doDWeBmuHFO/Mx5A83rbRDYakPjO9bJtRL3dX7javzc2Rr/JHZf4HlterTW2lUkfeN4g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/firebase/node_modules/@firebase/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.13.0.tgz", + "integrity": "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/form-data": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.5.tgz", + "integrity": "sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.35", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "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==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", + "license": "MIT", + "optional": true + }, + "node_modules/gaxios": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.7.1.tgz", + "integrity": "sha512-LDODD4TMYx7XXdpwxAVRAIAuB0bzv0s+ywFonY46k126qzQHT9ygyoa9tncmOiQmmDrik65UYsEkv3lbfqQ3yQ==", + "license": "Apache-2.0", + "dependencies": { + "extend": "^3.0.2", + "https-proxy-agent": "^7.0.1", + "is-stream": "^2.0.0", + "node-fetch": "^2.6.9", + "uuid": "^9.0.1" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/gaxios/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/gcp-metadata": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.1.1.tgz", + "integrity": "sha512-a4tiq7E0/5fTjxPAaH4jpjkSv/uCaU2p5KC6HVGrvl0cDjA8iBZv4vv1gyzlmK0ZUKqwpOyQMKzZQe3lTit77A==", + "license": "Apache-2.0", + "dependencies": { + "gaxios": "^6.1.1", + "google-logging-utils": "^0.0.2", + "json-bigint": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "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==", + "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-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/google-auth-library": { + "version": "9.15.1", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.15.1.tgz", + "integrity": "sha512-Jb6Z0+nvECVz+2lzSMt9u98UsoakXxA2HGHMCxh+so3n90XgYWkq5dur19JAJV7ONiJY22yBTyJB1TSkvPq9Ng==", + "license": "Apache-2.0", + "dependencies": { + "base64-js": "^1.3.0", + "ecdsa-sig-formatter": "^1.0.11", + "gaxios": "^6.1.1", + "gcp-metadata": "^6.1.0", + "gtoken": "^7.0.0", + "jws": "^4.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/google-gax": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-4.6.1.tgz", + "integrity": "sha512-V6eky/xz2mcKfAd1Ioxyd6nmA61gao3n01C+YeuIwu3vzM9EDR6wcVzMSIbLMDXWeoi9SHYctXuKYC5uJUT3eQ==", + "license": "Apache-2.0", + "dependencies": { + "@grpc/grpc-js": "^1.10.9", + "@grpc/proto-loader": "^0.7.13", + "@types/long": "^4.0.0", + "abort-controller": "^3.0.0", + "duplexify": "^4.0.0", + "google-auth-library": "^9.3.0", + "node-fetch": "^2.7.0", + "object-hash": "^3.0.0", + "proto3-json-serializer": "^2.0.2", + "protobufjs": "^7.3.2", + "retry-request": "^7.0.0", + "uuid": "^9.0.1" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/google-gax/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/google-logging-utils": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-0.0.2.tgz", + "integrity": "sha512-NEgUnEcBiP5HrPzufUkBzJOD/Sxsco3rLNo1F1TNf7ieU8ryUzBhqba8r756CjLX7rn3fHl6iLEwPYuqpoKgQQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=14" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "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", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/gtoken": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz", + "integrity": "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==", + "license": "MIT", + "dependencies": { + "gaxios": "^6.0.0", + "jws": "^4.0.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "engines": { + "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==", + "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==", + "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.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/heap-js": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/heap-js/-/heap-js-2.6.0.tgz", + "integrity": "sha512-trFMIq3PATiFRiQmNNeHtsrkwYRByIXUbYNbotiY9RLVfMkdwZdd2eQ38mGt7BRiCKBaj1DyBAIHmm7mmXPuuw==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/html-entities": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.6.0.tgz", + "integrity": "sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/mdevils" + }, + { + "type": "patreon", + "url": "https://patreon.com/mdevils" + } + ], + "license": "MIT", + "optional": true + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/http-parser-js": { + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.10.tgz", + "integrity": "sha512-Pysuw9XpUq5dVc/2SMHpuTY01RFl8fttgcyunjL7eEMhGM3cI4eOmiCycJDVCo/7O7ClfQD3SaI6ftDzqOXYMA==", + "license": "MIT" + }, + "node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "license": "MIT", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/http-proxy-agent/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==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.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==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/idb": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/idb/-/idb-7.1.1.tgz", + "integrity": "sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-stream-ended": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.4.tgz", + "integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/jose": { + "version": "4.15.9", + "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.9.tgz", + "integrity": "sha512-1vUQX+IdDMVPj4k8kOxgUqlcK518yluMuGZwqlr44FS1ppZB/5GWh4rZG89erpOBOJjU/OBsnCVFfapsRz6nEA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "license": "MIT", + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "license": "MIT", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jsonwebtoken/node_modules/jwa": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.2.tgz", + "integrity": "sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw==", + "license": "MIT", + "dependencies": { + "buffer-equal-constant-time": "^1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jsonwebtoken/node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "license": "MIT", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jsonwebtoken/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jwa": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz", + "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==", + "license": "MIT", + "dependencies": { + "buffer-equal-constant-time": "^1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jwks-rsa": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jwks-rsa/-/jwks-rsa-3.2.0.tgz", + "integrity": "sha512-PwchfHcQK/5PSydeKCs1ylNym0w/SSv8a62DgHJ//7x2ZclCoinlsjAfDxAAbpoTPybOum/Jgy+vkvMmKz89Ww==", + "license": "MIT", + "dependencies": { + "@types/express": "^4.17.20", + "@types/jsonwebtoken": "^9.0.4", + "debug": "^4.3.4", + "jose": "^4.15.4", + "limiter": "^1.1.5", + "lru-memoizer": "^2.2.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/jws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", + "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "license": "MIT", + "dependencies": { + "jwa": "^2.0.0", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/limiter": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.5.tgz", + "integrity": "sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA==" + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "license": "MIT" + }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "license": "MIT" + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", + "license": "MIT" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", + "license": "MIT" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", + "license": "MIT" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", + "license": "MIT" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "license": "MIT" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", + "license": "MIT" + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "license": "MIT" + }, + "node_modules/lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==", + "license": "MIT" + }, + "node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "license": "Apache-2.0" + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/lru-memoizer": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lru-memoizer/-/lru-memoizer-2.3.0.tgz", + "integrity": "sha512-GXn7gyHAMhO13WSKrIiNfztwxodVsP8IoZ3XfrJV4yH2x0/OeTO/FIaAHTY5YekdGgW94njfuKmyyt1E0mR6Ug==", + "license": "MIT", + "dependencies": { + "lodash.clonedeep": "^4.5.0", + "lru-cache": "6.0.0" + } + }, + "node_modules/lru-memoizer/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/lru-memoizer/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tmpl": "1.0.5" + } + }, + "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==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "license": "MIT", + "optional": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "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==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "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", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "deprecated": "Use your platform's native DOMException instead", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "license": "(BSD-3-Clause OR GPL-2.0)", + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.21", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.21.tgz", + "integrity": "sha512-5b0pgg78U3hwXkCM8Z9b2FJdPZlr9Psr9V2gQPESdGHqbntyFJKFW4r5TeWGFzafGY3hzs1JC62VEQMbl1JFkw==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "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==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-defer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-3.0.0.tgz", + "integrity": "sha512-ugZxsxmtTln604yeYd29EGrNhazN2lywetzpKhfmQjW/VJmhpDmWbiX+h0zL8V91R0UXkhb3KtPmyq9PZw3aYw==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/proto3-json-serializer": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-2.0.2.tgz", + "integrity": "sha512-SAzp/O4Yh02jGdRc+uIrGoe87dkN/XtwxfZ4ZyafJHymd79ozp5VG5nyZ7ygqPM5+cpLDjjGnYFUkngonyDPOQ==", + "license": "Apache-2.0", + "dependencies": { + "protobufjs": "^7.2.5" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/protobufjs": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz", + "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==", + "hasInstallScript": true, + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", + "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/retry-request": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-7.0.2.tgz", + "integrity": "sha512-dUOvLMJ0/JJYEn8NrpOaGNE7X3vpI5XlZS/u0ANjqtcZVKnIxP7IgCFwrKTxENw29emmwug53awKtaMm4i9g5w==", + "license": "MIT", + "dependencies": { + "@types/request": "^2.48.8", + "extend": "^3.0.2", + "teeny-request": "^9.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "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/stream-events": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz", + "integrity": "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==", + "license": "MIT", + "dependencies": { + "stubs": "^3.0.0" + } + }, + "node_modules/stream-shift": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz", + "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==", + "license": "MIT" + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strnum": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.1.2.tgz", + "integrity": "sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "optional": true + }, + "node_modules/stubs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", + "integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==", + "license": "MIT" + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/teeny-request": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-9.0.0.tgz", + "integrity": "sha512-resvxdc6Mgb7YEThw6G6bExlXKkv6+YbuzGg9xuXxSgxJF7Ozs+o8Y9+2R3sArdWdW8nOokoQb1yrpFB0pQK2g==", + "license": "Apache-2.0", + "dependencies": { + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.9", + "stream-events": "^1.0.5", + "uuid": "^9.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/teeny-request/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==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/teeny-request/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==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/teeny-request/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/ts-jest": { + "version": "29.4.2", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.2.tgz", + "integrity": "sha512-pBNOkn4HtuLpNrXTMVRC9b642CBaDnKqWXny4OzuoULT9S7Kf8MMlaRe2veKax12rjf5WcpMBhVPbQurlWGNxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "^0.2.6", + "fast-json-stable-stringify": "^2.1.0", + "handlebars": "^4.7.8", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.7.2", + "type-fest": "^4.41.0", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0 || ^30.0.0", + "@jest/types": "^29.0.0 || ^30.0.0", + "babel-jest": "^29.0.0 || ^30.0.0", + "jest": "^29.0.0 || ^30.0.0", + "jest-util": "^29.0.0 || ^30.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jest-util": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-jest/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", + "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "license": "MIT" + }, + "node_modules/update-browserslist-db": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", + "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/uuid": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/web-vitals": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-4.2.4.tgz", + "integrity": "sha512-r4DIlprAGwJ7YM11VZp4R884m0Vmgr6EAKe3P+kO0PPj3Unqyvv59rczf6UiGcb9Z8QxZVcqKNwv/g0WNdWwsw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "license": "Apache-2.0", + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "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==", + "license": "ISC" + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/yaml": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", + "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/integration_test/package.json b/integration_test/package.json new file mode 100644 index 000000000..c20c1b939 --- /dev/null +++ b/integration_test/package.json @@ -0,0 +1,44 @@ +{ + "name": "integration-test-declarative", + "version": "1.0.0", + "type": "module", + "description": "Declarative Firebase Functions integration tests", + "scripts": { + "generate": "node scripts/generate.js", + "test": "jest --forceExit", + "run-tests": "node scripts/run-tests.js", + "run-suite": "./scripts/run-suite.sh", + "test:firestore": "node scripts/run-tests.js v1_firestore", + "test:v1": "node scripts/run-tests.js v1_firestore v1_database v1_pubsub v1_storage v1_tasks v1_remoteconfig v1_testlab v1_auth_nonblocking", + "test:v1:all": "node scripts/run-tests.js --sequential 'v1_*'", + "test:v1:all:parallel": "node scripts/run-tests.js 'v1_*'", + "test:v2:all": "node scripts/run-tests.js --sequential 'v2_*'", + "test:v2:all:parallel": "node scripts/run-tests.js 'v2_*'", + "test:all:sequential": "node scripts/run-tests.js --sequential", + "test:v1:auth-before-create": "node scripts/run-tests.js v1_auth_before_create", + "test:v1:auth-before-signin": "node scripts/run-tests.js v1_auth_before_signin", + "cloudbuild:v1": "gcloud builds submit --config=cloudbuild-v1.yaml --project=functions-integration-tests", + "cloudbuild:v2": "gcloud builds submit --config=cloudbuild-v2.yaml --project=functions-integration-tests-v2", + "cloudbuild:both": "gcloud builds submit --config=cloudbuild-v1.yaml --project=functions-integration-tests & gcloud builds submit --config=cloudbuild-v2.yaml --project=functions-integration-tests-v2 & wait", + "cleanup": "./scripts/cleanup-suite.sh", + "cleanup:list": "./scripts/cleanup-suite.sh --list-artifacts", + "clean": "rm -rf generated/*" + }, + "dependencies": { + "@google-cloud/pubsub": "^4.0.0", + "ajv": "^8.17.1", + "chalk": "^4.1.2", + "firebase-admin": "^12.0.0" + }, + "devDependencies": { + "@google-cloud/tasks": "^6.2.0", + "@types/jest": "^29.5.11", + "@types/node": "^20.10.5", + "firebase": "^12.2.1", + "handlebars": "^4.7.8", + "jest": "^29.7.0", + "ts-jest": "^29.1.1", + "typescript": "^5.3.3", + "yaml": "^2.3.4" + } +} diff --git a/integration_test/package.json.template b/integration_test/package.json.template deleted file mode 100644 index 42cdf121c..000000000 --- a/integration_test/package.json.template +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "functions", - "description": "Integration test for the Firebase SDK for Google Cloud Functions", - "scripts": { - "build": "./node_modules/.bin/tsc" - }, - "dependencies": { - "@google-cloud/pubsub": "^2.10.0", - "firebase-admin": "__FIREBASE_ADMIN__", - "firebase-functions": "__SDK_TARBALL__", - "node-fetch": "^2.6.7" - }, - "main": "lib/index.js", - "devDependencies": { - "@types/node-fetch": "^2.6.1", - "typescript": "^4.3.5" - }, - "engines": { - "node": "__NODE_VERSION__" - }, - "private": true -} diff --git a/integration_test/run_tests.sh b/integration_test/run_tests.sh deleted file mode 100755 index 681d2dc1e..000000000 --- a/integration_test/run_tests.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env bash - -# Exit immediately if a command exits with a non-zero status. -set -e - -PROJECT_ID="${GCLOUD_PROJECT}" -TIMESTAMP=$(date +%s) - -if [[ "${PROJECT_ID}" == "" ]]; then - echo "process.env.GCLOUD_PROJECT cannot be empty" - exit 1 -fi - -# Directory where this script lives. -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -function announce { - echo -e "\n\n##### $1" -} - -function build_sdk { - announce "Building SDK..." - cd "${DIR}/.." - rm -f firebase-functions-*.tgz - npm run build:pack - mv firebase-functions-*.tgz "integration_test/functions/firebase-functions-${TIMESTAMP}.tgz" -} - -# Creates a Package.json from package.json.template -# @param timestmap of the current SDK build -# @param Node version to test under -function create_package_json { - cd "${DIR}" - cp package.json.template functions/package.json - # we have to do the -e flag here so that it work both on linux and mac os, but that creates an extra - # backup file called package.json-e that we should clean up afterwards. - sed -i -e "s/__SDK_TARBALL__/firebase-functions-$1.tgz/g" functions/package.json - sed -i -e "s/__NODE_VERSION__/$2/g" functions/package.json - sed -i -e "s/__FIREBASE_ADMIN__/$3/g" functions/package.json - rm -f functions/package.json-e -} - -function install_deps { - announce "Installing dependencies..." - cd "${DIR}/functions" - rm -rf node_modules/firebase-functions - npm install -} - -function delete_all_functions { - announce "Deleting all functions in project..." - cd "${DIR}" - # Try to delete, if there are errors it is because the project is already empty, - # in that case do nothing. - firebase functions:delete integrationTests v1 v2 --force --project=$PROJECT_ID || : & - wait - announce "Project emptied." -} - -function deploy { - # Deploy functions, and security rules for database and Firestore. If the deploy fails, retry twice - for i in 1 2; do firebase deploy --project="${PROJECT_ID}" --only functions,database,firestore && break; done -} - -function run_tests { - announce "Running integration tests..." - - # Construct the URL for the test function. This may change in the future, - # causing this script to start failing, but currently we don't have a very - # reliable way of determining the URL dynamically. - TEST_DOMAIN="cloudfunctions.net" - if [[ "${FIREBASE_FUNCTIONS_TEST_REGION}" == "" ]]; then - FIREBASE_FUNCTIONS_TEST_REGION="us-central1" - fi - TEST_URL="https://${FIREBASE_FUNCTIONS_TEST_REGION}-${PROJECT_ID}.${TEST_DOMAIN}/integrationTests" - echo "${TEST_URL}" - - curl --fail -H "Authorization: Bearer $(gcloud auth print-identity-token)" "${TEST_URL}" -} - -function cleanup { - announce "Performing cleanup..." - delete_all_functions - rm "${DIR}/functions/firebase-functions-${TIMESTAMP}.tgz" - rm "${DIR}/functions/package.json" - rm -f "${DIR}/functions/firebase-debug.log" - rm -rf "${DIR}/functions/lib" - rm -rf "${DIR}/functions/node_modules" -} - -# Setup -build_sdk -delete_all_functions - -for version in 14 16; do - create_package_json $TIMESTAMP $version "^10.0.0" - install_deps - announce "Re-deploying the same functions to Node $version runtime ..." - deploy - run_tests -done - -# Cleanup -cleanup -announce "All tests pass!" diff --git a/integration_test/scripts/cleanup-auth-users.cjs b/integration_test/scripts/cleanup-auth-users.cjs new file mode 100644 index 000000000..4b02313c7 --- /dev/null +++ b/integration_test/scripts/cleanup-auth-users.cjs @@ -0,0 +1,58 @@ +#!/usr/bin/env node + +/** + * Cleanup script for auth users created during tests + * Usage: node cleanup-auth-users.js + */ + +const admin = require("firebase-admin"); + +const testRunId = process.argv[2]; +const projectId = process.env.PROJECT_ID || "functions-integration-tests"; + +if (!testRunId) { + console.error("Usage: node cleanup-auth-users.js "); + process.exit(1); +} + +// Initialize admin SDK +if (!admin.apps.length) { + admin.initializeApp({ + projectId, + }); +} + +async function cleanupAuthUsers() { + try { + console.log(`Cleaning up auth users with TEST_RUN_ID: ${testRunId}`); + + // List all users and find ones created by this test run + let pageToken; + let deletedCount = 0; + + do { + const listUsersResult = await admin.auth().listUsers(1000, pageToken); + + for (const user of listUsersResult.users) { + // Check if user email contains the test run ID + if (user.email && user.email.includes(testRunId)) { + try { + await admin.auth().deleteUser(user.uid); + console.log(` Deleted user: ${user.email}`); + deletedCount++; + } catch (error) { + console.error(` Failed to delete user ${user.email}: ${error.message}`); + } + } + } + + pageToken = listUsersResult.pageToken; + } while (pageToken); + + console.log(` Deleted ${deletedCount} test users`); + } catch (error) { + console.error("Error cleaning up auth users:", error); + } +} + +cleanupAuthUsers().then(() => process.exit(0)); \ No newline at end of file diff --git a/integration_test/scripts/cleanup-suite.sh b/integration_test/scripts/cleanup-suite.sh new file mode 100755 index 000000000..3749204b4 --- /dev/null +++ b/integration_test/scripts/cleanup-suite.sh @@ -0,0 +1,223 @@ +#!/bin/bash + +# Cleanup script for deployed functions +# Usage: +# ./scripts/cleanup-suite.sh # Uses saved metadata +# ./scripts/cleanup-suite.sh # Cleanup specific run +# ./scripts/cleanup-suite.sh --pattern # Cleanup by pattern + +set -e + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +# Get directories +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT_DIR="$(dirname "$SCRIPT_DIR")" +METADATA_FILE="$ROOT_DIR/generated/.metadata.json" +ARTIFACTS_DIR="$ROOT_DIR/.test-artifacts" + +echo -e "${BLUE}═══════════════════════════════════════════════════════════${NC}" +echo -e "${GREEN}🧹 Firebase Functions Cleanup Tool${NC}" +echo -e "${BLUE}═══════════════════════════════════════════════════════════${NC}" + +# Function to cleanup by TEST_RUN_ID +cleanup_by_id() { + local TEST_RUN_ID="$1" + local PROJECT_ID="$2" + local METADATA_SOURCE="$3" # Optional metadata file + + echo -e "${YELLOW}🗑️ Cleaning up TEST_RUN_ID: $TEST_RUN_ID${NC}" + echo -e "${YELLOW} Project: $PROJECT_ID${NC}" + + # Delete functions + echo -e "${YELLOW} Deleting functions...${NC}" + + # Try to get function names from metadata if available + if [ -n "$METADATA_SOURCE" ] && [ -f "$METADATA_SOURCE" ]; then + # Extract function names from metadata + FUNCTIONS=$(grep -o '"[^"]*_'${TEST_RUN_ID}'"' "$METADATA_SOURCE" | tr -d '"') + + if [ -n "$FUNCTIONS" ]; then + for FUNCTION in $FUNCTIONS; do + echo " Deleting function: $FUNCTION" + firebase functions:delete "$FUNCTION" --project "$PROJECT_ID" --force 2>/dev/null || true + done + fi + else + # Fallback: try common patterns + echo " No metadata found, trying common function patterns..." + FUNCTION_PATTERNS=( + "firestoreDocumentOnCreateTests_${TEST_RUN_ID}" + "firestoreDocumentOnDeleteTests_${TEST_RUN_ID}" + "firestoreDocumentOnUpdateTests_${TEST_RUN_ID}" + "firestoreDocumentOnWriteTests_${TEST_RUN_ID}" + "databaseRefOnCreateTests_${TEST_RUN_ID}" + "databaseRefOnDeleteTests_${TEST_RUN_ID}" + "databaseRefOnUpdateTests_${TEST_RUN_ID}" + "databaseRefOnWriteTests_${TEST_RUN_ID}" + ) + + for FUNCTION in "${FUNCTION_PATTERNS[@]}"; do + firebase functions:delete "$FUNCTION" --project "$PROJECT_ID" --force 2>/dev/null || true + done + fi + + # Clean up Firestore collections + echo -e "${YELLOW} Cleaning up Firestore test data...${NC}" + for COLLECTION in firestoreDocumentOnCreateTests firestoreDocumentOnDeleteTests firestoreDocumentOnUpdateTests firestoreDocumentOnWriteTests; do + firebase firestore:delete "$COLLECTION/$TEST_RUN_ID" --project "$PROJECT_ID" --yes 2>/dev/null || true + done + + # Clean up Realtime Database paths + echo -e "${YELLOW} Cleaning up Realtime Database test data...${NC}" + for PATH in databaseRefOnCreateTests databaseRefOnDeleteTests databaseRefOnUpdateTests databaseRefOnWriteTests; do + firebase database:remove "/$PATH/$TEST_RUN_ID" --project "$PROJECT_ID" --force 2>/dev/null || true + done +} + +# Function to save artifact for future cleanup +save_artifact() { + if [ -f "$METADATA_FILE" ]; then + mkdir -p "$ARTIFACTS_DIR" + + # Extract metadata + TEST_RUN_ID=$(grep '"testRunId"' "$METADATA_FILE" | cut -d'"' -f4) + PROJECT_ID=$(grep '"projectId"' "$METADATA_FILE" | cut -d'"' -f4) + SUITE=$(grep '"suite"' "$METADATA_FILE" | cut -d'"' -f4) + + # Save artifact with timestamp + ARTIFACT_FILE="$ARTIFACTS_DIR/${TEST_RUN_ID}.json" + cp "$METADATA_FILE" "$ARTIFACT_FILE" + + echo -e "${GREEN}✓ Saved cleanup artifact: $ARTIFACT_FILE${NC}" + fi +} + +# Parse arguments +if [ "$1" == "--save-artifact" ]; then + # Save current metadata as artifact for future cleanup + save_artifact + exit 0 + +elif [ "$1" == "--pattern" ]; then + # Cleanup by pattern + PATTERN="$2" + PROJECT_ID="${3:-$PROJECT_ID}" + + if [ -z "$PATTERN" ] || [ -z "$PROJECT_ID" ]; then + echo -e "${RED}❌ Usage: $0 --pattern ${NC}" + exit 1 + fi + + echo -e "${YELLOW}🗑️ Cleaning up functions matching pattern: $PATTERN${NC}" + echo -e "${YELLOW} Project: $PROJECT_ID${NC}" + + FUNCTIONS=$(firebase functions:list --project "$PROJECT_ID" 2>/dev/null | grep "$PATTERN" | awk '{print $1}' || true) + + if [ -z "$FUNCTIONS" ]; then + echo -e "${YELLOW} No functions found matching pattern: $PATTERN${NC}" + else + for FUNCTION in $FUNCTIONS; do + echo " Deleting function: $FUNCTION" + firebase functions:delete "$FUNCTION" --project "$PROJECT_ID" --force 2>/dev/null || true + done + fi + +elif [ "$1" == "--list-artifacts" ]; then + # List saved artifacts + echo -e "${BLUE}📋 Saved test artifacts:${NC}" + if [ -d "$ARTIFACTS_DIR" ]; then + for artifact in "$ARTIFACTS_DIR"/*.json; do + if [ -f "$artifact" ]; then + TEST_RUN_ID=$(grep '"testRunId"' "$artifact" | cut -d'"' -f4) + PROJECT_ID=$(grep '"projectId"' "$artifact" | cut -d'"' -f4) + SUITE=$(grep '"suite"' "$artifact" | cut -d'"' -f4) + TIMESTAMP=$(grep '"generatedAt"' "$artifact" | cut -d'"' -f4) + echo -e "${GREEN} • $TEST_RUN_ID${NC} ($SUITE) - $PROJECT_ID - $TIMESTAMP" + fi + done + else + echo -e "${YELLOW} No artifacts found${NC}" + fi + +elif [ "$1" == "--clean-artifacts" ]; then + # Clean all artifacts and their deployed functions + if [ ! -d "$ARTIFACTS_DIR" ]; then + echo -e "${YELLOW}No artifacts to clean${NC}" + exit 0 + fi + + echo -e "${YELLOW}⚠️ This will clean up ALL saved test runs!${NC}" + read -p "Are you sure? (yes/no): " -r + if [[ ! $REPLY == "yes" ]]; then + echo -e "${GREEN}Cancelled${NC}" + exit 0 + fi + + for artifact in "$ARTIFACTS_DIR"/*.json; do + if [ -f "$artifact" ]; then + TEST_RUN_ID=$(grep '"testRunId"' "$artifact" | cut -d'"' -f4) + PROJECT_ID=$(grep '"projectId"' "$artifact" | cut -d'"' -f4) + cleanup_by_id "$TEST_RUN_ID" "$PROJECT_ID" + rm "$artifact" + fi + done + + echo -e "${GREEN}✅ All artifacts cleaned${NC}" + +elif [ -n "$1" ]; then + # Cleanup specific TEST_RUN_ID + TEST_RUN_ID="$1" + + # Try to find project ID from artifact + if [ -f "$ARTIFACTS_DIR/${TEST_RUN_ID}.json" ]; then + PROJECT_ID=$(grep '"projectId"' "$ARTIFACTS_DIR/${TEST_RUN_ID}.json" | cut -d'"' -f4) + echo -e "${GREEN}Found artifact for $TEST_RUN_ID${NC}" + else + # Fall back to environment or prompt + if [ -z "$PROJECT_ID" ]; then + echo -e "${YELLOW}No artifact found for $TEST_RUN_ID${NC}" + read -p "Enter PROJECT_ID: " PROJECT_ID + fi + fi + + cleanup_by_id "$TEST_RUN_ID" "$PROJECT_ID" + + # Remove artifact if exists + if [ -f "$ARTIFACTS_DIR/${TEST_RUN_ID}.json" ]; then + rm "$ARTIFACTS_DIR/${TEST_RUN_ID}.json" + echo -e "${GREEN}✓ Removed artifact${NC}" + fi + +else + # Default: use current metadata + if [ ! -f "$METADATA_FILE" ]; then + echo -e "${YELLOW}No current deployment found in generated/.metadata.json${NC}" + echo "" + echo "Usage:" + echo " $0 # Clean current deployment" + echo " $0 # Clean specific test run" + echo " $0 --pattern # Clean by pattern" + echo " $0 --list-artifacts # List saved test runs" + echo " $0 --clean-artifacts # Clean all saved test runs" + echo " $0 --save-artifact # Save current deployment for later cleanup" + exit 0 + fi + + # Extract from current metadata + TEST_RUN_ID=$(grep '"testRunId"' "$METADATA_FILE" | cut -d'"' -f4) + PROJECT_ID=$(grep '"projectId"' "$METADATA_FILE" | cut -d'"' -f4) + + cleanup_by_id "$TEST_RUN_ID" "$PROJECT_ID" "$METADATA_FILE" + + # Clean generated files + echo -e "${YELLOW} Cleaning up generated files...${NC}" + /bin/rm -rf "$ROOT_DIR/generated"/* +fi + +echo -e "${GREEN}✅ Cleanup complete!${NC}" \ No newline at end of file diff --git a/integration_test/scripts/config-loader.js b/integration_test/scripts/config-loader.js new file mode 100644 index 000000000..60bde73b1 --- /dev/null +++ b/integration_test/scripts/config-loader.js @@ -0,0 +1,316 @@ +#!/usr/bin/env node + +/** + * Configuration Loader Module + * Loads and parses the unified YAML configuration for Firebase Functions integration tests + */ + +import { readFileSync, existsSync } from "fs"; +import { parse } from "yaml"; +import { join, dirname } from "path"; +import { fileURLToPath } from "url"; +import Ajv from "ajv"; + +// Get directory paths +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +const ROOT_DIR = dirname(__dirname); + +// Default configuration path +const DEFAULT_CONFIG_PATH = join(ROOT_DIR, "config", "suites.yaml"); +const SCHEMA_PATH = join(ROOT_DIR, "config", "suites.schema.json"); + +// Initialize AJV validator +let validator = null; + +/** + * Initialize the JSON schema validator + * @returns {Function} AJV validation function + */ +function getValidator() { + if (!validator) { + // Check if schema file exists + if (!existsSync(SCHEMA_PATH)) { + throw new Error( + `Schema file not found at: ${SCHEMA_PATH}\n` + + `Please ensure the schema file exists before using validation.` + ); + } + + const ajv = new Ajv({ + allErrors: true, + verbose: true, + strict: false, // Allow additional properties where specified + }); + + try { + // Load and compile the schema + const schemaContent = readFileSync(SCHEMA_PATH, "utf8"); + const schema = JSON.parse(schemaContent); + validator = ajv.compile(schema); + } catch (error) { + throw new Error(`Failed to load schema from ${SCHEMA_PATH}: ${error.message}`); + } + } + return validator; +} + +/** + * Validate configuration against JSON schema + * @param {Object} config - Configuration object to validate + * @throws {Error} If configuration doesn't match schema + */ +export function validateConfig(config) { + const validate = getValidator(); + const valid = validate(config); + + if (!valid) { + // Format validation errors for better readability + const errors = validate.errors.map((err) => { + const path = err.instancePath || "/"; + const message = err.message || "Unknown validation error"; + + // Provide more specific error messages for common issues + if (err.keyword === "required") { + return `Missing required field '${err.params.missingProperty}' at ${path}`; + } else if (err.keyword === "enum") { + return `Invalid value at ${path}: ${message}. Allowed values: ${err.params.allowedValues.join( + ", " + )}`; + } else if (err.keyword === "pattern") { + return `Invalid format at ${path}: value doesn't match pattern ${err.params.pattern}`; + } else if (err.keyword === "type") { + return `Type error at ${path}: expected ${err.params.type}, got ${typeof err.data}`; + } else { + return `Validation error at ${path}: ${message}`; + } + }); + + throw new Error( + `Configuration validation failed:\n${errors.map((e) => ` - ${e}`).join("\n")}` + ); + } +} + +/** + * Load and parse the unified configuration file + * @param {string} configPath - Path to the configuration file (optional, defaults to config/suites.yaml) + * @returns {Object} Parsed configuration object with defaults and suites + * @throws {Error} If configuration file is not found or has invalid YAML syntax + */ +export function loadUnifiedConfig(configPath = DEFAULT_CONFIG_PATH) { + // Check if config file exists + if (!existsSync(configPath)) { + throw new Error( + `Configuration file not found at: ${configPath}\n` + + `Please create the unified configuration file or run the migration tool.` + ); + } + + try { + // Read and parse YAML file + const configContent = readFileSync(configPath, "utf8"); + const config = parse(configContent); + + // Validate basic structure + if (!config || typeof config !== "object") { + throw new Error("Invalid configuration: File must contain a valid YAML object"); + } + + if (!config.defaults) { + throw new Error("Invalid configuration: Missing 'defaults' section"); + } + + if (!config.suites || !Array.isArray(config.suites)) { + throw new Error("Invalid configuration: Missing or invalid 'suites' array"); + } + + if (config.suites.length === 0) { + throw new Error("Invalid configuration: No suites defined"); + } + + // Validate configuration against schema + try { + validateConfig(config); + } catch (validationError) { + // Re-throw with context about which file failed + throw new Error(`Schema validation failed for ${configPath}:\n${validationError.message}`); + } + + return config; + } catch (error) { + // Enhance YAML parsing errors with context + if (error.name === "YAMLParseError" || error.name === "YAMLException") { + const lineInfo = error.linePos ? ` at line ${error.linePos.start.line}` : ""; + throw new Error(`YAML syntax error in configuration file${lineInfo}:\n${error.message}`); + } + + // Re-throw other errors with context + if (!error.message.includes("Invalid configuration:")) { + throw new Error(`Failed to load configuration from ${configPath}: ${error.message}`); + } + + throw error; + } +} + +/** + * List all available suite names from the configuration + * @param {string} configPath - Path to the configuration file (optional) + * @returns {string[]} Array of suite names + */ +export function listAvailableSuites(configPath = DEFAULT_CONFIG_PATH) { + const config = loadUnifiedConfig(configPath); + return config.suites.map((suite) => suite.name); +} + +/** + * Check if the unified configuration file exists + * @param {string} configPath - Path to check (optional) + * @returns {boolean} True if configuration file exists + */ +export function hasUnifiedConfig(configPath = DEFAULT_CONFIG_PATH) { + return existsSync(configPath); +} + +/** + * Get the configuration with defaults and suites + * This is the raw configuration without suite extraction or defaults application + * @param {string} configPath - Path to the configuration file (optional) + * @returns {Object} Configuration object with defaults and suites array + */ +export function getFullConfig(configPath = DEFAULT_CONFIG_PATH) { + return loadUnifiedConfig(configPath); +} + +/** + * Apply defaults to a suite configuration + * @param {Object} suite - Suite configuration object + * @param {Object} defaults - Default configuration values + * @returns {Object} Suite with defaults applied + */ +function applyDefaults(suite, defaults) { + // Deep clone the suite to avoid modifying the original + const mergedSuite = JSON.parse(JSON.stringify(suite)); + + // Apply top-level defaults + if (!mergedSuite.projectId && defaults.projectId) { + mergedSuite.projectId = defaults.projectId; + } + + if (!mergedSuite.region && defaults.region) { + mergedSuite.region = defaults.region; + } + + // Merge dependencies (suite overrides take precedence) + if (defaults.dependencies) { + mergedSuite.dependencies = { + ...defaults.dependencies, + ...(mergedSuite.dependencies || {}), + }; + } + + // Merge devDependencies (suite overrides take precedence) + if (defaults.devDependencies) { + mergedSuite.devDependencies = { + ...defaults.devDependencies, + ...(mergedSuite.devDependencies || {}), + }; + } + + // Apply function-level defaults + if (mergedSuite.functions && Array.isArray(mergedSuite.functions)) { + mergedSuite.functions = mergedSuite.functions.map((func) => { + const mergedFunc = { ...func }; + + // Apply timeout default (540 seconds) if not specified + if (mergedFunc.timeout === undefined && defaults.timeout !== undefined) { + mergedFunc.timeout = defaults.timeout; + } + + // Apply collection default (use function name) if not specified + if (!mergedFunc.collection && mergedFunc.name) { + mergedFunc.collection = mergedFunc.name; + } + + return mergedFunc; + }); + } + + return mergedSuite; +} + +/** + * Get a specific suite configuration with defaults applied + * @param {string} suiteName - Name of the suite to extract + * @param {string} configPath - Path to the configuration file (optional) + * @returns {Object} Suite configuration with defaults applied + * @throws {Error} If suite is not found + */ +export function getSuiteConfig(suiteName, configPath = DEFAULT_CONFIG_PATH) { + const config = loadUnifiedConfig(configPath); + + // Find the requested suite + const suite = config.suites.find((s) => s.name === suiteName); + + if (!suite) { + // Provide helpful error with available suites + const availableSuites = config.suites.map((s) => s.name); + const suggestions = availableSuites + .filter( + (name) => name.includes(suiteName.split("_")[0]) || name.includes(suiteName.split("_")[1]) + ) + .slice(0, 3); + + let errorMsg = `Suite '${suiteName}' not found in configuration.\n`; + errorMsg += `Available suites: ${availableSuites.join(", ")}\n`; + + if (suggestions.length > 0) { + errorMsg += `Did you mean: ${suggestions.join(", ")}?`; + } + + throw new Error(errorMsg); + } + + // Apply defaults to the suite + return applyDefaults(suite, config.defaults); +} + +/** + * Get multiple suite configurations with defaults applied + * @param {string[]} suiteNames - Array of suite names to extract + * @param {string} configPath - Path to the configuration file (optional) + * @returns {Object[]} Array of suite configurations with defaults applied + * @throws {Error} If any suite is not found + */ +export function getSuiteConfigs(suiteNames, configPath = DEFAULT_CONFIG_PATH) { + return suiteNames.map((name) => getSuiteConfig(name, configPath)); +} + +/** + * Get all suites matching a pattern with defaults applied + * @param {string} pattern - Pattern to match (e.g., "v1_*" for all v1 suites) + * @param {string} configPath - Path to the configuration file (optional) + * @returns {Object[]} Array of matching suite configurations with defaults applied + */ +export function getSuitesByPattern(pattern, configPath = DEFAULT_CONFIG_PATH) { + const config = loadUnifiedConfig(configPath); + + // Convert pattern to regex (e.g., "v1_*" -> /^v1_.*$/) + const regexPattern = pattern.replace(/\*/g, ".*").replace(/\?/g, "."); + const regex = new RegExp(`^${regexPattern}$`); + + // Filter and apply defaults to matching suites + const matchingSuites = config.suites + .filter((suite) => regex.test(suite.name)) + .map((suite) => applyDefaults(suite, config.defaults)); + + if (matchingSuites.length === 0) { + throw new Error(`No suites found matching pattern '${pattern}'`); + } + + return matchingSuites; +} + +// Export default configuration path for use by other modules +export const CONFIG_PATH = DEFAULT_CONFIG_PATH; diff --git a/integration_test/scripts/generate.js b/integration_test/scripts/generate.js new file mode 100644 index 000000000..c2965730a --- /dev/null +++ b/integration_test/scripts/generate.js @@ -0,0 +1,447 @@ +#!/usr/bin/env node + +/** + * Function Generator Script + * Generates Firebase Functions from unified YAML configuration using templates + */ + +import Handlebars from "handlebars"; +import { readFileSync, writeFileSync, mkdirSync, existsSync, copyFileSync } from "fs"; +import { join, dirname } from "path"; +import { fileURLToPath } from "url"; +import { getSuiteConfig, getSuitesByPattern, listAvailableSuites } from "./config-loader.js"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +const ROOT_DIR = dirname(__dirname); + +// Register Handlebars helpers +Handlebars.registerHelper("eq", (a, b) => a === b); +Handlebars.registerHelper("or", (a, b) => a || b); +Handlebars.registerHelper("unless", function (conditional, options) { + if (!conditional) { + return options.fn(this); + } + return options.inverse(this); +}); + +/** + * Generate Firebase Functions from templates + * @param {string[]} suitePatterns - Array of suite names or patterns + * @param {Object} options - Generation options + * @param {string} [options.testRunId] - Test run ID to use + * @param {string} [options.configPath] - Path to config file + * @param {string} [options.projectId] - Override project ID + * @param {string} [options.region] - Override region + * @param {string} [options.sdkTarball] - Path to SDK tarball + * @param {boolean} [options.quiet] - Suppress console output + * @returns {Promise} - Metadata about generated functions + */ +export async function generateFunctions(suitePatterns, options = {}) { + const { + testRunId = `t${Math.random().toString(36).substring(2, 10)}`, + configPath: initialConfigPath = null, + projectId: overrideProjectId = process.env.PROJECT_ID, + region: overrideRegion = process.env.REGION, + sdkTarball = process.env.SDK_TARBALL || "file:firebase-functions-local.tgz", + quiet = false, + } = options; + + const log = quiet ? () => {} : console.log.bind(console); + const error = quiet ? () => {} : console.error.bind(console); + + log(`🚀 Generating suites: ${suitePatterns.join(", ")}`); + log(` TEST_RUN_ID: ${testRunId}`); + + // Load suite configurations + const suites = []; + let projectId, region; + let configPath = initialConfigPath; + + for (const pattern of suitePatterns) { + try { + let suitesToAdd = []; + + // Check if it's a pattern (contains * or ?) + if (pattern.includes("*") || pattern.includes("?")) { + // If no config path specified, try to auto-detect based on pattern + if (!configPath) { + if (pattern.startsWith("v1")) { + configPath = join(ROOT_DIR, "config", "v1", "suites.yaml"); + } else if (pattern.startsWith("v2")) { + configPath = join(ROOT_DIR, "config", "v2", "suites.yaml"); + } else { + throw new Error( + `Cannot auto-detect config file for pattern '${pattern}'. Use --config option.` + ); + } + } + suitesToAdd = getSuitesByPattern(pattern, configPath); + } else { + // Single suite name + if (!configPath) { + // Auto-detect config based on suite name + if (pattern.startsWith("v1_")) { + configPath = join(ROOT_DIR, "config", "v1", "suites.yaml"); + } else if (pattern.startsWith("v2_")) { + configPath = join(ROOT_DIR, "config", "v2", "suites.yaml"); + } else { + throw new Error( + `Cannot auto-detect config file for suite '${pattern}'. Use --config option.` + ); + } + } + suitesToAdd = [getSuiteConfig(pattern, configPath)]; + } + + // Add suites and extract project/region from first suite + for (const suite of suitesToAdd) { + if (!projectId) { + projectId = suite.projectId || overrideProjectId || "demo-test"; + region = suite.region || overrideRegion || "us-central1"; + } + suites.push(suite); + } + + // Reset configPath for next pattern (allows mixing v1 and v2) + if (!initialConfigPath) { + configPath = null; + } + } catch (err) { + error(`❌ Error loading suite(s) '${pattern}': ${err.message}`); + throw err; + } + } + + if (suites.length === 0) { + throw new Error("No suites found to generate"); + } + + log(` PROJECT_ID: ${projectId}`); + log(` REGION: ${region}`); + log(` Loaded ${suites.length} suite(s)`); + + // Helper function to generate from template + function generateFromTemplate(templatePath, outputPath, context) { + const fullTemplatePath = join(ROOT_DIR, "templates", templatePath); + if (!existsSync(fullTemplatePath)) { + error(`❌ Template not found: ${fullTemplatePath}`); + return false; + } + + const templateContent = readFileSync(fullTemplatePath, "utf8"); + const template = Handlebars.compile(templateContent); + const output = template(context); + + const outputFullPath = join(ROOT_DIR, "generated", outputPath); + mkdirSync(dirname(outputFullPath), { recursive: true }); + writeFileSync(outputFullPath, output); + log(` ✅ Generated: ${outputPath}`); + return true; + } + + // Template mapping for service types and versions + const templateMap = { + firestore: { + v1: "functions/src/v1/firestore-tests.ts.hbs", + v2: "functions/src/v2/firestore-tests.ts.hbs", + }, + database: { + v1: "functions/src/v1/database-tests.ts.hbs", + v2: "functions/src/v2/database-tests.ts.hbs", + }, + pubsub: { + v1: "functions/src/v1/pubsub-tests.ts.hbs", + v2: "functions/src/v2/pubsub-tests.ts.hbs", + }, + storage: { + v1: "functions/src/v1/storage-tests.ts.hbs", + v2: "functions/src/v2/storage-tests.ts.hbs", + }, + auth: { + v1: "functions/src/v1/auth-tests.ts.hbs", + v2: "functions/src/v2/auth-tests.ts.hbs", + }, + tasks: { + v1: "functions/src/v1/tasks-tests.ts.hbs", + v2: "functions/src/v2/tasks-tests.ts.hbs", + }, + remoteconfig: { + v1: "functions/src/v1/remoteconfig-tests.ts.hbs", + v2: "functions/src/v2/remoteconfig-tests.ts.hbs", + }, + testlab: { + v1: "functions/src/v1/testlab-tests.ts.hbs", + v2: "functions/src/v2/testlab-tests.ts.hbs", + }, + scheduler: { + v2: "functions/src/v2/scheduler-tests.ts.hbs", + }, + identity: { + v2: "functions/src/v2/identity-tests.ts.hbs", + }, + eventarc: { + v2: "functions/src/v2/eventarc-tests.ts.hbs", + }, + alerts: { + v2: "functions/src/v2/alerts-tests.ts.hbs", + }, + }; + + log("\n📁 Generating functions..."); + + // Collect all dependencies from all suites + const allDependencies = {}; + const allDevDependencies = {}; + + // Generate test files for each suite + const generatedSuites = []; + for (const suite of suites) { + const { name, service, version } = suite; + + // Select the appropriate template + const templatePath = templateMap[service]?.[version]; + if (!templatePath) { + error(`❌ No template found for service '${service}' version '${version}'`); + error(`Available templates:`); + Object.entries(templateMap).forEach(([svc, versions]) => { + Object.keys(versions).forEach((ver) => { + error(` - ${svc} ${ver}`); + }); + }); + continue; // Skip this suite but continue with others + } + + log(` 📋 ${name}: Using service: ${service}, version: ${version}`); + + // Create context for this suite's template + // The suite already has defaults applied from config-loader + const context = { + ...suite, + testRunId, + sdkTarball, + timestamp: new Date().toISOString(), + v1ProjectId: "functions-integration-tests", + v2ProjectId: "functions-integration-tests-v2", + }; + + // Generate the test file for this suite + if ( + generateFromTemplate(templatePath, `functions/src/${version}/${service}-tests.ts`, context) + ) { + // Collect dependencies + Object.assign(allDependencies, suite.dependencies || {}); + Object.assign(allDevDependencies, suite.devDependencies || {}); + + // Track generated suite info for index.ts + generatedSuites.push({ + name, + service, + version, + projectId: suite.projectId, // Store projectId per suite + region: suite.region, // Store region per suite + functions: suite.functions.map((f) => `${f.name}${testRunId}`), + }); + } + } + + if (generatedSuites.length === 0) { + throw new Error("No functions were generated"); + } + + // Generate shared files (only once) + const sharedContext = { + projectId, + region, + testRunId, + sdkTarball, + timestamp: new Date().toISOString(), + dependencies: allDependencies, + devDependencies: allDevDependencies, + }; + + // Generate utils.ts + generateFromTemplate("functions/src/utils.ts.hbs", "functions/src/utils.ts", sharedContext); + + // Generate index.ts with all suites + const indexContext = { + projectId, + suites: generatedSuites.map((s) => ({ + name: s.name, + service: s.service, + version: s.version, + })), + }; + + generateFromTemplate("functions/src/index.ts.hbs", "functions/src/index.ts", indexContext); + + // Generate package.json with merged dependencies + // Replace {{sdkTarball}} placeholder in all dependencies + const processedDependencies = {}; + for (const [key, value] of Object.entries(allDependencies)) { + if (typeof value === "string" && value.includes("{{sdkTarball}}")) { + processedDependencies[key] = value.replace("{{sdkTarball}}", sdkTarball); + } else { + processedDependencies[key] = value; + } + } + + const packageContext = { + ...sharedContext, + dependencies: { + ...processedDependencies, + // Ensure we have the required dependencies + "firebase-functions": processedDependencies["firebase-functions"] || sdkTarball, + "firebase-admin": processedDependencies["firebase-admin"] || "^12.0.0", + }, + devDependencies: allDevDependencies, + }; + + generateFromTemplate("functions/package.json.hbs", "functions/package.json", packageContext); + + // Generate tsconfig.json + generateFromTemplate("functions/tsconfig.json.hbs", "functions/tsconfig.json", sharedContext); + + // Generate firebase.json + generateFromTemplate("firebase.json.hbs", "firebase.json", sharedContext); + + // Write metadata for cleanup and reference + const metadata = { + projectId, + region, + testRunId, + generatedAt: new Date().toISOString(), + suites: generatedSuites, + }; + + writeFileSync(join(ROOT_DIR, "generated", ".metadata.json"), JSON.stringify(metadata, null, 2)); + + // Copy the SDK tarball into the functions directory if using local SDK + if (sdkTarball.startsWith("file:")) { + const tarballSourcePath = join(ROOT_DIR, "firebase-functions-local.tgz"); + const tarballDestPath = join( + ROOT_DIR, + "generated", + "functions", + "firebase-functions-local.tgz" + ); + + if (existsSync(tarballSourcePath)) { + copyFileSync(tarballSourcePath, tarballDestPath); + log(" ✅ Copied SDK tarball to functions directory"); + } else { + error(` ⚠️ Warning: SDK tarball not found at ${tarballSourcePath}`); + error(` Run 'npm run pack-for-integration-tests' from the root directory first`); + } + } + + log("\n✨ Generation complete!"); + log( + ` Generated ${generatedSuites.length} suite(s) with ${generatedSuites.reduce( + (acc, s) => acc + s.functions.length, + 0 + )} function(s)` + ); + log("\nNext steps:"); + log(" 1. cd generated/functions && npm install"); + log(" 2. npm run build"); + log(` 3. firebase deploy --project ${projectId}`); + + return metadata; +} + +// CLI interface when run directly +if (import.meta.url === `file://${process.argv[1]}`) { + const args = process.argv.slice(2); + + // Handle help + if (args.length === 0 || args.includes("--help") || args.includes("-h")) { + console.log("Usage: node generate.js [options]"); + console.log("\nExamples:"); + console.log(" node generate.js v1_firestore # Single suite"); + console.log(" node generate.js v1_firestore v1_database # Multiple suites"); + console.log(" node generate.js 'v1_*' # All v1 suites (pattern)"); + console.log(" node generate.js 'v2_*' # All v2 suites (pattern)"); + console.log(" node generate.js --list # List available suites"); + console.log(" node generate.js --config config/v1/suites.yaml v1_firestore"); + console.log("\nOptions:"); + console.log(" --config Path to configuration file (default: auto-detect)"); + console.log(" --list List all available suites"); + console.log(" --help, -h Show this help message"); + console.log("\nEnvironment variables:"); + console.log(" TEST_RUN_ID Override test run ID (default: auto-generated)"); + console.log(" PROJECT_ID Override project ID from config"); + console.log(" REGION Override region from config"); + console.log(" SDK_TARBALL Path to Firebase Functions SDK tarball"); + process.exit(0); + } + + // Handle --list option + if (args.includes("--list")) { + // Determine config path - check both v1 and v2 + const v1ConfigPath = join(ROOT_DIR, "config", "v1", "suites.yaml"); + const v2ConfigPath = join(ROOT_DIR, "config", "v2", "suites.yaml"); + + console.log("\nAvailable test suites:"); + + if (existsSync(v1ConfigPath)) { + console.log("\n📁 V1 Suites (config/v1/suites.yaml):"); + const v1Suites = listAvailableSuites(v1ConfigPath); + v1Suites.forEach((suite) => console.log(` - ${suite}`)); + } + + if (existsSync(v2ConfigPath)) { + console.log("\n📁 V2 Suites (config/v2/suites.yaml):"); + const v2Suites = listAvailableSuites(v2ConfigPath); + v2Suites.forEach((suite) => console.log(` - ${suite}`)); + } + + process.exit(0); + } + + // Parse config path if provided + let configPath = null; + let usePublishedSDK = null; + const configIndex = args.indexOf("--config"); + if (configIndex !== -1 && configIndex < args.length - 1) { + configPath = args[configIndex + 1]; + args.splice(configIndex, 2); // Remove --config and path from args + } + + // Check for --use-published-sdk + const sdkIndex = args.findIndex((arg) => arg.startsWith("--use-published-sdk=")); + if (sdkIndex !== -1) { + usePublishedSDK = args[sdkIndex].split("=")[1]; + args.splice(sdkIndex, 1); + } + + // Remaining args are suite names/patterns + const suitePatterns = args; + + // Determine SDK to use + let sdkTarball = process.env.SDK_TARBALL; + if (!sdkTarball) { + if (usePublishedSDK) { + sdkTarball = usePublishedSDK; + console.log(`Using published SDK: ${sdkTarball}`); + } else { + // Default to local tarball + sdkTarball = "file:firebase-functions-local.tgz"; + console.log("Using local firebase-functions tarball (default)"); + } + } + + // Call the main function + generateFunctions(suitePatterns, { + testRunId: process.env.TEST_RUN_ID, + configPath, + projectId: process.env.PROJECT_ID, + region: process.env.REGION, + sdkTarball, + }) + .then(() => process.exit(0)) + .catch((error) => { + console.error(`❌ ${error.message}`); + process.exit(1); + }); +} diff --git a/integration_test/scripts/run-tests.js b/integration_test/scripts/run-tests.js new file mode 100644 index 000000000..e7e62d75e --- /dev/null +++ b/integration_test/scripts/run-tests.js @@ -0,0 +1,1328 @@ +#!/usr/bin/env node + +/** + * Unified Test Runner for Firebase Functions Integration Tests + * Combines functionality from run-suite.sh and run-sequential.sh into a single JavaScript runner + */ + +import { spawn } from "child_process"; +import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync, renameSync } from "fs"; +import { join, dirname } from "path"; +import { fileURLToPath } from "url"; +import chalk from "chalk"; +import { getSuitesByPattern, listAvailableSuites } from "./config-loader.js"; +import { generateFunctions } from "./generate.js"; + +// Get directory paths +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +const ROOT_DIR = dirname(__dirname); + +// Configuration paths +const V1_CONFIG_PATH = join(ROOT_DIR, "config", "v1", "suites.yaml"); +const V2_CONFIG_PATH = join(ROOT_DIR, "config", "v2", "suites.yaml"); +const ARTIFACTS_DIR = join(ROOT_DIR, ".test-artifacts"); +const LOGS_DIR = join(ROOT_DIR, "logs"); +const GENERATED_DIR = join(ROOT_DIR, "generated"); +const SA_JSON_PATH = join(ROOT_DIR, "sa.json"); + +// Default configurations +const DEFAULT_REGION = "us-central1"; +const MAX_DEPLOY_ATTEMPTS = 5; +const DEFAULT_BASE_DELAY = 30000; // Base delay in ms (30 seconds) +const DEFAULT_MAX_DELAY = 120000; // Max delay in ms (120 seconds/2 minutes) + +class TestRunner { + constructor(options = {}) { + this.testRunId = options.testRunId || this.generateTestRunId(); + this.sequential = options.sequential || false; + this.saveArtifact = options.saveArtifact || false; + this.skipCleanup = options.skipCleanup || false; + this.filter = options.filter || ""; + this.exclude = options.exclude || ""; + this.usePublishedSDK = options.usePublishedSDK || null; + this.verbose = options.verbose || false; + this.cleanupOrphaned = options.cleanupOrphaned || false; + this.timestamp = new Date().toISOString().replace(/[:.]/g, "-").substring(0, 19); + this.logFile = join(LOGS_DIR, `test-run-${this.timestamp}.log`); + this.deploymentSuccess = false; + this.results = { passed: [], failed: [] }; + } + + /** + * Generate a unique test run ID + */ + generateTestRunId() { + const chars = "abcdefghijklmnopqrstuvwxyz0123456789"; + let id = "t"; + for (let i = 0; i < 8; i++) { + id += chars.charAt(Math.floor(Math.random() * chars.length)); + } + return id; + } + + /** + * Calculate exponential backoff delay with jitter + * Based on util.sh exponential_backoff function + */ + calculateBackoffDelay(attempt, baseDelay = DEFAULT_BASE_DELAY, maxDelay = DEFAULT_MAX_DELAY) { + // Calculate delay: baseDelay * 2^(attempt-1) + let delay = baseDelay * Math.pow(2, attempt - 1); + + // Cap at maxDelay + if (delay > maxDelay) { + delay = maxDelay; + } + + // Add jitter (±25% random variation) + const jitter = delay / 4; + const randomJitter = Math.random() * jitter * 2 - jitter; + delay = delay + randomJitter; + + // Ensure minimum delay of 1 second + if (delay < 1000) { + delay = 1000; + } + + return Math.round(delay); + } + + /** + * Retry function with exponential backoff + * Based on util.sh retry_with_backoff function + */ + async retryWithBackoff( + operation, + maxAttempts = MAX_DEPLOY_ATTEMPTS, + baseDelay = DEFAULT_BASE_DELAY, + maxDelay = DEFAULT_MAX_DELAY + ) { + let attempt = 1; + + while (attempt <= maxAttempts) { + this.log(`🔄 Attempt ${attempt} of ${maxAttempts}`, "warn"); + + try { + const result = await operation(); + this.log("✅ Operation succeeded", "success"); + return result; + } catch (error) { + if (attempt < maxAttempts) { + const delay = this.calculateBackoffDelay(attempt, baseDelay, maxDelay); + this.log( + `⚠️ Operation failed. Retrying in ${Math.round(delay / 1000)} seconds...`, + "warn" + ); + await new Promise((resolve) => setTimeout(resolve, delay)); + } else { + this.log(`❌ Operation failed after ${maxAttempts} attempts`, "error"); + throw error; + } + } + + attempt++; + } + } + + /** + * Log message to console and file + */ + log(message, level = "info") { + const timestamp = new Date().toISOString(); + const logEntry = `[${timestamp}] ${message}`; + + // Ensure logs directory exists + if (!existsSync(LOGS_DIR)) { + mkdirSync(LOGS_DIR, { recursive: true }); + } + + // Write to log file + try { + writeFileSync(this.logFile, logEntry + "\n", { flag: "a" }); + } catch (e) { + // Ignore file write errors + } + + // Console output with colors + switch (level) { + case "error": + console.log(chalk.red(message)); + break; + case "warn": + console.log(chalk.yellow(message)); + break; + case "success": + console.log(chalk.green(message)); + break; + case "info": + console.log(chalk.blue(message)); + break; + default: + console.log(message); + } + } + + /** + * Execute a shell command + */ + async exec(command, options = {}) { + return new Promise((resolve, reject) => { + const child = spawn(command, { + shell: true, + cwd: options.cwd || ROOT_DIR, + env: { ...process.env, ...options.env }, + stdio: options.silent ? "pipe" : ["inherit", "pipe", "pipe"], + }); + + let stdout = ""; + let stderr = ""; + + // Always capture output for error reporting, even when not silent + child.stdout.on("data", (data) => { + const output = data.toString(); + stdout += output; + if (!options.silent) { + process.stdout.write(output); + } + }); + + child.stderr.on("data", (data) => { + const output = data.toString(); + stderr += output; + if (!options.silent) { + process.stderr.write(output); + } + }); + + child.on("exit", (code) => { + if (code === 0) { + resolve({ stdout, stderr, code }); + } else { + // Include both stdout and stderr in error message for better debugging + const errorOutput = stderr || stdout || "No output captured"; + reject(new Error(`Command failed with code ${code}: ${command}\n${errorOutput}`)); + } + }); + + child.on("error", (error) => { + reject(error); + }); + }); + } + + /** + * Get all available suites from configuration + */ + getAllSuites() { + const suites = []; + + // Get V1 suites + if (existsSync(V1_CONFIG_PATH)) { + try { + const v1Suites = listAvailableSuites(V1_CONFIG_PATH); + suites.push(...v1Suites); + } catch (e) { + this.log(`Warning: Could not load V1 suites: ${e.message}`, "warn"); + } + } + + // Get V2 suites + if (existsSync(V2_CONFIG_PATH)) { + try { + const v2Suites = listAvailableSuites(V2_CONFIG_PATH); + suites.push(...v2Suites); + } catch (e) { + this.log(`Warning: Could not load V2 suites: ${e.message}`, "warn"); + } + } + + return suites; + } + + /** + * Filter suites based on patterns and exclusions + */ + filterSuites(suitePatterns) { + let suites = []; + + // If patterns include wildcards, get matching suites + for (const pattern of suitePatterns) { + if (pattern.includes("*") || pattern.includes("?")) { + // Check both v1 and v2 configs + if (existsSync(V1_CONFIG_PATH)) { + const v1Matches = getSuitesByPattern(pattern, V1_CONFIG_PATH); + suites.push(...v1Matches.map((s) => s.name)); + } + if (existsSync(V2_CONFIG_PATH)) { + const v2Matches = getSuitesByPattern(pattern, V2_CONFIG_PATH); + suites.push(...v2Matches.map((s) => s.name)); + } + } else { + // Direct suite name + suites.push(pattern); + } + } + + // Remove duplicates + suites = [...new Set(suites)]; + + // Apply filter pattern if specified + if (this.filter) { + suites = suites.filter((suite) => suite.includes(this.filter)); + } + + // Apply exclusions + if (this.exclude) { + // Use simple string matching instead of regex to avoid injection + suites = suites.filter((suite) => !suite.includes(this.exclude)); + } + + return suites; + } + + /** + * Generate functions from templates + */ + async generateFunctions(suiteNames) { + this.log("📦 Generating functions...", "info"); + + // Use SDK tarball (must be provided via --use-published-sdk or pre-packed) + let sdkTarball; + if (this.usePublishedSDK) { + sdkTarball = this.usePublishedSDK; + this.log(` Using provided SDK: ${sdkTarball}`, "info"); + } else { + // Default to local tarball (should be pre-packed by Cloud Build or manually) + sdkTarball = `file:firebase-functions-local.tgz`; + this.log(` Using local SDK: firebase-functions-local.tgz`, "info"); + } + + try { + // Call the generate function directly instead of spawning subprocess + const metadata = await generateFunctions(suiteNames, { + testRunId: this.testRunId, + sdkTarball: sdkTarball, + quiet: true, // Suppress console output since we have our own logging + }); + + // Store project info + this.projectId = metadata.projectId; + this.region = metadata.region || DEFAULT_REGION; + + this.log( + `✓ Generated ${suiteNames.length} suite(s) for project: ${this.projectId}`, + "success" + ); + + // Save artifact if requested + if (this.saveArtifact) { + this.saveTestArtifact(metadata); + } + + return metadata; + } catch (error) { + throw new Error(`Failed to generate functions: ${error.message}`); + } + } + + /** + * Build generated functions + */ + async buildFunctions() { + this.log("🔨 Building functions...", "info"); + + const functionsDir = join(GENERATED_DIR, "functions"); + + // Install and build + await this.exec("npm install", { cwd: functionsDir }); + await this.exec("npm run build", { cwd: functionsDir }); + + this.log("✓ Functions built successfully", "success"); + } + + /** + * Deploy functions to Firebase with retry logic + */ + async deployFunctions() { + this.log("☁️ Deploying to Firebase...", "info"); + + try { + await this.retryWithBackoff(async () => { + const result = await this.exec( + `firebase deploy --only functions --project ${this.projectId} --force`, + { cwd: GENERATED_DIR, silent: !this.verbose } + ); + + // Check for successful deployment or acceptable warnings + const output = result.stdout + result.stderr; + if ( + output.includes("Deploy complete!") || + output.includes("Functions successfully deployed but could not set up cleanup policy") + ) { + this.deploymentSuccess = true; + this.log("✅ Deployment succeeded", "success"); + return result; + } else { + // Log output for debugging if deployment didn't match expected success patterns + this.log("⚠️ Deployment output did not match success patterns", "warn"); + this.log(`Stdout: ${result.stdout.substring(0, 500)}...`, "warn"); + this.log(`Stderr: ${result.stderr.substring(0, 500)}...`, "warn"); + throw new Error("Deployment output did not match success patterns"); + } + }); + } catch (error) { + // Enhanced error logging with full details + this.log(`❌ Deployment error: ${error.message}`, "error"); + + // Try to extract more details from the error + if (error.message.includes("Command failed with code 1")) { + this.log("🔍 Full deployment command output:", "error"); + + // Extract the actual Firebase CLI error from the error message + const errorLines = error.message.split("\n"); + const firebaseError = errorLines.slice(1).join("\n").trim(); // Skip the first line which is our generic message + + if (firebaseError) { + this.log(" Actual Firebase CLI error:", "error"); + this.log(` ${firebaseError}`, "error"); + } else { + this.log(" No detailed error output captured", "error"); + } + + this.log(" Common causes:", "error"); + this.log(" - Authentication issues (run: firebase login)", "error"); + this.log(" - Project permissions (check project access)", "error"); + this.log(" - Function code errors (check generated code)", "error"); + this.log(" - Resource limits (too many functions)", "error"); + this.log(" - Network issues", "error"); + } + + // On final failure, provide more detailed error information + this.log("🔍 Final deployment attempt failed. Debugging information:", "error"); + this.log(` Project: ${this.projectId}`, "error"); + this.log(` Region: ${this.region}`, "error"); + this.log(` Generated directory: ${GENERATED_DIR}`, "error"); + this.log(" Try running manually:", "error"); + this.log( + ` cd ${GENERATED_DIR} && firebase deploy --only functions --project ${this.projectId}`, + "error" + ); + throw new Error(`Deployment failed after ${MAX_DEPLOY_ATTEMPTS} attempts: ${error.message}`); + } + } + + /** + * Map suite name to test file path + */ + getTestFile(suiteName) { + const service = suiteName.split("_").slice(1).join("_"); + const version = suiteName.split("_")[0]; + + // Special cases + if (suiteName.startsWith("v1_auth")) { + return "tests/v1/auth.test.ts"; + } + if (suiteName === "v2_alerts") { + return null; // Deployment only, no tests + } + + // Map service names to test files + const serviceMap = { + firestore: `tests/${version}/firestore.test.ts`, + database: `tests/${version}/database.test.ts`, + pubsub: `tests/${version}/pubsub.test.ts`, + storage: `tests/${version}/storage.test.ts`, + tasks: `tests/${version}/tasks.test.ts`, + remoteconfig: + version === "v1" ? "tests/v1/remoteconfig.test.ts" : "tests/v2/remoteConfig.test.ts", + testlab: version === "v1" ? "tests/v1/testlab.test.ts" : "tests/v2/testLab.test.ts", + scheduler: "tests/v2/scheduler.test.ts", + identity: "tests/v2/identity.test.ts", + eventarc: "tests/v2/eventarc.test.ts", + }; + + return serviceMap[service] || null; + } + + /** + * Run tests for deployed functions + */ + async runTests(suiteNames) { + this.log("🧪 Running tests...", "info"); + + // Check for service account + if (!existsSync(SA_JSON_PATH)) { + this.log( + "⚠️ Warning: sa.json not found. Tests may fail without proper authentication.", + "warn" + ); + } + + // Collect test files for all suites + const testFiles = []; + const seenFiles = new Set(); + let deployedFunctions = []; + + for (const suiteName of suiteNames) { + // Track deployed auth functions + if (suiteName === "v1_auth_nonblocking") { + deployedFunctions.push("onCreate", "onDelete"); + } else if (suiteName === "v1_auth_before_create") { + deployedFunctions.push("beforeCreate"); + } else if (suiteName === "v1_auth_before_signin") { + deployedFunctions.push("beforeSignIn"); + } + + const testFile = this.getTestFile(suiteName); + if (testFile && !seenFiles.has(testFile)) { + const fullPath = join(ROOT_DIR, testFile); + if (existsSync(fullPath)) { + testFiles.push(testFile); + seenFiles.add(testFile); + } + } + } + + if (testFiles.length === 0) { + this.log("⚠️ No test files found for the generated suites.", "warn"); + this.log(" Skipping test execution (deployment-only suites).", "success"); + return; + } + + // Run Jest tests + const env = { + TEST_RUN_ID: this.testRunId, + PROJECT_ID: this.projectId, + REGION: this.region, + DEPLOYED_FUNCTIONS: deployedFunctions.join(","), + ...process.env, + }; + + if (existsSync(SA_JSON_PATH)) { + env.GOOGLE_APPLICATION_CREDENTIALS = SA_JSON_PATH; + } + + this.log(`Running tests: ${testFiles.join(", ")}`, "info"); + this.log(`TEST_RUN_ID: ${this.testRunId}`, "info"); + + await this.exec(`npm test -- ${testFiles.join(" ")}`, { env }); + } + + /** + * Clean up deployed functions and test data + */ + async cleanup() { + this.log("🧹 Running cleanup...", "warn"); + + const metadataPath = join(GENERATED_DIR, ".metadata.json"); + if (!existsSync(metadataPath)) { + this.log(" No metadata found, skipping cleanup", "warn"); + return; + } + + const metadata = JSON.parse(readFileSync(metadataPath, "utf8")); + + // Only delete functions if deployment was successful + if (this.deploymentSuccess) { + await this.cleanupFunctions(metadata); + } + + // Clean up test data + await this.cleanupTestData(metadata); + + // Clean up generated files + this.log(" Cleaning up generated files...", "warn"); + if (existsSync(GENERATED_DIR)) { + rmSync(GENERATED_DIR, { recursive: true, force: true }); + mkdirSync(GENERATED_DIR, { recursive: true }); + } + } + + /** + * Delete deployed functions + */ + async cleanupFunctions(metadata) { + this.log(" Deleting deployed functions...", "warn"); + + // Extract function names from metadata + const functions = []; + for (const suite of metadata.suites || []) { + for (const func of suite.functions || []) { + functions.push(func); + } + } + + for (const functionName of functions) { + let deleted = false; + + // Try Firebase CLI first + try { + await this.exec( + `firebase functions:delete ${functionName} --project ${metadata.projectId} --region ${ + metadata.region || DEFAULT_REGION + } --force` + ); + + // Verify the function was actually deleted + this.log(` Verifying deletion of ${functionName}...`, "info"); + try { + const listResult = await this.exec( + `firebase functions:list --project ${metadata.projectId}`, + { silent: true } + ); + + // Check if function still exists in the list + const functionStillExists = listResult.stdout.includes(functionName); + + if (!functionStillExists) { + this.log(` ✅ Verified: Function deleted via Firebase CLI: ${functionName}`, "success"); + deleted = true; + } else { + this.log(` ⚠️ Function still exists after Firebase CLI delete: ${functionName}`, "warn"); + } + } catch (listError) { + // If we can't list functions, assume deletion worked + this.log(` ✅ Deleted function via Firebase CLI (unverified): ${functionName}`, "success"); + deleted = true; + } + } catch (error) { + this.log(` ⚠️ Firebase CLI delete failed for ${functionName}: ${error.message}`, "warn"); + } + + // If not deleted yet, try alternative methods + if (!deleted) { + // For v2 functions, try to delete the Cloud Run service directly + if (metadata.projectId === "functions-integration-tests-v2") { + this.log(` Attempting Cloud Run service deletion for v2 function...`, "warn"); + try { + await this.exec( + `gcloud run services delete ${functionName} --region=${ + metadata.region || DEFAULT_REGION + } --project=${metadata.projectId} --quiet`, + { silent: true } + ); + + // Verify deletion + try { + await this.exec( + `gcloud run services describe ${functionName} --region=${ + metadata.region || DEFAULT_REGION + } --project=${metadata.projectId}`, + { silent: true } + ); + // If describe succeeds, function still exists + this.log(` ⚠️ Cloud Run service still exists after deletion: ${functionName}`, "warn"); + } catch { + // If describe fails, function was deleted + this.log(` ✅ Deleted function as Cloud Run service: ${functionName}`, "success"); + deleted = true; + } + } catch (runError) { + this.log(` ⚠️ Cloud Run delete failed: ${runError.message}`, "warn"); + } + } + + // If still not deleted, try gcloud functions delete as last resort + if (!deleted) { + try { + await this.exec( + `gcloud functions delete ${functionName} --region=${ + metadata.region || DEFAULT_REGION + } --project=${metadata.projectId} --quiet`, + { silent: true } + ); + + // Verify deletion + try { + await this.exec( + `gcloud functions describe ${functionName} --region=${ + metadata.region || DEFAULT_REGION + } --project=${metadata.projectId}`, + { silent: true } + ); + // If describe succeeds, function still exists + this.log(` ⚠️ Function still exists after gcloud delete: ${functionName}`, "warn"); + deleted = false; + } catch { + // If describe fails, function was deleted + this.log(` ✅ Deleted function via gcloud: ${functionName}`, "success"); + deleted = true; + } + } catch (e) { + this.log(` ❌ Failed to delete function ${functionName} via any method`, "error"); + this.log(` Last error: ${e.message}`, "error"); + } + } + } + } + } + + /** + * Clean up test data from Firestore + */ + async cleanupTestData(metadata) { + this.log(" Cleaning up Firestore test data...", "warn"); + + // Extract collection names from metadata + const collections = new Set(); + + for (const suite of metadata.suites || []) { + for (const func of suite.functions || []) { + if (func.collection) { + collections.add(func.collection); + } + // Also add function name without TEST_RUN_ID as collection + const baseName = func.name ? func.name.replace(this.testRunId, "") : null; + if (baseName && baseName.includes("Tests")) { + collections.add(baseName); + } + } + } + + // Clean up each collection + for (const collection of collections) { + try { + await this.exec( + `firebase firestore:delete ${collection}/${this.testRunId} --project ${metadata.projectId} --yes`, + { silent: true } + ); + } catch (e) { + // Ignore cleanup errors + } + } + + // Clean up auth users if auth tests were run + if (metadata.suites.some((s) => s.name.includes("auth") || s.name.includes("identity"))) { + this.log(" Cleaning up auth test users...", "warn"); + try { + await this.exec(`node ${join(__dirname, "cleanup-auth-users.cjs")} ${this.testRunId}`, { + silent: true, + }); + } catch (e) { + // Ignore cleanup errors + } + } + + // Clean up Cloud Tasks queues if tasks tests were run + if (metadata.suites.some((s) => s.name.includes("tasks"))) { + await this.cleanupCloudTasksQueues(metadata); + } + } + + /** + * Clean up Cloud Tasks queues created by tests + */ + async cleanupCloudTasksQueues(metadata) { + this.log(" Cleaning up Cloud Tasks queues...", "warn"); + + const region = metadata.region || DEFAULT_REGION; + const projectId = metadata.projectId; + + // Extract queue names from metadata (function names become queue names in v1) + const queueNames = new Set(); + for (const suite of metadata.suites || []) { + if (suite.name.includes("tasks")) { + for (const func of suite.functions || []) { + if (func.name && func.name.includes("Tests")) { + // Function name becomes the queue name in v1 + queueNames.add(func.name); + } + } + } + } + + // Delete each queue + for (const queueName of queueNames) { + try { + this.log(` Deleting Cloud Tasks queue: ${queueName}`, "warn"); + + // Try gcloud command to delete the queue + await this.exec( + `gcloud tasks queues delete ${queueName} --location=${region} --project=${projectId} --quiet`, + { silent: true } + ); + this.log(` ✅ Deleted Cloud Tasks queue: ${queueName}`); + } catch (error) { + // Queue might not exist or already deleted, ignore errors + this.log(` ⚠️ Could not delete queue ${queueName}: ${error.message}`, "warn"); + } + } + } + + /** + * Save test artifact for future cleanup + */ + saveTestArtifact(metadata) { + if (!existsSync(ARTIFACTS_DIR)) { + mkdirSync(ARTIFACTS_DIR, { recursive: true }); + } + + const artifactPath = join(ARTIFACTS_DIR, `${this.testRunId}.json`); + writeFileSync(artifactPath, JSON.stringify(metadata, null, 2)); + this.log(`✓ Saved artifact for future cleanup: ${this.testRunId}.json`, "success"); + } + + /** + * Get project IDs from configuration (YAML files are source of truth) + */ + getProjectIds() { + // Project IDs are read from the YAML configuration files + // V1 tests use functions-integration-tests + // V2 tests use functions-integration-tests-v2 + const v1ProjectId = "functions-integration-tests"; + const v2ProjectId = "functions-integration-tests-v2"; + + this.log(`Using V1 Project ID: ${v1ProjectId}`, "info"); + this.log(`Using V2 Project ID: ${v2ProjectId}`, "info"); + + return { v1ProjectId, v2ProjectId }; + } + + /** + * Clean up existing test resources before running + */ + async cleanupExistingResources() { + this.log("🧹 Checking for existing test functions...", "warn"); + + // Determine which project(s) to clean up based on the filter + const projectIds = this.getProjectIds(); + + let projectsToCheck = []; + if (this.filter.includes("v1") || (!this.filter && !this.exclude)) { + projectsToCheck.push(projectIds.v1ProjectId); + } + if (this.filter.includes("v2") || (!this.filter && !this.exclude)) { + projectsToCheck.push(projectIds.v2ProjectId); + } + + // If no filter, check both projects + if (projectsToCheck.length === 0) { + projectsToCheck = [projectIds.v1, projectIds.v2]; + } + + for (const projectId of projectsToCheck) { + this.log(` Checking project: ${projectId}`, "warn"); + + try { + // List functions and find test functions + const result = await this.exec(`firebase functions:list --project ${projectId}`, { + silent: true, + }); + + // Parse the table output from firebase functions:list + const lines = result.stdout.split("\n"); + const testFunctions = []; + + for (const line of lines) { + // Look for table rows with function names (containing │) + // Skip header rows and empty lines + if (line.includes("│") && !line.includes("Function") && !line.includes("────")) { + const parts = line.split("│"); + if (parts.length >= 2) { + const functionName = parts[1].trim(); + // Add ALL functions for cleanup (not just test functions) + // This ensures a clean slate for testing + if (functionName && functionName.length > 0) { + testFunctions.push(functionName); + } + } + } + } + + if (testFunctions.length > 0) { + this.log( + ` Found ${testFunctions.length} function(s) in ${projectId}. Cleaning up ALL functions...`, + "warn" + ); + + for (const func of testFunctions) { + try { + // Function names from firebase functions:list are just the name, no region suffix + const functionName = func.trim(); + const region = DEFAULT_REGION; + + this.log(` Deleting function: ${functionName} in region: ${region}`, "warn"); + + // Try Firebase CLI first + try { + await this.exec( + `firebase functions:delete ${functionName} --project ${projectId} --region ${region} --force`, + { silent: true } + ); + this.log(` ✅ Deleted via Firebase CLI: ${functionName}`); + } catch (firebaseError) { + // If Firebase CLI fails, try gcloud as fallback + this.log(` Firebase CLI failed, trying gcloud for: ${functionName}`, "warn"); + try { + await this.exec( + `gcloud functions delete ${functionName} --region=${region} --project=${projectId} --quiet`, + { silent: true } + ); + this.log(` ✅ Deleted via gcloud: ${functionName}`); + } catch (gcloudError) { + this.log(` ❌ Failed to delete: ${functionName}`, "error"); + this.log(` Firebase error: ${firebaseError.message}`, "error"); + this.log(` Gcloud error: ${gcloudError.message}`, "error"); + } + } + } catch (e) { + this.log(` ❌ Unexpected error deleting ${func}: ${e.message}`, "error"); + } + } + } else { + this.log(` ✅ No functions found in ${projectId}`, "success"); + } + } catch (e) { + this.log(` ⚠️ Could not check functions in ${projectId}: ${e.message}`, "warn"); + // Project might not be accessible + } + } + + // Clean up orphaned Cloud Tasks queues + await this.cleanupOrphanedCloudTasksQueues(); + + // Clean up generated directory + if (existsSync(GENERATED_DIR)) { + this.log(" Cleaning up generated directory...", "warn"); + rmSync(GENERATED_DIR, { recursive: true, force: true }); + } + } + + /** + * Clean up orphaned Cloud Tasks queues from previous test runs + */ + async cleanupOrphanedCloudTasksQueues() { + this.log(" Checking for orphaned Cloud Tasks queues...", "warn"); + + // Determine which project(s) to clean up based on the filter + const projectIds = this.getProjectIds(); + + let projectsToCheck = []; + if (this.filter.includes("v1") || (!this.filter && !this.exclude)) { + projectsToCheck.push(projectIds.v1ProjectId); + } + if (this.filter.includes("v2") || (!this.filter && !this.exclude)) { + projectsToCheck.push(projectIds.v2ProjectId); + } + + // If no filter, check both projects + if (projectsToCheck.length === 0) { + projectsToCheck = [projectIds.v1, projectIds.v2]; + } + + const region = DEFAULT_REGION; + + for (const projectId of projectsToCheck) { + this.log(` Checking Cloud Tasks queues in project: ${projectId}`, "warn"); + + try { + // List all queues in the project + const result = await this.exec( + `gcloud tasks queues list --location=${region} --project=${projectId} --format="value(name)"`, + { silent: true } + ); + + const queueNames = result.stdout + .split("\n") + .map((line) => line.trim()) + .filter((line) => line.length > 0); + + // Find test queues (containing "Tests" and test run ID pattern) + const testQueues = queueNames.filter((queueName) => { + const queueId = queueName.split("/").pop(); // Extract queue ID from full path + return queueId && queueId.match(/Tests.*t[a-z0-9]{7,10}/); + }); + + if (testQueues.length > 0) { + this.log( + ` Found ${testQueues.length} orphaned test queue(s) in ${projectId}. Cleaning up...`, + "warn" + ); + + for (const queuePath of testQueues) { + try { + const queueId = queuePath.split("/").pop(); + this.log(` Deleting orphaned queue: ${queueId}`, "warn"); + + await this.exec( + `gcloud tasks queues delete ${queueId} --location=${region} --project=${projectId} --quiet`, + { silent: true } + ); + this.log(` ✅ Deleted orphaned queue: ${queueId}`); + } catch (error) { + this.log(` ⚠️ Could not delete queue ${queuePath}: ${error.message}`, "warn"); + } + } + } else { + this.log(` ✅ No orphaned test queues found in ${projectId}`, "success"); + } + } catch (e) { + // Project might not be accessible or Cloud Tasks API not enabled + this.log(` ⚠️ Could not check queues in ${projectId}: ${e.message}`, "warn"); + } + } + } + + /** + * Run a single suite + */ + async runSuite(suiteName) { + this.log("═══════════════════════════════════════════════════════════", "info"); + this.log(`🚀 Running suite: ${suiteName}`, "success"); + this.log("═══════════════════════════════════════════════════════════", "info"); + + try { + // Generate functions + const metadata = await this.generateFunctions([suiteName]); + + // Find this suite's specific projectId and region + const suiteMetadata = metadata.suites.find((s) => s.name === suiteName); + if (suiteMetadata) { + this.projectId = suiteMetadata.projectId || metadata.projectId; + this.region = suiteMetadata.region || metadata.region || DEFAULT_REGION; + this.log(` Using project: ${this.projectId}, region: ${this.region}`, "info"); + } + + // Build functions + await this.buildFunctions(); + + // Deploy functions + await this.deployFunctions(); + + // Wait for functions to become fully available + this.log("⏳ Waiting 20 seconds for functions to become fully available...", "info"); + await new Promise(resolve => setTimeout(resolve, 20000)); + + // Run tests + await this.runTests([suiteName]); + + this.results.passed.push(suiteName); + this.log(`✅ Suite ${suiteName} completed successfully`, "success"); + return true; + } catch (error) { + this.results.failed.push(suiteName); + this.log(`❌ Suite ${suiteName} failed: ${error.message}`, "error"); + return false; + } finally { + // Always run cleanup + await this.cleanup(); + } + } + + /** + * Run multiple suites sequentially + */ + async runSequential(suiteNames) { + this.log("═══════════════════════════════════════════════════════════", "info"); + this.log("🚀 Starting Sequential Test Suite Execution", "success"); + this.log("═══════════════════════════════════════════════════════════", "info"); + this.log(`📋 Test Run ID: ${this.testRunId}`, "success"); + this.log(`📝 Main log: ${this.logFile}`, "warn"); + this.log(`📁 Logs directory: ${LOGS_DIR}`, "warn"); + this.log(""); + + this.log(`📋 Running ${suiteNames.length} suite(s) sequentially:`, "success"); + for (const suite of suiteNames) { + this.log(` - ${suite}`); + } + this.log(""); + + // Clean up existing resources unless skipped + if (!this.skipCleanup) { + await this.cleanupExistingResources(); + } + + // SDK should be pre-packed (by Cloud Build or manually) + if (!this.usePublishedSDK) { + this.log("📦 Using pre-packed SDK for all suites...", "info"); + } + + // Run each suite + for (let i = 0; i < suiteNames.length; i++) { + const suite = suiteNames[i]; + await this.runSuite(suite); + this.log(""); + } + + // Final summary + this.printSummary(); + } + + /** + * Run multiple suites in parallel + */ + async runParallel(suiteNames) { + this.log("═══════════════════════════════════════════════════════════", "info"); + this.log("🚀 Running Test Suite(s)", "success"); + this.log("═══════════════════════════════════════════════════════════", "info"); + this.log(`📋 Test Run ID: ${this.testRunId}`, "success"); + this.log(""); + + // First, generate functions to get metadata with projectIds + const metadata = await this.generateFunctions(suiteNames); + + // Group suites by projectId + const suitesByProject = {}; + for (const suite of metadata.suites) { + const projectId = suite.projectId || metadata.projectId; + if (!suitesByProject[projectId]) { + suitesByProject[projectId] = []; + } + suitesByProject[projectId].push(suite.name); + } + + const projectCount = Object.keys(suitesByProject).length; + if (projectCount > 1) { + this.log( + `📊 Found ${projectCount} different projects. Running each group separately:`, + "warn" + ); + for (const [projectId, suites] of Object.entries(suitesByProject)) { + this.log(` - ${projectId}: ${suites.join(", ")}`); + } + this.log(""); + + // Run each project group separately + for (const [projectId, projectSuites] of Object.entries(suitesByProject)) { + this.log(`🚀 Running suites for project: ${projectId}`, "info"); + + // Set project context for this group + this.projectId = projectId; + const suiteMetadata = metadata.suites.find((s) => projectSuites.includes(s.name)); + this.region = suiteMetadata?.region || metadata.region || DEFAULT_REGION; + + try { + // Build functions (already generated) + await this.buildFunctions(); + + // Deploy functions + await this.deployFunctions(); + + // Wait for functions to become fully available + this.log("⏳ Waiting 20 seconds for functions to become fully available...", "info"); + await new Promise(resolve => setTimeout(resolve, 20000)); + + // Run tests for this project's suites + await this.runTests(projectSuites); + + this.results.passed.push(...projectSuites); + } catch (error) { + this.results.failed.push(...projectSuites); + this.log(`❌ Tests failed for ${projectId}: ${error.message}`, "error"); + } + + // Cleanup after each project group + await this.cleanup(); + } + } else { + // All suites use the same project, run normally + try { + // Build functions + await this.buildFunctions(); + + // Deploy functions + await this.deployFunctions(); + + // Wait for functions to become fully available + this.log("⏳ Waiting 20 seconds for functions to become fully available...", "info"); + await new Promise(resolve => setTimeout(resolve, 20000)); + + // Run tests + await this.runTests(suiteNames); + + this.results.passed = suiteNames; + this.log("✅ All tests passed!", "success"); + } catch (error) { + this.results.failed = suiteNames; + this.log(`❌ Tests failed: ${error.message}`, "error"); + throw error; + } finally { + // Always run cleanup + await this.cleanup(); + } + } + } + + /** + * Print test results summary + */ + printSummary() { + this.log("═══════════════════════════════════════════════════════════", "info"); + this.log("📊 Test Suite Summary", "success"); + this.log("═══════════════════════════════════════════════════════════", "info"); + this.log(`✅ Passed: ${this.results.passed.length} suite(s)`, "success"); + this.log(`❌ Failed: ${this.results.failed.length} suite(s)`, "error"); + + if (this.results.failed.length > 0) { + this.log(`Failed suites: ${this.results.failed.join(", ")}`, "error"); + this.log(`📝 Check main log: ${this.logFile}`, "warn"); + } else { + this.log("🎉 All suites passed!", "success"); + } + } +} + +/** + * Main CLI handler + */ +async function main() { + const args = process.argv.slice(2); + + // Parse command line arguments + const options = { + sequential: false, + saveArtifact: false, + skipCleanup: false, + filter: "", + exclude: "", + testRunId: null, + usePublishedSDK: null, + verbose: false, + cleanupOrphaned: false, + list: false, + help: false, + }; + + const suitePatterns = []; + + for (let i = 0; i < args.length; i++) { + const arg = args[i]; + + if (arg === "--help" || arg === "-h") { + options.help = true; + } else if (arg === "--list") { + options.list = true; + } else if (arg === "--sequential") { + options.sequential = true; + } else if (arg === "--save-artifact") { + options.saveArtifact = true; + } else if (arg === "--skip-cleanup") { + options.skipCleanup = true; + } else if (arg === "--verbose" || arg === "-v") { + options.verbose = true; + } else if (arg === "--cleanup-orphaned") { + options.cleanupOrphaned = true; + } else if (arg.startsWith("--filter=")) { + options.filter = arg.split("=")[1]; + } else if (arg.startsWith("--exclude=")) { + options.exclude = arg.split("=")[1]; + } else if (arg.startsWith("--test-run-id=")) { + options.testRunId = arg.split("=")[1]; + } else if (arg.startsWith("--use-published-sdk=")) { + options.usePublishedSDK = arg.split("=")[1]; + } else if (!arg.startsWith("-")) { + suitePatterns.push(arg); + } + } + + // Show help + if (options.help || (args.length === 0 && !options.list)) { + console.log(chalk.blue("Usage: node run-tests.js [suites...] [options]")); + console.log(""); + console.log("Examples:"); + console.log(" node run-tests.js v1_firestore # Single suite"); + console.log(" node run-tests.js v1_firestore v2_database # Multiple suites"); + console.log(' node run-tests.js "v1_*" # All v1 suites (pattern)'); + console.log(' node run-tests.js --sequential "v2_*" # Sequential execution'); + console.log(" node run-tests.js --filter=v2 --exclude=auth # Filter suites"); + console.log(" node run-tests.js --list # List available suites"); + console.log(""); + console.log("Options:"); + console.log(" --sequential Run suites sequentially instead of in parallel"); + console.log(" --filter=PATTERN Only run suites matching pattern"); + console.log(" --exclude=PATTERN Skip suites matching pattern"); + console.log(" --test-run-id=ID Use specific TEST_RUN_ID"); + console.log( + " --use-published-sdk=VER Use published SDK version instead of local (default: use pre-packed local)" + ); + console.log(" --save-artifact Save test metadata for future cleanup"); + console.log(" --skip-cleanup Skip pre-run cleanup (sequential mode only)"); + console.log(" --verbose, -v Show detailed Firebase CLI output during deployment"); + console.log(" --cleanup-orphaned Clean up orphaned test functions and exit"); + console.log(" --list List all available suites"); + console.log(" --help, -h Show this help message"); + process.exit(0); + } + + // List suites + if (options.list) { + const runner = new TestRunner(); + const allSuites = runner.getAllSuites(); + + console.log(chalk.blue("\nAvailable test suites:")); + console.log(chalk.blue("─────────────────────")); + + const v1Suites = allSuites.filter((s) => s.startsWith("v1_")); + const v2Suites = allSuites.filter((s) => s.startsWith("v2_")); + + if (v1Suites.length > 0) { + console.log(chalk.green("\n📁 V1 Suites:")); + v1Suites.forEach((suite) => console.log(` - ${suite}`)); + } + + if (v2Suites.length > 0) { + console.log(chalk.green("\n📁 V2 Suites:")); + v2Suites.forEach((suite) => console.log(` - ${suite}`)); + } + + process.exit(0); + } + + // Create runner instance + const runner = new TestRunner(options); + + // Handle cleanup-orphaned option + if (options.cleanupOrphaned) { + console.log(chalk.blue("🧹 Cleaning up orphaned test functions...")); + await runner.cleanupExistingResources(); + console.log(chalk.green("✅ Orphaned function cleanup completed")); + process.exit(0); + } + + // Get filtered suite list + let suites; + if (suitePatterns.length === 0 && options.sequential) { + // No patterns specified in sequential mode, run all suites + suites = runner.getAllSuites(); + if (options.filter) { + suites = suites.filter((s) => s.includes(options.filter)); + } + if (options.exclude) { + suites = suites.filter((s) => !s.match(new RegExp(options.exclude))); + } + } else { + suites = runner.filterSuites(suitePatterns); + } + + if (suites.length === 0) { + console.log(chalk.red("❌ No test suites found matching criteria")); + process.exit(1); + } + + try { + // Run tests + if (options.sequential) { + await runner.runSequential(suites); + } else { + await runner.runParallel(suites); + } + + // Exit with appropriate code + process.exit(runner.results.failed.length > 0 ? 1 : 0); + } catch (error) { + console.error(chalk.red(`❌ Test execution failed: ${error.message}`)); + if (error.stack) { + console.error(chalk.gray(error.stack)); + } + process.exit(1); + } +} + +// Handle uncaught errors +process.on("unhandledRejection", (error) => { + console.error(chalk.red("❌ Unhandled error:"), error); + process.exit(1); +}); + +// Run main function +main(); diff --git a/integration_test/scripts/util.sh b/integration_test/scripts/util.sh new file mode 100755 index 000000000..cb334093f --- /dev/null +++ b/integration_test/scripts/util.sh @@ -0,0 +1,90 @@ +#!/bin/bash + +# util.sh - Common utility functions for integration tests + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +# Default configuration +DEFAULT_MAX_RETRIES=3 +DEFAULT_BASE_DELAY=5 +DEFAULT_MAX_DELAY=60 +DEFAULT_TIMEOUT=300 + +# Exponential backoff with jitter +exponential_backoff() { + local attempt="$1" + local base_delay="$2" + local max_delay="$3" + + # Calculate delay: base_delay * 2^(attempt-1) + local delay=$((base_delay * (2 ** (attempt - 1)))) + + # Cap at max_delay + if [ $delay -gt $max_delay ]; then + delay=$max_delay + fi + + # Add jitter (±25% random variation) + local jitter=$((delay / 4)) + local random_jitter=$((RANDOM % (jitter * 2) - jitter)) + delay=$((delay + random_jitter)) + + # Ensure minimum delay of 1 second + if [ $delay -lt 1 ]; then + delay=1 + fi + + echo $delay +} + +# Retry function with exponential backoff +retry_with_backoff() { + local max_attempts="${1:-$DEFAULT_MAX_RETRIES}" + local base_delay="${2:-$DEFAULT_BASE_DELAY}" + local max_delay="${3:-$DEFAULT_MAX_DELAY}" + local timeout="${4:-$DEFAULT_TIMEOUT}" + local attempt=1 + shift 4 + + while [ $attempt -le $max_attempts ]; do + echo -e "${YELLOW}🔄 Attempt $attempt of $max_attempts: $@${NC}" + + if timeout "${timeout}s" "$@"; then + echo -e "${GREEN}✅ Command succeeded${NC}" + return 0 + fi + + if [ $attempt -lt $max_attempts ]; then + local delay=$(exponential_backoff $attempt $base_delay $max_delay) + echo -e "${YELLOW}⚠️ Command failed. Retrying in ${delay} seconds...${NC}" + sleep $delay + fi + + attempt=$((attempt + 1)) + done + + echo -e "${RED}❌ Command failed after $max_attempts attempts${NC}" + return 1 +} + +# Logging functions +log_info() { + echo -e "${GREEN}[INFO]${NC} $1" +} + +log_warn() { + echo -e "${YELLOW}[WARN]${NC} $1" +} + +log_error() { + echo -e "${RED}[ERROR]${NC} $1" +} + +log_debug() { + echo -e "${BLUE}[DEBUG]${NC} $1" +} \ No newline at end of file diff --git a/integration_test/src/utils/logger.ts b/integration_test/src/utils/logger.ts new file mode 100644 index 000000000..69b96f957 --- /dev/null +++ b/integration_test/src/utils/logger.ts @@ -0,0 +1,165 @@ +import chalk from "chalk"; + +export enum LogLevel { + DEBUG = 0, + INFO = 1, + SUCCESS = 2, + WARNING = 3, + ERROR = 4, + NONE = 5, +} + +export class Logger { + private static instance: Logger; + private logLevel: LogLevel; + private useEmojis: boolean; + + private constructor(logLevel: LogLevel = LogLevel.INFO, useEmojis = true) { + this.logLevel = logLevel; + this.useEmojis = useEmojis; + } + + static getInstance(): Logger { + if (!Logger.instance) { + const level = process.env.LOG_LEVEL + ? LogLevel[process.env.LOG_LEVEL as keyof typeof LogLevel] || LogLevel.INFO + : LogLevel.INFO; + Logger.instance = new Logger(level); + } + return Logger.instance; + } + + setLogLevel(level: LogLevel): void { + this.logLevel = level; + } + + private formatTimestamp(): string { + return new Date().toISOString().replace("T", " ").split(".")[0]; + } + + private shouldLog(level: LogLevel): boolean { + return level >= this.logLevel; + } + + debug(message: string, ...args: any[]): void { + if (!this.shouldLog(LogLevel.DEBUG)) return; + + const timestamp = chalk.gray(this.formatTimestamp()); + const prefix = this.useEmojis ? "🔍" : "[DEBUG]"; + const formattedMsg = chalk.gray(`${prefix} ${message}`); + + console.log(`${timestamp} ${formattedMsg}`, ...args); + } + + info(message: string, ...args: any[]): void { + if (!this.shouldLog(LogLevel.INFO)) return; + + const timestamp = chalk.gray(this.formatTimestamp()); + const prefix = this.useEmojis ? "ℹ️ " : "[INFO]"; + const formattedMsg = chalk.blue(`${prefix} ${message}`); + + console.log(`${timestamp} ${formattedMsg}`, ...args); + } + + success(message: string, ...args: any[]): void { + if (!this.shouldLog(LogLevel.SUCCESS)) return; + + const timestamp = chalk.gray(this.formatTimestamp()); + const prefix = this.useEmojis ? "✅" : "[SUCCESS]"; + const formattedMsg = chalk.green(`${prefix} ${message}`); + + console.log(`${timestamp} ${formattedMsg}`, ...args); + } + + warning(message: string, ...args: any[]): void { + if (!this.shouldLog(LogLevel.WARNING)) return; + + const timestamp = chalk.gray(this.formatTimestamp()); + const prefix = this.useEmojis ? "⚠️ " : "[WARN]"; + const formattedMsg = chalk.yellow(`${prefix} ${message}`); + + console.warn(`${timestamp} ${formattedMsg}`, ...args); + } + + error(message: string, error?: Error | any, ...args: any[]): void { + if (!this.shouldLog(LogLevel.ERROR)) return; + + const timestamp = chalk.gray(this.formatTimestamp()); + const prefix = this.useEmojis ? "❌" : "[ERROR]"; + const formattedMsg = chalk.red(`${prefix} ${message}`); + + if (error instanceof Error) { + console.error(`${timestamp} ${formattedMsg}`, ...args); + console.error(chalk.red(error.stack || error.message)); + } else if (error) { + console.error(`${timestamp} ${formattedMsg}`, error, ...args); + } else { + console.error(`${timestamp} ${formattedMsg}`, ...args); + } + } + + // Special contextual loggers for test harness + cleanup(message: string, ...args: any[]): void { + if (!this.shouldLog(LogLevel.INFO)) return; + + const timestamp = chalk.gray(this.formatTimestamp()); + const prefix = this.useEmojis ? "🧹" : "[CLEANUP]"; + const formattedMsg = chalk.cyan(`${prefix} ${message}`); + + console.log(`${timestamp} ${formattedMsg}`, ...args); + } + + deployment(message: string, ...args: any[]): void { + if (!this.shouldLog(LogLevel.INFO)) return; + + const timestamp = chalk.gray(this.formatTimestamp()); + const prefix = this.useEmojis ? "🚀" : "[DEPLOY]"; + const formattedMsg = chalk.magenta(`${prefix} ${message}`); + + console.log(`${timestamp} ${formattedMsg}`, ...args); + } + + // Group related logs visually + group(title: string): void { + const line = chalk.gray("─".repeat(50)); + console.log(`\n${line}`); + console.log(chalk.bold.white(title)); + console.log(line); + } + + groupEnd(): void { + console.log(chalk.gray("─".repeat(50)) + "\n"); + } +} + +// Export singleton instance for convenience +export const logger = Logger.getInstance(); + +// Export legacy functions for backwards compatibility +export function logInfo(message: string): void { + logger.info(message); +} + +export function logError(message: string, error?: Error): void { + logger.error(message, error); +} + +export function logSuccess(message: string): void { + logger.success(message); +} + +export function logWarning(message: string): void { + logger.warning(message); +} + +export function logDebug(message: string): void { + logger.debug(message); +} + +export function logCleanup(message: string): void { + logger.cleanup(message); +} + +export function logDeployment(message: string): void { + logger.deployment(message); +} \ No newline at end of file diff --git a/integration_test/templates/firebase.json.hbs b/integration_test/templates/firebase.json.hbs new file mode 100644 index 000000000..a4b14755c --- /dev/null +++ b/integration_test/templates/firebase.json.hbs @@ -0,0 +1,15 @@ +{ + "functions": { + "source": "functions", + "codebase": "default", + "ignore": [ + "node_modules", + ".git", + "firebase-debug.log", + "firebase-debug.*.log" + ], + "predeploy": [ + "npm --prefix \"$RESOURCE_DIR\" run build" + ] + } +} \ No newline at end of file diff --git a/integration_test/templates/functions/package.json.hbs b/integration_test/templates/functions/package.json.hbs new file mode 100644 index 000000000..2ebcefd77 --- /dev/null +++ b/integration_test/templates/functions/package.json.hbs @@ -0,0 +1,25 @@ +{ + "name": "functions", + "version": "1.0.0", + "description": "Generated Firebase Functions for {{name}}", + "main": "lib/index.js", + "engines": { + "node": "20" + }, + "scripts": { + "build": "tsc", + "watch": "tsc --watch", + "clean": "rm -rf lib" + }, + "dependencies": { + {{#each dependencies}} + "{{@key}}": "{{this}}"{{#unless @last}},{{/unless}} + {{/each}} + }, + "devDependencies": { + {{#each devDependencies}} + "{{@key}}": "{{this}}"{{#unless @last}},{{/unless}} + {{/each}} + }, + "private": true +} \ No newline at end of file diff --git a/integration_test/templates/functions/src/index.ts.hbs b/integration_test/templates/functions/src/index.ts.hbs new file mode 100644 index 000000000..49c49e70a --- /dev/null +++ b/integration_test/templates/functions/src/index.ts.hbs @@ -0,0 +1,19 @@ +import * as admin from "firebase-admin"; + +// Initialize admin SDK +const projectId = process.env.PROJECT_ID || process.env.GCLOUD_PROJECT || "{{projectId}}"; + +if (!admin.apps.length) { + try { + admin.initializeApp({ + projectId: projectId + }); + } catch (error) { + console.log("Admin SDK initialization skipped:", error.message); + } +} + +// Export all generated test suites +{{#each suites}} +export * from "./{{this.version}}/{{this.service}}-tests"; // {{this.name}} +{{/each}} \ No newline at end of file diff --git a/integration_test/templates/functions/src/utils.ts.hbs b/integration_test/templates/functions/src/utils.ts.hbs new file mode 100644 index 000000000..0e91b7fcd --- /dev/null +++ b/integration_test/templates/functions/src/utils.ts.hbs @@ -0,0 +1,25 @@ +/** + * Sanitize data for Firestore storage + * Removes undefined values and functions + */ +export function sanitizeData(data: any): any { + if (data === null || data === undefined) { + return null; + } + + if (typeof data !== "object") { + return data; + } + + if (Array.isArray(data)) { + return data.map(item => sanitizeData(item)); + } + + const sanitized: any = {}; + for (const [key, value] of Object.entries(data)) { + if (value !== undefined && typeof value !== "function") { + sanitized[key] = sanitizeData(value); + } + } + return sanitized; +} \ No newline at end of file diff --git a/integration_test/templates/functions/src/v1/auth-tests.ts.hbs b/integration_test/templates/functions/src/v1/auth-tests.ts.hbs new file mode 100644 index 000000000..681332d71 --- /dev/null +++ b/integration_test/templates/functions/src/v1/auth-tests.ts.hbs @@ -0,0 +1,97 @@ +import * as admin from "firebase-admin"; +import * as functions from "firebase-functions/v1"; +import { sanitizeData } from "../utils"; + +const REGION = "{{region}}"; + +{{#each functions}} +{{#if (eq trigger "onCreate")}} +export const {{name}}{{../testRunId}} = functions + .runWith({ + timeoutSeconds: {{timeout}} + }) + .region(REGION) + .auth.user() + .onCreate(async (user, context) => { + const { email, displayName, uid } = user; + const userProfile = { + email, + displayName, + createdAt: admin.firestore.FieldValue.serverTimestamp(), + }; + await admin.firestore().collection("userProfiles").doc(uid).set(userProfile); + + await admin + .firestore() + .collection("{{collection}}") + .doc(uid) + .set( + sanitizeData({ + ...context, + metadata: JSON.stringify(user.metadata), + }) + ); + }); +{{/if}} + +{{#if (eq trigger "onDelete")}} +export const {{name}}{{../testRunId}} = functions + .runWith({ + timeoutSeconds: {{timeout}} + }) + .region(REGION) + .auth.user() + .onDelete(async (user, context) => { + const { uid } = user; + await admin + .firestore() + .collection("{{collection}}") + .doc(uid) + .set( + sanitizeData({ + ...context, + metadata: JSON.stringify(user.metadata), + }) + ); + }); +{{/if}} + +{{#if (eq trigger "beforeCreate")}} +export const {{name}}{{../testRunId}} = functions + .runWith({ + timeoutSeconds: {{timeout}} + }) + .region(REGION) + .auth.user() + .beforeCreate(async (user, context) => { + await admin.firestore().collection("{{collection}}").doc(user.uid).set({ + eventId: context.eventId, + eventType: context.eventType, + timestamp: context.timestamp, + resource: context.resource, + }); + + return user; + }); +{{/if}} + +{{#if (eq trigger "beforeSignIn")}} +export const {{name}}{{../testRunId}} = functions + .runWith({ + timeoutSeconds: {{timeout}} + }) + .region(REGION) + .auth.user() + .beforeSignIn(async (user, context) => { + await admin.firestore().collection("{{collection}}").doc(user.uid).set({ + eventId: context.eventId, + eventType: context.eventType, + timestamp: context.timestamp, + resource: context.resource, + }); + + return user; + }); +{{/if}} + +{{/each}} \ No newline at end of file diff --git a/integration_test/templates/functions/src/v1/database-tests.ts.hbs b/integration_test/templates/functions/src/v1/database-tests.ts.hbs new file mode 100644 index 000000000..09b320338 --- /dev/null +++ b/integration_test/templates/functions/src/v1/database-tests.ts.hbs @@ -0,0 +1,42 @@ +import * as admin from "firebase-admin"; +import * as functions from "firebase-functions/v1"; +import { sanitizeData } from "../utils"; + +const REGION = "{{region}}"; + +{{#each functions}} +export const {{name}}{{../testRunId}} = functions + .runWith({ + timeoutSeconds: {{timeout}} + }) + .region(REGION) + .database.ref("{{path}}") + .{{trigger}}(async ({{#if (eq trigger "onUpdate")}}change{{else if (eq trigger "onWrite")}}change{{else}}snapshot{{/if}}, context) => { + const testId = context.params.testId; + {{#if (eq trigger "onWrite")}} + if (change.after.val() === null) { + console.log(`Event for ${testId} is null; presuming data cleanup, so skipping.`); + return; + } + {{/if}} + + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set( + sanitizeData({ + ...context, + {{#if (or (eq trigger "onUpdate") (eq trigger "onWrite"))}} + url: change.after.ref.toString(), + {{#if (eq trigger "onUpdate")}} + data: change.after.val() ? JSON.stringify(change.after.val()) : null, + {{/if}} + {{else}} + url: snapshot.ref.toString(), + {{/if}} + }) + ); + }); + +{{/each}} \ No newline at end of file diff --git a/integration_test/templates/functions/src/v1/firestore-tests.ts.hbs b/integration_test/templates/functions/src/v1/firestore-tests.ts.hbs new file mode 100644 index 000000000..b9176c1e3 --- /dev/null +++ b/integration_test/templates/functions/src/v1/firestore-tests.ts.hbs @@ -0,0 +1,23 @@ +import * as admin from "firebase-admin"; +import * as functions from "firebase-functions/v1"; +import { sanitizeData } from "../utils"; + +const REGION = "{{region}}"; + +{{#each functions}} +export const {{name}}{{../testRunId}} = functions + .runWith({ + timeoutSeconds: {{timeout}} + }) + .region(REGION) + .firestore.document("{{document}}") + .{{trigger}}(async ({{#if (eq trigger "onUpdate")}}_change{{else if (eq trigger "onWrite")}}_change{{else}}_snapshot{{/if}}, context) => { + const testId = context.params.testId; + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set(sanitizeData(context)); + }); + +{{/each}} \ No newline at end of file diff --git a/integration_test/templates/functions/src/v1/pubsub-tests.ts.hbs b/integration_test/templates/functions/src/v1/pubsub-tests.ts.hbs new file mode 100644 index 000000000..4f1267cc5 --- /dev/null +++ b/integration_test/templates/functions/src/v1/pubsub-tests.ts.hbs @@ -0,0 +1,54 @@ +import * as admin from "firebase-admin"; +import * as functions from "firebase-functions/v1"; +import { sanitizeData } from "../utils"; + +const REGION = "{{region}}"; + +{{#each functions}} +{{#if schedule}} +export const {{name}}{{../testRunId}} = functions + .runWith({ + timeoutSeconds: {{timeout}} + }) + .region(REGION) + .pubsub.schedule("{{schedule}}") + .onRun(async (context) => { + const topicName = /\/topics\/([a-zA-Z0-9\-\_]+)/gi.exec(context.resource.name)?.[1]; + + if (!topicName) { + console.error( + "Topic name not found in resource name for scheduled function execution" + ); + return; + } + + await admin + .firestore() + .collection("{{collection}}") + .doc(topicName) + .set(sanitizeData(context)); + }); +{{else}} +export const {{name}}{{../testRunId}} = functions + .runWith({ + timeoutSeconds: {{timeout}} + }) + .region(REGION) + .pubsub.topic("{{topic}}") + .onPublish(async (message, context) => { + const testId = (message.json as { testId?: string })?.testId; + + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set( + sanitizeData({ + ...context, + message: JSON.stringify(message), + }) + ); + }); +{{/if}} + +{{/each}} \ No newline at end of file diff --git a/integration_test/templates/functions/src/v1/remoteconfig-tests.ts.hbs b/integration_test/templates/functions/src/v1/remoteconfig-tests.ts.hbs new file mode 100644 index 000000000..91e81cfc9 --- /dev/null +++ b/integration_test/templates/functions/src/v1/remoteconfig-tests.ts.hbs @@ -0,0 +1,27 @@ +import * as admin from "firebase-admin"; +import * as functions from "firebase-functions/v1"; +import { sanitizeData } from "../utils"; + +const REGION = "{{region}}"; + +{{#each functions}} +export const {{name}}{{../testRunId}} = functions + .runWith({ + timeoutSeconds: {{timeout}} + }) + .region(REGION) + .remoteConfig.onUpdate(async (version, context) => { + const testId = version.description; + if (!testId) { + console.error("TestId not found in remoteConfig version description"); + return; + } + + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set(sanitizeData(context)); + }); + +{{/each}} \ No newline at end of file diff --git a/integration_test/templates/functions/src/v1/storage-tests.ts.hbs b/integration_test/templates/functions/src/v1/storage-tests.ts.hbs new file mode 100644 index 000000000..7aa7a083a --- /dev/null +++ b/integration_test/templates/functions/src/v1/storage-tests.ts.hbs @@ -0,0 +1,42 @@ +import * as admin from "firebase-admin"; +import * as functions from "firebase-functions/v1"; +import { sanitizeData } from "../utils"; + +const REGION = "{{region}}"; + +{{#each functions}} +export const {{name}}{{../testRunId}} = functions + .runWith({ + timeoutSeconds: {{timeout}} + }) + .region(REGION) + .storage.bucket("{{../projectId}}.firebasestorage.app") + .object() + .{{trigger}}(async (object{{#if (eq trigger "onFinalize")}}: unknown{{/if}}, context) => { + {{#if (eq trigger "onFinalize")}} + if (!object || typeof object !== "object" || !("name" in object)) { + console.error("Invalid object structure for storage object finalize"); + return; + } + const name = (object as { name: string }).name; + if (!name || typeof name !== "string") { + console.error("Invalid name property for storage object finalize"); + return; + } + const testId = name.split(".")[0]; + {{else}} + const testId = object.name?.split(".")[0]; + if (!testId) { + console.error("TestId not found for storage object {{trigger}}"); + return; + } + {{/if}} + + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set(sanitizeData(context)); + }); + +{{/each}} \ No newline at end of file diff --git a/integration_test/templates/functions/src/v1/tasks-tests.ts.hbs b/integration_test/templates/functions/src/v1/tasks-tests.ts.hbs new file mode 100644 index 000000000..47f3465d2 --- /dev/null +++ b/integration_test/templates/functions/src/v1/tasks-tests.ts.hbs @@ -0,0 +1,28 @@ +import * as admin from "firebase-admin"; +import * as functions from "firebase-functions/v1"; +import { sanitizeData } from "../utils"; + +const REGION = "{{region}}"; + +{{#each functions}} +export const {{name}}{{../testRunId}} = functions + .runWith({ + timeoutSeconds: {{timeout}} + }) + .region(REGION) + .tasks.taskQueue() + .onDispatch(async (data: unknown, context) => { + if (!data || typeof data !== "object" || !("testId" in data)) { + console.error("Invalid data structure for tasks onDispatch"); + return; + } + const testId = (data as { testId: string }).testId; + + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set(sanitizeData(context)); + }); + +{{/each}} \ No newline at end of file diff --git a/integration_test/templates/functions/src/v1/testlab-tests.ts.hbs b/integration_test/templates/functions/src/v1/testlab-tests.ts.hbs new file mode 100644 index 000000000..a5722cf19 --- /dev/null +++ b/integration_test/templates/functions/src/v1/testlab-tests.ts.hbs @@ -0,0 +1,43 @@ +import * as admin from "firebase-admin"; +import * as functions from "firebase-functions/v1"; +import { sanitizeData } from "../utils"; + +const REGION = "{{region}}"; + +{{#each functions}} +export const {{name}}{{../testRunId}} = functions + .runWith({ + timeoutSeconds: {{timeout}} + }) + .region(REGION) + .testLab.testMatrix() + .onComplete(async (matrix: unknown, context) => { + if (!matrix || typeof matrix !== "object" || !("clientInfo" in matrix)) { + console.error("Invalid matrix structure for test matrix completion"); + return; + } + const clientInfo = (matrix as { clientInfo: unknown }).clientInfo; + if (!clientInfo || typeof clientInfo !== "object" || !("details" in clientInfo)) { + console.error("Invalid clientInfo structure for test matrix completion"); + return; + } + const details = clientInfo.details; + if (!details || typeof details !== "object" || !("testId" in details)) { + console.error("Invalid details structure for test matrix completion"); + return; + } + const testId = details.testId as string; + + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set( + sanitizeData({ + ...context, + matrix: JSON.stringify(matrix), + }) + ); + }); + +{{/each}} \ No newline at end of file diff --git a/integration_test/templates/functions/src/v2/alerts-tests.ts.hbs b/integration_test/templates/functions/src/v2/alerts-tests.ts.hbs new file mode 100644 index 000000000..bac6d311c --- /dev/null +++ b/integration_test/templates/functions/src/v2/alerts-tests.ts.hbs @@ -0,0 +1,222 @@ +// import * as admin from "firebase-admin"; +import { onAlertPublished } from "firebase-functions/v2/alerts"; +import { + onInAppFeedbackPublished, + onNewTesterIosDevicePublished, +} from "firebase-functions/v2/alerts/appDistribution"; +import { + onPlanAutomatedUpdatePublished, + onPlanUpdatePublished, +} from "firebase-functions/v2/alerts/billing"; +import { + onNewAnrIssuePublished, + onNewFatalIssuePublished, + onNewNonfatalIssuePublished, + onRegressionAlertPublished, + onStabilityDigestPublished, + onVelocityAlertPublished, +} from "firebase-functions/v2/alerts/crashlytics"; +import { onThresholdAlertPublished } from "firebase-functions/v2/alerts/performance"; + +const REGION = "{{region}}"; + +// TODO: All this does is test that the function is deployable. +// Since you cannot directly trigger alerts in a CI environment, we cannot test +// the internals without mocking. + +{{#each functions}} +{{#if (eq trigger "onAlertPublished")}} +export const {{name}}{{../testRunId}} = onAlertPublished( + { + alertType: "{{alertType}}", + region: REGION, + timeoutSeconds: {{timeout}} + }, + async (event) => { + // const testId = event.data.payload.testId; + // await admin + // .firestore() + // .collection("{{name}}") + // .doc(testId) + // .set({ event: JSON.stringify(event) }); + } +); +{{/if}} + +{{#if (eq trigger "onInAppFeedbackPublished")}} +export const {{name}}{{../testRunId}} = onInAppFeedbackPublished({ + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + // const testId = event.data.payload.text; + // await admin + // .firestore() + // .collection("{{name}}") + // .doc(testId) + // .set({ + // event: JSON.stringify(event), + // }); +}); +{{/if}} + +{{#if (eq trigger "onNewTesterIosDevicePublished")}} +export const {{name}}{{../testRunId}} = onNewTesterIosDevicePublished({ + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + // const testId = event.data.payload.testerName; + // await admin + // .firestore() + // .collection("{{name}}") + // .doc(testId) + // .set({ + // event: JSON.stringify(event), + // }); +}); +{{/if}} + +{{#if (eq trigger "onPlanAutomatedUpdatePublished")}} +export const {{name}}{{../testRunId}} = onPlanAutomatedUpdatePublished({ + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + // const testId = event.data.payload.billingPlan; + // await admin + // .firestore() + // .collection("{{name}}") + // .doc(testId) + // .set({ + // event: JSON.stringify(event), + // }); +}); +{{/if}} + +{{#if (eq trigger "onPlanUpdatePublished")}} +export const {{name}}{{../testRunId}} = onPlanUpdatePublished({ + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + // const testId = event.data.payload.billingPlan; + // await admin + // .firestore() + // .collection("{{name}}") + // .doc(testId) + // .set({ + // event: JSON.stringify(event), + // }); +}); +{{/if}} + +{{#if (eq trigger "onNewAnrIssuePublished")}} +export const {{name}}{{../testRunId}} = onNewAnrIssuePublished({ + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + // const testId = event.data.payload.issue.title; + // await admin + // .firestore() + // .collection("{{name}}") + // .doc(testId) + // .set({ + // event: JSON.stringify(event), + // }); +}); +{{/if}} + +{{#if (eq trigger "onNewFatalIssuePublished")}} +export const {{name}}{{../testRunId}} = onNewFatalIssuePublished({ + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + // const testId = event.data.payload.issue.title; + // await admin + // .firestore() + // .collection("{{name}}") + // .doc(testId) + // .set({ + // event: JSON.stringify(event), + // }); +}); +{{/if}} + +{{#if (eq trigger "onNewNonfatalIssuePublished")}} +export const {{name}}{{../testRunId}} = onNewNonfatalIssuePublished({ + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + // const testId = event.data.payload.issue.title; + // await admin + // .firestore() + // .collection("{{name}}") + // .doc(testId) + // .set({ + // event: JSON.stringify(event), + // }); +}); +{{/if}} + +{{#if (eq trigger "onRegressionAlertPublished")}} +export const {{name}}{{../testRunId}} = onRegressionAlertPublished({ + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + // const testId = event.data.payload.issue.title; + // await admin + // .firestore() + // .collection("{{name}}") + // .doc(testId) + // .set({ + // event: JSON.stringify(event), + // }); +}); +{{/if}} + +{{#if (eq trigger "onStabilityDigestPublished")}} +export const {{name}}{{../testRunId}} = onStabilityDigestPublished({ + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + // const testId = event.data.payload.trendingIssues[0].issue.title; + // await admin + // .firestore() + // .collection("{{name}}") + // .doc(testId) + // .set({ + // event: JSON.stringify(event), + // }); +}); +{{/if}} + +{{#if (eq trigger "onVelocityAlertPublished")}} +export const {{name}}{{../testRunId}} = onVelocityAlertPublished({ + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + // const testId = event.data.payload.issue.title; + // await admin + // .firestore() + // .collection("{{name}}") + // .doc(testId) + // .set({ + // event: JSON.stringify(event), + // }); +}); +{{/if}} + +{{#if (eq trigger "onThresholdAlertPublished")}} +export const {{name}}{{../testRunId}} = onThresholdAlertPublished({ + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + // const testId = event.data.payload.eventName; + // await admin + // .firestore() + // .collection("{{name}}") + // .doc(testId) + // .set({ + // event: JSON.stringify(event), + // }); +}); +{{/if}} + +{{/each}} \ No newline at end of file diff --git a/integration_test/templates/functions/src/v2/database-tests.ts.hbs b/integration_test/templates/functions/src/v2/database-tests.ts.hbs new file mode 100644 index 000000000..4b0144e08 --- /dev/null +++ b/integration_test/templates/functions/src/v2/database-tests.ts.hbs @@ -0,0 +1,104 @@ +import * as admin from "firebase-admin"; +import { onValueCreated, onValueDeleted, onValueUpdated, onValueWritten } from "firebase-functions/v2/database"; +import { sanitizeData } from "../utils"; + +const REGION = "{{region}}"; + +{{#each functions}} +{{#if (eq trigger "onValueCreated")}} +export const {{name}}{{../testRunId}} = onValueCreated({ + ref: "{{path}}", + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + const testId = event.params.testId; + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set( + sanitizeData({ + id: event.id, + time: event.time, + type: "google.firebase.database.ref.v1.created", + url: event.data.ref.toString(), + }) + ); +}); +{{/if}} + +{{#if (eq trigger "onValueDeleted")}} +export const {{name}}{{../testRunId}} = onValueDeleted({ + ref: "{{path}}", + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + const testId = event.params.testId; + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set( + sanitizeData({ + id: event.id, + time: event.time, + type: "google.firebase.database.ref.v1.deleted", + url: event.data.ref.toString(), + }) + ); +}); +{{/if}} + +{{#if (eq trigger "onValueUpdated")}} +export const {{name}}{{../testRunId}} = onValueUpdated({ + ref: "{{path}}", + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + const testId = event.params.testId; + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set( + sanitizeData({ + id: event.id, + time: event.time, + type: "google.firebase.database.ref.v1.updated", + url: event.data.after.ref.toString(), + data: event.data.after.val() ? JSON.stringify(event.data.after.val()) : null, + }) + ); +}); +{{/if}} + +{{#if (eq trigger "onValueWritten")}} +export const {{name}}{{../testRunId}} = onValueWritten({ + ref: "{{path}}", + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + const testId = event.params.testId; + + // Skip if data is being deleted (cleanup) + if (event.data.after.val() === null) { + console.log(`Event for ${testId} is null; presuming data cleanup, so skipping.`); + return; + } + + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set( + sanitizeData({ + id: event.id, + time: event.time, + type: "google.firebase.database.ref.v1.written", + url: event.data.after.ref.toString(), + }) + ); +}); +{{/if}} + +{{/each}} \ No newline at end of file diff --git a/integration_test/templates/functions/src/v2/eventarc-tests.ts.hbs b/integration_test/templates/functions/src/v2/eventarc-tests.ts.hbs new file mode 100644 index 000000000..8abc5891b --- /dev/null +++ b/integration_test/templates/functions/src/v2/eventarc-tests.ts.hbs @@ -0,0 +1,25 @@ +import * as admin from "firebase-admin"; +import { onCustomEventPublished } from "firebase-functions/v2/eventarc"; +import { sanitizeData } from "../utils"; + +{{#each functions}} +export const {{name}}{{../testRunId}} = onCustomEventPublished( + "{{eventType}}", + async (event) => { + const testId = event.data.testId; + + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set(sanitizeData({ + id: event.id, + type: event.type, + time: event.time, + source: event.source, + data: JSON.stringify(event.data), + })); + } +); + +{{/each}} diff --git a/integration_test/templates/functions/src/v2/firestore-tests.ts.hbs b/integration_test/templates/functions/src/v2/firestore-tests.ts.hbs new file mode 100644 index 000000000..2284bb9e9 --- /dev/null +++ b/integration_test/templates/functions/src/v2/firestore-tests.ts.hbs @@ -0,0 +1,68 @@ +import * as admin from "firebase-admin"; +import { onDocumentCreated, onDocumentDeleted, onDocumentUpdated, onDocumentWritten } from "firebase-functions/v2/firestore"; +import { sanitizeData } from "../utils"; + +const REGION = "{{region}}"; + +{{#each functions}} +{{#if (eq trigger "onDocumentCreated")}} +export const {{name}}{{../testRunId}} = onDocumentCreated({ + document: "{{document}}", + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + const testId = event.params.testId; + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set(sanitizeData(event)); +}); +{{/if}} + +{{#if (eq trigger "onDocumentDeleted")}} +export const {{name}}{{../testRunId}} = onDocumentDeleted({ + document: "{{document}}", + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + const testId = event.params.testId; + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set(sanitizeData(event)); +}); +{{/if}} + +{{#if (eq trigger "onDocumentUpdated")}} +export const {{name}}{{../testRunId}} = onDocumentUpdated({ + document: "{{document}}", + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + const testId = event.params.testId; + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set(sanitizeData(event)); +}); +{{/if}} + +{{#if (eq trigger "onDocumentWritten")}} +export const {{name}}{{../testRunId}} = onDocumentWritten({ + document: "{{document}}", + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + const testId = event.params.testId; + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set(sanitizeData(event)); +}); +{{/if}} + +{{/each}} \ No newline at end of file diff --git a/integration_test/templates/functions/src/v2/identity-tests.ts.hbs b/integration_test/templates/functions/src/v2/identity-tests.ts.hbs new file mode 100644 index 000000000..e21c874a6 --- /dev/null +++ b/integration_test/templates/functions/src/v2/identity-tests.ts.hbs @@ -0,0 +1,19 @@ +import * as admin from "firebase-admin"; +import { beforeUserCreated, beforeUserSignedIn } from "firebase-functions/v2/identity"; +import { sanitizeData } from "../utils"; + +{{#each functions}} +export const {{name}}{{../testRunId}} = {{#if (eq type "beforeUserCreated")}}beforeUserCreated{{else}}beforeUserSignedIn{{/if}}(async (event) => { + const { uid } = event.data; + + await admin.firestore().collection("{{collection}}").doc(uid).set(sanitizeData({ + eventId: event.eventId, + eventType: event.eventType, + timestamp: event.timestamp, + resource: event.resource, + })); + + return event.data; +}); + +{{/each}} diff --git a/integration_test/templates/functions/src/v2/pubsub-tests.ts.hbs b/integration_test/templates/functions/src/v2/pubsub-tests.ts.hbs new file mode 100644 index 000000000..344170ff3 --- /dev/null +++ b/integration_test/templates/functions/src/v2/pubsub-tests.ts.hbs @@ -0,0 +1,30 @@ +import * as admin from "firebase-admin"; +import { onMessagePublished } from "firebase-functions/v2/pubsub"; +import { sanitizeData } from "../utils"; + +const REGION = "{{region}}"; + +{{#each functions}} +{{#if (eq trigger "onMessagePublished")}} +export const {{name}}{{../testRunId}} = onMessagePublished({ + topic: "{{topic}}", + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + const message = event.data.message; + const testId = (message.json as { testId?: string })?.testId; + + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set( + sanitizeData({ + ...event, + message: JSON.stringify(message), + }) + ); +}); +{{/if}} + +{{/each}} \ No newline at end of file diff --git a/integration_test/templates/functions/src/v2/remoteconfig-tests.ts.hbs b/integration_test/templates/functions/src/v2/remoteconfig-tests.ts.hbs new file mode 100644 index 000000000..16f79bf3e --- /dev/null +++ b/integration_test/templates/functions/src/v2/remoteconfig-tests.ts.hbs @@ -0,0 +1,27 @@ +import * as admin from "firebase-admin"; +import { onConfigUpdated } from "firebase-functions/v2/remoteConfig"; + +const REGION = "{{region}}"; + +{{#each functions}} +{{#if (eq trigger "onConfigUpdated")}} +export const {{name}}{{../testRunId}} = onConfigUpdated({ + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + const testId = event.data.description; + + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set({ + testId, + type: event.type, + id: event.id, + time: event.time, + }); +}); +{{/if}} + +{{/each}} \ No newline at end of file diff --git a/integration_test/templates/functions/src/v2/scheduler-tests.ts.hbs b/integration_test/templates/functions/src/v2/scheduler-tests.ts.hbs new file mode 100644 index 000000000..c614ef261 --- /dev/null +++ b/integration_test/templates/functions/src/v2/scheduler-tests.ts.hbs @@ -0,0 +1,30 @@ +import * as admin from "firebase-admin"; +import * as functions from "firebase-functions"; +import { onSchedule } from "firebase-functions/v2/scheduler"; + +const REGION = "{{region}}"; + +{{#each functions}} +{{#if (eq trigger "onSchedule")}} +export const {{name}}{{../testRunId}} = onSchedule({ + schedule: "{{schedule}}", + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + const testId = event.jobName; + if (!testId) { + functions.logger.error("TestId not found for scheduled function execution"); + return; + } + + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set({ success: true }); + + return; +}); +{{/if}} + +{{/each}} \ No newline at end of file diff --git a/integration_test/templates/functions/src/v2/storage-tests.ts.hbs b/integration_test/templates/functions/src/v2/storage-tests.ts.hbs new file mode 100644 index 000000000..3171f621d --- /dev/null +++ b/integration_test/templates/functions/src/v2/storage-tests.ts.hbs @@ -0,0 +1,68 @@ +import * as admin from "firebase-admin"; +import { onObjectFinalized, onObjectDeleted, onObjectMetadataUpdated } from "firebase-functions/v2/storage"; +import { sanitizeData } from "../utils"; + +const REGION = "{{region}}"; + +{{#each functions}} +{{#if (eq trigger "onObjectFinalized")}} +export const {{name}}{{../testRunId}} = onObjectFinalized({ + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + const name = event.data.name; + if (!name || typeof name !== "string") { + console.error("Invalid name property for storage object finalized"); + return; + } + const testId = name.split(".")[0]; + + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set(sanitizeData(event)); +}); +{{/if}} + +{{#if (eq trigger "onObjectDeleted")}} +export const {{name}}{{../testRunId}} = onObjectDeleted({ + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + const name = event.data.name; + if (!name || typeof name !== "string") { + console.error("Invalid name property for storage object deleted"); + return; + } + const testId = name.split(".")[0]; + + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set(sanitizeData(event)); +}); +{{/if}} + +{{#if (eq trigger "onObjectMetadataUpdated")}} +export const {{name}}{{../testRunId}} = onObjectMetadataUpdated({ + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + const name = event.data.name; + if (!name || typeof name !== "string") { + console.error("Invalid name property for storage object metadata updated"); + return; + } + const testId = name.split(".")[0]; + + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set(sanitizeData(event)); +}); +{{/if}} + +{{/each}} \ No newline at end of file diff --git a/integration_test/templates/functions/src/v2/tasks-tests.ts.hbs b/integration_test/templates/functions/src/v2/tasks-tests.ts.hbs new file mode 100644 index 000000000..1e095bfa9 --- /dev/null +++ b/integration_test/templates/functions/src/v2/tasks-tests.ts.hbs @@ -0,0 +1,28 @@ +import * as admin from "firebase-admin"; +import { onTaskDispatched } from "firebase-functions/v2/tasks"; +import { sanitizeData } from "../utils"; + +const REGION = "{{region}}"; + +{{#each functions}} +{{#if (eq trigger "onTaskDispatched")}} +export const {{name}}{{../testRunId}} = onTaskDispatched({ + region: REGION, + timeoutSeconds: {{timeout}} +}, async (req) => { + const data = req.data; + if (!data || typeof data !== "object" || !("testId" in data)) { + console.error("Invalid data structure for tasks onTaskDispatched"); + return; + } + const testId = (data as { testId: string }).testId; + + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set(sanitizeData(req)); +}); +{{/if}} + +{{/each}} \ No newline at end of file diff --git a/integration_test/templates/functions/src/v2/testlab-tests.ts.hbs b/integration_test/templates/functions/src/v2/testlab-tests.ts.hbs new file mode 100644 index 000000000..1d3878a31 --- /dev/null +++ b/integration_test/templates/functions/src/v2/testlab-tests.ts.hbs @@ -0,0 +1,33 @@ +import * as admin from "firebase-admin"; +import * as functions from "firebase-functions"; +import { onTestMatrixCompleted } from "firebase-functions/v2/testLab"; + +const REGION = "{{region}}"; + +{{#each functions}} +{{#if (eq trigger "onTestMatrixCompleted")}} +export const {{name}}{{../testRunId}} = onTestMatrixCompleted({ + region: REGION, + timeoutSeconds: {{timeout}} +}, async (event) => { + const testId = event.data.clientInfo?.details?.testId; + if (!testId) { + functions.logger.error("TestId not found for test matrix completion"); + return; + } + + await admin + .firestore() + .collection("{{collection}}") + .doc(testId) + .set({ + testId, + type: event.type, + id: event.id, + time: event.time, + state: event.data.state, + }); +}); +{{/if}} + +{{/each}} \ No newline at end of file diff --git a/integration_test/functions/tsconfig.json b/integration_test/templates/functions/tsconfig.json.hbs similarity index 59% rename from integration_test/functions/tsconfig.json rename to integration_test/templates/functions/tsconfig.json.hbs index 77fb279d5..691231e87 100644 --- a/integration_test/functions/tsconfig.json +++ b/integration_test/templates/functions/tsconfig.json.hbs @@ -6,7 +6,9 @@ "noImplicitAny": false, "outDir": "lib", "declaration": true, - "typeRoots": ["node_modules/@types"] + "typeRoots": ["node_modules/@types"], + "skipLibCheck": true }, - "files": ["src/index.ts"] -} + "include": ["src/**/*"], + "exclude": ["node_modules"] +} \ No newline at end of file diff --git a/integration_test/tests/firebaseClientConfig.ts b/integration_test/tests/firebaseClientConfig.ts new file mode 100644 index 000000000..22b6fcdff --- /dev/null +++ b/integration_test/tests/firebaseClientConfig.ts @@ -0,0 +1,39 @@ +/** + * Firebase Client SDK Configuration for Integration Tests + * + * This configuration is safe to expose publicly as Firebase client SDK + * configuration is designed to be public. Security comes from Firebase + * Security Rules, not config secrecy. + */ + +export const FIREBASE_CLIENT_CONFIG = { + apiKey: "AIzaSyC1r437iUdYU33ecAdS3oUIF--cW8uk7Ek", + authDomain: "functions-integration-tests.firebaseapp.com", + databaseURL: "https://functions-integration-tests-default-rtdb.firebaseio.com", + projectId: "functions-integration-tests", + storageBucket: "functions-integration-tests.firebasestorage.app", + messagingSenderId: "488933414559", + appId: "1:488933414559:web:a64ddadca1b4ef4d40b4aa", + measurementId: "G-DS379RHF58", +}; + +export const FIREBASE_V2_CLIENT_CONFIG = { + apiKey: "AIzaSyCuJHyzpwIkQbxvJdKAzXg3sHUBOcTmsTI", + authDomain: "functions-integration-tests-v2.firebaseapp.com", + projectId: "functions-integration-tests-v2", + storageBucket: "functions-integration-tests-v2.firebasestorage.app", + messagingSenderId: "404926458259", + appId: "1:404926458259:web:eaab8474bc5a6833c66066", + measurementId: "G-D64JVJJSX7", +}; + +/** + * Get Firebase client config for a specific project + * Falls back to default config if project-specific config not found + */ +export function getFirebaseClientConfig(projectId?: string) { + if (projectId === "functions-integration-tests-v2") { + return FIREBASE_V2_CLIENT_CONFIG; + } + return FIREBASE_CLIENT_CONFIG; +} diff --git a/integration_test/tests/firebaseSetup.ts b/integration_test/tests/firebaseSetup.ts new file mode 100644 index 000000000..c126185e8 --- /dev/null +++ b/integration_test/tests/firebaseSetup.ts @@ -0,0 +1,52 @@ +import * as admin from "firebase-admin"; + +/** + * Initializes Firebase Admin SDK with project-specific configuration. + */ +export function initializeFirebase(): admin.app.App { + if (admin.apps.length === 0) { + try { + const projectId = process.env.PROJECT_ID || "functions-integration-tests"; + + // Set project-specific URLs based on projectId + let databaseURL; + let storageBucket; + + if (projectId === "functions-integration-tests-v2") { + // Configuration for v2 project + databaseURL = process.env.DATABASE_URL || + "https://functions-integration-tests-v2-default-rtdb.firebaseio.com/"; + storageBucket = process.env.STORAGE_BUCKET || + "gs://functions-integration-tests-v2.firebasestorage.app"; + } else { + // Default configuration for main project + databaseURL = process.env.DATABASE_URL || + "https://functions-integration-tests-default-rtdb.firebaseio.com/"; + storageBucket = process.env.STORAGE_BUCKET || + "gs://functions-integration-tests.firebasestorage.app"; + } + + // Check if we're in Cloud Build (ADC available) or local (need service account file) + let credential; + if (process.env.GOOGLE_APPLICATION_CREDENTIALS && process.env.GOOGLE_APPLICATION_CREDENTIALS !== '{}') { + // Use service account file if specified and not a dummy file + const serviceAccountPath = process.env.GOOGLE_APPLICATION_CREDENTIALS; + credential = admin.credential.cert(serviceAccountPath); + } else { + // Use Application Default Credentials (for Cloud Build) + credential = admin.credential.applicationDefault(); + } + + return admin.initializeApp({ + credential: credential, + databaseURL: databaseURL, + storageBucket: storageBucket, + projectId: projectId, + }); + } catch (error) { + console.error("Error initializing Firebase:", error); + console.error("PROJECT_ID:", process.env.PROJECT_ID); + } + } + return admin.app(); +} diff --git a/integration_test/tests/utils.ts b/integration_test/tests/utils.ts new file mode 100644 index 000000000..5a544aa39 --- /dev/null +++ b/integration_test/tests/utils.ts @@ -0,0 +1,191 @@ +import { CloudTasksClient } from "@google-cloud/tasks"; +import * as admin from "firebase-admin"; + +export const timeout = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); + +type RetryOptions = { maxRetries?: number; checkForUndefined?: boolean }; + +/** + * @template T + * @param {() => Promise} fn + * @param {RetryOptions | undefined} [options={ maxRetries: 10, checkForUndefined: true }] + * + * @returns {Promise} + */ +export async function retry(fn: () => Promise, options?: RetryOptions): Promise { + let count = 0; + let lastError: Error | undefined; + const { maxRetries = 20, checkForUndefined = true } = options ?? {}; + let result: Awaited | null = null; + + while (count < maxRetries) { + try { + result = await fn(); + if (!checkForUndefined || result) { + return result; + } + } catch (e) { + lastError = e as Error; + } + await timeout(5000); + count++; + } + + if (lastError) { + throw lastError; + } + + throw new Error(`Max retries exceeded: result = ${result}`); +} + +export async function createTask( + project: string, + queue: string, + location: string, + url: string, + payload: Record +): Promise { + const client = new CloudTasksClient(); + const parent = client.queuePath(project, location, queue); + + // Try to get service account email from various sources + let serviceAccountEmail: string; + + // First, check if we have a service account file + const serviceAccountPath = process.env.GOOGLE_APPLICATION_CREDENTIALS; + if (serviceAccountPath && serviceAccountPath !== '{}') { + try { + const serviceAccount = await import(serviceAccountPath); + serviceAccountEmail = serviceAccount.client_email; + } catch (e) { + // Fall back to using project default service account + serviceAccountEmail = `${project}@appspot.gserviceaccount.com`; + } + } else { + // Use project's default App Engine service account when using ADC + // This is what Cloud Build and other Google Cloud services will use + serviceAccountEmail = `${project}@appspot.gserviceaccount.com`; + } + + const task = { + httpRequest: { + httpMethod: "POST" as const, + url, + oidcToken: { + serviceAccountEmail, + }, + headers: { + "Content-Type": "application/json", + }, + body: Buffer.from(JSON.stringify(payload)).toString("base64"), + }, + }; + + const [response] = await client.createTask({ parent, task }); + if (!response) { + throw new Error("Unable to create task"); + } + return response.name || ""; +} + +// TestLab utilities +const TESTING_API_SERVICE_NAME = "testing.googleapis.com"; + +interface AndroidDevice { + androidModelId: string; + androidVersionId: string; + locale: string; + orientation: string; +} + +export async function startTestRun(projectId: string, testId: string, accessToken: string) { + const device = await fetchDefaultDevice(accessToken); + return await createTestMatrix(accessToken, projectId, testId, device); +} + +async function fetchDefaultDevice(accessToken: string): Promise { + const resp = await fetch( + `https://${TESTING_API_SERVICE_NAME}/v1/testEnvironmentCatalog/androidDeviceCatalog`, + { + headers: { + Authorization: `Bearer ${accessToken}`, + }, + } + ); + if (!resp.ok) { + throw new Error(resp.statusText); + } + const data = (await resp.json()) as any; + const models = data?.androidDeviceCatalog?.models || []; + const defaultModels = models.filter( + (m: any) => + m.tags !== undefined && + m.tags.indexOf("default") > -1 && + m.supportedVersionIds !== undefined && + m.supportedVersionIds.length > 0 + ); + + if (defaultModels.length === 0) { + throw new Error("No default device found"); + } + + const model = defaultModels[0]; + const versions = model.supportedVersionIds; + + return { + androidModelId: model.id, + androidVersionId: versions[versions.length - 1], + locale: "en", + orientation: "portrait", + }; +} + +async function createTestMatrix( + accessToken: string, + projectId: string, + testId: string, + device: AndroidDevice +): Promise { + const body = { + projectId, + testSpecification: { + androidRoboTest: { + appApk: { + gcsPath: "gs://path/to/non-existing-app.apk", + }, + }, + }, + environmentMatrix: { + androidDeviceList: { + androidDevices: [device], + }, + }, + resultStorage: { + googleCloudStorage: { + gcsPath: "gs://" + admin.storage().bucket().name, + }, + }, + clientInfo: { + name: "CloudFunctionsSDKIntegrationTest", + clientInfoDetails: { + key: "testId", + value: testId, + }, + }, + }; + const resp = await fetch( + `https://${TESTING_API_SERVICE_NAME}/v1/projects/${projectId}/testMatrices`, + { + method: "POST", + headers: { + Authorization: `Bearer ${accessToken}`, + "Content-Type": "application/json", + }, + body: JSON.stringify(body), + } + ); + if (!resp.ok) { + throw new Error(resp.statusText); + } + return; +} diff --git a/integration_test/tests/v1/auth.test.ts b/integration_test/tests/v1/auth.test.ts new file mode 100644 index 000000000..8ed0bb003 --- /dev/null +++ b/integration_test/tests/v1/auth.test.ts @@ -0,0 +1,273 @@ +import * as admin from "firebase-admin"; +import { initializeApp } from "firebase/app"; +import { + createUserWithEmailAndPassword, + signInWithEmailAndPassword, + getAuth, + UserCredential, +} from "firebase/auth"; +import { initializeFirebase } from "../firebaseSetup"; +import { retry } from "../utils"; +import { getFirebaseClientConfig } from "../firebaseClientConfig"; + +describe("Firebase Auth (v1)", () => { + const userIds: string[] = []; + const projectId = process.env.PROJECT_ID || "functions-integration-tests"; + const testId = process.env.TEST_RUN_ID; + const deployedFunctions = process.env.DEPLOYED_FUNCTIONS?.split(",") || []; + + if (!testId) { + throw new Error("Environment configured incorrectly."); + } + + // Use hardcoded Firebase client config (safe to expose publicly) + const config = getFirebaseClientConfig(projectId); + + const app = initializeApp(config); + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + for (const userId of userIds) { + await admin.firestore().collection("userProfiles").doc(userId).delete(); + await admin.firestore().collection("authUserOnCreateTests").doc(userId).delete(); + await admin.firestore().collection("authUserOnDeleteTests").doc(userId).delete(); + await admin.firestore().collection("authBeforeCreateTests").doc(userId).delete(); + await admin.firestore().collection("authBeforeSignInTests").doc(userId).delete(); + } + }); + + // Only run onCreate tests if the onCreate function is deployed + if (deployedFunctions.includes("onCreate")) { + describe("user onCreate trigger", () => { + let userRecord: admin.auth.UserRecord; + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + userRecord = await admin.auth().createUser({ + email: `${testId}@fake-create.com`, + password: "secret", + displayName: `${testId}`, + }); + + loggedContext = await retry(() => + admin + .firestore() + .collection("authUserOnCreateTests") + .doc(userRecord.uid) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + + userIds.push(userRecord.uid); + }); + + afterAll(async () => { + await admin.auth().deleteUser(userRecord.uid); + }); + + it("should perform expected actions", async () => { + const userProfile = await admin + .firestore() + .collection("userProfiles") + .doc(userRecord.uid) + .get(); + expect(userProfile.exists).toBeTruthy(); + }); + + it("should have a project as resource", () => { + expect(loggedContext?.resource.name).toMatch(`projects/${projectId}`); + }); + + it("should not have a path", () => { + expect(loggedContext?.path).toBeUndefined(); + }); + + it("should have the correct eventType", () => { + expect(loggedContext?.eventType).toEqual("google.firebase.auth.user.create"); + }); + + it("should have an eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have a timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + + it("should not have auth", () => { + expect(loggedContext?.auth).toBeUndefined(); + }); + + it("should not have an action", () => { + expect(loggedContext?.action).toBeUndefined(); + }); + }); + } else { + describe.skip("user onCreate trigger - function not deployed", () => {}); + } + + // Only run onDelete tests if the onDelete function is deployed + if (deployedFunctions.includes("onDelete")) { + describe("user onDelete trigger", () => { + let userRecord: admin.auth.UserRecord; + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + userRecord = await admin.auth().createUser({ + email: `${testId}@fake-delete.com`, + password: "secret", + displayName: testId, + }); + userIds.push(userRecord.uid); + + await admin.auth().deleteUser(userRecord.uid); + + loggedContext = await retry(() => + admin + .firestore() + .collection("authUserOnDeleteTests") + .doc(userRecord.uid) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + it("should have the correct eventType", () => { + expect(loggedContext?.eventType).toEqual("google.firebase.auth.user.delete"); + }); + + it("should have an eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have a timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + }); + } else { + describe.skip("user onDelete trigger - function not deployed", () => {}); + } + + describe("blocking beforeCreate function", () => { + let userCredential: UserCredential; + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + if (!deployedFunctions.includes("beforeCreate")) { + console.log("⏭️ Skipping beforeCreate tests - function not deployed in this suite"); + return; + } + + const auth = getAuth(app); + userCredential = await createUserWithEmailAndPassword( + auth, + `${testId}@beforecreate.com`, + "secret123" + ); + userIds.push(userCredential.user.uid); + + loggedContext = await retry(() => + admin + .firestore() + .collection("authBeforeCreateTests") + .doc(userCredential.user.uid) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + afterAll(async () => { + if (userCredential?.user?.uid) { + await admin.auth().deleteUser(userCredential.user.uid); + } + }); + + if (deployedFunctions.includes("beforeCreate")) { + it("should have the correct eventType", () => { + // beforeCreate eventType can include the auth method (e.g., :password, :oauth, etc.) + expect(loggedContext?.eventType).toMatch( + /^providers\/cloud\.auth\/eventTypes\/user\.beforeCreate/ + ); + }); + + it("should have an eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have a timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + } else { + it.skip("should have the correct eventType - beforeCreate function not deployed", () => {}); + it.skip("should have an eventId - beforeCreate function not deployed", () => {}); + it.skip("should have a timestamp - beforeCreate function not deployed", () => {}); + } + }); + + describe("blocking beforeSignIn function", () => { + let userRecord: admin.auth.UserRecord; + let userCredential: UserCredential; + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + if (!deployedFunctions.includes("beforeSignIn")) { + console.log("⏭️ Skipping beforeSignIn tests - function not deployed in this suite"); + return; + } + + userRecord = await admin.auth().createUser({ + email: `${testId}@beforesignin.com`, + password: "secret456", + displayName: testId, + }); + userIds.push(userRecord.uid); + + const auth = getAuth(app); + // Fix: Use signInWithEmailAndPassword instead of createUserWithEmailAndPassword + userCredential = await signInWithEmailAndPassword( + auth, + `${testId}@beforesignin.com`, + "secret456" + ); + + loggedContext = await retry(() => + admin + .firestore() + .collection("authBeforeSignInTests") + .doc(userRecord.uid) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + afterAll(async () => { + if (userRecord?.uid) { + await admin.auth().deleteUser(userRecord.uid); + } + }); + + if (deployedFunctions.includes("beforeSignIn")) { + it("should have the correct eventType", () => { + // beforeSignIn eventType can include the auth method (e.g., :password, :oauth, etc.) + expect(loggedContext?.eventType).toMatch( + /^providers\/cloud\.auth\/eventTypes\/user\.beforeSignIn/ + ); + }); + + it("should have an eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have a timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + } else { + it.skip("should have the correct eventType - beforeSignIn function not deployed", () => {}); + it.skip("should have an eventId - beforeSignIn function not deployed", () => {}); + it.skip("should have a timestamp - beforeSignIn function not deployed", () => {}); + } + }); +}); diff --git a/integration_test/tests/v1/database.test.ts b/integration_test/tests/v1/database.test.ts new file mode 100644 index 000000000..113b48bcf --- /dev/null +++ b/integration_test/tests/v1/database.test.ts @@ -0,0 +1,304 @@ +import * as admin from "firebase-admin"; +import { retry } from "../utils"; +import { initializeFirebase } from "../firebaseSetup"; +import { Reference } from "@firebase/database-types"; + +describe("Firebase Database (v1)", () => { + const projectId = process.env.PROJECT_ID; + const testId = process.env.TEST_RUN_ID; + + if (!testId || !projectId) { + throw new Error("Environment configured incorrectly."); + } + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + await admin.firestore().collection("databaseRefOnCreateTests").doc(testId).delete(); + await admin.firestore().collection("databaseRefOnDeleteTests").doc(testId).delete(); + await admin.firestore().collection("databaseRefOnUpdateTests").doc(testId).delete(); + await admin.firestore().collection("databaseRefOnWriteTests").doc(testId).delete(); + }); + + async function setupRef(refPath: string) { + const ref = admin.database().ref(refPath); + await ref.set({ ".sv": "timestamp" }); + return ref; + } + + async function teardownRef(ref: Reference) { + if (ref) { + try { + await ref.remove(); + } catch (err) { + console.error("Teardown error", err); + } + } + } + + async function getLoggedContext(collectionName: string, testId: string) { + return await admin + .firestore() + .collection(collectionName) + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()); + } + + describe("ref onCreate trigger", () => { + let ref: Reference; + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + ref = await setupRef(`dbTests/${testId}/start`); + loggedContext = await retry(() => getLoggedContext("databaseRefOnCreateTests", testId)); + }); + + afterAll(async () => { + await teardownRef(ref); + }); + + it("should not have event.app", () => { + expect(loggedContext?.app).toBeUndefined(); + }); + + it("should give refs access to admin data", async () => { + await ref.parent?.child("adminOnly").update({ allowed: 1 }); + + const adminDataSnapshot = await ref.parent?.child("adminOnly").once("value"); + const adminData = adminDataSnapshot?.val(); + + expect(adminData).toEqual({ allowed: 1 }); + }); + + it("should have a correct ref url", () => { + expect(loggedContext?.url).toMatch( + new RegExp(`^https://${projectId}(-default-rtdb)*.firebaseio.com/dbTests/${testId}/start$`) + ); + }); + + it("should have refs resources", () => { + expect(loggedContext?.resource.name).toMatch( + new RegExp( + `^projects/_/instances/${projectId}(-default-rtdb)*/refs/dbTests/${testId}/start` + ) + ); + }); + + it("should not include path", () => { + expect(loggedContext?.path).toBeUndefined(); + }); + + it("should have the right eventType", () => { + expect(loggedContext?.eventType).toEqual("google.firebase.database.ref.create"); + }); + + it("should have eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + + it("should not have action", () => { + expect(loggedContext?.action).toBeUndefined(); + }); + + it("should have admin authType", () => { + expect(loggedContext?.authType).toEqual("ADMIN"); + }); + }); + + describe("ref onDelete trigger", () => { + let ref: Reference; + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + ref = await setupRef(`dbTests/${testId}/start`); + await ref.remove(); + loggedContext = await retry(() => getLoggedContext("databaseRefOnDeleteTests", testId)); + }); + + it("should not have event.app", () => { + expect(loggedContext?.app).toBeUndefined(); + }); + + it("should have a correct ref url", () => { + expect(loggedContext?.url).toMatch( + new RegExp(`^https://${projectId}(-default-rtdb)*.firebaseio.com/dbTests/${testId}/start$`) + ); + }); + + it("should have refs resources", () => { + expect(loggedContext?.resource.name).toMatch( + new RegExp( + `^projects/_/instances/${projectId}(-default-rtdb)*/refs/dbTests/${testId}/start$` + ) + ); + }); + + it("should not include path", () => { + expect(loggedContext?.path).toBeUndefined(); + }); + + it("should have the right eventType", () => { + expect(loggedContext?.eventType).toEqual("google.firebase.database.ref.delete"); + }); + + it("should have eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + + it("should not have action", () => { + expect(loggedContext?.action).toBeUndefined(); + }); + + it("should have admin authType", () => { + expect(loggedContext?.authType).toEqual("ADMIN"); + }); + }); + + describe("ref onUpdate trigger", () => { + let ref: Reference; + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + ref = await setupRef(`dbTests/${testId}/start`); + await ref.update({ updated: true }); + loggedContext = await retry(() => getLoggedContext("databaseRefOnUpdateTests", testId)); + }); + + afterAll(async () => { + await teardownRef(ref); + }); + + it("should not have event.app", () => { + expect(loggedContext?.app).toBeUndefined(); + }); + + it("should give refs access to admin data", async () => { + await ref.parent?.child("adminOnly").update({ allowed: 1 }); + + const adminDataSnapshot = await ref.parent?.child("adminOnly").once("value"); + const adminData = adminDataSnapshot?.val(); + + expect(adminData).toEqual({ allowed: 1 }); + }); + + it("should have a correct ref url", () => { + expect(loggedContext?.url).toMatch( + new RegExp(`^https://${projectId}(-default-rtdb)*.firebaseio.com/dbTests/${testId}/start$`) + ); + }); + + it("should have refs resources", () => { + expect(loggedContext?.resource.name).toMatch( + new RegExp( + `^projects/_/instances/${projectId}(-default-rtdb)*/refs/dbTests/${testId}/start$` + ) + ); + }); + + it("should not include path", () => { + expect(loggedContext?.path).toBeUndefined(); + }); + + it("should have the right eventType", () => { + expect(loggedContext?.eventType).toEqual("google.firebase.database.ref.update"); + }); + + it("should have eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + + it("should not have action", () => { + expect(loggedContext?.action).toBeUndefined(); + }); + + it("should have admin authType", () => { + expect(loggedContext?.authType).toEqual("ADMIN"); + }); + + it("should log onUpdate event with updated data", () => { + const parsedData = JSON.parse(loggedContext?.data ?? "{}"); + expect(parsedData).toEqual({ updated: true }); + }); + }); + + describe("ref onWrite trigger", () => { + let ref: Reference; + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + ref = await setupRef(`dbTests/${testId}/start`); + + loggedContext = await retry(() => getLoggedContext("databaseRefOnWriteTests", testId)); + }); + + afterAll(async () => { + await teardownRef(ref); + }); + + it("should not have event.app", () => { + expect(loggedContext?.app).toBeUndefined(); + }); + + it("should give refs access to admin data", async () => { + await ref.parent?.child("adminOnly").update({ allowed: 1 }); + + const adminDataSnapshot = await ref.parent?.child("adminOnly").once("value"); + const adminData = adminDataSnapshot?.val(); + + expect(adminData).toEqual({ allowed: 1 }); + }); + + it("should have a correct ref url", () => { + expect(loggedContext?.url).toMatch( + new RegExp(`^https://${projectId}(-default-rtdb)*.firebaseio.com/dbTests/${testId}/start$`) + ); + }); + + it("should have refs resources", () => { + expect(loggedContext?.resource.name).toMatch( + new RegExp( + `^projects/_/instances/${projectId}(-default-rtdb)*/refs/dbTests/${testId}/start$` + ) + ); + }); + + it("should not include path", () => { + expect(loggedContext?.path).toBeUndefined(); + }); + + it("should have the right eventType", () => { + expect(loggedContext?.eventType).toEqual("google.firebase.database.ref.write"); + }); + + it("should have eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + + it("should not have action", () => { + expect(loggedContext?.action).toBeUndefined(); + }); + + it("should have admin authType", () => { + expect(loggedContext?.authType).toEqual("ADMIN"); + }); + }); +}); \ No newline at end of file diff --git a/integration_test/tests/v1/firestore.test.ts b/integration_test/tests/v1/firestore.test.ts new file mode 100644 index 000000000..104ff3552 --- /dev/null +++ b/integration_test/tests/v1/firestore.test.ts @@ -0,0 +1,247 @@ +import * as admin from "firebase-admin"; +import { initializeFirebase } from "../firebaseSetup"; +import { retry } from "../utils"; + +describe("Cloud Firestore (v1)", () => { + const projectId = process.env.PROJECT_ID; + const testId = process.env.TEST_RUN_ID; + + if (!testId || !projectId) { + throw new Error("Environment configured incorrectly."); + } + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + await admin.firestore().collection("firestoreDocumentOnCreateTests").doc(testId).delete(); + await admin.firestore().collection("firestoreDocumentOnDeleteTests").doc(testId).delete(); + await admin.firestore().collection("firestoreDocumentOnUpdateTests").doc(testId).delete(); + await admin.firestore().collection("firestoreDocumentOnWriteTests").doc(testId).delete(); + }); + + describe("Document onCreate trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + let dataSnapshot: admin.firestore.DocumentSnapshot; + let docRef: admin.firestore.DocumentReference; + + beforeAll(async () => { + docRef = admin.firestore().collection("tests").doc(testId); + await docRef.set({ test: testId }); + dataSnapshot = await docRef.get(); + + loggedContext = await retry(() => + admin + .firestore() + .collection("firestoreDocumentOnCreateTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + afterAll(async () => { + await admin.firestore().collection("tests").doc(testId).delete(); + }); + + it("should not have event.app", () => { + expect(loggedContext?.app).toBeUndefined(); + }); + + it("should give refs access to admin data", async () => { + const result = await docRef.set({ allowed: 1 }, { merge: true }); + expect(result).toBeTruthy(); + }); + + it("should have well-formed resource", () => { + expect(loggedContext?.resource.name).toMatch( + `projects/${projectId}/databases/(default)/documents/tests/${testId}` + ); + }); + + it("should have the correct eventType", () => { + expect(loggedContext?.eventType).toEqual("google.firestore.document.create"); + }); + + it("should have an eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have a timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + + it("should have the correct data", () => { + expect(dataSnapshot.data()).toEqual({ test: testId }); + }); + }); + + describe("Document onDelete trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + let dataSnapshot: admin.firestore.DocumentSnapshot; + let docRef: admin.firestore.DocumentReference; + + beforeAll(async () => { + docRef = admin.firestore().collection("tests").doc(testId); + await docRef.set({ test: testId }); + dataSnapshot = await docRef.get(); + + await docRef.delete(); + + // Refresh snapshot + dataSnapshot = await docRef.get(); + + loggedContext = await retry(() => + admin + .firestore() + .collection("firestoreDocumentOnDeleteTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + afterAll(async () => { + await admin.firestore().collection("tests").doc(testId).delete(); + }); + + it("should not have event.app", () => { + expect(loggedContext?.app).toBeUndefined(); + }); + + it("should have well-formed resource", () => { + expect(loggedContext?.resource.name).toMatch( + `projects/${projectId}/databases/(default)/documents/tests/${testId}` + ); + }); + + it("should have the correct eventType", () => { + expect(loggedContext?.eventType).toEqual("google.firestore.document.delete"); + }); + + it("should have an eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have a timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + + it("should not have the data", () => { + expect(dataSnapshot.data()).toBeUndefined(); + }); + }); + + describe("Document onUpdate trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + let dataSnapshot: admin.firestore.DocumentSnapshot; + let docRef: admin.firestore.DocumentReference; + + beforeAll(async () => { + docRef = admin.firestore().collection("tests").doc(testId); + await docRef.set({}); + dataSnapshot = await docRef.get(); + + await docRef.update({ test: testId }); + + // Refresh snapshot + dataSnapshot = await docRef.get(); + + loggedContext = await retry(() => + admin + .firestore() + .collection("firestoreDocumentOnUpdateTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + afterAll(async () => { + await admin.firestore().collection("tests").doc(testId).delete(); + }); + + it("should not have event.app", () => { + expect(loggedContext?.app).toBeUndefined(); + }); + + it("should have well-formed resource", () => { + expect(loggedContext?.resource.name).toMatch( + `projects/${projectId}/databases/(default)/documents/tests/${testId}` + ); + }); + + it("should have the correct eventType", () => { + expect(loggedContext?.eventType).toEqual("google.firestore.document.update"); + }); + + it("should have an eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have a timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + + it("should not have the data", () => { + expect(dataSnapshot.data()).toStrictEqual({ test: testId }); + }); + }); + + describe("Document onWrite trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + let dataSnapshot: admin.firestore.DocumentSnapshot; + let docRef: admin.firestore.DocumentReference; + + beforeAll(async () => { + docRef = admin.firestore().collection("tests").doc(testId); + await docRef.set({ test: testId }); + dataSnapshot = await docRef.get(); + + loggedContext = await retry(() => + admin + .firestore() + .collection("firestoreDocumentOnWriteTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + afterAll(async () => { + await admin.firestore().collection("tests").doc(testId).delete(); + }); + + it("should not have event.app", () => { + expect(loggedContext?.app).toBeUndefined(); + }); + + it("should give refs access to admin data", async () => { + const result = await docRef.set({ allowed: 1 }, { merge: true }); + expect(result).toBeTruthy(); + }); + + it("should have well-formed resource", () => { + expect(loggedContext?.resource.name).toMatch( + `projects/${projectId}/databases/(default)/documents/tests/${testId}` + ); + }); + + it("should have the correct eventType", () => { + expect(loggedContext?.eventType).toEqual("google.firestore.document.write"); + }); + + it("should have an eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have a timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + + it("should have the correct data", () => { + expect(dataSnapshot.data()).toEqual({ test: testId }); + }); + }); +}); diff --git a/integration_test/tests/v1/pubsub.test.ts b/integration_test/tests/v1/pubsub.test.ts new file mode 100644 index 000000000..b453f114b --- /dev/null +++ b/integration_test/tests/v1/pubsub.test.ts @@ -0,0 +1,147 @@ +import { PubSub } from "@google-cloud/pubsub"; +import * as admin from "firebase-admin"; +import { initializeFirebase } from "../firebaseSetup"; +import { retry } from "../utils"; + +describe("Pub/Sub (v1)", () => { + const projectId = process.env.PROJECT_ID; + const testId = process.env.TEST_RUN_ID; + const region = process.env.REGION || "us-central1"; + const serviceAccountPath = process.env.GOOGLE_APPLICATION_CREDENTIALS; + const topicName = `firebase-schedule-pubsubScheduleTests${testId}-${region}`; + + if (!testId || !projectId) { + throw new Error("Environment configured incorrectly."); + } + + if (!serviceAccountPath) { + console.warn("GOOGLE_APPLICATION_CREDENTIALS not set, skipping Pub/Sub tests"); + describe.skip("Pub/Sub (v1)", () => { + it("skipped due to missing credentials", () => { + expect(true).toBe(true); // Placeholder assertion + }); + }); + return; + } + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + await admin.firestore().collection("pubsubOnPublishTests").doc(testId).delete(); + await admin.firestore().collection("pubsubScheduleTests").doc(topicName).delete(); + }); + + describe("onPublish trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + const serviceAccount = await import(serviceAccountPath); + const topic = new PubSub({ + credentials: serviceAccount.default, + projectId, + }).topic("pubsubTests"); + + await topic.publish(Buffer.from(JSON.stringify({ testId }))); + + loggedContext = await retry(() => + admin + .firestore() + .collection("pubsubOnPublishTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + it("should have a topic as resource", () => { + expect(loggedContext?.resource.name).toEqual( + `projects/${projectId}/topics/pubsubTests` + ); + }); + + it("should not have a path", () => { + expect(loggedContext?.path).toBeUndefined(); + }); + + it("should have the correct eventType", () => { + expect(loggedContext?.eventType).toEqual("google.pubsub.topic.publish"); + }); + + it("should have an eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + + it("should not have action", () => { + expect(loggedContext?.action).toBeUndefined(); + }); + + it("should have admin auth", () => { + expect(loggedContext?.auth).toBeUndefined(); + }); + + it("should have pubsub data", () => { + const decodedMessage = JSON.parse(loggedContext?.message); + const decoded = Buffer.from(decodedMessage.data, "base64").toString(); + const parsed = JSON.parse(decoded); + expect(parsed.testId).toEqual(testId); + }); + }); + + describe("schedule trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + const pubsub = new PubSub(); + + // Publish a message to trigger the scheduled function + // The Cloud Scheduler will create a topic with the function name + const scheduleTopic = pubsub.topic(topicName); + + await scheduleTopic.publish(Buffer.from(JSON.stringify({ testId }))); + + loggedContext = await retry(() => + admin + .firestore() + .collection("pubsubScheduleTests") + .doc(topicName) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + it("should have correct resource name", () => { + expect(loggedContext?.resource.name).toContain("topics/"); + expect(loggedContext?.resource.name).toContain("pubsubScheduleTests"); + }); + + it("should not have a path", () => { + expect(loggedContext?.path).toBeUndefined(); + }); + + it("should have the correct eventType", () => { + expect(loggedContext?.eventType).toEqual("google.pubsub.topic.publish"); + }); + + it("should have an eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + + it("should not have action", () => { + expect(loggedContext?.action).toBeUndefined(); + }); + + it("should not have auth", () => { + expect(loggedContext?.auth).toBeUndefined(); + }); + }); +}); \ No newline at end of file diff --git a/integration_test/tests/v1/remoteConfig.test.ts b/integration_test/tests/v1/remoteConfig.test.ts new file mode 100644 index 000000000..fe90b8283 --- /dev/null +++ b/integration_test/tests/v1/remoteConfig.test.ts @@ -0,0 +1,77 @@ +import * as admin from "firebase-admin"; +import { retry } from "../utils"; +import { initializeFirebase } from "../firebaseSetup"; + +describe("Firebase Remote Config (v1)", () => { + const projectId = process.env.PROJECT_ID || "functions-integration-tests"; + const testId = process.env.TEST_RUN_ID; + + if (!testId) { + throw new Error("Environment configured incorrectly."); + } + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + await admin.firestore().collection("remoteConfigOnUpdateTests").doc(testId).delete(); + }); + + describe("onUpdate trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + try { + const accessToken = await admin.credential.applicationDefault().getAccessToken(); + const resp = await fetch( + `https://firebaseremoteconfig.googleapis.com/v1/projects/${projectId}/remoteConfig`, + { + method: "PUT", + headers: { + Authorization: `Bearer ${accessToken.access_token}`, + "Content-Type": "application/json; UTF-8", + "Accept-Encoding": "gzip", + "If-Match": "*", + }, + body: JSON.stringify({ version: { description: testId } }), + } + ); + if (!resp.ok) { + throw new Error(resp.statusText); + } + loggedContext = await retry(() => + admin + .firestore() + .collection("remoteConfigOnUpdateTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + } catch (error) { + console.warn("RemoteConfig API access failed, skipping test:", (error as Error).message); + // Skip the test suite if RemoteConfig API is not available + return; + } + }); + + it("should have refs resources", () => + expect(loggedContext?.resource.name).toMatch(`projects/${projectId}`)); + + it("should have the right eventType", () => { + expect(loggedContext?.eventType).toEqual("google.firebase.remoteconfig.update"); + }); + + it("should have eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + + it("should not have auth", () => { + expect(loggedContext?.auth).toBeUndefined(); + }); + }); +}); \ No newline at end of file diff --git a/integration_test/tests/v1/storage.test.ts b/integration_test/tests/v1/storage.test.ts new file mode 100644 index 000000000..ea7429629 --- /dev/null +++ b/integration_test/tests/v1/storage.test.ts @@ -0,0 +1,157 @@ +import * as admin from "firebase-admin"; +import { retry } from "../utils"; +import { initializeFirebase } from "../firebaseSetup"; + +async function uploadBufferToFirebase(buffer: Buffer, fileName: string) { + const bucket = admin.storage().bucket(); + + const file = bucket.file(fileName); + await file.save(buffer, { + metadata: { + contentType: "text/plain", + }, + }); +} + +describe("Firebase Storage (v1)", () => { + const testId = process.env.TEST_RUN_ID; + if (!testId) { + throw new Error("Environment configured incorrectly."); + } + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + await admin.firestore().collection("storageOnFinalizeTests").doc(testId).delete(); + // Note: onDelete tests are disabled due to bug b/372315689 + // await admin.firestore().collection("storageOnDeleteTests").doc(testId).delete(); + await admin.firestore().collection("storageOnMetadataUpdateTests").doc(testId).delete(); + }); + + describe("object onFinalize trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + const testContent = testId; + const buffer = Buffer.from(testContent, "utf-8"); + + await uploadBufferToFirebase(buffer, testId + ".txt"); + + loggedContext = await retry(() => + admin + .firestore() + .collection("storageOnFinalizeTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + afterAll(async () => { + try { + const file = admin + .storage() + .bucket() + .file(testId + ".txt"); + + const [exists] = await file.exists(); + if (exists) { + await file.delete(); + } + } catch (error) { + console.warn("Failed to clean up storage file:", (error as Error).message); + } + }); + + it("should not have event.app", () => { + expect(loggedContext?.app).toBeUndefined(); + }); + + it("should have the right eventType", () => { + expect(loggedContext?.eventType).toEqual("google.storage.object.finalize"); + }); + + it("should have eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + }); + + // Note: onDelete tests are disabled due to bug b/372315689 + // describe("object onDelete trigger", () => { + // ... + // }); + + describe("object onMetadataUpdate trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + const testContent = testId; + const buffer = Buffer.from(testContent, "utf-8"); + + await uploadBufferToFirebase(buffer, testId + ".txt"); + + // Short delay to ensure file is ready + await new Promise((resolve) => setTimeout(resolve, 3000)); + + // Update metadata to trigger the function + const file = admin + .storage() + .bucket() + .file(testId + ".txt"); + + await file.setMetadata({ + metadata: { + updated: "true", + testId: testId, + }, + }); + + loggedContext = await retry(() => + admin + .firestore() + .collection("storageOnMetadataUpdateTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + afterAll(async () => { + try { + const file = admin + .storage() + .bucket() + .file(testId + ".txt"); + + const [exists] = await file.exists(); + if (exists) { + await file.delete(); + } + } catch (error) { + console.warn("Failed to clean up storage file:", (error as Error).message); + } + }); + + it("should not have event.app", () => { + expect(loggedContext?.app).toBeUndefined(); + }); + + it("should have the right eventType", () => { + expect(loggedContext?.eventType).toEqual("google.storage.object.metadataUpdate"); + }); + + it("should have eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + }); +}); \ No newline at end of file diff --git a/integration_test/tests/v1/tasks.test.ts b/integration_test/tests/v1/tasks.test.ts new file mode 100644 index 000000000..10a7815cd --- /dev/null +++ b/integration_test/tests/v1/tasks.test.ts @@ -0,0 +1,70 @@ +import * as admin from "firebase-admin"; +import { retry, createTask } from "../utils"; +import { initializeFirebase } from "../firebaseSetup"; + +describe("Firebase Tasks (v1)", () => { + const testId = process.env.TEST_RUN_ID; + if (!testId) { + throw new Error("Environment configured incorrectly."); + } + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + await admin.firestore().collection("tasksOnDispatchTests").doc(testId).delete(); + }); + + describe("task queue onDispatch trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + // eslint-disable-next-line @typescript-eslint/no-unused-vars + let taskId: string; + + beforeAll(async () => { + // Function name becomes the queue name in v1, no separators needed + const queueName = `tasksOnDispatchTests${testId}`; + const projectId = process.env.GCLOUD_PROJECT || "functions-integration-tests"; + const region = "us-central1"; + const url = `https://${region}-${projectId}.cloudfunctions.net/${queueName}`; + + // Use Google Cloud Tasks SDK to get proper Cloud Tasks event context + taskId = await createTask(projectId, queueName, region, url, { data: { testId } }); + + loggedContext = await retry( + () => { + console.log(`🔍 Checking Firestore for document: tasksOnDispatchTests/${testId}`); + return admin + .firestore() + .collection("tasksOnDispatchTests") + .doc(testId) + .get() + .then((logSnapshot) => { + const data = logSnapshot.data(); + console.log(`📄 Firestore data:`, data); + return data; + }); + }, + { maxRetries: 30, checkForUndefined: true } + ); + }); + + it("should have correct event id", () => { + expect(loggedContext?.id).toBeDefined(); + }); + + it("should have queue name", () => { + expect(loggedContext?.queueName).toEqual(`tasksOnDispatchTests${testId}`); + }); + + it("should have retry count", () => { + expect(loggedContext?.retryCount).toBeDefined(); + expect(typeof loggedContext?.retryCount).toBe("number"); + }); + + it("should have execution count", () => { + expect(loggedContext?.executionCount).toBeDefined(); + expect(typeof loggedContext?.executionCount).toBe("number"); + }); + }); +}); diff --git a/integration_test/tests/v1/testLab.test.ts b/integration_test/tests/v1/testLab.test.ts new file mode 100644 index 000000000..b18402c3a --- /dev/null +++ b/integration_test/tests/v1/testLab.test.ts @@ -0,0 +1,53 @@ +import * as admin from "firebase-admin"; +import { retry, startTestRun } from "../utils"; +import { initializeFirebase } from "../firebaseSetup"; + +describe.skip("TestLab (v1)", () => { + const projectId = process.env.PROJECT_ID || "functions-integration-tests"; + const testId = process.env.TEST_RUN_ID || "skipped-test"; + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + await admin.firestore().collection("testLabOnCompleteTests").doc(testId).delete(); + }); + + describe("test matrix onComplete trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + try { + const accessToken = await admin.credential.applicationDefault().getAccessToken(); + await startTestRun(projectId, testId, accessToken.access_token); + + loggedContext = await retry(() => + admin + .firestore() + .collection("testLabOnCompleteTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + } catch (error) { + console.warn("TestLab API access failed, skipping test:", (error as Error).message); + // Skip the test suite if TestLab API is not available + return; + } + }); + + it("should have eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have right eventType", () => { + expect(loggedContext?.eventType).toEqual("google.testing.testMatrix.complete"); + }); + + it("should be in state 'INVALID'", () => { + const matrix = JSON.parse(loggedContext?.matrix); + expect(matrix?.state).toEqual("INVALID"); + }); + }); +}); diff --git a/integration_test/tests/v2/database.test.ts b/integration_test/tests/v2/database.test.ts new file mode 100644 index 000000000..1c11d470a --- /dev/null +++ b/integration_test/tests/v2/database.test.ts @@ -0,0 +1,214 @@ +import * as admin from "firebase-admin"; +import { retry } from "../utils"; +import { initializeFirebase } from "../firebaseSetup"; +import { Reference } from "@firebase/database-types"; +import { logger } from "../../src/utils/logger"; + +describe("Firebase Database (v2)", () => { + const projectId = process.env.PROJECT_ID; + const testId = process.env.TEST_RUN_ID; + + if (!testId || !projectId) { + throw new Error("Environment configured incorrectly."); + } + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + console.log("🧹 Cleaning up test data..."); + const collectionsToClean = [ + "databaseCreatedTests", + "databaseDeletedTests", + "databaseUpdatedTests", + "databaseWrittenTests", + ]; + + for (const collection of collectionsToClean) { + try { + await admin.firestore().collection(collection).doc(testId).delete(); + console.log(`🗑️ Deleted test document: ${collection}/${testId}`); + } catch (error) { + console.log(`ℹ️ No test document to delete: ${collection}/${testId}`); + } + } + }); + + async function setupRef(refPath: string) { + const ref = admin.database().ref(refPath); + await ref.set({ ".sv": "timestamp" }); + return ref; + } + + async function teardownRef(ref: Reference) { + if (ref) { + try { + await ref.remove(); + } catch (err) { + logger.error("Teardown error", err); + } + } + } + + async function getLoggedContext(collectionName: string, testId: string) { + return retry(() => + admin + .firestore() + .collection(collectionName) + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + } + + describe("created trigger", () => { + let ref: Reference; + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + ref = await setupRef(`databaseCreatedTests/${testId}/start`); + loggedContext = await getLoggedContext("databaseCreatedTests", testId); + }); + + afterAll(async () => { + await teardownRef(ref); + }); + + it("should give refs access to admin data", async () => { + await ref.parent?.child("adminOnly").update({ allowed: 1 }); + + const adminDataSnapshot = await ref.parent?.child("adminOnly").once("value"); + const adminData = adminDataSnapshot?.val(); + + expect(adminData).toEqual({ allowed: 1 }); + }); + + it("should have a correct ref url", () => { + expect(loggedContext?.url).toMatch(`databaseCreatedTests/${testId}/start`); + }); + + it("should have the right event type", () => { + expect(loggedContext?.type).toEqual("google.firebase.database.ref.v1.created"); + }); + + it("should have event id", () => { + expect(loggedContext?.id).toBeDefined(); + }); + + it("should have a time", () => { + expect(loggedContext?.time).toBeDefined(); + }); + }); + + describe("deleted trigger", () => { + let ref: Reference; + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + ref = await setupRef(`databaseDeletedTests/${testId}/start`); + await teardownRef(ref); + loggedContext = await getLoggedContext("databaseDeletedTests", testId); + }); + + it("should have a correct ref url", () => { + expect(loggedContext?.url).toMatch(`databaseDeletedTests/${testId}/start`); + }); + + it("should have the right event type", () => { + expect(loggedContext?.type).toEqual("google.firebase.database.ref.v1.deleted"); + }); + + it("should have event id", () => { + expect(loggedContext?.id).toBeDefined(); + }); + + it("should have a time", () => { + expect(loggedContext?.time).toBeDefined(); + }); + }); + + describe("updated trigger", () => { + let ref: Reference; + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + ref = await setupRef(`databaseUpdatedTests/${testId}/start`); + await ref.update({ updated: true }); + loggedContext = await getLoggedContext("databaseUpdatedTests", testId); + }); + + afterAll(async () => { + await teardownRef(ref); + }); + + it("should give refs access to admin data", async () => { + await ref.parent?.child("adminOnly").update({ allowed: 1 }); + + const adminDataSnapshot = await ref.parent?.child("adminOnly").once("value"); + const adminData = adminDataSnapshot?.val(); + + expect(adminData).toEqual({ allowed: 1 }); + }); + + it("should have a correct ref url", () => { + expect(loggedContext?.url).toMatch(`databaseUpdatedTests/${testId}/start`); + }); + + it("should have the right event type", () => { + expect(loggedContext?.type).toEqual("google.firebase.database.ref.v1.updated"); + }); + + it("should have event id", () => { + expect(loggedContext?.id).toBeDefined(); + }); + + it("should have a time", () => { + expect(loggedContext?.time).toBeDefined(); + }); + + it("should have updated data", () => { + const parsedData = JSON.parse(loggedContext?.data ?? "{}"); + expect(parsedData).toEqual({ updated: true }); + }); + }); + + describe("written trigger", () => { + let ref: Reference; + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + ref = await setupRef(`databaseWrittenTests/${testId}/start`); + loggedContext = await getLoggedContext("databaseWrittenTests", testId); + }); + + afterAll(async () => { + await teardownRef(ref); + }); + + it("should give refs access to admin data", async () => { + await ref.parent?.child("adminOnly").update({ allowed: 1 }); + + const adminDataSnapshot = await ref.parent?.child("adminOnly").once("value"); + const adminData = adminDataSnapshot?.val(); + + expect(adminData).toEqual({ allowed: 1 }); + }); + + it("should have a correct ref url", () => { + expect(loggedContext?.url).toMatch(`databaseWrittenTests/${testId}/start`); + }); + + it("should have the right event type", () => { + expect(loggedContext?.type).toEqual("google.firebase.database.ref.v1.written"); + }); + + it("should have event id", () => { + expect(loggedContext?.id).toBeDefined(); + }); + + it("should have a time", () => { + expect(loggedContext?.time).toBeDefined(); + }); + }); +}); diff --git a/integration_test/tests/v2/eventarc.test.ts b/integration_test/tests/v2/eventarc.test.ts new file mode 100644 index 000000000..967ab1b56 --- /dev/null +++ b/integration_test/tests/v2/eventarc.test.ts @@ -0,0 +1,69 @@ +import * as admin from "firebase-admin"; +import { initializeFirebase } from "../firebaseSetup"; +import { CloudEvent, getEventarc } from "firebase-admin/eventarc"; +import { retry } from "../utils"; + +describe("Eventarc (v2)", () => { + const projectId = process.env.PROJECT_ID || "functions-integration-tests-v2"; + const testId = process.env.TEST_RUN_ID; + const region = process.env.REGION || "us-central1"; + + if (!testId || !projectId || !region) { + throw new Error("Environment configured incorrectly."); + } + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + await admin.firestore().collection("eventarcOnCustomEventPublishedTests").doc(testId).delete(); + }); + + describe("onCustomEventPublished trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + const cloudEvent: CloudEvent = { + type: "achieved-leaderboard", + source: testId, + subject: "Welcome to the top 10", + data: { + message: "You have achieved the nth position in our leaderboard! To see...", + testId, + }, + }; + await getEventarc().channel(`locations/${region}/channels/firebase`).publish(cloudEvent); + + loggedContext = await retry(() => + admin + .firestore() + .collection("eventarcOnCustomEventPublishedTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + it("should have well-formed source", () => { + expect(loggedContext?.source).toMatch(testId); + }); + + it("should have the correct type", () => { + expect(loggedContext?.type).toEqual("achieved-leaderboard"); + }); + + it("should have an id", () => { + expect(loggedContext?.id).toBeDefined(); + }); + + it("should have a time", () => { + expect(loggedContext?.time).toBeDefined(); + }); + + it("should not have the data", () => { + const eventData = JSON.parse(loggedContext?.data || "{}"); + expect(eventData.testId).toBeDefined(); + }); + }); +}); diff --git a/integration_test/tests/v2/firestore.test.ts b/integration_test/tests/v2/firestore.test.ts new file mode 100644 index 000000000..94e790bb2 --- /dev/null +++ b/integration_test/tests/v2/firestore.test.ts @@ -0,0 +1,228 @@ +import * as admin from "firebase-admin"; +import { retry } from "../utils"; +import { initializeFirebase } from "../firebaseSetup"; + +describe("Cloud Firestore (v2)", () => { + const projectId = process.env.PROJECT_ID; + const testId = process.env.TEST_RUN_ID; + + if (!testId || !projectId) { + throw new Error("Environment configured incorrectly."); + } + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + await admin.firestore().collection("firestoreOnDocumentCreatedTests").doc(testId).delete(); + await admin.firestore().collection("firestoreOnDocumentDeletedTests").doc(testId).delete(); + await admin.firestore().collection("firestoreOnDocumentUpdatedTests").doc(testId).delete(); + await admin.firestore().collection("firestoreOnDocumentWrittenTests").doc(testId).delete(); + }); + + describe("Document created trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + let dataSnapshot: admin.firestore.DocumentSnapshot; + let docRef: admin.firestore.DocumentReference; + + beforeAll(async () => { + docRef = admin.firestore().collection("tests").doc(testId); + await docRef.set({ test: testId }); + dataSnapshot = await docRef.get(); + + loggedContext = await retry(() => + admin + .firestore() + .collection("firestoreOnDocumentCreatedTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + it("should not have event.app", () => { + expect(loggedContext?.app).toBeUndefined(); + }); + + it("should give refs access to admin data", async () => { + const result = await docRef.set({ allowed: 1 }, { merge: true }); + expect(result).toBeTruthy(); + }); + + it("should have well-formed resource", () => { + expect(loggedContext?.source).toMatch( + `//firestore.googleapis.com/projects/${projectId}/databases/(default)` + ); + }); + + it("should have the correct type", () => { + expect(loggedContext?.type).toEqual("google.cloud.firestore.document.v1.created"); + }); + + it("should have an id", () => { + expect(loggedContext?.id).toBeDefined(); + }); + + it("should have a time", () => { + expect(loggedContext?.time).toBeDefined(); + }); + + it("should have the correct data", () => { + expect(dataSnapshot.data()).toEqual({ test: testId }); + }); + }); + + describe("Document deleted trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + let dataSnapshot: admin.firestore.DocumentSnapshot; + let docRef: admin.firestore.DocumentReference; + + beforeAll(async () => { + docRef = admin.firestore().collection("tests").doc(testId); + await docRef.set({ test: testId }); + dataSnapshot = await docRef.get(); + + await docRef.delete(); + + // Refresh snapshot + dataSnapshot = await docRef.get(); + + loggedContext = await retry(() => + admin + .firestore() + .collection("firestoreOnDocumentDeletedTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + it("should not have event.app", () => { + expect(loggedContext?.app).toBeUndefined(); + }); + + it("should have well-formed source", () => { + expect(loggedContext?.source).toMatch( + `//firestore.googleapis.com/projects/${projectId}/databases/(default)` + ); + }); + + it("should have the correct type", () => { + expect(loggedContext?.type).toEqual("google.cloud.firestore.document.v1.deleted"); + }); + + it("should have an id", () => { + expect(loggedContext?.id).toBeDefined(); + }); + + it("should have a time", () => { + expect(loggedContext?.time).toBeDefined(); + }); + + it("should not have the data", () => { + expect(dataSnapshot.data()).toBeUndefined(); + }); + }); + + describe("Document updated trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + let docRef: admin.firestore.DocumentReference; + + beforeAll(async () => { + docRef = admin.firestore().collection("tests").doc(testId); + await docRef.set({}); + + await docRef.update({ test: testId }); + + loggedContext = await retry(() => + admin + .firestore() + .collection("firestoreOnDocumentUpdatedTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + it("should not have event.app", () => { + expect(loggedContext?.app).toBeUndefined(); + }); + + it("should have well-formed resource", () => { + expect(loggedContext?.source).toMatch( + `//firestore.googleapis.com/projects/${projectId}/databases/(default)` + ); + }); + + it("should have the correct type", () => { + expect(loggedContext?.type).toEqual("google.cloud.firestore.document.v1.updated"); + }); + + it("should have an id", () => { + expect(loggedContext?.id).toBeDefined(); + }); + + it("should have a time", () => { + expect(loggedContext?.time).toBeDefined(); + }); + + it("should have the correct data", async () => { + // Retry getting the data snapshot to ensure the function has processed + const finalSnapshot = await retry(() => docRef.get()); + expect(finalSnapshot.data()).toStrictEqual({ test: testId }); + }); + }); + + describe("Document written trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + let dataSnapshot: admin.firestore.DocumentSnapshot; + let docRef: admin.firestore.DocumentReference; + + beforeAll(async () => { + docRef = admin.firestore().collection("tests").doc(testId); + await docRef.set({ test: testId }); + dataSnapshot = await docRef.get(); + + loggedContext = await retry(() => + admin + .firestore() + .collection("firestoreOnDocumentWrittenTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + it("should not have event.app", () => { + expect(loggedContext?.app).toBeUndefined(); + }); + + it("should give refs access to admin data", async () => { + const result = await docRef.set({ allowed: 1 }, { merge: true }); + expect(result).toBeTruthy(); + }); + + it("should have well-formed resource", () => { + expect(loggedContext?.source).toMatch( + `//firestore.googleapis.com/projects/${projectId}/databases/(default)` + ); + }); + + it("should have the correct type", () => { + expect(loggedContext?.type).toEqual("google.cloud.firestore.document.v1.written"); + }); + + it("should have an id", () => { + expect(loggedContext?.id).toBeDefined(); + }); + + it("should have a time", () => { + expect(loggedContext?.time).toBeDefined(); + }); + + it("should have the correct data", () => { + expect(dataSnapshot.data()).toEqual({ test: testId }); + }); + }); +}); diff --git a/integration_test/tests/v2/identity.test.ts b/integration_test/tests/v2/identity.test.ts new file mode 100644 index 000000000..97bc91548 --- /dev/null +++ b/integration_test/tests/v2/identity.test.ts @@ -0,0 +1,133 @@ +import * as admin from "firebase-admin"; +import { retry } from "../utils"; +import { initializeApp } from "firebase/app"; +import { initializeFirebase } from "../firebaseSetup"; +import { getAuth, createUserWithEmailAndPassword, UserCredential } from "firebase/auth"; +import { getFirebaseClientConfig } from "../firebaseClientConfig"; + +interface IdentityEventContext { + eventId: string; + eventType: string; + timestamp: string; + resource: { + name: string; + }; +} + +describe.skip("Firebase Identity (v2)", () => { + const userIds: string[] = []; + const projectId = process.env.PROJECT_ID || "functions-integration-tests-v2"; + const testId = process.env.TEST_RUN_ID; + // Use hardcoded Firebase client config (safe to expose publicly) + const config = getFirebaseClientConfig(projectId); + const app = initializeApp(config); + + if (!testId || !projectId) { + throw new Error("Environment configured incorrectly."); + } + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + for (const userId of userIds) { + await admin.firestore().collection("userProfiles").doc(userId).delete(); + await admin.firestore().collection("authUserOnCreateTests").doc(userId).delete(); + await admin.firestore().collection("authUserOnDeleteTests").doc(userId).delete(); + await admin.firestore().collection("authBeforeCreateTests").doc(userId).delete(); + await admin.firestore().collection("authBeforeSignInTests").doc(userId).delete(); + } + }); + describe("beforeUserCreated trigger", () => { + let userRecord: UserCredential; + let loggedContext: IdentityEventContext | undefined; + + beforeAll(async () => { + userRecord = await createUserWithEmailAndPassword( + getAuth(app), + `${testId}@fake-create.com`, + "secret" + ); + + userIds.push(userRecord.user.uid); + + loggedContext = await retry(() => + admin + .firestore() + .collection("identityBeforeUserCreatedTests") + .doc(userRecord.user.uid) + .get() + .then((logSnapshot) => logSnapshot.data() as IdentityEventContext | undefined) + ); + }); + + afterAll(async () => { + await admin.auth().deleteUser(userRecord.user.uid); + }); + + it("should have a project as resource", () => { + expect(loggedContext?.resource.name).toMatch(`projects/${projectId}`); + }); + + it("should have the correct eventType", () => { + expect(loggedContext?.eventType).toEqual( + "providers/cloud.auth/eventTypes/user.beforeCreate:password" + ); + }); + + it("should have an eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have a timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + }); + + describe("identityBeforeUserSignedInTests trigger", () => { + let userRecord: UserCredential; + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + userRecord = await createUserWithEmailAndPassword( + getAuth(app), + `${testId}@fake-before-signin.com`, + "secret" + ); + + userIds.push(userRecord.user.uid); + + loggedContext = await retry(() => + admin + .firestore() + .collection("identityBeforeUserSignedInTests") + .doc(userRecord.user.uid) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + afterAll(async () => { + await admin.auth().deleteUser(userRecord.user.uid); + }); + + it("should have a project as resource", () => { + expect(loggedContext?.resource.name).toMatch(`projects/${projectId}`); + }); + + it("should have the correct eventType", () => { + expect(loggedContext?.eventType).toEqual( + "providers/cloud.auth/eventTypes/user.beforeSignIn:password" + ); + }); + + it("should have an eventId", () => { + expect(loggedContext?.eventId).toBeDefined(); + }); + + it("should have a timestamp", () => { + expect(loggedContext?.timestamp).toBeDefined(); + }); + }); +}); diff --git a/integration_test/tests/v2/pubsub.test.ts b/integration_test/tests/v2/pubsub.test.ts new file mode 100644 index 000000000..59609acbb --- /dev/null +++ b/integration_test/tests/v2/pubsub.test.ts @@ -0,0 +1,81 @@ +import * as admin from "firebase-admin"; +import { retry } from "../utils"; +import { PubSub } from "@google-cloud/pubsub"; +import { initializeFirebase } from "../firebaseSetup"; + +describe("Pub/Sub (v2)", () => { + const projectId = process.env.PROJECT_ID; + const testId = process.env.TEST_RUN_ID; + const region = process.env.REGION; + const serviceAccountPath = process.env.GOOGLE_APPLICATION_CREDENTIALS; + + if (!testId || !projectId || !region) { + throw new Error("Environment configured incorrectly."); + } + + if (!serviceAccountPath) { + console.warn("GOOGLE_APPLICATION_CREDENTIALS not set, skipping Pub/Sub tests"); + describe.skip("Pub/Sub (v2)", () => { + it("skipped due to missing credentials", () => { + expect(true).toBe(true); + }); + }); + return; + } + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + await admin.firestore().collection("pubsubOnMessagePublishedTests").doc(testId).delete(); + }); + + describe("onMessagePublished trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + const serviceAccount = await import(serviceAccountPath); + const topic = new PubSub({ + credentials: serviceAccount.default, + projectId, + }).topic("custom_message_tests"); + + await topic.publish(Buffer.from(JSON.stringify({ testId }))); + + loggedContext = await retry(() => + admin + .firestore() + .collection("pubsubOnMessagePublishedTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + it("should have a topic as source", () => { + expect(loggedContext?.source).toEqual( + `//pubsub.googleapis.com/projects/${projectId}/topics/custom_message_tests` + ); + }); + + it("should have the correct event type", () => { + expect(loggedContext?.type).toEqual("google.cloud.pubsub.topic.v1.messagePublished"); + }); + + it("should have an event id", () => { + expect(loggedContext?.id).toBeDefined(); + }); + + it("should have time", () => { + expect(loggedContext?.time).toBeDefined(); + }); + + it("should have pubsub data", () => { + const decodedMessage = JSON.parse(loggedContext?.message); + const decoded = new Buffer(decodedMessage.data, "base64").toString(); + const parsed = JSON.parse(decoded); + expect(parsed.testId).toEqual(testId); + }); + }); +}); diff --git a/integration_test/tests/v2/remoteConfig.test.ts b/integration_test/tests/v2/remoteConfig.test.ts new file mode 100644 index 000000000..c5379c76b --- /dev/null +++ b/integration_test/tests/v2/remoteConfig.test.ts @@ -0,0 +1,81 @@ +import * as admin from "firebase-admin"; +import { retry } from "../utils"; +import { initializeFirebase } from "../firebaseSetup"; + +describe("Firebase Remote Config (v2)", () => { + const projectId = process.env.PROJECT_ID; + const testId = process.env.TEST_RUN_ID; + + if (!testId || !projectId) { + throw new Error("Environment configured incorrectly."); + } + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + await admin.firestore().collection("remoteConfigOnConfigUpdatedTests").doc(testId).delete(); + }); + + describe("onUpdated trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + let shouldSkip = false; + + beforeAll(async () => { + try { + const accessToken = await admin.credential.applicationDefault().getAccessToken(); + const resp = await fetch( + `https://firebaseremoteconfig.googleapis.com/v1/projects/${projectId}/remoteConfig`, + { + method: "PUT", + headers: { + Authorization: `Bearer ${accessToken.access_token}`, + "Content-Type": "application/json; UTF-8", + "Accept-Encoding": "gzip", + "If-Match": "*", + }, + body: JSON.stringify({ version: { description: testId } }), + } + ); + if (!resp.ok) { + throw new Error(resp.statusText); + } + + loggedContext = await retry(() => + admin + .firestore() + .collection("remoteConfigOnConfigUpdatedTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + } catch (error) { + console.warn("RemoteConfig API access failed, skipping test:", (error as Error).message); + shouldSkip = true; + } + }); + + it("should have the right event type", () => { + if (shouldSkip) { + return; + } + // TODO: not sure if the nested remoteconfig.remoteconfig is expected? + expect(loggedContext?.type).toEqual("google.firebase.remoteconfig.remoteConfig.v1.updated"); + }); + + it("should have event id", () => { + if (shouldSkip) { + return; // Skip test when API not available + } + expect(loggedContext?.id).toBeDefined(); + }); + + it("should have time", () => { + if (shouldSkip) { + return; // Skip test when API not available + } + expect(loggedContext?.time).toBeDefined(); + }); + }); +}); diff --git a/integration_test/tests/v2/scheduler.test.ts b/integration_test/tests/v2/scheduler.test.ts new file mode 100644 index 000000000..ac6143ca3 --- /dev/null +++ b/integration_test/tests/v2/scheduler.test.ts @@ -0,0 +1,56 @@ +import * as admin from "firebase-admin"; +import { retry } from "../utils"; +import { initializeFirebase } from "../firebaseSetup"; + +describe.skip("Scheduler", () => { + const projectId = process.env.PROJECT_ID; + const region = process.env.REGION; + const testId = process.env.TEST_RUN_ID; + + if (!testId || !projectId || !region) { + throw new Error("Environment configured incorrectly."); + } + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + await admin.firestore().collection("schedulerOnScheduleV2Tests").doc(testId).delete(); + }); + + describe("onSchedule trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + const accessToken = await admin.credential.applicationDefault().getAccessToken(); + const jobName = `firebase-schedule-${testId}-v2-schedule-${region}`; + const response = await fetch( + `https://cloudscheduler.googleapis.com/v1/projects/${projectId}/locations/us-central1/jobs/firebase-schedule-${testId}-v2-schedule-${region}:run`, + { + method: "POST", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${accessToken.access_token}`, + }, + } + ); + if (!response.ok) { + throw new Error(`Failed request with status ${response.status}!`); + } + + loggedContext = await retry(() => + admin + .firestore() + .collection("schedulerOnScheduleV2Tests") + .doc(jobName) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + it("should trigger when the scheduler fires", () => { + expect(loggedContext?.success).toBeTruthy(); + }); + }); +}); diff --git a/integration_test/tests/v2/storage.test.ts b/integration_test/tests/v2/storage.test.ts new file mode 100644 index 000000000..765eb24cd --- /dev/null +++ b/integration_test/tests/v2/storage.test.ts @@ -0,0 +1,167 @@ +import * as admin from "firebase-admin"; +import { initializeFirebase } from "../firebaseSetup"; +import { retry, timeout } from "../utils"; + +async function uploadBufferToFirebase(buffer: Buffer, fileName: string) { + const bucket = admin.storage().bucket(); + + const file = bucket.file(fileName); + await file.save(buffer, { + metadata: { + contentType: "text/plain", + }, + }); +} + +describe("Firebase Storage (v2)", () => { + const testId = process.env.TEST_RUN_ID; + + if (!testId) { + throw new Error("Environment configured incorrectly."); + } + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + await admin.firestore().collection("storageOnObjectFinalizedTests").doc(testId).delete(); + await admin.firestore().collection("storageOnObjectDeletedTests").doc(testId).delete(); + await admin.firestore().collection("storageOnObjectMetadataUpdatedTests").doc(testId).delete(); + }); + + describe("onObjectFinalized trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + const testContent = testId; + const buffer = Buffer.from(testContent, "utf-8"); + + await uploadBufferToFirebase(buffer, testId + ".txt"); + + loggedContext = await retry(() => + admin + .firestore() + .collection("storageOnObjectFinalizedTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + afterAll(async () => { + const file = admin + .storage() + .bucket() + .file(testId + ".txt"); + + const [exists] = await file.exists(); + if (exists) { + await file.delete(); + } + }); + + it("should have the right event type", () => { + expect(loggedContext?.type).toEqual("google.cloud.storage.object.v1.finalized"); + }); + + it("should have event id", () => { + expect(loggedContext?.id).toBeDefined(); + }); + + it("should have time", () => { + expect(loggedContext?.time).toBeDefined(); + }); + }); + + describe("onDeleted trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + const testContent = testId; + const buffer = Buffer.from(testContent, "utf-8"); + + await uploadBufferToFirebase(buffer, testId + ".txt"); + + await timeout(5000); // Short delay before delete + + const file = admin + .storage() + .bucket() + .file(testId + ".txt"); + await file.delete(); + + loggedContext = await retry(() => + admin + .firestore() + .collection("storageOnObjectDeletedTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + it("should have the right event type", () => { + expect(loggedContext?.type).toEqual("google.cloud.storage.object.v1.deleted"); + }); + + it("should have event id", () => { + expect(loggedContext?.id).toBeDefined(); + }); + + it("should have time", () => { + expect(loggedContext?.time).toBeDefined(); + }); + }); + + describe("onMetadataUpdated trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + const testContent = testId; + const buffer = Buffer.from(testContent, "utf-8"); + + await uploadBufferToFirebase(buffer, testId + ".txt"); + + // Trigger metadata update + const file = admin + .storage() + .bucket() + .file(testId + ".txt"); + await file.setMetadata({ contentType: "application/json" }); + + loggedContext = await retry(() => + admin + .firestore() + .collection("storageOnObjectMetadataUpdatedTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + afterAll(async () => { + const file = admin + .storage() + .bucket() + .file(testId + ".txt"); + + const [exists] = await file.exists(); + if (exists) { + await file.delete(); + } + }); + + it("should have the right event type", () => { + expect(loggedContext?.type).toEqual("google.cloud.storage.object.v1.metadataUpdated"); + }); + + it("should have event id", () => { + expect(loggedContext?.id).toBeDefined(); + }); + + it("should have time", () => { + expect(loggedContext?.time).toBeDefined(); + }); + }); +}); diff --git a/integration_test/tests/v2/tasks.test.ts b/integration_test/tests/v2/tasks.test.ts new file mode 100644 index 000000000..2af8768e4 --- /dev/null +++ b/integration_test/tests/v2/tasks.test.ts @@ -0,0 +1,56 @@ +import * as admin from "firebase-admin"; +import { initializeFirebase } from "../firebaseSetup"; +import { createTask, retry } from "../utils"; + +describe("Cloud Tasks (v2)", () => { + const region = process.env.REGION; + const testId = process.env.TEST_RUN_ID; + const projectId = process.env.PROJECT_ID; + const queueName = `tasksOnTaskDispatchedTests${testId}`; + + const serviceAccountPath = process.env.GOOGLE_APPLICATION_CREDENTIALS; + + if (!testId || !projectId || !region) { + throw new Error("Environment configured incorrectly."); + } + + if (!serviceAccountPath) { + console.warn("GOOGLE_APPLICATION_CREDENTIALS not set, skipping Tasks tests"); + describe.skip("Cloud Tasks (v2)", () => { + it("skipped due to missing credentials", () => { + expect(true).toBe(true); + }); + }); + return; + } + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + await admin.firestore().collection("tasksOnTaskDispatchedTests").doc(testId).delete(); + }); + + describe("onDispatch trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + + beforeAll(async () => { + const url = `https://${region}-${projectId}.cloudfunctions.net/tasksOnTaskDispatchedTests${testId}`; + await createTask(projectId, queueName, region, url, { data: { testId } }); + + loggedContext = await retry(() => + admin + .firestore() + .collection("tasksOnTaskDispatchedTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + }); + + it("should have correct event id", () => { + expect(loggedContext?.id).toBeDefined(); + }); + }); +}); diff --git a/integration_test/tests/v2/testLab.test.ts b/integration_test/tests/v2/testLab.test.ts new file mode 100644 index 000000000..5894cc269 --- /dev/null +++ b/integration_test/tests/v2/testLab.test.ts @@ -0,0 +1,65 @@ +import * as admin from "firebase-admin"; +import { retry, startTestRun } from "../utils"; +import { initializeFirebase } from "../firebaseSetup"; + +describe.skip("TestLab (v2)", () => { + const projectId = process.env.PROJECT_ID; + const testId = process.env.TEST_RUN_ID; + + if (!testId || !projectId) { + throw new Error("Environment configured incorrectly."); + } + + beforeAll(() => { + initializeFirebase(); + }); + + afterAll(async () => { + await admin.firestore().collection("testLabOnTestMatrixCompletedTests").doc(testId).delete(); + }); + + describe("test matrix onComplete trigger", () => { + let loggedContext: admin.firestore.DocumentData | undefined; + let shouldSkip = false; + + beforeAll(async () => { + try { + const accessToken = await admin.credential.applicationDefault().getAccessToken(); + await startTestRun(projectId, testId, accessToken.access_token); + + loggedContext = await retry(() => + admin + .firestore() + .collection("testLabOnTestMatrixCompletedTests") + .doc(testId) + .get() + .then((logSnapshot) => logSnapshot.data()) + ); + } catch (error) { + console.warn("TestLab API access failed, skipping test:", (error as Error).message); + shouldSkip = true; + } + }); + + it("should have event id", () => { + if (shouldSkip) { + return; + } + expect(loggedContext?.id).toBeDefined(); + }); + + it("should have right event type", () => { + if (shouldSkip) { + return; + } + expect(loggedContext?.type).toEqual("google.firebase.testlab.testMatrix.v1.completed"); + }); + + it("should be in state 'INVALID'", () => { + if (shouldSkip) { + return; + } + expect(loggedContext?.state).toEqual("INVALID"); + }); + }); +}); diff --git a/integration_test/tsconfig.json b/integration_test/tsconfig.json new file mode 100644 index 000000000..38bd85459 --- /dev/null +++ b/integration_test/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "ES2020", + "outDir": "./dist", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "node", + "types": ["jest", "node"], + "typeRoots": ["./node_modules/@types"] + }, + "include": ["**/*.ts"], + "exclude": ["node_modules", "functions/*", "generated/*"] +} diff --git a/integration_test/tsconfig.test.json b/integration_test/tsconfig.test.json new file mode 100644 index 000000000..a401f529b --- /dev/null +++ b/integration_test/tsconfig.test.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "ES2020", + "moduleResolution": "node", + "resolveJsonModule": true, + "types": ["jest", "node"] + }, + "include": ["**/*.ts"], + "exclude": ["node_modules", "functions/*", "generated/*"] +} \ No newline at end of file diff --git a/package.json b/package.json index a9ec85b6f..732dc1ee7 100644 --- a/package.json +++ b/package.json @@ -257,6 +257,7 @@ "build:release": "npm ci --production && npm install --no-save typescript && tsc -p tsconfig.release.json", "build": "tsc -p tsconfig.release.json", "build:watch": "npm run build -- -w", + "pack-for-integration-tests": "echo 'Building firebase-functions SDK from source...' && npm ci && npm run build && npm pack && mv firebase-functions-*.tgz integration_test/firebase-functions-local.tgz && echo 'SDK built and packed successfully'", "format": "npm run format:ts && npm run format:other", "format:other": "npm run lint:other -- --write", "format:ts": "npm run lint:ts -- --fix --quiet",