From 779cd566bf8589d21ddc863dd3e6a8af17a71407 Mon Sep 17 00:00:00 2001 From: Alexander Schueren Date: Wed, 18 Jun 2025 16:27:02 +0200 Subject: [PATCH] add biome --- biome.json | 11 +- examples/kafka/.gitignore | 207 ++ examples/kafka/README.md | 134 ++ examples/kafka/app/.npmignore | 1 + examples/kafka/app/avro.ts | 77 + examples/kafka/app/json.ts | 30 + examples/kafka/app/package-lock.json | 2088 +++++++++++++++++ examples/kafka/app/package.json | 31 + examples/kafka/app/product.es6.generated.d.ts | 110 + examples/kafka/app/product.es6.generated.js | 262 +++ examples/kafka/app/proto.ts | 34 + examples/kafka/app/schema.generated.d.ts | 495 ++++ examples/kafka/app/schema.generated.js | 1328 +++++++++++ examples/kafka/app/schema.proto | 49 + examples/kafka/app/schema.ts | 9 + examples/kafka/app/tsconfig.cjs.json | 0 examples/kafka/app/tsconfig.esm.json | 0 examples/kafka/app/tsconfig.json | 15 + examples/kafka/events/event.json | 62 + examples/kafka/samconfig.toml | 31 + examples/kafka/template.yaml | 103 + 21 files changed, 5068 insertions(+), 9 deletions(-) create mode 100644 examples/kafka/.gitignore create mode 100644 examples/kafka/README.md create mode 100644 examples/kafka/app/.npmignore create mode 100644 examples/kafka/app/avro.ts create mode 100644 examples/kafka/app/json.ts create mode 100644 examples/kafka/app/package-lock.json create mode 100644 examples/kafka/app/package.json create mode 100644 examples/kafka/app/product.es6.generated.d.ts create mode 100644 examples/kafka/app/product.es6.generated.js create mode 100644 examples/kafka/app/proto.ts create mode 100644 examples/kafka/app/schema.generated.d.ts create mode 100644 examples/kafka/app/schema.generated.js create mode 100644 examples/kafka/app/schema.proto create mode 100644 examples/kafka/app/schema.ts create mode 100644 examples/kafka/app/tsconfig.cjs.json create mode 100644 examples/kafka/app/tsconfig.esm.json create mode 100644 examples/kafka/app/tsconfig.json create mode 100644 examples/kafka/events/event.json create mode 100644 examples/kafka/samconfig.toml create mode 100644 examples/kafka/template.yaml diff --git a/biome.json b/biome.json index 46c5a0c5d5..c49249363f 100644 --- a/biome.json +++ b/biome.json @@ -25,13 +25,6 @@ } }, "files": { - "ignore": [ - "node_modules", - "coverage", - "lib", - "cdk.out", - "site", - ".aws-sam" - ] + "ignore": ["node_modules", "coverage", "lib", "cdk.out", "site", ".aws-sam", "*.generated.js", "*.generated.d.ts"] } -} \ No newline at end of file +} diff --git a/examples/kafka/.gitignore b/examples/kafka/.gitignore new file mode 100644 index 0000000000..5854f05ece --- /dev/null +++ b/examples/kafka/.gitignore @@ -0,0 +1,207 @@ + +# Created by https://www.toptal.com/developers/gitignore/api/osx,node,linux,windows,sam +# Edit at https://www.toptal.com/developers/gitignore?templates=osx,node,linux,windows,sam + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test +.env*.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt +dist + +# Storybook build outputs +.out +.storybook-out +storybook-static + +# rollup.js default build output +dist/ + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# Temporary folders +tmp/ +temp/ + +### OSX ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### SAM ### +# Ignore build directories for the AWS Serverless Application Model (SAM) +# Info: https://aws.amazon.com/serverless/sam/ +# Docs: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-reference.html + +**/.aws-sam + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.toptal.com/developers/gitignore/api/osx,node,linux,windows,sam diff --git a/examples/kafka/README.md b/examples/kafka/README.md new file mode 100644 index 0000000000..adc5be67cb --- /dev/null +++ b/examples/kafka/README.md @@ -0,0 +1,134 @@ +# AWS Powertools for AWS Lambda TypeScript - Kafka Example + +This project demonstrates how to use AWS Lambda Powertools for TypeScript with Amazon MSK (Managed Streaming for Kafka) to process events from Kafka topics. It includes examples of handling different message serialization formats: JSON, Avro, and Protocol Buffers (Protobuf). + +## Overview + +This example showcases three different Lambda functions that consume messages from Kafka topics: + +1. **JSON Deserialization**: Processes Kafka messages with JSON payload format +2. **Avro Deserialization**: Processes Kafka messages with Apache Avro serialization format +3. **Protocol Buffers Deserialization**: Processes Kafka messages with Protocol Buffers serialization format + +Each function uses the `@aws-lambda-powertools/kafka` library to easily deserialize and process Kafka records. + +## Project Structure + +```bash +examples/kafka/ +├── app/ +│ ├── avro.ts # Lambda handler for Avro deserialization +│ ├── json.ts # Lambda handler for JSON deserialization +│ ├── proto.ts # Lambda handler for Protocol Buffers deserialization +│ ├── product.generated.ts # Generated Protocol Buffers TypeScript code +└── template.yaml # AWS SAM template for deploying the functions +``` + +## Prerequisites + +- [Node.js](https://nodejs.org/) (v18 or later) +- [AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html) +- [AWS CLI](https://aws.amazon.com/cli/) +- An AWS account with appropriate permissions + +## Installation + +1. Clone the repository: + + ```bash + git clone https://github.com/aws-powertools/powertools-lambda-typescript.git + ``` + +2. Navigate to the project directory: + + ```bash + cd powertools-lambda-typescript + ``` + +3. Install dependencies: + + ```bash + npm install + ``` + +4. Build the project: + + ```bash + npm run build + ``` + +## Deployment + +Deploy the application using the AWS SAM CLI: + +```bash +cd examples/kafka +sam build +sam deploy --guided +``` + +Follow the prompts to configure your deployment. + +## Usage Examples + +### JSON Format + +The JSON example processes messages that have a simple JSON structure: + +```json +{ + "id": 1, + "name": "Product Name", + "price": 29.99 +} +``` + +### Avro Format + +The Avro example handles messages with Avro serialization. It uses the following schema: + +```json +{ + "type": "record", + "name": "Product", + "fields": [ + { "name": "id", "type": "int" }, + { "name": "name", "type": "string" }, + { "name": "price", "type": "double" } + ] +} +``` + +### Protocol Buffers Format + +The Protobuf example handles messages serialized with Protocol Buffers. The schema is defined in a `.proto` file (which would need to be created), and the TypeScript code is generated from that schema. + +## How It Works + +1. **Event Source**: Configure your Lambda functions with an MSK or self-managed Kafka cluster as an event source. +2. **Deserializing Records**: The `kafkaConsumer` utility from Powertools handles deserializing the records based on the specified format. +3. **Processing**: Each record is processed within the handler function, with logging provided by Powertools Logger. + +## Configuration + +The SAM template (`template.yaml`) defines three Lambda functions, each with different environments: + +- **JsonDeserializationFunction**: Handles JSON-formatted Kafka messages +- **AvroDeserializationFunction**: Handles Avro-formatted Kafka messages +- **ProtobufDeserializationFunction**: Handles Protobuf-formatted Kafka messages + +## Customization + +To customize the examples: + +1. Modify the schema definitions to match your data structures +2. Update the handler logic to process the records according to your requirements +3. For Protobuf, ensure you have the proper `.proto` file and generate TypeScript code + +## Resources + +- [AWS Lambda Powertools for TypeScript Documentation](https://docs.powertools.aws.dev/lambda/typescript/) +- [Amazon MSK Documentation](https://docs.aws.amazon.com/msk/) +- [AWS Lambda Developer Guide](https://docs.aws.amazon.com/lambda/) +- [Apache Avro Documentation](https://avro.apache.org/docs/) +- [Protocol Buffers Documentation](https://developers.google.com/protocol-buffers) diff --git a/examples/kafka/app/.npmignore b/examples/kafka/app/.npmignore new file mode 100644 index 0000000000..e7e1fb04f4 --- /dev/null +++ b/examples/kafka/app/.npmignore @@ -0,0 +1 @@ +tests/* diff --git a/examples/kafka/app/avro.ts b/examples/kafka/app/avro.ts new file mode 100644 index 0000000000..f0c137ea76 --- /dev/null +++ b/examples/kafka/app/avro.ts @@ -0,0 +1,77 @@ +import { deserialize } from '@aws-lambda-powertools/kafka/deserializer/avro'; +import type { MSKEvent } from '@aws-lambda-powertools/kafka/types'; +import { MetricResolution, Metrics } from '@aws-lambda-powertools/metrics'; +import { Tracer } from '@aws-lambda-powertools/tracer'; +import type { Context } from 'aws-lambda'; + +const metrics = new Metrics(); +const tracer = new Tracer(); + +const schema = `{ + "type": "record", + "name": "CustomerProfile", + "namespace": "com.example", + "fields": [ + {"name": "user_id", "type": "string"}, + {"name": "full_name", "type": "string"}, + {"name": "email", "type": { + "type": "record", + "name": "EmailAddress", + "fields": [ + {"name": "address", "type": "string"}, + {"name": "verified", "type": "boolean"}, + {"name": "primary", "type": "boolean"} + ] + }}, + {"name": "age", "type": "int"}, + {"name": "address", "type": { + "type": "record", + "name": "Address", + "fields": [ + {"name": "street", "type": "string"}, + {"name": "city", "type": "string"}, + {"name": "state", "type": "string"}, + {"name": "country", "type": "string"}, + {"name": "zip_code", "type": "string"} + ] + }}, + {"name": "phone_numbers", "type": { + "type": "array", + "items": { + "type": "record", + "name": "PhoneNumber", + "fields": [ + {"name": "number", "type": "string"}, + {"name": "type", "type": {"type": "enum", "name": "PhoneType", "symbols": ["HOME", "WORK", "MOBILE"]}} + ] + } + }}, + {"name": "preferences", "type": { + "type": "map", + "values": "string" + }}, + {"name": "account_status", "type": {"type": "enum", "name": "AccountStatus", "symbols": ["ACTIVE", "INACTIVE", "SUSPENDED"]}} + ] +}`; + +export const handler = async (event: MSKEvent, context: Context) => { + const segment = tracer.getSegment(); + const subsegment = segment?.addNewSubsegment('ProcessRecords'); + + const startTime = performance.now(); + for (const recordsArray of Object.values(event.records)) { + for (const record of recordsArray) { + const deserialized = await deserialize(record.value, schema); + } + } + const executionTime = performance.now() - startTime; + metrics.addMetric( + `AVRO_VALUE_ACCESS_${context.memoryLimitInMB}`, + 'Milliseconds', + executionTime, + MetricResolution.High + ); + + subsegment?.close(); + metrics.publishStoredMetrics(); +}; diff --git a/examples/kafka/app/json.ts b/examples/kafka/app/json.ts new file mode 100644 index 0000000000..ec7b8fd567 --- /dev/null +++ b/examples/kafka/app/json.ts @@ -0,0 +1,30 @@ +import { deserialize } from '@aws-lambda-powertools/kafka/deserializer/json'; +import type { MSKEvent } from '@aws-lambda-powertools/kafka/types'; +import { MetricResolution, Metrics } from '@aws-lambda-powertools/metrics'; +import { Tracer } from '@aws-lambda-powertools/tracer'; +import type { Context } from 'aws-lambda'; + +const metrics = new Metrics(); +const tracer = new Tracer(); + +export const handler = async (event: MSKEvent, context: Context) => { + const segment = tracer.getSegment(); + const subsegment = segment?.addNewSubsegment('ProcessRecords'); + + const startTime = performance.now(); + for (const recordsArray of Object.values(event.records)) { + for (const record of recordsArray) { + const deserialized = await deserialize(record.value); + } + } + const executionTime = performance.now() - startTime; + metrics.addMetric( + `JSON_VALUE_ACCESS_${context.memoryLimitInMB}`, + 'Milliseconds', + executionTime, + MetricResolution.High + ); + + subsegment?.close(); + metrics.publishStoredMetrics(); +}; diff --git a/examples/kafka/app/package-lock.json b/examples/kafka/app/package-lock.json new file mode 100644 index 0000000000..5838afec8d --- /dev/null +++ b/examples/kafka/app/package-lock.json @@ -0,0 +1,2088 @@ +{ + "name": "kafka-examples", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "kafka-examples", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@aws-lambda-powertools/kafka": "file:aws-lambda-powertools-kafka-2.20.0.tgz", + "@aws-lambda-powertools/logger": "^2.21.0", + "@aws-lambda-powertools/metrics": "^2.21.0", + "@aws-lambda-powertools/tracer": "^2.21.0", + "avro-js": "^1.12.0", + "esbuild": "^0.25.5", + "protobufjs": "^7.5.3" + }, + "devDependencies": { + "@biomejs/biome": "^1.9.4", + "@types/aws-lambda": "^8.10.149", + "@types/node": "^22.15.23", + "tsx": "^4.19.4", + "typescript": "^5.8.3", + "vitest": "^3.0.5", + "zod": "^3.25.32" + } + }, + "node_modules/@aws-lambda-powertools/commons": { + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-2.21.0.tgz", + "integrity": "sha512-8AXwZv3k5Ey/9xyW9fsTgHDhayJswvDi94yfNNX0zbe/8lZouTPePYWfffJegJDOaN1nkNoCQQD2pS3v5QLB/Q==", + "license": "MIT-0" + }, + "node_modules/@aws-lambda-powertools/kafka": { + "version": "2.20.0", + "resolved": "file:aws-lambda-powertools-kafka-2.20.0.tgz", + "integrity": "sha512-yoaqTM683dF3CPMAxhkYnkATYPIDJHI3T8pV9ZKu0nyIEKcKoJkfUCYgVHcYx6HiBczBZg2CEOiAtfuDJ6gx9w==", + "license": "MIT-0", + "dependencies": { + "@aws-lambda-powertools/commons": "^2.20.0" + }, + "peerDependencies": { + "zod": "3.x" + }, + "peerDependenciesMeta": { + "zod": { + "optional": true + } + } + }, + "node_modules/@aws-lambda-powertools/logger": { + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/logger/-/logger-2.21.0.tgz", + "integrity": "sha512-neurPYJzkt3nSxiF3MJGzJa09/w7SR2Mhq0RAM8tbXetSm0e6o9TkIbGaYbK1LcXEXLtDmqO6n0JnJ/y5ZqWvA==", + "license": "MIT-0", + "dependencies": { + "@aws-lambda-powertools/commons": "^2.21.0", + "lodash.merge": "^4.6.2" + }, + "peerDependencies": { + "@aws-lambda-powertools/jmespath": "2.x", + "@middy/core": "4.x || 5.x || 6.x" + }, + "peerDependenciesMeta": { + "@aws-lambda-powertools/jmespath": { + "optional": true + }, + "@middy/core": { + "optional": true + } + } + }, + "node_modules/@aws-lambda-powertools/metrics": { + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/metrics/-/metrics-2.21.0.tgz", + "integrity": "sha512-49FDXSmWNelwjc+Mm8xnPnv/rgZvyuZselnZymBj3FQ/EUuKq5DvwwN72CeTVt9OBpdvVVpPty7Yxe6oUcom8A==", + "license": "MIT-0", + "dependencies": { + "@aws-lambda-powertools/commons": "^2.21.0" + }, + "peerDependencies": { + "@middy/core": "4.x || 5.x || 6.x" + }, + "peerDependenciesMeta": { + "@middy/core": { + "optional": true + } + } + }, + "node_modules/@aws-lambda-powertools/tracer": { + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/tracer/-/tracer-2.21.0.tgz", + "integrity": "sha512-uDa+i/33UiBisJC0k1GYcIMdW07QdeviATx/5P6BmVE6tfhnhSlCkiic6tlNYpy6kRJi/7VYFzv8Ydt/Y83Ysw==", + "license": "MIT-0", + "dependencies": { + "@aws-lambda-powertools/commons": "^2.21.0", + "aws-xray-sdk-core": "^3.10.3" + }, + "peerDependencies": { + "@middy/core": "4.x || 5.x || 6.x" + }, + "peerDependenciesMeta": { + "@middy/core": { + "optional": true + } + } + }, + "node_modules/@aws-sdk/types": { + "version": "3.821.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.821.0.tgz", + "integrity": "sha512-Znroqdai1a90TlxGaJ+FK1lwC0fHpo97Xjsp5UKGR5JODYm7f9+/fF17ebO1KdoBr/Rm0UIFiF5VmI8ts9F1eA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@biomejs/biome": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.9.4.tgz", + "integrity": "sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==", + "dev": true, + "hasInstallScript": true, + "license": "MIT OR Apache-2.0", + "bin": { + "biome": "bin/biome" + }, + "engines": { + "node": ">=14.21.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/biome" + }, + "optionalDependencies": { + "@biomejs/cli-darwin-arm64": "1.9.4", + "@biomejs/cli-darwin-x64": "1.9.4", + "@biomejs/cli-linux-arm64": "1.9.4", + "@biomejs/cli-linux-arm64-musl": "1.9.4", + "@biomejs/cli-linux-x64": "1.9.4", + "@biomejs/cli-linux-x64-musl": "1.9.4", + "@biomejs/cli-win32-arm64": "1.9.4", + "@biomejs/cli-win32-x64": "1.9.4" + } + }, + "node_modules/@biomejs/cli-darwin-arm64": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.9.4.tgz", + "integrity": "sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-darwin-x64": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.9.4.tgz", + "integrity": "sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.9.4.tgz", + "integrity": "sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64-musl": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.9.4.tgz", + "integrity": "sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.9.4.tgz", + "integrity": "sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64-musl": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.9.4.tgz", + "integrity": "sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-arm64": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.9.4.tgz", + "integrity": "sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-x64": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.9.4.tgz", + "integrity": "sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", + "integrity": "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.5.tgz", + "integrity": "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.5.tgz", + "integrity": "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.5.tgz", + "integrity": "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz", + "integrity": "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.5.tgz", + "integrity": "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.5.tgz", + "integrity": "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.5.tgz", + "integrity": "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.5.tgz", + "integrity": "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.5.tgz", + "integrity": "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.5.tgz", + "integrity": "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.5.tgz", + "integrity": "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==", + "cpu": [ + "loong64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.5.tgz", + "integrity": "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==", + "cpu": [ + "mips64el" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.5.tgz", + "integrity": "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.5.tgz", + "integrity": "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.5.tgz", + "integrity": "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==", + "cpu": [ + "s390x" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz", + "integrity": "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.5.tgz", + "integrity": "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.5.tgz", + "integrity": "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.5.tgz", + "integrity": "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.5.tgz", + "integrity": "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.5.tgz", + "integrity": "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.5.tgz", + "integrity": "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.5.tgz", + "integrity": "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz", + "integrity": "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" + }, + "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/@rollup/rollup-android-arm-eabi": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.43.0.tgz", + "integrity": "sha512-Krjy9awJl6rKbruhQDgivNbD1WuLb8xAclM4IR4cN5pHGAs2oIMMQJEiC3IC/9TZJ+QZkmZhlMO/6MBGxPidpw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.43.0.tgz", + "integrity": "sha512-ss4YJwRt5I63454Rpj+mXCXicakdFmKnUNxr1dLK+5rv5FJgAxnN7s31a5VchRYxCFWdmnDWKd0wbAdTr0J5EA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.43.0.tgz", + "integrity": "sha512-eKoL8ykZ7zz8MjgBenEF2OoTNFAPFz1/lyJ5UmmFSz5jW+7XbH1+MAgCVHy72aG59rbuQLcJeiMrP8qP5d/N0A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.43.0.tgz", + "integrity": "sha512-SYwXJgaBYW33Wi/q4ubN+ldWC4DzQY62S4Ll2dgfr/dbPoF50dlQwEaEHSKrQdSjC6oIe1WgzosoaNoHCdNuMg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.43.0.tgz", + "integrity": "sha512-SV+U5sSo0yujrjzBF7/YidieK2iF6E7MdF6EbYxNz94lA+R0wKl3SiixGyG/9Klab6uNBIqsN7j4Y/Fya7wAjQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.43.0.tgz", + "integrity": "sha512-J7uCsiV13L/VOeHJBo5SjasKiGxJ0g+nQTrBkAsmQBIdil3KhPnSE9GnRon4ejX1XDdsmK/l30IYLiAaQEO0Cg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.43.0.tgz", + "integrity": "sha512-gTJ/JnnjCMc15uwB10TTATBEhK9meBIY+gXP4s0sHD1zHOaIh4Dmy1X9wup18IiY9tTNk5gJc4yx9ctj/fjrIw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.43.0.tgz", + "integrity": "sha512-ZJ3gZynL1LDSIvRfz0qXtTNs56n5DI2Mq+WACWZ7yGHFUEirHBRt7fyIk0NsCKhmRhn7WAcjgSkSVVxKlPNFFw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.43.0.tgz", + "integrity": "sha512-8FnkipasmOOSSlfucGYEu58U8cxEdhziKjPD2FIa0ONVMxvl/hmONtX/7y4vGjdUhjcTHlKlDhw3H9t98fPvyA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.43.0.tgz", + "integrity": "sha512-KPPyAdlcIZ6S9C3S2cndXDkV0Bb1OSMsX0Eelr2Bay4EsF9yi9u9uzc9RniK3mcUGCLhWY9oLr6er80P5DE6XA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.43.0.tgz", + "integrity": "sha512-HPGDIH0/ZzAZjvtlXj6g+KDQ9ZMHfSP553za7o2Odegb/BEfwJcR0Sw0RLNpQ9nC6Gy8s+3mSS9xjZ0n3rhcYg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.43.0.tgz", + "integrity": "sha512-gEmwbOws4U4GLAJDhhtSPWPXUzDfMRedT3hFMyRAvM9Mrnj+dJIFIeL7otsv2WF3D7GrV0GIewW0y28dOYWkmw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.43.0.tgz", + "integrity": "sha512-XXKvo2e+wFtXZF/9xoWohHg+MuRnvO29TI5Hqe9xwN5uN8NKUYy7tXUG3EZAlfchufNCTHNGjEx7uN78KsBo0g==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.43.0.tgz", + "integrity": "sha512-ruf3hPWhjw6uDFsOAzmbNIvlXFXlBQ4nk57Sec8E8rUxs/AI4HD6xmiiasOOx/3QxS2f5eQMKTAwk7KHwpzr/Q==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.43.0.tgz", + "integrity": "sha512-QmNIAqDiEMEvFV15rsSnjoSmO0+eJLoKRD9EAa9rrYNwO/XRCtOGM3A5A0X+wmG+XRrw9Fxdsw+LnyYiZWWcVw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.43.0.tgz", + "integrity": "sha512-jAHr/S0iiBtFyzjhOkAics/2SrXE092qyqEg96e90L3t9Op8OTzS6+IX0Fy5wCt2+KqeHAkti+eitV0wvblEoQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.43.0.tgz", + "integrity": "sha512-3yATWgdeXyuHtBhrLt98w+5fKurdqvs8B53LaoKD7P7H7FKOONLsBVMNl9ghPQZQuYcceV5CDyPfyfGpMWD9mQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.43.0.tgz", + "integrity": "sha512-wVzXp2qDSCOpcBCT5WRWLmpJRIzv23valvcTwMHEobkjippNf+C3ys/+wf07poPkeNix0paTNemB2XrHr2TnGw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.43.0.tgz", + "integrity": "sha512-fYCTEyzf8d+7diCw8b+asvWDCLMjsCEA8alvtAutqJOJp/wL5hs1rWSqJ1vkjgW0L2NB4bsYJrpKkiIPRR9dvw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.43.0.tgz", + "integrity": "sha512-SnGhLiE5rlK0ofq8kzuDkM0g7FN1s5VYY+YSMTibP7CqShxCQvqtNxTARS4xX4PFJfHjG0ZQYX9iGzI3FQh5Aw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@smithy/service-error-classification": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.1.5.tgz", + "integrity": "sha512-uBDTIBBEdAQryvHdc5W8sS5YX7RQzF683XrHePVdFmAgKiMofU15FLSM0/HU03hKTnazdNRFa0YHS7+ArwoUSQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^2.12.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/service-error-classification/node_modules/@smithy/types": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.12.0.tgz", + "integrity": "sha512-QwYgloJ0sVNBeBuBs65cIkTbfzV/Q6ZNPCJ99EICFEdJYG50nGIY/uYXp+TbsdJReIuPr0a0kXmCvren3MbRRw==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/types": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", + "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@types/aws-lambda": { + "version": "8.10.150", + "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.150.tgz", + "integrity": "sha512-AX+AbjH/rH5ezX1fbK8onC/a+HyQHo7QGmvoxAE42n22OsciAxvZoZNEr22tbXs8WfP1nIsBjKDpgPm3HjOZbA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/chai": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", + "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*" + } + }, + "node_modules/@types/cls-hooked": { + "version": "4.3.9", + "resolved": "https://registry.npmjs.org/@types/cls-hooked/-/cls-hooked-4.3.9.tgz", + "integrity": "sha512-CMtHMz6Q/dkfcHarq9nioXH8BDPP+v5xvd+N90lBQ2bdmu06UvnLDqxTKoOJzz4SzIwb/x9i4UXGAAcnUDuIvg==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.15.32", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.32.tgz", + "integrity": "sha512-3jigKqgSjsH6gYZv2nEsqdXfZqIFGAV36XYYjf9KGZ3PSG+IhLecqPnI310RvjutyMwifE2hhhNEklOUrvx/wA==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@vitest/expect": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.3.tgz", + "integrity": "sha512-W2RH2TPWVHA1o7UmaFKISPvdicFJH+mjykctJFoAkUw+SPTJTGjUNdKscFBrqM7IPnCVu6zihtKYa7TkZS1dkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/spy": "3.2.3", + "@vitest/utils": "3.2.3", + "chai": "^5.2.0", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.3.tgz", + "integrity": "sha512-cP6fIun+Zx8he4rbWvi+Oya6goKQDZK+Yq4hhlggwQBbrlOQ4qtZ+G4nxB6ZnzI9lyIb+JnvyiJnPC2AGbKSPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "3.2.3", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.17" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.3.tgz", + "integrity": "sha512-yFglXGkr9hW/yEXngO+IKMhP0jxyFw2/qys/CK4fFUZnSltD+MU7dVYGrH8rvPcK/O6feXQA+EU33gjaBBbAng==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.3.tgz", + "integrity": "sha512-83HWYisT3IpMaU9LN+VN+/nLHVBCSIUKJzGxC5RWUOsK1h3USg7ojL+UXQR3b4o4UBIWCYdD2fxuzM7PQQ1u8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "3.2.3", + "pathe": "^2.0.3", + "strip-literal": "^3.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.3.tgz", + "integrity": "sha512-9gIVWx2+tysDqUmmM1L0hwadyumqssOL1r8KJipwLx5JVYyxvVRfxvMq7DaWbZZsCqZnu/dZedaZQh4iYTtneA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.2.3", + "magic-string": "^0.30.17", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.3.tgz", + "integrity": "sha512-JHu9Wl+7bf6FEejTCREy+DmgWe+rQKbK+y32C/k5f4TBIAlijhJbRBIRIOCEpVevgRsCQR2iHRUH2/qKVM/plw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyspy": "^4.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.3.tgz", + "integrity": "sha512-4zFBCU5Pf+4Z6v+rwnZ1HU1yzOKKvDkMXZrymE2PBlbjKJRlrOxbvpfPSvJTGRIwGoahaOGvp+kbCoxifhzJ1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.2.3", + "loupe": "^3.1.3", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/async-hook-jl": { + "version": "1.7.6", + "resolved": "https://registry.npmjs.org/async-hook-jl/-/async-hook-jl-1.7.6.tgz", + "integrity": "sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg==", + "license": "MIT", + "dependencies": { + "stack-chain": "^1.3.7" + }, + "engines": { + "node": "^4.7 || >=6.9 || >=7.3" + } + }, + "node_modules/atomic-batcher": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/atomic-batcher/-/atomic-batcher-1.0.2.tgz", + "integrity": "sha512-EFGCRj4kLX1dHv1cDzTk+xbjBFj1GnJDpui52YmEcxxHHEWjYyT6l51U7n6WQ28osZH4S9gSybxe56Vm7vB61Q==", + "license": "MIT" + }, + "node_modules/avro-js": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/avro-js/-/avro-js-1.12.0.tgz", + "integrity": "sha512-mBhOjtHHua2MHrrgQ71YKKTGfZpS1sPvgL+QcCQ5SkUyp6qLkeTsCnQXUmATfpiOvoXB6CczzFEqn5UKbPUn3Q==", + "license": "Apache-2.0", + "dependencies": { + "underscore": "^1.13.2" + } + }, + "node_modules/aws-xray-sdk-core": { + "version": "3.10.3", + "resolved": "https://registry.npmjs.org/aws-xray-sdk-core/-/aws-xray-sdk-core-3.10.3.tgz", + "integrity": "sha512-bltsLAr4juMJJ2tT5/L/CtwUGIvHihtPe6SO/z3jjOD73PHhOYxcuwCMFFyTbTy5S4WThJO32oZk7r+pg3ZoCQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.4.1", + "@smithy/service-error-classification": "^2.0.4", + "@types/cls-hooked": "^4.3.3", + "atomic-batcher": "^1.0.2", + "cls-hooked": "^4.2.2", + "semver": "^7.5.3" + }, + "engines": { + "node": ">= 14.x" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/chai": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.2.0.tgz", + "integrity": "sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/check-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + } + }, + "node_modules/cls-hooked": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/cls-hooked/-/cls-hooked-4.2.2.tgz", + "integrity": "sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw==", + "license": "BSD-2-Clause", + "dependencies": { + "async-hook-jl": "^1.7.6", + "emitter-listener": "^1.0.1", + "semver": "^5.4.1" + }, + "engines": { + "node": "^4.7 || >=6.9 || >=7.3 || >=8.2.1" + } + }, + "node_modules/cls-hooked/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/emitter-listener": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/emitter-listener/-/emitter-listener-1.1.2.tgz", + "integrity": "sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ==", + "license": "BSD-2-Clause", + "dependencies": { + "shimmer": "^1.2.0" + } + }, + "node_modules/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.5.tgz", + "integrity": "sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.5", + "@esbuild/android-arm": "0.25.5", + "@esbuild/android-arm64": "0.25.5", + "@esbuild/android-x64": "0.25.5", + "@esbuild/darwin-arm64": "0.25.5", + "@esbuild/darwin-x64": "0.25.5", + "@esbuild/freebsd-arm64": "0.25.5", + "@esbuild/freebsd-x64": "0.25.5", + "@esbuild/linux-arm": "0.25.5", + "@esbuild/linux-arm64": "0.25.5", + "@esbuild/linux-ia32": "0.25.5", + "@esbuild/linux-loong64": "0.25.5", + "@esbuild/linux-mips64el": "0.25.5", + "@esbuild/linux-ppc64": "0.25.5", + "@esbuild/linux-riscv64": "0.25.5", + "@esbuild/linux-s390x": "0.25.5", + "@esbuild/linux-x64": "0.25.5", + "@esbuild/netbsd-arm64": "0.25.5", + "@esbuild/netbsd-x64": "0.25.5", + "@esbuild/openbsd-arm64": "0.25.5", + "@esbuild/openbsd-x64": "0.25.5", + "@esbuild/sunos-x64": "0.25.5", + "@esbuild/win32-arm64": "0.25.5", + "@esbuild/win32-ia32": "0.25.5", + "@esbuild/win32-x64": "0.25.5" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/expect-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.1.tgz", + "integrity": "sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/fdir": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", + "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "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/get-tsconfig": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz", + "integrity": "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "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/loupe": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.4.tgz", + "integrity": "sha512-wJzkKwJrheKtknCOKNEtDK4iqg/MxmZheEMtSTYvnzRdEYaZzmgH976nenp8WdJRdx5Vc1X/9MO0Oszl6ezeXg==", + "dev": true, + "license": "MIT" + }, + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathval": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", + "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16" + } + }, + "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": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/protobufjs": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.3.tgz", + "integrity": "sha512-sildjKwVqOI2kmFDiXQ6aEB0fjYTafpEvIBs8tOR8qI4spuL9OPROLVu2qZqi/xgCfsHIwVqlaF8JBjWFHnKbw==", + "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/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/rollup": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.43.0.tgz", + "integrity": "sha512-wdN2Kd3Twh8MAEOEJZsuxuLKCsBEo4PVNLK6tQWAn10VhsVewQLzcucMgLolRlhFybGxfclbPeEYBaP6RvUFGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.7" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.43.0", + "@rollup/rollup-android-arm64": "4.43.0", + "@rollup/rollup-darwin-arm64": "4.43.0", + "@rollup/rollup-darwin-x64": "4.43.0", + "@rollup/rollup-freebsd-arm64": "4.43.0", + "@rollup/rollup-freebsd-x64": "4.43.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.43.0", + "@rollup/rollup-linux-arm-musleabihf": "4.43.0", + "@rollup/rollup-linux-arm64-gnu": "4.43.0", + "@rollup/rollup-linux-arm64-musl": "4.43.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.43.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.43.0", + "@rollup/rollup-linux-riscv64-gnu": "4.43.0", + "@rollup/rollup-linux-riscv64-musl": "4.43.0", + "@rollup/rollup-linux-s390x-gnu": "4.43.0", + "@rollup/rollup-linux-x64-gnu": "4.43.0", + "@rollup/rollup-linux-x64-musl": "4.43.0", + "@rollup/rollup-win32-arm64-msvc": "4.43.0", + "@rollup/rollup-win32-ia32-msvc": "4.43.0", + "@rollup/rollup-win32-x64-msvc": "4.43.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/rollup/node_modules/@types/estree": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "dev": true, + "license": "MIT" + }, + "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/shimmer": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz", + "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==", + "license": "BSD-2-Clause" + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stack-chain": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/stack-chain/-/stack-chain-1.3.7.tgz", + "integrity": "sha512-D8cWtWVdIe/jBA7v5p5Hwl5yOSOrmZPWDPe2KxQ5UAGD+nxbxU0lKXA4h85Ta6+qgdKVL3vUxsbIZjc1kBG7ug==", + "license": "MIT" + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/std-env": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", + "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", + "dev": true, + "license": "MIT" + }, + "node_modules/strip-literal": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", + "integrity": "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^9.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinypool": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", + "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.3.tgz", + "integrity": "sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "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/tsx": { + "version": "4.20.3", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.3.tgz", + "integrity": "sha512-qjbnuR9Tr+FJOMBqJCW5ehvIo/buZq7vH7qD7JziU98h6l3qGy0a/yPFjwO+y0/T7GFpNgNAvEcPPVfyT8rrPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.25.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/underscore": { + "version": "1.13.7", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", + "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==", + "license": "MIT" + }, + "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/vite": { + "version": "6.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", + "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.3.tgz", + "integrity": "sha512-gc8aAifGuDIpZHrPjuHyP4dpQmYXqWw7D1GmDnWeNWP654UEXzVfQ5IHPSK5HaHkwB/+p1atpYpSdw/2kOv8iQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.4.1", + "es-module-lexer": "^1.7.0", + "pathe": "^2.0.3", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vitest": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.3.tgz", + "integrity": "sha512-E6U2ZFXe3N/t4f5BwUaVCKRLHqUpk1CBWeMh78UT4VaTPH/2dyvH6ALl29JTovEPu9dVKr/K/J4PkXgrMbw4Ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/expect": "3.2.3", + "@vitest/mocker": "3.2.3", + "@vitest/pretty-format": "^3.2.3", + "@vitest/runner": "3.2.3", + "@vitest/snapshot": "3.2.3", + "@vitest/spy": "3.2.3", + "@vitest/utils": "3.2.3", + "chai": "^5.2.0", + "debug": "^4.4.1", + "expect-type": "^1.2.1", + "magic-string": "^0.30.17", + "pathe": "^2.0.3", + "picomatch": "^4.0.2", + "std-env": "^3.9.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.14", + "tinypool": "^1.1.0", + "tinyrainbow": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", + "vite-node": "3.2.3", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/debug": "^4.1.12", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@vitest/browser": "3.2.3", + "@vitest/ui": "3.2.3", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/debug": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/zod": { + "version": "3.25.67", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.67.tgz", + "integrity": "sha512-idA2YXwpCdqUSKRCACDE6ItZD9TZzy3OZMtpfLoh6oPR47lipysRrJfjzMqFxQ3uJuUPyUeWe1r9vLH33xO/Qw==", + "devOptional": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/examples/kafka/app/package.json b/examples/kafka/app/package.json new file mode 100644 index 0000000000..721228438d --- /dev/null +++ b/examples/kafka/app/package.json @@ -0,0 +1,31 @@ +{ + "name": "kafka-examples", + "version": "1.0.0", + "description": "kafka examples for AWS Lambda Powertools for TypeScript", + "author": "SAM CLI", + "license": "MIT", + "dependencies": { + "@aws-lambda-powertools/kafka": "file:aws-lambda-powertools-kafka-2.20.0.tgz", + "@aws-lambda-powertools/logger": "^2.21.0", + "@aws-lambda-powertools/metrics": "^2.21.0", + "@aws-lambda-powertools/tracer": "^2.21.0", + "protobufjs": "^7.5.3", + "avro-js": "^1.12.0", + "esbuild": "^0.25.5" + }, + "scripts": { + "unit": "jest", + "lint": "eslint '*.ts' --quiet --fix", + "compile": "tsc", + "test": "npm run compile && npm run unit" + }, + "devDependencies": { + "@biomejs/biome": "^1.9.4", + "@types/aws-lambda": "^8.10.149", + "@types/node": "^22.15.23", + "tsx": "^4.19.4", + "typescript": "^5.8.3", + "vitest": "^3.0.5", + "zod": "^3.25.32" + } +} diff --git a/examples/kafka/app/product.es6.generated.d.ts b/examples/kafka/app/product.es6.generated.d.ts new file mode 100644 index 0000000000..ba2ec57ae6 --- /dev/null +++ b/examples/kafka/app/product.es6.generated.d.ts @@ -0,0 +1,110 @@ +import * as $protobuf from "protobufjs"; +import Long = require("long"); +/** Properties of a Product. */ +export interface IProduct { + + /** Product id */ + id?: (number|null); + + /** Product name */ + name?: (string|null); + + /** Product price */ + price?: (number|null); +} + +/** Represents a Product. */ +export class Product implements IProduct { + + /** + * Constructs a new Product. + * @param [properties] Properties to set + */ + constructor(properties?: IProduct); + + /** Product id. */ + public id: number; + + /** Product name. */ + public name: string; + + /** Product price. */ + public price: number; + + /** + * Creates a new Product instance using the specified properties. + * @param [properties] Properties to set + * @returns Product instance + */ + public static create(properties?: IProduct): Product; + + /** + * Encodes the specified Product message. Does not implicitly {@link Product.verify|verify} messages. + * @param message Product message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: IProduct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Product message, length delimited. Does not implicitly {@link Product.verify|verify} messages. + * @param message Product message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: IProduct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Product message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Product + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Product; + + /** + * Decodes a Product message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Product + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): Product; + + /** + * Verifies a Product message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Product message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Product + */ + public static fromObject(object: { [k: string]: any }): Product; + + /** + * Creates a plain object from a Product message. Also converts values to other types if specified. + * @param message Product + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: Product, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Product to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Product + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; +} diff --git a/examples/kafka/app/product.es6.generated.js b/examples/kafka/app/product.es6.generated.js new file mode 100644 index 0000000000..c1127bc488 --- /dev/null +++ b/examples/kafka/app/product.es6.generated.js @@ -0,0 +1,262 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +import * as $protobuf from "protobufjs/minimal"; + +// Common aliases +const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +export const Product = $root.Product = (() => { + + /** + * Properties of a Product. + * @exports IProduct + * @interface IProduct + * @property {number|null} [id] Product id + * @property {string|null} [name] Product name + * @property {number|null} [price] Product price + */ + + /** + * Constructs a new Product. + * @exports Product + * @classdesc Represents a Product. + * @implements IProduct + * @constructor + * @param {IProduct=} [properties] Properties to set + */ + function Product(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Product id. + * @member {number} id + * @memberof Product + * @instance + */ + Product.prototype.id = 0; + + /** + * Product name. + * @member {string} name + * @memberof Product + * @instance + */ + Product.prototype.name = ""; + + /** + * Product price. + * @member {number} price + * @memberof Product + * @instance + */ + Product.prototype.price = 0; + + /** + * Creates a new Product instance using the specified properties. + * @function create + * @memberof Product + * @static + * @param {IProduct=} [properties] Properties to set + * @returns {Product} Product instance + */ + Product.create = function create(properties) { + return new Product(properties); + }; + + /** + * Encodes the specified Product message. Does not implicitly {@link Product.verify|verify} messages. + * @function encode + * @memberof Product + * @static + * @param {IProduct} message Product message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Product.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.price != null && Object.hasOwnProperty.call(message, "price")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.price); + return writer; + }; + + /** + * Encodes the specified Product message, length delimited. Does not implicitly {@link Product.verify|verify} messages. + * @function encodeDelimited + * @memberof Product + * @static + * @param {IProduct} message Product message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Product.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Product message from the specified reader or buffer. + * @function decode + * @memberof Product + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {Product} Product + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Product.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.Product(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.id = reader.int32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + message.price = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Product message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof Product + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {Product} Product + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Product.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Product message. + * @function verify + * @memberof Product + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Product.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isInteger(message.id)) + return "id: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.price != null && message.hasOwnProperty("price")) + if (typeof message.price !== "number") + return "price: number expected"; + return null; + }; + + /** + * Creates a Product message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof Product + * @static + * @param {Object.} object Plain object + * @returns {Product} Product + */ + Product.fromObject = function fromObject(object) { + if (object instanceof $root.Product) + return object; + let message = new $root.Product(); + if (object.id != null) + message.id = object.id | 0; + if (object.name != null) + message.name = String(object.name); + if (object.price != null) + message.price = Number(object.price); + return message; + }; + + /** + * Creates a plain object from a Product message. Also converts values to other types if specified. + * @function toObject + * @memberof Product + * @static + * @param {Product} message Product + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Product.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.id = 0; + object.name = ""; + object.price = 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.price != null && message.hasOwnProperty("price")) + object.price = options.json && !isFinite(message.price) ? String(message.price) : message.price; + return object; + }; + + /** + * Converts this Product to JSON. + * @function toJSON + * @memberof Product + * @instance + * @returns {Object.} JSON object + */ + Product.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Product + * @function getTypeUrl + * @memberof Product + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Product.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/Product"; + }; + + return Product; +})(); + +export { $root as default }; diff --git a/examples/kafka/app/proto.ts b/examples/kafka/app/proto.ts new file mode 100644 index 0000000000..ff25c1c574 --- /dev/null +++ b/examples/kafka/app/proto.ts @@ -0,0 +1,34 @@ +import { deserialize } from '@aws-lambda-powertools/kafka/deserializer/protobuf'; +import type { MSKEvent } from '@aws-lambda-powertools/kafka/types'; +import { MetricResolution, Metrics } from '@aws-lambda-powertools/metrics'; +import { Tracer } from '@aws-lambda-powertools/tracer'; +import type { Context } from 'aws-lambda'; +import * as proto from './schema.generated.js'; + +const tracer = new Tracer(); +const metrics = new Metrics(); + +export const handler = async (event: MSKEvent, context: Context) => { + const segment = tracer.getSegment(); + const subsegment = segment?.addNewSubsegment('ProcessRecords'); + + const startTime = performance.now(); + for (const recordsArray of Object.values(event.records)) { + for (const record of recordsArray) { + const deserialized = deserialize( + record.value, + proto.com.example.CustomerProfile + ); + } + } + const executionTime = performance.now() - startTime; + metrics.addMetric( + `PROTOBUF_VALUE_ACCESS_${context.memoryLimitInMB}`, + 'Milliseconds', + executionTime, + MetricResolution.High + ); + + subsegment?.close(); + metrics.publishStoredMetrics(); +}; diff --git a/examples/kafka/app/schema.generated.d.ts b/examples/kafka/app/schema.generated.d.ts new file mode 100644 index 0000000000..f14c510f91 --- /dev/null +++ b/examples/kafka/app/schema.generated.d.ts @@ -0,0 +1,495 @@ +import * as $protobuf from "protobufjs"; +import Long = require("long"); +/** Namespace com. */ +export namespace com { + + /** Namespace example. */ + namespace example { + + /** PhoneType enum. */ + enum PhoneType { + HOME = 0, + WORK = 1, + MOBILE = 2 + } + + /** AccountStatus enum. */ + enum AccountStatus { + ACTIVE = 0, + INACTIVE = 1, + SUSPENDED = 2 + } + + /** Properties of an EmailAddress. */ + interface IEmailAddress { + + /** EmailAddress address */ + address?: (string|null); + + /** EmailAddress verified */ + verified?: (boolean|null); + + /** EmailAddress primary */ + primary?: (boolean|null); + } + + /** Represents an EmailAddress. */ + class EmailAddress implements IEmailAddress { + + /** + * Constructs a new EmailAddress. + * @param [properties] Properties to set + */ + constructor(properties?: com.example.IEmailAddress); + + /** EmailAddress address. */ + public address: string; + + /** EmailAddress verified. */ + public verified: boolean; + + /** EmailAddress primary. */ + public primary: boolean; + + /** + * Creates a new EmailAddress instance using the specified properties. + * @param [properties] Properties to set + * @returns EmailAddress instance + */ + public static create(properties?: com.example.IEmailAddress): com.example.EmailAddress; + + /** + * Encodes the specified EmailAddress message. Does not implicitly {@link com.example.EmailAddress.verify|verify} messages. + * @param message EmailAddress message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: com.example.IEmailAddress, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EmailAddress message, length delimited. Does not implicitly {@link com.example.EmailAddress.verify|verify} messages. + * @param message EmailAddress message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: com.example.IEmailAddress, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EmailAddress message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EmailAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): com.example.EmailAddress; + + /** + * Decodes an EmailAddress message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EmailAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): com.example.EmailAddress; + + /** + * Verifies an EmailAddress message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EmailAddress message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EmailAddress + */ + public static fromObject(object: { [k: string]: any }): com.example.EmailAddress; + + /** + * Creates a plain object from an EmailAddress message. Also converts values to other types if specified. + * @param message EmailAddress + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: com.example.EmailAddress, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EmailAddress to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EmailAddress + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Address. */ + interface IAddress { + + /** Address street */ + street?: (string|null); + + /** Address city */ + city?: (string|null); + + /** Address state */ + state?: (string|null); + + /** Address country */ + country?: (string|null); + + /** Address zipCode */ + zipCode?: (string|null); + } + + /** Represents an Address. */ + class Address implements IAddress { + + /** + * Constructs a new Address. + * @param [properties] Properties to set + */ + constructor(properties?: com.example.IAddress); + + /** Address street. */ + public street: string; + + /** Address city. */ + public city: string; + + /** Address state. */ + public state: string; + + /** Address country. */ + public country: string; + + /** Address zipCode. */ + public zipCode: string; + + /** + * Creates a new Address instance using the specified properties. + * @param [properties] Properties to set + * @returns Address instance + */ + public static create(properties?: com.example.IAddress): com.example.Address; + + /** + * Encodes the specified Address message. Does not implicitly {@link com.example.Address.verify|verify} messages. + * @param message Address message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: com.example.IAddress, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Address message, length delimited. Does not implicitly {@link com.example.Address.verify|verify} messages. + * @param message Address message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: com.example.IAddress, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Address message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Address + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): com.example.Address; + + /** + * Decodes an Address message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Address + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): com.example.Address; + + /** + * Verifies an Address message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Address message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Address + */ + public static fromObject(object: { [k: string]: any }): com.example.Address; + + /** + * Creates a plain object from an Address message. Also converts values to other types if specified. + * @param message Address + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: com.example.Address, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Address to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Address + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhoneNumber. */ + interface IPhoneNumber { + + /** PhoneNumber number */ + number?: (string|null); + + /** PhoneNumber type */ + type?: (com.example.PhoneType|null); + } + + /** Represents a PhoneNumber. */ + class PhoneNumber implements IPhoneNumber { + + /** + * Constructs a new PhoneNumber. + * @param [properties] Properties to set + */ + constructor(properties?: com.example.IPhoneNumber); + + /** PhoneNumber number. */ + public number: string; + + /** PhoneNumber type. */ + public type: com.example.PhoneType; + + /** + * Creates a new PhoneNumber instance using the specified properties. + * @param [properties] Properties to set + * @returns PhoneNumber instance + */ + public static create(properties?: com.example.IPhoneNumber): com.example.PhoneNumber; + + /** + * Encodes the specified PhoneNumber message. Does not implicitly {@link com.example.PhoneNumber.verify|verify} messages. + * @param message PhoneNumber message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: com.example.IPhoneNumber, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhoneNumber message, length delimited. Does not implicitly {@link com.example.PhoneNumber.verify|verify} messages. + * @param message PhoneNumber message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: com.example.IPhoneNumber, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhoneNumber message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhoneNumber + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): com.example.PhoneNumber; + + /** + * Decodes a PhoneNumber message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhoneNumber + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): com.example.PhoneNumber; + + /** + * Verifies a PhoneNumber message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhoneNumber message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhoneNumber + */ + public static fromObject(object: { [k: string]: any }): com.example.PhoneNumber; + + /** + * Creates a plain object from a PhoneNumber message. Also converts values to other types if specified. + * @param message PhoneNumber + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: com.example.PhoneNumber, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhoneNumber to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhoneNumber + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomerProfile. */ + interface ICustomerProfile { + + /** CustomerProfile userId */ + userId?: (string|null); + + /** CustomerProfile fullName */ + fullName?: (string|null); + + /** CustomerProfile email */ + email?: (com.example.IEmailAddress|null); + + /** CustomerProfile age */ + age?: (number|null); + + /** CustomerProfile address */ + address?: (com.example.IAddress|null); + + /** CustomerProfile phoneNumbers */ + phoneNumbers?: (com.example.IPhoneNumber[]|null); + + /** CustomerProfile preferences */ + preferences?: ({ [k: string]: string }|null); + + /** CustomerProfile accountStatus */ + accountStatus?: (com.example.AccountStatus|null); + } + + /** Represents a CustomerProfile. */ + class CustomerProfile implements ICustomerProfile { + + /** + * Constructs a new CustomerProfile. + * @param [properties] Properties to set + */ + constructor(properties?: com.example.ICustomerProfile); + + /** CustomerProfile userId. */ + public userId: string; + + /** CustomerProfile fullName. */ + public fullName: string; + + /** CustomerProfile email. */ + public email?: (com.example.IEmailAddress|null); + + /** CustomerProfile age. */ + public age: number; + + /** CustomerProfile address. */ + public address?: (com.example.IAddress|null); + + /** CustomerProfile phoneNumbers. */ + public phoneNumbers: com.example.IPhoneNumber[]; + + /** CustomerProfile preferences. */ + public preferences: { [k: string]: string }; + + /** CustomerProfile accountStatus. */ + public accountStatus: com.example.AccountStatus; + + /** + * Creates a new CustomerProfile instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomerProfile instance + */ + public static create(properties?: com.example.ICustomerProfile): com.example.CustomerProfile; + + /** + * Encodes the specified CustomerProfile message. Does not implicitly {@link com.example.CustomerProfile.verify|verify} messages. + * @param message CustomerProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: com.example.ICustomerProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomerProfile message, length delimited. Does not implicitly {@link com.example.CustomerProfile.verify|verify} messages. + * @param message CustomerProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: com.example.ICustomerProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomerProfile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomerProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): com.example.CustomerProfile; + + /** + * Decodes a CustomerProfile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomerProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): com.example.CustomerProfile; + + /** + * Verifies a CustomerProfile message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomerProfile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomerProfile + */ + public static fromObject(object: { [k: string]: any }): com.example.CustomerProfile; + + /** + * Creates a plain object from a CustomerProfile message. Also converts values to other types if specified. + * @param message CustomerProfile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: com.example.CustomerProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomerProfile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomerProfile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/examples/kafka/app/schema.generated.js b/examples/kafka/app/schema.generated.js new file mode 100644 index 0000000000..d60cc45bc2 --- /dev/null +++ b/examples/kafka/app/schema.generated.js @@ -0,0 +1,1328 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +import * as $protobuf from "protobufjs/minimal"; + +// Common aliases +const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +export const com = $root.com = (() => { + + /** + * Namespace com. + * @exports com + * @namespace + */ + const com = {}; + + com.example = (function() { + + /** + * Namespace example. + * @memberof com + * @namespace + */ + const example = {}; + + /** + * PhoneType enum. + * @name com.example.PhoneType + * @enum {number} + * @property {number} HOME=0 HOME value + * @property {number} WORK=1 WORK value + * @property {number} MOBILE=2 MOBILE value + */ + example.PhoneType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HOME"] = 0; + values[valuesById[1] = "WORK"] = 1; + values[valuesById[2] = "MOBILE"] = 2; + return values; + })(); + + /** + * AccountStatus enum. + * @name com.example.AccountStatus + * @enum {number} + * @property {number} ACTIVE=0 ACTIVE value + * @property {number} INACTIVE=1 INACTIVE value + * @property {number} SUSPENDED=2 SUSPENDED value + */ + example.AccountStatus = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTIVE"] = 0; + values[valuesById[1] = "INACTIVE"] = 1; + values[valuesById[2] = "SUSPENDED"] = 2; + return values; + })(); + + example.EmailAddress = (function() { + + /** + * Properties of an EmailAddress. + * @memberof com.example + * @interface IEmailAddress + * @property {string|null} [address] EmailAddress address + * @property {boolean|null} [verified] EmailAddress verified + * @property {boolean|null} [primary] EmailAddress primary + */ + + /** + * Constructs a new EmailAddress. + * @memberof com.example + * @classdesc Represents an EmailAddress. + * @implements IEmailAddress + * @constructor + * @param {com.example.IEmailAddress=} [properties] Properties to set + */ + function EmailAddress(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EmailAddress address. + * @member {string} address + * @memberof com.example.EmailAddress + * @instance + */ + EmailAddress.prototype.address = ""; + + /** + * EmailAddress verified. + * @member {boolean} verified + * @memberof com.example.EmailAddress + * @instance + */ + EmailAddress.prototype.verified = false; + + /** + * EmailAddress primary. + * @member {boolean} primary + * @memberof com.example.EmailAddress + * @instance + */ + EmailAddress.prototype.primary = false; + + /** + * Creates a new EmailAddress instance using the specified properties. + * @function create + * @memberof com.example.EmailAddress + * @static + * @param {com.example.IEmailAddress=} [properties] Properties to set + * @returns {com.example.EmailAddress} EmailAddress instance + */ + EmailAddress.create = function create(properties) { + return new EmailAddress(properties); + }; + + /** + * Encodes the specified EmailAddress message. Does not implicitly {@link com.example.EmailAddress.verify|verify} messages. + * @function encode + * @memberof com.example.EmailAddress + * @static + * @param {com.example.IEmailAddress} message EmailAddress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmailAddress.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.verified != null && Object.hasOwnProperty.call(message, "verified")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.verified); + if (message.primary != null && Object.hasOwnProperty.call(message, "primary")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.primary); + return writer; + }; + + /** + * Encodes the specified EmailAddress message, length delimited. Does not implicitly {@link com.example.EmailAddress.verify|verify} messages. + * @function encodeDelimited + * @memberof com.example.EmailAddress + * @static + * @param {com.example.IEmailAddress} message EmailAddress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmailAddress.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EmailAddress message from the specified reader or buffer. + * @function decode + * @memberof com.example.EmailAddress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {com.example.EmailAddress} EmailAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmailAddress.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.com.example.EmailAddress(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.address = reader.string(); + break; + } + case 2: { + message.verified = reader.bool(); + break; + } + case 3: { + message.primary = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EmailAddress message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof com.example.EmailAddress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {com.example.EmailAddress} EmailAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmailAddress.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EmailAddress message. + * @function verify + * @memberof com.example.EmailAddress + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmailAddress.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.verified != null && message.hasOwnProperty("verified")) + if (typeof message.verified !== "boolean") + return "verified: boolean expected"; + if (message.primary != null && message.hasOwnProperty("primary")) + if (typeof message.primary !== "boolean") + return "primary: boolean expected"; + return null; + }; + + /** + * Creates an EmailAddress message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof com.example.EmailAddress + * @static + * @param {Object.} object Plain object + * @returns {com.example.EmailAddress} EmailAddress + */ + EmailAddress.fromObject = function fromObject(object) { + if (object instanceof $root.com.example.EmailAddress) + return object; + let message = new $root.com.example.EmailAddress(); + if (object.address != null) + message.address = String(object.address); + if (object.verified != null) + message.verified = Boolean(object.verified); + if (object.primary != null) + message.primary = Boolean(object.primary); + return message; + }; + + /** + * Creates a plain object from an EmailAddress message. Also converts values to other types if specified. + * @function toObject + * @memberof com.example.EmailAddress + * @static + * @param {com.example.EmailAddress} message EmailAddress + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EmailAddress.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.address = ""; + object.verified = false; + object.primary = false; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.verified != null && message.hasOwnProperty("verified")) + object.verified = message.verified; + if (message.primary != null && message.hasOwnProperty("primary")) + object.primary = message.primary; + return object; + }; + + /** + * Converts this EmailAddress to JSON. + * @function toJSON + * @memberof com.example.EmailAddress + * @instance + * @returns {Object.} JSON object + */ + EmailAddress.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EmailAddress + * @function getTypeUrl + * @memberof com.example.EmailAddress + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EmailAddress.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/com.example.EmailAddress"; + }; + + return EmailAddress; + })(); + + example.Address = (function() { + + /** + * Properties of an Address. + * @memberof com.example + * @interface IAddress + * @property {string|null} [street] Address street + * @property {string|null} [city] Address city + * @property {string|null} [state] Address state + * @property {string|null} [country] Address country + * @property {string|null} [zipCode] Address zipCode + */ + + /** + * Constructs a new Address. + * @memberof com.example + * @classdesc Represents an Address. + * @implements IAddress + * @constructor + * @param {com.example.IAddress=} [properties] Properties to set + */ + function Address(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Address street. + * @member {string} street + * @memberof com.example.Address + * @instance + */ + Address.prototype.street = ""; + + /** + * Address city. + * @member {string} city + * @memberof com.example.Address + * @instance + */ + Address.prototype.city = ""; + + /** + * Address state. + * @member {string} state + * @memberof com.example.Address + * @instance + */ + Address.prototype.state = ""; + + /** + * Address country. + * @member {string} country + * @memberof com.example.Address + * @instance + */ + Address.prototype.country = ""; + + /** + * Address zipCode. + * @member {string} zipCode + * @memberof com.example.Address + * @instance + */ + Address.prototype.zipCode = ""; + + /** + * Creates a new Address instance using the specified properties. + * @function create + * @memberof com.example.Address + * @static + * @param {com.example.IAddress=} [properties] Properties to set + * @returns {com.example.Address} Address instance + */ + Address.create = function create(properties) { + return new Address(properties); + }; + + /** + * Encodes the specified Address message. Does not implicitly {@link com.example.Address.verify|verify} messages. + * @function encode + * @memberof com.example.Address + * @static + * @param {com.example.IAddress} message Address message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Address.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.street != null && Object.hasOwnProperty.call(message, "street")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.street); + if (message.city != null && Object.hasOwnProperty.call(message, "city")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.city); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.state); + if (message.country != null && Object.hasOwnProperty.call(message, "country")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.country); + if (message.zipCode != null && Object.hasOwnProperty.call(message, "zipCode")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.zipCode); + return writer; + }; + + /** + * Encodes the specified Address message, length delimited. Does not implicitly {@link com.example.Address.verify|verify} messages. + * @function encodeDelimited + * @memberof com.example.Address + * @static + * @param {com.example.IAddress} message Address message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Address.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Address message from the specified reader or buffer. + * @function decode + * @memberof com.example.Address + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {com.example.Address} Address + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Address.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.com.example.Address(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.street = reader.string(); + break; + } + case 2: { + message.city = reader.string(); + break; + } + case 3: { + message.state = reader.string(); + break; + } + case 4: { + message.country = reader.string(); + break; + } + case 5: { + message.zipCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Address message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof com.example.Address + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {com.example.Address} Address + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Address.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Address message. + * @function verify + * @memberof com.example.Address + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Address.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.street != null && message.hasOwnProperty("street")) + if (!$util.isString(message.street)) + return "street: string expected"; + if (message.city != null && message.hasOwnProperty("city")) + if (!$util.isString(message.city)) + return "city: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + if (!$util.isString(message.state)) + return "state: string expected"; + if (message.country != null && message.hasOwnProperty("country")) + if (!$util.isString(message.country)) + return "country: string expected"; + if (message.zipCode != null && message.hasOwnProperty("zipCode")) + if (!$util.isString(message.zipCode)) + return "zipCode: string expected"; + return null; + }; + + /** + * Creates an Address message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof com.example.Address + * @static + * @param {Object.} object Plain object + * @returns {com.example.Address} Address + */ + Address.fromObject = function fromObject(object) { + if (object instanceof $root.com.example.Address) + return object; + let message = new $root.com.example.Address(); + if (object.street != null) + message.street = String(object.street); + if (object.city != null) + message.city = String(object.city); + if (object.state != null) + message.state = String(object.state); + if (object.country != null) + message.country = String(object.country); + if (object.zipCode != null) + message.zipCode = String(object.zipCode); + return message; + }; + + /** + * Creates a plain object from an Address message. Also converts values to other types if specified. + * @function toObject + * @memberof com.example.Address + * @static + * @param {com.example.Address} message Address + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Address.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.street = ""; + object.city = ""; + object.state = ""; + object.country = ""; + object.zipCode = ""; + } + if (message.street != null && message.hasOwnProperty("street")) + object.street = message.street; + if (message.city != null && message.hasOwnProperty("city")) + object.city = message.city; + if (message.state != null && message.hasOwnProperty("state")) + object.state = message.state; + if (message.country != null && message.hasOwnProperty("country")) + object.country = message.country; + if (message.zipCode != null && message.hasOwnProperty("zipCode")) + object.zipCode = message.zipCode; + return object; + }; + + /** + * Converts this Address to JSON. + * @function toJSON + * @memberof com.example.Address + * @instance + * @returns {Object.} JSON object + */ + Address.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Address + * @function getTypeUrl + * @memberof com.example.Address + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Address.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/com.example.Address"; + }; + + return Address; + })(); + + example.PhoneNumber = (function() { + + /** + * Properties of a PhoneNumber. + * @memberof com.example + * @interface IPhoneNumber + * @property {string|null} [number] PhoneNumber number + * @property {com.example.PhoneType|null} [type] PhoneNumber type + */ + + /** + * Constructs a new PhoneNumber. + * @memberof com.example + * @classdesc Represents a PhoneNumber. + * @implements IPhoneNumber + * @constructor + * @param {com.example.IPhoneNumber=} [properties] Properties to set + */ + function PhoneNumber(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhoneNumber number. + * @member {string} number + * @memberof com.example.PhoneNumber + * @instance + */ + PhoneNumber.prototype.number = ""; + + /** + * PhoneNumber type. + * @member {com.example.PhoneType} type + * @memberof com.example.PhoneNumber + * @instance + */ + PhoneNumber.prototype.type = 0; + + /** + * Creates a new PhoneNumber instance using the specified properties. + * @function create + * @memberof com.example.PhoneNumber + * @static + * @param {com.example.IPhoneNumber=} [properties] Properties to set + * @returns {com.example.PhoneNumber} PhoneNumber instance + */ + PhoneNumber.create = function create(properties) { + return new PhoneNumber(properties); + }; + + /** + * Encodes the specified PhoneNumber message. Does not implicitly {@link com.example.PhoneNumber.verify|verify} messages. + * @function encode + * @memberof com.example.PhoneNumber + * @static + * @param {com.example.IPhoneNumber} message PhoneNumber message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhoneNumber.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.number); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified PhoneNumber message, length delimited. Does not implicitly {@link com.example.PhoneNumber.verify|verify} messages. + * @function encodeDelimited + * @memberof com.example.PhoneNumber + * @static + * @param {com.example.IPhoneNumber} message PhoneNumber message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhoneNumber.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhoneNumber message from the specified reader or buffer. + * @function decode + * @memberof com.example.PhoneNumber + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {com.example.PhoneNumber} PhoneNumber + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhoneNumber.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.com.example.PhoneNumber(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.number = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhoneNumber message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof com.example.PhoneNumber + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {com.example.PhoneNumber} PhoneNumber + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhoneNumber.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhoneNumber message. + * @function verify + * @memberof com.example.PhoneNumber + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhoneNumber.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isString(message.number)) + return "number: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a PhoneNumber message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof com.example.PhoneNumber + * @static + * @param {Object.} object Plain object + * @returns {com.example.PhoneNumber} PhoneNumber + */ + PhoneNumber.fromObject = function fromObject(object) { + if (object instanceof $root.com.example.PhoneNumber) + return object; + let message = new $root.com.example.PhoneNumber(); + if (object.number != null) + message.number = String(object.number); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "HOME": + case 0: + message.type = 0; + break; + case "WORK": + case 1: + message.type = 1; + break; + case "MOBILE": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a PhoneNumber message. Also converts values to other types if specified. + * @function toObject + * @memberof com.example.PhoneNumber + * @static + * @param {com.example.PhoneNumber} message PhoneNumber + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhoneNumber.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.number = ""; + object.type = options.enums === String ? "HOME" : 0; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.com.example.PhoneType[message.type] === undefined ? message.type : $root.com.example.PhoneType[message.type] : message.type; + return object; + }; + + /** + * Converts this PhoneNumber to JSON. + * @function toJSON + * @memberof com.example.PhoneNumber + * @instance + * @returns {Object.} JSON object + */ + PhoneNumber.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhoneNumber + * @function getTypeUrl + * @memberof com.example.PhoneNumber + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhoneNumber.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/com.example.PhoneNumber"; + }; + + return PhoneNumber; + })(); + + example.CustomerProfile = (function() { + + /** + * Properties of a CustomerProfile. + * @memberof com.example + * @interface ICustomerProfile + * @property {string|null} [userId] CustomerProfile userId + * @property {string|null} [fullName] CustomerProfile fullName + * @property {com.example.IEmailAddress|null} [email] CustomerProfile email + * @property {number|null} [age] CustomerProfile age + * @property {com.example.IAddress|null} [address] CustomerProfile address + * @property {Array.|null} [phoneNumbers] CustomerProfile phoneNumbers + * @property {Object.|null} [preferences] CustomerProfile preferences + * @property {com.example.AccountStatus|null} [accountStatus] CustomerProfile accountStatus + */ + + /** + * Constructs a new CustomerProfile. + * @memberof com.example + * @classdesc Represents a CustomerProfile. + * @implements ICustomerProfile + * @constructor + * @param {com.example.ICustomerProfile=} [properties] Properties to set + */ + function CustomerProfile(properties) { + this.phoneNumbers = []; + this.preferences = {}; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomerProfile userId. + * @member {string} userId + * @memberof com.example.CustomerProfile + * @instance + */ + CustomerProfile.prototype.userId = ""; + + /** + * CustomerProfile fullName. + * @member {string} fullName + * @memberof com.example.CustomerProfile + * @instance + */ + CustomerProfile.prototype.fullName = ""; + + /** + * CustomerProfile email. + * @member {com.example.IEmailAddress|null|undefined} email + * @memberof com.example.CustomerProfile + * @instance + */ + CustomerProfile.prototype.email = null; + + /** + * CustomerProfile age. + * @member {number} age + * @memberof com.example.CustomerProfile + * @instance + */ + CustomerProfile.prototype.age = 0; + + /** + * CustomerProfile address. + * @member {com.example.IAddress|null|undefined} address + * @memberof com.example.CustomerProfile + * @instance + */ + CustomerProfile.prototype.address = null; + + /** + * CustomerProfile phoneNumbers. + * @member {Array.} phoneNumbers + * @memberof com.example.CustomerProfile + * @instance + */ + CustomerProfile.prototype.phoneNumbers = $util.emptyArray; + + /** + * CustomerProfile preferences. + * @member {Object.} preferences + * @memberof com.example.CustomerProfile + * @instance + */ + CustomerProfile.prototype.preferences = $util.emptyObject; + + /** + * CustomerProfile accountStatus. + * @member {com.example.AccountStatus} accountStatus + * @memberof com.example.CustomerProfile + * @instance + */ + CustomerProfile.prototype.accountStatus = 0; + + /** + * Creates a new CustomerProfile instance using the specified properties. + * @function create + * @memberof com.example.CustomerProfile + * @static + * @param {com.example.ICustomerProfile=} [properties] Properties to set + * @returns {com.example.CustomerProfile} CustomerProfile instance + */ + CustomerProfile.create = function create(properties) { + return new CustomerProfile(properties); + }; + + /** + * Encodes the specified CustomerProfile message. Does not implicitly {@link com.example.CustomerProfile.verify|verify} messages. + * @function encode + * @memberof com.example.CustomerProfile + * @static + * @param {com.example.ICustomerProfile} message CustomerProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomerProfile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.email != null && Object.hasOwnProperty.call(message, "email")) + $root.com.example.EmailAddress.encode(message.email, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.age != null && Object.hasOwnProperty.call(message, "age")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.age); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + $root.com.example.Address.encode(message.address, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.phoneNumbers != null && message.phoneNumbers.length) + for (let i = 0; i < message.phoneNumbers.length; ++i) + $root.com.example.PhoneNumber.encode(message.phoneNumbers[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.preferences != null && Object.hasOwnProperty.call(message, "preferences")) + for (let keys = Object.keys(message.preferences), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.preferences[keys[i]]).ldelim(); + if (message.accountStatus != null && Object.hasOwnProperty.call(message, "accountStatus")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.accountStatus); + return writer; + }; + + /** + * Encodes the specified CustomerProfile message, length delimited. Does not implicitly {@link com.example.CustomerProfile.verify|verify} messages. + * @function encodeDelimited + * @memberof com.example.CustomerProfile + * @static + * @param {com.example.ICustomerProfile} message CustomerProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomerProfile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomerProfile message from the specified reader or buffer. + * @function decode + * @memberof com.example.CustomerProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {com.example.CustomerProfile} CustomerProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomerProfile.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.com.example.CustomerProfile(), key, value; + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userId = reader.string(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.email = $root.com.example.EmailAddress.decode(reader, reader.uint32()); + break; + } + case 4: { + message.age = reader.int32(); + break; + } + case 5: { + message.address = $root.com.example.Address.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.phoneNumbers && message.phoneNumbers.length)) + message.phoneNumbers = []; + message.phoneNumbers.push($root.com.example.PhoneNumber.decode(reader, reader.uint32())); + break; + } + case 7: { + if (message.preferences === $util.emptyObject) + message.preferences = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + let tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.preferences[key] = value; + break; + } + case 8: { + message.accountStatus = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomerProfile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof com.example.CustomerProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {com.example.CustomerProfile} CustomerProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomerProfile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomerProfile message. + * @function verify + * @memberof com.example.CustomerProfile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomerProfile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isString(message.userId)) + return "userId: string expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.email != null && message.hasOwnProperty("email")) { + let error = $root.com.example.EmailAddress.verify(message.email); + if (error) + return "email." + error; + } + if (message.age != null && message.hasOwnProperty("age")) + if (!$util.isInteger(message.age)) + return "age: integer expected"; + if (message.address != null && message.hasOwnProperty("address")) { + let error = $root.com.example.Address.verify(message.address); + if (error) + return "address." + error; + } + if (message.phoneNumbers != null && message.hasOwnProperty("phoneNumbers")) { + if (!Array.isArray(message.phoneNumbers)) + return "phoneNumbers: array expected"; + for (let i = 0; i < message.phoneNumbers.length; ++i) { + let error = $root.com.example.PhoneNumber.verify(message.phoneNumbers[i]); + if (error) + return "phoneNumbers." + error; + } + } + if (message.preferences != null && message.hasOwnProperty("preferences")) { + if (!$util.isObject(message.preferences)) + return "preferences: object expected"; + let key = Object.keys(message.preferences); + for (let i = 0; i < key.length; ++i) + if (!$util.isString(message.preferences[key[i]])) + return "preferences: string{k:string} expected"; + } + if (message.accountStatus != null && message.hasOwnProperty("accountStatus")) + switch (message.accountStatus) { + default: + return "accountStatus: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a CustomerProfile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof com.example.CustomerProfile + * @static + * @param {Object.} object Plain object + * @returns {com.example.CustomerProfile} CustomerProfile + */ + CustomerProfile.fromObject = function fromObject(object) { + if (object instanceof $root.com.example.CustomerProfile) + return object; + let message = new $root.com.example.CustomerProfile(); + if (object.userId != null) + message.userId = String(object.userId); + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.email != null) { + if (typeof object.email !== "object") + throw TypeError(".com.example.CustomerProfile.email: object expected"); + message.email = $root.com.example.EmailAddress.fromObject(object.email); + } + if (object.age != null) + message.age = object.age | 0; + if (object.address != null) { + if (typeof object.address !== "object") + throw TypeError(".com.example.CustomerProfile.address: object expected"); + message.address = $root.com.example.Address.fromObject(object.address); + } + if (object.phoneNumbers) { + if (!Array.isArray(object.phoneNumbers)) + throw TypeError(".com.example.CustomerProfile.phoneNumbers: array expected"); + message.phoneNumbers = []; + for (let i = 0; i < object.phoneNumbers.length; ++i) { + if (typeof object.phoneNumbers[i] !== "object") + throw TypeError(".com.example.CustomerProfile.phoneNumbers: object expected"); + message.phoneNumbers[i] = $root.com.example.PhoneNumber.fromObject(object.phoneNumbers[i]); + } + } + if (object.preferences) { + if (typeof object.preferences !== "object") + throw TypeError(".com.example.CustomerProfile.preferences: object expected"); + message.preferences = {}; + for (let keys = Object.keys(object.preferences), i = 0; i < keys.length; ++i) + message.preferences[keys[i]] = String(object.preferences[keys[i]]); + } + switch (object.accountStatus) { + default: + if (typeof object.accountStatus === "number") { + message.accountStatus = object.accountStatus; + break; + } + break; + case "ACTIVE": + case 0: + message.accountStatus = 0; + break; + case "INACTIVE": + case 1: + message.accountStatus = 1; + break; + case "SUSPENDED": + case 2: + message.accountStatus = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a CustomerProfile message. Also converts values to other types if specified. + * @function toObject + * @memberof com.example.CustomerProfile + * @static + * @param {com.example.CustomerProfile} message CustomerProfile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomerProfile.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.phoneNumbers = []; + if (options.objects || options.defaults) + object.preferences = {}; + if (options.defaults) { + object.userId = ""; + object.fullName = ""; + object.email = null; + object.age = 0; + object.address = null; + object.accountStatus = options.enums === String ? "ACTIVE" : 0; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.email != null && message.hasOwnProperty("email")) + object.email = $root.com.example.EmailAddress.toObject(message.email, options); + if (message.age != null && message.hasOwnProperty("age")) + object.age = message.age; + if (message.address != null && message.hasOwnProperty("address")) + object.address = $root.com.example.Address.toObject(message.address, options); + if (message.phoneNumbers && message.phoneNumbers.length) { + object.phoneNumbers = []; + for (let j = 0; j < message.phoneNumbers.length; ++j) + object.phoneNumbers[j] = $root.com.example.PhoneNumber.toObject(message.phoneNumbers[j], options); + } + let keys2; + if (message.preferences && (keys2 = Object.keys(message.preferences)).length) { + object.preferences = {}; + for (let j = 0; j < keys2.length; ++j) + object.preferences[keys2[j]] = message.preferences[keys2[j]]; + } + if (message.accountStatus != null && message.hasOwnProperty("accountStatus")) + object.accountStatus = options.enums === String ? $root.com.example.AccountStatus[message.accountStatus] === undefined ? message.accountStatus : $root.com.example.AccountStatus[message.accountStatus] : message.accountStatus; + return object; + }; + + /** + * Converts this CustomerProfile to JSON. + * @function toJSON + * @memberof com.example.CustomerProfile + * @instance + * @returns {Object.} JSON object + */ + CustomerProfile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomerProfile + * @function getTypeUrl + * @memberof com.example.CustomerProfile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomerProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/com.example.CustomerProfile"; + }; + + return CustomerProfile; + })(); + + return example; + })(); + + return com; +})(); + +export { $root as default }; diff --git a/examples/kafka/app/schema.proto b/examples/kafka/app/schema.proto new file mode 100644 index 0000000000..a20a1d88c3 --- /dev/null +++ b/examples/kafka/app/schema.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; + +package com.example; + +enum PhoneType { + HOME = 0; + WORK = 1; + MOBILE = 2; +} + +enum AccountStatus { + ACTIVE = 0; + INACTIVE = 1; + SUSPENDED = 2; +} + +// EmailAddress message +message EmailAddress { + string address = 1; + bool verified = 2; + bool primary = 3; +} + +// Address message +message Address { + string street = 1; + string city = 2; + string state = 3; + string country = 4; + string zip_code = 5; +} + +// PhoneNumber message +message PhoneNumber { + string number = 1; + PhoneType type = 2; +} + +// CustomerProfile message +message CustomerProfile { + string user_id = 1; + string full_name = 2; + EmailAddress email = 3; + int32 age = 4; + Address address = 5; + repeated PhoneNumber phone_numbers = 6; + map preferences = 7; + AccountStatus account_status = 8; +} diff --git a/examples/kafka/app/schema.ts b/examples/kafka/app/schema.ts new file mode 100644 index 0000000000..5e10b25d5d --- /dev/null +++ b/examples/kafka/app/schema.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const productSchema = z.object({ + id: z.number(), + name: z.string(), + price: z.number().positive({ + message: "Price can't be negative", + }), +}); diff --git a/examples/kafka/app/tsconfig.cjs.json b/examples/kafka/app/tsconfig.cjs.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/examples/kafka/app/tsconfig.esm.json b/examples/kafka/app/tsconfig.esm.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/examples/kafka/app/tsconfig.json b/examples/kafka/app/tsconfig.json new file mode 100644 index 0000000000..22bd429d0a --- /dev/null +++ b/examples/kafka/app/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "es2020", + "strict": true, + "preserveConstEnums": true, + "noEmit": true, + "sourceMap": false, + "module": "NodeNext", + "moduleResolution": "nodenext", + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true + }, + "exclude": ["node_modules"], +} \ No newline at end of file diff --git a/examples/kafka/events/event.json b/examples/kafka/events/event.json new file mode 100644 index 0000000000..070ad8e018 --- /dev/null +++ b/examples/kafka/events/event.json @@ -0,0 +1,62 @@ +{ + "body": "{\"message\": \"hello world\"}", + "resource": "/{proxy+}", + "path": "/path/to/resource", + "httpMethod": "POST", + "isBase64Encoded": false, + "queryStringParameters": { + "foo": "bar" + }, + "pathParameters": { + "proxy": "/path/to/resource" + }, + "stageVariables": { + "baz": "qux" + }, + "headers": { + "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", + "Accept-Encoding": "gzip, deflate, sdch", + "Accept-Language": "en-US,en;q=0.8", + "Cache-Control": "max-age=0", + "CloudFront-Forwarded-Proto": "https", + "CloudFront-Is-Desktop-Viewer": "true", + "CloudFront-Is-Mobile-Viewer": "false", + "CloudFront-Is-SmartTV-Viewer": "false", + "CloudFront-Is-Tablet-Viewer": "false", + "CloudFront-Viewer-Country": "US", + "Host": "1234567890.execute-api.us-east-1.amazonaws.com", + "Upgrade-Insecure-Requests": "1", + "User-Agent": "Custom User Agent String", + "Via": "1.1 08f323deadbeefa7af34d5feb414ce27.cloudfront.net (CloudFront)", + "X-Amz-Cf-Id": "cDehVQoZnx43VYQb9j2-nvCh-9z396Uhbp027Y2JvkCPNLmGJHqlaA==", + "X-Forwarded-For": "127.0.0.1, 127.0.0.2", + "X-Forwarded-Port": "443", + "X-Forwarded-Proto": "https" + }, + "requestContext": { + "accountId": "123456789012", + "resourceId": "123456", + "stage": "prod", + "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef", + "requestTime": "09/Apr/2015:12:34:56 +0000", + "requestTimeEpoch": 1428582896000, + "identity": { + "cognitoIdentityPoolId": null, + "accountId": null, + "cognitoIdentityId": null, + "caller": null, + "accessKey": null, + "sourceIp": "127.0.0.1", + "cognitoAuthenticationType": null, + "cognitoAuthenticationProvider": null, + "userArn": null, + "userAgent": "Custom User Agent String", + "user": null + }, + "path": "/prod/path/to/resource", + "resourcePath": "/{proxy+}", + "httpMethod": "POST", + "apiId": "1234567890", + "protocol": "HTTP/1.1" + } +} diff --git a/examples/kafka/samconfig.toml b/examples/kafka/samconfig.toml new file mode 100644 index 0000000000..aa61e0d613 --- /dev/null +++ b/examples/kafka/samconfig.toml @@ -0,0 +1,31 @@ +# More information about the configuration file can be found here: +# https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html +version = 0.1 + +[default] +[default.global.parameters] +stack_name = "kafka" + +[default.build.parameters] +cached = true +parallel = true + +[default.validate.parameters] +lint = true + +[default.deploy.parameters] +capabilities = "CAPABILITY_IAM" +confirm_changeset = false +resolve_s3 = true + +[default.package.parameters] +resolve_s3 = true + +[default.sync.parameters] +watch = true + +[default.local_start_api.parameters] +warm_containers = "EAGER" + +[default.local_start_lambda.parameters] +warm_containers = "EAGER" diff --git a/examples/kafka/template.yaml b/examples/kafka/template.yaml new file mode 100644 index 0000000000..123c98945a --- /dev/null +++ b/examples/kafka/template.yaml @@ -0,0 +1,103 @@ +AWSTemplateFormatVersion: "2010-09-09" +Transform: AWS::Serverless-2016-10-31 +Description: > + kafka + + Sample SAM Template for kafka + +# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst +Globals: + Function: + Timeout: 15 + MemorySize: 512 + Tracing: Active + Runtime: nodejs22.x + Architectures: + - x86_64 + Environment: + Variables: + POWERTOOLS_SERVICE_NAME: kafka-deserialization + POWERTOOLS_METRICS_NAMESPACE: kafka-nodejs + LOG_LEVEL: INFO + VpcConfig: + SubnetIds: + - subnet-057857442d9af0852 # Replace this with your VPC's default security group ID. + - subnet-0ec1c3a2883a36bf9 + SecurityGroupIds: + - sg-0ec0be541d70ca3ed # Replace this with your public subnet's ID. + +Resources: + NodeJsJsonDeserializationFunction: + Type: AWS::Serverless::Function + Properties: + CodeUri: app/ + Handler: json.handler + Runtime: nodejs22.x + Policies: + - AdministratorAccess # For demo purposes only! Remove this for production. + Events: + MSKEvent: + Type: MSK + Properties: + Stream: arn:aws:kafka:eu-west-3:992382490249:cluster/powertools-kafka-esm/f138df86-9253-4d2a-b682-19e132396d4f-s3 + StartingPosition: LATEST + MaximumBatchingWindowInSeconds: 5 + Topics: + - powertools-json-load-ts + Metadata: # Manage esbuild properties + BuildMethod: esbuild + BuildProperties: + Minify: true + Target: es2020 + EntryPoints: + - json.ts + + NodeJsAvroDeserializationFunction: + Type: AWS::Serverless::Function + Properties: + CodeUri: app/ + Handler: avro.handler + Runtime: nodejs22.x + Policies: + - AdministratorAccess # For demo purposes only! Remove this for production. + Events: + MSKEvent: + Type: MSK + Properties: + Stream: arn:aws:kafka:eu-west-3:992382490249:cluster/powertools-kafka-esm/f138df86-9253-4d2a-b682-19e132396d4f-s3 + StartingPosition: LATEST + MaximumBatchingWindowInSeconds: 5 + Topics: + - powertools-avro-load-ts + Metadata: # Manage esbuild properties + BuildMethod: esbuild + BuildProperties: + Minify: true + Target: es2020 + EntryPoints: + - avro.ts + + NodeJsProtobufDeserializationFunction: + Type: AWS::Serverless::Function + Properties: + CodeUri: app/ + Handler: proto.handler + Runtime: nodejs22.x + Policies: + - AdministratorAccess # For demo purposes only! Remove this for production. + Events: + MSKEvent: + Type: MSK + Properties: + Stream: arn:aws:kafka:eu-west-3:992382490249:cluster/powertools-kafka-esm/f138df86-9253-4d2a-b682-19e132396d4f-s3 + StartingPosition: LATEST + MaximumBatchingWindowInSeconds: 5 + Topics: + - powertools-proto-load-ts + Metadata: # Manage esbuild properties + BuildMethod: esbuild + BuildProperties: + Minify: true + Target: es2020 + EntryPoints: + - proto.ts