diff --git a/.github/workflows/ci-infra.yml b/.github/workflows/ci-infra.yml index beceadda450..417bc251e6d 100644 --- a/.github/workflows/ci-infra.yml +++ b/.github/workflows/ci-infra.yml @@ -462,3 +462,67 @@ jobs: - name: Run npm audit run: npm audit --audit-level=moderate continue-on-error: true + + # --------------------------------------------------------------------------- + # smalruby-studuino-hex + # --------------------------------------------------------------------------- + smalruby-studuino-hex-unit-tests: + name: "[studuino-hex] Unit Tests" + runs-on: ubuntu-26.04 + defaults: + run: + working-directory: infra/smalruby-studuino-hex + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version-file: infra/smalruby-studuino-hex/.node-version + cache: npm + cache-dependency-path: infra/smalruby-studuino-hex/package-lock.json + - name: Install dependencies + run: npm ci + - name: Run unit tests + run: npm test + + smalruby-studuino-hex-cdk-build: + name: "[studuino-hex] CDK Build & Synth" + runs-on: ubuntu-26.04 + defaults: + run: + working-directory: infra/smalruby-studuino-hex + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version-file: infra/smalruby-studuino-hex/.node-version + cache: npm + cache-dependency-path: infra/smalruby-studuino-hex/package-lock.json + - name: Install dependencies + run: npm ci + - name: Build TypeScript + run: npm run build + # stg と prod で許可するオリジンが違う(prod にローカルのオリジンがあると synth が落ちる)ので、両方を synth する。 + # synth はコンテナのイメージを作らない(作るのは deploy のとき)。 + - name: Synthesize CDK stack (stg) + run: npx cdk synth --context stage=stg + - name: Synthesize CDK stack (prod) + run: npx cdk synth --context stage=prod + + smalruby-studuino-hex-security: + name: "[studuino-hex] Security Audit" + runs-on: ubuntu-26.04 + defaults: + run: + working-directory: infra/smalruby-studuino-hex + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version-file: infra/smalruby-studuino-hex/.node-version + cache: npm + cache-dependency-path: infra/smalruby-studuino-hex/package-lock.json + - name: Install dependencies + run: npm ci + - name: Run npm audit + run: npm audit --audit-level=moderate + continue-on-error: true diff --git a/docs/infra-deploy/README.md b/docs/infra-deploy/README.md index 7833e2139cb..2fc090570f5 100644 --- a/docs/infra-deploy/README.md +++ b/docs/infra-deploy/README.md @@ -117,6 +117,7 @@ AssumeRole できるデプロイ用ロールを作る。信頼ポリシーは** | `INFRA_STG_DOTENV_SMALRUBY_RUBYTEE_RELAY` | 同上 | | `INFRA_STG_DOTENV_SMALRUBY_API` | 同上 | | `INFRA_STG_DOTENV_SMALRUBY_WEB_HOSTING` | 同上(中身は `STAGE=stg` だけでよい) | +| `INFRA_STG_DOTENV_SMALRUBY_STUDUINO_HEX` | 同上(秘密は無い。中身は `STAGE=stg` だけでよい) | 登録していないプロジェクトは、デプロイしようとした時点で**そのプロジェクトのジョブだけ**が 「何を登録すべきか」を示して失敗する(他のプロジェクトは進む)。 @@ -168,6 +169,7 @@ workflow は `environment: stg` を使い、**AWS 側の信頼条件も | `INFRA_PROD_DOTENV_SMALRUBY_RUBYTEE_RELAY` | `infra/smalruby-rubytee-relay/.env.prod` | | `INFRA_PROD_DOTENV_SMALRUBY_API` | prod 用の `.env`(無ければ `STAGE=prod` の 1 行) | | `INFRA_PROD_DOTENV_SMALRUBY_WEB_HOSTING` | `infra/smalruby-web-hosting/.env.prod`(`STAGE=prod` だけでよい) | + | `INFRA_PROD_DOTENV_SMALRUBY_STUDUINO_HEX` | `STAGE=prod` だけでよい(秘密は無い) | ```bash bin/gh-admin secret set INFRA_PROD_DOTENV_SMALRUBY_CLASSROOM --env prod < infra/smalruby-classroom/.env.prod diff --git a/docs/infra/README.md b/docs/infra/README.md index 06ce17c601c..958e2338900 100644 --- a/docs/infra/README.md +++ b/docs/infra/README.md @@ -10,6 +10,7 @@ Smalruby のバックエンドは **AWS CDK** で管理される独立したプ | **`infra/smalruby-rubytee-relay/`** | Rubytee (AI チャット) リレー | API Gateway HTTP API + Lambda + DynamoDB | `rubytee.api.smalruby.app` | [`docs/rubytee/`](../rubytee/) | | **`infra/smalruby-classroom/`** | クラスルーム機能 | API Gateway HTTP API + Lambda + DynamoDB + S3 | `classroom.api.smalruby.app` | [`docs/classroom/`](../classroom/) | | **`infra/smalruby-api/`** | 共通 API (CORS proxy / Mesh zone / Scratch proxy) | API Gateway HTTP API + Lambda | `api.smalruby.app` | [`smalruby-api.md`](smalruby-api.md) | +| **`infra/smalruby-studuino-hex/`** | Studuino モードの hex を作る(arduino-cli でコンパイル) | API Gateway HTTP API + Lambda(コンテナ)+ DynamoDB | なし(`execute-api` のエンドポイント) | [`smalruby-studuino-hex.md`](smalruby-studuino-hex.md)・[`docs/studuino-mode/`](../studuino-mode/) | | **`infra/smalruby-web-hosting/`** | Web 配信基盤(stg: ブランチプレビュー `preview.smalruby.app//`・prod: 本番 smalruby.app) | Route 53, S3, CloudFront, ACM, IAM (OIDC) | `preview.smalruby.app`(stg)。prod は本番 smalruby.app の配信基盤(独自ドメインは切り替え時に付ける・[`docs/hosting/`](../hosting/)) | [`smalruby-web-hosting.md`](smalruby-web-hosting.md) | ## 共通パターン diff --git a/docs/infra/smalruby-studuino-hex.md b/docs/infra/smalruby-studuino-hex.md new file mode 100644 index 00000000000..10623ff5709 --- /dev/null +++ b/docs/infra/smalruby-studuino-hex.md @@ -0,0 +1,174 @@ +# smalruby-studuino-hex(Studuino の hex を作る API) + +> **🆕 Smalruby 独自** — Studuino モードで、ブラウザから送ったプログラムを hex にして返す API。 + +機能の全体像(構文木・書きこみの流れ・ライセンス)は [`docs/studuino-mode/`](../studuino-mode/) が正。 +このページは `infra/smalruby-studuino-hex/` の作り・API・上限・計測の見方を書く。 + +## 作り + +``` +ブラウザ ──POST /compile──> API Gateway(HTTP API)──> Lambda(コンテナ)──> arduino-cli ──> hex + │ + └─> DynamoDB(IP ごとの回数) +``` + +| リソース | 名前(stg は `-stg` が付く) | 備考 | +|---|---|---| +| CloudFormation スタック | `StuduinoHexStack` | 新しい CDK プロジェクト。コンテナのビルドが重いので、ほかの Lambda のデプロイを遅くしないよう分けた | +| Lambda(コンテナ・x86_64) | `smalruby-studuino-hex-compile` | メモリ 2GB・`/tmp` 1GB・タイムアウト 30 秒 | +| HTTP API | `SmalrubyStuduinoHex` | `POST /compile`。カスタムドメインは無い(`execute-api` のエンドポイントを使う。スタックの出力 `HttpApiEndpoint`) | +| DynamoDB | `smalruby-studuino-hex-rate-limit` | IP(のハッシュ)ごとの 1 分・1 日の回数。TTL で消える。DESTROY | +| ロググループ | `/aws/lambda/smalruby-studuino-hex-compile` | prod 1 か月・stg 1 週間 | + +### コンテナの中身 + +`infra/smalruby-studuino-hex/container/`。版とハッシュは **`container/third-party.json` だけ**で決め、 +CDK が Docker の build args に渡す(Dockerfile に版を書かない)。 + +| 物 | 版 | 確かめ方 | +|---|---|---| +| arduino-cli | 1.5.1(Linux 64bit) | GitHub のリリースの sha256 を固定 | +| AVR のコア | `arduino:avr@1.8.8` | arduino-cli が index の checksum で確かめる | +| Servo・Adafruit NeoPixel | 1.2.2・1.15.2 | 同上(NeoPixel はサンプル `smalrubot-s1` だけが使う) | +| ボード定義 | アーテック社の Arduino IDE 1.6.x/1.8.x 用(`arduino_ide_settings_ver16x_18x.zip` の `other/hardware/studuino`) | URL と sha256 を固定 | +| Studuino ライブラリ | アーテック社の zip(`studuino_v1_lib.zip`) | URL と sha256 を固定(下の「ライブラリ」) | + +- ボードは **`studuino:avr:studuino`**(アーテック社のボード定義「Studuino (3.3V, 8 MHz) w/ ATmega168」)。 + 中身は `mcu=atmega168`・`f_cpu=8000000L`・`build.board=AVR_PRO`・upload は optiboot(`arduino` プロトコル・115200bps)で、 + コアとツールは `arduino:avr` のもの(`build.core=arduino:arduino`)を使う。1.7.x 用の zip は Arduino IDE 1.7(arduino.org 版)向けなので使わない。 + Studuino は ATmega168PA・8MHz・3.3V で、いまのファームウェア(`sr_studu`)と同じ。168PA は 168 と同じ命令・メモリなので + 168 向けの hex が動く。書きこみはブラウザの STK500v1(`smalrubot-firmware-flasher.js`。シグネチャ `1E 94 06`)が行う。 +- フラッシュの上限は **15,872 バイト**(ボード定義の `upload.maximum_size`。16KB から optiboot の 512 バイトを引いた値)。 + 超えたら `compile_failed`(`flash_overflow`)。 +- ボード定義が取れない・sha256 が合わないときは、イメージのビルドを止めずに、同じ MCU・クロックの + `arduino:avr:pro:cpu=8MHzatmega168`(上限 14,336 バイト)で作り、応答の `toolchain.boardError` に理由を出す。 +- イメージを作るときにサンプルを 1 回ずつコンパイルし、AVR のコアのキャッシュを `/opt/arduino/build-cache` に + 入れておく。Lambda は最初の呼び出しで `/tmp` へ写して使う(コールドスタートでもコアをコンパイルし直さない)。 +- ハンドラ(`lambda/handler.ts`)は synth のときに esbuild で `container/build/handler.js` にまとめ、 + イメージに入れる(AWS SDK はベースイメージのものを使う)。 +- イメージを作るのは `cdk deploy`(GitHub Actions の `Deploy Infra`)のとき。`cdk synth` では作らない。 + +### ライブラリ + +使うのは `Studuino`・`MMA8653`・`MPU6050`・`IRremoteForStuduino`・`ColorSensor` の 5 つ(本体が include する)。 +**リポジトリに入れない**。コンテナを作るときに `third-party.json` の `studuinoLib.url` から取り、 +`sha256` を確かめ、5 つのフォルダだけをそのまま(LICENSE・著作権表示を含めて)入れる。 + +- 取得元はアーテック社の公式の配布元(https://www.artec-kk.co.jp/studuino/ja/arduino.php )。 +- ライブラリが取れない・sha256 が合わない(または `studuinoLib.url` が空の)ときは、ライブラリなしでコンテナを作る。 + そのとき Studuino ライブラリの要るサンプルは `compile_failed`(`reason: "library_missing"`・`libraryError` に理由)を返し、 + `blink`(Arduino のコアだけ)は動く。応答の `toolchain.studuinoLib` が `null` なら入っていない。 +- URL を書いたら sha256(64 桁の 16 進)も書く(無いと synth が失敗する)。 + +## API + +### `POST /compile` + +この段階では **決まったサンプルだけ** をコンパイルする(任意の C++ は受け付けない)。構文木を受け取る形は +次の sub-issue で足す([`docs/studuino-mode/`](../studuino-mode/) の「Lambda の API」)。 + +``` +POST /compile +Origin: https://smalruby.app +Content-Type: application/json + +{ "sample": "blink" } +``` + +大きさの違うサンプルで、コンパイルの時間を測る(打ち切りの 25 秒が足りるかの材料)。 + +| サンプル | 大きさ | 中身 | Studuino ライブラリ | +|---|---|---|---| +| `blink` | 小 | A0 の LED を 0.5 秒ごとに点滅(`digitalWrite`) | 要らない | +| `studuino-led` | 小 | 同じことを Studuino ライブラリ(`InitSensorPort`・`LED`・`Timer`)で | 要る | +| `robot-car` | 中 | ロボットカーの自動運転(赤外線フォトリフレクタ 2 つで線をたどる・タッチで止まってブザー・サーボで首をふる・暗いと LED) | 要る | +| `smalrubot-s1` | 大 | スモウルボット S1 のファームウェア(`sr_studu`。smalruby/smalrubot、MIT。フォルダに LICENSE)。フラッシュの上限に近い | 要る(+ Adafruit NeoPixel) | + +成功(200): + +```json +{ + "hex": ":100000000C94...\n:00000001FF\n", + "size": 1234, + "source": "void setup() { ... }", + "maxSize": 15872, + "toolchain": { "arduinoCli": "1.5.1", "avrCore": "arduino:avr@1.8.8", "libraries": "Servo@1.2.2|Adafruit NeoPixel@1.15.2", "board": "sha256:...", "fqbn": "studuino:avr:studuino", "studuinoLib": "sha256:..." }, + "compileMs": 2345, + "coldStart": false +} +``` + +失敗は `{ "error": "<名前>", "message": "<説明>", ... }`。コンパイラの生の出力は返さない(ログにだけ残す)。 + +| HTTP | `error` | いつ | +|---|---|---| +| 400 | `invalid_request` | JSON が壊れている(`reason: "invalid_json"`)・知らないサンプル(`reason: "unknown_sample"`) | +| 403 | `forbidden_origin` | 許していない Origin・Origin が無い | +| 413 | `too_large` | 本文が上限を超えた(`maxBytes`) | +| 422 | `compile_failed` | コンパイルの失敗(`reason`: `compile_failed` / `flash_overflow` / `library_missing`) | +| 429 | `rate_limited` | IP ごとの回数を超えた(`retryAfter` 秒・`Retry-After` ヘッダ) | +| 504 | `timeout` | コンパイルを打ち切った(`timeoutMs`) | +| 500 | `internal` | それ以外 | + +### 呼べる場所 + +- CORS は共有コード(`infra/shared/cors-origins.ts` の `resolveCorsOrigins`)。prod は `https://smalruby.app` だけ、 + stg は加えてローカル(`localhost:8601`〜`8610`)とブランチプレビュー(`https://preview.smalruby.app`)。 +- CORS はブラウザにしか効かないので、**ハンドラでも `Origin` を確かめ**、許可外(と Origin なし)は 403 にする。 + +## 上限 + +数字はどれも env(`.env.`)で変えられる。 + +| 項目 | 既定 | env | +|---|---|---| +| 本文の大きさ | 128KB | `STUDUINO_MAX_REQUEST_BYTES` | +| コンパイルの打ち切り | 25 秒 | `STUDUINO_COMPILE_TIMEOUT_MS` | +| IP ごとの回数 | 1 分 12 回・1 日 600 回 | `STUDUINO_RATE_LIMIT_PER_MINUTE`・`STUDUINO_RATE_LIMIT_PER_DAY` | +| API 全体 | prod 毎秒 10(バースト 20)・stg 5(10) | (CDK の中) | + +- **コンパイルの打ち切りは 60 秒にできない**: API Gateway(HTTP API)の統合は 30 秒で切れる。Lambda のタイムアウトも + 30 秒にし、その前に打ち切って 504 を返せるよう 25 秒にした。60 秒が要るとわかったら、Lambda の関数 URL に + 変えるなどの作り直しが要る。 +- IP は SHA-256 のハッシュにしてから表に入れる(IP をそのまま残さない)。 +- DynamoDB が使えないときは数えずに通す(fail-open。計測のログに `rateLimitFailOpen: true`)。 + +## 計測の見方 + +1 回ごとに 1 行、**CloudWatch Embedded Metric Format** のログを出す(`event: "studuino_hex_request"`)。 +ログに出すだけで、CloudWatch のメトリクスができる。 + +- **メトリクス**: 名前空間 `Smalruby/StuduinoHex`・ディメンション `Stage`。 + `Requests`(回数)・`Succeeded`・`Failed`(コンパイルの失敗・打ち切り・内部エラー)・`Rejected`(403 / 413 / 429 / 400)・ + `CompileTime`(ms)・`HexBytes`・`RequestBytes`・`TotalTime`(ms)。 + CloudWatch のコンソール →「メトリクス」→「すべてのメトリクス」→ `Smalruby/StuduinoHex` で見る。 +- **ログの項目**: `outcome`(`ok` か失敗の名前)・`reason`・`sample`・`requestBytes`・`compileMs`・`hexBytes`・`totalMs`・ + `coldStart`・`rateLimitFailOpen`。コンパイラの出力は別の行(`event: "studuino_hex_compile_log"`)。 +- Logs Insights の例(コールドとウォームのコンパイル時間): + + ``` + fields @timestamp, outcome, sample, compileMs, totalMs, coldStart + | filter event = "studuino_hex_request" + | stats count(), avg(compileMs), max(compileMs), avg(totalMs) by coldStart, outcome + ``` + +- コールドスタートの初期化時間は Lambda の `REPORT` 行の `Init Duration` で見る。 + +## 試す(stg) + +```bash +EP=<スタックの出力 HttpApiEndpoint> +# hex が返る +curl -sS -X POST "$EP/compile" -H 'Origin: https://smalruby.app' -H 'Content-Type: application/json' \ + -d '{"sample":"blink"}' | head -c 300 +# 許可外の Origin は 403 +curl -sS -o /dev/null -w '%{http_code}\n' -X POST "$EP/compile" -H 'Origin: https://evil.example' -d '{"sample":"blink"}' +``` + +## デプロイ + +ほかの infra と同じく GitHub Actions の `Deploy Infra` だけから出す(stg は PR に `deploy-stg` ラベル、 +prod は develop へのマージ)。`.env` は Secrets の `INFRA_STG_DOTENV_SMALRUBY_STUDUINO_HEX` / +`INFRA_PROD_DOTENV_SMALRUBY_STUDUINO_HEX`(秘密は無く、`STAGE=` だけでよい)。 +コンテナのイメージは CDK のアセットとして、ブートストラップの ECR リポジトリに上がる。 diff --git a/infra/shared/manifest.json b/infra/shared/manifest.json index cec9a6d1430..96433fca3af 100644 --- a/infra/shared/manifest.json +++ b/infra/shared/manifest.json @@ -9,6 +9,7 @@ "smalruby-api", "smalruby-bug-report", "smalruby-classroom", - "smalruby-rubytee-relay" + "smalruby-rubytee-relay", + "smalruby-studuino-hex" ] } diff --git a/infra/smalruby-studuino-hex/.env.example b/infra/smalruby-studuino-hex/.env.example new file mode 100644 index 00000000000..fa9f963ab36 --- /dev/null +++ b/infra/smalruby-studuino-hex/.env.example @@ -0,0 +1,21 @@ +# Studuino hex API (smalruby-studuino-hex) の環境変数 +# +# ステージごとのファイル(gitignored)を作り、.env を symlink にする: +# cp .env.example .env.stg && ln -s .env.stg .env +# どれも省略できる(省略すると下の既定値)。秘密の値は無い。 + +STAGE=stg + +# AWS(省略時は AWS CLI の設定から) +# AWS_ACCOUNT_ID= +# AWS_REGION=ap-northeast-1 + +# CORS(カンマ区切り)。省略すると https://smalruby.app(非 prod はローカル 8601〜8610 と +# ブランチプレビューも)。prod にローカルのオリジンを入れると synth が失敗する。 +# CORS_ALLOWED_ORIGINS=https://smalruby.app + +# 上限(S12)。省略すると下の値 +# STUDUINO_MAX_REQUEST_BYTES=131072 +# STUDUINO_COMPILE_TIMEOUT_MS=25000 +# STUDUINO_RATE_LIMIT_PER_MINUTE=12 +# STUDUINO_RATE_LIMIT_PER_DAY=600 diff --git a/infra/smalruby-studuino-hex/.gitignore b/infra/smalruby-studuino-hex/.gitignore new file mode 100644 index 00000000000..a9e84cb5a97 --- /dev/null +++ b/infra/smalruby-studuino-hex/.gitignore @@ -0,0 +1,17 @@ +node_modules/ +dist/ +cdk.out/ +cdk.out.* + +# Environment variables (all are gitignored; use symlink: ln -s .env.stg .env) +.env +.env.prod +.env.stg +.env.stg2 + +*.js.map +*.d.ts +!jest.config.js + +# esbuild output copied into the container image at synth time +container/build/ diff --git a/infra/smalruby-studuino-hex/.node-version b/infra/smalruby-studuino-hex/.node-version new file mode 100644 index 00000000000..ce62013c39a --- /dev/null +++ b/infra/smalruby-studuino-hex/.node-version @@ -0,0 +1 @@ +24.22.1 diff --git a/infra/smalruby-studuino-hex/bin/smalruby-studuino-hex.ts b/infra/smalruby-studuino-hex/bin/smalruby-studuino-hex.ts new file mode 100644 index 00000000000..b7794942e71 --- /dev/null +++ b/infra/smalruby-studuino-hex/bin/smalruby-studuino-hex.ts @@ -0,0 +1,20 @@ +#!/usr/bin/env node +import * as cdk from 'aws-cdk-lib/core'; +import * as dotenv from 'dotenv'; +import * as path from 'path'; +import { StuduinoHexStack } from '../lib/studuino-hex-stack'; + +dotenv.config({ path: path.join(__dirname, '../.env') }); + +const app = new cdk.App(); + +const stage = app.node.tryGetContext('stage') || process.env.STAGE || 'stg'; +const stackName = stage === 'prod' ? 'StuduinoHexStack' : `StuduinoHexStack-${stage}`; + +new StuduinoHexStack(app, stackName, { + stackName, + env: { + account: process.env.CDK_DEFAULT_ACCOUNT || process.env.AWS_ACCOUNT_ID, + region: process.env.CDK_DEFAULT_REGION || process.env.AWS_REGION || 'ap-northeast-1', + }, +}); diff --git a/infra/smalruby-studuino-hex/cdk.json b/infra/smalruby-studuino-hex/cdk.json new file mode 100644 index 00000000000..2dc6ab4d820 --- /dev/null +++ b/infra/smalruby-studuino-hex/cdk.json @@ -0,0 +1,43 @@ +{ + "app": "npx ts-node --prefer-ts-exts bin/smalruby-studuino-hex.ts", + "watch": { + "include": ["**"], + "exclude": [ + "README.md", + "cdk*.json", + "**/*.d.ts", + "**/*.js", + "tsconfig.json", + "package*.json", + "yarn.lock", + "node_modules", + "dist" + ] + }, + "context": { + "@aws-cdk/aws-lambda:recognizeLayerVersion": true, + "@aws-cdk/core:checkSecretUsage": true, + "@aws-cdk/core:target-partitions": ["aws", "aws-cn"], + "@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true, + "@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true, + "@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true, + "@aws-cdk/aws-iam:minimizePolicies": true, + "@aws-cdk/core:validateSnapshotRemovalPolicy": true, + "@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true, + "@aws-cdk/aws-s3:createDefaultLoggingPolicy": true, + "@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true, + "@aws-cdk/aws-apigateway:disableCloudWatchRole": true, + "@aws-cdk/core:enablePartitionLiterals": true, + "@aws-cdk/aws-events:eventsTargetQueueSameAccount": true, + "@aws-cdk/aws-iam:standardizedServicePrincipals": true, + "@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true, + "@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true, + "@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true, + "@aws-cdk/aws-route53-patters:useCertificate": true, + "@aws-cdk/customresources:installLatestAwsSdkDefault": false, + "@aws-cdk/aws-rds:databaseProxyUniqueResourceName": true, + "@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": true, + "@aws-cdk/aws-apigateway:authorizerChangeDestroyWithFunctionTimeout": true, + "@aws-cdk/aws-apigatewayv2:useBeta1Names": true + } +} diff --git a/infra/smalruby-studuino-hex/container/Dockerfile b/infra/smalruby-studuino-hex/container/Dockerfile new file mode 100644 index 00000000000..57d531c9857 --- /dev/null +++ b/infra/smalruby-studuino-hex/container/Dockerfile @@ -0,0 +1,42 @@ +# Studuino の hex を作る Lambda のコンテナ(#2209)。 +# +# 版とハッシュは third-party.json で固定し、CDK(lib/studuino-hex-stack.ts)が build args で渡す。 +# ここに直接書かない(版を変えるのは third-party.json だけにする)。 +# x86_64 で作る(avr-gcc のツールチェーンと GitHub Actions のランナーに合わせる。arm64 にすると +# ランナーでエミュレーションになりビルドが遅い)。 +FROM public.ecr.aws/lambda/nodejs:22 + +ARG ARDUINO_CLI_URL +ARG ARDUINO_CLI_SHA256 +ARG ARDUINO_CLI_VERSION +ARG AVR_CORE_ID +ARG AVR_CORE_VERSION +ARG ARDUINO_LIBRARIES +ARG STUDUINO_BOARD_URL +ARG STUDUINO_BOARD_SHA256 +ARG STUDUINO_BOARD_PATH +ARG STUDUINO_FQBN +ARG STUDUINO_MAX_FLASH_BYTES +ARG STUDUINO_LIB_URL="" +ARG STUDUINO_LIB_SHA256="" +ARG STUDUINO_LIBRARIES="" + +# 読み取りだけの場所(/opt/arduino)にツールチェーンとライブラリを置く。Lambda で書けるのは /tmp だけ。 +ENV ARDUINO_DIRECTORIES_DATA=/opt/arduino/data \ + ARDUINO_DIRECTORIES_USER=/opt/arduino/user \ + ARDUINO_DIRECTORIES_DOWNLOADS=/tmp/arduino-downloads \ + ARDUINO_UPDATER_ENABLE_NOTIFICATION=false \ + ARDUINO_CLI=/opt/arduino/bin/arduino-cli \ + STUDUINO_TOOLCHAIN_FILE=/opt/arduino/toolchain.json \ + STUDUINO_SAMPLES_DIR=/opt/arduino/samples \ + STUDUINO_PREBUILT_CACHE=/opt/arduino/build-cache + +RUN dnf install -y tar gzip unzip findutils && dnf clean all + +COPY install-toolchain.sh /opt/arduino/install-toolchain.sh +COPY samples/ /opt/arduino/samples/ +RUN bash /opt/arduino/install-toolchain.sh + +COPY build/handler.js ${LAMBDA_TASK_ROOT}/handler.js + +CMD ["handler.handler"] diff --git a/infra/smalruby-studuino-hex/container/install-toolchain.sh b/infra/smalruby-studuino-hex/container/install-toolchain.sh new file mode 100755 index 00000000000..1f9865bba97 --- /dev/null +++ b/infra/smalruby-studuino-hex/container/install-toolchain.sh @@ -0,0 +1,125 @@ +#!/usr/bin/env bash +# コンテナのビルド中に 1 回だけ実行する(Dockerfile から)。 +# 1. arduino-cli(sha256 を確かめる) +# 2. AVR のコアと Arduino のライブラリ(版を固定) +# 3. アーテック社のボード定義(公式の配布元から。sha256 を確かめる) +# 4. Studuino ライブラリ(公式の配布元から。sha256 を確かめる。URL が空なら入れない) +# 5. サンプルを 1 回ずつコンパイルして、コアのキャッシュを作り、かかった時間を記録する +# 6. 版とハッシュを toolchain.json に書く(Lambda が応答の toolchain に載せる) +set -euo pipefail + +: "${ARDUINO_CLI_URL:?}" "${ARDUINO_CLI_SHA256:?}" "${ARDUINO_CLI_VERSION:?}" +: "${AVR_CORE_ID:?}" "${AVR_CORE_VERSION:?}" "${ARDUINO_LIBRARIES:?}" +: "${STUDUINO_BOARD_URL:?}" "${STUDUINO_BOARD_SHA256:?}" "${STUDUINO_BOARD_PATH:?}" +: "${STUDUINO_FQBN:?}" "${STUDUINO_MAX_FLASH_BYTES:?}" + +work="$(mktemp -d)" +mkdir -p /opt/arduino/bin "${ARDUINO_DIRECTORIES_DATA}" "${ARDUINO_DIRECTORIES_USER}/libraries" \ + "${ARDUINO_DIRECTORIES_USER}/hardware" "${ARDUINO_DIRECTORIES_DOWNLOADS}" "${STUDUINO_PREBUILT_CACHE}" + +# 1. arduino-cli +curl -fsSL "${ARDUINO_CLI_URL}" -o "${work}/arduino-cli.tar.gz" +echo "${ARDUINO_CLI_SHA256} ${work}/arduino-cli.tar.gz" | sha256sum -c - +tar -xzf "${work}/arduino-cli.tar.gz" -C /opt/arduino/bin arduino-cli +"${ARDUINO_CLI}" version + +# 2. コアとライブラリ(arduino-cli が index の checksum で中身を確かめる) +"${ARDUINO_CLI}" core update-index +"${ARDUINO_CLI}" core install "${AVR_CORE_ID}@${AVR_CORE_VERSION}" +"${ARDUINO_CLI}" lib update-index +IFS='|' read -r -a libs <<< "${ARDUINO_LIBRARIES}" +for lib in "${libs[@]}"; do + "${ARDUINO_CLI}" lib install "${lib}" +done + +# 3. ボード定義(boards.txt・platform.txt だけを入れる) +# 取れない・sha256 が合わないときは、同じ MCU・クロックの arduino:avr の pro(168・8MHz)で代わりに作り、 +# その理由を toolchain.json に残す(イメージのビルドを止めない。Lambda の応答で分かる)。 +fqbn="${STUDUINO_FQBN}" +max_flash="${STUDUINO_MAX_FLASH_BYTES}" +board_sha256="null" +board_error="null" +fetch_verified() { # url sha256 out + curl -fsSL --retry 2 "$1" -o "$3" || { echo "download failed"; return 1; } + echo "$2 $3" | sha256sum -c - >/dev/null 2>&1 || { echo "sha256 mismatch: $(sha256sum "$3" | cut -d' ' -f1)"; return 1; } +} +if err="$(fetch_verified "${STUDUINO_BOARD_URL}" "${STUDUINO_BOARD_SHA256}" "${work}/board.zip")"; then + mkdir -p "${work}/board" + unzip -q "${work}/board.zip" -d "${work}/board" + cp -R "${work}/board/${STUDUINO_BOARD_PATH}" "${ARDUINO_DIRECTORIES_USER}/hardware/studuino" + board_sha256="\"sha256:${STUDUINO_BOARD_SHA256}\"" +else + echo "ボード定義を入れられませんでした(${err})。arduino:avr:pro:cpu=8MHzatmega168 で作ります" >&2 + fqbn="arduino:avr:pro:cpu=8MHzatmega168" + max_flash=14336 + board_error="\"${err}\"" +fi +"${ARDUINO_CLI}" board details --fqbn "${fqbn}" | head -n 5 + +# 4. Studuino ライブラリ(取れない・sha256 が合わないときは入れずに作り、理由を残す) +studuino_lib_sha256="" +studuino_lib_error="null" +if [ -n "${STUDUINO_LIB_URL}" ]; then + if [ -z "${STUDUINO_LIB_SHA256}" ]; then + echo "STUDUINO_LIB_URL があるのに STUDUINO_LIB_SHA256 が空です(third-party.json)" >&2 + exit 1 + fi + if err="$(fetch_verified "${STUDUINO_LIB_URL}" "${STUDUINO_LIB_SHA256}" "${work}/studuino-lib.zip")"; then + mkdir -p "${work}/studuino-lib" + unzip -q "${work}/studuino-lib.zip" -d "${work}/studuino-lib" + # 使う 5 つだけを入れる(ほかは入れない)。LICENSE・著作権表示はフォルダごとそのまま残す。 + for name in ${STUDUINO_LIBRARIES//,/ }; do + src="$(find "${work}/studuino-lib" -maxdepth 4 -type d -name "${name}" | head -n 1)" + if [ -z "${src}" ]; then + echo "zip の中に ${name} が見つかりません" >&2 + exit 1 + fi + cp -R "${src}" "${ARDUINO_DIRECTORIES_USER}/libraries/${name}" + done + studuino_lib_sha256="${STUDUINO_LIB_SHA256}" + else + echo "Studuino ライブラリを入れられませんでした(${err})" >&2 + studuino_lib_error="\"${err}\"" + fi +else + echo "STUDUINO_LIB_URL が空なので、Studuino ライブラリを入れずに作ります" +fi + +# 5. コアのキャッシュを作る(Lambda は起動時に /tmp へ写して使う)。blink は必ず通す。 +# ほかのサンプルの失敗ではイメージを止めない(Lambda が compile_failed を返す)。 +compile_one() { + local name="$1" + local start + start=$(date +%s%N) + "${ARDUINO_CLI}" compile --fqbn "${fqbn}" \ + --build-path "${work}/build-${name}" --output-dir "${work}/out-${name}" \ + --build-cache-path "${STUDUINO_PREBUILT_CACHE}" "${STUDUINO_SAMPLES_DIR}/${name}" || return 1 + echo "prebuilt ${name}: $(( ($(date +%s%N) - start) / 1000000 )) ms" +} +compile_one blink +for dir in "${STUDUINO_SAMPLES_DIR}"/*/; do + name="$(basename "${dir}")" + [ "${name}" = "blink" ] && continue + [ -z "${studuino_lib_sha256}" ] && continue + compile_one "${name}" || echo "prebuilt ${name}: failed" +done + +# 6. 版とハッシュ +cat > /opt/arduino/toolchain.json < +#include +#include +#include +#include +#include +#include +#include + +Studuino board; + +const double LINE_THRESHOLD = 500; +const double DARK_THRESHOLD = 300; + +double speed = 0; +double turns = 0; +double lastSwitch = 0; +unsigned long timerStart = 0; + +double timer() { return (millis() - timerStart) / 1000.0; } + +void forward(double pace) { + board.DCMotorPower(PORT_M1, (byte)constrain(pace, 0, 255)); + board.DCMotorPower(PORT_M2, (byte)constrain(pace, 0, 255)); + board.DCMotorControl(PORT_M1, NORMAL); + board.DCMotorControl(PORT_M2, NORMAL); +} + +void turnLeft(double pace) { + board.DCMotorPower(PORT_M1, (byte)constrain(pace / 2, 0, 255)); + board.DCMotorPower(PORT_M2, (byte)constrain(pace, 0, 255)); + board.DCMotorControl(PORT_M1, REVERSE); + board.DCMotorControl(PORT_M2, NORMAL); +} + +void turnRight(double pace) { + board.DCMotorPower(PORT_M1, (byte)constrain(pace, 0, 255)); + board.DCMotorPower(PORT_M2, (byte)constrain(pace / 2, 0, 255)); + board.DCMotorControl(PORT_M1, NORMAL); + board.DCMotorControl(PORT_M2, REVERSE); +} + +void stopMotors() { + board.DCMotorControl(PORT_M1, BRAKE); + board.DCMotorControl(PORT_M2, BRAKE); +} + +void lookAround() { + for (int degree = 30; degree <= 150; degree += 30) { + board.Servomotor(PORT_D9, degree); + board.Timer(0.2); + } + board.Servomotor(PORT_D9, 90); +} + +void setup() { + board.InitDCMotorPort(PORT_M1); + board.InitDCMotorPort(PORT_M2); + board.InitServomotorPort(PORT_D9); + board.InitSensorPort(PORT_A0, PIDTOUCHSENSOR); + board.InitSensorPort(PORT_A1, PIDLED); + board.InitSensorPort(PORT_A2, PIDIRPHOTOREFLECTOR); + board.InitSensorPort(PORT_A3, PIDIRPHOTOREFLECTOR); + board.InitSensorPort(PORT_A5, PIDBUZZER); + board.InitSensorPort(PORT_A6, PIDLIGHTSENSOR); + board.InitSensorPort(PORT_A7, PIDSOUNDSENSOR); + byte rates[2] = {100, 100}; + board.SetDCMotorCalibration(rates); + char offsets[8] = {0, 0, 0, 0, 0, 0, 0, 0}; + board.SetServomotorCalibration(offsets); + board.Servomotor(PORT_D9, 90); + timerStart = millis(); + speed = 120; +} + +void loop() { + double left = board.GetIRPhotoreflectorValue(PORT_A2); + double right = board.GetIRPhotoreflectorValue(PORT_A3); + bool onLeft = left > LINE_THRESHOLD; + bool onRight = right > LINE_THRESHOLD; + + if (board.GetTouchSensorValue(PORT_A0) == 0) { + stopMotors(); + board.Buzzer(PORT_A5, BZR_C4, 200); + board.Buzzer(PORT_A5, BZR_E4, 200); + board.Buzzer(PORT_A5, BZR_G4, 400); + lookAround(); + turns = turns + 1; + if (fmod(turns, 2) == 0) { + turnLeft(speed); + } else { + turnRight(speed); + } + board.Timer(0.5); + } else if (onLeft && onRight) { + forward(speed); + } else if (onLeft) { + turnLeft(speed); + } else if (onRight) { + turnRight(speed); + } else { + forward(speed * 0.6); + } + + board.LED(PORT_A1, board.GetLightSensorValue(PORT_A6) < DARK_THRESHOLD ? ON : OFF); + + if (board.GetSoundSensorValue(PORT_A7) > 700 && timer() - lastSwitch > 1) { + speed = speed >= 200 ? 80 : speed + 40; + lastSwitch = timer(); + } + board.Timer(0.01); +} diff --git a/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/LICENSE b/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/LICENSE new file mode 100644 index 00000000000..9a8fa707ce4 --- /dev/null +++ b/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2015 Kouji Takao + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/Smalrubot.cpp b/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/Smalrubot.cpp new file mode 100644 index 00000000000..2bebe6f5b43 --- /dev/null +++ b/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/Smalrubot.cpp @@ -0,0 +1,273 @@ +/* + Library for smalrubot ruby gem. +*/ + +#include "Arduino.h" +#include "Smalrubot.h" + +Smalrubot::Smalrubot(int neo_pixel_num, int neo_pixel_pin) : + pixels(neo_pixel_num, neo_pixel_pin, NEO_RGB + NEO_KHZ400) +{ + boardName[0] = 'V'; + boardName[1] = '3'; + boardName[2] = '\0'; + + receivingRequest = false; +} + +void Smalrubot::parse(char c) { + if (c == '!') { + index = 0; + receivingRequest = true; + } + else if (receivingRequest) { + if (c == '.') { + process(); + receivingRequest = false; + } + else if (index < MAX_REQUEST_LENGTH) { + request[index++] = c; + } + else { + receivingRequest = false; + } + } +} + + +int Smalrubot::parseRequestValue(int n) { + if (index < 4 + (n + 1) * 3) { + return 0; + } + + strncpy(valStr, request + 4 + n * 3, 3); + valStr[3] = '\0'; + + return atoi(valStr); +} + +void Smalrubot::process() { + response[0] = '\0'; + + // Parse the request. + strncpy(cmdStr, request, 2); cmdStr[2] = '\0'; + strncpy(pinStr, request + 2, 2); pinStr[2] = '\0'; + cmd = atoi(cmdStr); + pin = atoi(pinStr); + val = parseRequestValue(0); + + #ifdef debug + Serial.print("Received request - "); Serial.println(request); + Serial.print("Command - "); Serial.println(cmdStr); + Serial.print("Pin - "); Serial.println(pinStr); + Serial.print("Value - "); Serial.println(valStr); + #endif + + processCommand(); + + // Write the response. + if (response[0] != '\0') writeResponse(); + + #ifdef debug + Serial.print("Responded with - "); Serial.println(response); + Serial.println(); + #endif +} + + +void Smalrubot::processCommand() { + // Call the command. + switch(cmd) { + case 0: + setMode(); + break; + case 1: + dWrite(); + break; + case 2: + dRead(); + break; + case 3: + aWrite(); + break; + case 4: + aRead(); + break; + case 8: + servoToggle(); + break; + case 9: + servoWrite(); + break; + case 10: + setNeoPixelPin(); + break; + case 11: + setNeoPixelNumPixels(); + break; + case 12: + setNeoPixelColor(); + break; + case 13: + showNeoPixel(); + break; + case 90: + reset(); + break; + case 91: + resetV2(); + break; + default: + break; + } +} + +// WRITE CALLBACK +void Smalrubot::setupWrite(void (*writeCallback)(char *str)) { + pixels.begin(); + for (int i = 0; i < 12; i++) { + servos[i] = new Servo(); + } + _writeCallback = writeCallback; +} +void Smalrubot::writeResponse() { + _writeCallback(response); +} + + + + + + +// API FUNCTIONS +// CMD = 00 // Pin Mode +void Smalrubot::setMode() { + if (val == 0) { + pinMode(pin, OUTPUT); + #ifdef debug + Serial.print("Set pin "); Serial.print(pin); Serial.print(" to "); Serial.println("OUTPUT mode"); + #endif + } + else { + pinMode(pin, INPUT); + #ifdef debug + Serial.print("Set pin "); Serial.print(pin); Serial.print(" to "); Serial.println("INPTUT mode"); + #endif + } +} + +// CMD = 01 // Digital Write +void Smalrubot::dWrite() { + if (val == 0) { + digitalWrite(pin, LOW); + #ifdef debug + Serial.print("Digital write "); Serial.print(LOW); Serial.print(" to pin "); Serial.println(pin); + #endif + } + else { + digitalWrite(pin, HIGH); + #ifdef debug + Serial.print("Digital write "); Serial.print(HIGH); Serial.print(" to pin "); Serial.println(pin); + #endif + } +} + +// CMD = 02 // Digital Read +void Smalrubot::dRead() { + rval = digitalRead(pin); + sprintf(response, "%02d:%02d", pin, rval); +} + +// CMD = 03 // Analog (PWM) Write +void Smalrubot::aWrite() { + analogWrite(pin,val); + #ifdef debug + Serial.print("Analog write "); Serial.print(val); Serial.print(" to pin "); Serial.println(pin); + #endif +} + +// CMD = 04 // Analog Read +void Smalrubot::aRead() { + rval = analogRead(pin); + sprintf(response, "%02d:%02d", pin, rval); +} + +// CMD = 08 +// Attach the servo object to pin or detach it. +void Smalrubot::servoToggle() { + if (val == 0) { + #ifdef debug + Serial.print("Detaching servo"); Serial.print(" on pin "); Serial.println(pin); + #endif + servos[pin - SERVO_OFFSET]->detach(); + } + else { + #ifdef debug + Serial.print("Attaching servo"); Serial.print(" on pin "); Serial.println(pin); + #endif + servos[pin - SERVO_OFFSET]->attach(pin); + } +} + +// CMD = 09 +// Write a value to the servo object. +void Smalrubot::servoWrite() { + #ifdef debug + Serial.print("Servo write "); Serial.print(val); Serial.print(" to pin "); Serial.println(pin); + #endif + servos[pin - SERVO_OFFSET]->write(val); +} + +// CMD = 10 +void Smalrubot::setNeoPixelPin() { + #ifdef debug + Serial.print("set NeoPixel pin "); Serial.println(pin); + #endif + pixels.setPin(pin); +} + +// CMD = 11 +void Smalrubot::setNeoPixelNumPixels() { + #ifdef debug + Serial.print("set NeoPixel num pixels "); Serial.println(val); + #endif + // not support yet + // pixels.setNumPixels(val); +} + +// CMD = 12 +void Smalrubot::setNeoPixelColor() { + #ifdef debug + Serial.print("set NeoPixel color "); Serial.println(val); + #endif + uint16_t n = pin; + uint8_t r = val, g = parseRequestValue(1), b = parseRequestValue(2); + + pixels.setPixelColor(n, pixels.Color(r, g, b)); +} + +// CMD = 13 +void Smalrubot::showNeoPixel() { + #ifdef debug + Serial.println("show NeoPixel"); + #endif + pixels.show(); +} + +// CMD = 90 +void Smalrubot::reset() { + #ifdef debug + Serial.println("Reset the board to defaults."); + #endif + sprintf(response, "ACK:%02d", A0); + receivingRequest = false; +} + +// CMD = 91 +void Smalrubot::resetV2() { + #ifdef debug + Serial.println("Reset the board to defaults version 2."); + #endif + sprintf(response, "%02d:%s,%02d", pin, boardName, A0); + receivingRequest = false; +} diff --git a/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/Smalrubot.h b/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/Smalrubot.h new file mode 100644 index 00000000000..1ade7271c27 --- /dev/null +++ b/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/Smalrubot.h @@ -0,0 +1,76 @@ +/* + Library for smalrubot ruby gem. +*/ + +#ifndef Smalrubot_h +#define Smalrubot_h + +#include "Arduino.h" +#include +#include "Adafruit_NeoPixel.h" +#include + +// Allocate listener storage based on what board we're running. +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) +# define PIN_COUNT 70 +# define SERVO_OFFSET 22 +#else +# define PIN_COUNT 22 +# define SERVO_OFFSET 2 +#endif + +// Uncomment this line to enable debugging mode. +// #define debug true + +#define MAX_REQUEST_LENGTH 20 + +class Smalrubot { + public: + Smalrubot(int neo_pixel_num, int neo_pixel_pin); + void setupWrite(void (*writeCallback)(char *str)); + void parse(char c); + void process(); + + protected: + // Request storage. + char request[MAX_REQUEST_LENGTH]; + int index; + bool receivingRequest; + char cmdStr[3]; + byte cmd; + char pinStr[3]; + byte pin; + char valStr[4]; + int val; + char boardName[3]; + + // Value and response storage. + int rval; + char response[9]; + void (*_writeCallback)(char *str); + void writeResponse(); + + Servo *servos[12]; + + Adafruit_NeoPixel pixels; + + virtual void processCommand(); + int parseRequestValue(int n); + + // API-accessible functions. + void setMode(); + void dWrite(); + void dRead(); + void aWrite(); + void aRead(); + void servoToggle(); + void servoWrite(); + void setNeoPixelPin(); + void setNeoPixelNumPixels(); + void setNeoPixelColor(); + void showNeoPixel(); + void reset(); + void resetV2(); +}; + +#endif diff --git a/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/SrStuduino.cpp b/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/SrStuduino.cpp new file mode 100644 index 00000000000..f317014cfbe --- /dev/null +++ b/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/SrStuduino.cpp @@ -0,0 +1,294 @@ +#include "SrStuduino.h" + +typedef Smalrubot base; + +SrStuduino::SrStuduino(int neo_pixel_num, int neo_pixel_pin) : + Smalrubot(neo_pixel_num, neo_pixel_pin), + dcMotorCalibrations{ 100, 100 }, + servomotorCalibrations{ 0, 0, 0, 0, 0, 0, 0, 0 } +{ + boardName[0] = 'S'; + boardName[1] = '1'; + boardName[2] = '\0'; +} + +void SrStuduino::setupWrite(void (*writeCallback)(char *str)) { + // Must not call pixels.begin(), if use servo motor. + _writeCallback = writeCallback; +} + +/* + * 20-39: Initialize + * 40-59: Actuatuator + * 60-79: Sensor + **/ +void SrStuduino::processCommand() { + switch(cmd) { + case 20: + setDcMotorCalibration(); + break; + case 21: + setServomotorCalibration(); + break; + case 22: + initDcMotorPort(); + break; + case 23: + initServoMotorPort(); + break; + case 25: + initSensorPort(); + break; + + case 42: + dcMotorPower(); + break; + case 43: + dcMotorControl(); + break; + case 44: + servoMotor(); + break; + + case 51: + led(); + break; + + case 61: + getTouchSensorValue(); + break; + case 62: + getLightSensorValue(); + break; + case 63: + getSoundSensorValue(); + break; + case 64: + getIrPhotoreflectorValue(); + break; + + default: + base::processCommand(); + break; + } +} + +byte motorPorts[] = { + PORT_M1, + PORT_M2 +}; +byte digitalPorts[] = { + PORT_D2, + PORT_D4, + PORT_D7, + PORT_D8, + PORT_D9, + PORT_D10, + PORT_D11, + PORT_D12 +}; +byte analogPorts[] = { + PORT_A0, + PORT_A1, + PORT_A2, + PORT_A3, + PORT_A4, + PORT_A5, + PORT_A6, + PORT_A7 +}; +byte pids[] = { + PIDOPEN, + PIDLED, + PIDBUZZER, + PIDLIGHTSENSOR, + PIDSOUNDSENSOR, + PIDIRPHOTOREFLECTOR, + PIDACCELEROMETER, + PIDTOUCHSENSOR, + PIDPUSHSWITCH +}; + +/** + * !20. + * + * motor_index(2): 0-1 => PORT_M1-PORT_M2 + * rate(3): 0-100 + **/ +void SrStuduino::setDcMotorCalibration() { + dcMotorCalibrations[pin] = val; + studuino.SetDCMotorCalibration(dcMotorCalibrations); +} + +/** + * !21. + * + * motor_index(2): 0-7 => PORT_D2-PORT_D12 + * degree(3): -15 - 15 + **/ +void SrStuduino::setServomotorCalibration() { + servomotorCalibrations[pin] = val; + studuino.SetServomotorCalibration(servomotorCalibrations); +} + +/** + * !22. + * + * motor_index(2): 0-1 => PORT_M1-PORT_M2 + **/ +void SrStuduino::initDcMotorPort() { + studuino.InitDCMotorPort(motorPorts[pin]); +} + +/** + * !23. + * + * servo_motor_index(2): + * 0 => PORT_D2 + * 1 => PORT_D4 + * 2 => PORT_D7 + * 3 => PORT_D8 + * 4 => PORT_D9 + * 5 => PORT_D10 + * 6 => PORT_D11 + * 7 => PORT_D12 + **/ +void SrStuduino::initServoMotorPort() { + studuino.InitServomotorPort(digitalPorts[pin]); +} + +/** + * !25. + * + * sensor_index(2): 0-7 => PORT_A0-PORT_A7 + * pid_index(3): 0 => PIDOPEN or + * 1 => PIDLED or + * 2 => PIDBUZZER or + * 3 => PIDLIGHTSENSOR or + * 4 => PIDSOUNDSENSOR or + * 5 => PIDRPHOTOREFLECTOR or + * 6 => PIDACCELEROMETER or + * 7 => PIDTOUCHSENSOR or + * 8 => PIDPUSHSWITCH + **/ +void SrStuduino::initSensorPort() { + studuino.InitSensorPort(analogPorts[pin], pids[val]); +} + +/** + * !42. + * + * motor_index(2): 0-1 => PORT_M1-PORT_M2 + * pace(3): 0-255 + **/ +void SrStuduino::dcMotorPower() { + studuino.DCMotorPower(motorPorts[pin], val); +} + +/** + * !43. + * + * motor_index(2): 0-1 => PORT_M1-PORT_M2 + * rotation_index(3): 0 => NORMAL or + * 1 => REVERSE or + * 2 => BRAKE or + * 3 => COAST + **/ +void SrStuduino::dcMotorControl() { + byte rotations[] = { NORMAL, REVERSE, BRAKE, COAST }; + + studuino.DCMotorControl(motorPorts[pin], rotations[val]); +} + +/** + * !44. + * + * servo_motor_index(2): + * 0 => PORT_D2 + * 1 => PORT_D4 + * 2 => PORT_D7 + * 3 => PORT_D8 + * 4 => PORT_D9 + * 5 => PORT_D10 + * 6 => PORT_D11 + * 7 => PORT_D12 + * degree(3): 0-180 + **/ +void SrStuduino::servoMotor() { + byte degree = (byte)val; + studuino.Servomotor(digitalPorts[pin], degree); +} + +/** + * !51. + * + * sensor_index(2): 0-7 => PORT_A0-PORT_A7 + * onoff(3): 0 => OFF or + * 1 => ON + **/ +void SrStuduino::led() { + boolean onoff[] = { OFF, ON }; + + studuino.LED(analogPorts[pin], onoff[val]); +} + +/** + * !61. + * + * sensor_index(2): 0-7 => PORT_A0-PORT_A7 + * + * return: + * + * res: 0 => pressed or + * 1 => released + **/ +void SrStuduino::getTouchSensorValue() { + byte res = studuino.GetTouchSensorValue(analogPorts[pin]); + + sprintf(response, "%02d:%01d", pin, res); +} + +/** + * !62. + * + * sensor_index(2): 0-7 => PORT_A0-PORT_A7 + * + * return: + * + * res: 0-1023 + **/ +void SrStuduino::getLightSensorValue() { + int res = studuino.GetLightSensorValue(analogPorts[pin]); + + sprintf(response, "%02d:%04d", pin, res); +} + +/** + * !63. + * + * sensor_index(2): 0-7 => PORT_A0-PORT_A7 + * + * return: + * + * res: 0-1023 + **/ +void SrStuduino::getSoundSensorValue() { + int res = studuino.GetSoundSensorValue(analogPorts[pin]); + + sprintf(response, "%02d:%04d", pin, res); +} + +/** + * !64. + * + * sensor_index(2): 0-7 => PORT_A0-PORT_A7 + * + * return: + * + * res: 0-1023 + **/ +void SrStuduino::getIrPhotoreflectorValue() { + int res = studuino.GetIRPhotoreflectorValue(analogPorts[pin]); + + sprintf(response, "%02d:%04d", pin, res); +} diff --git a/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/SrStuduino.h b/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/SrStuduino.h new file mode 100644 index 00000000000..88a641c5d71 --- /dev/null +++ b/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/SrStuduino.h @@ -0,0 +1,41 @@ +/* + Library for smalrubot ruby gem. +*/ + +#ifndef SrStuduino_h +#define SrStuduino_h + +#include "Smalrubot.h" +#include "Studuino.h" + +class SrStuduino : public Smalrubot { + public: + SrStuduino(int neo_pixel_num, int neo_pixel_pin); + void setupWrite(void (*writeCallback)(char *str)); + + protected: + Studuino studuino; + byte dcMotorCalibrations[2]; + char servomotorCalibrations[8]; + + virtual void processCommand(); + + void setDcMotorCalibration(); + void setServomotorCalibration(); + void initDcMotorPort(); + void initServoMotorPort(); + void initSensorPort(); + + void dcMotorPower(); + void dcMotorControl(); + void servoMotor(); + void led(); + + void getTouchSensorValue(); + void getLightSensorValue(); + void getSoundSensorValue(); + void getIrPhotoreflectorValue(); +}; + + +#endif diff --git a/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/smalrubot-s1.ino b/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/smalrubot-s1.ino new file mode 100644 index 00000000000..17962e0c7af --- /dev/null +++ b/infra/smalruby-studuino-hex/container/samples/smalrubot-s1/smalrubot-s1.ino @@ -0,0 +1,26 @@ +#include "SrStuduino.h" +#include +#include "Adafruit_NeoPixel.h" +#include +#include +#include +#include "Studuino.h" + +#define DEFAULT_NEO_PIXEL_NUM 16 +#define DEFAULT_NEO_PIXEL_PIN 5 + +SrStuduino smalrubot(DEFAULT_NEO_PIXEL_NUM, DEFAULT_NEO_PIXEL_PIN); + +// Smalrubot.h doesn't handle TXRX. Setup a function to tell it to write to Serial. +void writeResponse(char *response) { Serial.println(response); } +void (*writeCallback)(char *str) = writeResponse; + +void setup() { + Serial.begin(19200); + smalrubot.setupWrite(writeCallback); +} + +void loop() { + while(Serial.available() > 0) smalrubot.parse(Serial.read()); + Serial.flush(); +} diff --git a/infra/smalruby-studuino-hex/container/samples/studuino-led/studuino-led.ino b/infra/smalruby-studuino-hex/container/samples/studuino-led/studuino-led.ino new file mode 100644 index 00000000000..44d2d15b6de --- /dev/null +++ b/infra/smalruby-studuino-hex/container/samples/studuino-led/studuino-led.ino @@ -0,0 +1,24 @@ +// Studuino ライブラリで、A0 につないだ LED を 0.5 秒ごとに点滅させる。 +// hex を作る Lambda の動作確認用のサンプル(#2209)。include は Studuino ライブラリの +// リファレンスにある組み合わせ(本体が MMA8653 などを include するため、すべて並べる)。 +#include +#include +#include +#include +#include +#include +#include +#include + +Studuino board; + +void setup() { + board.InitSensorPort(PORT_A0, PIDLED); +} + +void loop() { + board.LED(PORT_A0, ON); + board.Timer(0.5); + board.LED(PORT_A0, OFF); + board.Timer(0.5); +} diff --git a/infra/smalruby-studuino-hex/container/third-party.json b/infra/smalruby-studuino-hex/container/third-party.json new file mode 100644 index 00000000000..e85afce93c4 --- /dev/null +++ b/infra/smalruby-studuino-hex/container/third-party.json @@ -0,0 +1,30 @@ +{ + "$comment": "コンテナに入れる外部のツールとライブラリ。版(とハッシュ)をここで固定し、CDK が Docker の build args に渡す。アーテック社のファイルはリポジトリに入れない(URL と sha256 だけ。docs/infra/smalruby-studuino-hex.md)。", + "arduinoCli": { + "version": "1.5.1", + "url": "https://github.com/arduino/arduino-cli/releases/download/v1.5.1/arduino-cli_1.5.1_Linux_64bit.tar.gz", + "sha256": "28a8e119c498a25607821c36cb2dc49e8463941b261a0d99091baa7bc692dd2b" + }, + "avrCore": { + "id": "arduino:avr", + "version": "1.8.8" + }, + "arduinoLibraries": [ + { "$comment": "Studuino ライブラリが使う", "name": "Servo", "version": "1.2.2" }, + { "$comment": "サンプル smalrubot-s1(スモウルボット S1 のファームウェア)が使う", "name": "Adafruit NeoPixel", "version": "1.15.2" } + ], + "board": { + "$comment": "アーテック社の Arduino IDE 1.6.x/1.8.x 用のボード定義(other/hardware/studuino/avr の boards.txt・platform.txt)。Studuino (3.3V, 8 MHz) w/ ATmega168: mcu=atmega168・f_cpu=8000000L・upload.speed=115200(optiboot)・maximum_size=15872。コアとツールは arduino:avr のものを使う(build.core=arduino:arduino)。", + "url": "https://www.artec-kk.co.jp/studuino/data/arduino_ide_settings_ver16x_18x.zip", + "sha256": "7cb02225aa1c9160336367333e274d196c5dfbfbd36836f006ef32bc6cf084cf", + "path": "arduino_ide_settings_ver16x_18x/other/hardware/studuino", + "fqbn": "studuino:avr:studuino", + "maxFlashBytes": 15872 + }, + "studuinoLib": { + "$comment": "Studuino ライブラリ(studuino_v1_lib.zip)。公式の配布元(ボード定義と同じ data/ の下)。sha256 は人間がアーテック社から受け取ったファイルと同じ(stg のコンテナのビルドで一致を確かめた)。取れない・sha256 が合わないときは、ライブラリなしでコンテナを作り、toolchain.studuinoLibError に理由が出る(ライブラリの要るサンプルは compile_failed・reason: library_missing)。", + "url": "https://www.artec-kk.co.jp/studuino/data/studuino_v1_lib.zip", + "sha256": "ad0e4aaf6e5f0573b2577c3b0be5e024290525c89df147a2117828907b8ee219", + "libraries": ["Studuino", "MMA8653", "MPU6050", "IRremoteForStuduino", "ColorSensor"] + } +} diff --git a/infra/smalruby-studuino-hex/jest.config.js b/infra/smalruby-studuino-hex/jest.config.js new file mode 100644 index 00000000000..25fb00bfdee --- /dev/null +++ b/infra/smalruby-studuino-hex/jest.config.js @@ -0,0 +1,9 @@ +module.exports = { + testEnvironment: 'node', + roots: ['/lambda/tests'], + testMatch: ['**/*.test.ts'], + testPathIgnorePatterns: ['\\.integration\\.test\\.ts$'], + transform: { + '^.+\\.tsx?$': 'ts-jest', + }, +}; diff --git a/infra/smalruby-studuino-hex/lambda/compiler.ts b/infra/smalruby-studuino-hex/lambda/compiler.ts new file mode 100644 index 00000000000..611a94f566f --- /dev/null +++ b/infra/smalruby-studuino-hex/lambda/compiler.ts @@ -0,0 +1,176 @@ +/** + * arduino-cli でスケッチをコンパイルする(I/O・#2209)。 + * + * コンテナの /opt/arduino は読み取りだけなので、スケッチ・ビルド・出力・キャッシュはすべて /tmp に置く。 + * コアのキャッシュはイメージを作るときに 1 回作っておき(install-toolchain.sh)、最初の呼び出しで + * /tmp へ写す(ウォームの間は /tmp のキャッシュがそのまま効く)。 + */ +import { spawn } from 'child_process'; +import * as crypto from 'crypto'; +import * as fs from 'fs'; +import * as path from 'path'; + +/** コンテナに入っているツールチェーン(toolchain.json)。 */ +export interface Toolchain { + arduinoCli: string; + avrCore: string; + /** Arduino のライブラリ("名前@版" を | で区切る)。 */ + libraries: string; + /** ボード定義の zip の sha256(入れられなかったら null)。 */ + board: string | null; + /** ボード定義を入れられなかった理由(代わりに arduino:avr の pro で作った)。 */ + boardError?: string | null; + fqbn: string; + maxFlashBytes: number; + /** Studuino ライブラリの sha256(入っていなければ null)。 */ + studuinoLib: string | null; + /** Studuino ライブラリを入れられなかった理由。 */ + studuinoLibError?: string | null; +} + +export type CompileResult = + | { ok: true; hex: string; source: string; compileMs: number } + | { ok: false; reason: 'timeout' | 'compile_failed' | 'flash_overflow'; compileMs: number; log: string }; + +export interface CompilerOptions { + cliPath: string; + fqbn: string; + /** スケッチのフォルダの名前と、フォルダに置くファイル(`.ino` を含む)。 */ + sketchName: string; + files: Record; + timeoutMs: number; + /** 作業場所(既定 /tmp)。 */ + tmpDir?: string; + /** イメージに入れておいたコアのキャッシュ。 */ + prebuiltCacheDir?: string; +} + +const LOG_LIMIT = 4000; + +/** + * イメージに入れたコアのキャッシュを /tmp へ写す(1 回だけ)。 + * @param prebuilt - イメージのキャッシュ + * @param target - /tmp のキャッシュ + */ +const ensureCache = (prebuilt: string | undefined, target: string): void => { + if (fs.existsSync(target)) return; + if (prebuilt && fs.existsSync(prebuilt)) { + fs.cpSync(prebuilt, target, { recursive: true }); + } else { + fs.mkdirSync(target, { recursive: true }); + } +}; + +/** + * スケッチをコンパイルして Intel HEX を返す。 + * @param opts - コンパイルの設定 + * @returns 結果(コンパイラの生の出力は log に入れ、呼び出し側はログにだけ残す) + */ +export const compileSketch = async (opts: CompilerOptions): Promise => { + const tmp = opts.tmpDir || '/tmp'; + const id = crypto.randomUUID(); + const work = path.join(tmp, `studuino-${id}`); + const sketchDir = path.join(work, opts.sketchName); + const buildDir = path.join(work, 'build'); + const outDir = path.join(work, 'out'); + const cacheDir = path.join(tmp, 'arduino-cache'); + fs.mkdirSync(sketchDir, { recursive: true }); + for (const [name, content] of Object.entries(opts.files)) { + // ファイル名はサンプルのフォルダから来る(利用者の文字列ではない)が、念のためフォルダの外に書かない + if (name !== path.basename(name)) throw new Error(`invalid sketch file name: ${name}`); + fs.writeFileSync(path.join(sketchDir, name), content); + } + const source = opts.files[`${opts.sketchName}.ino`] ?? ''; + ensureCache(opts.prebuiltCacheDir, cacheDir); + + const args = [ + 'compile', + '--fqbn', + opts.fqbn, + '--build-path', + buildDir, + '--output-dir', + outDir, + '--build-cache-path', + cacheDir, + '--no-color', + sketchDir, + ]; + + const start = Date.now(); + try { + const { code, timedOut, log } = await new Promise<{ code: number | null; timedOut: boolean; log: string }>( + resolve => { + const child = spawn(opts.cliPath, args, { + detached: true, + env: { ...process.env, HOME: tmp }, + }); + let out = ''; + const append = (chunk: Buffer) => { + if (out.length < LOG_LIMIT * 2) out += chunk.toString(); + }; + child.stdout.on('data', append); + child.stderr.on('data', append); + let timedOut = false; + const timer = setTimeout(() => { + timedOut = true; + // avr-gcc などの子プロセスごと止める + try { + if (child.pid) process.kill(-child.pid, 'SIGKILL'); + } catch { + child.kill('SIGKILL'); + } + }, opts.timeoutMs); + child.on('error', err => { + clearTimeout(timer); + resolve({ code: -1, timedOut, log: `${out}\n${String(err)}` }); + }); + child.on('close', code => { + clearTimeout(timer); + resolve({ code, timedOut, log: out }); + }); + }, + ); + const compileMs = Date.now() - start; + const tail = log.slice(-LOG_LIMIT); + if (timedOut) return { ok: false, reason: 'timeout', compileMs, log: tail }; + if (code !== 0) { + const overflow = /Sketch too big|text section exceeds available space|region `text' overflowed/i.test(log); + return { ok: false, reason: overflow ? 'flash_overflow' : 'compile_failed', compileMs, log: tail }; + } + const hex = fs.readFileSync(path.join(outDir, `${opts.sketchName}.ino.hex`), 'utf8'); + return { ok: true, hex, source, compileMs }; + } finally { + fs.rmSync(work, { recursive: true, force: true }); + } +}; + +/** + * toolchain.json を読む。無ければ(テストなど)null。 + * @param file - toolchain.json のパス + * @returns ツールチェーン + */ +export const readToolchain = (file: string | undefined): Toolchain | null => { + if (!file || !fs.existsSync(file)) return null; + return JSON.parse(fs.readFileSync(file, 'utf8')) as Toolchain; +}; + +/** スケッチとしてコンパイルするファイル(LICENSE などは写さない)。 */ +const SKETCH_FILE = /\.(ino|cpp|c|h|hpp|S)$/; + +/** + * サンプルのフォルダのファイルを読む(.ino と、一緒にコンパイルする .cpp / .h)。 + * @param samplesDir - サンプルのフォルダ + * @param name - サンプルの名前 + * @returns ファイル名 → 中身 + */ +export const readSample = (samplesDir: string, name: string): Record => { + const dir = path.join(samplesDir, name); + const files: Record = {}; + for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { + if (entry.isFile() && SKETCH_FILE.test(entry.name)) { + files[entry.name] = fs.readFileSync(path.join(dir, entry.name), 'utf8'); + } + } + return files; +}; diff --git a/infra/smalruby-studuino-hex/lambda/handler.ts b/infra/smalruby-studuino-hex/lambda/handler.ts new file mode 100644 index 00000000000..26ce161e993 --- /dev/null +++ b/infra/smalruby-studuino-hex/lambda/handler.ts @@ -0,0 +1,185 @@ +/** + * Studuino の hex を作る Lambda(#2209: 土台)。 + * + * `POST /compile` に `{ "sample": "<名前>" }` を送ると、決まったサンプルをコンパイルして hex を返す。 + * 任意の C++ はまだ受け付けない(構文木の検査と C++ の書き出しは #2210 で足す)。 + * 応答と失敗の形は docs/studuino-mode/README.md の「Lambda の API」に合わせる。 + */ +import * as crypto from 'crypto'; +import type { APIGatewayProxyEventV2 } from 'aws-lambda'; +import { compileSketch, readSample, readToolchain, type CompileResult, type Toolchain } from './compiler'; +import { + errorResponse, + findSample, + hexDataBytes, + isAllowedOrigin, + jsonResponse, + metricLog, + parseLimits, + parseOrigins, + rateDecision, + rateWindows, + type HttpResponse, + type Limits, + type RequestRecord, +} from './policy'; +import { incrementWindows } from './rate-limit'; + +export interface HandlerDeps { + stage: string; + allowedOrigins: string[]; + limits: Limits; + toolchain: Toolchain | null; + now: () => number; + /** 各窓の数を増やして返す(数えられない窓は undefined)。 */ + countRequests: (windows: ReturnType) => Promise<(number | undefined)[]>; + loadSample: (name: string) => Record; + compile: (sketchName: string, files: Record) => Promise; + log: (entry: Record) => void; +} + +const sha256 = (value: string): string => crypto.createHash('sha256').update(value).digest('hex'); + +/** + * 依存を差しこんでハンドラを作る(テストでは compile・DynamoDB を差し替える)。 + * @param deps - 依存 + * @returns Lambda のハンドラ + */ +export const createHandler = (deps: HandlerDeps) => { + let coldStart = true; + + return async (event: APIGatewayProxyEventV2): Promise => { + const startedAt = deps.now(); + const wasCold = coldStart; + coldStart = false; + const headers = event.headers || {}; + const origin = headers.origin || headers.Origin; + const allowedOrigin = isAllowedOrigin(origin, deps.allowedOrigins) ? origin : undefined; + const rawBody = event.body + ? event.isBase64Encoded + ? Buffer.from(event.body, 'base64').toString('utf8') + : event.body + : ''; + const record: RequestRecord = { + outcome: 'ok', + requestBytes: Buffer.byteLength(rawBody, 'utf8'), + totalMs: 0, + coldStart: wasCold, + }; + + const finish = (response: HttpResponse): HttpResponse => { + record.totalMs = deps.now() - startedAt; + deps.log(metricLog(record, deps.stage, deps.now())); + return response; + }; + const fail = ( + code: Exclude, + extra: Record = {}, + ): HttpResponse => { + record.outcome = code; + if (typeof extra.reason === 'string') record.reason = extra.reason; + return finish(errorResponse(code, allowedOrigin, extra)); + }; + + // CORS はブラウザにしか効かないので、ハンドラでも Origin を確かめる + if (!allowedOrigin) return fail('forbidden_origin'); + if (record.requestBytes > deps.limits.maxRequestBytes) { + return fail('too_large', { maxBytes: deps.limits.maxRequestBytes }); + } + + const sourceIp = event.requestContext?.http?.sourceIp || 'unknown'; + const windows = rateWindows(sha256(sourceIp), deps.now(), deps.limits); + const counts = await deps.countRequests(windows); + if (counts.some(c => c === undefined)) record.rateLimitFailOpen = true; + const decision = rateDecision(counts, windows, deps.now()); + if (!decision.allowed) return fail('rate_limited', { retryAfter: decision.retryAfter }); + + let body: unknown; + try { + body = rawBody ? JSON.parse(rawBody) : {}; + } catch { + return fail('invalid_request', { reason: 'invalid_json' }); + } + const sample = findSample((body as { sample?: unknown } | null)?.sample); + if (!sample) return fail('invalid_request', { reason: 'unknown_sample' }); + record.sample = sample.name; + + const toolchain = deps.toolchain; + if (!toolchain) return fail('internal', { reason: 'toolchain_missing' }); + if (sample.needsStuduinoLib && !toolchain.studuinoLib) { + return fail('compile_failed', { + reason: 'library_missing', + ...(toolchain.studuinoLibError ? { libraryError: toolchain.studuinoLibError } : {}), + }); + } + + let result: CompileResult; + try { + result = await deps.compile(sample.name, deps.loadSample(sample.name)); + } catch (err) { + deps.log({ event: 'studuino_hex_error', error: String(err) }); + return fail('internal'); + } + record.compileMs = result.compileMs; + if (!result.ok) { + deps.log({ event: 'studuino_hex_compile_log', reason: result.reason, log: result.log }); + if (result.reason === 'timeout') return fail('timeout', { timeoutMs: deps.limits.compileTimeoutMs }); + return fail('compile_failed', { reason: result.reason }); + } + + const size = hexDataBytes(result.hex); + record.hexBytes = size; + if (size > toolchain.maxFlashBytes) { + return fail('compile_failed', { reason: 'flash_overflow' }); + } + return finish( + jsonResponse( + 200, + { + hex: result.hex, + size, + maxSize: toolchain.maxFlashBytes, + source: result.source, + toolchain: { + arduinoCli: toolchain.arduinoCli, + avrCore: toolchain.avrCore, + libraries: toolchain.libraries, + board: toolchain.board, + fqbn: toolchain.fqbn, + studuinoLib: toolchain.studuinoLib, + ...(toolchain.boardError ? { boardError: toolchain.boardError } : {}), + ...(toolchain.studuinoLibError ? { studuinoLibError: toolchain.studuinoLibError } : {}), + }, + compileMs: result.compileMs, + // 計測用(コールドとウォームの時間を比べる) + coldStart: wasCold, + }, + allowedOrigin, + ), + ); + }; +}; + +const env = process.env; +const limits = parseLimits(env); +const toolchain = readToolchain(env.STUDUINO_TOOLCHAIN_FILE); + +export const handler = createHandler({ + stage: env.STAGE || 'stg', + allowedOrigins: parseOrigins(env.CORS_ALLOWED_ORIGINS), + limits, + toolchain, + now: () => Date.now(), + countRequests: windows => incrementWindows(env.RATE_LIMIT_TABLE_NAME || '', windows), + loadSample: name => readSample(env.STUDUINO_SAMPLES_DIR || '/opt/arduino/samples', name), + compile: (sketchName, files) => + compileSketch({ + cliPath: env.ARDUINO_CLI || 'arduino-cli', + fqbn: toolchain?.fqbn || '', + sketchName, + files, + timeoutMs: limits.compileTimeoutMs, + prebuiltCacheDir: env.STUDUINO_PREBUILT_CACHE, + }), + log: entry => console.log(JSON.stringify(entry)), +}); diff --git a/infra/smalruby-studuino-hex/lambda/policy.ts b/infra/smalruby-studuino-hex/lambda/policy.ts new file mode 100644 index 00000000000..fee6ea9c69c --- /dev/null +++ b/infra/smalruby-studuino-hex/lambda/policy.ts @@ -0,0 +1,306 @@ +/** + * Studuino の hex を作る Lambda の判断(純粋関数・#2209)。 + * + * 上限・Origin・回数の窓・応答の形・計測のログをここに集める。I/O(コンパイル・DynamoDB)は + * compiler.ts / rate-limit.ts に置き、handler.ts がつなぐ。 + */ + +/** 上限(S12 = C: 推奨の倍からはじめる。環境変数で変えられる)。 */ +export interface Limits { + /** リクエストの本文の上限(バイト)。超えたら 413。 */ + maxRequestBytes: number; + /** コンパイルを打ち切るまでの時間(ミリ秒)。超えたら 504。 */ + compileTimeoutMs: number; + /** IP ごとの 1 分の回数。超えたら 429。 */ + perMinute: number; + /** IP ごとの 1 日の回数。超えたら 429。 */ + perDay: number; +} + +export const DEFAULT_LIMITS: Limits = { + maxRequestBytes: 128 * 1024, + // S12 の目安は 60 秒だが、API Gateway(HTTP API)の統合は 30 秒で切れる。Lambda の + // タイムアウト(30 秒)より前に打ち切って 504 を返せるよう、既定は 25 秒にする。 + compileTimeoutMs: 25_000, + perMinute: 12, + perDay: 600, +}; + +const positiveInt = (value: string | undefined, fallback: number): number => { + if (value === undefined || value.trim() === '') return fallback; + const n = Number(value); + return Number.isInteger(n) && n > 0 ? n : fallback; +}; + +/** + * 環境変数から上限を読む。壊れた値は既定に戻す(設定の誤りで Lambda を止めない)。 + * @param env - 環境変数 + * @returns 上限 + */ +export const parseLimits = (env: Record): Limits => ({ + maxRequestBytes: positiveInt(env.MAX_REQUEST_BYTES, DEFAULT_LIMITS.maxRequestBytes), + compileTimeoutMs: positiveInt(env.COMPILE_TIMEOUT_MS, DEFAULT_LIMITS.compileTimeoutMs), + perMinute: positiveInt(env.RATE_LIMIT_PER_MINUTE, DEFAULT_LIMITS.perMinute), + perDay: positiveInt(env.RATE_LIMIT_PER_DAY, DEFAULT_LIMITS.perDay), +}); + +/** + * カンマ区切りの許可オリジンを配列にする。 + * @param value - `CORS_ALLOWED_ORIGINS` + * @returns 許可オリジン + */ +export const parseOrigins = (value: string | undefined): string[] => + (value || '') + .split(',') + .map(o => o.trim()) + .filter(Boolean); + +/** + * Origin が許可されているか。Origin が無いもの(ブラウザ以外からの呼び出し)も許さない。 + * CORS はブラウザにしか効かないので、ハンドラでも確かめる。 + * @param origin - リクエストの Origin + * @param allowed - 許可オリジン + * @returns 許可されていれば true + */ +export const isAllowedOrigin = (origin: string | undefined, allowed: string[]): boolean => + !!origin && allowed.includes(origin); + +/** + * 動作確認とコンパイル時間の計測用のサンプル(この段階では任意の C++ は受け付けない)。 + * 大きさの違う 4 つで、コンパイルの打ち切り(既定 25 秒)が足りるかを測る。 + */ +export interface Sample { + name: string; + /** 大きさの目安(small: コアだけ / Studuino ライブラリ最小、medium: ロボットカー、large: フラッシュの上限近く)。 */ + size: 'small' | 'medium' | 'large'; + /** Studuino ライブラリが要るか(コンテナに入っていなければ library_missing)。 */ + needsStuduinoLib: boolean; +} + +export const SAMPLES: Sample[] = [ + { name: 'blink', size: 'small', needsStuduinoLib: false }, + { name: 'studuino-led', size: 'small', needsStuduinoLib: true }, + { name: 'robot-car', size: 'medium', needsStuduinoLib: true }, + { name: 'smalrubot-s1', size: 'large', needsStuduinoLib: true }, +]; + +export const findSample = (name: unknown): Sample | undefined => + typeof name === 'string' ? SAMPLES.find(s => s.name === name) : undefined; + +/** 回数の窓(固定窓)。 */ +export interface RateWindow { + /** DynamoDB のキー。 */ + key: string; + limit: number; + /** 窓が終わる時刻(epoch 秒)。TTL にも使う。 */ + resetAt: number; +} + +/** + * IP ごとの 1 分・1 日の窓を作る。 + * @param ipHash - IP のハッシュ(IP をそのまま表に残さない) + * @param nowMs - いまの時刻(ms epoch) + * @param limits - 上限 + * @returns 1 分の窓と 1 日の窓 + */ +export const rateWindows = (ipHash: string, nowMs: number, limits: Limits): RateWindow[] => { + const nowSec = Math.floor(nowMs / 1000); + const minuteStart = nowSec - (nowSec % 60); + const dayStart = nowSec - (nowSec % 86_400); + return [ + { key: `ip#${ipHash}#min#${minuteStart}`, limit: limits.perMinute, resetAt: minuteStart + 60 }, + { key: `ip#${ipHash}#day#${dayStart}`, limit: limits.perDay, resetAt: dayStart + 86_400 }, + ]; +}; + +/** + * 数えた結果から、通すか・何秒待てばよいかを決める。 + * @param counts - 各窓の数(数えられなかった窓は undefined = fail-open) + * @param windows - 窓 + * @param nowMs - いまの時刻(ms epoch) + * @returns 判断 + */ +export const rateDecision = ( + counts: (number | undefined)[], + windows: RateWindow[], + nowMs: number, +): { allowed: boolean; retryAfter?: number } => { + const nowSec = Math.floor(nowMs / 1000); + let retryAfter: number | undefined; + windows.forEach((w, i) => { + const c = counts[i]; + if (c !== undefined && c > w.limit) { + const wait = Math.max(1, w.resetAt - nowSec); + retryAfter = retryAfter === undefined ? wait : Math.max(retryAfter, wait); + } + }); + return retryAfter === undefined ? { allowed: true } : { allowed: false, retryAfter }; +}; + +/** 失敗の種類(docs/studuino-mode/README.md の「Lambda の API」と同じ名前)。 */ +export type ErrorCode = + | 'invalid_request' + | 'forbidden_origin' + | 'too_large' + | 'compile_failed' + | 'rate_limited' + | 'timeout' + | 'internal'; + +export const STATUS_BY_ERROR: Record = { + invalid_request: 400, + forbidden_origin: 403, + too_large: 413, + compile_failed: 422, + rate_limited: 429, + timeout: 504, + internal: 500, +}; + +export const MESSAGE_BY_ERROR: Record = { + invalid_request: 'リクエストの形が正しくありません。', + forbidden_origin: 'この場所からは呼び出せません。', + too_large: 'プログラムが大きすぎます。', + compile_failed: 'プログラムを hex にできませんでした。', + rate_limited: '短い時間に何度も呼び出しています。しばらく待ってから試してください。', + timeout: 'hex を作るのに時間がかかりすぎました。', + internal: 'サーバーでエラーが起きました。', +}; + +export interface HttpResponse { + statusCode: number; + headers: Record; + body: string; +} + +/** + * JSON の応答を作る。許可された Origin のときだけ CORS のヘッダを付ける。 + * @param statusCode - HTTP ステータス + * @param body - 本文 + * @param origin - 許可された Origin(許可外なら undefined) + * @param extraHeaders - 追加のヘッダ + * @returns 応答 + */ +export const jsonResponse = ( + statusCode: number, + body: unknown, + origin?: string, + extraHeaders: Record = {}, +): HttpResponse => ({ + statusCode, + headers: { + 'Content-Type': 'application/json; charset=utf-8', + 'Cache-Control': 'no-store', + ...(origin ? { 'Access-Control-Allow-Origin': origin, Vary: 'Origin' } : {}), + ...extraHeaders, + }, + body: JSON.stringify(body), +}); + +/** + * 失敗の応答を作る。コンパイラの生の出力は返さない(ログにだけ残す)。 + * @param code - 失敗の種類 + * @param origin - 許可された Origin + * @param extra - 本文に足す値(reason・retryAfter など) + * @returns 応答 + */ +export const errorResponse = ( + code: ErrorCode, + origin?: string, + extra: Record = {}, +): HttpResponse => { + const headers: Record = {}; + if (typeof extra.retryAfter === 'number') headers['Retry-After'] = String(extra.retryAfter); + return jsonResponse( + STATUS_BY_ERROR[code], + { error: code, message: MESSAGE_BY_ERROR[code], ...extra }, + origin, + headers, + ); +}; + +/** + * Intel HEX のデータの大きさ(バイト)を数える(データレコード = 種類 00 だけ)。 + * @param hex - Intel HEX の文字列 + * @returns バイト数 + */ +export const hexDataBytes = (hex: string): number => { + let total = 0; + for (const raw of hex.split(/\r?\n/)) { + const line = raw.trim(); + if (!line.startsWith(':') || line.length < 11) continue; + if (line.slice(7, 9) !== '00') continue; + total += parseInt(line.slice(1, 3), 16); + } + return total; +}; + +/** 1 回ごとの計測(構造化ログ)。 */ +export interface RequestRecord { + outcome: 'ok' | ErrorCode; + /** 失敗の細かい理由(library_missing・flash_overflow など)。 */ + reason?: string; + sample?: string; + requestBytes: number; + compileMs?: number; + hexBytes?: number; + totalMs: number; + coldStart: boolean; + /** 回数を数えられなかった(DynamoDB の障害で fail-open した)。 */ + rateLimitFailOpen?: boolean; +} + +export const METRICS_NAMESPACE = 'Smalruby/StuduinoHex'; + +/** + * CloudWatch Embedded Metric Format のログを作る。ログに出すだけで、メトリクス + * (回数・失敗・拒否・コンパイル時間・hex の大きさ)が CloudWatch にできる(SDK を呼ばない)。 + * @param record - 1 回の計測 + * @param stage - ステージ + * @param nowMs - いまの時刻(ms epoch) + * @returns ログに出すオブジェクト + */ +export const metricLog = ( + record: RequestRecord, + stage: string, + nowMs: number, +): Record => { + const rejected = ['forbidden_origin', 'too_large', 'rate_limited', 'invalid_request'].includes( + record.outcome, + ); + const failed = !rejected && record.outcome !== 'ok'; + const metrics: { Name: string; Unit: string }[] = [ + { Name: 'Requests', Unit: 'Count' }, + { Name: 'Succeeded', Unit: 'Count' }, + { Name: 'Failed', Unit: 'Count' }, + { Name: 'Rejected', Unit: 'Count' }, + { Name: 'RequestBytes', Unit: 'Bytes' }, + { Name: 'TotalTime', Unit: 'Milliseconds' }, + ]; + const values: Record = { + Requests: 1, + Succeeded: record.outcome === 'ok' ? 1 : 0, + Failed: failed ? 1 : 0, + Rejected: rejected ? 1 : 0, + RequestBytes: record.requestBytes, + TotalTime: record.totalMs, + }; + if (record.compileMs !== undefined) { + metrics.push({ Name: 'CompileTime', Unit: 'Milliseconds' }); + values.CompileTime = record.compileMs; + } + if (record.hexBytes !== undefined) { + metrics.push({ Name: 'HexBytes', Unit: 'Bytes' }); + values.HexBytes = record.hexBytes; + } + return { + _aws: { + Timestamp: nowMs, + CloudWatchMetrics: [{ Namespace: METRICS_NAMESPACE, Dimensions: [['Stage']], Metrics: metrics }], + }, + Stage: stage, + event: 'studuino_hex_request', + ...record, + ...values, + }; +}; diff --git a/infra/smalruby-studuino-hex/lambda/rate-limit.ts b/infra/smalruby-studuino-hex/lambda/rate-limit.ts new file mode 100644 index 00000000000..e427be3811c --- /dev/null +++ b/infra/smalruby-studuino-hex/lambda/rate-limit.ts @@ -0,0 +1,46 @@ +/** + * IP ごとの回数を DynamoDB で数える(固定窓・I/O・#2209)。 + * + * DynamoDB が使えないときは数えずに通す(fail-open。rubytee-relay と同じ。 + * `.claude/rules/infra/development.md` の「混雑・障害時の劣化」)。通したことは計測のログに残す。 + */ +import { DynamoDBClient } from '@aws-sdk/client-dynamodb'; +import { DynamoDBDocumentClient, UpdateCommand } from '@aws-sdk/lib-dynamodb'; +import type { RateWindow } from './policy'; + +let docClient: DynamoDBDocumentClient | undefined; +const client = (): DynamoDBDocumentClient => { + if (!docClient) docClient = DynamoDBDocumentClient.from(new DynamoDBClient({})); + return docClient; +}; + +/** + * 各窓の数を 1 つ増やして、増やしたあとの数を返す。 + * @param tableName - 表の名前 + * @param windows - 窓 + * @returns 各窓の数(数えられなかった窓は undefined) + */ +export const incrementWindows = async ( + tableName: string, + windows: RateWindow[], +): Promise<(number | undefined)[]> => + Promise.all( + windows.map(async w => { + try { + const res = await client().send( + new UpdateCommand({ + TableName: tableName, + Key: { key: w.key }, + UpdateExpression: 'SET #count = if_not_exists(#count, :zero) + :one, #ttl = :ttl', + ExpressionAttributeNames: { '#count': 'count', '#ttl': 'ttl' }, + ExpressionAttributeValues: { ':zero': 0, ':one': 1, ':ttl': w.resetAt }, + ReturnValues: 'UPDATED_NEW', + }), + ); + return res.Attributes?.count as number | undefined; + } catch (err) { + console.error('[RateLimit] DynamoDB error, failing open:', err); + return undefined; + } + }), + ); diff --git a/infra/smalruby-studuino-hex/lambda/tests/cors-origins.test.ts b/infra/smalruby-studuino-hex/lambda/tests/cors-origins.test.ts new file mode 100644 index 00000000000..fcd01f8aade --- /dev/null +++ b/infra/smalruby-studuino-hex/lambda/tests/cors-origins.test.ts @@ -0,0 +1,141 @@ +/** + * CORS 許可オリジンの決定ロジック (#1160 / #1342)。 + * + * ローカルの dev server は 8601 から順に使うため非 prod では範囲で許可するが、 + * その緩和が prod に漏れないことが本質。ここが崩れると本番 API が localhost から + * 叩けてしまうので、範囲そのものより「prod に入らない」ことを厚めに固定する。 + * + * 正本は `infra/shared/tests/cors-origins.test.ts`。各プロジェクトの `lambda/tests/` にあるのは + * コピーなので直接編集しない(`node infra/shared/sync.js` で配る)。 + */ +import { + LOCAL_DEV_PORT_FIRST, + LOCAL_DEV_PORT_LAST, + PREVIEW_ORIGINS, + isLocalOrigin, + localDevOrigins, + resolveCorsOrigins, + withPreviewOrigins, +} from '../../lib/cors-origins'; + +const PROD_ORIGINS = ['https://smalruby.app', 'https://smalruby.jp']; + +describe('localDevOrigins', () => { + test('8601 から 8610 までを両端込みで並べる', () => { + const origins = localDevOrigins(); + + expect(origins).toHaveLength(LOCAL_DEV_PORT_LAST - LOCAL_DEV_PORT_FIRST + 1); + expect(origins[0]).toBe('http://localhost:8601'); + expect(origins[origins.length - 1]).toBe('http://localhost:8610'); + }); + + test('範囲外のポートは含まない', () => { + const origins = localDevOrigins(); + + expect(origins).not.toContain('http://localhost:8600'); + expect(origins).not.toContain('http://localhost:8611'); + }); +}); + +describe('isLocalOrigin', () => { + test.each([ + 'http://localhost:8601', + 'http://localhost', + 'https://localhost:8602', + 'http://127.0.0.1:8601', + 'http://[::1]:8601', + ])('%s はローカル扱い', (origin) => { + expect(isLocalOrigin(origin)).toBe(true); + }); + + test.each([ + 'https://smalruby.app', + 'https://smalruby.jp', + // ホスト名の一部に localhost を含むだけの別ドメインを取り違えない。 + 'https://localhost.example.com', + 'https://notlocalhost', + ])('%s は本番オリジン扱い', (origin) => { + expect(isLocalOrigin(origin)).toBe(false); + }); +}); + +describe('resolveCorsOrigins', () => { + test('非 prod は本番オリジン + ローカル範囲 + ブランチプレビュー', () => { + const origins = resolveCorsOrigins('stg', PROD_ORIGINS); + + expect(origins).toEqual([...PROD_ORIGINS, ...localDevOrigins(), ...PREVIEW_ORIGINS]); + }); + + test('prod はローカルを一切含まない', () => { + const origins = resolveCorsOrigins('prod', PROD_ORIGINS); + + expect(origins).toEqual(PROD_ORIGINS); + expect(origins.some(isLocalOrigin)).toBe(false); + }); + + test('prod はブランチプレビューを含まない(プレビューは stg の API を見る)', () => { + expect(resolveCorsOrigins('prod', PROD_ORIGINS)).not.toContain('https://preview.smalruby.app'); + expect(resolveCorsOrigins('prod', PROD_ORIGINS, 'https://smalruby.app')).not.toContain( + 'https://preview.smalruby.app', + ); + }); + + test('env の指定が既定より優先される', () => { + const origins = resolveCorsOrigins('stg', PROD_ORIGINS, 'https://example.com, http://localhost:9999'); + + expect(origins).toEqual(['https://example.com', 'http://localhost:9999', ...PREVIEW_ORIGINS]); + }); + + // stg の env は GitHub secrets 由来で CORS_ALLOWED_ORIGINS を明示しているため、 + // env を指定してもプレビューが落ちないことを固定する。 + test('非 prod では env を指定してもブランチプレビューを足す(重複はしない)', () => { + expect(resolveCorsOrigins('stg', PROD_ORIGINS, 'https://smalruby.app')).toEqual([ + 'https://smalruby.app', + 'https://preview.smalruby.app', + ]); + expect( + resolveCorsOrigins('stg', PROD_ORIGINS, 'https://preview.smalruby.app,https://smalruby.app'), + ).toEqual(['https://preview.smalruby.app', 'https://smalruby.app']); + }); + + test('prod に localhost を渡した env は deploy させない', () => { + expect(() => + resolveCorsOrigins('prod', PROD_ORIGINS, 'https://smalruby.app,http://localhost:8601'), + ).toThrow(/must not contain local origins in prod/); + }); + + test('prod でも本番オリジンだけの env は通る', () => { + expect(resolveCorsOrigins('prod', PROD_ORIGINS, 'https://smalruby.app')).toEqual([ + 'https://smalruby.app', + ]); + }); + + test('env の空要素・余分な空白を落とす', () => { + expect(resolveCorsOrigins('stg', PROD_ORIGINS, ' https://a.example , , https://b.example ')).toEqual([ + 'https://a.example', + 'https://b.example', + ...PREVIEW_ORIGINS, + ]); + }); +}); + +describe('withPreviewOrigins(prod の許可オリジンは 1 文字も変えない)', () => { + test('非 prod では末尾にブランチプレビューを足す', () => { + expect(withPreviewOrigins('stg', 'https://smalruby.app,http://localhost:8601')).toBe( + 'https://smalruby.app,http://localhost:8601,https://preview.smalruby.app', + ); + expect(PREVIEW_ORIGINS).toEqual(['https://preview.smalruby.app']); + }); + + test('非 prod ですでに含まれていれば重複させない', () => { + expect(withPreviewOrigins('stg', 'https://smalruby.app, https://preview.smalruby.app')).toBe( + 'https://smalruby.app, https://preview.smalruby.app', + ); + }); + + test('prod は渡された値をそのまま返す', () => { + const value = 'https://smalruby.app,https://smalruby.jp,http://localhost:8601'; + + expect(withPreviewOrigins('prod', value)).toBe(value); + }); +}); diff --git a/infra/smalruby-studuino-hex/lambda/tests/handler.test.ts b/infra/smalruby-studuino-hex/lambda/tests/handler.test.ts new file mode 100644 index 00000000000..b4b04d524cc --- /dev/null +++ b/infra/smalruby-studuino-hex/lambda/tests/handler.test.ts @@ -0,0 +1,150 @@ +import type { APIGatewayProxyEventV2 } from 'aws-lambda'; +import type { CompileResult, Toolchain } from '../compiler'; +import { createHandler, type HandlerDeps } from '../handler'; +import { DEFAULT_LIMITS } from '../policy'; + +const ORIGIN = 'https://smalruby.app'; +const HEX = ':100000000C9466000C948E000C948E000C948E0060\n:00000001FF\n'; + +const toolchain: Toolchain = { + arduinoCli: '1.5.1', + avrCore: 'arduino:avr@1.8.8', + libraries: 'Servo@1.2.2|Adafruit NeoPixel@1.15.2', + board: 'sha256:board', + fqbn: 'studuino:avr:studuino', + maxFlashBytes: 15872, + studuinoLib: 'sha256:abc', +}; + +const makeDeps = (over: Partial = {}) => { + const logs: Record[] = []; + const compile = jest.fn( + async (): Promise => ({ ok: true, hex: HEX, source: 'void setup(){}', compileMs: 1200 }), + ); + const deps: HandlerDeps = { + stage: 'stg', + allowedOrigins: [ORIGIN], + limits: DEFAULT_LIMITS, + toolchain, + now: () => 1_700_000_000_000, + countRequests: async () => [1, 1], + loadSample: name => ({ [`${name}.ino`]: 'void setup(){}' }), + compile, + log: entry => logs.push(entry), + ...over, + }; + return { deps, logs, compile }; +}; + +const event = (body: unknown, headers: Record = { origin: ORIGIN }) => + ({ + body: typeof body === 'string' ? body : JSON.stringify(body), + headers, + isBase64Encoded: false, + requestContext: { http: { sourceIp: '203.0.113.1' } }, + }) as unknown as APIGatewayProxyEventV2; + +const metric = (logs: Record[]) => logs.find(l => l.event === 'studuino_hex_request'); + +describe('POST /compile', () => { + test('サンプルをコンパイルして hex を返す', async () => { + const { deps, logs, compile } = makeDeps(); + const res = await createHandler(deps)(event({ sample: 'blink' })); + expect(res.statusCode).toBe(200); + expect(res.headers['Access-Control-Allow-Origin']).toBe(ORIGIN); + const body = JSON.parse(res.body); + expect(body).toMatchObject({ hex: HEX, size: 16, maxSize: 15872, source: 'void setup(){}', coldStart: true }); + expect(body.toolchain).toMatchObject({ arduinoCli: '1.5.1', fqbn: toolchain.fqbn, board: 'sha256:board' }); + expect(compile).toHaveBeenCalledWith('blink', { 'blink.ino': 'void setup(){}' }); + expect(metric(logs)).toMatchObject({ outcome: 'ok', sample: 'blink', compileMs: 1200, hexBytes: 16, coldStart: true }); + }); + + test('2 回目はコールドスタートでない', async () => { + const { deps, logs } = makeDeps(); + const h = createHandler(deps); + await h(event({ sample: 'blink' })); + await h(event({ sample: 'blink' })); + expect(logs.filter(l => l.event === 'studuino_hex_request').map(l => l.coldStart)).toEqual([true, false]); + }); + + test('許可外の Origin は 403(コンパイルしない)', async () => { + const { deps, compile } = makeDeps(); + const res = await createHandler(deps)(event({ sample: 'blink' }, { origin: 'https://evil.example' })); + expect(res.statusCode).toBe(403); + expect(JSON.parse(res.body).error).toBe('forbidden_origin'); + expect(compile).not.toHaveBeenCalled(); + }); + + test('Origin が無いものも 403', async () => { + const { deps } = makeDeps(); + expect((await createHandler(deps)(event({ sample: 'blink' }, {}))).statusCode).toBe(403); + }); + + test('本文が上限を超えたら 413(数えない)', async () => { + const countRequests = jest.fn(async () => [1, 1]); + const { deps } = makeDeps({ limits: { ...DEFAULT_LIMITS, maxRequestBytes: 10 }, countRequests }); + const res = await createHandler(deps)(event({ sample: 'blink', pad: 'xxxxxxxxxx' })); + expect(res.statusCode).toBe(413); + expect(countRequests).not.toHaveBeenCalled(); + }); + + test('回数の上限を超えたら 429 と Retry-After', async () => { + const { deps, compile } = makeDeps({ countRequests: async () => [13, 13] }); + const res = await createHandler(deps)(event({ sample: 'blink' })); + expect(res.statusCode).toBe(429); + expect(Number(res.headers['Retry-After'])).toBeGreaterThan(0); + expect(compile).not.toHaveBeenCalled(); + }); + + test('DynamoDB が使えないときは通し、ログに残す(fail-open)', async () => { + const { deps, logs } = makeDeps({ countRequests: async () => [undefined, undefined] }); + const res = await createHandler(deps)(event({ sample: 'blink' })); + expect(res.statusCode).toBe(200); + expect(metric(logs)).toMatchObject({ rateLimitFailOpen: true }); + }); + + test('知らないサンプル・壊れた JSON は 400', async () => { + const { deps } = makeDeps(); + const h = createHandler(deps); + expect(JSON.parse((await h(event({ sample: 'nope' }))).body)).toMatchObject({ + error: 'invalid_request', + reason: 'unknown_sample', + }); + expect((await h(event('{'))).statusCode).toBe(400); + }); + + test('ライブラリが入っていないコンテナでは studuino-led は 422 library_missing', async () => { + const { deps, compile } = makeDeps({ + toolchain: { ...toolchain, studuinoLib: null, studuinoLibError: 'download failed' }, + }); + const res = await createHandler(deps)(event({ sample: 'studuino-led' })); + expect(res.statusCode).toBe(422); + expect(JSON.parse(res.body)).toMatchObject({ reason: 'library_missing', libraryError: 'download failed' }); + expect(compile).not.toHaveBeenCalled(); + }); + + test('コンパイルの打ち切りは 504、失敗は 422(コンパイラの出力は返さずログにだけ)', async () => { + const timeout = makeDeps({ + compile: async () => ({ ok: false, reason: 'timeout', compileMs: 25000, log: 'secret path' }), + }); + const r1 = await createHandler(timeout.deps)(event({ sample: 'blink' })); + expect(r1.statusCode).toBe(504); + expect(r1.body).not.toContain('secret path'); + expect(timeout.logs.some(l => l.log === 'secret path')).toBe(true); + + const failed = makeDeps({ + compile: async () => ({ ok: false, reason: 'flash_overflow', compileMs: 3000, log: 'too big' }), + }); + const r2 = await createHandler(failed.deps)(event({ sample: 'blink' })); + expect(r2.statusCode).toBe(422); + expect(JSON.parse(r2.body).reason).toBe('flash_overflow'); + }); + + test('base64 の本文も読む', async () => { + const { deps } = makeDeps(); + const e = event(''); + e.body = Buffer.from(JSON.stringify({ sample: 'blink' })).toString('base64'); + e.isBase64Encoded = true; + expect((await createHandler(deps)(e)).statusCode).toBe(200); + }); +}); diff --git a/infra/smalruby-studuino-hex/lambda/tests/policy.test.ts b/infra/smalruby-studuino-hex/lambda/tests/policy.test.ts new file mode 100644 index 00000000000..9f929632fb5 --- /dev/null +++ b/infra/smalruby-studuino-hex/lambda/tests/policy.test.ts @@ -0,0 +1,141 @@ +import { + DEFAULT_LIMITS, + errorResponse, + findSample, + hexDataBytes, + isAllowedOrigin, + metricLog, + parseLimits, + parseOrigins, + rateDecision, + rateWindows, +} from '../policy'; + +describe('parseLimits', () => { + test('既定は S12 の値(コンパイルは API Gateway の 30 秒に収まる 25 秒)', () => { + expect(parseLimits({})).toEqual({ + maxRequestBytes: 131072, + compileTimeoutMs: 25000, + perMinute: 12, + perDay: 600, + }); + }); + + test('環境変数で変えられ、壊れた値は既定に戻す', () => { + const limits = parseLimits({ + MAX_REQUEST_BYTES: '1000', + COMPILE_TIMEOUT_MS: 'abc', + RATE_LIMIT_PER_MINUTE: '-1', + RATE_LIMIT_PER_DAY: '50', + }); + expect(limits).toEqual({ ...DEFAULT_LIMITS, maxRequestBytes: 1000, perDay: 50 }); + }); +}); + +describe('Origin', () => { + const allowed = parseOrigins('https://smalruby.app, https://preview.smalruby.app'); + + test('許可したオリジンだけ通す', () => { + expect(isAllowedOrigin('https://smalruby.app', allowed)).toBe(true); + expect(isAllowedOrigin('https://evil.example', allowed)).toBe(false); + }); + + test('Origin が無いもの(ブラウザ以外)も通さない', () => { + expect(isAllowedOrigin(undefined, allowed)).toBe(false); + }); +}); + +describe('findSample', () => { + test('決まったサンプルだけ', () => { + expect(findSample('blink')?.needsStuduinoLib).toBe(false); + expect(findSample('studuino-led')?.needsStuduinoLib).toBe(true); + expect(findSample('../etc/passwd')).toBeUndefined(); + expect(findSample(1)).toBeUndefined(); + }); +}); + +describe('rateWindows / rateDecision', () => { + const now = Date.UTC(2026, 10, 19, 3, 4, 30); + + test('1 分と 1 日の窓を IP ごとに作る', () => { + const [min, day] = rateWindows('abc', now, DEFAULT_LIMITS); + const nowSec = now / 1000; + expect(min.key).toBe(`ip#abc#min#${nowSec - 30}`); + expect(min.resetAt).toBe(nowSec + 30); + expect(min.limit).toBe(12); + expect(day.limit).toBe(600); + expect(day.resetAt % 86400).toBe(0); + }); + + test('上限までは通し、超えたら窓が終わるまでの秒数を返す', () => { + const windows = rateWindows('abc', now, DEFAULT_LIMITS); + expect(rateDecision([12, 100], windows, now)).toEqual({ allowed: true }); + expect(rateDecision([13, 100], windows, now)).toEqual({ allowed: false, retryAfter: 30 }); + }); + + test('1 日の上限を超えたら長い方を返す', () => { + const windows = rateWindows('abc', now, DEFAULT_LIMITS); + const d = rateDecision([13, 601], windows, now); + expect(d.allowed).toBe(false); + expect(d.retryAfter).toBeGreaterThan(3600); + }); + + test('数えられなかった窓(DynamoDB の障害)は通す(fail-open)', () => { + const windows = rateWindows('abc', now, DEFAULT_LIMITS); + expect(rateDecision([undefined, undefined], windows, now)).toEqual({ allowed: true }); + }); +}); + +describe('errorResponse', () => { + test('docs の表のステータスと形', () => { + const res = errorResponse('rate_limited', 'https://smalruby.app', { retryAfter: 30 }); + expect(res.statusCode).toBe(429); + expect(res.headers['Retry-After']).toBe('30'); + expect(res.headers['Access-Control-Allow-Origin']).toBe('https://smalruby.app'); + expect(JSON.parse(res.body)).toMatchObject({ error: 'rate_limited', retryAfter: 30 }); + }); + + test('許可外の Origin には CORS のヘッダを付けない', () => { + const res = errorResponse('forbidden_origin'); + expect(res.statusCode).toBe(403); + expect(res.headers['Access-Control-Allow-Origin']).toBeUndefined(); + }); + + test.each([ + ['invalid_request', 400], + ['too_large', 413], + ['compile_failed', 422], + ['timeout', 504], + ['internal', 500], + ] as const)('%s は %d', (code, status) => { + expect(errorResponse(code).statusCode).toBe(status); + }); +}); + +describe('hexDataBytes', () => { + test('データレコードのバイト数だけを数える', () => { + const hex = ':100000000C9466000C948E000C948E000C948E0060\n:02001000FFFFF0\n:00000001FF\n'; + expect(hexDataBytes(hex)).toBe(18); + }); +}); + +describe('metricLog', () => { + test('EMF の形でメトリクスを出す(成功)', () => { + const log = metricLog( + { outcome: 'ok', sample: 'blink', requestBytes: 20, compileMs: 1500, hexBytes: 1000, totalMs: 1600, coldStart: true }, + 'stg', + 1000, + ); + const aws = log._aws as { CloudWatchMetrics: { Namespace: string; Metrics: { Name: string }[] }[] }; + expect(aws.CloudWatchMetrics[0].Namespace).toBe('Smalruby/StuduinoHex'); + const names = aws.CloudWatchMetrics[0].Metrics.map(m => m.Name); + expect(names).toEqual(expect.arrayContaining(['Requests', 'Failed', 'Rejected', 'CompileTime', 'HexBytes'])); + expect(log).toMatchObject({ Stage: 'stg', Requests: 1, Succeeded: 1, Failed: 0, Rejected: 0, CompileTime: 1500 }); + }); + + test('拒否(429 など)と失敗(コンパイル)を分けて数える', () => { + const base = { requestBytes: 1, totalMs: 1, coldStart: false }; + expect(metricLog({ ...base, outcome: 'rate_limited' }, 'stg', 0)).toMatchObject({ Rejected: 1, Failed: 0 }); + expect(metricLog({ ...base, outcome: 'timeout' }, 'stg', 0)).toMatchObject({ Rejected: 0, Failed: 1 }); + }); +}); diff --git a/infra/smalruby-studuino-hex/lambda/tests/samples.test.ts b/infra/smalruby-studuino-hex/lambda/tests/samples.test.ts new file mode 100644 index 00000000000..2973d98ee07 --- /dev/null +++ b/infra/smalruby-studuino-hex/lambda/tests/samples.test.ts @@ -0,0 +1,59 @@ +import * as fs from 'fs'; +import * as os from 'os'; +import * as path from 'path'; +import { compileSketch, readSample } from '../compiler'; +import { SAMPLES } from '../policy'; + +const samplesDir = path.resolve(__dirname, '../../container/samples'); + +describe('サンプル', () => { + test('policy の SAMPLES とフォルダが一致し、どれも <名前>.ino を持つ', () => { + const dirs = fs.readdirSync(samplesDir).sort(); + expect(dirs).toEqual(SAMPLES.map(s => s.name).sort()); + for (const s of SAMPLES) { + expect(Object.keys(readSample(samplesDir, s.name))).toContain(`${s.name}.ino`); + } + }); + + test('小・中・大がそろっている', () => { + expect(new Set(SAMPLES.map(s => s.size))).toEqual(new Set(['small', 'medium', 'large'])); + }); + + test('一緒にコンパイルする .cpp / .h も読み、LICENSE は読まない', () => { + const files = Object.keys(readSample(samplesDir, 'smalrubot-s1')); + expect(files).toEqual(expect.arrayContaining(['smalrubot-s1.ino', 'Smalrubot.cpp', 'SrStuduino.h'])); + expect(files).not.toContain('LICENSE'); + }); +}); + +describe('compileSketch', () => { + test('フォルダの外を指すファイル名は書かない', async () => { + const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'studuino-test-')); + await expect( + compileSketch({ + cliPath: '/bin/false', + fqbn: 'x', + sketchName: 'a', + files: { '../evil.h': '' }, + timeoutMs: 1000, + tmpDir, + }), + ).rejects.toThrow(/invalid sketch file name/); + fs.rmSync(tmpDir, { recursive: true, force: true }); + }); + + test('arduino-cli が失敗したら compile_failed(作業場所は消す)', async () => { + const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'studuino-test-')); + const res = await compileSketch({ + cliPath: '/bin/false', + fqbn: 'x', + sketchName: 'a', + files: { 'a.ino': 'void setup(){}' }, + timeoutMs: 5000, + tmpDir, + }); + expect(res).toMatchObject({ ok: false, reason: 'compile_failed' }); + expect(fs.readdirSync(tmpDir).filter(n => n.startsWith('studuino-'))).toEqual([]); + fs.rmSync(tmpDir, { recursive: true, force: true }); + }); +}); diff --git a/infra/smalruby-studuino-hex/lambda/tests/shared-copies.test.ts b/infra/smalruby-studuino-hex/lambda/tests/shared-copies.test.ts new file mode 100644 index 00000000000..2b278dad415 --- /dev/null +++ b/infra/smalruby-studuino-hex/lambda/tests/shared-copies.test.ts @@ -0,0 +1,38 @@ +/** + * `infra/shared/` の正本とこのプロジェクトのコピーが一致しているか (#1373)。 + * + * 各 CDK プロジェクトは独立した npm パッケージで、`Deploy Infra` も差分に `infra//` が + * 現れたプロジェクトだけをデプロイする。そのため共有コードは import せず各プロジェクトに + * コピーして持ち、ずれをこのテストで落とす(CI の `npm test` で走る)。 + * + * 正本は `infra/shared/tests/shared-copies.test.ts`。直接編集しない(`node infra/shared/sync.js`)。 + */ +import * as fs from 'fs'; +import * as path from 'path'; + +interface SharedManifest { + files: { source: string; dest: string }[]; + projects: string[]; +} + +const projectDir = path.resolve(__dirname, '../..'); +const sharedDir = path.resolve(projectDir, '../shared'); +const manifest: SharedManifest = JSON.parse( + fs.readFileSync(path.join(sharedDir, 'manifest.json'), 'utf8'), +); +const project = path.basename(projectDir); + +describe('infra/shared のコピー', () => { + test('このプロジェクトが manifest.json の配布先に載っている', () => { + expect(manifest.projects).toContain(project); + }); + + test.each(manifest.files.map(f => [f.dest, f.source]))( + '%s が infra/shared/%s と一致する(`node infra/shared/sync.js` で直す)', + (dest, source) => { + const expected = fs.readFileSync(path.join(sharedDir, source), 'utf8'); + const actual = fs.readFileSync(path.join(projectDir, dest), 'utf8'); + expect(actual).toBe(expected); + }, + ); +}); diff --git a/infra/smalruby-studuino-hex/lambda/tests/stack.test.ts b/infra/smalruby-studuino-hex/lambda/tests/stack.test.ts new file mode 100644 index 00000000000..c4924ebb1e2 --- /dev/null +++ b/infra/smalruby-studuino-hex/lambda/tests/stack.test.ts @@ -0,0 +1,123 @@ +import * as cdk from 'aws-cdk-lib/core'; +import { Match, Template } from 'aws-cdk-lib/assertions'; +import { dockerBuildArgs, readThirdParty, StuduinoHexStack } from '../../lib/studuino-hex-stack'; + +const synth = (stage: string) => { + const app = new cdk.App({ context: { stage } }); + const stack = new StuduinoHexStack(app, `StuduinoHexStack-${stage}`, { + env: { account: '123456789012', region: 'ap-northeast-1' }, + }); + return Template.fromStack(stack); +}; + +describe('StuduinoHexStack', () => { + const prevCors = process.env.CORS_ALLOWED_ORIGINS; + beforeAll(() => { + delete process.env.CORS_ALLOWED_ORIGINS; + }); + afterAll(() => { + if (prevCors !== undefined) process.env.CORS_ALLOWED_ORIGINS = prevCors; + }); + + const stg = synth('stg'); + + test('コンテナの Lambda(x86_64・30 秒・2GB)', () => { + stg.hasResourceProperties('AWS::Lambda::Function', { + FunctionName: 'smalruby-studuino-hex-compile-stg', + PackageType: 'Image', + Architectures: ['x86_64'], + Timeout: 30, + MemorySize: 2048, + Environment: { + Variables: Match.objectLike({ + STAGE: 'stg', + MAX_REQUEST_BYTES: '131072', + COMPILE_TIMEOUT_MS: '25000', + RATE_LIMIT_PER_MINUTE: '12', + RATE_LIMIT_PER_DAY: '600', + CORS_ALLOWED_ORIGINS: Match.stringLikeRegexp('https://smalruby\\.app.*https://preview\\.smalruby\\.app'), + }), + }, + }); + }); + + test('POST /compile と CORS(stg はブランチプレビューも)', () => { + stg.hasResourceProperties('AWS::ApiGatewayV2::Route', { RouteKey: 'POST /compile' }); + stg.hasResourceProperties('AWS::ApiGatewayV2::Api', { + CorsConfiguration: Match.objectLike({ + AllowOrigins: Match.arrayWith(['https://smalruby.app', 'https://preview.smalruby.app']), + AllowMethods: ['POST', 'OPTIONS'], + }), + }); + }); + + test('API 全体のスロットリング', () => { + stg.hasResourceProperties('AWS::ApiGatewayV2::Stage', { + DefaultRouteSettings: { ThrottlingRateLimit: 5, ThrottlingBurstLimit: 10 }, + }); + }); + + test('回数の表は TTL つきで DESTROY', () => { + stg.hasResource('AWS::DynamoDB::Table', { + Properties: Match.objectLike({ + TableName: 'smalruby-studuino-hex-rate-limit-stg', + TimeToLiveSpecification: { AttributeName: 'ttl', Enabled: true }, + }), + DeletionPolicy: 'Delete', + }); + }); + + test('ロググループの保存は stg 1 週間', () => { + stg.hasResourceProperties('AWS::Logs::LogGroup', { + LogGroupName: '/aws/lambda/smalruby-studuino-hex-compile-stg', + RetentionInDays: 7, + }); + }); + + test('prod は smalruby.app だけ・関数名は無印', () => { + const prod = synth('prod'); + prod.hasResourceProperties('AWS::Lambda::Function', { + FunctionName: 'smalruby-studuino-hex-compile', + Environment: { Variables: Match.objectLike({ CORS_ALLOWED_ORIGINS: 'https://smalruby.app' }) }, + }); + prod.hasResourceProperties('AWS::Logs::LogGroup', { RetentionInDays: 30 }); + }); +}); + +describe('third-party.json', () => { + test('arduino-cli は版と sha256 を固定している', () => { + const tp = readThirdParty(); + expect(tp.arduinoCli.url).toContain(`/v${tp.arduinoCli.version}/`); + expect(tp.arduinoCli.sha256).toMatch(/^[0-9a-f]{64}$/); + expect(tp.avrCore.version).toMatch(/^\d+\.\d+\.\d+$/); + for (const lib of tp.arduinoLibraries) expect(lib.version).toMatch(/^\d+\.\d+\.\d+$/); + }); + + test('ボード定義はアーテック社の配布元の zip(sha256 を固定)', () => { + const { board } = readThirdParty(); + expect(board.url).toMatch(/^https:\/\/www\.artec-kk\.co\.jp\/studuino\/data\/.+\.zip$/); + expect(board.sha256).toMatch(/^[0-9a-f]{64}$/); + expect(board.fqbn).toBe('studuino:avr:studuino'); + expect(board.maxFlashBytes).toBe(15872); + }); + + test('使うライブラリは 5 つだけ', () => { + expect(readThirdParty().studuinoLib.libraries).toEqual([ + 'Studuino', + 'MMA8653', + 'MPU6050', + 'IRremoteForStuduino', + 'ColorSensor', + ]); + }); + + test('ライブラリの URL を書いたら sha256 も要る', () => { + const tp = readThirdParty(); + expect(() => + dockerBuildArgs({ ...tp, studuinoLib: { ...tp.studuinoLib, url: 'https://example.com/a.zip', sha256: '' } }), + ).toThrow(/sha256/); + expect(dockerBuildArgs(tp).STUDUINO_LIBRARIES).toBe('Studuino,MMA8653,MPU6050,IRremoteForStuduino,ColorSensor'); + expect(dockerBuildArgs(tp).ARDUINO_LIBRARIES).toBe('Servo@1.2.2|Adafruit NeoPixel@1.15.2'); + expect(() => dockerBuildArgs({ ...tp, board: { ...tp.board, sha256: '' } })).toThrow(/board/); + }); +}); diff --git a/infra/smalruby-studuino-hex/lambda/tests/test-files-are-modules.test.ts b/infra/smalruby-studuino-hex/lambda/tests/test-files-are-modules.test.ts new file mode 100644 index 00000000000..71219b301ee --- /dev/null +++ b/infra/smalruby-studuino-hex/lambda/tests/test-files-are-modules.test.ts @@ -0,0 +1,45 @@ +/** + * テストファイルがモジュールであることを担保する回帰テスト (issue #1144)。他 infra プロジェクトにも同じ構造が残っていたため揃えた (#1151)。 + * + * `import` / `export` を 1 つも持たない .ts ファイルは TypeScript では「モジュール」ではなく + * グローバルスクリプトとして扱われる。その場合トップレベルの const がファイルを跨いで同じ + * スコープに宣言されるため、`mockSend` のような同名の変数を別ファイルで宣言した瞬間に + * TS2451 (Cannot redeclare block-scoped variable) になる。ts-jest はキャッシュが温かい間は + * 型チェックを再利用するので、この診断は cold cache のときだけ suite ごと落ちる = フレークに + * 見えていた。 + */ +import * as fs from 'fs'; +import * as path from 'path'; +import * as ts from 'typescript'; + +const testsDir = __dirname; + +const collectTsFiles = (dir: string): string[] => + fs.readdirSync(dir, { withFileTypes: true }).flatMap((entry) => { + const full = path.join(dir, entry.name); + if (entry.isDirectory()) return collectTsFiles(full); + return entry.isFile() && full.endsWith('.ts') ? [full] : []; + }); + +describe('lambda/tests の .ts ファイル', () => { + const files = collectTsFiles(testsDir); + + test('検査対象のファイルが見つかる', () => { + expect(files.length).toBeGreaterThan(0); + }); + + test.each(files.map((file) => [path.relative(testsDir, file), file]))( + '%s はモジュール (import/export を持つ) である', + (_relative, file) => { + const source = ts.createSourceFile( + file, + fs.readFileSync(file, 'utf8'), + ts.ScriptTarget.ES2020, + /* setParentNodes */ false, + ts.ScriptKind.TS, + ); + + expect(ts.isExternalModule(source)).toBe(true); + }, + ); +}); diff --git a/infra/smalruby-studuino-hex/lib/cors-origins.ts b/infra/smalruby-studuino-hex/lib/cors-origins.ts new file mode 100644 index 00000000000..6f67663c317 --- /dev/null +++ b/infra/smalruby-studuino-hex/lib/cors-origins.ts @@ -0,0 +1,92 @@ +/** + * CORS 許可オリジンの組み立て (#1160 / #1342 / #1373)。 + * + * **正本は `infra/shared/cors-origins.ts`**。各 CDK プロジェクトの `lib/cors-origins.ts` は + * そのコピーなので直接編集しない。正本を直してから `node infra/shared/sync.js` で配る + * (ずれていると各プロジェクトの `lambda/tests/shared-copies.test.ts` が落ちる)。 + * 各プロジェクトが自分のディレクトリにコピーを持つのは、`Deploy Infra` が差分に + * `infra//` が現れたプロジェクトだけをデプロイするため(共有ディレクトリだけを + * 直すと、どのプロジェクトにも出ない)。 + * + * ローカルの dev server は 8601 から順に使う(scratch-gui = 8601 / Admin SPA = 8602)。 + * devpod で worktree を並行起動すると 8603 以降も割り当てられるため、非 prod では + * 範囲でまとめて許可する。HTTP API v2 の `allowOrigins` は**完全一致**で、ポートに + * ワイルドカードは使えないので列挙する。 + */ + +/** ローカル dev server に割り当てるポートの範囲(両端を含む)。 */ +export const LOCAL_DEV_PORT_FIRST = 8601; +export const LOCAL_DEV_PORT_LAST = 8610; + +/** ローカル開発で許可するオリジン(非 prod のみで使う)。 */ +export const localDevOrigins = (): string[] => { + const origins: string[] = []; + for (let port = LOCAL_DEV_PORT_FIRST; port <= LOCAL_DEV_PORT_LAST; port += 1) { + origins.push(`http://localhost:${port}`); + } + return origins; +}; + +/** + * ブランチプレビューのオリジン(非 prod のみで使う・#1342)。 + * プレビューは stg の API を見るので、stg 側でだけ許可する。prod には足さない。 + */ +export const PREVIEW_ORIGINS = ['https://preview.smalruby.app']; + +/** そのオリジンがローカル開発用(本番に出してはいけないもの)か。 */ +export const isLocalOrigin = (origin: string): boolean => + /^https?:\/\/(localhost|127\.0\.0\.1|\[::1\])(:\d+)?$/i.test(origin.trim()); + +/** + * ステージに応じた許可オリジンを決める(classroom / bug-report / admin が使う)。 + * + * env `CORS_ALLOWED_ORIGINS` が最優先。prod にローカルオリジンが混ざっていたら + * **deploy させない**(`DEV_BYPASS_TOKEN` の prod ガードと同じ考え方。CORS は + * 「開発中は緩めて戻し忘れる」が起きやすいので、戻し忘れを検知する側に倒す)。 + * + * 非 prod ではブランチプレビューのオリジンを **env を指定していても**足す。stg の env は + * GitHub secrets 由来で `CORS_ALLOWED_ORIGINS` を明示しているため、既定値に足すだけでは + * stg に届かない。 + * @param stage - デプロイ先ステージ + * @param productionOrigins - どのステージでも許可する本番オリジン + * @param envValue - `CORS_ALLOWED_ORIGINS` の値(未設定なら undefined) + * @returns 許可オリジンの配列 + */ +export const resolveCorsOrigins = ( + stage: string, + productionOrigins: string[], + envValue?: string, +): string[] => { + const base = envValue + ? envValue.split(',').map(o => o.trim()).filter(Boolean) + : [...productionOrigins, ...(stage === 'prod' ? [] : localDevOrigins())]; + const origins = + stage === 'prod' ? base : [...base, ...PREVIEW_ORIGINS.filter(o => !base.includes(o))]; + + if (stage === 'prod') { + const local = origins.filter(isLocalOrigin); + if (local.length > 0) { + throw new Error( + `CORS_ALLOWED_ORIGINS must not contain local origins in prod: ${local.join(', ')}`, + ); + } + } + return origins; +}; + +/** + * カンマ区切りの許可オリジンに、非 prod ならブランチプレビューを足す(api / rubytee-relay が使う)。 + * + * この 2 プロジェクトは `resolveCorsOrigins` を使わず、既定値も `http://localhost:8601` だけで + * prod のローカルオリジン検査も無い(`resolveCorsOrigins` へ寄せると既定の許可オリジンが変わる + * ため、挙動を変えない共通化では寄せていない)。prod は渡された値をそのまま返す。 + * @param stage - デプロイ先ステージ + * @param origins - `CORS_ALLOWED_ORIGINS`(または既定値)のカンマ区切り文字列 + * @returns 許可オリジンのカンマ区切り文字列 + */ +export const withPreviewOrigins = (stage: string, origins: string): string => { + if (stage === 'prod') return origins; + const present = origins.split(',').map(o => o.trim()); + const missing = PREVIEW_ORIGINS.filter(o => !present.includes(o)); + return [origins, ...missing].join(','); +}; diff --git a/infra/smalruby-studuino-hex/lib/studuino-hex-stack.ts b/infra/smalruby-studuino-hex/lib/studuino-hex-stack.ts new file mode 100644 index 00000000000..eab6bc5006c --- /dev/null +++ b/infra/smalruby-studuino-hex/lib/studuino-hex-stack.ts @@ -0,0 +1,173 @@ +import * as cdk from 'aws-cdk-lib/core'; +import * as apigatewayv2 from 'aws-cdk-lib/aws-apigatewayv2'; +import * as apigatewayv2Integrations from 'aws-cdk-lib/aws-apigatewayv2-integrations'; +import * as dynamodb from 'aws-cdk-lib/aws-dynamodb'; +import * as ecrAssets from 'aws-cdk-lib/aws-ecr-assets'; +import * as lambda from 'aws-cdk-lib/aws-lambda'; +import * as logs from 'aws-cdk-lib/aws-logs'; +import { buildSync } from 'esbuild'; +import * as fs from 'fs'; +import * as path from 'path'; +import { Construct } from 'constructs'; +import { resolveCorsOrigins } from './cors-origins'; + +/** container/third-party.json の形。 */ +export interface ThirdParty { + arduinoCli: { version: string; url: string; sha256: string }; + avrCore: { id: string; version: string }; + arduinoLibraries: { name: string; version: string }[]; + board: { url: string; sha256: string; path: string; fqbn: string; maxFlashBytes: number }; + studuinoLib: { url: string; sha256: string; libraries: string[] }; +} + +const CONTAINER_DIR = path.join(__dirname, '../container'); + +export const readThirdParty = (): ThirdParty => + JSON.parse(fs.readFileSync(path.join(CONTAINER_DIR, 'third-party.json'), 'utf8')) as ThirdParty; + +/** + * Docker の build args を作る(版とハッシュは third-party.json だけで決める)。 + * @param tp - third-party.json + * @returns build args + */ +export const dockerBuildArgs = (tp: ThirdParty): Record => { + const isSha256 = (v: string) => /^[0-9a-f]{64}$/.test(v); + if (tp.studuinoLib.url && !isSha256(tp.studuinoLib.sha256)) { + throw new Error('third-party.json: studuinoLib.url を書いたら sha256(64 桁の 16 進)も書く'); + } + if (!tp.board.url || !isSha256(tp.board.sha256)) { + throw new Error('third-party.json: board の url と sha256(64 桁の 16 進)が要る'); + } + // ライブラリの名前には空白がある("Adafruit NeoPixel")ので、"名前@版" を | で区切って 1 つの値にする + const libs = tp.arduinoLibraries.map(l => `${l.name}@${l.version}`).join('|'); + return { + ARDUINO_CLI_URL: tp.arduinoCli.url, + ARDUINO_CLI_SHA256: tp.arduinoCli.sha256, + ARDUINO_CLI_VERSION: tp.arduinoCli.version, + AVR_CORE_ID: tp.avrCore.id, + AVR_CORE_VERSION: tp.avrCore.version, + ARDUINO_LIBRARIES: libs, + STUDUINO_BOARD_URL: tp.board.url, + STUDUINO_BOARD_SHA256: tp.board.sha256, + STUDUINO_BOARD_PATH: tp.board.path, + STUDUINO_FQBN: tp.board.fqbn, + STUDUINO_MAX_FLASH_BYTES: String(tp.board.maxFlashBytes), + STUDUINO_LIB_URL: tp.studuinoLib.url, + STUDUINO_LIB_SHA256: tp.studuinoLib.sha256, + STUDUINO_LIBRARIES: tp.studuinoLib.libraries.join(','), + }; +}; + +/** + * ハンドラを 1 つの JS にまとめて container/build/ に置く(Dockerfile が COPY する)。 + * AWS SDK v3 は Lambda の Node.js 22 のベースイメージに入っているので同梱しない。 + * @param stage - ステージ + */ +const bundleHandler = (stage: string): void => { + buildSync({ + entryPoints: [path.join(__dirname, '../lambda/handler.ts')], + outfile: path.join(CONTAINER_DIR, 'build/handler.js'), + bundle: true, + platform: 'node', + target: 'node22', + format: 'cjs', + minify: true, + sourcemap: stage !== 'prod' ? 'inline' : false, + external: ['@aws-sdk/*'], + logLevel: 'error', + }); +}; + +export class StuduinoHexStack extends cdk.Stack { + public readonly api: apigatewayv2.HttpApi; + + constructor(scope: Construct, id: string, props?: cdk.StackProps) { + super(scope, id, props); + + const stage = this.node.tryGetContext('stage') || process.env.STAGE || 'stg'; + const stageSuffix = stage === 'prod' ? '' : `-${stage}`; + const env = process.env; + + // smalruby.app(と非 prod では開発環境・ブランチプレビュー)だけ + const corsOrigins = resolveCorsOrigins(stage, ['https://smalruby.app'], env.CORS_ALLOWED_ORIGINS); + + cdk.Tags.of(this).add('Project', 'SmalrubyStuduinoHex'); + cdk.Tags.of(this).add('Stage', stage); + cdk.Tags.of(this).add('Service', 'Lambda'); + cdk.Tags.of(this).add('ManagedBy', 'CDK'); + + // IP ごとの回数(固定窓)。TTL で消えるので DESTROY でよい + const rateLimitTable = new dynamodb.Table(this, 'RateLimitTable', { + tableName: `smalruby-studuino-hex-rate-limit${stageSuffix}`, + partitionKey: { name: 'key', type: dynamodb.AttributeType.STRING }, + billingMode: dynamodb.BillingMode.PAY_PER_REQUEST, + timeToLiveAttribute: 'ttl', + removalPolicy: cdk.RemovalPolicy.DESTROY, + }); + + const functionName = `smalruby-studuino-hex-compile${stageSuffix}`; + const logGroup = new logs.LogGroup(this, 'CompileLogGroup', { + logGroupName: `/aws/lambda/${functionName}`, + retention: stage === 'prod' ? logs.RetentionDays.ONE_MONTH : logs.RetentionDays.ONE_WEEK, + removalPolicy: cdk.RemovalPolicy.DESTROY, + }); + + bundleHandler(stage); + const thirdParty = readThirdParty(); + + // API Gateway(HTTP API)の統合は 30 秒で切れるので、Lambda もそれに合わせる + const compileFn = new lambda.DockerImageFunction(this, 'CompileFunction', { + functionName, + code: lambda.DockerImageCode.fromImageAsset(CONTAINER_DIR, { + platform: ecrAssets.Platform.LINUX_AMD64, + buildArgs: dockerBuildArgs(thirdParty), + exclude: ['README.md'], + }), + architecture: lambda.Architecture.X86_64, + memorySize: 2048, + ephemeralStorageSize: cdk.Size.mebibytes(1024), + timeout: cdk.Duration.seconds(30), + logGroup, + environment: { + STAGE: stage, + CORS_ALLOWED_ORIGINS: corsOrigins.join(','), + RATE_LIMIT_TABLE_NAME: rateLimitTable.tableName, + MAX_REQUEST_BYTES: env.STUDUINO_MAX_REQUEST_BYTES || String(128 * 1024), + COMPILE_TIMEOUT_MS: env.STUDUINO_COMPILE_TIMEOUT_MS || '25000', + RATE_LIMIT_PER_MINUTE: env.STUDUINO_RATE_LIMIT_PER_MINUTE || '12', + RATE_LIMIT_PER_DAY: env.STUDUINO_RATE_LIMIT_PER_DAY || '600', + }, + }); + rateLimitTable.grantReadWriteData(compileFn); + + this.api = new apigatewayv2.HttpApi(this, 'StuduinoHexApi', { + apiName: `SmalrubyStuduinoHex${stageSuffix}`, + corsPreflight: { + allowOrigins: corsOrigins, + allowMethods: [apigatewayv2.CorsHttpMethod.POST, apigatewayv2.CorsHttpMethod.OPTIONS], + allowHeaders: ['Content-Type'], + maxAge: cdk.Duration.hours(24), + }, + }); + + this.api.addRoutes({ + path: '/compile', + methods: [apigatewayv2.HttpMethod.POST], + integration: new apigatewayv2Integrations.HttpLambdaIntegration('CompileIntegration', compileFn), + }); + + // API 全体の上限(IP ごとの上限は Lambda が DynamoDB で数える) + const defaultStage = this.api.defaultStage?.node.defaultChild as apigatewayv2.CfnStage; + if (defaultStage) { + defaultStage.defaultRouteSettings = { + throttlingRateLimit: stage === 'prod' ? 10 : 5, + throttlingBurstLimit: stage === 'prod' ? 20 : 10, + }; + } + + new cdk.CfnOutput(this, 'HttpApiEndpoint', { + value: this.api.apiEndpoint, + description: 'Studuino hex API endpoint (POST /compile)', + }); + } +} diff --git a/infra/smalruby-studuino-hex/package-lock.json b/infra/smalruby-studuino-hex/package-lock.json new file mode 100644 index 00000000000..b10de30cc7f --- /dev/null +++ b/infra/smalruby-studuino-hex/package-lock.json @@ -0,0 +1,5514 @@ +{ + "name": "smalruby-studuino-hex", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "smalruby-studuino-hex", + "version": "0.1.0", + "dependencies": { + "aws-cdk-lib": "2.275.0", + "constructs": "^10.0.0", + "esbuild": "^0.25.0" + }, + "bin": { + "smalruby-studuino-hex": "bin/smalruby-studuino-hex.js" + }, + "devDependencies": { + "@aws-sdk/client-dynamodb": "^3.0.0", + "@aws-sdk/lib-dynamodb": "^3.0.0", + "@types/aws-lambda": "^8.10.149", + "@types/jest": "^29.5.14", + "@types/node": "^24.10.1", + "aws-cdk": "2.1147.0", + "dotenv": "^17.2.3", + "jest": "^29.7.0", + "ts-jest": "^29.2.5", + "ts-node": "^10.9.2", + "typescript": "~5.9.3" + } + }, + "node_modules/@aws-cdk/asset-awscli-v1": { + "version": "2.2.292", + "resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.292.tgz", + "integrity": "sha512-d4aMFsAFj19FtxVyw8IzlUKv5Zu4sIvgnEjI2IU6IWBJgVbJ4aFnadANqYa+6MwB1CQbGOg0jh8WE77M+Nb/9A==", + "license": "Apache-2.0" + }, + "node_modules/@aws-cdk/asset-node-proxy-agent-v6": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.1.3.tgz", + "integrity": "sha512-98We1QWfin9vtuuQtNFhIIAEWb8CreyYTAP0Vn8HqSBoNiFJM9nZgifJeQawT9Wq0NX1HCNFlxCyTccIrK1PSA==", + "license": "Apache-2.0" + }, + "node_modules/@aws-cdk/cloud-assembly-schema": { + "version": "55.3.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-55.3.0.tgz", + "integrity": "sha512-V40A9DFnKSB8kS615QaaMxLEyWRhHhPWz6fTlssT5fr61BAPgY+dduRtgN3wEo1IyV/zURuhVEfDIKyE8JzSNw==", + "bundleDependencies": [ + "jsonschema", + "semver" + ], + "license": "Apache-2.0", + "dependencies": { + "jsonschema": "^1.5.0", + "semver": "^7.8.5" + }, + "engines": { + "node": ">= 18.0.0" + } + }, + "node_modules/@aws-cdk/cloud-assembly-schema/node_modules/jsonschema": { + "version": "1.5.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver": { + "version": "7.8.5", + "inBundle": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@aws-crypto/crc32": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz", + "integrity": "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz", + "integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-js": "^5.2.0", + "@aws-crypto/supports-web-crypto": "^5.2.0", + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/sha256-js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", + "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-crypto/supports-web-crypto": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz", + "integrity": "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/util": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", + "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.222.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/client-dynamodb": { + "version": "3.1063.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-dynamodb/-/client-dynamodb-3.1063.0.tgz", + "integrity": "sha512-RH5PM9lJsGgTDYyIjhPIqwRTuIZdVzRfEdLWB9/p11VVoDjQ+itbzZ7Qi/KMaw6AucAo8uXxnlVp1fZ0cVQjuA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "^3.974.18", + "@aws-sdk/credential-provider-node": "^3.972.52", + "@aws-sdk/dynamodb-codec": "^3.973.18", + "@aws-sdk/middleware-endpoint-discovery": "^3.972.17", + "@aws-sdk/types": "^3.973.11", + "@smithy/core": "^3.24.6", + "@smithy/fetch-http-handler": "^5.4.6", + "@smithy/node-http-handler": "^4.7.6", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/core": { + "version": "3.974.18", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.974.18.tgz", + "integrity": "sha512-JDYCPI0j7zGrzXTDFsLB346cxss7J/AxH7+O0MzWlqppJBEyB9Qe6TQXRL6iwLUo/xZkNv9KFmBL2hqElmwW0g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.11", + "@aws-sdk/xml-builder": "^3.972.28", + "@aws/lambda-invoke-store": "^0.2.2", + "@smithy/core": "^3.24.6", + "@smithy/signature-v4": "^5.4.6", + "@smithy/types": "^4.14.3", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-env": { + "version": "3.972.44", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.972.44.tgz", + "integrity": "sha512-3hKJVrZ7bqXzDAXCQp+OaQ1ASN+vWstaNuEH418wQVl//cRZhqhfR9Bjk1qIWmgUGe8/D3gdO73PgidRj378EQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.18", + "@aws-sdk/types": "^3.973.11", + "@smithy/core": "^3.24.6", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http": { + "version": "3.972.46", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.972.46.tgz", + "integrity": "sha512-VhwC9pGAZHhiQ2xSViyOPDFqvr9aRxGCAXZtADsUhU3R65nad7y//CwynE6mQnWNR+suRlqE79W36IVayL+m1g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.18", + "@aws-sdk/types": "^3.973.11", + "@smithy/core": "^3.24.6", + "@smithy/fetch-http-handler": "^5.4.6", + "@smithy/node-http-handler": "^4.7.6", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.972.50", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.972.50.tgz", + "integrity": "sha512-09Xi6ovxiK42+De/qBGF71sT5F2bWgYM+1fFyDwSOpy1xpsQ5R/naIu7MVDpH6Dic36QNc8dAv4KADtMGK2JYg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.18", + "@aws-sdk/credential-provider-env": "^3.972.44", + "@aws-sdk/credential-provider-http": "^3.972.46", + "@aws-sdk/credential-provider-login": "^3.972.49", + "@aws-sdk/credential-provider-process": "^3.972.44", + "@aws-sdk/credential-provider-sso": "^3.972.49", + "@aws-sdk/credential-provider-web-identity": "^3.972.49", + "@aws-sdk/nested-clients": "^3.997.17", + "@aws-sdk/types": "^3.973.11", + "@smithy/core": "^3.24.6", + "@smithy/credential-provider-imds": "^4.3.7", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-login": { + "version": "3.972.49", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.972.49.tgz", + "integrity": "sha512-EfJF/1Fh9mI4pZyoheU2RY9xUhTcugIZNkD63+orXMkYj/QXacJNbKVDUK90Yv5hE+aX+rt9J/EZ9Qr3vKOa7g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.18", + "@aws-sdk/nested-clients": "^3.997.17", + "@aws-sdk/types": "^3.973.11", + "@smithy/core": "^3.24.6", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-node": { + "version": "3.972.52", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.972.52.tgz", + "integrity": "sha512-7QX+PbyiWBEOVipJq8Nke/TqXT6lAPLE7fvTaopa39/IVWuLfS+Fzdy71sZJONf/mLGgmtj6aU17+REw3+aRrw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/credential-provider-env": "^3.972.44", + "@aws-sdk/credential-provider-http": "^3.972.46", + "@aws-sdk/credential-provider-ini": "^3.972.50", + "@aws-sdk/credential-provider-process": "^3.972.44", + "@aws-sdk/credential-provider-sso": "^3.972.49", + "@aws-sdk/credential-provider-web-identity": "^3.972.49", + "@aws-sdk/types": "^3.973.11", + "@smithy/core": "^3.24.6", + "@smithy/credential-provider-imds": "^4.3.7", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-process": { + "version": "3.972.44", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.972.44.tgz", + "integrity": "sha512-V+UUhZpRP7QDRhi+qgBDisM9tUBnYmMje8Bk77A6MZsfeGeGdMsQXmaHP1CDYFcept0o/Rz5g2Y0TMeVlG9dzg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.18", + "@aws-sdk/types": "^3.973.11", + "@smithy/core": "^3.24.6", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.972.49", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.972.49.tgz", + "integrity": "sha512-9QqOYGuh5tZ76OzaT68kwI78AH+5lS/uZGGvkfxb3fc8FzRrIz2jOufNTliEBEeSAwmgK2rWLNsK+IB3zbtNPA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.18", + "@aws-sdk/nested-clients": "^3.997.17", + "@aws-sdk/token-providers": "3.1063.0", + "@aws-sdk/types": "^3.973.11", + "@smithy/core": "^3.24.6", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.972.49", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.972.49.tgz", + "integrity": "sha512-IYx1lN38MnnPXv+NBLpuATu0cZakbZ321TAfjW+aVkw7HIJF38YnEwdeEO55MSl3pl7hIX1IvvnD6EmnAzmAJw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.18", + "@aws-sdk/nested-clients": "^3.997.17", + "@aws-sdk/types": "^3.973.11", + "@smithy/core": "^3.24.6", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/dynamodb-codec": { + "version": "3.973.18", + "resolved": "https://registry.npmjs.org/@aws-sdk/dynamodb-codec/-/dynamodb-codec-3.973.18.tgz", + "integrity": "sha512-XWn19CsVEv0cbWjGvK140RHn7GWguXZCEDshCcYAKCLn13Edjd/gQfOtUPgldLaqlDfy2/OnG6w7Ife/JYoK7A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.18", + "@smithy/core": "^3.24.6", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/endpoint-cache": { + "version": "3.972.6", + "resolved": "https://registry.npmjs.org/@aws-sdk/endpoint-cache/-/endpoint-cache-3.972.6.tgz", + "integrity": "sha512-Lyn8Oint4e6w5e5a+gsyWvDmb2NkXykfTHl8u2WCUS+iGxV5beeBK47g+Fbu7YZ9A+n+ezFmZaF3SWrd9MT52g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "mnemonist": "0.38.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/lib-dynamodb": { + "version": "3.1063.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/lib-dynamodb/-/lib-dynamodb-3.1063.0.tgz", + "integrity": "sha512-3vXZzmYUe1k0vswOByKuLNQuB4TBu4L6IajHGFbas4I+z6Kaw875FwJLvoc6oSogvowo84Z/5rmB+5u0DX+DKw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.18", + "@aws-sdk/util-dynamodb": "^3.996.3", + "@smithy/core": "^3.24.6", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-dynamodb": "^3.1063.0" + } + }, + "node_modules/@aws-sdk/middleware-endpoint-discovery": { + "version": "3.972.17", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-endpoint-discovery/-/middleware-endpoint-discovery-3.972.17.tgz", + "integrity": "sha512-F6LjerpVoMfqqGej7f3tWyKhznOWMB2O1T/L3L4h2LU0Soy2JEO/rQFmOT0OAyJD+/zBoqU7k7g9wd1QgseUSA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/endpoint-cache": "^3.972.6", + "@aws-sdk/types": "^3.973.11", + "@smithy/core": "^3.24.6", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/nested-clients": { + "version": "3.997.17", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.997.17.tgz", + "integrity": "sha512-lDRgraoTfKRawUyc176Ow93mrNrOho/x+EoK4C+lKU+vKkHWhNhzvSMVAx0WEJUJoeQxxDN5ZdKMfiGEyNejig==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "^3.974.18", + "@aws-sdk/signature-v4-multi-region": "^3.996.32", + "@aws-sdk/types": "^3.973.11", + "@smithy/core": "^3.24.6", + "@smithy/fetch-http-handler": "^5.4.6", + "@smithy/node-http-handler": "^4.7.6", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/signature-v4-multi-region": { + "version": "3.996.32", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.996.32.tgz", + "integrity": "sha512-llvApLcsWtmRFhG2wT3WIp1CmDeRaIYutqty1ZZXoMzK7TiJ6MOLOimk9eXUS8PwgG4ew4pa4QAbt0lfhn++1w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.11", + "@smithy/signature-v4": "^5.4.6", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/token-providers": { + "version": "3.1063.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1063.0.tgz", + "integrity": "sha512-nYDaWWdzjKiDP5xj8k4oUgcYd4WPgzfAOgdU5vJsaqH/07Dfvm7ffisHCFJ+NEl7kUC9JEIUxh0kznvenbo3NQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.18", + "@aws-sdk/nested-clients": "^3.997.17", + "@aws-sdk/types": "^3.973.11", + "@smithy/core": "^3.24.6", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/types": { + "version": "3.973.11", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.973.11.tgz", + "integrity": "sha512-YjS0qFuECClRh4qhEyW8XagW0fwEPBeZ1cfsW/gU73Kh/ExFILxbzxOfPCmzF/2DwEvhvsHYt0b0qnvStwKYrg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/util-dynamodb": { + "version": "3.996.3", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-dynamodb/-/util-dynamodb-3.996.3.tgz", + "integrity": "sha512-vLTbeDu000/6OvdjSL3J549WmRU9R5a/HIR6xhFDK682D74c3cYCYmnvDjGOtHfQL3c8RChFulbK2n3pxNPXyA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-dynamodb": "^3.1063.0" + } + }, + "node_modules/@aws-sdk/util-locate-window": { + "version": "3.965.6", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.965.6.tgz", + "integrity": "sha512-ZfHjfwSzeXj+Lg9AK5ZNmeDkXev6V+w2tn1t4kgDdRtUaRCthepTQiFwbD06EF9oNGH4LaLg+Mb6U16Ypv5bSw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/xml-builder": { + "version": "3.972.28", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.972.28.tgz", + "integrity": "sha512-lI/l3c/vPvsxmspzV63NfS3x9q4CkMmdhJy4QiM+NThAufVkDvi/PZZQ6xETnICL0UD7jI808pY83gllf86RFg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.3", + "fast-xml-parser": "5.7.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws/lambda-invoke-store": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@aws/lambda-invoke-store/-/lambda-invoke-store-0.2.4.tgz", + "integrity": "sha512-iY8yvjE0y651BixKNPgmv1WrQc+GZ142sb0z4gYnChDDY2YqI4P/jsSopBWrKfAt7LOJAkOXt7rC/hms+WclQQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", + "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helpers": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.7.tgz", + "integrity": "sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", + "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", + "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz", + "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz", + "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.7" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.29.7.tgz", + "integrity": "sha512-zGYcYfq/WmZ4V+kBIXQon9dSSc8ircGZqw9ZaNhhGj9nZkeBu1jHLBDQqYYi5WA9uawvA2sIMbry2nCFhf5Djg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.29.7.tgz", + "integrity": "sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.29.7.tgz", + "integrity": "sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.7.tgz", + "integrity": "sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz", + "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.6.tgz", + "integrity": "sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodable/entities": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-2.1.1.tgz", + "integrity": "sha512-Pig3HxDIoMgjdEH8OCf/dkcTmLFjJRjWuq8jSnklu284/TKOPibSRERmOykiwmyXTtv61mP+44f3GMx0tLAyjg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/nodable" + } + ], + "license": "MIT" + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.10", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.10.tgz", + "integrity": "sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@smithy/core": { + "version": "3.24.6", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.24.6.tgz", + "integrity": "sha512-wBXDRup6UU97VKyaiRo8AssnfStPtG0oAAfpq/bC0a1YYau8pM86YB4kM6ccoVi1mS8l/UHbn9oDM+7uozr/ug==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/crc32": "5.2.0", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/credential-provider-imds": { + "version": "4.3.8", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.3.8.tgz", + "integrity": "sha512-5cAM+KZC02sTqDt6NaLXyu50M/GNMd1eTzDVR8Lb0BBsVtu7RWHo47VPPEEv1vt3Yub6uzr+M5FHC+GtoT0USg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.24.6", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/fetch-http-handler": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.4.6.tgz", + "integrity": "sha512-FEwEYJ1jlBKdhe9TPzfghEi1bP55ZeEImlDkEa62bBBYzUcnB6RUCyuiS2mqKt6ZVjUbBgcNhzfIctH+Hevx9g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.24.6", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/node-http-handler": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.7.7.tgz", + "integrity": "sha512-ZAFvHXrEk6K180EVhmZVg8GU5pUH5BSFqRs27JW3j1qEFx9YyYwWFx17x/MHcjALYimGAji7qEOlF1++be+G5A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.24.6", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/signature-v4": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.4.6.tgz", + "integrity": "sha512-Ojg4B6oIDlIr1R86xCDJt1zJWnYa0VINmqdjfe9qxWjdRivHalZ3iSlQgVqYbW0MdpFOC5XfHEWsnbmdnpIILQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.24.6", + "@smithy/types": "^4.14.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/types": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.14.3.tgz", + "integrity": "sha512-YupL0ZWmFtJexUN2cHzkvvF/b9pKrtAIfT1o7/oY/Ppu8IYeZ+lDPM5vZdQJaSeA132dJCqojjGC9NhXeF71VQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz", + "integrity": "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/aws-lambda": { + "version": "8.10.162", + "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.162.tgz", + "integrity": "sha512-Fn658grtLOci1oxi1391vvDWJRKNGWRSqfxRkmN/Iy3c0tQH1USMKEXcPYHLvope+ZgTFocx9FRQJx1muBL6qw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.5.14", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "node_modules/@types/node": { + "version": "24.13.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.1.tgz", + "integrity": "sha512-RSpUJGmvsJ1ZeBehQZFhIdpsz+bIpES0nIQXko4Ybq+N+kX6XvOq3Jo+iJ82FWLdblFq85AsMikd3m35jgezYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.18.0" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/yargs": { + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", + "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/acorn": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.5.tgz", + "integrity": "sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT" + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/aws-cdk": { + "version": "2.1147.0", + "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.1147.0.tgz", + "integrity": "sha512-2ON/W4jShXWS926bKO6Osgw3MDlxhco5cz3n7SS5GLzaEaYs6ebpAHRDZp6sirkGnMqWoUwxCmIOkvAHS9Rn2A==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "cdk": "bin/cdk" + }, + "engines": { + "node": ">= 18.0.0" + } + }, + "node_modules/aws-cdk-lib": { + "version": "2.275.0", + "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.275.0.tgz", + "integrity": "sha512-Gjj1tM3dQedhsI7MdwMvULF1PzgEO/zX0KFHU9xwZskkSL9057IZB4fJWm9nL+aaNU3TU+lNt8uB6d8QcZtUpQ==", + "bundleDependencies": [ + "@aws/cloudformation-validate", + "@balena/dockerignore", + "@aws-cdk/cloud-assembly-api", + "case", + "fs-extra", + "ignore", + "jsonschema", + "minimatch", + "punycode", + "semver", + "yaml", + "mime-types" + ], + "license": "Apache-2.0", + "dependencies": { + "@aws-cdk/asset-awscli-v1": "2.2.292", + "@aws-cdk/asset-node-proxy-agent-v6": "^2.1.3", + "@aws-cdk/cloud-assembly-api": "^2.5.0", + "@aws-cdk/cloud-assembly-schema": "^55.0.0", + "@aws/cloudformation-validate": "1.12.1", + "@balena/dockerignore": "^1.0.2", + "case": "1.6.3", + "fs-extra": "^11.4.1", + "ignore": "^5.3.2", + "jsonschema": "^1.5.0", + "mime-types": "^2.1.35", + "minimatch": "^10.2.6", + "punycode": "^2.3.1", + "semver": "^7.8.5", + "yaml": "1.10.3" + }, + "engines": { + "node": ">= 20.0.0" + }, + "peerDependencies": { + "constructs": "^10.5.0" + } + }, + "node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api": { + "version": "2.5.0", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "json-source-map": "^0.6.1", + "jsonschema": "^1.5.0", + "semver": "^7.8.5" + }, + "engines": { + "node": ">= 18.0.0" + }, + "peerDependencies": { + "@aws-cdk/cloud-assembly-schema": ">=55.0.0" + } + }, + "node_modules/aws-cdk-lib/node_modules/@aws/cloudformation-validate": { + "version": "1.12.1", + "inBundle": true, + "license": "Apache-2.0", + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/aws-cdk-lib/node_modules/@balena/dockerignore": { + "version": "1.0.2", + "inBundle": true, + "license": "Apache-2.0" + }, + "node_modules/aws-cdk-lib/node_modules/balanced-match": { + "version": "4.0.4", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/aws-cdk-lib/node_modules/brace-expansion": { + "version": "5.0.12", + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/aws-cdk-lib/node_modules/case": { + "version": "1.6.3", + "inBundle": true, + "license": "(MIT OR GPL-3.0-or-later)", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/aws-cdk-lib/node_modules/fs-extra": { + "version": "11.4.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/aws-cdk-lib/node_modules/graceful-fs": { + "version": "4.2.11", + "inBundle": true, + "license": "ISC" + }, + "node_modules/aws-cdk-lib/node_modules/ignore": { + "version": "5.3.2", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/aws-cdk-lib/node_modules/json-source-map": { + "version": "0.6.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/aws-cdk-lib/node_modules/jsonfile": { + "version": "6.2.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/aws-cdk-lib/node_modules/jsonschema": { + "version": "1.5.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/aws-cdk-lib/node_modules/mime-db": { + "version": "1.52.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/aws-cdk-lib/node_modules/mime-types": { + "version": "2.1.35", + "inBundle": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/aws-cdk-lib/node_modules/minimatch": { + "version": "10.2.6", + "inBundle": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/aws-cdk-lib/node_modules/punycode": { + "version": "2.3.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/aws-cdk-lib/node_modules/semver": { + "version": "7.8.5", + "inBundle": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/aws-cdk-lib/node_modules/universalify": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/aws-cdk-lib/node_modules/yaml": { + "version": "1.10.3", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", + "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/baseline-browser-mapping": { + "version": "2.11.33", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.33.tgz", + "integrity": "sha512-yiVKDX+qCMRKBE084lXvq9EcwFUhKZ2nU8TK1EQQuOgPNR/lmbGxXOeDdlGUqC2Zz11Cs9rk1d/8NfgBmlkt0w==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/bowser": { + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.14.1.tgz", + "integrity": "sha512-tzPjzCxygAKWFOJP011oxFHs57HzIhOEracIgAePE4pqB3LikALKnSzUyU4MGs9/iCEUuHlAJTjTc5M+u7YEGg==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.29.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.5.tgz", + "integrity": "sha512-khTmKu5NGYTotqcYo8Bew2k4RAE9PuXRSFRXG2lQBrCEQHyeQ/vX6gKMxfokwywBsLiXZMnHsmWMG1pnO8J7uQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.11.33", + "caniuse-lite": "^1.0.30001819", + "electron-to-chromium": "^1.5.464", + "node-releases": "^2.0.60", + "update-browserslist-db": "^1.3.4" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001819", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001819.tgz", + "integrity": "sha512-LFUqIIAwpzsIuevnKnsR9qnStBcgzPShTX61lBwN9uFkkf8o8zLiebEjbW8AYtZiF+1YKDWfdt/pWDtMuG8Xwg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", + "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", + "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==", + "dev": true, + "license": "MIT" + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/constructs": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/constructs/-/constructs-10.6.0.tgz", + "integrity": "sha512-TxHOnBO5zMo/G76ykzGF/wMpEHu257TbWiIxP9K0Yv/+t70UzgBQiTqjkAsWOPC6jW91DzJI0+ehQV6xDRNBuQ==", + "license": "Apache-2.0" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dedent": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz", + "integrity": "sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/diff": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.4.tgz", + "integrity": "sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/dotenv": { + "version": "17.4.2", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz", + "integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.465", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.465.tgz", + "integrity": "sha512-zg4iUpbeGw7YNZsswc2xKr2uiBex2d8dELAXo92Icw3but1ULbrvK8USe6wVLaWjgJnKBARv0pchx9Owktx6wQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-xml-builder": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.2.0.tgz", + "integrity": "sha512-00aAWieqff+ZJhsXA4g1g7M8k+7AYoMUUHF+/zFb5U6Uv/P0Vl4QZo84/IcufzYalLuEj9928bXN9PbbFzMF0Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "path-expression-matcher": "^1.5.0", + "xml-naming": "^0.1.0" + } + }, + "node_modules/fast-xml-parser": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.7.3.tgz", + "integrity": "sha512-C0AaNuC+mscy6vrAQKAc/rMq+zAPHodfHGZu4sGVehvAQt/JLG1O5zEcYcXSY5zSqr4YVgxsB+pHXTq0i7eDlg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "@nodable/entities": "^2.1.0", + "fast-xml-builder": "^1.1.7", + "path-expression-matcher": "^1.5.0", + "strnum": "^2.2.3" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/handlebars": { + "version": "4.7.10", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.10.tgz", + "integrity": "sha512-P5VJMVM7qgBn6vjXMw8WG9uVI+ncf2pi72j4de4yz5ZULLj2RGqLYaKOYGsgyrViQ0tePOVlN1tDCCXXtFqXKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.8", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-core-module": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", + "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", + "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", + "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "3.15.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.2.tgz", + "integrity": "sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", + "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mnemonist": { + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.3.tgz", + "integrity": "sha512-2K9QYubXx/NAjv4VLq1d1Ly8pWNC5L3BrixtdkyTegXWJIqY+zLNDhhX/A+ZwWt70tB1S8H4BE8FLYEFyNoOBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "obliterator": "^1.6.1" + } + }, + "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/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.60", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.60.tgz", + "integrity": "sha512-OmO8+GM1JUZqXET720VrJCwkjUCXmCMQm0Z3UDDRbfNLHS4NEAvY60j5jiFv0tkKw2PNNlqOLhahVmwJIOLDIQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/obliterator": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-1.6.1.tgz", + "integrity": "sha512-9WXswnqINnnhOG/5SLimUlzuU1hFJUc8zkwyD59Sd+dPOMf05PmnYG/d6Q7HZ+KmgkZJa1PxRso6QdM3sTNHig==", + "dev": true, + "license": "MIT" + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-expression-matcher": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.5.0.tgz", + "integrity": "sha512-cbrerZV+6rvdQrrD+iGMcZFEiiSrbv9Tfdkvnusy6y0x0GKBXREFg/Y65GhIfm0tnLntThhzCnfKwp1WRjeCyQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.12", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", + "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", + "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strnum": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.3.0.tgz", + "integrity": "sha512-ums3KNd42PGyx5xaoVTO1mjU1bH3NpY4vsrVlnv9PNGqQj8wd7rJ6nEypLrJ7z5vxK5RP0yMLo6J/Gsm62DI5Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT" + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-jest": { + "version": "29.4.15", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.15.tgz", + "integrity": "sha512-s2qmEUYFRqbjz1wv0EmccNPVOb45HOFpFuhzQJLKShYVisuTbCFPIIAIV2EuK5rIxb4BejLDbH7dnBZfYjybUQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "^0.2.6", + "fast-json-stable-stringify": "^2.1.0", + "handlebars": "^4.7.10", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.8.5", + "type-fest": "^4.41.0", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <9", + "@jest/transform": "^29.0.0 || ^30.0.0", + "@jest/types": "^29.0.0 || ^30.0.0", + "babel-jest": "^29.0.0 || ^30.0.0", + "jest": "^29.0.0 || ^30.0.0", + "jest-util": "^29.0.0 || ^30.0.0", + "typescript": ">=4.3 <7" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jest-util": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-jest/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "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==", + "dev": true, + "license": "0BSD" + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/undici-types": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/update-browserslist-db": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.4.tgz", + "integrity": "sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT" + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/xml-naming": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/xml-naming/-/xml-naming-0.1.0.tgz", + "integrity": "sha512-k8KO9hrMyNk6tUWqUfkTEZbezRRpONVOzUTnc97VnCvyj6Tf9lyUR9EDAIeiVLv56jsMcoXEwjW8Kv5yPY52lw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/infra/smalruby-studuino-hex/package.json b/infra/smalruby-studuino-hex/package.json new file mode 100644 index 00000000000..785d107e095 --- /dev/null +++ b/infra/smalruby-studuino-hex/package.json @@ -0,0 +1,32 @@ +{ + "name": "smalruby-studuino-hex", + "version": "0.1.0", + "private": true, + "bin": { + "smalruby-studuino-hex": "bin/smalruby-studuino-hex.js" + }, + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "test": "jest", + "cdk": "cdk" + }, + "devDependencies": { + "@aws-sdk/client-dynamodb": "^3.0.0", + "@aws-sdk/lib-dynamodb": "^3.0.0", + "@types/aws-lambda": "^8.10.149", + "@types/jest": "^29.5.14", + "@types/node": "^24.10.1", + "aws-cdk": "2.1147.0", + "dotenv": "^17.2.3", + "jest": "^29.7.0", + "ts-jest": "^29.2.5", + "ts-node": "^10.9.2", + "typescript": "~5.9.3" + }, + "dependencies": { + "aws-cdk-lib": "2.275.0", + "constructs": "^10.0.0", + "esbuild": "^0.25.0" + } +} diff --git a/infra/smalruby-studuino-hex/tsconfig.json b/infra/smalruby-studuino-hex/tsconfig.json new file mode 100644 index 00000000000..850c72feecd --- /dev/null +++ b/infra/smalruby-studuino-hex/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "lib": ["es2020"], + "declaration": true, + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "alwaysStrict": true, + "outDir": "./dist", + "rootDir": "./", + "esModuleInterop": true, + "skipLibCheck": true + }, + "exclude": ["node_modules", "dist", "lambda/tests"] +}