diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml new file mode 100644 index 0000000..bc921aa --- /dev/null +++ b/.github/workflows/build-binaries.yml @@ -0,0 +1,142 @@ +name: Build and Release Binaries + +on: + push: + tags: + - 'v*' + workflow_dispatch: + +jobs: + build: + strategy: + fail-fast: false + matrix: + settings: + - host: macos-latest + target: x86_64-apple-darwin + build: yarn build:rs --target x86_64-apple-darwin + - host: macos-latest + target: aarch64-apple-darwin + build: yarn build:rs --target aarch64-apple-darwin + - host: windows-latest + target: x86_64-pc-windows-msvc + build: yarn build:rs --target x86_64-pc-windows-msvc + - host: windows-latest + target: i686-pc-windows-msvc + build: yarn build:rs --target i686-pc-windows-msvc + - host: ubuntu-latest + target: x86_64-unknown-linux-gnu + build: yarn build:rs --target x86_64-unknown-linux-gnu + - host: ubuntu-latest + target: x86_64-unknown-linux-musl + build: | + sudo apt-get update + sudo apt-get install musl-tools + yarn build:rs --target x86_64-unknown-linux-musl + - host: ubuntu-latest + target: aarch64-unknown-linux-gnu + build: | + sudo apt-get update + sudo apt-get install gcc-aarch64-linux-gnu + yarn build:rs --target aarch64-unknown-linux-gnu + - host: ubuntu-latest + target: i686-unknown-linux-gnu + build: | + sudo apt-get update + sudo apt-get install gcc-multilib + yarn build:rs --target i686-unknown-linux-gnu + - host: ubuntu-latest + target: armv7-unknown-linux-gnueabihf + build: | + sudo apt-get update + sudo apt-get install gcc-arm-linux-gnueabihf + yarn build:rs --target armv7-unknown-linux-gnueabihf + - host: ubuntu-latest + target: x86_64-unknown-freebsd + build: yarn build:rs --target x86_64-unknown-freebsd + + name: Build ${{ matrix.settings.target }} + runs-on: ${{ matrix.settings.host }} + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + cache: 'yarn' + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.settings.target }} + + - name: Cache cargo + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + .cargo-cache + target/ + key: ${{ matrix.settings.target }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Build binary + run: ${{ matrix.settings.build }} + + - name: Upload binary + uses: actions/upload-artifact@v4 + with: + name: binaries-${{ matrix.settings.target }} + path: | + *.node + cjs/*.node + esm/*.node + + release: + name: Create Release + runs-on: ubuntu-latest + needs: build + if: startsWith(github.ref, 'refs/tags/') + + steps: + - uses: actions/checkout@v4 + + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + + - name: Upload Release Assets + run: | + for dir in artifacts/binaries-*; do + target=$(basename "$dir" | sed 's/binaries-//') + for file in "$dir"/*.node; do + if [ -f "$file" ]; then + asset_name="idea-parser-${target}.node" + echo "Uploading $file as $asset_name" + curl \ + -X POST \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Content-Type: application/octet-stream" \ + --data-binary @"$file" \ + "https://uploads.github.com/repos/${{ github.repository }}/releases/${{ steps.create_release.outputs.id }}/assets?name=$asset_name" + fi + done + done diff --git a/.gitignore b/.gitignore index 1a04c5c..ec2a0a4 100644 --- a/.gitignore +++ b/.gitignore @@ -149,4 +149,9 @@ packages/idea-language/server/package-lock.json packages/idea-transformer/tests/out .DS_Store -.clinerules \ No newline at end of file +.clinerules +old/ + +#rust +target/ +**/*.rs.bk \ No newline at end of file diff --git a/docs/parser/Binaries.md b/docs/parser/Binaries.md new file mode 100644 index 0000000..1691536 --- /dev/null +++ b/docs/parser/Binaries.md @@ -0,0 +1,161 @@ +# Binary Distribution Strategy + +This document explains how the Rust binaries are built and distributed for the `@stackpress/idea-parser` npm package. + +## Overview + +The package uses a hybrid approach for binary distribution: + +1. **GitHub Actions** builds pre-compiled binaries for multiple platforms +2. **Postinstall script** downloads the appropriate binary for the user's platform +3. **Fallback to source compilation** if no pre-built binary is available + +## Supported Platforms + +The following platforms are supported with pre-built binaries: + +- **macOS**: + - x86_64 (Intel) + - aarch64 (Apple Silicon) +- **Windows**: + - x86_64 (64-bit) + - i686 (32-bit) +- **Linux**: + - x86_64 (GNU) + - x86_64 (musl) + - aarch64 (ARM64) + - i686 (32-bit) + - armv7 (ARM) +- **FreeBSD**: + - x86_64 + +## How It Works + +### 1. GitHub Actions Workflow + +The `.github/workflows/build-binaries.yml` workflow: + +- Triggers on version tags (`v*`) or manual dispatch +- Builds binaries for all supported platforms using a matrix strategy +- Uploads binaries as artifacts +- Creates a GitHub Release with all binaries attached + +### 2. Postinstall Script + +The `scripts/install.cjs` script: + +- Detects the user's platform and architecture +- Maps it to the corresponding Rust target triple +- Attempts to download the pre-built binary from GitHub Releases +- Falls back to building from source if download fails +- Places the binary in the correct locations for both CJS and ESM builds + +### 3. Platform Detection + +The script maps Node.js platform/architecture to Rust target triples: + +```javascript +const platformMap = { + 'darwin': { + 'x64': 'x86_64-apple-darwin', + 'arm64': 'aarch64-apple-darwin' + }, + 'win32': { + 'x64': 'x86_64-pc-windows-msvc', + 'ia32': 'i686-pc-windows-msvc' + }, + 'linux': { + 'x64': 'x86_64-unknown-linux-gnu', + 'arm64': 'aarch64-unknown-linux-gnu', + 'ia32': 'i686-unknown-linux-gnu', + 'arm': 'armv7-unknown-linux-gnueabihf' + }, + 'freebsd': { + 'x64': 'x86_64-unknown-freebsd' + } +}; +``` + +## Release Process + +To create a new release with binaries: + +1. Update the version in `package.json` +2. Create and push a git tag: + ```bash + git tag v0.6.3 + git push origin v0.6.3 + ``` +3. The GitHub Actions workflow will automatically: + - Build binaries for all platforms + - Create a GitHub Release + - Upload all binaries to the release + +## Binary Naming Convention + +Binaries are named using the pattern: +``` +idea-parser-{target-triple}.node +``` + +Examples: +- `idea-parser-aarch64-apple-darwin.node` +- `idea-parser-x86_64-pc-windows-msvc.node` +- `idea-parser-x86_64-unknown-linux-gnu.node` + +## Fallback Behavior + +If a pre-built binary is not available for the user's platform: + +1. The script will attempt to build from source using `yarn build:rs` +2. This requires the user to have: + - Rust toolchain installed + - Appropriate build tools for their platform +3. The build process uses the existing `napi` configuration + +## Testing + +To test the installation process: + +```bash +# Test the postinstall script directly +node scripts/install.cjs + +# Test with npm install (in a clean environment) +npm install +``` + +## Troubleshooting + +### Binary Download Fails + +If the binary download fails, check: +1. Internet connectivity +2. GitHub Releases page for the version +3. Binary exists for your platform + +### Build from Source Fails + +If building from source fails, ensure: +1. Rust is installed (`rustup` recommended) +2. Build tools are available: + - **Windows**: Visual Studio Build Tools + - **macOS**: Xcode Command Line Tools + - **Linux**: `build-essential` package + +### Platform Not Supported + +If your platform is not supported: +1. Check if it's in the platform map in `scripts/install.cjs` +2. Add support by updating the GitHub Actions workflow +3. Update the platform map in the install script + +## Benefits + +This approach provides: + +- **Fast installation** for supported platforms (no compilation needed) +- **Broad compatibility** with fallback to source compilation +- **Automatic updates** when new versions are released +- **Reduced package size** (binaries hosted separately) +- **CI/CD integration** for consistent builds across platforms diff --git a/package.json b/package.json index 3965ace..b71088f 100644 --- a/package.json +++ b/package.json @@ -5,18 +5,15 @@ "example" ], "scripts": { - "build": "yarn build:parser && yarn build:transformer && yarn build:idea && yarn build:example", - "build:parser": "yarn --cwd packages/idea-parser build", - "build:language": "yarn --cwd packages/idea-language build", - "build:transformer": "yarn --cwd packages/idea-transformer build", - "build:idea": "yarn --cwd packages/idea build", - "build:example": "yarn --cwd example build", - "report": "yarn report:env nyc yarn test && nyc report -r lcov", - "report:env": "NODE_OPTIONS=\"--disable-warning=ExperimentalWarning --experimental-loader @istanbuljs/esm-loader-hook\"", + "idea": "yarn --cwd packages/idea", + "parser": "yarn --cwd packages/idea-parser", + "transformer": "yarn --cwd packages/idea-transformer", + "example": "yarn --cwd example", + "build": "yarn parser build && yarn transformer build && yarn idea build && yarn example build", "transform": "yarn --cwd example transform", - "test": "yarn test:parser && yarn test:transformer", - "test:parser": "yarn --cwd packages/idea-parser test", - "test:transformer": "yarn --cwd packages/idea-transformer test" + "test": "yarn parser test && yarn transformer test", + "report": "yarn report:env nyc yarn test && nyc report -r lcov", + "report:env": "NODE_OPTIONS=\"--disable-warning=ExperimentalWarning --experimental-loader @istanbuljs/esm-loader-hook\"" }, "devDependencies": { "@istanbuljs/esm-loader-hook": "0.3.0", diff --git a/packages/idea-parser/Cargo.lock b/packages/idea-parser/Cargo.lock new file mode 100755 index 0000000..e34974d --- /dev/null +++ b/packages/idea-parser/Cargo.lock @@ -0,0 +1,327 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "bitflags" +version = "2.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34efbcccd345379ca2868b2b2c9d3782e9cc58ba87bc7d79d5b53d9c9ae6f25d" + +[[package]] +name = "cfg-if" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "ctor" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "idea-parser-rust" +version = "0.1.0" +dependencies = [ + "napi", + "napi-build", + "napi-derive", + "regex", + "serde", + "serde_json", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "libloading" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" +dependencies = [ + "cfg-if", + "windows-targets", +] + +[[package]] +name = "memchr" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "napi" +version = "2.16.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55740c4ae1d8696773c78fdafd5d0e5fe9bc9f1b071c7ba493ba5c413a9184f3" +dependencies = [ + "bitflags", + "ctor", + "napi-derive", + "napi-sys", + "once_cell", + "serde", + "serde_json", +] + +[[package]] +name = "napi-build" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcae8ad5609d14afb3a3b91dee88c757016261b151e9dcecabf1b2a31a6cab14" + +[[package]] +name = "napi-derive" +version = "2.16.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cbe2585d8ac223f7d34f13701434b9d5f4eb9c332cccce8dee57ea18ab8ab0c" +dependencies = [ + "cfg-if", + "convert_case", + "napi-derive-backend", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "napi-derive-backend" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1639aaa9eeb76e91c6ae66da8ce3e89e921cd3885e99ec85f4abacae72fc91bf" +dependencies = [ + "convert_case", + "once_cell", + "proc-macro2", + "quote", + "regex", + "semver", + "syn", +] + +[[package]] +name = "napi-sys" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "427802e8ec3a734331fec1035594a210ce1ff4dc5bc1950530920ab717964ea3" +dependencies = [ + "libloading", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "proc-macro2" +version = "1.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "semver" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.143" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "syn" +version = "2.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-targets" +version = "0.53.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" diff --git a/packages/idea-parser/Cargo.toml b/packages/idea-parser/Cargo.toml new file mode 100755 index 0000000..64aa66b --- /dev/null +++ b/packages/idea-parser/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "idea-parser-rust" +version = "0.1.0" +edition = "2021" + +[lib] +crate-type = ["cdylib"] + +[dependencies] +napi = { version = "2.16", default-features = false, features = ["napi4", "serde-json"] } +napi-derive = "2.16" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +regex = "1.10" + +[build-dependencies] +napi-build = "2.1" diff --git a/packages/idea-parser/LICENSE b/packages/idea-parser/LICENSE old mode 100644 new mode 100755 diff --git a/packages/idea-parser/README.md b/packages/idea-parser/README.md deleted file mode 100644 index d56d88c..0000000 --- a/packages/idea-parser/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Idea Parser - -Parses the ideas to AST and readable JSON. - -AST follows JS AST as described [here](https://astexplorer.net/#/gist/6e328cf76a27ca85e552c9cb583cdd74/1077c8842337972509a29bc9063d17bf90a1a492). - -See [https://github.com/stackpress/idea] for more info. \ No newline at end of file diff --git a/packages/idea-parser/build.rs b/packages/idea-parser/build.rs new file mode 100755 index 0000000..9fc2367 --- /dev/null +++ b/packages/idea-parser/build.rs @@ -0,0 +1,5 @@ +extern crate napi_build; + +fn main() { + napi_build::setup(); +} diff --git a/packages/idea-parser/index.d.ts b/packages/idea-parser/index.d.ts new file mode 100644 index 0000000..91a15f0 --- /dev/null +++ b/packages/idea-parser/index.d.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ + +/* auto-generated by NAPI-RS */ + +/** + * Parse schema code into JSON configuration with references preserved + * + * This function takes raw .idea schema code as input and returns a JSON string + * containing the parsed schema with all references (props, use statements) intact. + * This is equivalent to the TypeScript `parse()` function. + * + * # Arguments + * * `code` - The raw .idea schema code as a string + * + * # Returns + * * `Result` - JSON string representation of the parsed schema, or an error + * + * # Example + * ```javascript + * const result = parse(` + * prop Text { type "text" } + * model User { name String @field.input(Text) } + * `); + * // Returns JSON with prop references preserved + * ``` + */ +export declare function parse(code: string): string +/** + * Parse schema code into final JSON configuration with references resolved and removed + * + * This function is similar to `parse()` but performs additional processing: + * 1. Resolves all prop references inline + * 2. Removes the 'prop' and 'use' sections from the output + * 3. Returns a clean, final configuration ready for consumption + * + * This is equivalent to the TypeScript `final()` function. + * + * # Arguments + * * `code` - The raw .idea schema code as a string + * + * # Returns + * * `Result` - JSON string representation of the final schema, or an error + * + * # Example + * ```javascript + * const result = final(` + * prop Text { type "text" } + * model User { name String @field.input(Text) } + * `); + * // Returns JSON with prop references resolved and prop section removed + * ``` + */ +export declare function final(code: string): string diff --git a/packages/idea-parser/index.js b/packages/idea-parser/index.js new file mode 100644 index 0000000..0ab3492 --- /dev/null +++ b/packages/idea-parser/index.js @@ -0,0 +1,316 @@ +/* tslint:disable */ +/* eslint-disable */ +/* prettier-ignore */ + +/* auto-generated by NAPI-RS */ + +const { existsSync, readFileSync } = require('fs') +const { join } = require('path') + +const { platform, arch } = process + +let nativeBinding = null +let localFileExisted = false +let loadError = null + +function isMusl() { + // For Node 10 + if (!process.report || typeof process.report.getReport !== 'function') { + try { + const lddPath = require('child_process').execSync('which ldd').toString().trim() + return readFileSync(lddPath, 'utf8').includes('musl') + } catch (e) { + return true + } + } else { + const { glibcVersionRuntime } = process.report.getReport().header + return !glibcVersionRuntime + } +} + +switch (platform) { + case 'android': + switch (arch) { + case 'arm64': + localFileExisted = existsSync(join(__dirname, 'idea-parser.android-arm64.node')) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.android-arm64.node') + } else { + nativeBinding = require('@stackpress/idea-parser-android-arm64') + } + } catch (e) { + loadError = e + } + break + case 'arm': + localFileExisted = existsSync(join(__dirname, 'idea-parser.android-arm-eabi.node')) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.android-arm-eabi.node') + } else { + nativeBinding = require('@stackpress/idea-parser-android-arm-eabi') + } + } catch (e) { + loadError = e + } + break + default: + throw new Error(`Unsupported architecture on Android ${arch}`) + } + break + case 'win32': + switch (arch) { + case 'x64': + localFileExisted = existsSync( + join(__dirname, 'idea-parser.win32-x64-msvc.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.win32-x64-msvc.node') + } else { + nativeBinding = require('@stackpress/idea-parser-win32-x64-msvc') + } + } catch (e) { + loadError = e + } + break + case 'ia32': + localFileExisted = existsSync( + join(__dirname, 'idea-parser.win32-ia32-msvc.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.win32-ia32-msvc.node') + } else { + nativeBinding = require('@stackpress/idea-parser-win32-ia32-msvc') + } + } catch (e) { + loadError = e + } + break + case 'arm64': + localFileExisted = existsSync( + join(__dirname, 'idea-parser.win32-arm64-msvc.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.win32-arm64-msvc.node') + } else { + nativeBinding = require('@stackpress/idea-parser-win32-arm64-msvc') + } + } catch (e) { + loadError = e + } + break + default: + throw new Error(`Unsupported architecture on Windows: ${arch}`) + } + break + case 'darwin': + localFileExisted = existsSync(join(__dirname, 'idea-parser.darwin-universal.node')) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.darwin-universal.node') + } else { + nativeBinding = require('@stackpress/idea-parser-darwin-universal') + } + break + } catch {} + switch (arch) { + case 'x64': + localFileExisted = existsSync(join(__dirname, 'idea-parser.darwin-x64.node')) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.darwin-x64.node') + } else { + nativeBinding = require('@stackpress/idea-parser-darwin-x64') + } + } catch (e) { + loadError = e + } + break + case 'arm64': + localFileExisted = existsSync( + join(__dirname, 'idea-parser.darwin-arm64.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.darwin-arm64.node') + } else { + nativeBinding = require('@stackpress/idea-parser-darwin-arm64') + } + } catch (e) { + loadError = e + } + break + default: + throw new Error(`Unsupported architecture on macOS: ${arch}`) + } + break + case 'freebsd': + if (arch !== 'x64') { + throw new Error(`Unsupported architecture on FreeBSD: ${arch}`) + } + localFileExisted = existsSync(join(__dirname, 'idea-parser.freebsd-x64.node')) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.freebsd-x64.node') + } else { + nativeBinding = require('@stackpress/idea-parser-freebsd-x64') + } + } catch (e) { + loadError = e + } + break + case 'linux': + switch (arch) { + case 'x64': + if (isMusl()) { + localFileExisted = existsSync( + join(__dirname, 'idea-parser.linux-x64-musl.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.linux-x64-musl.node') + } else { + nativeBinding = require('@stackpress/idea-parser-linux-x64-musl') + } + } catch (e) { + loadError = e + } + } else { + localFileExisted = existsSync( + join(__dirname, 'idea-parser.linux-x64-gnu.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.linux-x64-gnu.node') + } else { + nativeBinding = require('@stackpress/idea-parser-linux-x64-gnu') + } + } catch (e) { + loadError = e + } + } + break + case 'arm64': + if (isMusl()) { + localFileExisted = existsSync( + join(__dirname, 'idea-parser.linux-arm64-musl.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.linux-arm64-musl.node') + } else { + nativeBinding = require('@stackpress/idea-parser-linux-arm64-musl') + } + } catch (e) { + loadError = e + } + } else { + localFileExisted = existsSync( + join(__dirname, 'idea-parser.linux-arm64-gnu.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.linux-arm64-gnu.node') + } else { + nativeBinding = require('@stackpress/idea-parser-linux-arm64-gnu') + } + } catch (e) { + loadError = e + } + } + break + case 'arm': + if (isMusl()) { + localFileExisted = existsSync( + join(__dirname, 'idea-parser.linux-arm-musleabihf.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.linux-arm-musleabihf.node') + } else { + nativeBinding = require('@stackpress/idea-parser-linux-arm-musleabihf') + } + } catch (e) { + loadError = e + } + } else { + localFileExisted = existsSync( + join(__dirname, 'idea-parser.linux-arm-gnueabihf.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.linux-arm-gnueabihf.node') + } else { + nativeBinding = require('@stackpress/idea-parser-linux-arm-gnueabihf') + } + } catch (e) { + loadError = e + } + } + break + case 'riscv64': + if (isMusl()) { + localFileExisted = existsSync( + join(__dirname, 'idea-parser.linux-riscv64-musl.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.linux-riscv64-musl.node') + } else { + nativeBinding = require('@stackpress/idea-parser-linux-riscv64-musl') + } + } catch (e) { + loadError = e + } + } else { + localFileExisted = existsSync( + join(__dirname, 'idea-parser.linux-riscv64-gnu.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.linux-riscv64-gnu.node') + } else { + nativeBinding = require('@stackpress/idea-parser-linux-riscv64-gnu') + } + } catch (e) { + loadError = e + } + } + break + case 's390x': + localFileExisted = existsSync( + join(__dirname, 'idea-parser.linux-s390x-gnu.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./idea-parser.linux-s390x-gnu.node') + } else { + nativeBinding = require('@stackpress/idea-parser-linux-s390x-gnu') + } + } catch (e) { + loadError = e + } + break + default: + throw new Error(`Unsupported architecture on Linux: ${arch}`) + } + break + default: + throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`) +} + +if (!nativeBinding) { + if (loadError) { + throw loadError + } + throw new Error(`Failed to load native binding`) +} + +const { parse, final } = nativeBinding + +module.exports.parse = parse +module.exports.final = final diff --git a/packages/idea-parser/package.json b/packages/idea-parser/package.json old mode 100644 new mode 100755 index 3ffeabf..8d2d00d --- a/packages/idea-parser/package.json +++ b/packages/idea-parser/package.json @@ -6,8 +6,13 @@ "description": "Parses ideas to AST and readable JSON.", "author": "Chris ", "homepage": "https://github.com/stackpress/idea", - "bugs": "https://github.com/stackpress/idea/issues", - "repository": "stackpress/idea", + "bugs": { + "url": "https://github.com/stackpress/idea/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/stackpress/idea.git" + }, "keywords": [ "ts", "typescript", @@ -21,104 +26,57 @@ "idea", "stackpress" ], - "main": "./cjs/index.js", - "module": "./esm/index.js", - "types": "./cjs/index.d.ts", + "main": "cjs/index.cjs", + "module": "esm/index.js", + "types": "esm/index.d.ts", "exports": { ".": { - "require": "./cjs/index.js", - "import": "./esm/index.js" - }, - "./types": { - "require": "./cjs/types.js", - "import": "./esm/types.js" - }, - "./definitions": { - "require": "./cjs/definitions.js", - "import": "./esm/definitions.js" - }, - "./Compiler": { - "require": "./cjs/Compiler.js", - "import": "./esm/Compiler.js" - }, - "./Exception": { - "require": "./cjs/Exception.js", - "import": "./esm/Exception.js" - }, - "./Lexer": { - "require": "./cjs/Lexer.js", - "import": "./esm/Lexer.js" - }, - "./AbstractTree": { - "require": "./cjs/tree/AbstractTree.js", - "import": "./esm/tree/AbstractTree.js" - }, - "./EnumTree": { - "require": "./cjs/tree/EnumTree.js", - "import": "./esm/tree/EnumTree.js" - }, - "./ModelTree": { - "require": "./cjs/tree/ModelTree.js", - "import": "./esm/tree/ModelTree.js" - }, - "./PluginTree": { - "require": "./cjs/tree/PluginTree.js", - "import": "./esm/tree/PluginTree.js" - }, - "./PropTree": { - "require": "./cjs/tree/PropTree.js", - "import": "./esm/tree/PropTree.js" - }, - "./SchemaTree": { - "require": "./cjs/tree/SchemaTree.js", - "import": "./esm/tree/SchemaTree.js" - }, - "./TypeTree": { - "require": "./cjs/tree/TypeTree.js", - "import": "./esm/tree/TypeTree.js" - }, - "./UseTree": { - "require": "./cjs/tree/UseTree.js", - "import": "./esm/tree/UseTree.js" + "import": { + "types": "./esm/index.d.ts", + "default": "./esm/index.js" + }, + "require": { + "types": "./cjs/index.cjs.d.ts", + "default": "./cjs/index.cjs" + } } }, - "typesVersions": { - "*": { - "index": [ "./cjs/index.d.ts"], - "types": [ "./cjs/types.d.ts" ], - "Compiler": [ "./cjs/Compiler.d.ts" ], - "Exception": [ "./cjs/Exception.d.ts" ], - "Lexer": [ "./cjs/Lexer.d.ts" ], - "AbstractTree": [ "./cjs/tree/AbstractTree.d.ts" ], - "EnumTree": [ "./cjs/tree/EnumTree.d.ts" ], - "ModelTree": [ "./cjs/tree/ModelTree.d.ts" ], - "PluginTree": [ "./cjs/tree/PluginTree.d.ts" ], - "PropTree": [ "./cjs/tree/PropTree.d.ts" ], - "SchemaTree": [ "./cjs/tree/SchemaTree.d.ts" ], - "TypeTree": [ "./cjs/tree/TypeTree.d.ts" ], - "UseTree": [ "./cjs/tree/UseTree.d.ts" ] + "ava": { + "timeout": "3m" + }, + "napi": { + "name": "idea-parser", + "triples": { + "defaults": true, + "additional": [ + "x86_64-pc-windows-msvc", + "i686-pc-windows-msvc", + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "x86_64-unknown-linux-gnu", + "x86_64-unknown-linux-musl", + "aarch64-unknown-linux-gnu", + "i686-unknown-linux-gnu", + "armv7-unknown-linux-gnueabihf", + "aarch64-linux-android", + "x86_64-unknown-freebsd" + ] } }, - "files": [ - "cjs", - "esm", - "LICENSE", - "README.md" - ], "scripts": { - "build": "yarn build:tsc && yarn build:pkg", - "build:pkg": "yarn build:pkg:cjs && yarn build:pkg:esm", - "build:pkg:cjs": "echo '{\"type\": \"commonjs\"}' > cjs/package.json", - "build:pkg:esm": "echo '{\"type\": \"module\"}' > esm/package.json", - "build:tsc": "yarn build:tsc:cjs && yarn build:tsc:esm", - "build:tsc:cjs": "tsc -p ./tsconfig.cjs.json", - "build:tsc:esm": "tsc -p ./tsconfig.esm.json", - "test": "DATABASE_URL=test ts-mocha -r tsx tests/*.test.ts" - }, - "dependencies": { - "@stackpress/lib": "0.6.2" + "build": "yarn build:rs && build:ts", + "build:rs": "napi build --platform --release", + "build:ts": "npx tsc -p tsconfig.esm.json && npx tsc -p tsconfig.cjs.json", + "build:debug": "napi build --platform", + "prepublishOnly": "napi prepublish -t npm", + "postinstall": "node scripts/install.cjs", + "test": "yarn test:rs && yarn test:ts", + "test:rs": "cargo test", + "test:ts": "ts-mocha -r tsx tests/*.test.ts", + "version": "napi version" }, "devDependencies": { + "@napi-rs/cli": "^2.18.0", "@types/chai": "4.3.20", "@types/deep-equal-in-any-order": "1.0.3", "@types/mocha": "10.0.10", diff --git a/packages/idea-parser/scripts/install.cjs b/packages/idea-parser/scripts/install.cjs new file mode 100644 index 0000000..875de54 --- /dev/null +++ b/packages/idea-parser/scripts/install.cjs @@ -0,0 +1,246 @@ +#!/usr/bin/env node + +const fs = require('fs'); +const path = require('path'); +const https = require('https'); +const { execSync } = require('child_process'); + +// Get platform and architecture information +function getPlatformInfo() { + const platform = process.platform; + const arch = process.arch; + + // Map Node.js platform/arch to Rust target triples + const platformMap = { + 'darwin': { + 'x64': 'x86_64-apple-darwin', + 'arm64': 'aarch64-apple-darwin' + }, + 'win32': { + 'x64': 'x86_64-pc-windows-msvc', + 'ia32': 'i686-pc-windows-msvc' + }, + 'linux': { + 'x64': 'x86_64-unknown-linux-gnu', + 'arm64': 'aarch64-unknown-linux-gnu', + 'ia32': 'i686-unknown-linux-gnu', + 'arm': 'armv7-unknown-linux-gnueabihf' + }, + 'freebsd': { + 'x64': 'x86_64-unknown-freebsd' + } + }; + + if (!platformMap[platform] || !platformMap[platform][arch]) { + throw new Error(`Unsupported platform: ${platform}-${arch}`); + } + + return { + platform, + arch, + target: platformMap[platform][arch] + }; +} + +// Get the package version from package.json +function getPackageVersion() { + const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8')); + return packageJson.version; +} + +// Download file from URL +function downloadFile(url, destination) { + return new Promise((resolve, reject) => { + console.log(`Downloading binary from: ${url}`); + + const file = fs.createWriteStream(destination); + + https.get(url, (response) => { + if (response.statusCode === 302 || response.statusCode === 301) { + // Handle redirect + return downloadFile(response.headers.location, destination) + .then(resolve) + .catch(reject); + } + + if (response.statusCode !== 200) { + reject(new Error(`Failed to download: HTTP ${response.statusCode}`)); + return; + } + + response.pipe(file); + + file.on('finish', () => { + file.close(); + console.log('Binary downloaded successfully'); + resolve(); + }); + + file.on('error', (err) => { + fs.unlink(destination, () => {}); // Delete the file on error + reject(err); + }); + }).on('error', (err) => { + reject(err); + }); + }); +} + +// Check if binary already exists +function binaryExists() { + try { + const platformInfo = getPlatformInfo(); + const binaryPaths = [ + path.join(__dirname, '..', `idea-parser.${platformInfo.target}.node`), + path.join(__dirname, '..', 'cjs', `idea-parser.${platformInfo.target}.node`), + path.join(__dirname, '..', 'esm', `idea-parser.${platformInfo.target}.node`) + ]; + + return binaryPaths.some(binaryPath => fs.existsSync(binaryPath)); + } catch (error) { + return false; + } +} + +// Build from source as fallback +function buildFromSource() { + console.log('Building binary from source...'); + try { + execSync('yarn build:rs', { stdio: 'inherit', cwd: path.join(__dirname, '..') }); + console.log('Binary built successfully from source'); + + // After building from source, copy the generated files to the expected locations + const platformInfo = getPlatformInfo(); + + // Look for any .node files that might have been created by the build + const possibleSourceFiles = []; + + // Check root directory for any .node files + const rootFiles = fs.readdirSync(path.join(__dirname, '..')); + for (const file of rootFiles) { + if (file.endsWith('.node')) { + possibleSourceFiles.push(path.join(__dirname, '..', file)); + } + } + + // Check cjs directory + const cjsDir = path.join(__dirname, '..', 'cjs'); + if (fs.existsSync(cjsDir)) { + const cjsFiles = fs.readdirSync(cjsDir); + for (const file of cjsFiles) { + if (file.endsWith('.node')) { + possibleSourceFiles.push(path.join(cjsDir, file)); + } + } + } + + // Check esm directory + const esmDir = path.join(__dirname, '..', 'esm'); + if (fs.existsSync(esmDir)) { + const esmFiles = fs.readdirSync(esmDir); + for (const file of esmFiles) { + if (file.endsWith('.node')) { + possibleSourceFiles.push(path.join(esmDir, file)); + } + } + } + + const destinations = [ + path.join(__dirname, '..', `idea-parser.${platformInfo.target}.node`), + path.join(__dirname, '..', 'cjs', `idea-parser.${platformInfo.target}.node`), + path.join(__dirname, '..', 'esm', `idea-parser.${platformInfo.target}.node`) + ]; + + // Ensure directories exist + fs.mkdirSync(path.join(__dirname, '..', 'cjs'), { recursive: true }); + fs.mkdirSync(path.join(__dirname, '..', 'esm'), { recursive: true }); + + // Find the source file that exists and copy it to all destinations + let sourceFile = null; + for (const file of possibleSourceFiles) { + if (fs.existsSync(file)) { + sourceFile = file; + break; + } + } + + if (sourceFile) { + for (const dest of destinations) { + fs.copyFileSync(sourceFile, dest); + console.log(`Binary copied to: ${dest}`); + } + } else { + console.warn('Could not find built binary to copy'); + } + + } catch (error) { + console.error('Failed to build from source:', error.message); + throw error; + } +} + +// Main installation function +async function install() { + try { + // Check if binary already exists + if (binaryExists()) { + console.log('Binary already exists, skipping download'); + return; + } + + const platformInfo = getPlatformInfo(); + const version = getPackageVersion(); + + console.log(`Platform: ${platformInfo.platform}-${platformInfo.arch}`); + console.log(`Target: ${platformInfo.target}`); + console.log(`Version: ${version}`); + + // Construct download URL for GitHub Releases + const binaryName = `idea-parser-${platformInfo.target}.node`; + const downloadUrl = `https://github.com/stackpress/idea/releases/download/v${version}/${binaryName}`; + + // Determine destination paths + const destinations = [ + path.join(__dirname, '..', `idea-parser.${platformInfo.target}.node`), + path.join(__dirname, '..', 'cjs', `idea-parser.${platformInfo.target}.node`), + path.join(__dirname, '..', 'esm', `idea-parser.${platformInfo.target}.node`) + ]; + + // Ensure directories exist + fs.mkdirSync(path.join(__dirname, '..', 'cjs'), { recursive: true }); + fs.mkdirSync(path.join(__dirname, '..', 'esm'), { recursive: true }); + + // Try to download the binary + try { + const tempFile = path.join(__dirname, '..', 'temp-binary.node'); + await downloadFile(downloadUrl, tempFile); + + // Copy to all destination paths + for (const dest of destinations) { + fs.copyFileSync(tempFile, dest); + console.log(`Binary copied to: ${dest}`); + } + + // Clean up temp file + fs.unlinkSync(tempFile); + + } catch (downloadError) { + console.warn('Failed to download pre-built binary:', downloadError.message); + console.log('Attempting to build from source...'); + + // Fallback to building from source + buildFromSource(); + } + + } catch (error) { + console.error('Installation failed:', error.message); + process.exit(1); + } +} + +// Run installation +if (require.main === module) { + install(); +} + +module.exports = { install, getPlatformInfo, getPackageVersion }; diff --git a/packages/idea-parser/src/Compiler.ts b/packages/idea-parser/src/Compiler.ts deleted file mode 100644 index fda76c3..0000000 --- a/packages/idea-parser/src/Compiler.ts +++ /dev/null @@ -1,309 +0,0 @@ -//types -import type { - Data, - DataToken, - ArrayToken, - EnumConfig, - PropConfig, - TypeConfig, - ModelConfig, - ObjectToken, - ImportToken, - SchemaToken, - ColumnConfig, - SchemaConfig, - LiteralToken, - UseReferences, - PluginConfig, - IdentifierToken, - DeclarationToken, - FinalSchemaConfig -} from './types.js'; - -import Exception from './Exception.js'; - -export default class Compiler { - /** - * Compiles an array tree into an actual array - */ - static array(token: ArrayToken, references: UseReferences = false) { - return token.elements.map(element => this.data(element, references)) as T; - } - - /** - * Compiles an array, object or scalar tree into the actual value - */ - static data(token: DataToken, references: UseReferences = false): Data { - if (token.type === 'ObjectExpression') { - return this.object(token, references); - } else if (token.type === 'ArrayExpression') { - return this.array(token, references); - } else if (token.type === 'Literal') { - return this.literal(token); - } else if (token.type === 'Identifier') { - return this.identifier(token, references); - } - throw Exception.for('Invalid data token type'); - } - - /** - * Converts an enum tree into a json version - */ - static enum(token: DeclarationToken) { - if (token.kind !== 'enum') { - throw Exception.for('Invalid Enum'); - } - //ex. Roles - const name = token.declarations?.[0].id?.name as string; - const options: EnumConfig = {}; - token.declarations[0].init.properties.forEach(property => { - options[property.key.name] = (property.value as LiteralToken).value; - }); - return [ name, options ] as [ string, EnumConfig ]; - } - - /** - * Converts a schema tree into a final json version - * (Removes prop and use references) - */ - static final(token: SchemaToken) { - const schema = this.schema(token, true); - delete schema.use; - delete schema.prop; - return schema as FinalSchemaConfig; - } - - /** - * Compiles an identifier into the actual value it's referencing - */ - static identifier(token: IdentifierToken, references: UseReferences = false) { - if (references && token.name in references) { - return references[token.name]; - } else if (references === false) { - return '${' + token.name + '}'; - } - - throw Exception.for(`Unknown reference ${token.name}`); - } - - /** - * Compiles a literal into the actual value - */ - static literal(token: LiteralToken) { - return token.value; - } - - /** - * Converts a model tree into a json version - */ - static model(token: DeclarationToken, references: UseReferences = false) { - //ex. Foobar - const name = token.declarations[0].id?.name; - const mutable = token.mutable !== false; - const value: Record = {}; - token.declarations[0].init.properties.forEach(property => { - value[property.key.name] = this.data(property.value, references); - }); - - if (typeof value.columns !== 'object') { - throw Exception.for('Expecting a columns property'); - } - - //change from key/value to array to preserve the order - const columns: ColumnConfig[] = []; - for (const name in value.columns) { - const column = value.columns[name]; - column.name = name; - if (typeof column.type === 'string') { - column.required = !column.type.endsWith('?'); - column.type = column.type.replace(/\?$/, ''); - column.multiple = column.type.endsWith('[]'); - column.type = column.type.replace(/\[\]$/, ''); - } - columns.push({ - type: column.type, - name: column.name, - required: column.required, - multiple: column.multiple, - attributes: column.attributes, - ...column - }); - } - value.columns = columns; - - return [ name, { name, mutable, ...value } ] as [ string, ModelConfig ]; - } - - /** - * Compiles an object tree into the actual object - */ - static object(token: ObjectToken, references: UseReferences = false) { - return Object.fromEntries(token.properties.map(property => [ - property.key.name, - this.data(property.value, references) - ])) as Record; - } - - /** - * Converts an plugin tree into a json version - */ - static plugin(token: DeclarationToken) { - if (token.kind !== 'plugin') { - throw Exception.for('Invalid Plugin'); - } - //ex. ./custom-plugin - const name = token.declarations?.[0].id?.name as string; - const value: PluginConfig = {}; - token.declarations[0].init.properties.forEach(property => { - value[property.key.name] = this.data(property.value); - }); - return [ name, value ] as [ string, PluginConfig ]; - } - - /** - * Converts a prop tree into a json version - */ - static prop(token: DeclarationToken, references: UseReferences = false) { - if (token.kind !== 'prop') { - throw Exception.for('Invalid Prop'); - } - //ex. Foobar - const name = token.declarations[0].id.name; - const value: PropConfig = {}; - token.declarations[0].init.properties.forEach(property => { - value[property.key.name] = this.data(property.value, references); - }); - return [ name, value ] as [ string, PropConfig ]; - } - - /** - * Converts a schema tree into a json version - */ - static schema(token: SchemaToken, finalize = false) { - if (token.kind !== 'schema') { - throw Exception.for('Invalid Schema'); - } - - const schema: SchemaConfig = {}; - const references: Record = {}; - //deal with uses - const uses = token.body.filter( - token => token.type === 'ImportDeclaration' - ) as ImportToken[]; - uses.forEach(use => { - schema.use = schema.use || []; - schema.use.push(this.use(use)); - }); - //deal with declarations - const declarations = token.body as DeclarationToken[]; - declarations.filter(declaration => declaration.kind).forEach(declaration => { - if (declaration.kind === 'enum') { - schema.enum = schema.enum || {}; - const [ key, value ] = this.enum(declaration); - schema.enum[key] = value; - if (references[key]) { - throw Exception.for('Duplicate %s', key); - } - references[key] = value; - } else if (declaration.kind === 'prop') { - schema.prop = schema.prop || {}; - const [ key, value ] = this.prop( - declaration, - finalize ? references: false - ); - schema.prop[key] = value; - if (references[key]) { - throw Exception.for('Duplicate %s', key); - } - references[key] = value; - } else if (declaration.kind === 'type') { - schema.type = schema.type || {}; - const [ key, value ] = this.type( - declaration, - finalize ? references: false - ); - schema.type[key] = value; - if (references[key]) { - throw Exception.for('Duplicate %s', key); - } - references[key] = value; - } else if (declaration.kind === 'model') { - schema.model = schema.model || {}; - const [ key, value ] = this.model( - declaration, - finalize ? references: false - ); - schema.model[key] = value; - if (references[key]) { - throw Exception.for('Duplicate %s', key); - } - references[key] = value; - } else if (declaration.kind === 'plugin') { - schema.plugin = schema.plugin || {}; - const [ key, value ] = this.plugin(declaration); - schema.plugin[key] = value; - if (references[key]) { - throw Exception.for('Duplicate %s', key); - } - references[key] = value; - } - }); - - return schema; - } - - /** - * Converts a type tree into a json version - */ - static type(token: DeclarationToken, references: UseReferences = false) { - if (token.kind !== 'type') { - throw Exception.for('Invalid Type'); - } - //ex. Foobar - const name = token.declarations[0].id.name; - const mutable = token.mutable !== false; - const value: Record = {}; - token.declarations[0].init.properties.forEach(property => { - value[property.key.name] = this.data(property.value, references); - }); - - if (typeof value.columns !== 'object') { - throw Exception.for('Expecting a columns property'); - } - - //change from key/value to array to preserve the order - const columns: ColumnConfig[] = []; - for (const name in value.columns) { - const column = value.columns[name]; - column.name = name; - if (typeof column.type === 'string') { - column.required = !column.type.endsWith('?'); - column.type = column.type.replace(/\?$/, ''); - column.multiple = column.type.endsWith('[]'); - column.type = column.type.replace(/\[\]$/, ''); - } - columns.push({ - type: column.type, - name: column.name, - required: column.required, - multiple: column.multiple, - attributes: column.attributes, - ...column - }); - } - value.columns = columns; - - return [ name, { name, mutable, ...value } ] as [ string, TypeConfig ]; - } - - /** - * Converts an use tree into a json version - */ - static use(token: ImportToken) { - if (token.type !== 'ImportDeclaration') { - throw Exception.for('Invalid Import'); - } - //ex. ./another.idea - return token.source.value; - } -}; \ No newline at end of file diff --git a/packages/idea-parser/src/Exception.ts b/packages/idea-parser/src/Exception.ts deleted file mode 100644 index 35da671..0000000 --- a/packages/idea-parser/src/Exception.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Exception from '@stackpress/lib/Exception'; - -export default class IdeaException extends Exception {} \ No newline at end of file diff --git a/packages/idea-parser/src/Lexer.ts b/packages/idea-parser/src/Lexer.ts deleted file mode 100644 index 9090eba..0000000 --- a/packages/idea-parser/src/Lexer.ts +++ /dev/null @@ -1,184 +0,0 @@ -//types -import type { Definition, Reader, Parser, Token } from './types.js'; - -import Exception from './Exception.js'; - -export default class Lexer implements Parser { - //the code to parse - protected _code = ''; - //the current index - protected _index = 0; - //a collection of definitions - protected _dictionary: Record = {}; - - /** - * Returns the shallow copy of the dictionary - */ - get dictionary() { - return { ...this._dictionary }; - } - - /** - * Returns the current index - */ - get index() { - return this._index; - } - - /** - * Clones the lexer at it's exact state - */ - public clone() { - const lexer = new Lexer(); - lexer.load(this._code, this._index); - for (const key in this._dictionary) { - lexer.define(key, this._dictionary[key].reader); - } - return lexer; - } - - /** - * Makes a new definition - */ - public define(key: string, reader: Reader) { - this._dictionary[key] = { key, reader }; - } - - /** - * Returns a token that matches any of the given names - */ - public expect(keys: string|string[]) { - if (!Array.isArray(keys)) { - keys = [keys]; - } - //get definition - const definitions = keys.map(key => { - const reader = this.get(key); - if (!reader) { - throw Exception.for('Unknown definition %s', key); - } - return reader; - }).filter(Boolean); - //throw if no definition - if (!definitions.length) { - throw Exception.for( - 'Unknown definitions %s', - keys.join(', ') - ); - } - //get match (sorted by names defined above) - const match = this.match(this._code, this._index, keys); - //if no match - if (!match) { - //throw exception - if (this._code[this._index + 10]) { - throw Exception.for( - 'Unexpected %s ... expecting %s', - this._code - .substring(this._index, this._index + 10) - .replace(/[\n\r]/g, ' ') - .trim(), - keys.join(' or ') - ).withPosition(this._index, this.nextSpace()); - } else { - throw Exception.for( - 'Unexpected %s expecting %s', - this._code.substring(this._index, this._index + 10), - keys.join(' or ') - ).withPosition(this._index, this.nextSpace()); - } - } - //fast forward index - this._index = match.end; - return match as T; - } - - /** - * Returns the test for a given definition - */ - public get(key: string) { - return this._dictionary[key]; - } - - /** - * Loads the code - */ - public load(code: string, index = 0) { - this._code = code; - this._index = index; - return this; - } - - /** - * Returns the first match from a list of definitions - */ - public match(code: string, start: number, keys?: string[]) { - //if no names, get all names - keys = keys || Object.keys(this._dictionary); - //loop through all the keys - for (let i = 0; i < keys.length; i++) { - if (!this._dictionary[keys[i]]) { - throw Exception.for('Unknown definition %s', keys[i]); - } - const results = this._dictionary[keys[i]].reader(code, start, this); - //end is greater than start - if (results && results.end > start) { - //yield results - return results; - } - //if no results, try the next definition... - } - //no definitions matched - return null; - } - - /** - * Tests to see if the next set of characters match the given names - */ - public next(names: string|string[]) { - const start = this._index; - try { - this.expect(names); - this._index = start; - return true; - } catch (error) { - this._index = start; - return false; - } - } - - /** - * Possible returns a token that matches any of the given names - */ - public optional(names: string|string[]) { - const start = this._index; - try { - return this.expect(names); - } catch (error) { - this._index = start; - return undefined; - } - } - - /** - * Reads ahead and tries determines the next token - */ - public read() { - return this.optional(Object.keys(this.dictionary)); - } - - /** - * Allows to read a substring of the code - */ - public substring(start: number, end: number) { - return this._code.substring(start, end); - } - - /** - * Finds the next space (for language server) - */ - public nextSpace() { - const index = this._code.indexOf(' ', this._index); - return index === -1 ? this._code.length : index; - } -} \ No newline at end of file diff --git a/packages/idea-parser/src/compiler.rs b/packages/idea-parser/src/compiler.rs new file mode 100755 index 0000000..cda678c --- /dev/null +++ b/packages/idea-parser/src/compiler.rs @@ -0,0 +1,460 @@ +// Compiler for the .idea schema language +// The compiler takes an Abstract Syntax Tree (AST) and converts it into +// the final JSON configuration that matches the TypeScript implementation + +use crate::parser::{AstNode, ColumnDefinition}; +use crate::{SchemaConfig, FinalSchemaConfig}; +use serde_json::Value; +use std::collections::HashMap; + +/// The main compiler structure that converts AST nodes into JSON configurations +/// This mirrors the functionality of the TypeScript Compiler class +pub struct Compiler { + /// Storage for prop definitions that can be referenced by other declarations + /// This is used during the compilation process to resolve prop references + prop_references: HashMap, + + /// Storage for all other references (enums, types, models) for final compilation + /// This is used when finalize=true to resolve all identifier references + all_references: HashMap, +} + +impl Compiler { + /// Create a new compiler instance + /// + /// # Returns + /// A new Compiler ready to process AST nodes + pub fn new() -> Self { + Self { + prop_references: HashMap::new(), + all_references: HashMap::new(), + } + } + + /// Compile a schema AST into a SchemaConfig structure + /// This is the main entry point for compilation, equivalent to TypeScript's Compiler.schema() + /// + /// # Arguments + /// * `ast` - The root schema AST node to compile + /// * `finalize` - Whether to resolve references (true) or preserve them (false) + /// + /// # Returns + /// A compiled SchemaConfig or an error if compilation fails + pub fn compile_schema(&self, ast: &AstNode, finalize: bool) -> Result { + match ast { + AstNode::Schema { body, .. } => { + let mut schema = SchemaConfig { + plugin: None, + r#use: None, + prop: None, + r#enum: None, + r#type: None, + model: None, + }; + + // Create a mutable compiler instance for reference tracking + let mut compiler = Compiler::new(); + + // First pass: collect all prop definitions for reference resolution + if finalize { + for node in body { + if let AstNode::Prop { name, config, .. } = node { + let compiled_config = compiler.compile_object_value(config, false)?; + compiler.prop_references.insert(name.clone(), compiled_config.clone()); + compiler.all_references.insert(name.clone(), compiled_config); + } + } + } + + // Second pass: compile all declarations + for node in body { + match node { + AstNode::Plugin { name, config, .. } => { + if schema.plugin.is_none() { + schema.plugin = Some(HashMap::new()); + } + let compiled_config = compiler.compile_object_value(config, false)?; + schema.plugin.as_mut().unwrap().insert(name.clone(), compiled_config); + } + + AstNode::Use { path, .. } => { + if schema.r#use.is_none() { + schema.r#use = Some(Vec::new()); + } + schema.r#use.as_mut().unwrap().push(path.clone()); + } + + AstNode::Prop { name, config, .. } => { + if !finalize { + if schema.prop.is_none() { + schema.prop = Some(HashMap::new()); + } + let compiled_config = compiler.compile_object_value(config, false)?; + schema.prop.as_mut().unwrap().insert(name.clone(), compiled_config); + } + } + + AstNode::Enum { name, variants, .. } => { + if schema.r#enum.is_none() { + schema.r#enum = Some(HashMap::new()); + } + let compiled_variants = compiler.compile_enum_variants(variants)?; + + // Add to references for final compilation first (before moving) + if finalize { + let enum_value = Value::Object( + compiled_variants.iter() + .map(|(k, v)| (k.clone(), v.clone())) + .collect() + ); + compiler.all_references.insert(name.clone(), enum_value); + } + + schema.r#enum.as_mut().unwrap().insert(name.clone(), compiled_variants); + } + + AstNode::Type { name, mutable, attributes, columns, .. } => { + if schema.r#type.is_none() { + schema.r#type = Some(HashMap::new()); + } + let compiled_type = compiler.compile_type_or_model( + name, *mutable, attributes, columns, finalize + )?; + schema.r#type.as_mut().unwrap().insert(name.clone(), compiled_type.clone()); + + // Add to references for final compilation + if finalize { + compiler.all_references.insert(name.clone(), compiled_type); + } + } + + AstNode::Model { name, mutable, attributes, columns, .. } => { + if schema.model.is_none() { + schema.model = Some(HashMap::new()); + } + let compiled_model = compiler.compile_type_or_model( + name, *mutable, attributes, columns, finalize + )?; + schema.model.as_mut().unwrap().insert(name.clone(), compiled_model.clone()); + + // Add to references for final compilation + if finalize { + compiler.all_references.insert(name.clone(), compiled_model); + } + } + + _ => {} // Skip schema nodes (shouldn't happen at this level) + } + } + + Ok(schema) + } + _ => Err("Expected schema node at root level".to_string()), + } + } + + /// Compile a schema AST into a final configuration with references resolved + /// This is equivalent to TypeScript's Compiler.final() + /// + /// # Arguments + /// * `ast` - The root schema AST node to compile + /// + /// # Returns + /// A compiled FinalSchemaConfig with all references resolved + pub fn compile_final(&self, ast: &AstNode) -> Result { + // First compile with finalization enabled + let schema = self.compile_schema(ast, true)?; + + // Convert to final schema by removing prop and use sections + Ok(FinalSchemaConfig { + plugin: schema.plugin, + r#enum: schema.r#enum, + r#type: schema.r#type, + model: schema.model, + }) + } + + /// Compile enum variants from a HashMap to the expected format + /// Converts the AST representation to the final JSON format + fn compile_enum_variants(&self, variants: &HashMap) -> Result, String> { + let mut compiled = HashMap::new(); + + for (key, value) in variants { + compiled.insert(key.clone(), value.clone()); + } + + Ok(compiled) + } + + /// Compile a type or model declaration into the expected JSON format + /// This handles the complex transformation from AST to the final structure + /// including column processing and reference resolution + fn compile_type_or_model( + &self, + name: &str, + mutable: bool, + attributes: &HashMap, + columns: &HashMap, + finalize: bool, + ) -> Result { + let mut result = serde_json::Map::new(); + + // Add basic properties + result.insert("name".to_string(), Value::String(name.to_string())); + result.insert("mutable".to_string(), Value::Bool(mutable)); + + // Add attributes if present + if !attributes.is_empty() { + let compiled_attributes = self.compile_object_value(attributes, finalize)?; + result.insert("attributes".to_string(), compiled_attributes); + } + + // Convert columns from HashMap to array format (preserving order is important) + let mut column_array = Vec::new(); + + for (column_name, column_def) in columns { + let mut column_obj = serde_json::Map::new(); + + // Process the column type (handle optional ? and array [] modifiers) + let mut processed_type = column_def.column_type.clone(); + let mut required = column_def.required; + let mut multiple = column_def.multiple; + + // Handle type modifiers that might be in the type string + if processed_type.ends_with("?") { + processed_type = processed_type.trim_end_matches("?").to_string(); + required = false; + } + + if processed_type.ends_with("[]") { + processed_type = processed_type.trim_end_matches("[]").to_string(); + multiple = true; + } + + // Add column properties + column_obj.insert("type".to_string(), Value::String(processed_type)); + column_obj.insert("name".to_string(), Value::String(column_name.clone())); + column_obj.insert("required".to_string(), Value::Bool(required)); + column_obj.insert("multiple".to_string(), Value::Bool(multiple)); + + // Add attributes if present + if !column_def.attributes.is_empty() { + let compiled_attrs = self.compile_object_value(&column_def.attributes, finalize)?; + column_obj.insert("attributes".to_string(), compiled_attrs); + } + + column_array.push(Value::Object(column_obj)); + } + + result.insert("columns".to_string(), Value::Array(column_array)); + + Ok(Value::Object(result)) + } + + /// Compile an object value, optionally resolving references + /// This handles the conversion of HashMap to JSON Value + /// and resolves prop references when finalize is true + fn compile_object_value(&self, obj: &HashMap, finalize: bool) -> Result { + let mut result = serde_json::Map::new(); + + for (key, value) in obj { + let compiled_value = self.compile_value(value, finalize)?; + result.insert(key.clone(), compiled_value); + } + + Ok(Value::Object(result)) + } + + /// Compile a single value, handling different types and reference resolution + /// This is the core value compilation logic that handles all JSON value types + fn compile_value(&self, value: &Value, finalize: bool) -> Result { + match value { + Value::String(s) => { + // Check if this is a prop reference (format: ${PropName}) + if finalize && s.starts_with("${") && s.ends_with("}") { + let prop_name = &s[2..s.len()-1]; + + // Try to resolve the reference + if let Some(resolved) = self.all_references.get(prop_name) { + Ok(resolved.clone()) + } else if let Some(resolved) = self.prop_references.get(prop_name) { + Ok(resolved.clone()) + } else { + // If we can't resolve it and we're finalizing, that's an error + Err(format!("Unknown reference: {}", prop_name)) + } + } else { + Ok(value.clone()) + } + } + + Value::Array(arr) => { + let mut compiled_array = Vec::new(); + for item in arr { + compiled_array.push(self.compile_value(item, finalize)?); + } + Ok(Value::Array(compiled_array)) + } + + Value::Object(obj) => { + let mut compiled_obj = serde_json::Map::new(); + for (key, val) in obj { + compiled_obj.insert(key.clone(), self.compile_value(val, finalize)?); + } + Ok(Value::Object(compiled_obj)) + } + + // For other types (Number, Bool, Null), just return as-is + _ => Ok(value.clone()), + } + } +} + +impl Default for Compiler { + fn default() -> Self { + Self::new() + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::parser::{AstNode, ColumnDefinition}; + use std::collections::HashMap; + + #[test] + fn test_compile_simple_enum() { + let compiler = Compiler::new(); + + let mut variants = HashMap::new(); + variants.insert("ACTIVE".to_string(), Value::String("Active".to_string())); + variants.insert("INACTIVE".to_string(), Value::String("Inactive".to_string())); + + let enum_node = AstNode::Enum { + name: "Status".to_string(), + variants, + start: 0, + end: 50, + }; + + let schema_node = AstNode::Schema { + body: vec![enum_node], + start: 0, + end: 50, + }; + + let result = compiler.compile_schema(&schema_node, false); + assert!(result.is_ok()); + + let schema = result.unwrap(); + assert!(schema.r#enum.is_some()); + + let enums = schema.r#enum.unwrap(); + assert!(enums.contains_key("Status")); + + let status_enum = &enums["Status"]; + assert!(status_enum.contains_key("ACTIVE")); + assert!(status_enum.contains_key("INACTIVE")); + } + + #[test] + fn test_compile_simple_model() { + let compiler = Compiler::new(); + + let mut columns = HashMap::new(); + columns.insert("id".to_string(), ColumnDefinition { + column_type: "String".to_string(), + required: true, + multiple: false, + attributes: HashMap::new(), + }); + columns.insert("name".to_string(), ColumnDefinition { + column_type: "String".to_string(), + required: false, + multiple: false, + attributes: HashMap::new(), + }); + + let model_node = AstNode::Model { + name: "User".to_string(), + mutable: false, + attributes: HashMap::new(), + columns, + start: 0, + end: 100, + }; + + let schema_node = AstNode::Schema { + body: vec![model_node], + start: 0, + end: 100, + }; + + let result = compiler.compile_schema(&schema_node, false); + assert!(result.is_ok()); + + let schema = result.unwrap(); + assert!(schema.model.is_some()); + + let models = schema.model.unwrap(); + assert!(models.contains_key("User")); + } + + #[test] + fn test_compile_with_prop_references() { + let compiler = Compiler::new(); + + // Create a prop definition + let mut prop_config = HashMap::new(); + prop_config.insert("type".to_string(), Value::String("text".to_string())); + + let prop_node = AstNode::Prop { + name: "Text".to_string(), + config: prop_config, + start: 0, + end: 30, + }; + + // Create a model that references the prop + let mut column_attributes = HashMap::new(); + column_attributes.insert( + "field.input".to_string(), + Value::String("${Text}".to_string()) + ); + + let mut columns = HashMap::new(); + columns.insert("name".to_string(), ColumnDefinition { + column_type: "String".to_string(), + required: true, + multiple: false, + attributes: column_attributes, + }); + + let model_node = AstNode::Model { + name: "User".to_string(), + mutable: false, + attributes: HashMap::new(), + columns, + start: 31, + end: 100, + }; + + let schema_node = AstNode::Schema { + body: vec![prop_node, model_node], + start: 0, + end: 100, + }; + + // Test with finalize=true (should resolve references) + let result = compiler.compile_final(&schema_node); + assert!(result.is_ok()); + + let final_schema = result.unwrap(); + + // Prop section should be removed in final schema + assert!(final_schema.model.is_some()); + + // The reference should be resolved in the final output + // This is a simplified test - in reality we'd need to check the actual structure + } +} diff --git a/packages/idea-parser/src/definitions.ts b/packages/idea-parser/src/definitions.ts deleted file mode 100644 index 658d1f4..0000000 --- a/packages/idea-parser/src/definitions.ts +++ /dev/null @@ -1,359 +0,0 @@ -import type { - Reader, - DataToken, - UnknownToken, - IdentifierToken -} from './types.js'; - -const definitions: Record = { - 'line': (code, index) => reader( - '_Line', - /^[\n\r]+$/, - code, - index - ), - 'space': (code, index) => scan( - '_Space', - /^[ ]+/, - code, - index - ), - 'whitespace': (code, index) => scan( - '_Whitespace', - /^\s+/, - code, - index - ), - 'note': (code, index) => reader( - '_Note', - //@ts-ignore - This regular expression flag is only - //available when targeting 'es2018' or later. - /^\/\*(?:(?!\*\/).)+\*\/$/s, - code, - index - ), - 'comment': (code, index) => scan( - '_Comment', - /^\/\/[^\n\r]*/, - code, - index - ), - ')': (code, index) => scan( - '_ParenClose', - /^\)/, - code, - index - ), - '(': (code, index) => scan( - '_ParenOpen', - /^\(/, - code, - index - ), - '}': (code, index) => scan( - '_BraceClose', - /^\}/, - code, - index - ), - '{': (code, index) => scan( - '_BraceOpen', - /^\{/, - code, - index - ), - ']': (code, index) => scan( - '_SquareClose', - /^\]/, - code, - index - ), - '[': (code, index) => scan( - '_SquareOpen', - /^\[/, - code, - index - ), - '!': (code, index) => scan( - '_Final', - /^!/, - code, - index - ), - 'Null': (code: string, index: number) => { - return code.substring(index, index + 4) === 'null' - ? { - type: 'Literal', - start: index, - end: index + 4, - value: null, - raw: 'null' - } : undefined; - }, - 'Boolean': (code, index) => { - if (code.substring(index, index + 4) === 'true') { - return { - type: 'Literal', - start: index, - end: index + 4, - value: true, - raw: 'true' - }; - } - if (code.substring(index, index + 5) === 'false') { - return { - type: 'Literal', - start: index, - end: index + 5, - value: false, - raw: 'false' - }; - } - return undefined; - }, - 'String': (code, index) => { - if (code.charAt(index) !== '"') { - return undefined; - } - - const end = code.indexOf('"', index + 1) + 1; - if (end < index) { - return undefined; - } - - const value = code.slice(index + 1, end - 1); - - return { - type: 'Literal', - start: index, - end, - value, - raw: `'${value}'` - }; - }, - 'Float': (code, start) => { - const match = code.slice(start).match(/^-?\d+\.\d+/); - if (match !== null && match.index === 0) { - const end = start + match[0].length; - const value = code.substring(start, end); - return { - type: 'Literal', - start, - end, - value: parseFloat(value), - raw: `${value}` - }; - } - - return undefined; - }, - 'Integer': (code, start) => { - const match = code.slice(start).match(/^-?[0-9]+/); - if (match !== null && match.index === 0) { - const end = start + match[0].length; - const value = code.substring(start, end); - return { - type: 'Literal', - start, - end, - value: parseInt(value), - raw: `${value}` - }; - } - return undefined; - }, - 'Array': (code, index, lexer) => { - const elements: DataToken[] = []; - const subparser = lexer.clone().load(code, index); - try { - subparser.expect('['); - subparser.optional('whitespace'); - while (subparser.next(data)) { - const value = subparser.expect(data) as DataToken; - subparser.optional('whitespace'); - elements.push(value); - } - subparser.expect(']'); - } catch(e) { - return undefined; - } - - return { - type: 'ArrayExpression', - start: index, - end: subparser.index, - elements - }; - }, - 'Object': (code, index, lexer) => { - const properties: any[] = []; - const subparser = lexer.clone().load(code, index); - try { - subparser.expect('{'); - subparser.optional('whitespace'); - while (subparser.next('AnyIdentifier')) { - const key = subparser.expect('AnyIdentifier'); - subparser.expect('whitespace'); - const value = subparser.expect(data); - subparser.optional('whitespace'); - properties.push({ - type: 'Property', - start: key.start, - end: value.end, - key: { - type: 'Identifier', - start: key.start, - end: key.end, - name: key.name - }, - value: value - }); - } - subparser.expect('}'); - } catch(e) { - return undefined; - } - return { - type: 'ObjectExpression', - start: index, - end: subparser.index, - properties - }; - }, - 'Environment': (code, index) => { - if (code.substring(index, index + 5) !== 'env("') { - return undefined; - } - - const end = code.indexOf('")', index + 5) + 2; - if (end < index) { - return undefined; - } - - const value = process.env[code.slice(index + 5, end - 2)] || ''; - - return { - type: 'Literal', - start: index, - end, - value, - raw: `'${value}'` - }; - }, - 'AnyIdentifier': (code, index) => identifier( - /^[a-z_][a-z0-9_]*/i, - code, - index - ), - 'UpperIdentifier': (code, index) => identifier( - /^[A-Z_][A-Z0-9_]*/i, - code, - index - ), - 'CapitalIdentifier': (code, index) => identifier( - /^[A-Z_][a-zA-Z0-9_]*/i, - code, - index - ), - 'CamelIdentifier': (code, index) => identifier( - /^[a-z_][a-zA-Z0-9_]*/, - code, - index - ), - 'LowerIdentifier': (code, index) => identifier( - /^[a-z_][a-z0-9_]*/i, - code, - index - ), - 'AttributeIdentifier': (code, start) => { - const match = code.slice(start).match(/^@[a-z](\.?[a-z0-9_]+)*/); - if (match !== null && match.index === 0) { - const end = start + match[0].length; - const name = code.substring(start, end); - return { type: 'Identifier', start, end, name }; - } - return undefined; - } -}; - -export const scalar = [ - 'Null', 'Boolean', 'String', - 'Float', 'Integer', 'Environment' -]; - -export const data = [ ...scalar, 'Object', 'Array' ]; - -export function scan( - type: string, - regexp: RegExp, - code: string, - start: number -): UnknownToken | undefined { - const match = code.slice(start).match(regexp); - if (match !== null && match.index === 0) { - const end = start + match[0].length; - const value = code.substring(start, end); - return { type, start, end, value, raw: value }; - } - - return undefined; -} - -export function reader( - type: string, - regexp: RegExp, - code: string, - index: number -): UnknownToken | undefined { - let value = ''; - let matched = false; - const start = index; - while (index < code.length) { - //get the character (and increment index afterwards) - const char = code.charAt(index++); - if (!regexp.test(value + char)) { - //if we never had a match - if (!matched) { - //add character to value anyways - value += char; - //let it keep parsing - continue; - } - //if we do not have a value - if (value.length === 0) { - return undefined; - } - //return where we ended - return { type, start, end: index - 1, value, raw: value }; - } - //add character to value - value += char; - //remember last match - matched = true; - } - //no more code... - //did it end with a match? - return matched && value.length - ? { type, start, end: index, value, raw: value } - : undefined; -} - -export function identifier( - regexp: RegExp, - code: string, - index: number -): IdentifierToken | undefined { - const results = scan('Identifier', regexp, code, index); - if (results) { - return { - type: 'Identifier', - start: results.start, - end: results.end, - name: results.value - }; - } - - return undefined; -} - -export default definitions; \ No newline at end of file diff --git a/packages/idea-parser/src/index.cjs.ts b/packages/idea-parser/src/index.cjs.ts new file mode 100644 index 0000000..4f78c13 --- /dev/null +++ b/packages/idea-parser/src/index.cjs.ts @@ -0,0 +1,329 @@ +// CommonJS wrapper for the native Rust parser +import { join } from 'path'; +import { existsSync, readFileSync } from 'fs'; + +// CJS environment - use global variables +const currentDir = __dirname; +const requireFunc = require; + +const { platform, arch } = process; + +let nativeBinding: any = null; +let localFileExisted = false; +let loadError: Error | null = null; + +function isMusl(): boolean { + // For Node 10 + if (!process.report || typeof process.report.getReport !== 'function') { + try { + const lddPath = requireFunc('child_process').execSync('which ldd').toString().trim(); + return readFileSync(lddPath, 'utf8').includes('musl'); + } catch (e) { + return true; + } + } else { + const report = process.report.getReport() as any; + const { glibcVersionRuntime } = report.header || {}; + return !glibcVersionRuntime; + } +} + +switch (platform) { + case 'android': + switch (arch) { + case 'arm64': + localFileExisted = existsSync(join(currentDir, 'idea-parser-rust.android-arm64.node')); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.android-arm64.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-android-arm64'); + } + } catch (e) { + loadError = e as Error; + } + break; + case 'arm': + localFileExisted = existsSync(join(currentDir, 'idea-parser-rust.android-arm-eabi.node')); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.android-arm-eabi.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-android-arm-eabi'); + } + } catch (e) { + loadError = e as Error; + } + break; + default: + throw new Error(`Unsupported architecture on Android ${arch}`); + } + break; + case 'win32': + switch (arch) { + case 'x64': + localFileExisted = existsSync( + join(currentDir, 'idea-parser-rust.win32-x64-msvc.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.win32-x64-msvc.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-win32-x64-msvc'); + } + } catch (e) { + loadError = e as Error; + } + break; + case 'ia32': + localFileExisted = existsSync( + join(currentDir, 'idea-parser-rust.win32-ia32-msvc.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.win32-ia32-msvc.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-win32-ia32-msvc'); + } + } catch (e) { + loadError = e as Error; + } + break; + case 'arm64': + localFileExisted = existsSync( + join(currentDir, 'idea-parser-rust.win32-arm64-msvc.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.win32-arm64-msvc.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-win32-arm64-msvc'); + } + } catch (e) { + loadError = e as Error; + } + break; + default: + throw new Error(`Unsupported architecture on Windows: ${arch}`); + } + break; + case 'darwin': + localFileExisted = existsSync(join(currentDir, 'idea-parser-rust.darwin-universal.node')); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.darwin-universal.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-darwin-universal'); + } + break; + } catch {} + switch (arch) { + case 'x64': + localFileExisted = existsSync(join(currentDir, 'idea-parser-rust.darwin-x64.node')); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.darwin-x64.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-darwin-x64'); + } + } catch (e) { + loadError = e as Error; + } + break; + case 'arm64': + localFileExisted = existsSync( + join(currentDir, 'idea-parser-rust.darwin-arm64.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.darwin-arm64.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-darwin-arm64'); + } + } catch (e) { + loadError = e as Error; + } + break; + default: + throw new Error(`Unsupported architecture on macOS: ${arch}`); + } + break; + case 'freebsd': + if (arch !== 'x64') { + throw new Error(`Unsupported architecture on FreeBSD: ${arch}`); + } + localFileExisted = existsSync(join(currentDir, 'idea-parser-rust.freebsd-x64.node')); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.freebsd-x64.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-freebsd-x64'); + } + } catch (e) { + loadError = e as Error; + } + break; + case 'linux': + switch (arch) { + case 'x64': + if (isMusl()) { + localFileExisted = existsSync( + join(currentDir, 'idea-parser-rust.linux-x64-musl.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.linux-x64-musl.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-linux-x64-musl'); + } + } catch (e) { + loadError = e as Error; + } + } else { + localFileExisted = existsSync( + join(currentDir, 'idea-parser-rust.linux-x64-gnu.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.linux-x64-gnu.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-linux-x64-gnu'); + } + } catch (e) { + loadError = e as Error; + } + } + break; + case 'arm64': + if (isMusl()) { + localFileExisted = existsSync( + join(currentDir, 'idea-parser-rust.linux-arm64-musl.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.linux-arm64-musl.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-linux-arm64-musl'); + } + } catch (e) { + loadError = e as Error; + } + } else { + localFileExisted = existsSync( + join(currentDir, 'idea-parser-rust.linux-arm64-gnu.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.linux-arm64-gnu.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-linux-arm64-gnu'); + } + } catch (e) { + loadError = e as Error; + } + } + break; + case 'arm': + if (isMusl()) { + localFileExisted = existsSync( + join(currentDir, 'idea-parser-rust.linux-arm-musleabihf.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.linux-arm-musleabihf.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-linux-arm-musleabihf'); + } + } catch (e) { + loadError = e as Error; + } + } else { + localFileExisted = existsSync( + join(currentDir, 'idea-parser-rust.linux-arm-gnueabihf.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.linux-arm-gnueabihf.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-linux-arm-gnueabihf'); + } + } catch (e) { + loadError = e as Error; + } + } + break; + case 'riscv64': + if (isMusl()) { + localFileExisted = existsSync( + join(currentDir, 'idea-parser-rust.linux-riscv64-musl.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.linux-riscv64-musl.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-linux-riscv64-musl'); + } + } catch (e) { + loadError = e as Error; + } + } else { + localFileExisted = existsSync( + join(currentDir, 'idea-parser-rust.linux-riscv64-gnu.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.linux-riscv64-gnu.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-linux-riscv64-gnu'); + } + } catch (e) { + loadError = e as Error; + } + } + break; + case 's390x': + localFileExisted = existsSync( + join(currentDir, 'idea-parser-rust.linux-s390x-gnu.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('./idea-parser-rust.linux-s390x-gnu.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-rust-linux-s390x-gnu'); + } + } catch (e) { + loadError = e as Error; + } + break; + default: + throw new Error(`Unsupported architecture on Linux: ${arch}`); + } + break; + default: + throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`); +} + +if (!nativeBinding) { + if (loadError) { + throw loadError; + } + throw new Error(`Failed to load native binding`); +} + +// Export the functions with proper TypeScript types +export const parse: (input: string) => any = nativeBinding.parse; +export const final: (input: any) => any = nativeBinding.final; + +// Default export for compatibility +export default { + parse, + final +}; + +// CommonJS exports +module.exports = { + parse: nativeBinding.parse, + final: nativeBinding.final +}; +module.exports.parse = nativeBinding.parse; +module.exports.final = nativeBinding.final; diff --git a/packages/idea-parser/src/index.ts b/packages/idea-parser/src/index.ts old mode 100644 new mode 100755 index b46938d..162ab37 --- a/packages/idea-parser/src/index.ts +++ b/packages/idea-parser/src/index.ts @@ -1,60 +1,340 @@ -export type { - Reader, - Definition, - UnknownToken, - ImportToken, - SchemaToken, - DeclarationToken, - DeclaratorToken, - IdentifierToken, - ObjectToken, - PropertyToken, - ArrayToken, - LiteralToken, - Token, - DataToken, - UseReferences, - Scalar, - Data, - Parser, - EnumConfig, - PluginConfig, - PropConfig, - ColumnConfig, - TypeConfig, - ModelConfig, - FinalSchemaConfig, - SchemaConfig -} from './types.js'; - -import AbstractTree from './trees/AbstractTree.js'; -import EnumTree from './trees/EnumTree.js'; -import PropTree from './trees/PropTree.js'; -import TypeTree from './trees/TypeTree.js'; -import ModelTree from './trees/ModelTree.js'; -import SchemaTree from './trees/SchemaTree.js'; -import PluginTree from './trees/PluginTree.js'; -import Exception from './Exception.js'; -import Lexer from './Lexer.js'; -import Compiler from './Compiler.js'; - -export { - Exception, - Lexer, - Compiler, - AbstractTree, - EnumTree, - PropTree, - TypeTree, - ModelTree, - SchemaTree, - PluginTree -}; +// TypeScript wrapper for the native Rust parser +import { createRequire } from 'node:module'; +import { fileURLToPath } from 'node:url'; +import path from 'node:path'; +import fs from 'node:fs'; + +// Handle both ESM and CJS environments +let currentDir: string; +let requireFunc: NodeRequire; + +// Check if we're in ESM or CJS environment +const isESM = typeof import.meta !== 'undefined'; + +if (isESM) { + // ESM environment + currentDir = path.dirname(fileURLToPath(import.meta.url)); + requireFunc = createRequire(import.meta.url); +} else { + // CJS environment - use global variables + currentDir = (globalThis as any).__dirname || __dirname; + requireFunc = (globalThis as any).require || require; +} + +const { platform, arch } = process; + +let nativeBinding: any = null; +let localFileExisted = false; +let loadError: Error | null = null; -export function final(code: string) { - return Compiler.final(SchemaTree.parse(code)); +function isMusl() { + // For Node 10 + if (!process.report || typeof process.report.getReport !== 'function') { + try { + const lddPath = requireFunc('child_process') + .execSync('which ldd') + .toString() + .trim(); + return fs.readFileSync(lddPath, 'utf8').includes('musl'); + } catch (e) { + return true; + } + } else { + const report = process.report.getReport() as any; + const { glibcVersionRuntime } = report.header || {}; + return !glibcVersionRuntime; + } } -export function parse(code: string) { - return Compiler.schema(SchemaTree.parse(code)); -} \ No newline at end of file +switch (platform) { + case 'android': + switch (arch) { + case 'arm64': + localFileExisted = fs.existsSync( + path.join(currentDir, 'idea-parser.android-arm64.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('../idea-parser.android-arm64.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-android-arm64'); + } + } catch (e) { + loadError = e as Error; + } + break; + case 'arm': + localFileExisted = fs.existsSync( + path.join(currentDir, 'idea-parser.android-arm-eabi.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('../idea-parser.android-arm-eabi.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-android-arm-eabi'); + } + } catch (e) { + loadError = e as Error; + } + break; + default: + throw new Error(`Unsupported architecture on Android ${arch}`); + } + break; + case 'win32': + switch (arch) { + case 'x64': + localFileExisted = fs.existsSync( + path.join(currentDir, 'idea-parser.win32-x64-msvc.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('../idea-parser.win32-x64-msvc.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-win32-x64-msvc'); + } + } catch (e) { + loadError = e as Error; + } + break; + case 'ia32': + localFileExisted = fs.existsSync( + path.join(currentDir, 'idea-parser.win32-ia32-msvc.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('../idea-parser.win32-ia32-msvc.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-win32-ia32-msvc'); + } + } catch (e) { + loadError = e as Error; + } + break; + case 'arm64': + localFileExisted = fs.existsSync( + path.join(currentDir, 'idea-parser.win32-arm64-msvc.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('../idea-parser.win32-arm64-msvc.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-win32-arm64-msvc'); + } + } catch (e) { + loadError = e as Error; + } + break; + default: + throw new Error(`Unsupported architecture on Windows: ${arch}`); + } + break; + case 'darwin': + switch (arch) { + case 'x64': + // Check for the file created by our postinstall script + localFileExisted = fs.existsSync( + path.join(currentDir, '..', 'idea-parser.x86_64-apple-darwin.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('../idea-parser.x86_64-apple-darwin.node'); + } else { + throw new Error('Native binary not found. Please run npm install to download the appropriate binary.'); + } + } catch (e) { + loadError = e as Error; + } + break; + case 'arm64': + // Check for the file created by our postinstall script + localFileExisted = fs.existsSync( + path.join(currentDir, '..', 'idea-parser.aarch64-apple-darwin.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('../idea-parser.aarch64-apple-darwin.node'); + } else { + throw new Error('Native binary not found. Please run npm install to download the appropriate binary.'); + } + } catch (e) { + loadError = e as Error; + } + break; + default: + throw new Error(`Unsupported architecture on macOS: ${arch}`); + } + break; + case 'freebsd': + if (arch !== 'x64') { + throw new Error(`Unsupported architecture on FreeBSD: ${arch}`); + } + localFileExisted = fs.existsSync( + path.join(currentDir, 'idea-parser.freebsd-x64.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('../idea-parser.freebsd-x64.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-freebsd-x64'); + } + } catch (e) { + loadError = e as Error; + } + break; + case 'linux': + switch (arch) { + case 'x64': + if (isMusl()) { + localFileExisted = fs.existsSync( + path.join(currentDir, 'idea-parser.linux-x64-musl.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('../idea-parser.linux-x64-musl.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-linux-x64-musl'); + } + } catch (e) { + loadError = e as Error; + } + } else { + localFileExisted = fs.existsSync( + path.join(currentDir, 'idea-parser.linux-x64-gnu.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('../idea-parser.linux-x64-gnu.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-linux-x64-gnu'); + } + } catch (e) { + loadError = e as Error; + } + } + break; + case 'arm64': + if (isMusl()) { + localFileExisted = fs.existsSync( + path.join(currentDir, 'idea-parser.linux-arm64-musl.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('../idea-parser.linux-arm64-musl.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-linux-arm64-musl'); + } + } catch (e) { + loadError = e as Error; + } + } else { + localFileExisted = fs.existsSync( + path.join(currentDir, 'idea-parser.linux-arm64-gnu.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('../idea-parser.linux-arm64-gnu.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-linux-arm64-gnu'); + } + } catch (e) { + loadError = e as Error; + } + } + break; + case 'arm': + if (isMusl()) { + localFileExisted = fs.existsSync( + path.join(currentDir, 'idea-parser.linux-arm-musleabihf.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('../idea-parser.linux-arm-musleabihf.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-linux-arm-musleabihf'); + } + } catch (e) { + loadError = e as Error; + } + } else { + localFileExisted = fs.existsSync( + path.join(currentDir, 'idea-parser.linux-arm-gnueabihf.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('../idea-parser.linux-arm-gnueabihf.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-linux-arm-gnueabihf'); + } + } catch (e) { + loadError = e as Error; + } + } + break; + case 'riscv64': + if (isMusl()) { + localFileExisted = fs.existsSync( + path.join(currentDir, 'idea-parser.linux-riscv64-musl.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('../idea-parser.linux-riscv64-musl.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-linux-riscv64-musl'); + } + } catch (e) { + loadError = e as Error; + } + } else { + localFileExisted = fs.existsSync( + path.join(currentDir, 'idea-parser.linux-riscv64-gnu.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('../idea-parser.linux-riscv64-gnu.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-linux-riscv64-gnu'); + } + } catch (e) { + loadError = e as Error; + } + } + break; + case 's390x': + localFileExisted = fs.existsSync( + path.join(currentDir, 'idea-parser.linux-s390x-gnu.node') + ); + try { + if (localFileExisted) { + nativeBinding = requireFunc('../idea-parser.linux-s390x-gnu.node'); + } else { + nativeBinding = requireFunc('@stackpress/idea-parser-linux-s390x-gnu'); + } + } catch (e) { + loadError = e as Error; + } + break; + default: + throw new Error(`Unsupported architecture on Linux: ${arch}`); + } + break; + default: + throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`); +} + +if (!nativeBinding) { + if (loadError) { + throw loadError; + } + throw new Error(`Failed to load native binding`); +} + +// Export the functions with proper TypeScript types +export const parse: (input: string) => any = nativeBinding.parse; +export const final: (input: any) => any = nativeBinding.final; + +// Default export for compatibility +export default { + parse, + final +}; diff --git a/packages/idea-parser/src/lexer.rs b/packages/idea-parser/src/lexer.rs new file mode 100755 index 0000000..6484784 --- /dev/null +++ b/packages/idea-parser/src/lexer.rs @@ -0,0 +1,477 @@ +// Lexical analyzer for the .idea schema language +// The lexer is responsible for breaking down raw text into meaningful tokens +// that can be consumed by the parser to build an Abstract Syntax Tree + +use std::fmt; + +/// Represents the different types of tokens that can appear in .idea schema files +/// Each variant corresponds to a specific language construct or literal value +#[derive(Debug, Clone, PartialEq)] +pub enum TokenType { + // Keywords - reserved words that have special meaning + Plugin, // "plugin" keyword + Use, // "use" keyword + Prop, // "prop" keyword + Enum, // "enum" keyword + Type, // "type" keyword + Model, // "model" keyword + + // Identifiers and literals + Identifier(String), // Variable names, type names, etc. + String(String), // String literals in quotes + Number(f64), // Numeric literals (integers and floats) + Boolean(bool), // true/false literals + Null, // null literal + + // Symbols and operators + LeftBrace, // { + RightBrace, // } + LeftBracket, // [ + RightBracket, // ] + LeftParen, // ( + RightParen, // ) + At, // @ (for attributes) + Dot, // . (for attribute paths like @field.input) + Question, // ? (for optional types) + Exclamation, // ! (for non-mergeable declarations) + + // Special tokens + Eof, // End of file marker +} + +/// Represents a single token with its type, value, and position information +/// Position tracking is crucial for providing meaningful error messages +#[derive(Debug, Clone)] +pub struct Token { + pub token_type: TokenType, + pub start: usize, // Starting position in the source code + pub end: usize, // Ending position in the source code +} + +impl Token { + /// Create a new token with position information + pub fn new(token_type: TokenType, _lexeme: String, start: usize, end: usize) -> Self { + Self { + token_type, + start, + end, + } + } +} + +/// The main lexer structure that processes source code character by character +/// and produces a stream of tokens for the parser to consume +pub struct Lexer<'a> { + input: &'a str, // The source code being tokenized + current: usize, // Current position in the input + start: usize, // Start position of the current token being built +} + +impl<'a> Lexer<'a> { + /// Create a new lexer for the given input string + /// + /// # Arguments + /// * `input` - The source code to tokenize + /// + /// # Returns + /// A new Lexer instance ready to process the input + pub fn new(input: &'a str) -> Self { + Self { + input, + current: 0, + start: 0, + } + } + + /// Check if we've reached the end of the input + /// This is used throughout the lexer to prevent reading past the end + fn is_at_end(&self) -> bool { + self.current >= self.input.len() + } + + /// Get the current character without advancing the position + /// Returns None if we're at the end of input + fn peek(&self) -> Option { + if self.is_at_end() { + None + } else { + self.input.chars().nth(self.current) + } + } + + /// Get the next character without advancing the position + /// This is useful for lookahead when we need to check what comes after the current character + fn peek_next(&self) -> Option { + if self.current + 1 >= self.input.len() { + None + } else { + self.input.chars().nth(self.current + 1) + } + } + + /// Consume and return the current character, advancing the position + /// Returns None if we're at the end of input + fn advance(&mut self) -> Option { + if self.is_at_end() { + None + } else { + let ch = self.input.chars().nth(self.current); + self.current += 1; + ch + } + } + + /// Check if the current character matches the expected character + /// If it matches, consume it and return true; otherwise return false + fn match_char(&mut self, expected: char) -> bool { + if self.is_at_end() { + return false; + } + + if let Some(ch) = self.peek() { + if ch == expected { + self.advance(); + return true; + } + } + + false + } + + /// Create a token from the current lexeme (text between start and current positions) + fn make_token(&self, token_type: TokenType) -> Token { + let lexeme = self.input[self.start..self.current].to_string(); + Token::new(token_type, lexeme, self.start, self.current) + } + + /// Create an error token with a custom message + /// This is used when the lexer encounters invalid input + fn error_token(&self, message: &str) -> Token { + Token::new( + TokenType::Identifier(message.to_string()), + message.to_string(), + self.start, + self.current, + ) + } + + /// Skip whitespace characters (spaces, tabs, newlines) + /// Whitespace is generally not significant in .idea files except for separating tokens + fn skip_whitespace(&mut self) { + loop { + match self.peek() { + Some(' ') | Some('\r') | Some('\t') | Some('\n') => { + self.advance(); + } + _ => break, + } + } + } + + /// Parse a string literal enclosed in double quotes + /// Handles escape sequences and reports errors for unterminated strings + fn string(&mut self) -> Token { + // Keep consuming characters until we find the closing quote + while let Some(ch) = self.peek() { + if ch == '"' { + break; + } + + // Handle escape sequences + if ch == '\\' { + self.advance(); // Skip the backslash + self.advance(); // Skip the escaped character + } else { + self.advance(); + } + } + + // Check if we found the closing quote + if self.is_at_end() { + return self.error_token("Unterminated string"); + } + + // Consume the closing quote + self.advance(); + + // Extract the string content (without the quotes) + let value = self.input[self.start + 1..self.current - 1].to_string(); + Token::new(TokenType::String(value.clone()), value, self.start, self.current) + } + + /// Parse a numeric literal (integer or floating-point) + /// Supports both integers (42) and floats (3.14) + fn number(&mut self) -> Token { + // Consume all digits + while let Some(ch) = self.peek() { + if ch.is_ascii_digit() { + self.advance(); + } else { + break; + } + } + + // Check for decimal point + if let Some('.') = self.peek() { + if let Some(next_ch) = self.peek_next() { + if next_ch.is_ascii_digit() { + // Consume the decimal point + self.advance(); + + // Consume fractional digits + while let Some(ch) = self.peek() { + if ch.is_ascii_digit() { + self.advance(); + } else { + break; + } + } + } + } + } + + // Parse the number value + let lexeme = &self.input[self.start..self.current]; + match lexeme.parse::() { + Ok(value) => Token::new(TokenType::Number(value), lexeme.to_string(), self.start, self.current), + Err(_) => self.error_token("Invalid number"), + } + } + + /// Parse an identifier or keyword + /// Identifiers start with a letter or underscore and can contain letters, digits, and underscores + /// Some identifiers are recognized as keywords (plugin, use, prop, enum, type, model) + fn identifier(&mut self) -> Token { + // Consume all valid identifier characters + while let Some(ch) = self.peek() { + if ch.is_alphanumeric() || ch == '_' { + self.advance(); + } else { + break; + } + } + + let text = &self.input[self.start..self.current]; + + // Check if this identifier is actually a keyword + let token_type = match text { + "plugin" => TokenType::Plugin, + "use" => TokenType::Use, + "prop" => TokenType::Prop, + "enum" => TokenType::Enum, + "type" => TokenType::Type, + "model" => TokenType::Model, + "true" => TokenType::Boolean(true), + "false" => TokenType::Boolean(false), + "null" => TokenType::Null, + _ => TokenType::Identifier(text.to_string()), + }; + + Token::new(token_type, text.to_string(), self.start, self.current) + } + + /// Skip a single-line comment that starts with // + /// Comments extend to the end of the line + fn skip_line_comment(&mut self) { + while let Some(ch) = self.peek() { + if ch == '\n' { + break; + } + self.advance(); + } + } + + /// Skip a block comment that starts with /* and ends with */ + /// Block comments can span multiple lines and can be nested + fn skip_block_comment(&mut self) -> Result<(), String> { + let mut depth = 1; // Track nesting depth + + while depth > 0 && !self.is_at_end() { + match self.peek() { + Some('/') if self.peek_next() == Some('*') => { + // Found start of nested comment + self.advance(); // consume '/' + self.advance(); // consume '*' + depth += 1; + } + Some('*') if self.peek_next() == Some('/') => { + // Found end of comment + self.advance(); // consume '*' + self.advance(); // consume '/' + depth -= 1; + } + _ => { + self.advance(); + } + } + } + + if depth > 0 { + Err("Unterminated block comment".to_string()) + } else { + Ok(()) + } + } + + /// Get the next token from the input stream + /// This is the main entry point for tokenization + /// + /// # Returns + /// The next token in the input, or an EOF token if we've reached the end + pub fn next_token(&mut self) -> Token { + // Skip any leading whitespace + self.skip_whitespace(); + + // Mark the start of the new token + self.start = self.current; + + // Check if we've reached the end of input + if self.is_at_end() { + return self.make_token(TokenType::Eof); + } + + // Get the current character and decide what kind of token to create + if let Some(ch) = self.advance() { + match ch { + // Single-character tokens + '{' => self.make_token(TokenType::LeftBrace), + '}' => self.make_token(TokenType::RightBrace), + '[' => self.make_token(TokenType::LeftBracket), + ']' => self.make_token(TokenType::RightBracket), + '(' => self.make_token(TokenType::LeftParen), + ')' => self.make_token(TokenType::RightParen), + '@' => self.make_token(TokenType::At), + '.' => self.make_token(TokenType::Dot), + '?' => self.make_token(TokenType::Question), + '!' => self.make_token(TokenType::Exclamation), + + // String literals + '"' => self.string(), + + // Comments + '/' => { + if self.match_char('/') { + // Single-line comment + self.skip_line_comment(); + self.next_token() // Recursively get the next token after the comment + } else if self.match_char('*') { + // Block comment + match self.skip_block_comment() { + Ok(()) => self.next_token(), // Recursively get the next token after the comment + Err(msg) => self.error_token(&msg), + } + } else { + self.error_token("Unexpected character") + } + } + + // Numbers + ch if ch.is_ascii_digit() => self.number(), + + // Identifiers and keywords + ch if ch.is_alphabetic() || ch == '_' => self.identifier(), + + // Unexpected character + _ => self.error_token(&format!("Unexpected character: {}", ch)), + } + } else { + self.make_token(TokenType::Eof) + } + } + +} + +/// Implement Display for TokenType to make debugging easier +impl fmt::Display for TokenType { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + TokenType::Plugin => write!(f, "PLUGIN"), + TokenType::Use => write!(f, "USE"), + TokenType::Prop => write!(f, "PROP"), + TokenType::Enum => write!(f, "ENUM"), + TokenType::Type => write!(f, "TYPE"), + TokenType::Model => write!(f, "MODEL"), + TokenType::Identifier(name) => write!(f, "IDENTIFIER({})", name), + TokenType::String(value) => write!(f, "STRING({})", value), + TokenType::Number(value) => write!(f, "NUMBER({})", value), + TokenType::Boolean(value) => write!(f, "BOOLEAN({})", value), + TokenType::Null => write!(f, "NULL"), + TokenType::LeftBrace => write!(f, "{{"), + TokenType::RightBrace => write!(f, "}}"), + TokenType::LeftBracket => write!(f, "["), + TokenType::RightBracket => write!(f, "]"), + TokenType::LeftParen => write!(f, "("), + TokenType::RightParen => write!(f, ")"), + TokenType::At => write!(f, "@"), + TokenType::Dot => write!(f, "."), + TokenType::Question => write!(f, "?"), + TokenType::Exclamation => write!(f, "!"), + TokenType::Eof => write!(f, "EOF"), + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_basic_tokens() { + let mut lexer = Lexer::new("{ } [ ] ( ) @ . ? !"); + + assert!(matches!(lexer.next_token().token_type, TokenType::LeftBrace)); + assert!(matches!(lexer.next_token().token_type, TokenType::RightBrace)); + assert!(matches!(lexer.next_token().token_type, TokenType::LeftBracket)); + assert!(matches!(lexer.next_token().token_type, TokenType::RightBracket)); + assert!(matches!(lexer.next_token().token_type, TokenType::LeftParen)); + assert!(matches!(lexer.next_token().token_type, TokenType::RightParen)); + assert!(matches!(lexer.next_token().token_type, TokenType::At)); + assert!(matches!(lexer.next_token().token_type, TokenType::Dot)); + assert!(matches!(lexer.next_token().token_type, TokenType::Question)); + assert!(matches!(lexer.next_token().token_type, TokenType::Exclamation)); + assert!(matches!(lexer.next_token().token_type, TokenType::Eof)); + } + + #[test] + fn test_keywords() { + let mut lexer = Lexer::new("plugin use prop enum type model"); + + assert!(matches!(lexer.next_token().token_type, TokenType::Plugin)); + assert!(matches!(lexer.next_token().token_type, TokenType::Use)); + assert!(matches!(lexer.next_token().token_type, TokenType::Prop)); + assert!(matches!(lexer.next_token().token_type, TokenType::Enum)); + assert!(matches!(lexer.next_token().token_type, TokenType::Type)); + assert!(matches!(lexer.next_token().token_type, TokenType::Model)); + } + + #[test] + fn test_string_literal() { + let mut lexer = Lexer::new(r#""hello world""#); + let token = lexer.next_token(); + + if let TokenType::String(value) = token.token_type { + assert_eq!(value, "hello world"); + } else { + panic!("Expected string token"); + } + } + + #[test] + fn test_number_literal() { + let mut lexer = Lexer::new("42 3.14"); + + let token1 = lexer.next_token(); + if let TokenType::Number(value) = token1.token_type { + assert_eq!(value, 42.0); + } else { + panic!("Expected number token"); + } + + let token2 = lexer.next_token(); + if let TokenType::Number(value) = token2.token_type { + assert_eq!(value, 3.14); + } else { + panic!("Expected number token"); + } + } +} diff --git a/packages/idea-parser/src/lib.rs b/packages/idea-parser/src/lib.rs new file mode 100755 index 0000000..fc1d4bd --- /dev/null +++ b/packages/idea-parser/src/lib.rs @@ -0,0 +1,233 @@ +// Main library entry point for the Idea Parser Rust implementation +// This module provides the core functionality to parse .idea schema files +// and compile them into JSON configurations that can be consumed by Node.js + +use napi::bindgen_prelude::*; +use napi_derive::napi; +use serde::{Deserialize, Serialize}; +use serde_json::Value; +use std::collections::HashMap; + +// Import our custom modules for lexical analysis, parsing, and compilation +mod lexer; +mod parser; +mod compiler; + +use lexer::Lexer; +use parser::SchemaParser; +use compiler::Compiler; + +/// Represents a complete schema configuration with all possible sections +/// This structure mirrors the TypeScript SchemaConfig interface and includes +/// optional sections for plugins, imports (use), props, enums, types, and models +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct SchemaConfig { + /// Plugin configurations - external tools and integrations + #[serde(skip_serializing_if = "Option::is_none")] + pub plugin: Option>, + + /// Import statements - references to other schema files + /// Note: Using r#use because 'use' is a Rust keyword + #[serde(skip_serializing_if = "Option::is_none")] + pub r#use: Option>, + + /// Prop definitions - reusable property configurations + #[serde(skip_serializing_if = "Option::is_none")] + pub prop: Option>, + + /// Enum definitions - named constants with display values + /// Note: Using r#enum because 'enum' is a Rust keyword + #[serde(skip_serializing_if = "Option::is_none")] + pub r#enum: Option>>, + + /// Type definitions - custom data structures + #[serde(skip_serializing_if = "Option::is_none")] + pub r#type: Option>, + + /// Model definitions - database entities and their relationships + #[serde(skip_serializing_if = "Option::is_none")] + pub model: Option>, +} + +/// Represents the final schema configuration with references resolved +/// This is similar to SchemaConfig but excludes 'use' and 'prop' sections +/// since they are processed and their references are resolved inline +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct FinalSchemaConfig { + /// Plugin configurations remain unchanged in final output + #[serde(skip_serializing_if = "Option::is_none")] + pub plugin: Option>, + + /// Enum definitions with resolved references + #[serde(skip_serializing_if = "Option::is_none")] + pub r#enum: Option>>, + + /// Type definitions with prop references resolved inline + #[serde(skip_serializing_if = "Option::is_none")] + pub r#type: Option>, + + /// Model definitions with prop references resolved inline + #[serde(skip_serializing_if = "Option::is_none")] + pub model: Option>, +} + +/// Parse schema code into JSON configuration with references preserved +/// +/// This function takes raw .idea schema code as input and returns a JSON string +/// containing the parsed schema with all references (props, use statements) intact. +/// This is equivalent to the TypeScript `parse()` function. +/// +/// # Arguments +/// * `code` - The raw .idea schema code as a string +/// +/// # Returns +/// * `Result` - JSON string representation of the parsed schema, or an error +/// +/// # Example +/// ```javascript +/// const result = parse(` +/// prop Text { type "text" } +/// model User { name String @field.input(Text) } +/// `); +/// // Returns JSON with prop references preserved +/// ``` +#[napi] +pub fn parse(code: String) -> Result { + // Step 1: Create a lexer to tokenize the input code + // The lexer breaks down the raw text into meaningful tokens + let mut lexer = Lexer::new(&code); + + // Step 2: Create a parser that will build an Abstract Syntax Tree (AST) + // The parser understands the grammar rules of the .idea language + let mut parser = SchemaParser::new(&mut lexer); + + // Step 3: Parse the code into an AST + match parser.parse_schema() { + Ok(ast) => { + // Step 4: Create a compiler to convert the AST into our target format + let compiler = Compiler::new(); + + // Step 5: Compile the AST into a SchemaConfig structure + // The 'false' parameter means we preserve references (don't finalize) + match compiler.compile_schema(&ast, false) { + Ok(schema) => { + // Step 6: Serialize the schema to JSON string for Node.js consumption + match serde_json::to_string(&schema) { + Ok(json) => Ok(json), + Err(e) => Err(Error::new( + Status::GenericFailure, + format!("Failed to serialize schema: {}", e) + )) + } + } + Err(e) => Err(Error::new( + Status::GenericFailure, + format!("Compilation error: {}", e) + )) + } + } + Err(e) => Err(Error::new( + Status::GenericFailure, + format!("Parse error: {}", e) + )) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use std::env; + + #[test] + fn test_env_variable_parsing() { + // Set a test environment variable + env::set_var("TEST_DATABASE_URL", "postgresql://localhost:5432/test"); + + let schema_code = r#" +plugin "./custom-plugin" { + provider "custom-client-js" + url env(TEST_DATABASE_URL) + previewFeatures ["fullTextSearch"] +} +"#; + + let result = parse(schema_code.to_string()); + assert!(result.is_ok()); + + let json = result.unwrap(); + let parsed: serde_json::Value = serde_json::from_str(&json).unwrap(); + + // Check if the environment variable was resolved + let plugin = parsed.get("plugin").unwrap(); + let custom_plugin = plugin.get("./custom-plugin").unwrap(); + let url = custom_plugin.get("url").unwrap(); + + assert_eq!(url.as_str().unwrap(), "postgresql://localhost:5432/test"); + + // Clean up + env::remove_var("TEST_DATABASE_URL"); + } +} + +/// Parse schema code into final JSON configuration with references resolved and removed +/// +/// This function is similar to `parse()` but performs additional processing: +/// 1. Resolves all prop references inline +/// 2. Removes the 'prop' and 'use' sections from the output +/// 3. Returns a clean, final configuration ready for consumption +/// +/// This is equivalent to the TypeScript `final()` function. +/// +/// # Arguments +/// * `code` - The raw .idea schema code as a string +/// +/// # Returns +/// * `Result` - JSON string representation of the final schema, or an error +/// +/// # Example +/// ```javascript +/// const result = final(` +/// prop Text { type "text" } +/// model User { name String @field.input(Text) } +/// `); +/// // Returns JSON with prop references resolved and prop section removed +/// ``` +#[napi(js_name = "final")] +pub fn final_schema(code: String) -> Result { + // Step 1: Create a lexer to tokenize the input code + let mut lexer = Lexer::new(&code); + + // Step 2: Create a parser to build the AST + let mut parser = SchemaParser::new(&mut lexer); + + // Step 3: Parse the code into an AST + match parser.parse_schema() { + Ok(ast) => { + // Step 4: Create a compiler for final processing + let compiler = Compiler::new(); + + // Step 5: Compile the AST into a final configuration + // This resolves all references and removes prop/use sections + match compiler.compile_final(&ast) { + Ok(schema) => { + // Step 6: Serialize the final schema to JSON + match serde_json::to_string(&schema) { + Ok(json) => Ok(json), + Err(e) => Err(Error::new( + Status::GenericFailure, + format!("Failed to serialize schema: {}", e) + )) + } + } + Err(e) => Err(Error::new( + Status::GenericFailure, + format!("Compilation error: {}", e) + )) + } + } + Err(e) => Err(Error::new( + Status::GenericFailure, + format!("Parse error: {}", e) + )) + } +} diff --git a/packages/idea-parser/src/parser.rs b/packages/idea-parser/src/parser.rs new file mode 100755 index 0000000..5f314d9 --- /dev/null +++ b/packages/idea-parser/src/parser.rs @@ -0,0 +1,802 @@ +// Parser for the .idea schema language +// The parser takes tokens from the lexer and builds an Abstract Syntax Tree (AST) +// that represents the structure and meaning of the schema code + +use crate::lexer::{Lexer, Token, TokenType}; +use serde::{Deserialize, Serialize}; +use serde_json::Value; +use std::collections::HashMap; + +/// Represents different types of AST nodes that can appear in a schema +/// Each variant corresponds to a major language construct +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(tag = "type")] +pub enum AstNode { + /// The root node representing the entire schema file + Schema { + body: Vec, + start: usize, + end: usize, + }, + + /// Plugin declaration: plugin "path" { config } + Plugin { + name: String, + config: HashMap, + start: usize, + end: usize, + }, + + /// Use/import declaration: use "path" + Use { + path: String, + start: usize, + end: usize, + }, + + /// Prop declaration: prop Name { config } + Prop { + name: String, + config: HashMap, + start: usize, + end: usize, + }, + + /// Enum declaration: enum Name { KEY "Value" } + Enum { + name: String, + variants: HashMap, + start: usize, + end: usize, + }, + + /// Type declaration: type Name { columns } + Type { + name: String, + mutable: bool, + attributes: HashMap, + columns: HashMap, + start: usize, + end: usize, + }, + + /// Model declaration: model Name { columns } + Model { + name: String, + mutable: bool, + attributes: HashMap, + columns: HashMap, + start: usize, + end: usize, + }, +} + +/// Represents a column definition within a type or model +/// Contains the column's data type, attributes, and metadata +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ColumnDefinition { + pub column_type: String, // The data type (String, Number, etc.) + pub required: bool, // Whether the column is required (!optional) + pub multiple: bool, // Whether it's an array type ([]) + pub attributes: HashMap, // Attributes like @id, @default, etc. +} + +/// Represents an attribute applied to a declaration or column +/// Attributes start with @ and can have parameters +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct Attribute { + pub name: String, // The attribute name (e.g., "field.input") + pub parameters: Vec, // Parameters passed to the attribute +} + +/// The main parser structure that processes tokens and builds the AST +/// It maintains state about the current position and provides error handling +pub struct SchemaParser<'a> { + lexer: &'a mut Lexer<'a>, // Reference to the lexer for getting tokens + current_token: Token, // The current token being processed + previous_token: Token, // The previous token (for error reporting) +} + +impl<'a> SchemaParser<'a> { + /// Create a new parser with the given lexer + /// + /// # Arguments + /// * `lexer` - A mutable reference to the lexer that will provide tokens + /// + /// # Returns + /// A new SchemaParser instance ready to parse the input + pub fn new(lexer: &'a mut Lexer<'a>) -> Self { + // Get the first token to initialize the parser state + let first_token = lexer.next_token(); + + Self { + lexer, + current_token: first_token.clone(), + previous_token: first_token, + } + } + + /// Advance to the next token in the input stream + /// This updates both current_token and previous_token + fn advance(&mut self) { + self.previous_token = self.current_token.clone(); + self.current_token = self.lexer.next_token(); + } + + /// Check if the current token matches the expected type + /// If it matches, consume it and return true; otherwise return false + fn match_token(&mut self, token_type: &TokenType) -> bool { + if std::mem::discriminant(&self.current_token.token_type) == std::mem::discriminant(token_type) { + self.advance(); + true + } else { + false + } + } + + /// Expect a specific token type and consume it + /// If the token doesn't match, return an error with a helpful message + fn expect_token(&mut self, expected: TokenType) -> Result { + if std::mem::discriminant(&self.current_token.token_type) == std::mem::discriminant(&expected) { + let token = self.current_token.clone(); + self.advance(); + Ok(token) + } else { + Err(format!( + "Expected {:?}, but found {:?} at position {}", + expected, self.current_token.token_type, self.current_token.start + )) + } + } + + /// Check if we've reached the end of the input + fn is_at_end(&self) -> bool { + matches!(self.current_token.token_type, TokenType::Eof) + } + + /// Parse the entire schema file + /// This is the main entry point for parsing + /// + /// # Returns + /// An AstNode representing the entire schema, or an error if parsing fails + pub fn parse_schema(&mut self) -> Result { + let start = self.current_token.start; + let mut body = Vec::new(); + + // Parse all top-level declarations until we reach the end of file + while !self.is_at_end() { + match self.parse_declaration() { + Ok(node) => body.push(node), + Err(e) => return Err(e), + } + } + + let end = self.previous_token.end; + + Ok(AstNode::Schema { body, start, end }) + } + + /// Parse a top-level declaration (plugin, use, prop, enum, type, or model) + /// This function dispatches to the appropriate parsing method based on the current token + fn parse_declaration(&mut self) -> Result { + match &self.current_token.token_type { + TokenType::Plugin => self.parse_plugin(), + TokenType::Use => self.parse_use(), + TokenType::Prop => self.parse_prop(), + TokenType::Enum => self.parse_enum(), + TokenType::Type => self.parse_type(), + TokenType::Model => self.parse_model(), + _ => Err(format!( + "Unexpected token {:?} at position {}. Expected a declaration keyword.", + self.current_token.token_type, self.current_token.start + )), + } + } + + /// Parse a plugin declaration: plugin "path" { config } + /// Plugins define external tools and integrations + fn parse_plugin(&mut self) -> Result { + let start = self.current_token.start; + + // Consume the 'plugin' keyword + self.expect_token(TokenType::Plugin)?; + + // Parse the plugin path (must be a string literal) + let name = match &self.current_token.token_type { + TokenType::String(path) => { + let path = path.clone(); + self.advance(); + path + } + _ => return Err(format!( + "Expected plugin path string at position {}", + self.current_token.start + )), + }; + + // Parse the configuration object + let config = self.parse_object()?; + let end = self.previous_token.end; + + Ok(AstNode::Plugin { + name, + config, + start, + end, + }) + } + + /// Parse a use declaration: use "path" + /// Use statements import definitions from other schema files + fn parse_use(&mut self) -> Result { + let start = self.current_token.start; + + // Consume the 'use' keyword + self.expect_token(TokenType::Use)?; + + // Parse the import path (must be a string literal) + let path = match &self.current_token.token_type { + TokenType::String(path) => { + let path = path.clone(); + self.advance(); + path + } + _ => return Err(format!( + "Expected import path string at position {}", + self.current_token.start + )), + }; + + let end = self.previous_token.end; + + Ok(AstNode::Use { path, start, end }) + } + + /// Parse a prop declaration: prop Name { config } + /// Props define reusable property configurations + fn parse_prop(&mut self) -> Result { + let start = self.current_token.start; + + // Consume the 'prop' keyword + self.expect_token(TokenType::Prop)?; + + // Parse the prop name (must be an identifier) + let name = match &self.current_token.token_type { + TokenType::Identifier(name) => { + let name = name.clone(); + self.advance(); + name + } + _ => return Err(format!( + "Expected prop name at position {}", + self.current_token.start + )), + }; + + // Parse the configuration object + let config = self.parse_object()?; + let end = self.previous_token.end; + + Ok(AstNode::Prop { + name, + config, + start, + end, + }) + } + + /// Parse an enum declaration: enum Name { KEY "Value" } + /// Enums define named constants with display values + fn parse_enum(&mut self) -> Result { + let start = self.current_token.start; + + // Consume the 'enum' keyword + self.expect_token(TokenType::Enum)?; + + // Parse the enum name (must be an identifier) + let name = match &self.current_token.token_type { + TokenType::Identifier(name) => { + let name = name.clone(); + self.advance(); + name + } + _ => return Err(format!( + "Expected enum name at position {}", + self.current_token.start + )), + }; + + // Parse the enum variants as key-value pairs + self.expect_token(TokenType::LeftBrace)?; + let mut variants = HashMap::new(); + + while !self.match_token(&TokenType::RightBrace) { + if self.is_at_end() { + return Err("Unexpected end of file in enum declaration".to_string()); + } + + // Parse enum variant: KEY "Value" + let key = match &self.current_token.token_type { + TokenType::Identifier(key) => { + let key = key.clone(); + self.advance(); + key + } + _ => return Err(format!( + "Expected enum variant key at position {}", + self.current_token.start + )), + }; + + let value = self.parse_value()?; + variants.insert(key, value); + } + + let end = self.previous_token.end; + + Ok(AstNode::Enum { + name, + variants, + start, + end, + }) + } + + /// Parse a type declaration: type Name { columns } + /// Types define custom data structures with columns + fn parse_type(&mut self) -> Result { + let start = self.current_token.start; + + // Consume the 'type' keyword + self.expect_token(TokenType::Type)?; + + // Parse the type name (must be an identifier) + let name = match &self.current_token.token_type { + TokenType::Identifier(name) => { + let name = name.clone(); + self.advance(); + name + } + _ => return Err(format!( + "Expected type name at position {}", + self.current_token.start + )), + }; + + // Check for mutability modifier (! means non-mergeable/immutable) + let mutable = !self.match_token(&TokenType::Exclamation); + + // Parse attributes (like @label("Type" "Types")) + let attributes = self.parse_attributes()?; + + // Parse the type body with columns + let columns = self.parse_columns()?; + let end = self.previous_token.end; + + Ok(AstNode::Type { + name, + mutable, + attributes, + columns, + start, + end, + }) + } + + /// Parse a model declaration: model Name { columns } + /// Models define database entities and their relationships + fn parse_model(&mut self) -> Result { + let start = self.current_token.start; + + // Consume the 'model' keyword + self.expect_token(TokenType::Model)?; + + // Parse the model name (must be an identifier) + let name = match &self.current_token.token_type { + TokenType::Identifier(name) => { + let name = name.clone(); + self.advance(); + name + } + _ => return Err(format!( + "Expected model name at position {}", + self.current_token.start + )), + }; + + // Check for mutability modifier (! means non-mergeable/immutable) + let mutable = !self.match_token(&TokenType::Exclamation); + + // Parse attributes (like @label("User" "Users")) + let attributes = self.parse_attributes()?; + + // Parse the model body with columns + let columns = self.parse_columns()?; + let end = self.previous_token.end; + + Ok(AstNode::Model { + name, + mutable, + attributes, + columns, + start, + end, + }) + } + + /// Parse attributes that can be applied to declarations + /// Attributes start with @ and can have parameters: @label("Name") + fn parse_attributes(&mut self) -> Result, String> { + let mut attributes = HashMap::new(); + + // Parse all attributes that appear before the opening brace + while self.match_token(&TokenType::At) { + let attr = self.parse_attribute()?; + attributes.insert(attr.name, Value::Array(attr.parameters)); + } + + Ok(attributes) + } + + /// Parse a single attribute: @name or @name(params) + fn parse_attribute(&mut self) -> Result { + // Parse the attribute name (can include dots like @field.input) + let mut name_parts = Vec::new(); + + // First part must be an identifier + match &self.current_token.token_type { + TokenType::Identifier(part) => { + name_parts.push(part.clone()); + self.advance(); + } + _ => return Err(format!( + "Expected attribute name at position {}", + self.current_token.start + )), + } + + // Handle dotted attribute names like @field.input + while self.match_token(&TokenType::Dot) { + match &self.current_token.token_type { + TokenType::Identifier(part) => { + name_parts.push(part.clone()); + self.advance(); + } + _ => return Err(format!( + "Expected attribute name part after dot at position {}", + self.current_token.start + )), + } + } + + let name = name_parts.join("."); + let mut parameters = Vec::new(); + + // Parse optional parameters: @name(param1, param2) + if self.match_token(&TokenType::LeftParen) { + while !self.match_token(&TokenType::RightParen) { + if self.is_at_end() { + return Err("Unexpected end of file in attribute parameters".to_string()); + } + + let param = self.parse_value()?; + parameters.push(param); + } + } + + Ok(Attribute { name, parameters }) + } + + /// Parse columns within a type or model body + /// Columns define the fields and their types: name Type @attributes + fn parse_columns(&mut self) -> Result, String> { + self.expect_token(TokenType::LeftBrace)?; + let mut columns = HashMap::new(); + + while !self.match_token(&TokenType::RightBrace) { + if self.is_at_end() { + return Err("Unexpected end of file in column definitions".to_string()); + } + + // Parse column definition: name Type @attributes + let column_name = match &self.current_token.token_type { + TokenType::Identifier(name) => { + let name = name.clone(); + self.advance(); + name + } + _ => return Err(format!( + "Expected column name at position {}", + self.current_token.start + )), + }; + + // Parse the column type (can include modifiers like ? and []) + let (column_type, required, multiple) = self.parse_column_type()?; + + // Parse column attributes + let attributes = self.parse_attributes()?; + + let column_def = ColumnDefinition { + column_type, + required, + multiple, + attributes, + }; + + columns.insert(column_name, column_def); + } + + Ok(columns) + } + + /// Parse a column type with optional modifiers + /// Examples: String, String?, String[], String[]? + fn parse_column_type(&mut self) -> Result<(String, bool, bool), String> { + // Parse the base type name + let base_type = match &self.current_token.token_type { + TokenType::Identifier(type_name) => { + let type_name = type_name.clone(); + self.advance(); + type_name + } + _ => return Err(format!( + "Expected type name at position {}", + self.current_token.start + )), + }; + + // Check for array modifier [] + let multiple = self.match_token(&TokenType::LeftBracket) && { + self.expect_token(TokenType::RightBracket)?; + true + }; + + // Check for optional modifier ? + let required = !self.match_token(&TokenType::Question); + + Ok((base_type, required, multiple)) + } + + /// Parse an object literal: { key value key value } + /// Objects in .idea files don't use colons or commas + fn parse_object(&mut self) -> Result, String> { + self.expect_token(TokenType::LeftBrace)?; + let mut object = HashMap::new(); + + while !self.match_token(&TokenType::RightBrace) { + if self.is_at_end() { + return Err("Unexpected end of file in object".to_string()); + } + + // Parse key (can be an identifier or keyword) + let key = match &self.current_token.token_type { + TokenType::Identifier(key) => { + let key = key.clone(); + self.advance(); + key + } + // Allow keywords as object keys + TokenType::Plugin => { + self.advance(); + "plugin".to_string() + } + TokenType::Use => { + self.advance(); + "use".to_string() + } + TokenType::Prop => { + self.advance(); + "prop".to_string() + } + TokenType::Enum => { + self.advance(); + "enum".to_string() + } + TokenType::Type => { + self.advance(); + "type".to_string() + } + TokenType::Model => { + self.advance(); + "model".to_string() + } + _ => return Err(format!( + "Expected object key at position {}", + self.current_token.start + )), + }; + + // Parse value + let value = self.parse_value()?; + object.insert(key, value); + } + + Ok(object) + } + + /// Parse an array literal: [ value value value ] + /// Arrays in .idea files don't use commas + fn parse_array(&mut self) -> Result, String> { + self.expect_token(TokenType::LeftBracket)?; + let mut array = Vec::new(); + + while !self.match_token(&TokenType::RightBracket) { + if self.is_at_end() { + return Err("Unexpected end of file in array".to_string()); + } + + let value = self.parse_value()?; + array.push(value); + } + + Ok(array) + } + + /// Parse a value (string, number, boolean, null, object, array, identifier, or env function) + /// This is used for parsing configuration values, attribute parameters, etc. + fn parse_value(&mut self) -> Result { + match &self.current_token.token_type { + TokenType::String(s) => { + let value = Value::String(s.clone()); + self.advance(); + Ok(value) + } + TokenType::Number(n) => { + let value = Value::Number(serde_json::Number::from_f64(*n).unwrap()); + self.advance(); + Ok(value) + } + TokenType::Boolean(b) => { + let value = Value::Bool(*b); + self.advance(); + Ok(value) + } + TokenType::Null => { + self.advance(); + Ok(Value::Null) + } + TokenType::LeftBrace => { + let obj = self.parse_object()?; + Ok(Value::Object(obj.into_iter().collect())) + } + TokenType::LeftBracket => { + let arr = self.parse_array()?; + Ok(Value::Array(arr)) + } + TokenType::Identifier(name) => { + // Check if this is an env() function call + if name == "env" && matches!(self.current_token.token_type, TokenType::Identifier(_)) { + self.advance(); // consume 'env' + + // Expect opening parenthesis + self.expect_token(TokenType::LeftParen)?; + + // Parse the environment variable name (should be an identifier) + let env_var_name = match &self.current_token.token_type { + TokenType::Identifier(var_name) => { + let var_name = var_name.clone(); + self.advance(); + var_name + } + _ => return Err(format!( + "Expected environment variable name at position {}", + self.current_token.start + )), + }; + + // Expect closing parenthesis + self.expect_token(TokenType::RightParen)?; + + // Get the environment variable value + let env_value = std::env::var(&env_var_name).unwrap_or_default(); + + Ok(Value::String(env_value)) + } else { + // Regular identifier - represents references to props or other definitions + let value = Value::String(format!("${{{}}}", name)); + self.advance(); + Ok(value) + } + } + _ => Err(format!( + "Unexpected token {:?} at position {}. Expected a value.", + self.current_token.token_type, self.current_token.start + )), + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::lexer::Lexer; + + #[test] + fn test_parse_simple_enum() { + let code = r#"enum Status { ACTIVE "Active" INACTIVE "Inactive" }"#; + let mut lexer = Lexer::new(code); + let mut parser = SchemaParser::new(&mut lexer); + + let result = parser.parse_enum(); + assert!(result.is_ok()); + + if let Ok(AstNode::Enum { name, variants, .. }) = result { + assert_eq!(name, "Status"); + assert_eq!(variants.len(), 2); + assert!(variants.contains_key("ACTIVE")); + assert!(variants.contains_key("INACTIVE")); + } else { + panic!("Expected enum node"); + } + } + + #[test] + fn test_parse_simple_model() { + let code = r#"model User { id String name String? }"#; + let mut lexer = Lexer::new(code); + let mut parser = SchemaParser::new(&mut lexer); + + let result = parser.parse_model(); + assert!(result.is_ok()); + + if let Ok(AstNode::Model { name, columns, .. }) = result { + assert_eq!(name, "User"); + assert_eq!(columns.len(), 2); + assert!(columns.contains_key("id")); + assert!(columns.contains_key("name")); + + // Check that 'id' is required and 'name' is optional + assert!(columns["id"].required); + assert!(!columns["name"].required); + } else { + panic!("Expected model node"); + } + } + + #[test] + fn test_parse_use_statement() { + let code = r#"use "./another.idea""#; + let mut lexer = Lexer::new(code); + let mut parser = SchemaParser::new(&mut lexer); + + let result = parser.parse_use(); + assert!(result.is_ok()); + + if let Ok(AstNode::Use { path, .. }) = result { + assert_eq!(path, "./another.idea"); + } else { + panic!("Expected use node"); + } + } + + #[test] + fn test_parse_env_function() { + // Set a test environment variable + std::env::set_var("TEST_VAR", "test_value"); + + let code = r#"plugin "test" { url env(TEST_VAR) }"#; + let mut lexer = Lexer::new(code); + let mut parser = SchemaParser::new(&mut lexer); + + let result = parser.parse_plugin(); + assert!(result.is_ok()); + + if let Ok(AstNode::Plugin { config, .. }) = result { + if let Some(url_value) = config.get("url") { + if let Value::String(url) = url_value { + assert_eq!(url, "test_value"); + } else { + panic!("Expected string value for url"); + } + } else { + panic!("Expected url key in config"); + } + } else { + panic!("Expected plugin node"); + } + + // Clean up + std::env::remove_var("TEST_VAR"); + } +} diff --git a/packages/idea-parser/src/trees/AbstractTree.ts b/packages/idea-parser/src/trees/AbstractTree.ts deleted file mode 100644 index 3fc7a4c..0000000 --- a/packages/idea-parser/src/trees/AbstractTree.ts +++ /dev/null @@ -1,53 +0,0 @@ -//types -import type { DeclarationToken } from '../types.js'; - -import Lexer from '../Lexer.js'; - -import definitions from '../definitions.js'; - -export default abstract class AbstractTree { - //the language used - static definitions(lexer: Lexer) { - Object.keys(definitions).forEach((key) => { - lexer.define(key, definitions[key]); - }); - return lexer; - } - - //the parser - protected _lexer: Lexer; - - /** - * Creates a new parser - */ - constructor(lexer?: Lexer) { - this._lexer = lexer || ( - this.constructor as typeof AbstractTree - ).definitions(new Lexer()); - } - - /** - * Consumes non code - */ - public noncode() { - while(this._lexer.optional(['whitespace', 'comment', 'note'])); - } - - /** - * Builds the object syntax - */ - public abstract parse(code: string, start: number): T; - - /** - * Wrapper for do-try-catch-while - */ - protected dotry(callback: () => void) { - do { - try { - callback(); - } catch(error) { - break; - } - } while(true); - } -}; \ No newline at end of file diff --git a/packages/idea-parser/src/trees/EnumTree.ts b/packages/idea-parser/src/trees/EnumTree.ts deleted file mode 100644 index 7194e99..0000000 --- a/packages/idea-parser/src/trees/EnumTree.ts +++ /dev/null @@ -1,113 +0,0 @@ -//types -import type { - LiteralToken, - PropertyToken, - IdentifierToken, - DeclarationToken -} from '../types.js'; - -import Lexer from '../Lexer.js'; -import { scalar, scan } from '../definitions.js'; - -import AbstractTree from './AbstractTree.js'; - -export default class EnumTree extends AbstractTree { - //the language used - static definitions(lexer: Lexer) { - super.definitions(lexer); - lexer.define('EnumWord', (code, index) => scan( - '_EnumWord', - /^enum/, - code, - index - )); - return lexer; - } - - /** - * (Main) Builds the syntax tree - */ - static parse(code: string, start = 0) { - return new this().parse(code, start); - } - - /** - * Builds the enum syntax - */ - parse(code: string, start = 0) { - this._lexer.load(code, start); - return this.enum(); - } - - /** - * Builds the enum syntax - */ - enum(): DeclarationToken { - //enum - const type = this._lexer.expect('EnumWord'); - this._lexer.expect('whitespace'); - //enum Foobar - const id = this._lexer.expect('CapitalIdentifier'); - this._lexer.expect('whitespace'); - //enum Foobar { - this._lexer.expect('{'); - this.noncode(); - const props: PropertyToken[] = []; - //enum Foobar { - // FOO "bar" - // ... - this.dotry(() => { - props.push(this.property()); - }); - //enum Foobar { - // FOO "bar" - // ... - //} - this._lexer.expect('}'); - - return { - type: 'VariableDeclaration', - kind: 'enum', - start: type.start, - end: this._lexer.index, - declarations: [ - { - type: 'VariableDeclarator', - start: id.start, - end: this._lexer.index, - id, - init: { - type: 'ObjectExpression', - start: type.start, - end: this._lexer.index, - properties: props - } - } - ] - }; - } - - /** - * Builds the property syntax - */ - property(): PropertyToken { - //FOO - const key = this._lexer.expect('UpperIdentifier'); - this._lexer.expect('whitespace'); - //FOO "bar" - const value = this._lexer.expect(scalar); - this._lexer.expect('whitespace'); - this.noncode(); - return { - type: 'Property', - kind: 'init', - start: key.start, - end: value.end, - method: false, - shorthand: false, - computed: false, - key, - value - }; - } -}; \ No newline at end of file diff --git a/packages/idea-parser/src/trees/ModelTree.ts b/packages/idea-parser/src/trees/ModelTree.ts deleted file mode 100644 index 5c51588..0000000 --- a/packages/idea-parser/src/trees/ModelTree.ts +++ /dev/null @@ -1,139 +0,0 @@ -//models -import { - DeclarationToken, - IdentifierToken, - PropertyToken -} from '../types.js'; - -import Lexer from '../Lexer.js'; -import TypeTree from './TypeTree.js'; - -import { scan } from '../definitions.js'; - -export default class ModelTree extends TypeTree { - //the language used - static definitions(lexer: Lexer) { - super.definitions(lexer); - lexer.define('ModelWord', (code, index) => scan( - '_ModelWord', - /^model/, - code, - index - )); - return lexer; - } - - /** - * (Main) Builds the syntax tree - */ - static parse(code: string, start = 0) { - return new ModelTree().parse(code, start); - } - - /** - * Builds the model syntax - */ - model(): DeclarationToken { - //model - const type = this._lexer.expect('ModelWord'); - this._lexer.expect('whitespace'); - //model Foobar - const id = this._lexer.expect('CapitalIdentifier'); - //model Foobar! - const final = this._lexer.optional('!'); - this._lexer.expect('whitespace'); - const properties: PropertyToken[] = []; - //model Foobar @id("foo" "bar") - this.dotry(() => { - properties.push(this.parameter()); - this.noncode(); - }); - this.noncode(); - //model Foobar @id("foo" "bar") { - this._lexer.expect('{'); - this.noncode(); - const columns: PropertyToken[] = []; - //model Foobar @id("foo" "bar") { - // foo String @id("foo" "bar") - // ... - this.dotry(() => { - columns.push(this.property()); - }); - //model Foobar @id("foo" "bar") { - // foo String @id("foo" "bar") - // ... - //} - this._lexer.expect('}'); - - return { - type: 'VariableDeclaration', - kind: 'model', - mutable: !Boolean(final), - start: type.start, - end: this._lexer.index, - declarations: [{ - type: 'VariableDeclarator', - start: type.start, - end: this._lexer.index, - id, - init: { - type: 'ObjectExpression', - start: type.start, - end: this._lexer.index, - properties: [ - { - type: 'Property', - kind: 'init', - start: type.start, - end: this._lexer.index, - method: false, - shorthand: false, - computed: false, - key: { - type: 'Identifier', - start: type.start, - end: type.end, - name: 'attributes', - }, - value: { - type: 'ObjectExpression', - start: type.start, - end: type.end, - properties - } - }, - { - type: 'Property', - kind: 'init', - start: type.start, - end: this._lexer.index, - method: false, - shorthand: false, - computed: false, - key: { - type: 'Identifier', - start: type.start, - end: type.end, - name: 'columns', - }, - value: { - type: 'ObjectExpression', - start: type.start, - end: type.end, - properties: columns - } - } - ] - } - }] - }; - } - - /** - * Builds the model syntax - */ - parse(code: string, start = 0) { - this._lexer.load(code, start); - return this.model(); - } -}; \ No newline at end of file diff --git a/packages/idea-parser/src/trees/PluginTree.ts b/packages/idea-parser/src/trees/PluginTree.ts deleted file mode 100644 index 5bd5cd9..0000000 --- a/packages/idea-parser/src/trees/PluginTree.ts +++ /dev/null @@ -1,75 +0,0 @@ -//types -import type { - LiteralToken, - DeclarationToken, - ObjectToken -} from '../types.js'; - -import Lexer from '../Lexer.js'; -import { scan } from '../definitions.js'; - -import AbstractTree from './AbstractTree.js'; - -export default class PluginTree extends AbstractTree { - //the language used - static definitions(lexer: Lexer) { - super.definitions(lexer); - lexer.define('PluginWord', (code, index) => scan( - '_PluginWord', - /^plugin/, - code, - index - )); - return lexer; - } - - /** - * (Main) Builds the syntax tree - */ - static parse(code: string, start = 0) { - return new this().parse(code, start); - } - - /** - * Builds the enum syntax - */ - parse(code: string, start = 0) { - this._lexer.load(code, start); - return this.plugin(); - } - - /** - * Builds the plugin syntax - */ - plugin(): DeclarationToken { - //plugin - const type = this._lexer.expect('PluginWord'); - this._lexer.expect('whitespace'); - //plugin "Foobar" - const id = this._lexer.expect('String'); - this._lexer.expect('whitespace'); - //plugin "Foobar" {...} - const init = this._lexer.expect('Object'); - - return { - type: 'VariableDeclaration', - kind: 'plugin', - start: type.start, - end: this._lexer.index, - declarations: [ - { - type: 'VariableDeclarator', - start: id.start, - end: this._lexer.index, - id: { - type: 'Identifier', - start: id.start, - end: id.end, - name: id.value - }, - init - } - ] - }; - } -}; \ No newline at end of file diff --git a/packages/idea-parser/src/trees/PropTree.ts b/packages/idea-parser/src/trees/PropTree.ts deleted file mode 100644 index 9206a2d..0000000 --- a/packages/idea-parser/src/trees/PropTree.ts +++ /dev/null @@ -1,70 +0,0 @@ -import type { - DeclarationToken, - IdentifierToken, - ObjectToken -} from '../types.js'; - -import Lexer from '../Lexer.js'; -import { scan } from '../definitions.js'; - -import AbstractTree from './AbstractTree.js'; - - -export default class PropTree extends AbstractTree { - //the language used - static definitions(lexer: Lexer) { - super.definitions(lexer); - lexer.define('PropWord', (code, index) => scan( - '_PropWord', - /^prop/, - code, - index - )); - return lexer; - } - - /** - * (Main) Builds the syntax tree - */ - static parse(code: string, start = 0) { - return new this().parse(code, start); - } - - /** - * Builds the enum syntax - */ - parse(code: string, start = 0) { - this._lexer.load(code, start); - return this.prop(); - } - - /** - * Builds the prop syntax - */ - prop(): DeclarationToken { - //prop - const type = this._lexer.expect('PropWord'); - this._lexer.expect('whitespace'); - //prop Foobar - const id = this._lexer.expect('CapitalIdentifier'); - this._lexer.expect('whitespace'); - //prop Foobar { - const init = this._lexer.expect('Object'); - - return { - type: 'VariableDeclaration', - kind: 'prop', - start: type.start, - end: init.end, - declarations: [ - { - type: 'VariableDeclarator', - start: id.start, - end: init.end, - id, - init - } - ] - }; - } -}; \ No newline at end of file diff --git a/packages/idea-parser/src/trees/SchemaTree.ts b/packages/idea-parser/src/trees/SchemaTree.ts deleted file mode 100644 index a0f2d19..0000000 --- a/packages/idea-parser/src/trees/SchemaTree.ts +++ /dev/null @@ -1,119 +0,0 @@ -//types -import type { - SchemaToken, - ImportToken, - DeclarationToken -} from '../types.js'; - -import Exception from '../Exception.js'; -import Lexer from '../Lexer.js'; - -import AbstractTree from './AbstractTree.js'; -import EnumTree from './EnumTree.js'; -import PropTree from './PropTree.js'; -import TypeTree from './TypeTree.js'; -import ModelTree from './ModelTree.js'; -import PluginTree from './PluginTree.js'; -import UseTree from './UseTree.js'; - -type BodyToken = DeclarationToken|ImportToken; - -export default class SchemaTree extends AbstractTree { - //the language used - static definitions(lexer: Lexer) { - EnumTree.definitions(lexer); - PropTree.definitions(lexer); - TypeTree.definitions(lexer); - ModelTree.definitions(lexer); - PluginTree.definitions(lexer); - UseTree.definitions(lexer); - return lexer; - } - - /** - * (Main) Builds the syntax tree - */ - static parse(code: string) { - return new this().parse(code); - } - - //placeholder for trees - protected _enumTree: EnumTree; - protected _propTree: PropTree; - protected _typeTree: TypeTree; - protected _modelTree: ModelTree; - protected _pluginTree: PluginTree; - protected _useTree: UseTree; - - /** - * Creates a new parser - */ - constructor(lexer?: Lexer) { - super(lexer); - this._enumTree = new EnumTree(this._lexer); - this._propTree = new PropTree(this._lexer); - this._typeTree = new TypeTree(this._lexer); - this._modelTree = new ModelTree(this._lexer); - this._pluginTree = new PluginTree(this._lexer); - this._useTree = new UseTree(this._lexer); - } - - /** - * Builds the type syntax - */ - parse(code: string, start = 0): SchemaToken { - this._lexer.load(code, start); - this.noncode(); - const body: BodyToken[] = []; - for (const token of this.dotryall( - () => this._enumTree.enum(), - () => this._propTree.prop(), - () => this._typeTree.type(), - () => this._modelTree.model(), - () => this._pluginTree.plugin(), - () => this._useTree.use() - )) { - body.push(token); - this.noncode(); - } - - if (this._lexer.index < code.length) { - const remainder = code.substring( - this._lexer.index, - this._lexer.nextSpace() - ).trim(); - if (remainder.length) { - throw Exception - .for(`Unexpected token %s`, remainder.replace(/[\n\r]/g, ' ').trim()) - .withPosition(this._lexer.index, this._lexer.nextSpace()); - } - } - - return { - type: 'Program', - kind: 'schema', - start: 0, - end: this._lexer.index, - body - }; - } - - /** - * Wrapper for do-try-catch-while - */ - protected *dotryall(...all: (() => BodyToken|undefined)[]) { - let token: BodyToken|undefined; - do { - token = undefined; - for (const callback of all) { - try { - token = callback(); - if (token) { - yield token; - break; - } - } catch(error) {} - } - } while(token); - } -}; \ No newline at end of file diff --git a/packages/idea-parser/src/trees/TypeTree.ts b/packages/idea-parser/src/trees/TypeTree.ts deleted file mode 100644 index 74262a7..0000000 --- a/packages/idea-parser/src/trees/TypeTree.ts +++ /dev/null @@ -1,281 +0,0 @@ -import type { - DataToken, - DeclarationToken, - IdentifierToken, - LiteralToken, - PropertyToken -} from '../types.js'; - -import Lexer from '../Lexer.js'; -import { data, scan } from '../definitions.js'; - -import AbstractTree from './AbstractTree.js'; - -export default class TypeTree extends AbstractTree { - static data = [ ...data, 'CapitalIdentifier' ]; - - //the language used - static definitions(lexer: Lexer) { - super.definitions(lexer); - lexer.define('Type', (code, index) => { - const regexp = /^[A-Z][a-zA-Z0-9_]*((\[\])|\?)?/; - const results = scan('Literal', regexp, code, index); - if (results) { - const square = code.substring( - results.end, - results.end + 2 - ); - if (results.end > index && square === '[]') { - results.end += 2; - results.value += square; - } - results.raw = `"${results.value}"`; - } - return results; - }); - lexer.define('TypeWord', (code, index) => scan( - '_TypeWord', - /^type/, - code, - index - )); - return lexer; - } - - /** - * (Main) Builds the syntax tree - */ - static parse(code: string, start = 0) { - return new this().parse(code, start); - } - - /** - * Builds the type syntax - */ - parse(code: string, start = 0) { - this._lexer.load(code, start); - return this.type(); - } - - /** - * Builds the parameter syntax - */ - parameter(): PropertyToken { - // @id - const key = this._lexer.expect('AttributeIdentifier'); - key.name = key.name.slice(1); - const elements: DataToken[] = []; - // @id( - if (this._lexer.optional('(')) { - this.noncode(); - // @id("foo" "bar" - const data = (this.constructor as typeof TypeTree).data; - //keep parsing data until we reach the end - let results: DataToken|undefined; - do { - results = this._lexer.optional(data); - if (results) { - elements.push(results); - this.noncode(); - continue; - } - } while(results); - // @id("foo" "bar") - this._lexer.expect(')'); - } - //assuming no args - return { - type: 'Property', - kind: 'init', - start: key.start, - end: this._lexer.index, - method: false, - shorthand: false, - computed: false, - key, - value: elements.length ? { - type: 'ArrayExpression', - start: key.start, - end: this._lexer.index, - elements - } : { - type: 'Literal', - start: key.start, - end: this._lexer.index, - value: true, - raw: 'true' - } - }; - } - - /** - * Builds the property syntax - */ - property(): PropertyToken { - //foo - const key = this._lexer.expect('CamelIdentifier'); - this._lexer.expect('whitespace'); - //foo String - const value = this._lexer.expect('Type'); - this._lexer.expect('whitespace'); - const properties: PropertyToken[] = []; - //foo String @id("foo" "bar") ... - this.dotry(() => { - properties.push(this.parameter()); - this.noncode(); - }); - return { - type: 'Property', - kind: 'init', - start: key.start, - end: this._lexer.index, - method: false, - shorthand: false, - computed: false, - key, - value: { - type: 'ObjectExpression', - start: value.start, - end: this._lexer.index, - properties: [ - { - type: 'Property', - kind: 'init', - start: value.start, - end: value.end, - method: false, - shorthand: false, - computed: false, - key: { - type: 'Identifier', - start: value.start, - end: value.end, - name: 'type', - }, - value - }, - { - type: 'Property', - kind: 'init', - start: value.start, - end: this._lexer.index, - method: false, - shorthand: false, - computed: false, - key: { - type: 'Identifier', - start: value.start, - end: value.end, - name: 'attributes', - }, - value: { - type: 'ObjectExpression', - start: value.start, - end: value.end, - properties - } - } - ] - } - }; - } - - /** - * Builds the type syntax - */ - type(): DeclarationToken { - //type - const type = this._lexer.expect('TypeWord'); - this._lexer.expect('whitespace'); - //type Foobar - const id = this._lexer.expect('CapitalIdentifier'); - //type Foobar! - const final = this._lexer.optional('!'); - this._lexer.expect('whitespace'); - const properties: PropertyToken[] = []; - //type Foobar @id("foo" "bar") - this.dotry(() => { - properties.push(this.parameter()); - this.noncode(); - }); - this.noncode(); - //type Foobar @id("foo" "bar") { - this._lexer.expect('{'); - this.noncode(); - const columns: PropertyToken[] = []; - //type Foobar @id("foo" "bar") { - // foo String @id("foo" "bar") - // ... - this.dotry(() => { - columns.push(this.property()); - }); - //type Foobar @id("foo" "bar") { - // foo String @id("foo" "bar") - // ... - //} - this._lexer.expect('}'); - - return { - type: 'VariableDeclaration', - kind: 'type', - mutable: !Boolean(final), - start: type.start, - end: this._lexer.index, - declarations: [{ - type: 'VariableDeclarator', - start: type.start, - end: this._lexer.index, - id, - init: { - type: 'ObjectExpression', - start: type.start, - end: this._lexer.index, - properties: [ - { - type: 'Property', - kind: 'init', - start: type.start, - end: this._lexer.index, - method: false, - shorthand: false, - computed: false, - key: { - type: 'Identifier', - start: type.start, - end: type.end, - name: 'attributes', - }, - value: { - type: 'ObjectExpression', - start: type.start, - end: type.end, - properties - } - }, - { - type: 'Property', - kind: 'init', - start: type.start, - end: this._lexer.index, - method: false, - shorthand: false, - computed: false, - key: { - type: 'Identifier', - start: type.start, - end: type.end, - name: 'columns', - }, - value: { - type: 'ObjectExpression', - start: type.start, - end: type.end, - properties: columns - } - } - ] - } - }] - }; - } -}; \ No newline at end of file diff --git a/packages/idea-parser/src/trees/UseTree.ts b/packages/idea-parser/src/trees/UseTree.ts deleted file mode 100644 index aa107c6..0000000 --- a/packages/idea-parser/src/trees/UseTree.ts +++ /dev/null @@ -1,61 +0,0 @@ -//types -import type { LiteralToken, ImportToken } from '../types.js'; - -import Lexer from '../Lexer.js'; -import { scan } from '../definitions.js'; - -import AbstractTree from './AbstractTree.js'; - -export default class UseTree extends AbstractTree { - //the language used - static definitions(lexer: Lexer) { - super.definitions(lexer); - lexer.define('UseWord', (code, index) => scan( - '_UseWord', - /^use/, - code, - index - )); - return lexer; - } - - /** - * (Main) Builds the syntax tree - */ - static parse(code: string, start = 0) { - return new this().parse(code, start); - } - - /** - * Builds the enum syntax - */ - parse(code: string, start = 0) { - this._lexer.load(code, start); - return this.use(); - } - - /** - * Builds the enum syntax - */ - use(): ImportToken { - //use - const type = this._lexer.expect('UseWord'); - this._lexer.expect('whitespace'); - //use "Foobar" - const imported = this._lexer.expect('String'); - - return { - type: 'ImportDeclaration', - start: type.start, - end: this._lexer.index, - specifiers: [], - source: { - type: 'Literal', - start: imported.start, - end: imported.end, - value: imported.value, - raw: imported.raw - } - }; - } -}; \ No newline at end of file diff --git a/packages/idea-parser/src/types.ts b/packages/idea-parser/src/types.ts deleted file mode 100644 index 43cfc6f..0000000 --- a/packages/idea-parser/src/types.ts +++ /dev/null @@ -1,142 +0,0 @@ -export type Reader = ( - code: string, - start: number, - lexer: Parser -) => Token|undefined; - -export type Definition = { key: string, reader: Reader }; - -export type UnknownToken = { - type: string; - start: number; - end: number; - value: any; - raw: string; -}; - -export type ImportToken = { - type: 'ImportDeclaration'; - start: number; - end: number; - specifiers: [], - source: LiteralToken -} - -export type SchemaToken = { - type: 'Program'; - kind: 'schema'; - start: number; - end: number; - body: (DeclarationToken|ImportToken)[]; -}; - -export type DeclarationToken = { - type: 'VariableDeclaration'; - kind: string; - mutable?: boolean; - start: number; - end: number; - declarations: [ DeclaratorToken ]; -}; - -export type DeclaratorToken = { - type: 'VariableDeclarator'; - start: number; - end: number; - id: IdentifierToken; - init: ObjectToken; -}; - -export type IdentifierToken = { - type: 'Identifier'; - name: string; - start: number; - end: number; -}; - -export type ObjectToken = { - type: 'ObjectExpression'; - start: number; - end: number; - properties: PropertyToken[]; -}; - -export type PropertyToken = { - type: 'Property'; - kind: 'init'; - start: number; - end: number; - key: IdentifierToken; - value: DataToken; - method: boolean; - shorthand: boolean; - computed: boolean; -}; - -export type ArrayToken = { - type: 'ArrayExpression'; - start: number; - end: number; - elements: DataToken[]; -}; - -export type LiteralToken = { - type: 'Literal'; - start: number; - end: number; - value: any; - raw: string; -}; - -export type Token = DataToken|UnknownToken; -export type DataToken = IdentifierToken|LiteralToken|ObjectToken|ArrayToken; -export type UseReferences = Record|false; - -export type Scalar = string|number|null|boolean; -export type Data = Scalar|Data[]|{ [key: string]: Data }; - -export interface Parser { - get dictionary(): Record; - get index(): number; - clone(): Parser; - define(key: string, reader: Reader, type?: string): void; - expect(keys: string | string[]): T; - get(key: string): Definition|undefined; - load(code: string, index: number): this; - match(code: string, start: number, keys?: string[]): Token|null; - next(keys: string | string[]): boolean; - optional(keys: string | string[]): T | undefined; - read(): Token | undefined -} - -export type EnumConfig = Record; -export type PluginConfig = Record; -export type PropConfig = Record; -export type ColumnConfig = { - name: string, - type: string, - attributes: Record, - required: boolean, - multiple: boolean -}; - -export type TypeConfig = { - name: string, - mutable: boolean, - attributes: Record, - columns: ColumnConfig[] -}; - -export type ModelConfig = TypeConfig; - -export type FinalSchemaConfig = { - enum?: Record, - type?: Record, - model?: Record, - plugin?: Record -}; - -export type SchemaConfig = FinalSchemaConfig & { - prop?: Record, - use?: string[] -}; \ No newline at end of file diff --git a/packages/idea-parser/tests/Compiler.test.ts b/packages/idea-parser/tests/Compiler.test.ts deleted file mode 100644 index 5e07c0c..0000000 --- a/packages/idea-parser/tests/Compiler.test.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { describe, it } from 'mocha'; -import { expect, use } from 'chai'; -//NOTE: no extensions in tests because it's excluded in tsconfig.json and -//we are testing in a typescript environment via `ts-mocha -r tsx` (esm) -import Compiler from '../src/Compiler'; -import { - DataToken, - DeclarationToken, - IdentifierToken, - ImportToken, - SchemaToken -} from '../src/types'; - -describe('Compiler Test', () => { - - // Line 46 - it('Should throw an exception with the message "Invalid data token type" when an invalid token type is encountered', () => { - const invalidToken = { type: 'InvalidType' } as unknown as DataToken; - expect(() => Compiler.data(invalidToken)).to.throw('Invalid data token type'); - }); - - // Line 54 - it('Should throw an exception with the message "Invalid Enum" when an invalid enum is encountered', () => { - const invalidEnumToken = { kind: 'notAnEnum', declarations: [] } as unknown as DeclarationToken; - expect(() => Compiler.enum(invalidEnumToken)).to.throw('Invalid Enum'); - }); - - // Line 86 - it('Should throw an exception with the message "Unknown reference {token.name}" when references is an empty object', () => { - const token = { name: 'someReference' } as IdentifierToken; - expect(() => Compiler.identifier(token, {})).to.throw('Unknown reference someReference'); - }); - - - // Line 109 - it('Should throw an exception with the message "Expecting a columns property" when the columns property is missing', () => { - const tokenWithoutColumns = { kind: 'model', - declarations: [{ - id: { name: 'TestModel' }, - init: { properties: [] } - }] - } as unknown as DeclarationToken; - expect(() => Compiler.model(tokenWithoutColumns)).to.throw('Expecting a columns property'); - }); - - // Line 152 - it('Should throw an exception with the message "Invalid Plugin" when an invalid plugin is encountered', () => { - const invalidPluginToken = { kind: 'notAPlugin', declarations: [] } as unknown as DeclarationToken; - expect(() => Compiler.plugin(invalidPluginToken)).to.throw('Invalid Plugin'); - }); - - // Line 168 - it('Should throw an exception with the message "Invalid Prop" when an invalid property is encountered', () => { - const invalidPropToken = { kind: 'notAProp', declarations: [] } as unknown as DeclarationToken; - expect(() => Compiler.prop(invalidPropToken)).to.throw('Invalid Prop'); - }); - - // Line 184 - it('Should throw an exception with the message "Invalid Schema" when an invalid schema is encountered', () => { - const invalidSchemaToken = { kind: 'notASchema', body: [] } as unknown as SchemaToken; - expect(() => Compiler.schema(invalidSchemaToken)).to.throw('Invalid Schema'); - }); - - // Line 205 - it('Should throw an exception with the message "Duplicate key" when a duplicate key is encountered in the schema', () => { - const duplicateKeyToken = { - kind: 'schema', - body: [ - { - kind: 'enum', - declarations: [{ - id: { name: 'DuplicateKey' }, - init: { properties: [{ key: { name: 'key1' }, value: { value: 'value1' } }] } - }] - }, - { - kind: 'enum', - declarations: [{ - id: { name: 'DuplicateKey' }, - init: { properties: [{ key: { name: 'key2' }, value: { value: 'value2' } }] } - }] - } - ] - } as unknown as SchemaToken; - expect(() => Compiler.schema(duplicateKeyToken)).to.throw('Duplicate DuplicateKey'); - }); - - // Line 260 - it('Should throw an exception with the message "Invalid Type" when an invalid type is encountered', () => { - const invalidTypeToken = { kind: 'notAType', declarations: [] } as unknown as DeclarationToken; - expect(() => Compiler.type(invalidTypeToken)).to.throw('Invalid Type'); - }); - - // Line 304 - it('Should throw an exception with the message "Invalid Import" when an invalid import is encountered', () => { - const invalidImportToken = { type: 'NotAnImportDeclaration', source: { value: './invalid.idea' } } as unknown as ImportToken; - expect(() => Compiler.use(invalidImportToken)).to.throw('Invalid Import'); - }); - - - - - -}) \ No newline at end of file diff --git a/packages/idea-parser/tests/EnumTree.test.ts b/packages/idea-parser/tests/EnumTree.test.ts deleted file mode 100644 index c2b5a71..0000000 --- a/packages/idea-parser/tests/EnumTree.test.ts +++ /dev/null @@ -1,54 +0,0 @@ -import fs from 'fs'; -import { describe, it } from 'mocha'; -import { expect, use } from 'chai'; -import deepEqualInAnyOrder from 'deep-equal-in-any-order'; -//NOTE: no extensions in tests because it's excluded in tsconfig.json and -//we are testing in a typescript environment via `ts-mocha -r tsx` (esm) -import EnumTree from '../src/trees/EnumTree'; - -use(deepEqualInAnyOrder); - -/* -* The cleanAST function is used to remove start and end -* properties from ASTs for comparison. -*/ -const cleanAST = (node: any) => { - if (typeof node === 'object' && node !== null) { - const { start, end, ...rest } = node; - return Object.keys(rest).reduce((acc, key) => { - acc[key] = Array.isArray(rest[key]) - ? rest[key].map(cleanAST) - : cleanAST(rest[key]); - return acc; - }, {}); - } - return node; -}; - -describe('Enum Tree', () => { - it('Should parse Enums', async () => { - const actualRaw = EnumTree.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/enum.idea`, 'utf8')); - const expectedRaw = JSON.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/enum.json`, 'utf8')); - - const actual = cleanAST(actualRaw); - const expected = cleanAST(expectedRaw); - //console.log(JSON.stringify(actual, null, 2)); - expect(actual).to.deep.equalInAnyOrder(expected); - }); - - // Line 37 - it('Should throw an error when the input is an empty string', () => { - expect(() => { - const lexerMock = { - expect: (tokenType: string) => { throw new Error('Unexpected end of input'); }, - load: () => {} - }; - const enumTree = new EnumTree(); - (enumTree as any)._lexer = lexerMock; - enumTree.parse(''); - }).to.throw(Error, 'Unexpected end of input'); - }); - - - -}); diff --git a/packages/idea-parser/tests/Lexer.test.ts b/packages/idea-parser/tests/Lexer.test.ts deleted file mode 100644 index 50ace07..0000000 --- a/packages/idea-parser/tests/Lexer.test.ts +++ /dev/null @@ -1,306 +0,0 @@ -import { describe, it } from 'mocha'; -import { expect } from 'chai'; -//NOTE: no extensions in tests because it's excluded in tsconfig.json and -//we are testing in a typescript environment via `ts-mocha -r tsx` (esm) -import type { - LiteralToken, - ObjectToken, - ArrayToken, - UnknownToken, - Token -} from '../src/types'; -import Lexer from '../src/Lexer'; -import Compiler from '../src/Compiler'; -import definitions, { data } from '../src/definitions'; - -describe('Lexer/Compiler', () => { - it('Should parse Args', async () => { - const lexer = new Lexer(); - Object.keys(definitions).forEach((key) => { - lexer.define(key, definitions[key]); - }); - - //float - (() => { - lexer.load('4.4'); - const token = lexer.expect(data); - expect(token.type).to.equal('Literal'); - expect(token.value).to.equal(4.4); - expect(token.start).to.equal(0); - expect(token.end).to.equal(3); - })(); - //int - (() => { - lexer.load('44'); - const token = lexer.expect(data); - expect(token.type).to.equal('Literal'); - expect(token.value).to.equal(44); - expect(token.start).to.equal(0); - expect(token.end).to.equal(2); - })(); - //null - (() => { - lexer.load('null'); - const token = lexer.expect(data); - expect(token.type).to.equal('Literal'); - expect(token.value).to.equal(null); - expect(token.start).to.equal(0); - expect(token.end).to.equal(4); - })(); - //true - (() => { - lexer.load('true'); - const token = lexer.expect(data); - expect(token.type).to.equal('Literal'); - expect(token.value).to.equal(true); - expect(token.start).to.equal(0); - expect(token.end).to.equal(4); - })(); - //false - (() => { - lexer.load('false'); - const token = lexer.expect(data); - expect(token.type).to.equal('Literal'); - expect(token.value).to.equal(false); - expect(token.start).to.equal(0); - expect(token.end).to.equal(5); - })(); - //string - (() => { - lexer.load('"foobar"'); - const token = lexer.expect(data); - expect(token.type).to.equal('Literal'); - expect(token.value).to.equal('foobar'); - expect(token.start).to.equal(0); - expect(token.end).to.equal(8); - })(); - //basic object - (() => { - lexer.load('{ foo "bar" bar 4.4 }'); - const token = lexer.expect(data); - expect(token.type).to.equal('ObjectExpression'); - - const actual = Compiler.object(token); - expect(actual.foo).to.equal('bar'); - expect(actual.bar).to.equal(4.4); - })(); - //object object - (() => { - lexer.load('{ foo "bar" bar 4.4 zoo { foo false bar null } }'); - const token = lexer.expect(data); - expect(token.type).to.equal('ObjectExpression'); - - const actual = Compiler.object<{ - foo: string; - bar: number; - zoo: { foo: boolean, bar: null }; - }>(token); - expect(actual.foo).to.equal('bar'); - expect(actual.bar).to.equal(4.4); - expect(actual.zoo.foo).to.equal(false); - expect(actual.zoo.bar).to.equal(null); - })(); - //object array - (() => { - lexer.load('{ foo "bar" bar 4.4 zoo [ 4 true ] }'); - const token = lexer.expect(data); - expect(token.type).to.equal('ObjectExpression'); - - const actual = Compiler.object<{ - foo: string; - bar: number; - zoo: [number, boolean]; - }>(token); - expect(actual.foo).to.equal('bar'); - expect(actual.bar).to.equal(4.4); - expect(actual.zoo[0]).to.equal(4); - expect(actual.zoo[1]).to.equal(true); - })(); - //basic array - (() => { - lexer.load('[ 4.4 "bar" false null ]'); - const token = lexer.expect(data); - expect(token.type).to.equal('ArrayExpression'); - - const actual = Compiler.array(token); - expect(actual[0]).to.equal(4.4); - expect(actual[1]).to.equal('bar'); - expect(actual[2]).to.equal(false); - expect(actual[3]).to.equal(null); - })(); - //array array - (() => { - lexer.load('[ 4.4 "bar" false null [ 4 true ] ]'); - const token = lexer.expect(data); - expect(token.type).to.equal('ArrayExpression'); - - const actual = Compiler.array<[ - number, - string, - boolean, - null, - [number, boolean] - ]>(token); - expect(actual[0]).to.equal(4.4); - expect(actual[1]).to.equal('bar'); - expect(actual[2]).to.equal(false); - expect(actual[3]).to.equal(null); - expect(actual[4][0]).to.equal(4); - expect(actual[4][1]).to.equal(true); - })(); - //array object - (() => { - lexer.load('[ 4.4 "bar" false null { foo false bar null } ]'); - const token = lexer.expect(data); - expect(token.type).to.equal('ArrayExpression'); - - const actual = Compiler.array<[ - number, - string, - boolean, - null, - { foo: boolean, bar: null } - ]>(token); - expect(actual[0]).to.equal(4.4); - expect(actual[1]).to.equal('bar'); - expect(actual[2]).to.equal(false); - expect(actual[3]).to.equal(null); - expect(actual[4].foo).to.equal(false); - expect(actual[4].bar).to.equal(null); - })(); - //array object - (() => { - lexer.load('[ { label "United States" value "US" } { label "Mexico" value "MX" } { label "Canada" value "CA" } ]'); - const token = lexer.expect(data); - expect(token.type).to.equal('ArrayExpression'); - - const actual = Compiler.array<{ label: string, value: string }[]>(token); - expect(actual[0].label).to.equal('United States'); - expect(actual[0].value).to.equal('US'); - expect(actual[1].label).to.equal('Mexico'); - expect(actual[1].value).to.equal('MX'); - expect(actual[2].label).to.equal('Canada'); - expect(actual[2].value).to.equal('CA'); - })(); - }); - - it('Should parse comments', async () => { - const lexer = new Lexer(); - Object.keys(definitions).forEach((key) => { - lexer.define(key, definitions[key]); - }); - - (() => { - lexer.load('/* some comment */'); - const token = lexer.expect('note'); - expect(token.type).to.equal('_Note'); - expect(token.value).to.equal('/* some comment */'); - expect(token.start).to.equal(0); - expect(token.end).to.equal(18); - })(); - - (() => { - lexer.load('//some comment'); - const token = lexer.expect('comment'); - expect(token.type).to.equal('_Comment'); - expect(token.value).to.equal('//some comment'); - expect(token.start).to.equal(0); - expect(token.end).to.equal(14); - })(); - - (() => { - lexer.load('/* some // comment */'); - const token = lexer.expect('note'); - expect(token.type).to.equal('_Note'); - expect(token.value).to.equal('/* some // comment */'); - expect(token.start).to.equal(0); - expect(token.end).to.equal(21); - })(); - - (() => { - lexer.load('/* some // comment */'); - const token = lexer.expect([ 'note', 'comment' ]); - expect(token.type).to.equal('_Note'); - expect(token.value).to.equal('/* some // comment */'); - expect(token.start).to.equal(0); - expect(token.end).to.equal(21); - })(); - - (() => { - lexer.load('//so/*me com*/ment'); - const token = lexer.expect('comment'); - expect(token.type).to.equal('_Comment'); - expect(token.value).to.equal('//so/*me com*/ment'); - expect(token.start).to.equal(0); - expect(token.end).to.equal(18); - })(); - - (() => { - lexer.load('//so/*me com*/ment'); - const token = lexer.expect([ 'note', 'comment' ]); - expect(token.type).to.equal('_Comment'); - expect(token.value).to.equal('//so/*me com*/ment'); - expect(token.start).to.equal(0); - expect(token.end).to.equal(18); - })(); - - (() => { - lexer.load(`/* - some - // comment - */`); - const token = lexer.expect('note'); - expect(token.type).to.equal('_Note'); - expect(token.value).to.equal("/* \n some \n // comment\n */"); - expect(token.start).to.equal(0); - expect(token.end).to.equal(45); - })(); - }); - - // Line 18 - it('Should handle an empty input string and return an appropriate token', () => { - const lexer = new Lexer(); - lexer.load(''); - const token = lexer.read(); - expect(token).to.be.undefined; - }); - - // Line 58 - it('Should throw an exception for an unknown definition key', () => { - const lexer = new Lexer(); - expect(() => lexer.expect('unknownKey')).to.throw('Unknown definition unknownKey'); - }); - - // Line 117 - it('Should handle the case when keys parameter is explicitly passed as undefined', () => { - const lexer = new Lexer(); - lexer.define('literal', (code, start) => { - if (code.startsWith('42', start)) { - return { type: 'Literal', value: 42, start, end: start + 2 } as Token; - } - return undefined; - }); - lexer.load('42'); - const token = lexer.match('42', 0, undefined); - expect(token).to.deep.equal({ type: 'Literal', value: 42, start: 0, end: 2 }); - }); - - // Line 121 - it('Should throw an exception when a key is missing from the dictionary', () => { - const lexer = new Lexer(); - lexer.load('some code'); - expect(() => lexer.match('some code', 0, ['missingKey'])).to.throw('Unknown definition missingKey'); - }); - - // Line 174 - it('Should return an empty string when start and end are the same', () => { - const lexer = new Lexer(); - lexer.load('some code'); - const result = lexer.substring(5, 5); - expect(result).to.equal(''); - }); - - - - -}); diff --git a/packages/idea-parser/tests/ModelTree.test.ts b/packages/idea-parser/tests/ModelTree.test.ts deleted file mode 100644 index f1cfa94..0000000 --- a/packages/idea-parser/tests/ModelTree.test.ts +++ /dev/null @@ -1,65 +0,0 @@ -import fs from 'fs'; -import { describe, it } from 'mocha'; -import { expect, use } from 'chai'; -import deepEqualInAnyOrder from 'deep-equal-in-any-order'; -//NOTE: no extensions in tests because it's excluded in tsconfig.json and -//we are testing in a typescript environment via `ts-mocha -r tsx` (esm) -import ModelTree from '../src/trees/ModelTree'; - -use(deepEqualInAnyOrder); - -/* -* The cleanAST function is used to remove start and end -* properties from ASTs for comparison. -*/ -const cleanAST = (node: any) => { - if (typeof node === 'object' && node !== null) { - const { start, end, ...rest } = node; - return Object.keys(rest).reduce((acc, key) => { - acc[key] = Array.isArray(rest[key]) - ? rest[key].map(cleanAST) - : cleanAST(rest[key]); - return acc; - }, {}); - } - return node; -}; - -describe('Model Tree', () => { - it('Should parse Model', async () => { - const actualRaw = ModelTree.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/model.idea`, 'utf8')); - const expectedRaw = JSON.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/model.json`, 'utf8')); - - const actual = cleanAST(actualRaw); - const expected = cleanAST(expectedRaw); - //console.log(JSON.stringify(actual, null, 2)); - expect(actual).to.deep.equalInAnyOrder(expected); - }); - - // Line 37 - it('Should throw an error if the lexer does not return an IdentifierToken when expecting CapitalIdentifier', () => { - const lexerMock = { - expect: (tokenType: string) => { - if (tokenType === 'CapitalIdentifier') { - throw new Error('Expected CapitalIdentifier but got something else'); - } - }, - load: () => {} - }; - - const modelTree = new ModelTree(); - modelTree['_lexer'] = lexerMock as any; - - expect(() => modelTree.parse('model foobar')).to.throw('Expected CapitalIdentifier but got something else'); - }); - - it('Should parse negative values', async () => { - const actualRaw = ModelTree.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/address.idea`, 'utf8')); - const expectedRaw = JSON.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/address.json`, 'utf8')); - - const actual = cleanAST(actualRaw); - const expected = cleanAST(expectedRaw); - - expect(actual).to.deep.equalInAnyOrder(expected); - }); -}); diff --git a/packages/idea-parser/tests/PluginTree.test.ts b/packages/idea-parser/tests/PluginTree.test.ts deleted file mode 100644 index 03c0a5b..0000000 --- a/packages/idea-parser/tests/PluginTree.test.ts +++ /dev/null @@ -1,52 +0,0 @@ -import fs from 'fs'; -import { describe, it } from 'mocha'; -import { expect, use } from 'chai'; -import deepEqualInAnyOrder from 'deep-equal-in-any-order'; -//NOTE: no extensions in tests because it's excluded in tsconfig.json and -//we are testing in a typescript environment via `ts-mocha -r tsx` (esm) -import PluginTree from '../src/trees/PluginTree'; - -use(deepEqualInAnyOrder); - -/* -* The cleanAST function is used to remove start and end -* properties from ASTs for comparison. -*/ -const cleanAST = (node: any) => { - if (typeof node === 'object' && node !== null) { - const { start, end, ...rest } = node; - return Object.keys(rest).reduce((acc, key) => { - acc[key] = Array.isArray(rest[key]) - ? rest[key].map(cleanAST) - : cleanAST(rest[key]); - return acc; - }, {}); - } - return node; -}; - -describe('Plugin Tree', () => { - it('Should parse Plugin', async () => { - const actualRaw = PluginTree.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/plugin.idea`, 'utf8')); - const expectedRaw = JSON.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/plugin.json`, 'utf8')); - - const actual = cleanAST(actualRaw); - const expected = cleanAST(expectedRaw); - //console.log(JSON.stringify(actual, null, 2)); - expect(actual).to.deep.equalInAnyOrder(expected); - }); - - // Line 36 - it('Should throw an error when the input code is an empty string', () => { - expect(() => { - const lexerMock = { - expect: (tokenType: string) => { throw new Error('Unexpected end of input'); }, - load: () => {} - }; - const pluginTree = new PluginTree(); - (pluginTree as any)._lexer = lexerMock; - pluginTree.parse(''); - }).to.throw(Error, 'Unexpected end of input'); - }); - -}); diff --git a/packages/idea-parser/tests/PropTree.test.ts b/packages/idea-parser/tests/PropTree.test.ts deleted file mode 100644 index ec0d7aa..0000000 --- a/packages/idea-parser/tests/PropTree.test.ts +++ /dev/null @@ -1,52 +0,0 @@ -import fs from 'fs'; -import { describe, it } from 'mocha'; -import { expect } from 'chai'; -//NOTE: no extensions in tests because it's excluded in tsconfig.json and -//we are testing in a typescript environment via `ts-mocha -r tsx` (esm) -import PropTree from '../src/trees/PropTree'; - - -/* -* The cleanAST function is used to remove start and end -* properties from ASTs for comparison. -*/ -const cleanAST = (node: any) => { - if (typeof node === 'object' && node !== null) { - const { start, end, ...rest } = node; - return Object.keys(rest).reduce((acc, key) => { - acc[key] = Array.isArray(rest[key]) - ? rest[key].map(cleanAST) - : cleanAST(rest[key]); - return acc; - }, {}); - } - return node; -}; - -describe('Prop Tree', () => { - it('Should parse Prop', async () => { - const actualRaw = PropTree.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/prop.idea`, 'utf8')); - const expectedRaw = JSON.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/prop.json`, 'utf8')); - - const actual = cleanAST(actualRaw); - const expected = cleanAST(expectedRaw); - //console.log(JSON.stringify(actual, null, 2)); - expect(actual).to.deep.equalInAnyOrder(expected); - }); - - // Line 36 - it('Should throw an error when the input code is an emty string', () => { - expect(() => { - const lexerMock = { - expect: (tokenType: string) => { throw new Error('Unexpected end of input'); }, - load: () => {} - }; - const propTree = new PropTree(); - (propTree as any)._lexer = lexerMock; - propTree.parse(''); - }).to.throw(Error, 'Unexpected end of input'); - }); - - - -}); diff --git a/packages/idea-parser/tests/Schema.test.ts b/packages/idea-parser/tests/Schema.test.ts old mode 100644 new mode 100755 index e77a202..3607bae --- a/packages/idea-parser/tests/Schema.test.ts +++ b/packages/idea-parser/tests/Schema.test.ts @@ -4,12 +4,12 @@ import { expect, use } from 'chai'; import deepEqualInAnyOrder from 'deep-equal-in-any-order'; //NOTE: no extensions in tests because it's excluded in tsconfig.json and //we are testing in a typescript environment via `ts-mocha -r tsx` (esm) -import SchemaTree from '../src/trees/SchemaTree'; -import Compiler from '../src/Compiler'; -import Exception from '../src/Exception'; +import { parse, final } from '../src'; use(deepEqualInAnyOrder); +const dirname = typeof __dirname !== 'undefined' ? __dirname : import.meta.dirname; + /* * The cleanAST function is used to remove start and end * properties from ASTs for comparison. @@ -29,27 +29,16 @@ const cleanAST = (node: any) => { describe('Schema Tree', () => { it('Should parse Schema', async () => { - const actualRaw = SchemaTree.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/schema.idea`, 'utf8')); - const schemaRaw = JSON.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/schema.json`, 'utf8')); + const actualRaw = parse(fs.readFileSync(`${dirname}/fixtures/schema.idea`, 'utf8')); + const schemaRaw = JSON.parse(fs.readFileSync(`${dirname}/fixtures/schema.json`, 'utf8')); const actual = cleanAST(actualRaw); const schema = cleanAST(schemaRaw); - //console.log(JSON.stringify(actual, null, 2)); + console.log(JSON.stringify(JSON.parse(actual), null, 2)); expect(actual).to.deep.equalInAnyOrder(schema); - //console.log(JSON.stringify(Compiler.schema(actual), null, 2)); - const references = JSON.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/references.json`, 'utf8')); - expect(Compiler.schema(actual)).to.deep.equalInAnyOrder(references); - //console.log(JSON.stringify(Compiler.final(actual), null, 2)); - const final = JSON.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/final.json`, 'utf8')); - expect(Compiler.final(actual)).to.deep.equalInAnyOrder(final); - }); - - - // Line 81 - 86 - it('Should throw an exception when there is an unexpected token at the end of the code', () => { - const codeWithUnexpectedToken = 'enum TestEnum { VALUE1, VALUE2, } unexpectedToken'; - - expect(() => SchemaTree.parse(codeWithUnexpectedToken)).to.throw(Exception, /Unexpected token ,/); + const last = JSON.parse(fs.readFileSync(`${dirname}/fixtures/final.json`, 'utf8')); + //console.log(last, null, 2)); + expect(final(actual)).to.deep.equalInAnyOrder(last); }); }); diff --git a/packages/idea-parser/tests/TypeTree.test.ts b/packages/idea-parser/tests/TypeTree.test.ts deleted file mode 100644 index 555263a..0000000 --- a/packages/idea-parser/tests/TypeTree.test.ts +++ /dev/null @@ -1,80 +0,0 @@ -import fs from 'fs'; -import { describe, it } from 'mocha'; -import { expect, use } from 'chai'; -import deepEqualInAnyOrder from 'deep-equal-in-any-order'; -//NOTE: no extensions in tests because it's excluded in tsconfig.json and -//we are testing in a typescript environment via `ts-mocha -r tsx` (esm) -import TypeTree from '../src/trees/TypeTree'; - -use(deepEqualInAnyOrder); - -/* -* The cleanAST function is used to remove start and end -* properties from ASTs for comparison. -*/ -const cleanAST = (node: any) => { - if (typeof node === 'object' && node !== null) { - const { start, end, ...rest } = node; - return Object.keys(rest).reduce((acc, key) => { - acc[key] = Array.isArray(rest[key]) - ? rest[key].map(cleanAST) - : cleanAST(rest[key]); - return acc; - }, {}); - } - return node; -}; - -describe('Type Tree', () => { - it('Should parse Type', async () => { - const actualRaw = TypeTree.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/type.idea`, 'utf8')); - const expectedRaw = JSON.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/type.json`, 'utf8')); - - const actual = cleanAST(actualRaw); - const expected = cleanAST(expectedRaw); - //console.log(JSON.stringify(actual, null, 2)); - expect(actual).to.deep.equalInAnyOrder(expected); - }); - it('Should be immutable', async () => { - const actualRaw = TypeTree.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/mutable.idea`, 'utf8')); - const expectedRaw = JSON.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/mutable.json`, 'utf8')); - - const actual = cleanAST(actualRaw); - const expected = cleanAST(expectedRaw); - //console.log(JSON.stringify(actual, null, 2)); - expect(actual).to.deep.equalInAnyOrder(expected); - }); - - - // Line 39 - 40 - it('Should correctly identify "typeword" token at the start of the input string', () => { - const lexerMock = { - define: (name: string, callback: Function) => { - if (name === 'TypeWord') { - const result = callback('type Example', 0); - expect(result).to.deep.equal({ - type: '_TypeWord', - start: 0, - end: 4, - value: 'type', - raw: 'type' - }); - } - } - }; - TypeTree.definitions(lexerMock as any); - }); - - // Line 55 - it('Should throw an error when the input code is an empty string', () => { - expect(() => { - const lexerMock = { - expect: (tokenType: string) => { throw new Error('Unexpected end of input'); }, - load: () => { } - }; - const typeTree = new TypeTree(); - (typeTree as any)._lexer = lexerMock; - typeTree.parse(''); - }).to.throw(Error, 'Unexpected end of input'); - }); -}); diff --git a/packages/idea-parser/tests/UseTree.test.ts b/packages/idea-parser/tests/UseTree.test.ts deleted file mode 100644 index 9ab3c35..0000000 --- a/packages/idea-parser/tests/UseTree.test.ts +++ /dev/null @@ -1,34 +0,0 @@ -import fs from 'fs'; -import { describe, it } from 'mocha'; -import { expect, use } from 'chai'; -import deepEqualInAnyOrder from 'deep-equal-in-any-order'; -//NOTE: no extensions in tests because it's excluded in tsconfig.json and -//we are testing in a typescript environment via `ts-mocha -r tsx` (esm) -import UseTree from '../src/trees/UseTree'; - -use(deepEqualInAnyOrder); - -describe('Use Tree', () => { - it('Should parse Use', async () => { - const actual = UseTree.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/use.idea`, 'utf8')); - const expected = JSON.parse(fs.readFileSync(`${import.meta.dirname}/fixtures/use.json`, 'utf8')); - //console.log(JSON.stringify(actual, null, 2)); - expect(actual).to.deep.equalInAnyOrder(expected); - }); - - // Line 32 - it('Should throw an error when the input code is an empty string', () => { - expect(() => { - const lexerMock = { - expect: (tokenType: string) => { throw new Error('Unexpected end of input'); }, - load: () => {} - }; - const useTree = new UseTree(); - (useTree as any)._lexer = lexerMock; - useTree.parse(''); - }).to.throw(Error, 'Unexpected end of input'); - }); - - - -}); diff --git a/packages/idea-parser/tests/fixtures/address.idea b/packages/idea-parser/tests/fixtures/address.idea old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/address.json b/packages/idea-parser/tests/fixtures/address.json old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/big.idea b/packages/idea-parser/tests/fixtures/big.idea old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/enum.idea b/packages/idea-parser/tests/fixtures/enum.idea old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/enum.json b/packages/idea-parser/tests/fixtures/enum.json old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/final.json b/packages/idea-parser/tests/fixtures/final.json old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/model.idea b/packages/idea-parser/tests/fixtures/model.idea old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/model.json b/packages/idea-parser/tests/fixtures/model.json old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/mutable.idea b/packages/idea-parser/tests/fixtures/mutable.idea old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/mutable.json b/packages/idea-parser/tests/fixtures/mutable.json old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/plugin.idea b/packages/idea-parser/tests/fixtures/plugin.idea old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/plugin.json b/packages/idea-parser/tests/fixtures/plugin.json old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/prop.idea b/packages/idea-parser/tests/fixtures/prop.idea old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/prop.json b/packages/idea-parser/tests/fixtures/prop.json old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/references.json b/packages/idea-parser/tests/fixtures/references.json old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/schema.idea b/packages/idea-parser/tests/fixtures/schema.idea old mode 100644 new mode 100755 index 5f36d0a..c19a2c6 --- a/packages/idea-parser/tests/fixtures/schema.idea +++ b/packages/idea-parser/tests/fixtures/schema.idea @@ -1,6 +1,6 @@ plugin "./custom-plugin" { provider "custom-client-js" - url env("DATABASE_URL") + url env(DATABASE_URL) previewFeatures ["fullTextSearch"] } @@ -48,4 +48,4 @@ model User! @label("User" "Users") { created Date @label("Created") @default("now()") @filterable @sortable @list.date(Pretty) updated Date @label("Updated") @default("updated()") @filterable @sortable @list.date(Pretty) company Company? @label("My Company") -} \ No newline at end of file +} diff --git a/packages/idea-parser/tests/fixtures/schema.json b/packages/idea-parser/tests/fixtures/schema.json old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/type.idea b/packages/idea-parser/tests/fixtures/type.idea old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/type.json b/packages/idea-parser/tests/fixtures/type.json old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/use.idea b/packages/idea-parser/tests/fixtures/use.idea old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tests/fixtures/use.json b/packages/idea-parser/tests/fixtures/use.json old mode 100644 new mode 100755 diff --git a/packages/idea-parser/tsconfig.cjs.json b/packages/idea-parser/tsconfig.cjs.json old mode 100644 new mode 100755 index d22cdd8..70f53c5 --- a/packages/idea-parser/tsconfig.cjs.json +++ b/packages/idea-parser/tsconfig.cjs.json @@ -3,6 +3,6 @@ "compilerOptions": { "outDir": "cjs/" }, - "include": [ "src/**/*.ts" ], + "include": [ "src/index.cjs.ts" ], "exclude": [ "esm", "cjs", "node_modules", "tests" ] -} \ No newline at end of file +} diff --git a/packages/idea-parser/tsconfig.esm.json b/packages/idea-parser/tsconfig.esm.json old mode 100644 new mode 100755 index 6a550d2..adfb315 --- a/packages/idea-parser/tsconfig.esm.json +++ b/packages/idea-parser/tsconfig.esm.json @@ -4,6 +4,6 @@ "moduleResolution": "node", "outDir": "esm/" }, - "include": [ "src/**/*.ts" ], + "include": [ "src/index.ts" ], "exclude": [ "esm", "cjs", "node_modules", "tests" ] -} \ No newline at end of file +} diff --git a/packages/idea-parser/tsconfig.json b/packages/idea-parser/tsconfig.json old mode 100644 new mode 100755 diff --git a/yarn.lock b/yarn.lock index c0a8597..0823dd8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4,7 +4,7 @@ "@ampproject/remapping@^2.2.0": version "2.3.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" + resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz" integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== dependencies: "@jridgewell/gen-mapping" "^0.3.5" @@ -12,7 +12,7 @@ "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.2": version "7.26.2" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz" integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== dependencies: "@babel/helper-validator-identifier" "^7.25.9" @@ -21,7 +21,7 @@ "@babel/code-frame@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.27.1.tgz#200f715e66d52a23b221a9435534a91cc13ad5be" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz" integrity sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg== dependencies: "@babel/helper-validator-identifier" "^7.27.1" @@ -30,17 +30,17 @@ "@babel/compat-data@^7.26.5": version "7.26.5" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.5.tgz#df93ac37f4417854130e21d72c66ff3d4b897fc7" + resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.5.tgz" integrity sha512-XvcZi1KWf88RVbF9wn8MN6tYFloU5qX8KjuF3E1PVBmJ9eypXfs4GRiJwLuTZL0iSnJUKn1BFPa5BPZZJyFzPg== "@babel/compat-data@^7.27.2": version "7.27.2" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.27.2.tgz#4183f9e642fd84e74e3eea7ffa93a412e3b102c9" + resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.2.tgz" integrity sha512-TUtMJYRPyUb/9aU8f3K0mjmjf6M9N5Woshn2CS6nqJSeJtTtQcpLUXjGt9vbF8ZGff0El99sWkLgzwW3VXnxZQ== "@babel/core@^7.12.3", "@babel/core@^7.8.7": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.27.1.tgz#89de51e86bd12246003e3524704c49541b16c3e6" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.27.1.tgz" integrity sha512-IaaGWsQqfsQWVLqMn9OB92MNN7zukfVA4s7KKAI0KfrrDsZ0yhi5uV4baBuLuN7n3vsZpwP8asPPcVwApxvjBQ== dependencies: "@ampproject/remapping" "^2.2.0" @@ -61,7 +61,7 @@ "@babel/core@^7.23.9": version "7.26.7" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.26.7.tgz#0439347a183b97534d52811144d763a17f9d2b24" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.26.7.tgz" integrity sha512-SRijHmF0PSPgLIBYlWnG0hyeJLwXE2CgpsXaMOrtt2yp9/86ALw6oUlj9KYuZ0JN07T4eBMVIW4li/9S1j2BGA== dependencies: "@ampproject/remapping" "^2.2.0" @@ -82,7 +82,7 @@ "@babel/generator@^7.26.5": version "7.26.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.5.tgz#e44d4ab3176bbcaf78a5725da5f1dc28802a9458" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.26.5.tgz" integrity sha512-2caSP6fN9I7HOe6nqhtft7V4g7/V/gfDsC3Ag4W7kEzzvRGKqiv0pu0HogPiZ3KaVSoNDhUws6IJjDjpfmYIXw== dependencies: "@babel/parser" "^7.26.5" @@ -93,7 +93,7 @@ "@babel/generator@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.27.1.tgz#862d4fad858f7208edd487c28b58144036b76230" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.27.1.tgz" integrity sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w== dependencies: "@babel/parser" "^7.27.1" @@ -104,14 +104,14 @@ "@babel/helper-annotate-as-pure@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.1.tgz#4345d81a9a46a6486e24d069469f13e60445c05d" + resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.1.tgz" integrity sha512-WnuuDILl9oOBbKnb4L+DyODx7iC47XfzmNCpTttFsSp6hTG7XZxu60+4IO+2/hPfcGOoKbFiwoI/+zwARbNQow== dependencies: "@babel/types" "^7.27.1" "@babel/helper-compilation-targets@^7.26.5": version "7.26.5" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz#75d92bb8d8d51301c0d49e52a65c9a7fe94514d8" + resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz" integrity sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA== dependencies: "@babel/compat-data" "^7.26.5" @@ -122,7 +122,7 @@ "@babel/helper-compilation-targets@^7.27.1": version "7.27.2" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d" + resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz" integrity sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ== dependencies: "@babel/compat-data" "^7.27.2" @@ -133,7 +133,7 @@ "@babel/helper-create-class-features-plugin@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.27.1.tgz#5bee4262a6ea5ddc852d0806199eb17ca3de9281" + resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.27.1.tgz" integrity sha512-QwGAmuvM17btKU5VqXfb+Giw4JcN0hjuufz3DYnpeVDvZLAObloM77bhMXiqry3Iio+Ai4phVRDwl6WU10+r5A== dependencies: "@babel/helper-annotate-as-pure" "^7.27.1" @@ -146,7 +146,7 @@ "@babel/helper-member-expression-to-functions@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.27.1.tgz#ea1211276be93e798ce19037da6f06fbb994fa44" + resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.27.1.tgz" integrity sha512-E5chM8eWjTp/aNoVpcbfM7mLxu9XGLWYise2eBKGQomAk/Mb4XoxyqXTZbuTohbsl8EKqdlMhnDI2CCLfcs9wA== dependencies: "@babel/traverse" "^7.27.1" @@ -154,7 +154,7 @@ "@babel/helper-module-imports@^7.25.9": version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz#e7f8d20602ebdbf9ebbea0a0751fb0f2a4141715" + resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz" integrity sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw== dependencies: "@babel/traverse" "^7.25.9" @@ -162,7 +162,7 @@ "@babel/helper-module-imports@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204" + resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz" integrity sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w== dependencies: "@babel/traverse" "^7.27.1" @@ -170,7 +170,7 @@ "@babel/helper-module-transforms@^7.26.0": version "7.26.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz#8ce54ec9d592695e58d84cd884b7b5c6a2fdeeae" + resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz" integrity sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw== dependencies: "@babel/helper-module-imports" "^7.25.9" @@ -179,7 +179,7 @@ "@babel/helper-module-transforms@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.27.1.tgz#e1663b8b71d2de948da5c4fb2a20ca4f3ec27a6f" + resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.1.tgz" integrity sha512-9yHn519/8KvTU5BjTVEEeIM3w9/2yXNKoD82JifINImhpKkARMJKPP59kLo+BafpdN5zgNeIcS4jsGDmd3l58g== dependencies: "@babel/helper-module-imports" "^7.27.1" @@ -188,19 +188,19 @@ "@babel/helper-optimise-call-expression@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.27.1.tgz#c65221b61a643f3e62705e5dd2b5f115e35f9200" + resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.27.1.tgz" integrity sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw== dependencies: "@babel/types" "^7.27.1" "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz#ddb2f876534ff8013e6c2b299bf4d39b3c51d44c" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz" integrity sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw== "@babel/helper-replace-supers@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.27.1.tgz#b1ed2d634ce3bdb730e4b52de30f8cccfd692bc0" + resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.27.1.tgz" integrity sha512-7EHz6qDZc8RYS5ElPoShMheWvEgERonFCs7IAonWLLUTXW59DP14bCZt89/GKyreYn8g3S83m21FelHKbeDCKA== dependencies: "@babel/helper-member-expression-to-functions" "^7.27.1" @@ -209,7 +209,7 @@ "@babel/helper-skip-transparent-expression-wrappers@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.27.1.tgz#62bb91b3abba8c7f1fec0252d9dbea11b3ee7a56" + resolved "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.27.1.tgz" integrity sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg== dependencies: "@babel/traverse" "^7.27.1" @@ -217,37 +217,37 @@ "@babel/helper-string-parser@^7.25.9": version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz#1aabb72ee72ed35789b4bbcad3ca2862ce614e8c" + resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz" integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA== "@babel/helper-string-parser@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" + resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz" integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== "@babel/helper-validator-identifier@^7.25.9": version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz#24b64e2c3ec7cd3b3c547729b8d16871f22cbdc7" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz" integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ== "@babel/helper-validator-identifier@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz#a7054dcc145a967dd4dc8fee845a57c1316c9df8" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz" integrity sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow== "@babel/helper-validator-option@^7.25.9": version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz#86e45bd8a49ab7e03f276577f96179653d41da72" + resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz" integrity sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw== "@babel/helper-validator-option@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" + resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz" integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== "@babel/helpers@^7.26.7": version "7.26.7" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.26.7.tgz#fd1d2a7c431b6e39290277aacfd8367857c576a4" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.7.tgz" integrity sha512-8NHiL98vsi0mbPQmYAGWwfcFaOy4j2HY49fXJCfuDcdE7fMIsH9a7GdaeXpIBsbT7307WU8KCMp5pUVDNL4f9A== dependencies: "@babel/template" "^7.25.9" @@ -255,7 +255,7 @@ "@babel/helpers@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.27.1.tgz#ffc27013038607cdba3288e692c3611c06a18aa4" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.1.tgz" integrity sha512-FCvFTm0sWV8Fxhpp2McP5/W53GPllQ9QeQ7SiqGWjMf/LVG07lFa5+pgK05IRhVwtvafT22KF+ZSnM9I545CvQ== dependencies: "@babel/template" "^7.27.1" @@ -263,42 +263,42 @@ "@babel/parser@^7.14.7", "@babel/parser@^7.27.1", "@babel/parser@^7.27.2": version "7.27.2" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.27.2.tgz#577518bedb17a2ce4212afd052e01f7df0941127" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.27.2.tgz" integrity sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw== dependencies: "@babel/types" "^7.27.1" "@babel/parser@^7.23.9", "@babel/parser@^7.25.9", "@babel/parser@^7.26.5", "@babel/parser@^7.26.7": version "7.26.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.7.tgz#e114cd099e5f7d17b05368678da0fb9f69b3385c" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.26.7.tgz" integrity sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w== dependencies: "@babel/types" "^7.26.7" "@babel/plugin-syntax-decorators@^7.25.9": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.27.1.tgz#ee7dd9590aeebc05f9d4c8c0560007b05979a63d" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.27.1.tgz" integrity sha512-YMq8Z87Lhl8EGkmb0MwYkt36QnxC+fzCgrl66ereamPlYToRpIk5nUjKUY3QKLWq8mwUB1BgbeXcTJhZOCDg5A== dependencies: "@babel/helper-plugin-utils" "^7.27.1" "@babel/plugin-syntax-jsx@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz#2f9beb5eff30fa507c5532d107daac7b888fa34c" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz" integrity sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w== dependencies: "@babel/helper-plugin-utils" "^7.27.1" "@babel/plugin-syntax-typescript@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz#5147d29066a793450f220c63fa3a9431b7e6dd18" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz" integrity sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ== dependencies: "@babel/helper-plugin-utils" "^7.27.1" "@babel/plugin-transform-modules-commonjs@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.27.1.tgz#8e44ed37c2787ecc23bdc367f49977476614e832" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.27.1.tgz" integrity sha512-OJguuwlTYlN0gBZFRPqwOGNWssZjfIUdS7HMYtN8c1KmwpwHFBwTeFZrg9XZa+DFTitWOW5iTAG7tyCUPsCCyw== dependencies: "@babel/helper-module-transforms" "^7.27.1" @@ -306,7 +306,7 @@ "@babel/plugin-transform-typescript@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.27.1.tgz#d3bb65598bece03f773111e88cc4e8e5070f1140" + resolved "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.27.1.tgz" integrity sha512-Q5sT5+O4QUebHdbwKedFBEwRLb02zJ7r4A5Gg2hUoLuU3FjdMcyqcywqUrLCaDsFCxzokf7u9kuy7qz51YUuAg== dependencies: "@babel/helper-annotate-as-pure" "^7.27.1" @@ -317,7 +317,7 @@ "@babel/preset-typescript@^7.26.0": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.27.1.tgz#190742a6428d282306648a55b0529b561484f912" + resolved "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.27.1.tgz" integrity sha512-l7WfQfX0WK4M0v2RudjuQK4u99BS6yLHYEmdtVPP7lKV013zr9DygFuWNlnbvQ9LR+LS0Egz/XAvGx5U9MX0fQ== dependencies: "@babel/helper-plugin-utils" "^7.27.1" @@ -328,7 +328,7 @@ "@babel/template@^7.25.9": version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.9.tgz#ecb62d81a8a6f5dc5fe8abfc3901fc52ddf15016" + resolved "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz" integrity sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg== dependencies: "@babel/code-frame" "^7.25.9" @@ -337,7 +337,7 @@ "@babel/template@^7.27.1": version "7.27.2" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d" + resolved "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz" integrity sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw== dependencies: "@babel/code-frame" "^7.27.1" @@ -346,7 +346,7 @@ "@babel/traverse@^7.25.9", "@babel/traverse@^7.26.7": version "7.26.7" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.7.tgz#99a0a136f6a75e7fb8b0a1ace421e0b25994b8bb" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.7.tgz" integrity sha512-1x1sgeyRLC3r5fQOM0/xtQKsYjyxmFjaOrLJNtZ81inNjyJHGIolTULPiSc/2qe1/qfpFLisLQYFnnZl7QoedA== dependencies: "@babel/code-frame" "^7.26.2" @@ -359,7 +359,7 @@ "@babel/traverse@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.27.1.tgz#4db772902b133bbddd1c4f7a7ee47761c1b9f291" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.1.tgz" integrity sha512-ZCYtZciz1IWJB4U61UPu4KEaqyfj+r5T1Q5mqPo+IBpcG9kHv30Z0aD8LXPgC1trYa6rK0orRyAhqUgk4MjmEg== dependencies: "@babel/code-frame" "^7.27.1" @@ -372,7 +372,7 @@ "@babel/types@^7.25.9", "@babel/types@^7.26.5", "@babel/types@^7.26.7": version "7.26.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.7.tgz#5e2b89c0768e874d4d061961f3a5a153d71dc17a" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.26.7.tgz" integrity sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg== dependencies: "@babel/helper-string-parser" "^7.25.9" @@ -380,7 +380,7 @@ "@babel/types@^7.27.1": version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.27.1.tgz#9defc53c16fc899e46941fc6901a9eea1c9d8560" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.27.1.tgz" integrity sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q== dependencies: "@babel/helper-string-parser" "^7.27.1" @@ -388,7 +388,7 @@ "@cspotcode/source-map-support@^0.8.0": version "0.8.1" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz" integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== dependencies: "@jridgewell/trace-mapping" "0.3.9" @@ -415,7 +415,7 @@ "@esbuild/darwin-arm64@0.25.2": version "0.25.2" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.2.tgz#486efe7599a8d90a27780f2bb0318d9a85c6c423" + resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.2.tgz" integrity sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA== "@esbuild/darwin-x64@0.25.2": @@ -520,7 +520,7 @@ "@inquirer/checkbox@^4.0.2": version "4.1.1" - resolved "https://registry.yarnpkg.com/@inquirer/checkbox/-/checkbox-4.1.1.tgz#5f2c0ce74a75e3872f8e170fd209655972ce7802" + resolved "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.1.1.tgz" integrity sha512-os5kFd/52gZTl/W6xqMfhaKVJHQM8V/U1P8jcSaQJ/C4Qhdrf2jEXdA/HaxfQs9iiUA/0yzYhk5d3oRHTxGDDQ== dependencies: "@inquirer/core" "^10.1.6" @@ -531,7 +531,7 @@ "@inquirer/confirm@^5.0.2": version "5.1.5" - resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.5.tgz#0e6bf86794f69f849667ee38815608d6cd5917ba" + resolved "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.5.tgz" integrity sha512-ZB2Cz8KeMINUvoeDi7IrvghaVkYT2RB0Zb31EaLWOE87u276w4wnApv0SH2qWaJ3r0VSUa3BIuz7qAV2ZvsZlg== dependencies: "@inquirer/core" "^10.1.6" @@ -539,7 +539,7 @@ "@inquirer/core@^10.1.6": version "10.1.6" - resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.1.6.tgz#2a92a219cb48c81453e145a5040d0e04f7df1aa2" + resolved "https://registry.npmjs.org/@inquirer/core/-/core-10.1.6.tgz" integrity sha512-Bwh/Zk6URrHwZnSSzAZAKH7YgGYi0xICIBDFOqBQoXNNAzBHw/bgXgLmChfp+GyR3PnChcTbiCTZGC6YJNJkMA== dependencies: "@inquirer/figures" "^1.0.10" @@ -553,7 +553,7 @@ "@inquirer/editor@^4.1.0": version "4.2.6" - resolved "https://registry.yarnpkg.com/@inquirer/editor/-/editor-4.2.6.tgz#dec442b9f7ada0804bb9ba689370cc05fd385b20" + resolved "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.6.tgz" integrity sha512-l0smvr8g/KAVdXx4I92sFxZiaTG4kFc06cFZw+qqwTirwdUHMFLnouXBB9OafWhpO3cfEkEz2CdPoCmor3059A== dependencies: "@inquirer/core" "^10.1.6" @@ -562,7 +562,7 @@ "@inquirer/expand@^4.0.2": version "4.0.8" - resolved "https://registry.yarnpkg.com/@inquirer/expand/-/expand-4.0.8.tgz#8438bd34af182d4a37d8d7101a328e10430efadc" + resolved "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.8.tgz" integrity sha512-k0ouAC6L+0Yoj/j0ys2bat0fYcyFVtItDB7h+pDFKaDDSFJey/C/YY1rmIOqkmFVZ5rZySeAQuS8zLcKkKRLmg== dependencies: "@inquirer/core" "^10.1.6" @@ -571,12 +571,12 @@ "@inquirer/figures@^1.0.10": version "1.0.10" - resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-1.0.10.tgz#e3676a51c9c51aaabcd6ba18a28e82b98417db37" + resolved "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.10.tgz" integrity sha512-Ey6176gZmeqZuY/W/nZiUyvmb1/qInjcpiZjXWi6nON+nxJpD1bxtSoBxNliGISae32n6OwbY+TSXPZ1CfS4bw== "@inquirer/input@^4.0.2": version "4.1.5" - resolved "https://registry.yarnpkg.com/@inquirer/input/-/input-4.1.5.tgz#ea3ffed7947c28d61ef3f261c4f261e99c4cac8a" + resolved "https://registry.npmjs.org/@inquirer/input/-/input-4.1.5.tgz" integrity sha512-bB6wR5wBCz5zbIVBPnhp94BHv/G4eKbUEjlpCw676pI2chcvzTx1MuwZSCZ/fgNOdqDlAxkhQ4wagL8BI1D3Zg== dependencies: "@inquirer/core" "^10.1.6" @@ -584,7 +584,7 @@ "@inquirer/number@^3.0.2": version "3.0.8" - resolved "https://registry.yarnpkg.com/@inquirer/number/-/number-3.0.8.tgz#ca44c09a8ac74040e2327e04694799eae603e9de" + resolved "https://registry.npmjs.org/@inquirer/number/-/number-3.0.8.tgz" integrity sha512-CTKs+dT1gw8dILVWATn8Ugik1OHLkkfY82J+Musb57KpmF6EKyskv8zmMiEJPzOnLTZLo05X/QdMd8VH9oulXw== dependencies: "@inquirer/core" "^10.1.6" @@ -592,7 +592,7 @@ "@inquirer/password@^4.0.2": version "4.0.8" - resolved "https://registry.yarnpkg.com/@inquirer/password/-/password-4.0.8.tgz#ac2b14800a75f15e3404d98616d9dc7d8c2df38b" + resolved "https://registry.npmjs.org/@inquirer/password/-/password-4.0.8.tgz" integrity sha512-MgA+Z7o3K1df2lGY649fyOBowHGfrKRz64dx3+b6c1w+h2W7AwBoOkHhhF/vfhbs5S4vsKNCuDzS3s9r5DpK1g== dependencies: "@inquirer/core" "^10.1.6" @@ -601,7 +601,7 @@ "@inquirer/prompts@7.1.0": version "7.1.0" - resolved "https://registry.yarnpkg.com/@inquirer/prompts/-/prompts-7.1.0.tgz#a55ee589c0eed0ca2ee0fbc7fc63f42f4c31a24e" + resolved "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.1.0.tgz" integrity sha512-5U/XiVRH2pp1X6gpNAjWOglMf38/Ys522ncEHIKT1voRUvSj/DQnR22OVxHnwu5S+rCFaUiPQ57JOtMFQayqYA== dependencies: "@inquirer/checkbox" "^4.0.2" @@ -617,7 +617,7 @@ "@inquirer/rawlist@^4.0.2": version "4.0.8" - resolved "https://registry.yarnpkg.com/@inquirer/rawlist/-/rawlist-4.0.8.tgz#1d4389186d63861a2abe2dd107f72e813dc0ea4b" + resolved "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.0.8.tgz" integrity sha512-hl7rvYW7Xl4un8uohQRUgO6uc2hpn7PKqfcGkCOWC0AA4waBxAv6MpGOFCEDrUaBCP+pXPVqp4LmnpWmn1E1+g== dependencies: "@inquirer/core" "^10.1.6" @@ -626,7 +626,7 @@ "@inquirer/search@^3.0.2": version "3.0.8" - resolved "https://registry.yarnpkg.com/@inquirer/search/-/search-3.0.8.tgz#38c25f5b2db15a268be76b09bd12b4599ecc216b" + resolved "https://registry.npmjs.org/@inquirer/search/-/search-3.0.8.tgz" integrity sha512-ihSE9D3xQAupNg/aGDZaukqoUSXG2KfstWosVmFCG7jbMQPaj2ivxWtsB+CnYY/T4D6LX1GHKixwJLunNCffww== dependencies: "@inquirer/core" "^10.1.6" @@ -636,7 +636,7 @@ "@inquirer/select@^4.0.2": version "4.0.8" - resolved "https://registry.yarnpkg.com/@inquirer/select/-/select-4.0.8.tgz#dde85e10bc4e650c51542de533a91b6bc63498b7" + resolved "https://registry.npmjs.org/@inquirer/select/-/select-4.0.8.tgz" integrity sha512-Io2prxFyN2jOCcu4qJbVoilo19caiD3kqkD3WR0q3yDA5HUCo83v4LrRtg55ZwniYACW64z36eV7gyVbOfORjA== dependencies: "@inquirer/core" "^10.1.6" @@ -647,12 +647,12 @@ "@inquirer/type@^3.0.4": version "3.0.4" - resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-3.0.4.tgz#fa5f9e91a0abf3c9e93d3e1990ecb891d8195cf2" + resolved "https://registry.npmjs.org/@inquirer/type/-/type-3.0.4.tgz" integrity sha512-2MNFrDY8jkFYc9Il9DgLsHhMzuHnOYM1+CUYVWbzu9oT0hC7V7EcYvdCKeoll/Fcci04A+ERZ9wcc7cQ8lTkIA== "@istanbuljs/esm-loader-hook@0.3.0": version "0.3.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/esm-loader-hook/-/esm-loader-hook-0.3.0.tgz#f63094877f7f74f3e6ccab375d95922728eb01d1" + resolved "https://registry.npmjs.org/@istanbuljs/esm-loader-hook/-/esm-loader-hook-0.3.0.tgz" integrity sha512-lEnYroBUYfNQuJDYrPvre8TSwPZnyIQv9qUT3gACvhr3igZr+BbrdyIcz4+2RnEXZzi12GqkUW600+QQPpIbVg== dependencies: "@babel/core" "^7.8.7" @@ -665,7 +665,7 @@ "@istanbuljs/load-nyc-config@^1.0.0", "@istanbuljs/load-nyc-config@^1.1.0": version "1.1.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz" integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== dependencies: camelcase "^5.3.1" @@ -676,12 +676,12 @@ "@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== "@jridgewell/gen-mapping@^0.3.5": version "0.3.8" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz#4f0e06362e01362f823d348f1872b08f666d8142" + resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz" integrity sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA== dependencies: "@jridgewell/set-array" "^1.2.1" @@ -690,22 +690,22 @@ "@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": version "3.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz" integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== "@jridgewell/set-array@^1.2.1": version "1.2.1" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz" integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== "@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": version "1.5.0" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz" integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== "@jridgewell/trace-mapping@0.3.9": version "0.3.9" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== dependencies: "@jridgewell/resolve-uri" "^3.0.3" @@ -713,22 +713,27 @@ "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz" integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== dependencies: "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@napi-rs/cli@^2.18.0": + version "2.18.4" + resolved "https://registry.yarnpkg.com/@napi-rs/cli/-/cli-2.18.4.tgz#12bebfb7995902fa7ab43cc0b155a7f5a2caa873" + integrity sha512-SgJeA4df9DE2iAEpr3M2H0OKl/yjtg1BnRI5/JyowS71tUWhrfSu2LT0V3vlHET+g1hBVlrO60PmEXwUEKp8Mg== + "@stackpress/lib@0.6.2": version "0.6.2" - resolved "https://registry.yarnpkg.com/@stackpress/lib/-/lib-0.6.2.tgz#834e330212aff3e22402cdc2e891e52d43e3c6f0" + resolved "https://registry.npmjs.org/@stackpress/lib/-/lib-0.6.2.tgz" integrity sha512-4TTtEDMYx47UXlS+eYYwMRtvBR7kZvLSEvMi6SkIi2/mZB40jTJwz6DP9Ued9FU7I2w/u2eCLr7PiIzuoVeqVg== dependencies: "@inquirer/prompts" "7.1.0" "@ts-morph/common@~0.25.0": version "0.25.0" - resolved "https://registry.yarnpkg.com/@ts-morph/common/-/common-0.25.0.tgz#b76cbd517118acc8eadaf12b2fc2d47f42923452" + resolved "https://registry.npmjs.org/@ts-morph/common/-/common-0.25.0.tgz" integrity sha512-kMnZz+vGGHi4GoHnLmMhGNjm44kGtKUXGnOvrKmMwAuvNjM/PgKVGfUnL7IDvK7Jb2QQ82jq3Zmp04Gy+r3Dkg== dependencies: minimatch "^9.0.4" @@ -737,27 +742,27 @@ "@tsconfig/node10@^1.0.7": version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" + resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz" integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== "@tsconfig/node12@^1.0.7": version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + resolved "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz" integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== "@tsconfig/node14@^1.0.0": version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + resolved "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz" integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== "@tsconfig/node16@^1.0.2": version "1.0.4" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz" integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== "@types/chai@4.3.20": version "4.3.20" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.20.tgz#cb291577ed342ca92600430841a00329ba05cecc" + resolved "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz" integrity sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ== "@types/deep-equal-in-any-order@1.0.3": @@ -767,36 +772,36 @@ "@types/json5@^0.0.29": version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== "@types/mocha@10.0.10": version "10.0.10" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.10.tgz#91f62905e8d23cbd66225312f239454a23bebfa0" + resolved "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz" integrity sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q== "@types/node@22.9.3": version "22.9.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.9.3.tgz#08f3d64b3bc6d74b162d36f60213e8a6704ef2b4" + resolved "https://registry.npmjs.org/@types/node/-/node-22.9.3.tgz" integrity sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw== dependencies: undici-types "~6.19.8" acorn-walk@^8.1.1: version "8.3.4" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" + resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz" integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== dependencies: acorn "^8.11.0" acorn@^8.11.0, acorn@^8.4.1: version "8.14.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz" integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== aggregate-error@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + resolved "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz" integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== dependencies: clean-stack "^2.0.0" @@ -804,31 +809,31 @@ aggregate-error@^3.0.0: ansi-colors@^4.1.3: version "4.1.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== ansi-escapes@^4.3.2: version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== dependencies: type-fest "^0.21.3" ansi-regex@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" anymatch@~3.1.2: version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== dependencies: normalize-path "^3.0.0" @@ -836,46 +841,46 @@ anymatch@~3.1.2: append-transform@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-2.0.0.tgz#99d9d29c7b38391e6f428d28ce136551f0b77e12" + resolved "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz" integrity sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg== dependencies: default-require-extensions "^3.0.0" archy@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + resolved "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz" integrity sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw== arg@^4.1.0: version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + resolved "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== argparse@^1.0.7: version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" argparse@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== arrify@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + resolved "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== assertion-error@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== babel-plugin-istanbul@^6.0.0: version "6.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" + resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz" integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" @@ -886,17 +891,17 @@ babel-plugin-istanbul@^6.0.0: balanced-match@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== binary-extensions@^2.0.0: version "2.3.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" + resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz" integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== brace-expansion@^1.1.7: version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" @@ -904,26 +909,26 @@ brace-expansion@^1.1.7: brace-expansion@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz" integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== dependencies: balanced-match "^1.0.0" braces@~3.0.2: version "3.0.3" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz" integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== dependencies: fill-range "^7.1.1" browser-stdout@^1.3.1: version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + resolved "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== browserslist@^4.24.0: version "4.24.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.4.tgz#c6b2865a3f08bcb860a0e827389003b9fe686e4b" + resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz" integrity sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A== dependencies: caniuse-lite "^1.0.30001688" @@ -933,12 +938,12 @@ browserslist@^4.24.0: buffer-from@^1.0.0, buffer-from@^1.1.0: version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== caching-transform@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-4.0.0.tgz#00d297a4206d71e2163c39eaffa8157ac0651f0f" + resolved "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz" integrity sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA== dependencies: hasha "^5.0.0" @@ -948,22 +953,22 @@ caching-transform@^4.0.0: camelcase@^5.0.0, camelcase@^5.3.1: version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== camelcase@^6.0.0: version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001688: version "1.0.30001697" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001697.tgz#040bbbb54463c4b4b3377c716b34a322d16e6fc7" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001697.tgz" integrity sha512-GwNPlWJin8E+d7Gxq96jxM6w0w+VFeyyXRsjU58emtkYqnbwHqXm5uT2uCmO0RQE9htWknOP4xtBlLmM/gWxvQ== chai@4.5.0: version "4.5.0" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.5.0.tgz#707e49923afdd9b13a8b0b47d33d732d13812fd8" + resolved "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz" integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw== dependencies: assertion-error "^1.1.0" @@ -976,7 +981,7 @@ chai@4.5.0: chalk@^4.1.0: version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" @@ -984,19 +989,19 @@ chalk@^4.1.0: chardet@^0.7.0: version "0.7.0" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + resolved "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== check-error@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694" + resolved "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz" integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== dependencies: get-func-name "^2.0.2" chokidar@^3.5.3: version "3.6.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz" integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== dependencies: anymatch "~3.1.2" @@ -1011,17 +1016,17 @@ chokidar@^3.5.3: clean-stack@^2.0.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== cli-width@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-4.1.0.tgz#42daac41d3c254ef38ad8ac037672130173691c5" + resolved "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz" integrity sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ== cliui@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + resolved "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz" integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== dependencies: string-width "^4.2.0" @@ -1030,7 +1035,7 @@ cliui@^6.0.0: cliui@^7.0.2: version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== dependencies: string-width "^4.2.0" @@ -1039,49 +1044,49 @@ cliui@^7.0.2: code-block-writer@^13.0.3: version "13.0.3" - resolved "https://registry.yarnpkg.com/code-block-writer/-/code-block-writer-13.0.3.tgz#90f8a84763a5012da7af61319dd638655ae90b5b" + resolved "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.3.tgz" integrity sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg== color-convert@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== dependencies: color-name "~1.1.4" color-name@~1.1.4: version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== commondir@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + resolved "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz" integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== concat-map@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== convert-source-map@^1.7.0: version "1.9.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" + resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz" integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== convert-source-map@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== create-require@^1.1.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== cross-spawn@^7.0.0, cross-spawn@^7.0.3: version "7.0.6" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" @@ -1090,24 +1095,24 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.3: debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.5: version "4.4.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" + resolved "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz" integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== dependencies: ms "^2.1.3" decamelize@^1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== decamelize@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== deep-eql@^4.1.3: version "4.1.4" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.4.tgz#d0d3912865911bb8fac5afb4e3acfa6a28dc72b7" + resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz" integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg== dependencies: type-detect "^4.0.0" @@ -1122,44 +1127,44 @@ deep-equal-in-any-order@1.1.20: default-require-extensions@^3.0.0: version "3.0.1" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-3.0.1.tgz#bfae00feeaeada68c2ae256c62540f60b80625bd" + resolved "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.1.tgz" integrity sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw== dependencies: strip-bom "^4.0.0" diff@^3.1.0: version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + resolved "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz" integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== diff@^4.0.1: version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + resolved "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== diff@^5.2.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" + resolved "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz" integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== electron-to-chromium@^1.5.73: version "1.5.92" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.92.tgz#81e8ebe06f8e2a49fdba84bd10e9ad5b63efffe0" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.92.tgz" integrity sha512-BeHgmNobs05N1HMmMZ7YIuHfYBGlq/UmvlsTgg+fsbFs9xVMj+xJHFg19GN04+9Q+r8Xnh9LXqaYIyEWElnNgQ== emoji-regex@^8.0.0: version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== es6-error@^4.0.1: version "4.1.1" - resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" + resolved "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz" integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== esbuild@~0.25.0: version "0.25.2" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.25.2.tgz#55a1d9ebcb3aa2f95e8bba9e900c1a5061bc168b" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.25.2.tgz" integrity sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ== optionalDependencies: "@esbuild/aix-ppc64" "0.25.2" @@ -1190,22 +1195,22 @@ esbuild@~0.25.0: escalade@^3.1.1, escalade@^3.2.0: version "3.2.0" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + resolved "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz" integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== escape-string-regexp@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== esprima@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== external-editor@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + resolved "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz" integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== dependencies: chardet "^0.7.0" @@ -1214,19 +1219,19 @@ external-editor@^3.1.0: fdir@^6.4.2: version "6.4.3" - resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.4.3.tgz#011cdacf837eca9b811c89dbb902df714273db72" + resolved "https://registry.npmjs.org/fdir/-/fdir-6.4.3.tgz" integrity sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw== fill-range@^7.1.1: version "7.1.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz" integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== dependencies: to-regex-range "^5.0.1" find-cache-dir@^3.2.0: version "3.3.2" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" + resolved "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz" integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== dependencies: commondir "^1.0.1" @@ -1235,7 +1240,7 @@ find-cache-dir@^3.2.0: find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== dependencies: locate-path "^5.0.0" @@ -1243,7 +1248,7 @@ find-up@^4.0.0, find-up@^4.1.0: find-up@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== dependencies: locate-path "^6.0.0" @@ -1251,12 +1256,12 @@ find-up@^5.0.0: flat@^5.0.2: version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + resolved "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== foreground-child@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-2.0.0.tgz#71b32800c9f15aa8f2f83f4a6bd9bff35d861a53" + resolved "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz" integrity sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA== dependencies: cross-spawn "^7.0.0" @@ -1264,7 +1269,7 @@ foreground-child@^2.0.0: foreground-child@^3.3.0: version "3.3.0" - resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.0.tgz#0ac8644c06e431439f8561db8ecf29a7b5519c77" + resolved "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz" integrity sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg== dependencies: cross-spawn "^7.0.0" @@ -1272,56 +1277,56 @@ foreground-child@^3.3.0: fromentries@^1.2.0: version "1.3.2" - resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.3.2.tgz#e4bca6808816bf8f93b52750f1127f5a6fd86e3a" + resolved "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz" integrity sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg== fs.realpath@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@~2.3.2, fsevents@~2.3.3: version "2.3.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== gensync@^1.0.0-beta.2: version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== get-func-name@^2.0.1, get-func-name@^2.0.2: version "2.0.2" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" + resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz" integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== get-package-type@^0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== get-tsconfig@^4.7.5: version "4.10.0" - resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.10.0.tgz#403a682b373a823612475a4c2928c7326fc0f6bb" + resolved "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.0.tgz" integrity sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A== dependencies: resolve-pkg-maps "^1.0.0" glob-parent@~5.1.2: version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" @@ -1333,7 +1338,7 @@ glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: glob@^8.1.0: version "8.1.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== dependencies: fs.realpath "^1.0.0" @@ -1344,22 +1349,22 @@ glob@^8.1.0: globals@^11.1.0: version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== graceful-fs@^4.1.15: version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== has-flag@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== hasha@^5.0.0: version "5.2.2" - resolved "https://registry.yarnpkg.com/hasha/-/hasha-5.2.2.tgz#a48477989b3b327aea3c04f53096d816d97522a1" + resolved "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz" integrity sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ== dependencies: is-stream "^2.0.0" @@ -1367,34 +1372,34 @@ hasha@^5.0.0: he@^1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== html-escaper@^2.0.0: version "2.0.2" - resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== iconv-lite@^0.4.24: version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" imurmurhash@^0.1.4: version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== indent-string@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + resolved "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== inflight@^1.0.4: version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" @@ -1402,83 +1407,83 @@ inflight@^1.0.4: inherits@2: version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== is-binary-path@~2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz" integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== dependencies: binary-extensions "^2.0.0" is-extglob@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== is-fullwidth-code-point@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" is-number@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== is-plain-obj@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== is-stream@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== is-typedarray@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== is-unicode-supported@^0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== is-windows@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + resolved "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== isexe@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: version "3.2.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" + resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz" integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== istanbul-lib-hook@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz#8f84c9434888cc6b1d0a9d7092a76d239ebf0cc6" + resolved "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz" integrity sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ== dependencies: append-transform "^2.0.0" istanbul-lib-instrument@^5.0.4: version "5.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" + resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz" integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== dependencies: "@babel/core" "^7.12.3" @@ -1489,7 +1494,7 @@ istanbul-lib-instrument@^5.0.4: istanbul-lib-instrument@^6.0.2: version "6.0.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" + resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz" integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== dependencies: "@babel/core" "^7.23.9" @@ -1500,7 +1505,7 @@ istanbul-lib-instrument@^6.0.2: istanbul-lib-processinfo@^2.0.2: version "2.0.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz#366d454cd0dcb7eb6e0e419378e60072c8626169" + resolved "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz" integrity sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg== dependencies: archy "^1.0.0" @@ -1512,7 +1517,7 @@ istanbul-lib-processinfo@^2.0.2: istanbul-lib-report@^3.0.0: version "3.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz" integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== dependencies: istanbul-lib-coverage "^3.0.0" @@ -1521,7 +1526,7 @@ istanbul-lib-report@^3.0.0: istanbul-lib-source-maps@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" + resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz" integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== dependencies: debug "^4.1.1" @@ -1530,7 +1535,7 @@ istanbul-lib-source-maps@^4.0.0: istanbul-reports@^3.0.2: version "3.1.7" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz#daed12b9e1dca518e15c056e1e537e741280fa0b" + resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz" integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== dependencies: html-escaper "^2.0.0" @@ -1538,12 +1543,12 @@ istanbul-reports@^3.0.2: js-tokens@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1: version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: argparse "^1.0.7" @@ -1551,45 +1556,45 @@ js-yaml@^3.13.1: js-yaml@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" jsesc@^3.0.2: version "3.1.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" + resolved "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz" integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== json5@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" + resolved "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz" integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== dependencies: minimist "^1.2.0" json5@^2.2.3: version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== locate-path@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== dependencies: p-locate "^4.1.0" locate-path@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== dependencies: p-locate "^5.0.0" lodash.flattendeep@^4.4.0: version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" + resolved "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz" integrity sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ== lodash.mapvalues@^4.6.0: @@ -1604,7 +1609,7 @@ lodash@^4.17.21: log-symbols@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz" integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== dependencies: chalk "^4.1.0" @@ -1612,73 +1617,73 @@ log-symbols@^4.1.0: loupe@^2.3.6: version "2.3.7" - resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" + resolved "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz" integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== dependencies: get-func-name "^2.0.1" lru-cache@^5.1.1: version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== dependencies: yallist "^3.0.2" make-dir@^3.0.0, make-dir@^3.0.2: version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + resolved "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz" integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== dependencies: semver "^6.0.0" make-dir@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + resolved "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz" integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== dependencies: semver "^7.5.3" make-error@^1.1.1: version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== minimatch@^3.0.4, minimatch@^3.1.1: version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" minimatch@^5.0.1, minimatch@^5.1.6: version "5.1.6" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz" integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== dependencies: brace-expansion "^2.0.1" minimatch@^9.0.4: version "9.0.5" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz" integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== dependencies: brace-expansion "^2.0.1" minimist@^1.2.0, minimist@^1.2.6: version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== mkdirp@^0.5.1: version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== dependencies: minimist "^1.2.6" mocha@10.8.2: version "10.8.2" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.8.2.tgz#8d8342d016ed411b12a429eb731b825f961afb96" + resolved "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz" integrity sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg== dependencies: ansi-colors "^4.1.3" @@ -1704,34 +1709,34 @@ mocha@10.8.2: ms@^2.1.3: version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== mute-stream@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-2.0.0.tgz#a5446fc0c512b71c83c44d908d5c7b7b4c493b2b" + resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz" integrity sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA== node-preload@^0.2.1: version "0.2.1" - resolved "https://registry.yarnpkg.com/node-preload/-/node-preload-0.2.1.tgz#c03043bb327f417a18fee7ab7ee57b408a144301" + resolved "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz" integrity sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ== dependencies: process-on-spawn "^1.0.0" node-releases@^2.0.19: version "2.0.19" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.19.tgz#9e445a52950951ec4d177d843af370b411caf314" + resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz" integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== nyc@17.1.0: version "17.1.0" - resolved "https://registry.yarnpkg.com/nyc/-/nyc-17.1.0.tgz#b6349a401a62ffeb912bd38ea9a018839fdb6eb1" + resolved "https://registry.npmjs.org/nyc/-/nyc-17.1.0.tgz" integrity sha512-U42vQ4czpKa0QdI1hu950XuNhYqgoM+ZF1HT+VuUHL9hPfDPVvNQyltmMqdE9bUHMVa+8yNbc3QKTj8zQhlVxQ== dependencies: "@istanbuljs/load-nyc-config" "^1.0.0" @@ -1764,59 +1769,59 @@ nyc@17.1.0: once@^1.3.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" os-tmpdir@~1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + resolved "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== p-limit@^2.2.0: version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" p-limit@^3.0.2: version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: yocto-queue "^0.1.0" p-locate@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== dependencies: p-limit "^2.2.0" p-locate@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== dependencies: p-limit "^3.0.2" p-map@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d" + resolved "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz" integrity sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ== dependencies: aggregate-error "^3.0.0" p-try@^2.0.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== package-hash@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/package-hash/-/package-hash-4.0.0.tgz#3537f654665ec3cc38827387fc904c163c54f506" + resolved "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz" integrity sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ== dependencies: graceful-fs "^4.1.15" @@ -1826,158 +1831,158 @@ package-hash@^4.0.0: path-browserify@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" + resolved "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz" integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== path-exists@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== path-is-absolute@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== path-key@^3.1.0: version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== pathval@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + resolved "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== picocolors@^1.0.0, picocolors@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== picomatch@^2.0.4, picomatch@^2.2.1: version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== picomatch@^4.0.2: version "4.0.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.2.tgz#77c742931e8f3b8820946c76cd0c1f13730d1dab" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz" integrity sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg== pkg-dir@^4.1.0: version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== dependencies: find-up "^4.0.0" process-on-spawn@^1.0.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/process-on-spawn/-/process-on-spawn-1.1.0.tgz#9d5999ba87b3bf0a8acb05322d69f2f5aa4fb763" + resolved "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.1.0.tgz" integrity sha512-JOnOPQ/8TZgjs1JIH/m9ni7FfimjNa/PRx7y/Wb5qdItsnhO0jE4AT7fC0HjC28DUQWDr50dwSYZLdRMlqDq3Q== dependencies: fromentries "^1.2.0" randombytes@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" readdirp@~3.6.0: version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== dependencies: picomatch "^2.2.1" release-zalgo@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730" + resolved "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz" integrity sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA== dependencies: es6-error "^4.0.1" require-directory@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== require-main-filename@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== resolve-from@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== resolve-pkg-maps@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + resolved "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz" integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== rimraf@^3.0.0: version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" safe-buffer@^5.1.0: version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== "safer-buffer@>= 2.1.2 < 3": version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: version "6.3.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== semver@^7.5.3, semver@^7.5.4: version "7.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.1.tgz#abd5098d82b18c6c81f6074ff2647fd3e7220c9f" + resolved "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz" integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA== serialize-javascript@^6.0.2: version "6.0.2" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz" integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== dependencies: randombytes "^2.1.0" set-blocking@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== shebang-command@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== dependencies: shebang-regex "^3.0.0" shebang-regex@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== signal-exit@^3.0.2: version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== signal-exit@^4.0.1, signal-exit@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== sort-any@^2.0.0: @@ -1989,7 +1994,7 @@ sort-any@^2.0.0: source-map-support@^0.5.6: version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== dependencies: buffer-from "^1.0.0" @@ -1997,12 +2002,12 @@ source-map-support@^0.5.6: source-map@^0.6.0, source-map@^0.6.1: version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== spawn-wrap@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-2.0.0.tgz#103685b8b8f9b79771318827aa78650a610d457e" + resolved "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz" integrity sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg== dependencies: foreground-child "^2.0.0" @@ -2014,12 +2019,12 @@ spawn-wrap@^2.0.0: sprintf-js@~1.0.2: version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: emoji-regex "^8.0.0" @@ -2028,43 +2033,43 @@ string-width@^4.1.0, string-width@^4.2.0: strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: ansi-regex "^5.0.1" strip-bom@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== strip-bom@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz" integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== strip-json-comments@^3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== supports-color@^7.1.0: version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" supports-color@^8.1.1: version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: has-flag "^4.0.0" test-exclude@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== dependencies: "@istanbuljs/schema" "^0.1.2" @@ -2073,7 +2078,7 @@ test-exclude@^6.0.0: tinyglobby@^0.2.9: version "0.2.10" - resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.10.tgz#e712cf2dc9b95a1f5c5bbd159720e15833977a0f" + resolved "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.10.tgz" integrity sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew== dependencies: fdir "^6.4.2" @@ -2081,21 +2086,21 @@ tinyglobby@^0.2.9: tmp@^0.0.33: version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz" integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== dependencies: os-tmpdir "~1.0.2" to-regex-range@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== dependencies: is-number "^7.0.0" ts-mocha@10.0.0: version "10.0.0" - resolved "https://registry.yarnpkg.com/ts-mocha/-/ts-mocha-10.0.0.tgz#41a8d099ac90dbbc64b06976c5025ffaebc53cb9" + resolved "https://registry.npmjs.org/ts-mocha/-/ts-mocha-10.0.0.tgz" integrity sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw== dependencies: ts-node "7.0.1" @@ -2104,7 +2109,7 @@ ts-mocha@10.0.0: ts-morph@24.0.0: version "24.0.0" - resolved "https://registry.yarnpkg.com/ts-morph/-/ts-morph-24.0.0.tgz#6249b526ade40cf99c8803e7abdae6c65882e58e" + resolved "https://registry.npmjs.org/ts-morph/-/ts-morph-24.0.0.tgz" integrity sha512-2OAOg/Ob5yx9Et7ZX4CvTCc0UFoZHwLEJ+dpDPSUi5TgwwlTlX47w+iFRrEwzUZwYACjq83cgjS/Da50Ga37uw== dependencies: "@ts-morph/common" "~0.25.0" @@ -2112,7 +2117,7 @@ ts-morph@24.0.0: ts-node@10.9.2: version "10.9.2" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz" integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== dependencies: "@cspotcode/source-map-support" "^0.8.0" @@ -2131,7 +2136,7 @@ ts-node@10.9.2: ts-node@7.0.1: version "7.0.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-7.0.1.tgz#9562dc2d1e6d248d24bc55f773e3f614337d9baf" + resolved "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz" integrity sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw== dependencies: arrify "^1.0.0" @@ -2145,7 +2150,7 @@ ts-node@7.0.1: tsconfig-paths@^3.5.0: version "3.15.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" + resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz" integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== dependencies: "@types/json5" "^0.0.29" @@ -2155,7 +2160,7 @@ tsconfig-paths@^3.5.0: tsx@4.19.3: version "4.19.3" - resolved "https://registry.yarnpkg.com/tsx/-/tsx-4.19.3.tgz#2bdbcb87089374d933596f8645615142ed727666" + resolved "https://registry.npmjs.org/tsx/-/tsx-4.19.3.tgz" integrity sha512-4H8vUNGNjQ4V2EOoGw005+c+dGuPSnhpPBPHBtsZdGZBk/iJb4kguGlPWaZTZ3q5nMtFOEsY0nRDlh9PJyd6SQ== dependencies: esbuild "~0.25.0" @@ -2165,39 +2170,39 @@ tsx@4.19.3: type-detect@^4.0.0, type-detect@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.1.0.tgz#deb2453e8f08dcae7ae98c626b13dddb0155906c" + resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz" integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== type-fest@^0.21.3: version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== type-fest@^0.8.0: version "0.8.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== typedarray-to-buffer@^3.1.5: version "3.1.5" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + resolved "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz" integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== dependencies: is-typedarray "^1.0.0" typescript@5.7.2: version "5.7.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz" integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg== undici-types@~6.19.8: version "6.19.8" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz" integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== update-browserslist-db@^1.1.1: version "1.1.2" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz#97e9c96ab0ae7bcac08e9ae5151d26e6bc6b5580" + resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz" integrity sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg== dependencies: escalade "^3.2.0" @@ -2205,34 +2210,34 @@ update-browserslist-db@^1.1.1: uuid@^8.3.2: version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== v8-compile-cache-lib@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== which-module@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" + resolved "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz" integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== which@^2.0.1: version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" workerpool@^6.5.1: version "6.5.1" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" + resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz" integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== wrap-ansi@^6.2.0: version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz" integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== dependencies: ansi-styles "^4.0.0" @@ -2241,7 +2246,7 @@ wrap-ansi@^6.2.0: wrap-ansi@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: ansi-styles "^4.0.0" @@ -2250,12 +2255,12 @@ wrap-ansi@^7.0.0: wrappy@1: version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== write-file-atomic@^3.0.0: version "3.0.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" + resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz" integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== dependencies: imurmurhash "^0.1.4" @@ -2265,22 +2270,22 @@ write-file-atomic@^3.0.0: y18n@^4.0.0: version "4.0.3" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + resolved "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz" integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== y18n@^5.0.5: version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== yallist@^3.0.2: version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== yargs-parser@^18.1.2: version "18.1.3" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz" integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== dependencies: camelcase "^5.0.0" @@ -2288,12 +2293,12 @@ yargs-parser@^18.1.2: yargs-parser@^20.2.2, yargs-parser@^20.2.9: version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== yargs-unparser@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + resolved "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz" integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== dependencies: camelcase "^6.0.0" @@ -2303,7 +2308,7 @@ yargs-unparser@^2.0.0: yargs@^15.0.2: version "15.4.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + resolved "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz" integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== dependencies: cliui "^6.0.0" @@ -2320,7 +2325,7 @@ yargs@^15.0.2: yargs@^16.2.0: version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== dependencies: cliui "^7.0.2" @@ -2333,20 +2338,20 @@ yargs@^16.2.0: yn@3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== yn@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" + resolved "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz" integrity sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ== yocto-queue@^0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== yoctocolors-cjs@^2.1.2: version "2.1.2" - resolved "https://registry.yarnpkg.com/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz#f4b905a840a37506813a7acaa28febe97767a242" + resolved "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz" integrity sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==