diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index f05d0ad..0000000 --- a/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -src/parser/generated/* \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index ac75792..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint', 'prettier'], - extends: ['plugin:@typescript-eslint/recommended'], - rules: { - 'no-console': 'error', - '@typescript-eslint/no-explicit-any': 1, - }, -}; diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..4769ff0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,42 @@ +--- +name: Bug Report +about: Report a bug or unexpected behavior +title: '' +labels: bug +assignees: '' +--- + +## Description + +A clear description of the bug. + +## Steps to Reproduce + +```javascript +import { query } from 'jsonpathly'; + +const data = { + // your test data +}; + +const result = query(data, '$.your.path'); +console.log(result); +``` + +## Expected Behavior + +What you expected to happen. + +## Actual Behavior + +What actually happened. + +## Environment + +- jsonpathly version: +- Node.js version: +- OS: + +## Additional Context + +Any other relevant information (RFC reference, related issues, etc.) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..4a4e79c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,38 @@ +--- +name: Feature Request +about: Suggest a new feature or enhancement +title: '' +labels: enhancement +assignees: '' +--- + +## Summary + +A brief description of the feature. + +## Use Case + +Why is this feature needed? What problem does it solve? + +## Proposed Solution + +How should this feature work? + +```javascript +// Example of desired API/behavior +import { query } from 'jsonpathly'; + +const result = query(data, '$.proposed.syntax'); +``` + +## Alternatives Considered + +Any alternative approaches you've considered. + +## RFC Reference + +If applicable, reference to RFC 9535 or other JSONPath specifications. + +## Additional Context + +Any other relevant information. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..1743ed4 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,27 @@ +## Description + +Brief description of the changes. + +## Type of Change + +- [ ] Bug fix (non-breaking change that fixes an issue) +- [ ] New feature (non-breaking change that adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to change) +- [ ] Documentation update + +## Checklist + +- [ ] I have read the [CONTRIBUTING](../CONTRIBUTING.md) guide +- [ ] My code follows the project's code style +- [ ] I have added tests that prove my fix/feature works +- [ ] All new and existing tests pass (`npm test`) +- [ ] I have updated the documentation if needed +- [ ] I have updated CHANGELOG.md if this is a user-facing change + +## Related Issues + +Fixes #(issue number) + +## RFC 9535 Reference + +If applicable, reference the relevant RFC 9535 section. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e11b1c4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,64 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18, 20, 22] + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Run tests + run: npm test + + - name: Run linter + run: npm run lint + + coverage: + runs-on: ubuntu-latest + needs: test + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Run coverage + run: npx c8 --reporter=text --reporter=lcov npm test + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + file: ./coverage/lcov.info + fail_ci_if_error: false diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..b154c36 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,43 @@ +name: Publish to npm + +on: + push: + tags: + - 'v*' + +permissions: + id-token: write # Required for OIDC trusted publishing + contents: write # Required for GitHub release creation + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Run tests + run: npm test + + # No NPM_TOKEN needed - uses OIDC trusted publishing + # Provenance is automatic with trusted publishing + - name: Publish to npm + run: npm publish --access public + + - name: Create GitHub Release + uses: softprops/action-gh-release@v1 + with: + generate_release_notes: true diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6d95452 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,62 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [3.0.0] - 2025-01-09 + +### Breaking Changes + +- **Path format**: Changed from double quotes to single quotes per RFC 9535 + - Before: `$["store"]["book"][0]` + - After: `$['store']['book'][0]` + +### Added + +- RFC 9535 compliant functions: `length()`, `count()`, `match()`, `search()`, `value()` +- I-Regexp validation for `match()` and `search()` patterns +- Filter expressions without parentheses: `$[?@.price > 10]` +- Empty nodelist comparison support +- Integer range validation (I-JSON bounds) +- Comprehensive JSDoc documentation for all public APIs + +### Changed + +- Replaced ANTLR4 parser with Peggy for smaller bundle size +- Replaced webpack with tsup for faster builds +- Zero runtime dependencies (removed fast-deep-equal) +- Modularized codebase (extracted comparators, functions) + +### Fixed + +- Nested filter expressions in boolean context (Issue #14) +- Filters on primitive arrays (Issue #12) + +## [2.0.2] - 2024-XX-XX + +### Fixed + +- Incorrect module import + +## [2.0.1] - 2024-XX-XX + +### Fixed + +- GitHub Actions cache version + +## [2.0.0] - 2024-XX-XX + +### Changed + +- Updated ANTLR4 version +- NodeJS webpack config fix + +[Unreleased]: https://github.com/atamano/jsonpathly/compare/v3.0.0...HEAD +[3.0.0]: https://github.com/atamano/jsonpathly/compare/v2.0.2...v3.0.0 +[2.0.2]: https://github.com/atamano/jsonpathly/compare/v2.0.1...v2.0.2 +[2.0.1]: https://github.com/atamano/jsonpathly/compare/v2.0.0...v2.0.1 +[2.0.0]: https://github.com/atamano/jsonpathly/releases/tag/v2.0.0 diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..f8eaa25 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,97 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +jsonpathly is a secure, eval-free TypeScript library for querying JSON documents using JSONPath expressions. It is RFC 9535 compliant and uses Peggy for parsing (zero runtime dependencies). + +## Common Commands + +```bash +# Run all tests +npm test + +# Run a single test file +npx mocha --require ts-node/register --timeout 60000 --exit tests/.ts + +# Run tests with coverage +npx c8 npm test + +# Build (generates dist/ with cjs and esm) +npm run build + +# Lint +npm run lint + +# Format code +npm run format + +# Regenerate parser (after modifying jsonpath.peggy) +npm run gen + +# Release (bumps version, commits, tags, pushes - CI publishes to npm) +npm run release:patch # 3.0.0 -> 3.0.1 +npm run release:minor # 3.0.0 -> 3.1.0 +npm run release:major # 3.0.0 -> 4.0.0 +``` + +## Architecture + +### Entry Point +- `src/index.ts` - Exports the public API: `query`, `paths`, `parse`, `stringify`, `JSONPathSyntaxError` + +### Parser Layer (`src/parser/`) +- `jsonpath.peggy` - Peggy grammar defining JSONPath syntax (RFC 9535 compliant) +- `generated/parser.js` - Auto-generated parser (do not edit manually) +- `parse.ts` - Converts JSONPath string to AST using Peggy parser +- `types.ts` - TypeScript types for the AST nodes (Root, Subscript, FilterExpression, FunctionCall, etc.) +- `stringify.ts` - Converts AST back to JSONPath string (with RFC 9535 normalized escaping) +- `errors.ts` - Custom syntax error class + +### Handler Layer (`src/handler/`) +- `Handler.ts` - Core query engine that traverses JSON using the AST +- `query.ts` - Public `query()` function wrapping Handler +- `paths.ts` - Public `paths()` function returning matched paths +- `functions.ts` - RFC 9535 function implementations (`length`, `count`, `match`, `search`, `value`) +- `comparators.ts` - Filter comparison operators (`==`, `!=`, `<`, `<=`, `>`, `>=`, `in`, etc.) +- `helper.ts` - Type guards and utility functions (`isEqual`, `isArray`, `isPlainObject`) + +### Key Design Patterns +- **AST-based evaluation**: JSONPath is parsed into a typed AST (`Root` -> `Subscript` chain), then the Handler walks both the AST and JSON simultaneously +- **ValuePath tracking**: Handler maintains both values and their JSONPath locations throughout traversal +- **Indefinite results**: Operations like `..` or `*` return arrays, tracked via `isIndefinite` flag +- **I-Regexp validation**: `match()` and `search()` validate patterns against RFC 9485 I-Regexp subset + +## Build Output + +tsup builds to `dist/`: +- `index.cjs` - CommonJS build +- `index.mjs` - ES Module build +- `index.d.ts` / `index.d.mts` - Type declarations + +Zero runtime dependencies - Peggy generates a standalone parser at build time. + +## Testing + +Test files in `tests/`: +- `query.test.ts` - Core query functionality +- `paths.test.ts` - Path output formatting +- `parse.test.ts` - Parser and stringify round-trips +- `rfc9535-compliance.test.ts` - RFC 9535 specific tests +- `consensus.test.ts` - Cross-implementation compatibility (uses `data/consensus-tests.ts`) +- `extensions.test.ts` - jsonpathly-specific extensions (in, nin, subsetof, etc.) +- `api.test.ts` - Public API contracts +- `module-resolution.test.ts` - ESM/CJS build verification + +**Note:** ~70 consensus tests are intentionally skipped (pending). These represent: +- RFC 9535 semantic differences (jsonpathly follows the RFC strictly) +- Ambiguous syntax with no standard behavior across implementations + +## RFC 9535 Compliance + +jsonpathly is fully RFC 9535 compliant: +- Normalized path format uses single quotes: `$['key']` not `$["key"]` +- I-Regexp validation (RFC 9485) for `match()` and `search()` +- I-JSON integer range validation +- All 5 function extensions: `length`, `count`, `match`, `search`, `value` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..eecd8bd --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,143 @@ +# Contributing to jsonpathly + +Thank you for your interest in contributing to jsonpathly! This document provides guidelines and instructions for contributing. + +## Development Setup + +1. **Fork and clone the repository** + ```bash + git clone https://github.com/YOUR_USERNAME/jsonpathly.git + cd jsonpathly + ``` + +2. **Install dependencies** + ```bash + npm install + ``` + +3. **Run tests** + ```bash + npm test + ``` + +4. **Build the project** + ```bash + npm run build + ``` + +## Project Structure + +``` +src/ +├── index.ts # Public API exports +├── handler/ +│ ├── Handler.ts # Core query engine +│ ├── query.ts # query() function +│ ├── paths.ts # paths() function +│ ├── comparators.ts # Filter comparators (==, <, in, etc.) +│ ├── functions.ts # RFC 9535 functions (length, match, etc.) +│ └── helper.ts # Type guards and utilities +└── parser/ + ├── jsonpath.peggy # Peggy grammar (source of truth) + ├── parse.ts # parse() function + ├── stringify.ts # stringify() function + ├── types.ts # AST type definitions + ├── errors.ts # JSONPathSyntaxError + └── generated/ # Auto-generated parser (do not edit) +``` + +## Development Workflow + +### Making Changes + +1. Create a feature branch from `master` + ```bash + git checkout -b feature/your-feature-name + ``` + +2. Make your changes + +3. If you modified the grammar (`jsonpath.peggy`), regenerate the parser: + ```bash + npm run gen + ``` + +4. Run tests and linting: + ```bash + npm test + npm run lint + ``` + +5. Commit your changes with a descriptive message + +### Commit Messages + +We follow conventional commit style: + +- `feat:` New feature +- `fix:` Bug fix +- `docs:` Documentation only +- `refactor:` Code change that neither fixes a bug nor adds a feature +- `test:` Adding or updating tests +- `chore:` Maintenance tasks + +Examples: +``` +feat: add support for custom functions +fix: handle empty arrays in slice expressions +docs: update API documentation +``` + +### Pull Requests + +1. Push your branch to your fork +2. Open a PR against `master` +3. Fill in the PR template +4. Wait for CI checks to pass +5. Address any review feedback + +## Testing + +### Running Tests + +```bash +# Run all tests +npm test + +# Run specific test file +npx mocha --require ts-node/register tests/query.test.ts + +# Run with coverage +npx c8 npm test +``` + +### Writing Tests + +- Add tests for any new functionality +- Place tests in the appropriate file in `tests/` +- Follow existing test patterns and naming conventions +- Ensure edge cases are covered + +## Code Style + +- We use Prettier for formatting +- We use ESLint for linting +- Run `npm run format` before committing + +## RFC 9535 Compliance + +jsonpathly aims to be RFC 9535 compliant. When making changes: + +1. Reference the RFC for expected behavior +2. Add tests that verify RFC compliance +3. Document any intentional deviations + +## Reporting Issues + +- Use GitHub Issues for bug reports and feature requests +- Include a minimal reproduction case for bugs +- Check existing issues before creating new ones + +## Questions? + +Feel free to open a GitHub Discussion or Issue if you have questions about contributing. diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..cb99383 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,26 @@ +const tseslint = require('@typescript-eslint/eslint-plugin'); +const tsparser = require('@typescript-eslint/parser'); + +module.exports = [ + { + ignores: ['src/parser/generated/*', 'dist/*', 'node_modules/*'], + }, + { + files: ['src/**/*.ts'], + languageOptions: { + parser: tsparser, + parserOptions: { + ecmaVersion: 2020, + sourceType: 'module', + }, + }, + plugins: { + '@typescript-eslint': tseslint, + }, + rules: { + ...tseslint.configs.recommended.rules, + 'no-console': 'error', + '@typescript-eslint/no-explicit-any': 'warn', + }, + }, +]; diff --git a/package-lock.json b/package-lock.json index cce47ce..a1a45da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,51 +1,28 @@ { "name": "jsonpathly", - "version": "2.0.3", + "version": "3.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "jsonpathly", - "version": "2.0.3", + "version": "3.0.0", "license": "MIT", - "dependencies": { - "antlr4": "^4.13.2", - "fast-deep-equal": "^3.1.3" - }, "devDependencies": { "@types/chai": "^4.3.6", "@types/mocha": "^10.0.1", - "@typescript-eslint/eslint-plugin": "^2.22.0", - "@typescript-eslint/parser": "^2.22.0", - "babel-eslint": "^10.1.0", - "babel-loader": "8.2.3", + "@typescript-eslint/eslint-plugin": "^8.52.0", + "@typescript-eslint/parser": "^8.52.0", + "c8": "^10.1.3", "chai": "^4.3.8", - "core-js": "^3.22.5", - "eslint": "^6.8.0", - "eslint-config-prettier": "^6.11.0", - "eslint-plugin-prettier": "^3.1.3", + "eslint": "^9.39.2", "lint-staged": "^10.0.8", "mocha": "^10.2.0", + "peggy": "^5.0.6", "prettier": "^2.6.2", - "ts-loader": "^9.4.4", - "ts-node": "^10.9.1", - "typescript": "^4.9.5", - "webpack": "^5.88.2", - "webpack-cli": "^5.1.4" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", - "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" + "ts-node": "^10.9.2", + "tsup": "^8.5.1", + "typescript": "^5.9.3" } }, "node_modules/@babel/code-frame": { @@ -61,407 +38,1223 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/compat-data": { + "node_modules/@babel/helper-validator-identifier": { "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.20.tgz", - "integrity": "sha512-BQYjKbpXjoXwFW5jGqiizJQQT/aC7pFm9Ok1OWssonuguICi264lbgMzRp2ZMmRSlfkX6DsWDDcsrctK8Rwfiw==", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, - "peer": true, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/core": { - "version": "7.17.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.10.tgz", - "integrity": "sha512-liKoppandF3ZcBnIYFjfSDHZLKdLHGJRkoWtG8zQyGJBQfIYobpnVGI5+pLBNtS6psFLDzyq8+h5HiVljW9PNA==", + "node_modules/@babel/highlight": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, - "peer": true, "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.10", - "@babel/helper-compilation-targets": "^7.17.10", - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helpers": "^7.17.9", - "@babel/parser": "^7.17.10", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.10", - "@babel/types": "^7.17.10", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" }, "engines": { "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/generator": { - "version": "7.17.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.10.tgz", - "integrity": "sha512-46MJZZo9y3o4kmhBVc7zW7i8dtR1oIK/sdO5NcfcZRhTGYi+KKJRtHNgsU6c4VUcJmUNV/LQdebD/9Dlv4K+Tg==", + "node_modules/@bcoe/v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz", + "integrity": "sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==", "dev": true, - "dependencies": { - "@babel/types": "^7.17.10", - "@jridgewell/gen-mapping": "^0.1.0", - "jsesc": "^2.5.1" - }, + "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": ">=18" } }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", - "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, - "peer": true, "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.15", - "browserslist": "^4.21.9", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" + "@jridgewell/trace-mapping": "0.3.9" }, "engines": { - "node": ">=6.9.0" + "node": ">=12" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, - "peer": true, "dependencies": { - "yallist": "^3.0.2" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "peer": true - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "node_modules/@esbuild/aix-ppc64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.2.tgz", + "integrity": "sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==", + "cpu": [ + "ppc64" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], "engines": { - "node": ">=6.9.0" + "node": ">=18" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "node_modules/@esbuild/android-arm": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.2.tgz", + "integrity": "sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==", + "cpu": [ + "arm" + ], "dev": true, - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - }, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=6.9.0" + "node": ">=18" } }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "node_modules/@esbuild/android-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.2.tgz", + "integrity": "sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=6.9.0" + "node": ">=18" } }, - "node_modules/@babel/helper-module-imports": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", - "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "node_modules/@esbuild/android-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.2.tgz", + "integrity": "sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==", + "cpu": [ + "x64" + ], "dev": true, - "peer": true, - "dependencies": { - "@babel/types": "^7.22.15" - }, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=6.9.0" + "node": ">=18" } }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.20.tgz", - "integrity": "sha512-dLT7JVWIUUxKOs1UnJUBR3S70YK+pKX6AbJgB2vMIvEkZkrfJDbYDJesnPshtKV4LhDOR3Oc5YULeDizRek+5A==", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.2.tgz", + "integrity": "sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==", + "cpu": [ + "arm64" + ], "dev": true, - "peer": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" - }, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": ">=18" } }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "node_modules/@esbuild/darwin-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.2.tgz", + "integrity": "sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==", + "cpu": [ + "x64" + ], "dev": true, - "peer": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=6.9.0" + "node": ">=18" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.2.tgz", + "integrity": "sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=6.9.0" + "node": ">=18" } }, - "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "node_modules/@esbuild/freebsd-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.2.tgz", + "integrity": "sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==", + "cpu": [ + "x64" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=6.9.0" + "node": ">=18" } }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "node_modules/@esbuild/linux-arm": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.2.tgz", + "integrity": "sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==", + "cpu": [ + "arm" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" + "node": ">=18" } }, - "node_modules/@babel/helper-validator-option": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", - "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", + "node_modules/@esbuild/linux-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.2.tgz", + "integrity": "sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==", + "cpu": [ + "arm64" + ], "dev": true, - "peer": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" + "node": ">=18" } }, - "node_modules/@babel/helpers": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.9.tgz", - "integrity": "sha512-cPCt915ShDWUEzEp3+UNRktO2n6v49l5RSnG9M5pS24hA+2FAc5si+Pn1i4VVbQQ+jh+bIZhPFQOJOzbrOYY1Q==", + "node_modules/@esbuild/linux-ia32": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.2.tgz", + "integrity": "sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==", + "cpu": [ + "ia32" + ], "dev": true, - "peer": true, - "dependencies": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.9", - "@babel/types": "^7.17.0" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" + "node": ">=18" } }, - "node_modules/@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "node_modules/@esbuild/linux-loong64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.2.tgz", + "integrity": "sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==", + "cpu": [ + "loong64" + ], "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" + "node": ">=18" } }, - "node_modules/@babel/parser": { - "version": "7.22.16", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.16.tgz", - "integrity": "sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA==", + "node_modules/@esbuild/linux-mips64el": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.2.tgz", + "integrity": "sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==", + "cpu": [ + "mips64el" + ], "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.0.0" + "node": ">=18" } }, - "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "node_modules/@esbuild/linux-ppc64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.2.tgz", + "integrity": "sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==", + "cpu": [ + "ppc64" + ], "dev": true, - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" + "node": ">=18" } }, - "node_modules/@babel/traverse": { - "version": "7.17.10", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.10.tgz", - "integrity": "sha512-VmbrTHQteIdUUQNTb+zE12SHS/xQVIShmBPhlNP12hD5poF2pbITW1Z4172d03HegaQWhLffdkRJYtAzp0AGcw==", + "node_modules/@esbuild/linux-riscv64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.2.tgz", + "integrity": "sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==", + "cpu": [ + "riscv64" + ], "dev": true, - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.10", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.10", - "@babel/types": "^7.17.10", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" + "node": ">=18" } }, - "node_modules/@babel/types": { - "version": "7.22.19", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.19.tgz", - "integrity": "sha512-P7LAw/LbojPzkgp5oznjE6tQEIWbp4PkkfrZDINTro9zgBRtI324/EYsiSI7lhPbpIQ+DCeR2NNmMWANGGfZsg==", + "node_modules/@esbuild/linux-s390x": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.2.tgz", + "integrity": "sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==", + "cpu": [ + "s390x" + ], "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.19", - "to-fast-properties": "^2.0.0" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" + "node": ">=18" } }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "node_modules/@esbuild/linux-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.2.tgz", + "integrity": "sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=12" + "node": ">=18" } }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.2.tgz", + "integrity": "sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "node_modules/@esbuild/netbsd-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.2.tgz", + "integrity": "sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==", + "cpu": [ + "x64" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], "engines": { - "node": ">=10.0.0" + "node": ">=18" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.2.tgz", + "integrity": "sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - }, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], "engines": { - "node": ">=6.0.0" + "node": ">=18" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "node_modules/@esbuild/openbsd-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.2.tgz", + "integrity": "sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==", + "cpu": [ + "x64" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], "engines": { - "node": ">=6.0.0" + "node": ">=18" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", - "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.2.tgz", + "integrity": "sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==", + "cpu": [ + "arm64" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], "engines": { - "node": ">=6.0.0" + "node": ">=18" } }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", - "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "node_modules/@esbuild/sunos-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.2.tgz", + "integrity": "sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "node_modules/@jridgewell/source-map/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.2.tgz", + "integrity": "sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.2.tgz", + "integrity": "sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.2.tgz", + "integrity": "sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", + "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.7", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.3.tgz", + "integrity": "sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.1", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@eslint/js": { + "version": "9.39.2", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.2.tgz", + "integrity": "sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", - "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@peggyjs/from-mem": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@peggyjs/from-mem/-/from-mem-3.1.1.tgz", + "integrity": "sha512-m5OEjgJaePWpyNtQCvRZkpLoV+z44eh6QIO9yEwQuOThdUdkECO3wcKLT3tFA3H8WM5bxU/K/dpmo7r/X16UEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "7.7.2" + }, + "engines": { + "node": ">=20.8" + } + }, + "node_modules/@peggyjs/from-mem/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.55.1.tgz", + "integrity": "sha512-9R0DM/ykwfGIlNu6+2U09ga0WXeZ9MRC2Ter8jnz8415VbuIykVuc6bhdrbORFZANDmTDvq26mJrEVTl8TdnDg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.55.1.tgz", + "integrity": "sha512-eFZCb1YUqhTysgW3sj/55du5cG57S7UTNtdMjCW7LwVcj3dTTcowCsC8p7uBdzKsZYa8J7IDE8lhMI+HX1vQvg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.55.1.tgz", + "integrity": "sha512-p3grE2PHcQm2e8PSGZdzIhCKbMCw/xi9XvMPErPhwO17vxtvCN5FEA2mSLgmKlCjHGMQTP6phuQTYWUnKewwGg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.55.1.tgz", + "integrity": "sha512-rDUjG25C9qoTm+e02Esi+aqTKSBYwVTaoS1wxcN47/Luqef57Vgp96xNANwt5npq9GDxsH7kXxNkJVEsWEOEaQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.55.1.tgz", + "integrity": "sha512-+JiU7Jbp5cdxekIgdte0jfcu5oqw4GCKr6i3PJTlXTCU5H5Fvtkpbs4XJHRmWNXF+hKmn4v7ogI5OQPaupJgOg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.55.1.tgz", + "integrity": "sha512-V5xC1tOVWtLLmr3YUk2f6EJK4qksksOYiz/TCsFHu/R+woubcLWdC9nZQmwjOAbmExBIVKsm1/wKmEy4z4u4Bw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.55.1.tgz", + "integrity": "sha512-Rn3n+FUk2J5VWx+ywrG/HGPTD9jXNbicRtTM11e/uorplArnXZYsVifnPPqNNP5BsO3roI4n8332ukpY/zN7rQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.55.1.tgz", + "integrity": "sha512-grPNWydeKtc1aEdrJDWk4opD7nFtQbMmV7769hiAaYyUKCT1faPRm2av8CX1YJsZ4TLAZcg9gTR1KvEzoLjXkg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.55.1.tgz", + "integrity": "sha512-a59mwd1k6x8tXKcUxSyISiquLwB5pX+fJW9TkWU46lCqD/GRDe9uDN31jrMmVP3feI3mhAdvcCClhV8V5MhJFQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.55.1.tgz", + "integrity": "sha512-puS1MEgWX5GsHSoiAsF0TYrpomdvkaXm0CofIMG5uVkP6IBV+ZO9xhC5YEN49nsgYo1DuuMquF9+7EDBVYu4uA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.55.1.tgz", + "integrity": "sha512-r3Wv40in+lTsULSb6nnoudVbARdOwb2u5fpeoOAZjFLznp6tDU8kd+GTHmJoqZ9lt6/Sys33KdIHUaQihFcu7g==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.55.1.tgz", + "integrity": "sha512-MR8c0+UxAlB22Fq4R+aQSPBayvYa3+9DrwG/i1TKQXFYEaoW3B5b/rkSRIypcZDdWjWnpcvxbNaAJDcSbJU3Lw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.55.1.tgz", + "integrity": "sha512-3KhoECe1BRlSYpMTeVrD4sh2Pw2xgt4jzNSZIIPLFEsnQn9gAnZagW9+VqDqAHgm1Xc77LzJOo2LdigS5qZ+gw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.55.1.tgz", + "integrity": "sha512-ziR1OuZx0vdYZZ30vueNZTg73alF59DicYrPViG0NEgDVN8/Jl87zkAPu4u6VjZST2llgEUjaiNl9JM6HH1Vdw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.55.1.tgz", + "integrity": "sha512-uW0Y12ih2XJRERZ4jAfKamTyIHVMPQnTZcQjme2HMVDAHY4amf5u414OqNYC+x+LzRdRcnIG1YodLrrtA8xsxw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.55.1.tgz", + "integrity": "sha512-u9yZ0jUkOED1BFrqu3BwMQoixvGHGZ+JhJNkNKY/hyoEgOwlqKb62qu+7UjbPSHYjiVy8kKJHvXKv5coH4wDeg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.55.1.tgz", + "integrity": "sha512-/0PenBCmqM4ZUd0190j7J0UsQ/1nsi735iPRakO8iPciE7BQ495Y6msPzaOmvx0/pn+eJVVlZrNrSh4WSYLxNg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.55.1.tgz", + "integrity": "sha512-a8G4wiQxQG2BAvo+gU6XrReRRqj+pLS2NGXKm8io19goR+K8lw269eTrPkSdDTALwMmJp4th2Uh0D8J9bEV1vg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.55.1.tgz", + "integrity": "sha512-bD+zjpFrMpP/hqkfEcnjXWHMw5BIghGisOKPj+2NaNDuVT+8Ds4mPf3XcPHuat1tz89WRL+1wbcxKY3WSbiT7w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.55.1.tgz", + "integrity": "sha512-eLXw0dOiqE4QmvikfQ6yjgkg/xDM+MdU9YJuP4ySTibXU0oAvnEWXt7UDJmD4UkYialMfOGFPJnIHSe/kdzPxg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.55.1.tgz", + "integrity": "sha512-xzm44KgEP11te3S2HCSyYf5zIzWmx3n8HDCc7EE59+lTcswEWNpvMLfd9uJvVX8LCg9QWG67Xt75AuHn4vgsXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.55.1.tgz", + "integrity": "sha512-yR6Bl3tMC/gBok5cz/Qi0xYnVbIxGx5Fcf/ca0eB6/6JwOY+SRUcJfI0OpeTpPls7f194as62thCt/2BjxYN8g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.55.1.tgz", + "integrity": "sha512-3fZBidchE0eY0oFZBnekYCfg+5wAB0mbpCBuofh5mZuzIU/4jIVkbESmd2dOsFNS78b53CYv3OAtwqkZZmU5nA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.55.1.tgz", + "integrity": "sha512-xGGY5pXj69IxKb4yv/POoocPy/qmEGhimy/FoTpTSVju3FYXUQQMFCaZZXJVidsmGxRioZAwpThl/4zX41gRKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.55.1.tgz", + "integrity": "sha512-SPEpaL6DX4rmcXtnhdrQYgzQ5W2uW3SCJch88lB2zImhJRhIIK44fkUrgIV/Q8yUNfw5oyZ5vkeQsZLhCb06lw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -492,43 +1285,26 @@ "integrity": "sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==", "dev": true }, - "node_modules/@types/eslint": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.2.tgz", - "integrity": "sha512-Z1nseZON+GEnFjJc04sv4NSALGjhFwy6K0HXt7qsn5ArfAKtb63dXNJHf+1YW6IpOIYRBGUbu3GwJdj8DGnCjA==", + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true, - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } + "license": "MIT" }, - "node_modules/@types/eslint-scope": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz", - "integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==", + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "node_modules/@types/eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", - "dev": true - }, - "node_modules/@types/estree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", - "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", - "dev": true + "license": "MIT" }, "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" }, "node_modules/@types/mocha": { "version": "10.0.1", @@ -540,7 +1316,8 @@ "version": "17.0.31", "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.31.tgz", "integrity": "sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q==", - "dev": true + "dev": true, + "peer": true }, "node_modules/@types/parse-json": { "version": "4.0.0", @@ -549,331 +1326,370 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.34.0.tgz", - "integrity": "sha512-4zY3Z88rEE99+CNvTbXSyovv2z9PNOVffTWD2W8QF5s2prBQtwN2zadqERcrHpcR7O/+KMI3fcTAmUUhK/iQcQ==", + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.52.0.tgz", + "integrity": "sha512-okqtOgqu2qmZJ5iN4TWlgfF171dZmx2FzdOv2K/ixL2LZWDStL8+JgQerI2sa8eAEfoydG9+0V96m7V+P8yE1Q==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/experimental-utils": "2.34.0", - "functional-red-black-tree": "^1.0.1", - "regexpp": "^3.0.0", - "tsutils": "^3.17.1" + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.52.0", + "@typescript-eslint/type-utils": "8.52.0", + "@typescript-eslint/utils": "8.52.0", + "@typescript-eslint/visitor-keys": "8.52.0", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.4.0" }, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^2.0.0", - "eslint": "^5.0.0 || ^6.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "@typescript-eslint/parser": "^8.52.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/experimental-utils": { - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz", - "integrity": "sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==", + "node_modules/@typescript-eslint/parser": { + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.52.0.tgz", + "integrity": "sha512-iIACsx8pxRnguSYhHiMn2PvhvfpopO9FXHyn1mG5txZIsAaB6F0KwbFnUQN3KCiG3Jcuad/Cao2FAs1Wp7vAyg==", "dev": true, + "license": "MIT", "dependencies": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.34.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" + "@typescript-eslint/scope-manager": "8.52.0", + "@typescript-eslint/types": "8.52.0", + "@typescript-eslint/typescript-estree": "8.52.0", + "@typescript-eslint/visitor-keys": "8.52.0", + "debug": "^4.4.3" }, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/parser": { - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.34.0.tgz", - "integrity": "sha512-03ilO0ucSD0EPTw2X4PntSIRFtDPWjrVq7C3/Z3VQHRC7+13YB55rcJI3Jt+YgeHbjUdJPcPa7b23rXCBokuyA==", + "node_modules/@typescript-eslint/parser/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, + "license": "MIT", "dependencies": { - "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.34.0", - "@typescript-eslint/typescript-estree": "2.34.0", - "eslint-visitor-keys": "^1.1.0" + "ms": "^2.1.3" }, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.52.0.tgz", + "integrity": "sha512-xD0MfdSdEmeFa3OmVqonHi+Cciab96ls1UhIF/qX/O/gPu5KXD0bY9lu33jj04fjzrXHcuvjBcBC+D3SNSadaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.52.0", + "@typescript-eslint/types": "^8.52.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^5.0.0 || ^6.0.0" + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" }, "peerDependenciesMeta": { - "typescript": { + "supports-color": { "optional": true } } }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz", - "integrity": "sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==", + "node_modules/@typescript-eslint/project-service/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.52.0.tgz", + "integrity": "sha512-ixxqmmCcc1Nf8S0mS0TkJ/3LKcC8mruYJPOU6Ia2F/zUUR4pApW7LzrpU3JmtePbRUTes9bEqRc1Gg4iyRnDzA==", + "dev": true, + "license": "MIT", "dependencies": { - "debug": "^4.1.1", - "eslint-visitor-keys": "^1.1.0", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "lodash": "^4.17.15", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "@typescript-eslint/types": "8.52.0", + "@typescript-eslint/visitor-keys": "8.52.0" }, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.52.0.tgz", + "integrity": "sha512-jl+8fzr/SdzdxWJznq5nvoI7qn2tNYV/ZBAEcaFMVXf+K6jmXvAFrgo/+5rxgnL152f//pDEAYAhhBAZGrVfwg==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, - "bin": { - "semver": "bin/semver.js" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, - "engines": { - "node": ">=10" + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "node_modules/@typescript-eslint/type-utils": { + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.52.0.tgz", + "integrity": "sha512-JD3wKBRWglYRQkAtsyGz1AewDu3mTc7NtRjR/ceTyGoPqmdS5oCdx/oZMWD5Zuqmo6/MpsYs0wp6axNt88/2EQ==", "dev": true, + "license": "MIT", "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + "@typescript-eslint/types": "8.52.0", + "@typescript-eslint/typescript-estree": "8.52.0", + "@typescript-eslint/utils": "8.52.0", + "debug": "^4.4.3", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "node_modules/@typescript-eslint/type-utils/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, + "license": "MIT", "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@xtuc/long": "4.2.2" + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", - "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "node_modules/@typescript-eslint/type-utils/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" - } + "license": "MIT" }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "node_modules/@typescript-eslint/types": { + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.52.0.tgz", + "integrity": "sha512-LWQV1V4q9V4cT4H5JCIx3481iIFxH1UkVk+ZkGGAV1ZGcjGI9IoFOfg3O6ywz8QqCDEp7Inlg6kovMofsNRaGg==", "dev": true, - "dependencies": { - "@xtuc/ieee754": "^1.2.0" + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.52.0.tgz", + "integrity": "sha512-XP3LClsCc0FsTK5/frGjolyADTh3QmsLp6nKd476xNI9CsSsLnmn4f0jrzNoAulmxlmNIpeXuHYeEQv61Q6qeQ==", "dev": true, + "license": "MIT", "dependencies": { - "@xtuc/long": "4.2.2" + "@typescript-eslint/project-service": "8.52.0", + "@typescript-eslint/tsconfig-utils": "8.52.0", + "@typescript-eslint/types": "8.52.0", + "@typescript-eslint/visitor-keys": "8.52.0", + "debug": "^4.4.3", + "minimatch": "^9.0.5", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", - "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, + "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" + "balanced-match": "^1.0.0" } }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", - "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, + "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", - "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", - "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } + "license": "MIT" }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", - "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "node_modules/@typescript-eslint/utils": { + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.52.0.tgz", + "integrity": "sha512-wYndVMWkweqHpEpwPhwqE2lnD2DxC6WVLupU/DOt/0/v+/+iQbbzO3jOHjmBMnhu0DgLULvOaU4h4pwHYi2oRQ==", "dev": true, + "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webpack-cli/configtest": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", - "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", - "dev": true, + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.52.0", + "@typescript-eslint/types": "8.52.0", + "@typescript-eslint/typescript-estree": "8.52.0" + }, "engines": { - "node": ">=14.15.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@webpack-cli/info": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", - "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.52.0.tgz", + "integrity": "sha512-ink3/Zofus34nmBsPjow63FP5M7IGff0RKAgqR6+CFpdk22M7aLwC9gOcLGYqr7MczLPzZVERW9hRog3O4n1sQ==", "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.52.0", + "eslint-visitor-keys": "^4.2.1" + }, "engines": { - "node": ">=14.15.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, - "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@webpack-cli/serve": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", - "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, + "license": "Apache-2.0", "engines": { - "node": ">=14.15.0" - }, - "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, - "peerDependenciesMeta": { - "webpack-dev-server": { - "optional": true - } + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "node_modules/@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true - }, "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -886,6 +1702,7 @@ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -917,6 +1734,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -928,15 +1746,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, "node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -982,14 +1791,12 @@ "node": ">=4" } }, - "node_modules/antlr4": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.13.2.tgz", - "integrity": "sha512-QiVbZhyy4xAZ17UPEuG3YTOt8ZaoeOR1CvEAqrEsDBsOqINslaB147i9xqljZqoyf5S+EUlGStaj+t22LT9MOg==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=16" - } + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" }, "node_modules/anymatch": { "version": "3.1.2", @@ -1011,13 +1818,11 @@ "dev": true }, "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } + "license": "Python-2.0" }, "node_modules/assertion-error": { "version": "1.1.0", @@ -1037,61 +1842,12 @@ "node": ">=8" } }, - "node_modules/babel-eslint": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", - "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", - "deprecated": "babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.0", - "@babel/traverse": "^7.7.0", - "@babel/types": "^7.7.0", - "eslint-visitor-keys": "^1.0.0", - "resolve": "^1.12.0" - }, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "eslint": ">= 4.12.1" - } - }, - "node_modules/babel-loader": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.3.tgz", - "integrity": "sha512-n4Zeta8NC3QAsuyiizu0GkmRcQ6clkV9WFUnUf1iXP//IeSKbWjofW3UHyZVwlOB4y039YQKefawyTn64Zwbuw==", - "dev": true, - "dependencies": { - "find-cache-dir": "^3.3.1", - "loader-utils": "^1.4.0", - "make-dir": "^3.1.0", - "schema-utils": "^2.6.5" - }, - "engines": { - "node": ">= 8.9" - }, - "peerDependencies": { - "@babel/core": "^7.0.0", - "webpack": ">=2" - } - }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -1129,43 +1885,122 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, - "node_modules/browserslist": { - "version": "4.21.11", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.11.tgz", - "integrity": "sha512-xn1UXOKUz7DjdGlg9RrUr0GGiWzI97UQJnugHtH0OLDfJB7jMgoIkYvRIEO1l9EeEERVqeqLYOcFBW9ldjypbQ==", + "node_modules/bundle-require": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-5.1.0.tgz", + "integrity": "sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==", "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], + "license": "MIT", + "dependencies": { + "load-tsconfig": "^0.2.3" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.18" + } + }, + "node_modules/c8": { + "version": "10.1.3", + "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.3.tgz", + "integrity": "sha512-LvcyrOAaOnrrlMpW22n690PUvxiq4Uf9WMhQwNJ9vgagkL/ph1+D4uvjvDA5XCbykrc0sx+ay6pVi9YZ1GnhyA==", + "dev": true, + "license": "ISC", "dependencies": { - "caniuse-lite": "^1.0.30001538", - "electron-to-chromium": "^1.4.526", - "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.13" + "@bcoe/v8-coverage": "^1.0.1", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^3.1.1", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.1.6", + "test-exclude": "^7.0.1", + "v8-to-istanbul": "^9.0.0", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1" }, "bin": { - "browserslist": "cli.js" + "c8": "bin/c8.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "monocart-coverage-reports": "^2" + }, + "peerDependenciesMeta": { + "monocart-coverage-reports": { + "optional": true + } + } + }, + "node_modules/c8/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + "node": ">=12" } }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true + "node_modules/c8/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/c8/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/c8/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } }, "node_modules/callsites": { "version": "3.1.0", @@ -1176,26 +2011,6 @@ "node": ">=6" } }, - "node_modules/caniuse-lite": { - "version": "1.0.30001538", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001538.tgz", - "integrity": "sha512-HWJnhnID+0YMtGlzcp3T9drmBJUVDchPJ08tpUGFLs9CYlwWPH2uLgpHn8fND5pCgXVtnGS3H4QR9XLMHVNkHw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, "node_modules/chai": { "version": "4.3.8", "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.8.tgz", @@ -1228,12 +2043,6 @@ "node": ">=4" } }, - "node_modules/chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, "node_modules/check-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", @@ -1270,15 +2079,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true, - "engines": { - "node": ">=6.0" - } - }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -1316,15 +2116,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -1345,21 +2136,7 @@ "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=8" - } - }, - "node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/color-convert": { @@ -1392,37 +2169,27 @@ "node": ">= 6" } }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", "dev": true, - "peer": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } + "license": "MIT" }, - "node_modules/core-js": { - "version": "3.22.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.22.5.tgz", - "integrity": "sha512-VP/xYuvJ0MJWRAobcmQ8F2H6Bsn+s7zqAAjFaHGBMc5AQm7zaelhD1LGduFn2EehEcQcU+br6t+fwbpQ5d1ZWA==", + "node_modules/consola": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", "dev": true, - "hasInstallScript": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" } }, "node_modules/cosmiconfig": { @@ -1448,28 +2215,18 @@ "dev": true }, "node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": ">=4.8" - } - }, - "node_modules/cross-spawn/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" + "node": ">= 8" } }, "node_modules/debug": { @@ -1523,7 +2280,8 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/diff": { "version": "5.0.0", @@ -1534,23 +2292,12 @@ "node": ">=0.3.1" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.4.528", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.528.tgz", - "integrity": "sha512-UdREXMXzLkREF4jA8t89FQjA8WHI6ssP38PMY4/4KhXFQbtImnghh4GkCgrtiZwLKUKVD2iTVXvDVQjfomEQuA==", - "dev": true + "license": "MIT" }, "node_modules/emoji-regex": { "version": "8.0.0", @@ -1558,15 +2305,6 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -1576,19 +2314,6 @@ "once": "^1.4.0" } }, - "node_modules/enhanced-resolve": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", - "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -1601,18 +2326,6 @@ "node": ">=8.6" } }, - "node_modules/envinfo": { - "version": "7.10.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.10.0.tgz", - "integrity": "sha512-ZtUjZO6l5mwTHvc1L9+1q5p/R3wTopcfqMW8r5t8SJSKqeVI/LtajORwRFEKpEFuekjD0VBjwu1HMxL4UalIRw==", - "dev": true, - "bin": { - "envinfo": "dist/cli.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -1622,11 +2335,47 @@ "is-arrayish": "^0.2.1" } }, - "node_modules/es-module-lexer": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz", - "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==", - "dev": true + "node_modules/esbuild": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.2.tgz", + "integrity": "sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.2", + "@esbuild/android-arm": "0.27.2", + "@esbuild/android-arm64": "0.27.2", + "@esbuild/android-x64": "0.27.2", + "@esbuild/darwin-arm64": "0.27.2", + "@esbuild/darwin-x64": "0.27.2", + "@esbuild/freebsd-arm64": "0.27.2", + "@esbuild/freebsd-x64": "0.27.2", + "@esbuild/linux-arm": "0.27.2", + "@esbuild/linux-arm64": "0.27.2", + "@esbuild/linux-ia32": "0.27.2", + "@esbuild/linux-loong64": "0.27.2", + "@esbuild/linux-mips64el": "0.27.2", + "@esbuild/linux-ppc64": "0.27.2", + "@esbuild/linux-riscv64": "0.27.2", + "@esbuild/linux-s390x": "0.27.2", + "@esbuild/linux-x64": "0.27.2", + "@esbuild/netbsd-arm64": "0.27.2", + "@esbuild/netbsd-x64": "0.27.2", + "@esbuild/openbsd-arm64": "0.27.2", + "@esbuild/openbsd-x64": "0.27.2", + "@esbuild/openharmony-arm64": "0.27.2", + "@esbuild/sunos-x64": "0.27.2", + "@esbuild/win32-arm64": "0.27.2", + "@esbuild/win32-ia32": "0.27.2", + "@esbuild/win32-x64": "0.27.2" + } }, "node_modules/escalade": { "version": "3.1.1", @@ -1647,209 +2396,257 @@ } }, "node_modules/eslint": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "version": "9.39.2", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.2.tgz", + "integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.3", - "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.39.2", + "@eslint/plugin-kit": "^0.4.1", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", "imurmurhash": "^0.1.4", - "inquirer": "^7.0.0", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.14", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.8.3", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, - "node_modules/eslint-config-prettier": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz", - "integrity": "sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==", + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "get-stdin": "^6.0.0" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, - "bin": { - "eslint-config-prettier-check": "bin/cli.js" + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, - "peerDependencies": { - "eslint": ">=3.14.1" + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-plugin-prettier": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz", - "integrity": "sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==", + "node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { - "prettier-linter-helpers": "^1.0.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=6.0.0" - }, - "peerDependencies": { - "eslint": ">=5.0.0", - "prettier": ">=1.13.0" + "node": ">=8" }, - "peerDependenciesMeta": { - "eslint-config-prettier": { - "optional": true - } + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "node_modules/eslint/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^1.1.0" + "color-name": "~1.1.4" }, "engines": { - "node": ">=6" + "node": ">=7.0.0" + } + }, + "node_modules/eslint/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, + "license": "Apache-2.0", "engines": { - "node": ">=4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, + "license": "ISC", "dependencies": { - "eslint-visitor-keys": "^1.1.0" + "is-glob": "^4.0.3" }, "engines": { - "node": ">=6" + "node": ">=10.13.0" } }, - "node_modules/eslint/node_modules/globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "node_modules/eslint/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "dependencies": { - "type-fest": "^0.8.1" - }, + "license": "MIT", "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "node_modules/eslint/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, + "license": "MIT", "engines": { - "node": ">=6.5.0" + "node": ">= 4" } }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "node_modules/eslint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, "engines": { "node": ">=8" } }, "node_modules/espree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", - "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "acorn": "^7.1.1", - "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" }, "engines": { - "node": ">=6.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, + "license": "Apache-2.0", "engines": { - "node": ">=4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -1857,20 +2654,12 @@ "node": ">=0.10" } }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -1878,20 +2667,12 @@ "node": ">=4.0" } }, - "node_modules/esrecurse/node_modules/estraverse": { + "node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -1901,90 +2682,43 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "node_modules/fastest-levenshtein": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", - "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", - "dev": true, - "engines": { - "node": ">= 4.9.1" - } - }, - "node_modules/figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "license": "MIT" }, "node_modules/file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, + "license": "MIT", "dependencies": { - "flat-cache": "^2.0.1" + "flat-cache": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=16.0.0" } }, "node_modules/fill-range": { @@ -1999,34 +2733,33 @@ "node": ">=8" } }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/fix-dts-default-cjs-exports": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fix-dts-default-cjs-exports/-/fix-dts-default-cjs-exports-1.0.1.tgz", + "integrity": "sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==", "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" + "license": "MIT", + "dependencies": { + "magic-string": "^0.30.17", + "mlly": "^1.7.4", + "rollup": "^4.34.8" } }, "node_modules/flat": { @@ -2039,24 +2772,55 @@ } }, "node_modules/flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, + "license": "MIT", "dependencies": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.2.9", + "keyv": "^4.5.4" }, "engines": { - "node": ">=4" + "node": ">=16" } }, "node_modules/flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", - "dev": true + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/fs.realpath": { "version": "1.0.0", @@ -2078,28 +2842,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -2124,15 +2866,6 @@ "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", "dev": true }, - "node_modules/get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -2165,37 +2898,17 @@ "node": ">= 6" } }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, + "license": "MIT", "engines": { - "node": ">=4" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" + "node": ">=18" }, - "engines": { - "node": ">= 0.4.0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/has-flag": { @@ -2216,23 +2929,19 @@ "he": "bin/he" } }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } + "license": "MIT" }, "node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } @@ -2253,25 +2962,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -2306,121 +2996,6 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "node_modules/inquirer": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", - "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", - "dev": true, - "dependencies": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.19", - "mute-stream": "0.0.8", - "run-async": "^2.4.0", - "rxjs": "^6.6.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/inquirer/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/inquirer/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/inquirer/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/inquirer/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/inquirer/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/inquirer/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/inquirer/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/interpret": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", - "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", - "dev": true, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -2439,18 +3014,6 @@ "node": ">=8" } }, - "node_modules/is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2508,18 +3071,6 @@ "node": ">=8" } }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-regexp": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", @@ -2556,54 +3107,112 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, + "license": "BSD-3-Clause", "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">= 10.13.0" + "node": ">=10" } }, - "node_modules/jest-worker/node_modules/has-flag": { + "node_modules/istanbul-lib-report/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/istanbul-lib-report/node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, + "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" + "semver": "^7.5.3" }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-reports": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" } }, "node_modules/js-tokens": { @@ -2613,29 +3222,24 @@ "dev": true }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, + "license": "MIT", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } + "license": "MIT" }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", @@ -2647,7 +3251,8 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -2655,41 +3260,43 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, - "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, - "peer": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" } }, "node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "license": "MIT", "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" }, "engines": { "node": ">= 0.8.0" } }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -2774,20 +3381,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/lint-staged/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/lint-staged/node_modules/execa": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", @@ -2844,36 +3437,6 @@ "node": ">=8.12.0" } }, - "node_modules/lint-staged/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/lint-staged/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lint-staged/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/lint-staged/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2886,21 +3449,6 @@ "node": ">=8" } }, - "node_modules/lint-staged/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/listr2": { "version": "3.14.0", "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", @@ -2943,58 +3491,38 @@ "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true }, - "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "node_modules/load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", "dev": true, + "license": "MIT", "engines": { - "node": ">=6.11.5" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, - "node_modules/loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "license": "MIT", "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" + "p-locate": "^5.0.0" }, "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/loader-utils/node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "dependencies": { - "minimist": "^1.2.0" + "node": ">=10" }, - "bin": { - "json5": "lib/cli.js" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "license": "MIT" }, "node_modules/log-symbols": { "version": "4.1.0", @@ -3185,31 +3713,14 @@ "get-func-name": "^2.0.0" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", "dev": true, + "license": "MIT", "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "@jridgewell/sourcemap-codec": "^1.5.5" } }, "node_modules/make-error": { @@ -3237,27 +3748,6 @@ "node": ">=8.6" } }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -3279,22 +3769,27 @@ "node": "*" } }, - "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "node_modules/mlly": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.0.tgz", + "integrity": "sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==", "dev": true, + "license": "MIT", "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" + "acorn": "^8.15.0", + "pathe": "^2.0.3", + "pkg-types": "^1.3.1", + "ufo": "^1.6.1" } }, "node_modules/mocha": { @@ -3337,12 +3832,6 @@ "url": "https://opencollective.com/mochajs" } }, - "node_modules/mocha/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, "node_modules/mocha/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -3364,22 +3853,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mocha/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/mocha/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -3401,21 +3874,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/mocha/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/mocha/node_modules/minimatch": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", @@ -3434,36 +3892,6 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "node_modules/mocha/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/mocha/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/mocha/node_modules/serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", @@ -3503,11 +3931,17 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } }, "node_modules/nanoid": { "version": "3.3.3", @@ -3527,24 +3961,6 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", - "dev": true - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -3566,13 +3982,14 @@ "node": ">=8" } }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, "node_modules/once": { @@ -3600,56 +4017,53 @@ } }, "node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, + "license": "MIT", "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" } }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "license": "MIT", "dependencies": { - "p-try": "^2.0.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">=6" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "license": "MIT", "dependencies": { - "p-limit": "^2.2.0" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-map": { @@ -3667,14 +4081,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true, - "engines": { - "node": ">=6" - } + "license": "BlueOak-1.0.0" }, "node_modules/parent-module": { "version": "1.0.1", @@ -3725,19 +4137,38 @@ } }, "node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, "engines": { - "node": ">=4" + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" }, "node_modules/path-type": { "version": "4.0.0", @@ -3748,6 +4179,13 @@ "node": ">=8" } }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, "node_modules/pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -3757,11 +4195,40 @@ "node": "*" } }, + "node_modules/peggy": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/peggy/-/peggy-5.0.6.tgz", + "integrity": "sha512-Sud8Zus0JAgE+U4zwkJv29OOaXhviFI7J90/6cGfy3OoqR8dpnieeF9a46dj0bTtqiFnrFatldA6ltQyOJvNmg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@peggyjs/from-mem": "3.1.1", + "commander": "^14.0.0", + "source-map-generator": "2.0.2" + }, + "bin": { + "peggy": "bin/peggy.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/peggy/node_modules/commander": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.2.tgz", + "integrity": "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + } + }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", @@ -3775,16 +4242,26 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, + "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 6" + } + }, + "node_modules/pkg-types": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", + "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.4", + "pathe": "^2.0.1" } }, "node_modules/please-upgrade-node": { @@ -3797,10 +4274,11 @@ } }, "node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } @@ -3820,27 +4298,6 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "dependencies": { - "fast-diff": "^1.1.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -3852,10 +4309,11 @@ } }, "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -3881,30 +4339,6 @@ "node": ">=8.10.0" } }, - "node_modules/rechoir": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", - "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", - "dev": true, - "dependencies": { - "resolve": "^1.20.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -3914,44 +4348,6 @@ "node": ">=0.10.0" } }, - "node_modules/resolve": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", - "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.8.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-cwd/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -3980,37 +4376,49 @@ "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", "dev": true }, - "node_modules/rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "node_modules/rollup": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.55.1.tgz", + "integrity": "sha512-wDv/Ht1BNHB4upNbK74s9usvl7hObDnvVzknxqY/E/O3X6rW1U1rV1aENEfJ54eFZDTNo7zv1f5N4edCluH7+A==", "dev": true, + "license": "MIT", "dependencies": { - "glob": "^7.1.3" + "@types/estree": "1.0.8" }, "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", - "dev": true, - "dependencies": { - "tslib": "^1.9.0" + "rollup": "dist/bin/rollup" }, "engines": { - "npm": ">=2.0.0" + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.55.1", + "@rollup/rollup-android-arm64": "4.55.1", + "@rollup/rollup-darwin-arm64": "4.55.1", + "@rollup/rollup-darwin-x64": "4.55.1", + "@rollup/rollup-freebsd-arm64": "4.55.1", + "@rollup/rollup-freebsd-x64": "4.55.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.55.1", + "@rollup/rollup-linux-arm-musleabihf": "4.55.1", + "@rollup/rollup-linux-arm64-gnu": "4.55.1", + "@rollup/rollup-linux-arm64-musl": "4.55.1", + "@rollup/rollup-linux-loong64-gnu": "4.55.1", + "@rollup/rollup-linux-loong64-musl": "4.55.1", + "@rollup/rollup-linux-ppc64-gnu": "4.55.1", + "@rollup/rollup-linux-ppc64-musl": "4.55.1", + "@rollup/rollup-linux-riscv64-gnu": "4.55.1", + "@rollup/rollup-linux-riscv64-musl": "4.55.1", + "@rollup/rollup-linux-s390x-gnu": "4.55.1", + "@rollup/rollup-linux-x64-gnu": "4.55.1", + "@rollup/rollup-linux-x64-musl": "4.55.1", + "@rollup/rollup-openbsd-x64": "4.55.1", + "@rollup/rollup-openharmony-arm64": "4.55.1", + "@rollup/rollup-win32-arm64-msvc": "4.55.1", + "@rollup/rollup-win32-ia32-msvc": "4.55.1", + "@rollup/rollup-win32-x64-gnu": "4.55.1", + "@rollup/rollup-win32-x64-msvc": "4.55.1", + "fsevents": "~2.3.2" } }, "node_modules/safe-buffer": { @@ -4019,37 +4427,17 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/schema-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", - "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.5", - "ajv": "^6.12.4", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 8.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/semver-compare": { @@ -4058,46 +4446,27 @@ "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", "dev": true }, - "node_modules/serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { - "shebang-regex": "^1.0.0" + "shebang-regex": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/signal-exit": { @@ -4154,30 +4523,25 @@ "dev": true }, "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", + "integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==", "dev": true, + "license": "BSD-3-Clause", "engines": { - "node": ">=0.10.0" + "node": ">= 12" } }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "node_modules/source-map-generator": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/source-map-generator/-/source-map-generator-2.0.2.tgz", + "integrity": "sha512-unCl5BQhF/us51DiT7SvlSY3QUPhyfAdHJxd8l7FXdwzqxli0UDMV2dEuei2SeGp3Z4rB/AJ9zKi1mGOp2K2ww==", "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "license": "BSD-3-Clause", + "engines": { + "node": ">=20" } }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, "node_modules/string-argv": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", @@ -4201,6 +4565,35 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string-width/node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -4227,25 +4620,18 @@ "node": ">=4" } }, - "node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=6" - } - }, - "node_modules/strip-ansi/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/strip-final-newline": { @@ -4269,348 +4655,256 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/sucrase": { + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", + "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", "dev": true, + "license": "MIT", "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "tinyglobby": "^0.2.11", + "ts-interface-checker": "^0.1.9" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", - "dev": true, - "dependencies": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" }, "engines": { - "node": ">=6.0.0" + "node": ">=16 || 14 >=14.17" } }, - "node_modules/table/node_modules/astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "node_modules/sucrase/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "dev": true, - "engines": { - "node": ">=4" + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" } }, - "node_modules/table/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/table/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "node_modules/sucrase/node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", "dev": true, + "license": "MIT", "engines": { - "node": ">=4" + "node": ">= 6" } }, - "node_modules/table/node_modules/slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "dependencies": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "has-flag": "^3.0.0" }, "engines": { - "node": ">=6" + "node": ">=4" } }, - "node_modules/table/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "node_modules/test-exclude": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", "dev": true, + "license": "ISC", "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "@istanbuljs/schema": "^0.1.2", + "glob": "^10.4.1", + "minimatch": "^9.0.4" }, "engines": { - "node": ">=6" + "node": ">=18" } }, - "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, - "engines": { - "node": ">=6" + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" } }, - "node_modules/terser": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.20.0.tgz", - "integrity": "sha512-e56ETryaQDyebBwJIWYB2TT6f2EZ0fL0sW/JRXNMN26zZdKi2u/E/5my5lG6jNxym6qsrVXfFRmOdV42zlAgLQ==", + "node_modules/test-exclude/node_modules/glob": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", "dev": true, + "license": "ISC", "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, "bin": { - "terser": "bin/terser" + "glob": "dist/esm/bin.mjs" }, - "engines": { - "node": ">=10" + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/terser-webpack-plugin": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", - "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "node_modules/test-exclude/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.16.8" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">= 10.13.0" + "node": ">=16 || 14 >=14.17" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/terser-webpack-plugin/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", "dev": true, + "license": "MIT", "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" + "any-promise": "^1.0.0" } }, - "node_modules/terser/node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", "dev": true, - "bin": { - "acorn": "bin/acorn" + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" }, "engines": { - "node": ">=0.4.0" + "node": ">=0.8" } }, - "node_modules/terser/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, - "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", "dev": true, - "engines": { - "node": ">=4" - } + "license": "MIT" }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", "dev": true, + "license": "MIT", "dependencies": { - "is-number": "^7.0.0" + "fdir": "^6.5.0", + "picomatch": "^4.0.3" }, "engines": { - "node": ">=8.0" + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" } }, - "node_modules/ts-loader": { - "version": "9.4.4", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.4.tgz", - "integrity": "sha512-MLukxDHBl8OJ5Dk3y69IsKVFRA/6MwzEqBgh+OXMPB/OD01KQuWPFd1WAQP8a5PeSCAxfnkhiuWqfmFJzJQt9w==", + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "enhanced-resolve": "^5.0.0", - "micromatch": "^4.0.0", - "semver": "^7.3.4" - }, + "license": "MIT", "engines": { "node": ">=12.0.0" }, "peerDependencies": { - "typescript": "*", - "webpack": "^5.0.0" - } - }, - "node_modules/ts-loader/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" + "picomatch": "^3 || ^4" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } } }, - "node_modules/ts-loader/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, + "license": "MIT", "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/ts-loader/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "is-number": "^7.0.0" }, "engines": { - "node": ">=7.0.0" + "node": ">=8.0" } }, - "node_modules/ts-loader/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/ts-loader/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true, - "engines": { - "node": ">=8" + "license": "MIT", + "bin": { + "tree-kill": "cli.js" } }, - "node_modules/ts-loader/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "node_modules/ts-api-utils": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz", + "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, + "license": "MIT", "engines": { - "node": ">=10" + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" } }, - "node_modules/ts-loader/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } + "license": "Apache-2.0" }, "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, + "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -4649,18 +4943,6 @@ } } }, - "node_modules/ts-node/node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/ts-node/node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -4670,381 +4952,300 @@ "node": ">=0.3.1" } }, - "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "node_modules/tsup": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.5.1.tgz", + "integrity": "sha512-xtgkqwdhpKWr3tKPmCkvYmS9xnQK3m3XgxZHwSUjvfTjp7YfXe5tT3GgWi0F2N+ZSMsOeWeZFh7ZZFg5iPhing==", "dev": true, + "license": "MIT", "dependencies": { - "tslib": "^1.8.1" + "bundle-require": "^5.1.0", + "cac": "^6.7.14", + "chokidar": "^4.0.3", + "consola": "^3.4.0", + "debug": "^4.4.0", + "esbuild": "^0.27.0", + "fix-dts-default-cjs-exports": "^1.0.0", + "joycon": "^3.1.1", + "picocolors": "^1.1.1", + "postcss-load-config": "^6.0.1", + "resolve-from": "^5.0.0", + "rollup": "^4.34.8", + "source-map": "^0.7.6", + "sucrase": "^3.35.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.11", + "tree-kill": "^1.2.2" + }, + "bin": { + "tsup": "dist/cli-default.js", + "tsup-node": "dist/cli-node.js" }, "engines": { - "node": ">= 6" + "node": ">=18" }, "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + "@microsoft/api-extractor": "^7.36.0", + "@swc/core": "^1", + "postcss": "^8.4.12", + "typescript": ">=4.5.0" + }, + "peerDependenciesMeta": { + "@microsoft/api-extractor": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "postcss": { + "optional": true + }, + "typescript": { + "optional": true + } } }, - "node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "node_modules/tsup/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dev": true, + "license": "MIT", "dependencies": { - "prelude-ls": "~1.1.2" + "readdirp": "^4.0.1" }, "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "engines": { - "node": ">=10" + "node": ">= 14.16.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://paulmillr.com/funding/" } }, - "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "node_modules/tsup/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" }, "engines": { - "node": ">=4.2.0" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "node_modules/tsup/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tsup/node_modules/postcss-load-config": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", + "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", "dev": true, "funding": [ { "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" + "url": "https://opencollective.com/postcss/" }, { "type": "github", "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true - }, - "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", - "dev": true, - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack": { - "version": "5.88.2", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz", - "integrity": "sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==", - "dev": true, - "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", - "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.15.0", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", - "webpack-sources": "^3.2.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-cli": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", - "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", - "dev": true, - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.1.1", - "@webpack-cli/info": "^2.0.2", - "@webpack-cli/serve": "^2.0.5", - "colorette": "^2.0.14", - "commander": "^10.0.1", - "cross-spawn": "^7.0.3", - "envinfo": "^7.7.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^3.1.1", - "rechoir": "^0.8.0", - "webpack-merge": "^5.7.3" - }, - "bin": { - "webpack-cli": "bin/cli.js" - }, - "engines": { - "node": ">=14.15.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" + "lilconfig": "^3.1.1" + }, + "engines": { + "node": ">= 18" }, "peerDependencies": { - "webpack": "5.x.x" + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1", + "yaml": "^2.4.2" }, "peerDependenciesMeta": { - "@webpack-cli/generators": { + "jiti": { + "optional": true + }, + "postcss": { "optional": true }, - "webpack-bundle-analyzer": { + "tsx": { "optional": true }, - "webpack-dev-server": { + "yaml": { "optional": true } } }, - "node_modules/webpack-cli/node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "node_modules/tsup/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", "dev": true, + "license": "MIT", "engines": { - "node": ">=14" - } - }, - "node_modules/webpack-cli/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "node": ">= 14.18.0" }, - "engines": { - "node": ">= 8" + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, - "node_modules/webpack-cli/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "node_modules/tsup/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/webpack-cli/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "node_modules/tsup/node_modules/yaml": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz", + "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==", "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" + "license": "ISC", + "optional": true, + "peer": true, + "bin": { + "yaml": "bin.mjs" }, "engines": { - "node": ">=8" - } - }, - "node_modules/webpack-cli/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" } }, - "node_modules/webpack-cli/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "license": "MIT", "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" + "prelude-ls": "^1.2.1" }, "engines": { - "node": ">= 8" + "node": ">= 0.8.0" } }, - "node_modules/webpack-merge": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.9.0.tgz", - "integrity": "sha512-6NbRQw4+Sy50vYNTw7EyOn41OZItPiXB8GNv3INSoe3PSFaHJEz3SHTrYVaRm2LilNGnFUzh0FAwqPEmU/CwDg==", + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, - "dependencies": { - "clone-deep": "^4.0.1", - "wildcard": "^2.0.0" - }, "engines": { - "node": ">=10.0.0" + "node": ">=4" } }, - "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, "engines": { - "node": ">=10.13.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/webpack/node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, + "license": "Apache-2.0", "bin": { - "acorn": "bin/acorn" + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=0.4.0" + "node": ">=14.17" } }, - "node_modules/webpack/node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "node_modules/ufo": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.2.tgz", + "integrity": "sha512-heMioaxBcG9+Znsda5Q8sQbWnLJSl98AFDXTO80wELWEzX3hordXsTdxrIfMQoO9IY1MEnoGoPjpoKpMj+Yx0Q==", "dev": true, - "peerDependencies": { - "acorn": "^8" + "license": "MIT" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" } }, - "node_modules/webpack/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, + "license": "ISC", "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" }, "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" + "node": ">=10.12.0" } }, + "node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, "bin": { - "which": "bin/which" + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, - "node_modules/wildcard": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", - "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", - "dev": true - }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -5072,6 +5273,74 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -5123,18 +5392,6 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, - "node_modules/write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "dependencies": { - "mkdirp": "^0.5.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -5144,12 +5401,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yaml": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", @@ -5227,6 +5478,7 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -5236,346 +5488,653 @@ } }, "dependencies": { - "@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "@babel/code-frame": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "dev": true, + "requires": { + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true + }, + "@babel/highlight": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + } + }, + "@bcoe/v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz", + "integrity": "sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==", + "dev": true + }, + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "dependencies": { + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + } + } + }, + "@esbuild/aix-ppc64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.2.tgz", + "integrity": "sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.2.tgz", + "integrity": "sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.2.tgz", + "integrity": "sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==", + "dev": true, + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.2.tgz", + "integrity": "sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.2.tgz", + "integrity": "sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.2.tgz", + "integrity": "sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.2.tgz", + "integrity": "sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.2.tgz", + "integrity": "sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==", "dev": true, - "peer": true, - "requires": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - } + "optional": true }, - "@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "@esbuild/linux-arm": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.2.tgz", + "integrity": "sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==", "dev": true, - "requires": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - } + "optional": true }, - "@babel/compat-data": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.20.tgz", - "integrity": "sha512-BQYjKbpXjoXwFW5jGqiizJQQT/aC7pFm9Ok1OWssonuguICi264lbgMzRp2ZMmRSlfkX6DsWDDcsrctK8Rwfiw==", + "@esbuild/linux-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.2.tgz", + "integrity": "sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==", "dev": true, - "peer": true + "optional": true }, - "@babel/core": { - "version": "7.17.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.10.tgz", - "integrity": "sha512-liKoppandF3ZcBnIYFjfSDHZLKdLHGJRkoWtG8zQyGJBQfIYobpnVGI5+pLBNtS6psFLDzyq8+h5HiVljW9PNA==", + "@esbuild/linux-ia32": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.2.tgz", + "integrity": "sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==", "dev": true, - "peer": true, - "requires": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.10", - "@babel/helper-compilation-targets": "^7.17.10", - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helpers": "^7.17.9", - "@babel/parser": "^7.17.10", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.10", - "@babel/types": "^7.17.10", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" - } - }, - "@babel/generator": { - "version": "7.17.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.10.tgz", - "integrity": "sha512-46MJZZo9y3o4kmhBVc7zW7i8dtR1oIK/sdO5NcfcZRhTGYi+KKJRtHNgsU6c4VUcJmUNV/LQdebD/9Dlv4K+Tg==", + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.2.tgz", + "integrity": "sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==", "dev": true, - "requires": { - "@babel/types": "^7.17.10", - "@jridgewell/gen-mapping": "^0.1.0", - "jsesc": "^2.5.1" - } + "optional": true }, - "@babel/helper-compilation-targets": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", - "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", + "@esbuild/linux-mips64el": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.2.tgz", + "integrity": "sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==", "dev": true, - "peer": true, - "requires": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.15", - "browserslist": "^4.21.9", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "dependencies": { - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "peer": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "peer": true - } - } + "optional": true }, - "@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true + "@esbuild/linux-ppc64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.2.tgz", + "integrity": "sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==", + "dev": true, + "optional": true }, - "@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "@esbuild/linux-riscv64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.2.tgz", + "integrity": "sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==", "dev": true, - "requires": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - } + "optional": true }, - "@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "@esbuild/linux-s390x": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.2.tgz", + "integrity": "sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==", "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } + "optional": true }, - "@babel/helper-module-imports": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", - "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "@esbuild/linux-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.2.tgz", + "integrity": "sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==", "dev": true, - "peer": true, - "requires": { - "@babel/types": "^7.22.15" - } + "optional": true }, - "@babel/helper-module-transforms": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.20.tgz", - "integrity": "sha512-dLT7JVWIUUxKOs1UnJUBR3S70YK+pKX6AbJgB2vMIvEkZkrfJDbYDJesnPshtKV4LhDOR3Oc5YULeDizRek+5A==", + "@esbuild/netbsd-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.2.tgz", + "integrity": "sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==", "dev": true, - "peer": true, - "requires": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" - } + "optional": true }, - "@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "@esbuild/netbsd-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.2.tgz", + "integrity": "sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==", "dev": true, - "peer": true, - "requires": { - "@babel/types": "^7.22.5" - } + "optional": true }, - "@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "@esbuild/openbsd-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.2.tgz", + "integrity": "sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==", "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } + "optional": true }, - "@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", - "dev": true + "@esbuild/openbsd-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.2.tgz", + "integrity": "sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==", + "dev": true, + "optional": true }, - "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true + "@esbuild/openharmony-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.2.tgz", + "integrity": "sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==", + "dev": true, + "optional": true }, - "@babel/helper-validator-option": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", - "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", + "@esbuild/sunos-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.2.tgz", + "integrity": "sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==", "dev": true, - "peer": true + "optional": true }, - "@babel/helpers": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.9.tgz", - "integrity": "sha512-cPCt915ShDWUEzEp3+UNRktO2n6v49l5RSnG9M5pS24hA+2FAc5si+Pn1i4VVbQQ+jh+bIZhPFQOJOzbrOYY1Q==", + "@esbuild/win32-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.2.tgz", + "integrity": "sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==", "dev": true, - "peer": true, - "requires": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.9", - "@babel/types": "^7.17.0" - } + "optional": true }, - "@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "@esbuild/win32-ia32": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.2.tgz", + "integrity": "sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==", + "dev": true, + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.2.tgz", + "integrity": "sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==", + "dev": true, + "optional": true + }, + "@eslint-community/eslint-utils": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "eslint-visitor-keys": "^3.4.3" } }, - "@babel/parser": { - "version": "7.22.16", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.16.tgz", - "integrity": "sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA==", + "@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", "dev": true }, - "@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "@eslint/config-array": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", + "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@eslint/object-schema": "^2.1.7", + "debug": "^4.3.1", + "minimatch": "^3.1.2" } }, - "@babel/traverse": { - "version": "7.17.10", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.10.tgz", - "integrity": "sha512-VmbrTHQteIdUUQNTb+zE12SHS/xQVIShmBPhlNP12hD5poF2pbITW1Z4172d03HegaQWhLffdkRJYtAzp0AGcw==", + "@eslint/config-helpers": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", "dev": true, "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.10", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.10", - "@babel/types": "^7.17.10", - "debug": "^4.1.0", - "globals": "^11.1.0" - } - }, - "@babel/types": { - "version": "7.22.19", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.19.tgz", - "integrity": "sha512-P7LAw/LbojPzkgp5oznjE6tQEIWbp4PkkfrZDINTro9zgBRtI324/EYsiSI7lhPbpIQ+DCeR2NNmMWANGGfZsg==", + "@eslint/core": "^0.17.0" + } + }, + "@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.19", - "to-fast-properties": "^2.0.0" + "@types/json-schema": "^7.0.15" } }, - "@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "@eslint/eslintrc": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.3.tgz", + "integrity": "sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==", "dev": true, "requires": { - "@jridgewell/trace-mapping": "0.3.9" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.1", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" }, "dependencies": { - "@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } + "ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true } } }, - "@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "@eslint/js": { + "version": "9.39.2", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.2.tgz", + "integrity": "sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA==", + "dev": true + }, + "@eslint/object-schema": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", "dev": true }, - "@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "@eslint/plugin-kit": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", "dev": true, "requires": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@eslint/core": "^0.17.0", + "levn": "^0.4.1" } }, - "@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "dev": true }, - "@jridgewell/set-array": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", - "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", + "@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "dev": true, + "requires": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" + } + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, + "@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true }, - "@jridgewell/source-map": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", - "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, "requires": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" }, "dependencies": { - "@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + }, + "wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" } } } }, + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, + "@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true + }, "@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", - "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, "requires": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "@peggyjs/from-mem": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@peggyjs/from-mem/-/from-mem-3.1.1.tgz", + "integrity": "sha512-m5OEjgJaePWpyNtQCvRZkpLoV+z44eh6QIO9yEwQuOThdUdkECO3wcKLT3tFA3H8WM5bxU/K/dpmo7r/X16UEw==", + "dev": true, + "requires": { + "semver": "7.7.2" + }, + "dependencies": { + "semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true + } + } + }, + "@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-android-arm-eabi": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.55.1.tgz", + "integrity": "sha512-9R0DM/ykwfGIlNu6+2U09ga0WXeZ9MRC2Ter8jnz8415VbuIykVuc6bhdrbORFZANDmTDvq26mJrEVTl8TdnDg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-android-arm64": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.55.1.tgz", + "integrity": "sha512-eFZCb1YUqhTysgW3sj/55du5cG57S7UTNtdMjCW7LwVcj3dTTcowCsC8p7uBdzKsZYa8J7IDE8lhMI+HX1vQvg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-darwin-arm64": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.55.1.tgz", + "integrity": "sha512-p3grE2PHcQm2e8PSGZdzIhCKbMCw/xi9XvMPErPhwO17vxtvCN5FEA2mSLgmKlCjHGMQTP6phuQTYWUnKewwGg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-darwin-x64": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.55.1.tgz", + "integrity": "sha512-rDUjG25C9qoTm+e02Esi+aqTKSBYwVTaoS1wxcN47/Luqef57Vgp96xNANwt5npq9GDxsH7kXxNkJVEsWEOEaQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-freebsd-arm64": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.55.1.tgz", + "integrity": "sha512-+JiU7Jbp5cdxekIgdte0jfcu5oqw4GCKr6i3PJTlXTCU5H5Fvtkpbs4XJHRmWNXF+hKmn4v7ogI5OQPaupJgOg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-freebsd-x64": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.55.1.tgz", + "integrity": "sha512-V5xC1tOVWtLLmr3YUk2f6EJK4qksksOYiz/TCsFHu/R+woubcLWdC9nZQmwjOAbmExBIVKsm1/wKmEy4z4u4Bw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.55.1.tgz", + "integrity": "sha512-Rn3n+FUk2J5VWx+ywrG/HGPTD9jXNbicRtTM11e/uorplArnXZYsVifnPPqNNP5BsO3roI4n8332ukpY/zN7rQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm-musleabihf": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.55.1.tgz", + "integrity": "sha512-grPNWydeKtc1aEdrJDWk4opD7nFtQbMmV7769hiAaYyUKCT1faPRm2av8CX1YJsZ4TLAZcg9gTR1KvEzoLjXkg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm64-gnu": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.55.1.tgz", + "integrity": "sha512-a59mwd1k6x8tXKcUxSyISiquLwB5pX+fJW9TkWU46lCqD/GRDe9uDN31jrMmVP3feI3mhAdvcCClhV8V5MhJFQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm64-musl": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.55.1.tgz", + "integrity": "sha512-puS1MEgWX5GsHSoiAsF0TYrpomdvkaXm0CofIMG5uVkP6IBV+ZO9xhC5YEN49nsgYo1DuuMquF9+7EDBVYu4uA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-loong64-gnu": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.55.1.tgz", + "integrity": "sha512-r3Wv40in+lTsULSb6nnoudVbARdOwb2u5fpeoOAZjFLznp6tDU8kd+GTHmJoqZ9lt6/Sys33KdIHUaQihFcu7g==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-loong64-musl": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.55.1.tgz", + "integrity": "sha512-MR8c0+UxAlB22Fq4R+aQSPBayvYa3+9DrwG/i1TKQXFYEaoW3B5b/rkSRIypcZDdWjWnpcvxbNaAJDcSbJU3Lw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-ppc64-gnu": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.55.1.tgz", + "integrity": "sha512-3KhoECe1BRlSYpMTeVrD4sh2Pw2xgt4jzNSZIIPLFEsnQn9gAnZagW9+VqDqAHgm1Xc77LzJOo2LdigS5qZ+gw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-ppc64-musl": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.55.1.tgz", + "integrity": "sha512-ziR1OuZx0vdYZZ30vueNZTg73alF59DicYrPViG0NEgDVN8/Jl87zkAPu4u6VjZST2llgEUjaiNl9JM6HH1Vdw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-riscv64-gnu": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.55.1.tgz", + "integrity": "sha512-uW0Y12ih2XJRERZ4jAfKamTyIHVMPQnTZcQjme2HMVDAHY4amf5u414OqNYC+x+LzRdRcnIG1YodLrrtA8xsxw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-riscv64-musl": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.55.1.tgz", + "integrity": "sha512-u9yZ0jUkOED1BFrqu3BwMQoixvGHGZ+JhJNkNKY/hyoEgOwlqKb62qu+7UjbPSHYjiVy8kKJHvXKv5coH4wDeg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-s390x-gnu": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.55.1.tgz", + "integrity": "sha512-/0PenBCmqM4ZUd0190j7J0UsQ/1nsi735iPRakO8iPciE7BQ495Y6msPzaOmvx0/pn+eJVVlZrNrSh4WSYLxNg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-x64-gnu": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.55.1.tgz", + "integrity": "sha512-a8G4wiQxQG2BAvo+gU6XrReRRqj+pLS2NGXKm8io19goR+K8lw269eTrPkSdDTALwMmJp4th2Uh0D8J9bEV1vg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-x64-musl": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.55.1.tgz", + "integrity": "sha512-bD+zjpFrMpP/hqkfEcnjXWHMw5BIghGisOKPj+2NaNDuVT+8Ds4mPf3XcPHuat1tz89WRL+1wbcxKY3WSbiT7w==", + "dev": true, + "optional": true + }, + "@rollup/rollup-openbsd-x64": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.55.1.tgz", + "integrity": "sha512-eLXw0dOiqE4QmvikfQ6yjgkg/xDM+MdU9YJuP4ySTibXU0oAvnEWXt7UDJmD4UkYialMfOGFPJnIHSe/kdzPxg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-openharmony-arm64": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.55.1.tgz", + "integrity": "sha512-xzm44KgEP11te3S2HCSyYf5zIzWmx3n8HDCc7EE59+lTcswEWNpvMLfd9uJvVX8LCg9QWG67Xt75AuHn4vgsXw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-arm64-msvc": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.55.1.tgz", + "integrity": "sha512-yR6Bl3tMC/gBok5cz/Qi0xYnVbIxGx5Fcf/ca0eB6/6JwOY+SRUcJfI0OpeTpPls7f194as62thCt/2BjxYN8g==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-ia32-msvc": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.55.1.tgz", + "integrity": "sha512-3fZBidchE0eY0oFZBnekYCfg+5wAB0mbpCBuofh5mZuzIU/4jIVkbESmd2dOsFNS78b53CYv3OAtwqkZZmU5nA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-x64-gnu": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.55.1.tgz", + "integrity": "sha512-xGGY5pXj69IxKb4yv/POoocPy/qmEGhimy/FoTpTSVju3FYXUQQMFCaZZXJVidsmGxRioZAwpThl/4zX41gRKg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-x64-msvc": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.55.1.tgz", + "integrity": "sha512-SPEpaL6DX4rmcXtnhdrQYgzQ5W2uW3SCJch88lB2zImhJRhIIK44fkUrgIV/Q8yUNfw5oyZ5vkeQsZLhCb06lw==", + "dev": true, + "optional": true + }, "@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -5606,42 +6165,22 @@ "integrity": "sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==", "dev": true }, - "@types/eslint": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.2.tgz", - "integrity": "sha512-Z1nseZON+GEnFjJc04sv4NSALGjhFwy6K0HXt7qsn5ArfAKtb63dXNJHf+1YW6IpOIYRBGUbu3GwJdj8DGnCjA==", - "dev": true, - "requires": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "@types/eslint-scope": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz", - "integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==", - "dev": true, - "requires": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "@types/eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", + "@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true }, - "@types/estree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", - "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", + "@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, "@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, "@types/mocha": { @@ -5654,7 +6193,8 @@ "version": "17.0.31", "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.31.tgz", "integrity": "sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q==", - "dev": true + "dev": true, + "peer": true }, "@types/parse-json": { "version": "4.0.0", @@ -5663,250 +6203,218 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.34.0.tgz", - "integrity": "sha512-4zY3Z88rEE99+CNvTbXSyovv2z9PNOVffTWD2W8QF5s2prBQtwN2zadqERcrHpcR7O/+KMI3fcTAmUUhK/iQcQ==", - "dev": true, - "requires": { - "@typescript-eslint/experimental-utils": "2.34.0", - "functional-red-black-tree": "^1.0.1", - "regexpp": "^3.0.0", - "tsutils": "^3.17.1" - } - }, - "@typescript-eslint/experimental-utils": { - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz", - "integrity": "sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==", + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.52.0.tgz", + "integrity": "sha512-okqtOgqu2qmZJ5iN4TWlgfF171dZmx2FzdOv2K/ixL2LZWDStL8+JgQerI2sa8eAEfoydG9+0V96m7V+P8yE1Q==", "dev": true, "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.34.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.52.0", + "@typescript-eslint/type-utils": "8.52.0", + "@typescript-eslint/utils": "8.52.0", + "@typescript-eslint/visitor-keys": "8.52.0", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.4.0" } }, "@typescript-eslint/parser": { - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.34.0.tgz", - "integrity": "sha512-03ilO0ucSD0EPTw2X4PntSIRFtDPWjrVq7C3/Z3VQHRC7+13YB55rcJI3Jt+YgeHbjUdJPcPa7b23rXCBokuyA==", - "dev": true, - "requires": { - "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.34.0", - "@typescript-eslint/typescript-estree": "2.34.0", - "eslint-visitor-keys": "^1.1.0" - } - }, - "@typescript-eslint/typescript-estree": { - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz", - "integrity": "sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==", + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.52.0.tgz", + "integrity": "sha512-iIACsx8pxRnguSYhHiMn2PvhvfpopO9FXHyn1mG5txZIsAaB6F0KwbFnUQN3KCiG3Jcuad/Cao2FAs1Wp7vAyg==", "dev": true, "requires": { - "debug": "^4.1.1", - "eslint-visitor-keys": "^1.1.0", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "lodash": "^4.17.15", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "@typescript-eslint/scope-manager": "8.52.0", + "@typescript-eslint/types": "8.52.0", + "@typescript-eslint/typescript-estree": "8.52.0", + "@typescript-eslint/visitor-keys": "8.52.0", + "debug": "^4.4.3" }, "dependencies": { - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, "requires": { - "lru-cache": "^6.0.0" + "ms": "^2.1.3" } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true } } }, - "@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", - "dev": true, - "requires": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", - "dev": true - }, - "@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "@typescript-eslint/project-service": { + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.52.0.tgz", + "integrity": "sha512-xD0MfdSdEmeFa3OmVqonHi+Cciab96ls1UhIF/qX/O/gPu5KXD0bY9lu33jj04fjzrXHcuvjBcBC+D3SNSadaw==", "dev": true, "requires": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@xtuc/long": "4.2.2" + "@typescript-eslint/tsconfig-utils": "^8.52.0", + "@typescript-eslint/types": "^8.52.0", + "debug": "^4.4.3" + }, + "dependencies": { + "debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "requires": { + "ms": "^2.1.3" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } } }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", - "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "@typescript-eslint/scope-manager": { + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.52.0.tgz", + "integrity": "sha512-ixxqmmCcc1Nf8S0mS0TkJ/3LKcC8mruYJPOU6Ia2F/zUUR4pApW7LzrpU3JmtePbRUTes9bEqRc1Gg4iyRnDzA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" + "@typescript-eslint/types": "8.52.0", + "@typescript-eslint/visitor-keys": "8.52.0" } }, - "@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "@typescript-eslint/tsconfig-utils": { + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.52.0.tgz", + "integrity": "sha512-jl+8fzr/SdzdxWJznq5nvoI7qn2tNYV/ZBAEcaFMVXf+K6jmXvAFrgo/+5rxgnL152f//pDEAYAhhBAZGrVfwg==", "dev": true, - "requires": { - "@xtuc/ieee754": "^1.2.0" - } + "requires": {} }, - "@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "@typescript-eslint/type-utils": { + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.52.0.tgz", + "integrity": "sha512-JD3wKBRWglYRQkAtsyGz1AewDu3mTc7NtRjR/ceTyGoPqmdS5oCdx/oZMWD5Zuqmo6/MpsYs0wp6axNt88/2EQ==", "dev": true, "requires": { - "@xtuc/long": "4.2.2" + "@typescript-eslint/types": "8.52.0", + "@typescript-eslint/typescript-estree": "8.52.0", + "@typescript-eslint/utils": "8.52.0", + "debug": "^4.4.3", + "ts-api-utils": "^2.4.0" + }, + "dependencies": { + "debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "requires": { + "ms": "^2.1.3" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } } }, - "@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "@typescript-eslint/types": { + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.52.0.tgz", + "integrity": "sha512-LWQV1V4q9V4cT4H5JCIx3481iIFxH1UkVk+ZkGGAV1ZGcjGI9IoFOfg3O6ywz8QqCDEp7Inlg6kovMofsNRaGg==", "dev": true }, - "@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", - "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", - "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", - "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "@typescript-eslint/typescript-estree": { + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.52.0.tgz", + "integrity": "sha512-XP3LClsCc0FsTK5/frGjolyADTh3QmsLp6nKd476xNI9CsSsLnmn4f0jrzNoAulmxlmNIpeXuHYeEQv61Q6qeQ==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" + "@typescript-eslint/project-service": "8.52.0", + "@typescript-eslint/tsconfig-utils": "8.52.0", + "@typescript-eslint/types": "8.52.0", + "@typescript-eslint/visitor-keys": "8.52.0", + "debug": "^4.4.3", + "minimatch": "^9.0.5", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.4.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "requires": { + "ms": "^2.1.3" + } + }, + "minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } } }, - "@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", - "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "@typescript-eslint/utils": { + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.52.0.tgz", + "integrity": "sha512-wYndVMWkweqHpEpwPhwqE2lnD2DxC6WVLupU/DOt/0/v+/+iQbbzO3jOHjmBMnhu0DgLULvOaU4h4pwHYi2oRQ==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.52.0", + "@typescript-eslint/types": "8.52.0", + "@typescript-eslint/typescript-estree": "8.52.0" } }, - "@webassemblyjs/wast-printer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", - "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "@typescript-eslint/visitor-keys": { + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.52.0.tgz", + "integrity": "sha512-ink3/Zofus34nmBsPjow63FP5M7IGff0RKAgqR6+CFpdk22M7aLwC9gOcLGYqr7MczLPzZVERW9hRog3O4n1sQ==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.6", - "@xtuc/long": "4.2.2" + "@typescript-eslint/types": "8.52.0", + "eslint-visitor-keys": "^4.2.1" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true + } } }, - "@webpack-cli/configtest": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", - "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", - "dev": true, - "requires": {} - }, - "@webpack-cli/info": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", - "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", - "dev": true, - "requires": {} - }, - "@webpack-cli/serve": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", - "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", - "dev": true, - "requires": {} - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true - }, "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true }, "acorn-jsx": { @@ -5944,13 +6452,6 @@ "uri-js": "^4.2.2" } }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} - }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -5981,10 +6482,11 @@ "color-convert": "^1.9.0" } }, - "antlr4": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.13.2.tgz", - "integrity": "sha512-QiVbZhyy4xAZ17UPEuG3YTOt8ZaoeOR1CvEAqrEsDBsOqINslaB147i9xqljZqoyf5S+EUlGStaj+t22LT9MOg==" + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true }, "anymatch": { "version": "3.1.2", @@ -6003,13 +6505,10 @@ "dev": true }, "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "assertion-error": { "version": "1.1.0", @@ -6023,44 +6522,12 @@ "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, - "babel-eslint": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", - "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.0", - "@babel/traverse": "^7.7.0", - "@babel/types": "^7.7.0", - "eslint-visitor-keys": "^1.0.0", - "resolve": "^1.12.0" - } - }, - "babel-loader": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.3.tgz", - "integrity": "sha512-n4Zeta8NC3QAsuyiizu0GkmRcQ6clkV9WFUnUf1iXP//IeSKbWjofW3UHyZVwlOB4y039YQKefawyTn64Zwbuw==", - "dev": true, - "requires": { - "find-cache-dir": "^3.3.1", - "loader-utils": "^1.4.0", - "make-dir": "^3.1.0", - "schema-utils": "^2.6.5" - } - }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true - }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -6092,22 +6559,81 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, - "browserslist": { - "version": "4.21.11", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.11.tgz", - "integrity": "sha512-xn1UXOKUz7DjdGlg9RrUr0GGiWzI97UQJnugHtH0OLDfJB7jMgoIkYvRIEO1l9EeEERVqeqLYOcFBW9ldjypbQ==", + "bundle-require": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-5.1.0.tgz", + "integrity": "sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==", + "dev": true, + "requires": { + "load-tsconfig": "^0.2.3" + } + }, + "c8": { + "version": "10.1.3", + "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.3.tgz", + "integrity": "sha512-LvcyrOAaOnrrlMpW22n690PUvxiq4Uf9WMhQwNJ9vgagkL/ph1+D4uvjvDA5XCbykrc0sx+ay6pVi9YZ1GnhyA==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001538", - "electron-to-chromium": "^1.4.526", - "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.13" + "@bcoe/v8-coverage": "^1.0.1", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^3.1.1", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.1.6", + "test-exclude": "^7.0.1", + "v8-to-istanbul": "^9.0.0", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1" + }, + "dependencies": { + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + } } }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", "dev": true }, "callsites": { @@ -6116,12 +6642,6 @@ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, - "caniuse-lite": { - "version": "1.0.30001538", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001538.tgz", - "integrity": "sha512-HWJnhnID+0YMtGlzcp3T9drmBJUVDchPJ08tpUGFLs9CYlwWPH2uLgpHn8fND5pCgXVtnGS3H4QR9XLMHVNkHw==", - "dev": true - }, "chai": { "version": "4.3.8", "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.8.tgz", @@ -6148,12 +6668,6 @@ "supports-color": "^5.3.0" } }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, "check-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", @@ -6176,12 +6690,6 @@ "readdirp": "~3.6.0" } }, - "chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true - }, "clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -6207,12 +6715,6 @@ "string-width": "^4.2.0" } }, - "cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", - "dev": true - }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -6235,17 +6737,6 @@ } } }, - "clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - } - }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -6273,32 +6764,22 @@ "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", "dev": true }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "peer": true, - "requires": { - "safe-buffer": "~5.1.1" - } + "confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "dev": true }, - "core-js": { - "version": "3.22.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.22.5.tgz", - "integrity": "sha512-VP/xYuvJ0MJWRAobcmQ8F2H6Bsn+s7zqAAjFaHGBMc5AQm7zaelhD1LGduFn2EehEcQcU+br6t+fwbpQ5d1ZWA==", + "consola": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", "dev": true }, "cosmiconfig": { @@ -6321,24 +6802,14 @@ "dev": true }, "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "debug": { @@ -6383,19 +6854,10 @@ "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "electron-to-chromium": { - "version": "1.4.528", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.528.tgz", - "integrity": "sha512-UdREXMXzLkREF4jA8t89FQjA8WHI6ssP38PMY4/4KhXFQbtImnghh4GkCgrtiZwLKUKVD2iTVXvDVQjfomEQuA==", + "eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, "emoji-regex": { @@ -6404,12 +6866,6 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true - }, "end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -6419,16 +6875,6 @@ "once": "^1.4.0" } }, - "enhanced-resolve": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", - "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - } - }, "enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -6438,12 +6884,6 @@ "ansi-colors": "^4.1.1" } }, - "envinfo": { - "version": "7.10.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.10.0.tgz", - "integrity": "sha512-ZtUjZO6l5mwTHvc1L9+1q5p/R3wTopcfqMW8r5t8SJSKqeVI/LtajORwRFEKpEFuekjD0VBjwu1HMxL4UalIRw==", - "dev": true - }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -6453,11 +6893,39 @@ "is-arrayish": "^0.2.1" } }, - "es-module-lexer": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz", - "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==", - "dev": true + "esbuild": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.2.tgz", + "integrity": "sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==", + "dev": true, + "requires": { + "@esbuild/aix-ppc64": "0.27.2", + "@esbuild/android-arm": "0.27.2", + "@esbuild/android-arm64": "0.27.2", + "@esbuild/android-x64": "0.27.2", + "@esbuild/darwin-arm64": "0.27.2", + "@esbuild/darwin-x64": "0.27.2", + "@esbuild/freebsd-arm64": "0.27.2", + "@esbuild/freebsd-x64": "0.27.2", + "@esbuild/linux-arm": "0.27.2", + "@esbuild/linux-arm64": "0.27.2", + "@esbuild/linux-ia32": "0.27.2", + "@esbuild/linux-loong64": "0.27.2", + "@esbuild/linux-mips64el": "0.27.2", + "@esbuild/linux-ppc64": "0.27.2", + "@esbuild/linux-riscv64": "0.27.2", + "@esbuild/linux-s390x": "0.27.2", + "@esbuild/linux-x64": "0.27.2", + "@esbuild/netbsd-arm64": "0.27.2", + "@esbuild/netbsd-x64": "0.27.2", + "@esbuild/openbsd-arm64": "0.27.2", + "@esbuild/openbsd-x64": "0.27.2", + "@esbuild/openharmony-arm64": "0.27.2", + "@esbuild/sunos-x64": "0.27.2", + "@esbuild/win32-arm64": "0.27.2", + "@esbuild/win32-ia32": "0.27.2", + "@esbuild/win32-x64": "0.27.2" + } }, "escalade": { "version": "3.1.1", @@ -6472,157 +6940,167 @@ "dev": true }, "eslint": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.3", - "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", + "version": "9.39.2", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.2.tgz", + "integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.39.2", + "@eslint/plugin-kit": "^0.4.1", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", "imurmurhash": "^0.1.4", - "inquirer": "^7.0.0", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.14", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.8.3", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "dependencies": { - "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "optionator": "^0.9.3" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.1.0" + "color-name": "~1.1.4" } }, - "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "is-glob": "^4.0.3" } }, - "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, - "eslint-config-prettier": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz", - "integrity": "sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==", - "dev": true, - "requires": { - "get-stdin": "^6.0.0" - } - }, - "eslint-plugin-prettier": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz", - "integrity": "sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==", - "dev": true, - "requires": { - "prettier-linter-helpers": "^1.0.0" - } - }, "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dev": true, "requires": { "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" + "estraverse": "^5.2.0" } }, "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true }, "espree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", - "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, "requires": { - "acorn": "^7.1.1", - "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true + } } }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", "dev": true, "requires": { "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } } }, "esrecurse": { @@ -6632,20 +7110,12 @@ "dev": true, "requires": { "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } } }, "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, "esutils": { @@ -6654,32 +7124,10 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true - }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "fast-json-stable-stringify": { @@ -6691,31 +7139,16 @@ "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fastest-levenshtein": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", - "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, - "figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "requires": { - "flat-cache": "^2.0.1" + "flat-cache": "^4.0.0" } }, "fill-range": { @@ -6727,25 +7160,25 @@ "to-regex-range": "^5.0.1" } }, - "find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" } }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "fix-dts-default-cjs-exports": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fix-dts-default-cjs-exports/-/fix-dts-default-cjs-exports-1.0.1.tgz", + "integrity": "sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==", "dev": true, "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "magic-string": "^0.30.17", + "mlly": "^1.7.4", + "rollup": "^4.34.8" } }, "flat": { @@ -6755,22 +7188,39 @@ "dev": true }, "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.2.9", + "keyv": "^4.5.4" } }, "flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", "dev": true }, + "foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "dependencies": { + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + } + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -6784,25 +7234,6 @@ "dev": true, "optional": true }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "peer": true - }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -6821,12 +7252,6 @@ "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", "dev": true }, - "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", - "dev": true - }, "glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -6850,33 +7275,12 @@ "is-glob": "^4.0.1" } }, - "glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, - "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -6889,19 +7293,16 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true }, "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "dev": true }, "import-fresh": { @@ -6914,16 +7315,6 @@ "resolve-from": "^4.0.0" } }, - "import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "requires": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - } - }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -6952,93 +7343,6 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "inquirer": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", - "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.19", - "mute-stream": "0.0.8", - "run-async": "^2.4.0", - "rxjs": "^6.6.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "interpret": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", - "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", - "dev": true - }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -7054,15 +7358,6 @@ "binary-extensions": "^2.0.0" } }, - "is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -7102,15 +7397,6 @@ "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, "is-regexp": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", @@ -7132,24 +7418,24 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true }, - "jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" }, "dependencies": { "has-flag": { @@ -7158,10 +7444,19 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "requires": { + "semver": "^7.5.3" + } + }, "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -7169,6 +7464,32 @@ } } }, + "istanbul-reports": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "requires": { + "@isaacs/cliui": "^8.0.2", + "@pkgjs/parseargs": "^0.11.0" + } + }, + "joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -7176,19 +7497,18 @@ "dev": true }, "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" } }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, "json-parse-even-better-errors": { @@ -7209,29 +7529,31 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, - "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, - "peer": true - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true + "requires": { + "json-buffer": "3.0.1" + } }, "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" } }, + "lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true + }, "lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -7292,19 +7614,8 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "execa": { "version": "4.1.0", @@ -7344,27 +7655,6 @@ "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", "dev": true }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -7373,15 +7663,6 @@ "requires": { "has-flag": "^4.0.0" } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } } } }, @@ -7418,47 +7699,25 @@ } } }, - "loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", "dev": true }, - "loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" - }, - "dependencies": { - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - } - } - }, "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "requires": { - "p-locate": "^4.1.0" + "p-locate": "^5.0.0" } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, "log-symbols": { @@ -7600,22 +7859,13 @@ "get-func-name": "^2.0.0" } }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", "dev": true, "requires": { - "semver": "^6.0.0" + "@jridgewell/sourcemap-codec": "^1.5.5" } }, "make-error": { @@ -7640,21 +7890,6 @@ "picomatch": "^2.3.1" } }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "requires": { - "mime-db": "1.52.0" - } - }, "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -7670,19 +7905,22 @@ "brace-expansion": "^1.1.7" } }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true }, - "mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "mlly": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.0.tgz", + "integrity": "sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==", "dev": true, "requires": { - "minimist": "^1.2.6" + "acorn": "^8.15.0", + "pathe": "^2.0.3", + "pkg-types": "^1.3.1", + "ufo": "^1.6.1" } }, "mocha": { @@ -7714,12 +7952,6 @@ "yargs-unparser": "2.0.0" }, "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, "brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -7735,16 +7967,6 @@ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -7760,15 +7982,6 @@ "argparse": "^2.0.1" } }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, "minimatch": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", @@ -7784,24 +7997,6 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, "serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", @@ -7834,11 +8029,16 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } }, "nanoid": { "version": "3.3.3", @@ -7852,24 +8052,6 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", - "dev": true - }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -7883,16 +8065,14 @@ "dev": true, "requires": { "path-key": "^3.0.0" - }, - "dependencies": { - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - } } }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -7912,41 +8092,35 @@ } }, "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" } }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { - "p-try": "^2.0.0" + "yocto-queue": "^0.1.0" } }, "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "requires": { - "p-limit": "^2.2.0" + "p-limit": "^3.0.2" } }, "p-map": { @@ -7958,10 +8132,10 @@ "aggregate-error": "^3.0.0" } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true }, "parent-module": { @@ -7998,16 +8172,28 @@ "dev": true }, "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "requires": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + } + } }, "path-type": { "version": "4.0.0", @@ -8015,16 +8201,41 @@ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, + "pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true + }, "pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true }, + "peggy": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/peggy/-/peggy-5.0.6.tgz", + "integrity": "sha512-Sud8Zus0JAgE+U4zwkJv29OOaXhviFI7J90/6cGfy3OoqR8dpnieeF9a46dj0bTtqiFnrFatldA6ltQyOJvNmg==", + "dev": true, + "requires": { + "@peggyjs/from-mem": "3.1.1", + "commander": "^14.0.0", + "source-map-generator": "2.0.2" + }, + "dependencies": { + "commander": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.2.tgz", + "integrity": "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ==", + "dev": true + } + } + }, "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true }, "picomatch": { @@ -8033,13 +8244,21 @@ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true + }, + "pkg-types": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", + "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", "dev": true, "requires": { - "find-up": "^4.0.0" + "confbox": "^0.1.8", + "mlly": "^1.7.4", + "pathe": "^2.0.1" } }, "please-upgrade-node": { @@ -8052,9 +8271,9 @@ } }, "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, "prettier": { @@ -8063,21 +8282,6 @@ "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", "dev": true }, - "prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "requires": { - "fast-diff": "^1.1.2" - } - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -8089,9 +8293,9 @@ } }, "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true }, "randombytes": { @@ -8112,55 +8316,12 @@ "picomatch": "^2.2.1" } }, - "rechoir": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", - "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", - "dev": true, - "requires": { - "resolve": "^1.20.0" - } - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, - "resolve": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", - "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", - "dev": true, - "requires": { - "is-core-module": "^2.8.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "requires": { - "resolve-from": "^5.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } - } - }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -8183,28 +8344,39 @@ "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", "dev": true }, - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "dev": true - }, - "rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", - "dev": true, - "requires": { - "tslib": "^1.9.0" + "rollup": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.55.1.tgz", + "integrity": "sha512-wDv/Ht1BNHB4upNbK74s9usvl7hObDnvVzknxqY/E/O3X6rW1U1rV1aENEfJ54eFZDTNo7zv1f5N4edCluH7+A==", + "dev": true, + "requires": { + "@rollup/rollup-android-arm-eabi": "4.55.1", + "@rollup/rollup-android-arm64": "4.55.1", + "@rollup/rollup-darwin-arm64": "4.55.1", + "@rollup/rollup-darwin-x64": "4.55.1", + "@rollup/rollup-freebsd-arm64": "4.55.1", + "@rollup/rollup-freebsd-x64": "4.55.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.55.1", + "@rollup/rollup-linux-arm-musleabihf": "4.55.1", + "@rollup/rollup-linux-arm64-gnu": "4.55.1", + "@rollup/rollup-linux-arm64-musl": "4.55.1", + "@rollup/rollup-linux-loong64-gnu": "4.55.1", + "@rollup/rollup-linux-loong64-musl": "4.55.1", + "@rollup/rollup-linux-ppc64-gnu": "4.55.1", + "@rollup/rollup-linux-ppc64-musl": "4.55.1", + "@rollup/rollup-linux-riscv64-gnu": "4.55.1", + "@rollup/rollup-linux-riscv64-musl": "4.55.1", + "@rollup/rollup-linux-s390x-gnu": "4.55.1", + "@rollup/rollup-linux-x64-gnu": "4.55.1", + "@rollup/rollup-linux-x64-musl": "4.55.1", + "@rollup/rollup-openbsd-x64": "4.55.1", + "@rollup/rollup-openharmony-arm64": "4.55.1", + "@rollup/rollup-win32-arm64-msvc": "4.55.1", + "@rollup/rollup-win32-ia32-msvc": "4.55.1", + "@rollup/rollup-win32-x64-gnu": "4.55.1", + "@rollup/rollup-win32-x64-msvc": "4.55.1", + "@types/estree": "1.0.8", + "fsevents": "~2.3.2" } }, "safe-buffer": { @@ -8213,27 +8385,10 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "schema-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", - "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.5", - "ajv": "^6.12.4", - "ajv-keywords": "^3.5.2" - } - }, "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true }, "semver-compare": { @@ -8242,37 +8397,19 @@ "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", "dev": true }, - "serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "^3.0.0" } }, "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, "signal-exit": { @@ -8319,25 +8456,15 @@ } }, "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", + "integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==", "dev": true }, - "source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "source-map-generator": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/source-map-generator/-/source-map-generator-2.0.2.tgz", + "integrity": "sha512-unCl5BQhF/us51DiT7SvlSY3QUPhyfAdHJxd8l7FXdwzqxli0UDMV2dEuei2SeGp3Z4rB/AJ9zKi1mGOp2K2ww==", "dev": true }, "string-argv": { @@ -8368,6 +8495,28 @@ } } }, + "string-width-cjs": { + "version": "npm:string-width@4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, "stringify-object": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", @@ -8379,21 +8528,13 @@ "is-regexp": "^1.0.0" } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "strip-ansi-cjs": { + "version": "npm:strip-ansi@6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true - } + "ansi-regex": "^5.0.1" } }, "strip-final-newline": { @@ -8408,6 +8549,39 @@ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, + "sucrase": { + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", + "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "tinyglobby": "^0.2.11", + "ts-interface-checker": "^0.1.9" + }, + "dependencies": { + "@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "requires": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true + } + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -8417,151 +8591,106 @@ "has-flag": "^3.0.0" } }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, - "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "test-exclude": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", "dev": true, "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "@istanbuljs/schema": "^0.1.2", + "glob": "^10.4.1", + "minimatch": "^9.0.4" }, "dependencies": { - "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true + "brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } }, - "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "glob": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" } }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "brace-expansion": "^2.0.1" } } } }, - "tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true - }, - "terser": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.20.0.tgz", - "integrity": "sha512-e56ETryaQDyebBwJIWYB2TT6f2EZ0fL0sW/JRXNMN26zZdKi2u/E/5my5lG6jNxym6qsrVXfFRmOdV42zlAgLQ==", + "thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", "dev": true, "requires": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "dependencies": { - "acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - } + "any-promise": "^1.0.0" } }, - "terser-webpack-plugin": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", - "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", "dev": true, "requires": { - "@jridgewell/trace-mapping": "^0.3.17", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.16.8" - }, - "dependencies": { - "schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - } + "thenify": ">= 3.1.0 < 4" } }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true + }, + "tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", "dev": true, "requires": { - "os-tmpdir": "~1.0.2" + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "dependencies": { + "fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "requires": {} + }, + "picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true + } } }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -8571,82 +8700,29 @@ "is-number": "^7.0.0" } }, - "ts-loader": { - "version": "9.4.4", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.4.tgz", - "integrity": "sha512-MLukxDHBl8OJ5Dk3y69IsKVFRA/6MwzEqBgh+OXMPB/OD01KQuWPFd1WAQP8a5PeSCAxfnkhiuWqfmFJzJQt9w==", + "tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true + }, + "ts-api-utils": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz", + "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==", "dev": true, - "requires": { - "chalk": "^4.1.0", - "enhanced-resolve": "^5.0.0", - "micromatch": "^4.0.0", - "semver": "^7.3.4" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } + "requires": {} + }, + "ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true }, "ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "requires": { "@cspotcode/source-map-support": "^0.8.0", @@ -8664,12 +8740,6 @@ "yn": "3.1.1" }, "dependencies": { - "acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true - }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -8678,28 +8748,93 @@ } } }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" + "tsup": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.5.1.tgz", + "integrity": "sha512-xtgkqwdhpKWr3tKPmCkvYmS9xnQK3m3XgxZHwSUjvfTjp7YfXe5tT3GgWi0F2N+ZSMsOeWeZFh7ZZFg5iPhing==", + "dev": true, + "requires": { + "bundle-require": "^5.1.0", + "cac": "^6.7.14", + "chokidar": "^4.0.3", + "consola": "^3.4.0", + "debug": "^4.4.0", + "esbuild": "^0.27.0", + "fix-dts-default-cjs-exports": "^1.0.0", + "joycon": "^3.1.1", + "picocolors": "^1.1.1", + "postcss-load-config": "^6.0.1", + "resolve-from": "^5.0.0", + "rollup": "^4.34.8", + "source-map": "^0.7.6", + "sucrase": "^3.35.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.11", + "tree-kill": "^1.2.2" + }, + "dependencies": { + "chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "requires": { + "readdirp": "^4.0.1" + } + }, + "debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "requires": { + "ms": "^2.1.3" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "postcss-load-config": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", + "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", + "dev": true, + "requires": { + "lilconfig": "^3.1.1" + } + }, + "readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, + "yaml": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz", + "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==", + "dev": true, + "optional": true, + "peer": true + } } }, "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" } }, "type-detect": { @@ -8715,20 +8850,16 @@ "dev": true }, "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true }, - "update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", - "dev": true, - "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - } + "ufo": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.2.tgz", + "integrity": "sha512-heMioaxBcG9+Znsda5Q8sQbWnLJSl98AFDXTO80wELWEzX3hordXsTdxrIfMQoO9IY1MEnoGoPjpoKpMj+Yx0Q==", + "dev": true }, "uri-js": { "version": "4.4.1", @@ -8739,201 +8870,100 @@ "punycode": "^2.1.0" } }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true }, - "watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, "requires": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "dependencies": { + "convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + } } }, - "webpack": { - "version": "5.88.2", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz", - "integrity": "sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==", + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", - "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.15.0", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", - "webpack-sources": "^3.2.3" - }, - "dependencies": { - "acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true - }, - "acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", - "dev": true, - "requires": {} - }, - "schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - } + "isexe": "^2.0.0" } }, - "webpack-cli": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", - "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", + "word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true + }, + "workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "requires": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.1.1", - "@webpack-cli/info": "^2.0.2", - "@webpack-cli/serve": "^2.0.5", - "colorette": "^2.0.14", - "commander": "^10.0.1", - "cross-spawn": "^7.0.3", - "envinfo": "^7.7.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^3.1.1", - "rechoir": "^0.8.0", - "webpack-merge": "^5.7.3" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "dependencies": { - "commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "color-convert": "^2.0.1" } }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "shebang-regex": "^3.0.0" + "color-name": "~1.1.4" } }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "isexe": "^2.0.0" + "ansi-regex": "^5.0.1" } } } }, - "webpack-merge": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.9.0.tgz", - "integrity": "sha512-6NbRQw4+Sy50vYNTw7EyOn41OZItPiXB8GNv3INSoe3PSFaHJEz3SHTrYVaRm2LilNGnFUzh0FAwqPEmU/CwDg==", - "dev": true, - "requires": { - "clone-deep": "^4.0.1", - "wildcard": "^2.0.0" - } - }, - "webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "wildcard": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", - "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", - "dev": true - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true - }, - "workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true - }, - "wrap-ansi": { - "version": "7.0.0", + "wrap-ansi-cjs": { + "version": "npm:wrap-ansi@7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, @@ -8984,27 +9014,12 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "yaml": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", diff --git a/package.json b/package.json index 14d4148..239985c 100644 --- a/package.json +++ b/package.json @@ -1,25 +1,29 @@ { "name": "jsonpathly", - "version": "2.0.3", + "version": "3.0.0", "description": "Query json with jsonpath expressions", - "browser": "dist/index.web.mjs", - "main": "dist/index.node.cjs", - "module": "dist/index.node.mjs", + "main": "dist/index.cjs", + "module": "dist/index.mjs", + "browser": "dist/index.mjs", "types": "dist/index.d.ts", "files": [ "dist" ], + "sideEffects": false, "scripts": { - "gen": "antlr4 -Dlanguage=JavaScript ./src/parser/generated/JSONPath.g4", + "gen": "peggy --format es -o src/parser/generated/parser.js src/parser/jsonpath.peggy", "test": "mocha --require ts-node/register --timeout 60000 --exit --no-cache tests/*.ts", - "build": "webpack", + "build": "tsup", "format": "prettier --write \"src/**/*.ts\"", "lint": "eslint src --ext .ts", "prepare": "npm run build", "prepublishOnly": "npm test && npm run lint", - "preversion": "npm run lint", + "preversion": "npm test && npm run lint", "version": "npm run format && git add -A src", - "postversion": "git push && git push --tags" + "postversion": "git push && git push --tags", + "release:patch": "npm version patch -m 'chore: release v%s'", + "release:minor": "npm version minor -m 'chore: release v%s'", + "release:major": "npm version major -m 'chore: release v%s'" }, "repository": { "type": "git", @@ -40,43 +44,26 @@ "devDependencies": { "@types/chai": "^4.3.6", "@types/mocha": "^10.0.1", - "@typescript-eslint/eslint-plugin": "^2.22.0", - "@typescript-eslint/parser": "^2.22.0", - "babel-eslint": "^10.1.0", - "babel-loader": "8.2.3", + "@typescript-eslint/eslint-plugin": "^8.52.0", + "@typescript-eslint/parser": "^8.52.0", + "c8": "^10.1.3", "chai": "^4.3.8", - "core-js": "^3.22.5", - "eslint": "^6.8.0", - "eslint-config-prettier": "^6.11.0", - "eslint-plugin-prettier": "^3.1.3", + "eslint": "^9.39.2", "lint-staged": "^10.0.8", "mocha": "^10.2.0", + "peggy": "^5.0.6", "prettier": "^2.6.2", - "ts-loader": "^9.4.4", - "ts-node": "^10.9.1", - "typescript": "^4.9.5", - "webpack": "^5.88.2", - "webpack-cli": "^5.1.4" - }, - "dependencies": { - "antlr4": "^4.13.2", - "fast-deep-equal": "^3.1.3" + "ts-node": "^10.9.2", + "tsup": "^8.5.1", + "typescript": "^5.9.3" }, "exports": { ".": { "types": "./dist/index.d.ts", - "node": { - "types": "./dist/index.d.ts", - "import": "./dist/index.node.mjs", - "require": "./dist/index.node.cjs", - "default": "./dist/index.node.mjs" - }, - "browser": { - "types": "./dist/index.d.ts", - "import": "./dist/index.web.mjs", - "require": "./dist/index.web.cjs", - "default": "./dist/index.web.mjs" - } + "import": "./dist/index.mjs", + "require": "./dist/index.cjs", + "browser": "./dist/index.mjs", + "default": "./dist/index.mjs" } } } diff --git a/src/handler/Handler.ts b/src/handler/Handler.ts index 06042fa..2738293 100644 --- a/src/handler/Handler.ts +++ b/src/handler/Handler.ts @@ -1,12 +1,17 @@ -import { JSONPathSyntaxError } from '../parser/errors'; +/** + * JSONPath Query Handler + * + * Core engine that traverses JSON documents using parsed JSONPath AST. + * Implements RFC 9535 semantics with jsonpathly extensions. + */ import { BracketExpressionContent, BracketMemberContent, Comparator, DotDot, FilterExpressionContent, + FunctionCall, Identifier, - Indexes, LogicalExpression, NumericLiteral, OperationContent, @@ -16,324 +21,249 @@ import { Subscript, Unions, } from '../parser/types'; -import { isArray, isDefined, isEqual, isNumber, isPlainObject, isString, isUndefined } from './helper'; - -const getNumericLiteralIndex = (index: number, total: number): number => (index < 0 ? total + index : index); -const formatStringLiteralPath = (paths: string | string[], v: string): string | string[] => paths.concat(`["${v}"]`); +import { comparators, isEmpty, matchRegex } from './comparators'; +import { rfc9535Functions } from './functions'; +import { isArray, isDefined, isNumber, isPlainObject, isUndefined } from './helper'; + +// ============================================ +// Path Formatting Utilities +// ============================================ + +/** + * RFC 9535 Normalized Path Format: Use single quotes with proper escaping. + * Escapes: \' (single quote), \\ (backslash), \b \f \n \r \t (control chars) + */ +const formatStringLiteralPath = (paths: string | string[], v: string): string | string[] => { + const escaped = v + .replace(/\\/g, '\\\\') + .replace(/'/g, "\\'") + .replace(/\x08/g, '\\b') + .replace(/\f/g, '\\f') + .replace(/\n/g, '\\n') + .replace(/\r/g, '\\r') + .replace(/\t/g, '\\t') + .replace(/[\x00-\x07\x0b\x0e-\x1f]/g, (c) => '\\u00' + c.charCodeAt(0).toString(16).padStart(2, '0')); + return paths.concat(`['${escaped}']`); +}; + +/** Format numeric index for path output */ const formatNumericLiteralPath = (paths: string | string[], v: number): string | string[] => paths.concat(`[${v}]`); -type ValuePath = { value: T; paths: string | string[]; isIndefinite?: boolean }; +// ============================================ +// Index Utilities +// ============================================ + +/** Normalize array index (negative indices count from end) */ +const normalizeArrayIndex = (index: number, length: number): number => (index < 0 ? length + index : index); + +/** + * Check if array index is valid and get element. + * Returns { exists: true, value, index } if valid, { exists: false } otherwise. + * This properly handles elements with undefined values. + */ +const getArrayElement = ( + arr: T[], + index: number +): { exists: true; value: T; index: number } | { exists: false } => { + const normalized = normalizeArrayIndex(index, arr.length); + if (normalized >= 0 && normalized < arr.length) { + return { exists: true, value: arr[normalized], index: normalized }; + } + return { exists: false }; +}; + +// ============================================ +// ValuePath Type +// ============================================ + +type ValuePath = { + value: T; + paths: string | string[]; + isIndefinite?: boolean; +}; + +// ============================================ +// Handler Class +// ============================================ -export class Handler { +export class Handler { rootPayload: ValuePath; constructor(rootPayload: T) { this.rootPayload = { value: rootPayload, paths: '$' }; } + // ============================================ + // Property Access Handlers + // ============================================ + private handleIdentifier = (payload: ValuePath, tree: Identifier): ValuePath | undefined => { if (!isPlainObject(payload.value) || !(tree.value in payload.value)) { return; } - return { value: payload.value[tree.value], paths: formatStringLiteralPath(payload.paths, tree.value) }; }; - private handleWildcard = ({ value, paths }: ValuePath): ValuePath[] => { - if (!isPlainObject(value) && !isArray(value)) { - return []; + private handleStringLiteral = ({ value, paths }: ValuePath, tree: StringLiteral): ValuePath | undefined => { + if (!isPlainObject(value) || !(tree.value in value)) { + return; } + return { value: value[tree.value], paths: formatStringLiteralPath(paths, tree.value) }; + }; + private handleWildcard = ({ value, paths }: ValuePath): ValuePath[] => { if (isArray(value)) { return value.map((item, index) => ({ value: item, paths: formatNumericLiteralPath(paths, index), })); } - - return Object.keys(value).map((key) => ({ value: value[key], paths: formatStringLiteralPath(paths, key) })); + if (isPlainObject(value)) { + return Object.keys(value).map((key) => ({ + value: value[key], + paths: formatStringLiteralPath(paths, key), + })); + } + return []; }; - private handleOperationContent = (payload: ValuePath, tree: OperationContent): ValuePath | undefined => { - switch (tree.type) { - case 'root': { - return this.handleSubscript(this.rootPayload, tree.next); - } - case 'current': { - return this.handleSubscript(payload, tree.next); - } - case 'value': { - return { value: tree.value, paths: payload.paths }; - } - case 'groupOperation': { - return this.handleOperationContent(payload, tree.value); - } - case 'operation': { - const left = this.handleOperationContent(payload, tree.left)?.value; - const right = this.handleOperationContent(payload, tree.right)?.value; - - if (!isNumber(left) || !isNumber(right)) { - return; - } + // ============================================ + // Numeric Index Handlers + // ============================================ - switch (tree.operator) { - case 'plus': { - return { value: left + right, paths: payload.paths }; - } - case 'minus': { - return { value: left - right, paths: payload.paths }; - } - case 'div': { - if (right === 0) { - return; - } - return { value: left / right, paths: payload.paths }; - } - case 'multi': { - return { value: left * right, paths: payload.paths }; - } - case '': { - if (right > 0) { - throw new JSONPathSyntaxError(0, 0, 'Missing operator in operation'); - } - return { value: left + right, paths: payload.paths }; - } - } - } + /** Bracket notation numeric index - RFC 9535: only works on arrays */ + private handleNumericLiteral = ({ value, paths }: ValuePath, tree: NumericLiteral): ValuePath | undefined => { + if (!isArray(value)) { + return; + } + const result = getArrayElement(value, tree.value); + if (result.exists) { + return { value: result.value, paths: formatNumericLiteralPath(paths, result.index) }; } + return; }; - private handleComparator = (payload: ValuePath, tree: Comparator): boolean => { - const leftValue = this.handleOperationContent(payload, tree.left)?.value; - - if (tree.operator === 'empty') { - if (!isArray(leftValue) && !isString(leftValue)) { - return false; + /** Dot notation numeric ($.2) - works as property access on objects, index on arrays */ + private handleDotNumericLiteral = ({ value, paths }: ValuePath, tree: NumericLiteral): ValuePath | undefined => { + if (isArray(value)) { + const result = getArrayElement(value, tree.value); + if (result.exists) { + return { value: result.value, paths: formatNumericLiteralPath(paths, result.index) }; } - return leftValue.length === 0; + return; } - - const rightValue = this.handleOperationContent(payload, tree.right)?.value; - - switch (tree.operator) { - case 'subsetof': { - if (!isArray(leftValue) || !isArray(rightValue)) { - return false; - } - const itemsRight = new Set(rightValue); - return leftValue.every((e) => itemsRight.has(e)); - } - case 'anyof': { - if (!isArray(leftValue) || !isArray(rightValue)) { - return false; - } - const itemsRight = new Set(rightValue); - return leftValue.some((e) => itemsRight.has(e)); - } - case 'noneof': { - if (!isArray(leftValue) || !isArray(rightValue)) { - return false; - } - const itemsRight = new Set(rightValue); - return !leftValue.some((e) => itemsRight.has(e)); - } - case 'sizeof': { - if ((!isArray(leftValue) && !isString(leftValue)) || (!isArray(rightValue) && !isString(rightValue))) { - return false; - } - return leftValue.length === rightValue.length; - } - case 'size': { - if ((!isArray(leftValue) && !isString(leftValue)) || !isNumber(rightValue)) { - return false; - } - return leftValue.length === rightValue; - } - case 'eq': { - return isEqual(leftValue, rightValue); - } - case 'ne': { - return !isEqual(leftValue, rightValue); - } - case 'lt': { - if (isNumber(leftValue) && isNumber(rightValue)) { - return leftValue < rightValue; - } - if (isString(leftValue) && isString(rightValue)) { - return leftValue < rightValue; - } - return false; - } - case 'le': { - if (isNumber(leftValue) && isNumber(rightValue)) { - return leftValue <= rightValue; - } - if (isString(leftValue) && isString(rightValue)) { - return leftValue <= rightValue; - } - return false; - } - case 'gt': { - if (isNumber(leftValue) && isNumber(rightValue)) { - return leftValue > rightValue; - } - if (isString(leftValue) && isString(rightValue)) { - return leftValue > rightValue; - } - return false; - } - case 'ge': { - if (isNumber(leftValue) && isNumber(rightValue)) { - return leftValue >= rightValue; - } - if (isString(leftValue) && isString(rightValue)) { - return leftValue >= rightValue; - } - return false; - } - case 'in': { - if (!isArray(rightValue)) { - return false; - } - return rightValue.includes(leftValue); - } - case 'nin': { - if (!isArray(rightValue)) { - return false; - } - return !rightValue.includes(leftValue); - } - case 'reg': { - if (!isString(leftValue) || !isString(rightValue)) { - return false; - } - const value = rightValue.slice(1, -1); - return !!leftValue.match(new RegExp(value, tree.right.opts)); + if (isPlainObject(value)) { + const key = String(tree.value); + if (key in value) { + return { value: value[key], paths: formatStringLiteralPath(paths, key) }; } + return; } + return; }; - private handleLogicalExpression = (payload: ValuePath, tree: LogicalExpression): boolean => { - const leftValue = this.handleFilterExpressionContent(payload, tree.left); - const rightValue = this.handleFilterExpressionContent(payload, tree.right); + // ============================================ + // Slice Handler + // ============================================ - switch (tree.operator) { - case 'and': { - return leftValue && rightValue; - } - case 'or': { - return leftValue || rightValue; - } + /** RFC 9535 Section 2.3.4.2: Array slice semantics */ + private handleSlices = ({ value, paths }: ValuePath, tree: Slices): ValuePath[] => { + if (!isArray(value)) { + return []; } - }; - private handleFilterExpressionContent = (payload: ValuePath, tree: FilterExpressionContent): boolean => { - switch (tree.type) { - case 'logicalExpression': { - return this.handleLogicalExpression(payload, tree); - } - case 'comparator': { - return this.handleComparator(payload, tree); - } - case 'groupExpression': { - return this.handleFilterExpressionContent(payload, tree.value); - } - case 'notExpression': { - return !this.handleFilterExpressionContent(payload, tree.value); - } - case 'root': { - return isDefined(this.handleSubscript(this.rootPayload, tree.next)); - } - case 'current': { - return isDefined(this.handleSubscript(payload, tree.next)); - } - case 'value': { - return !!tree.value; - } - } - }; + const len = value.length; + const step = tree.step ?? 1; - private handleNumericLiteral = ({ value, paths }: ValuePath, tree: NumericLiteral): ValuePath | undefined => { - if (!isArray(value) && !isPlainObject(value)) { - return; + // Step of 0 returns empty per RFC 9535 + if (step === 0) { + return []; } - if (isPlainObject(value)) { - return this.handleStringLiteral({ value, paths }, { type: 'stringLiteral', value: `${tree.value}` }); - } + // Normalize start (n) and end (m) based on step direction + let n: number; + let m: number; - const index = getNumericLiteralIndex(tree.value, value.length); + if (step > 0) { + n = tree.start !== null ? normalizeArrayIndex(tree.start, len) : 0; + m = tree.end !== null ? normalizeArrayIndex(tree.end, len) : len; + } else { + n = tree.start !== null ? normalizeArrayIndex(tree.start, len) : len - 1; + m = tree.end !== null ? normalizeArrayIndex(tree.end, len) : -len - 1; + } - if (index < value.length && index >= 0) { - return { value: value[index], paths: formatNumericLiteralPath(paths, index) }; + // Compute bounds per RFC 9535 Section 2.3.4.2 + let lower: number; + let upper: number; + + if (step > 0) { + lower = Math.max(n, 0); + upper = Math.min(m, len); + } else { + // For negative step: upper = min(start, len-1), lower = max(end, -1) + upper = Math.min(n, len - 1); + lower = Math.max(m, -1); } - return; - }; - private handleSlices = ({ value, paths }: ValuePath, tree: Slices): ValuePath[] => { + // Iterate and collect results const results: ValuePath[] = []; + let i = step > 0 ? lower : upper; - if (!isArray(value)) { - return []; + while ((step > 0 && i < upper) || (step < 0 && i > lower)) { + results.push({ value: value[i], paths: formatNumericLiteralPath(paths, i) }); + i += step; } - const start = tree.start !== null ? getNumericLiteralIndex(tree.start, value.length) : 0; - const end = tree.end !== null ? getNumericLiteralIndex(tree.end, value.length) : value.length; - const step = tree.step === null || tree.step <= 0 ? 1 : tree.step; - - let count = 0; - value.forEach((item, index) => { - if (index >= start && index < end) { - if (count % step === 0) { - results.push({ value: item, paths: formatNumericLiteralPath(paths, index) }); - } - count += 1; - } - }); - return results; }; - private handleStringLiteral = ({ value, paths }: ValuePath, tree: StringLiteral): ValuePath | undefined => { - if (!isPlainObject(value) || !(tree.value in value)) { - return; - } - - return { value: value[tree.value], paths: formatStringLiteralPath(paths, tree.value) }; - }; + // ============================================ + // Union and Index Handlers + // ============================================ + // RFC 9535: Union selector list supports mixed types (strings, numbers, wildcards) private handleUnions = (payload: ValuePath, tree: Unions): ValuePath[] => { - if (!isPlainObject(payload.value)) { - return []; - } + const results: ValuePath[] = []; - return tree.values - .map((value) => { - switch (value.type) { - case 'identifier': { - return this.handleIdentifier(payload, value); + for (const selector of tree.values) { + switch (selector.type) { + case 'identifier': + if (isPlainObject(payload.value)) { + const result = this.handleIdentifier(payload, selector); + if (isDefined(result)) results.push(result); } - case 'stringLiteral': { - return this.handleStringLiteral(payload, value); + break; + case 'stringLiteral': + if (isPlainObject(payload.value)) { + const result = this.handleStringLiteral(payload, selector); + if (isDefined(result)) results.push(result); } - } - }) - .filter(isDefined); - }; - - private handleIndexes = ({ value, paths }: ValuePath, tree: Indexes): ValuePath[] => { - if (!isArray(value)) { - return []; + break; + case 'numericLiteral': + if (isArray(payload.value)) { + const result = this.handleNumericLiteral(payload, selector); + if (isDefined(result)) results.push(result); + } + break; + case 'wildcard': + results.push(...this.handleWildcard(payload)); + break; + } } - return tree.values.map((item) => this.handleNumericLiteral({ value, paths }, item)).filter(isDefined); + return results; }; + // ============================================ + // Recursive Descent Handler + // ============================================ + private handleDotdot = (payload: ValuePath, tree: DotDot): ValuePath[] => { const treeValue = tree.value; const value = payload.value; let results: ValuePath[] = []; + // Match at current level switch (treeValue.type) { case 'bracketMember': { const result = this.handleBracketMemberContent(payload, treeValue.value); @@ -350,8 +280,7 @@ export class Handler { break; } case 'wildcard': { - const result = this.handleWildcard(payload); - results = results.concat(result); + results = results.concat(this.handleWildcard(payload)); break; } case 'identifier': { @@ -363,35 +292,165 @@ export class Handler { } } + // Recurse into children if (isPlainObject(value)) { - Object.keys(value).forEach((key) => { - const result = this.handleDotdot( - { value: value[key], paths: formatStringLiteralPath(payload.paths, key) }, - tree, - ); - results = results.concat(result); - }); + for (const key of Object.keys(value)) { + const childPayload = { value: value[key], paths: formatStringLiteralPath(payload.paths, key) }; + results = results.concat(this.handleDotdot(childPayload, tree)); + } } else if (isArray(value)) { value.forEach((item, index) => { - const result = this.handleDotdot({ value: item, paths: formatNumericLiteralPath(payload.paths, index) }, tree); - results = results.concat(result); + const childPayload = { value: item, paths: formatNumericLiteralPath(payload.paths, index) }; + results = results.concat(this.handleDotdot(childPayload, tree)); }); } return results; }; + // ============================================ + // Operation Handlers (Arithmetic) + // ============================================ + + private handleOperationContent = (payload: ValuePath, tree: OperationContent): ValuePath | undefined => { + switch (tree.type) { + case 'root': + return this.handleSubscript(this.rootPayload, tree.next); + case 'current': + return this.handleSubscript(payload, tree.next); + case 'value': + return { value: tree.value, paths: payload.paths }; + case 'groupOperation': + return this.handleOperationContent(payload, tree.value); + case 'functionCall': { + const result = this.handleFunctionCall(payload, tree); + return { value: result, paths: payload.paths }; + } + case 'operation': { + const left = this.handleOperationContent(payload, tree.left)?.value; + const right = this.handleOperationContent(payload, tree.right)?.value; + + if (!isNumber(left) || !isNumber(right)) { + return; + } + + switch (tree.operator) { + case 'plus': + return { value: left + right, paths: payload.paths }; + case 'minus': + return { value: left - right, paths: payload.paths }; + case 'div': + return right === 0 ? undefined : { value: left / right, paths: payload.paths }; + case 'multi': + return { value: left * right, paths: payload.paths }; + } + } + } + }; + + // ============================================ + // Comparator Handler + // ============================================ + + private handleComparator = (payload: ValuePath, tree: Comparator): boolean => { + const leftValue = this.handleOperationContent(payload, tree.left)?.value; + + // Handle unary 'empty' operator + if (tree.operator === 'empty') { + return isEmpty(leftValue); + } + + // Handle regex operator (different signature) + if (tree.operator === 'reg') { + return matchRegex(leftValue, tree.right.value, tree.right.opts); + } + + // Handle standard binary comparators + const rightValue = this.handleOperationContent(payload, tree.right)?.value; + const comparatorFn = comparators[tree.operator]; + + if (comparatorFn) { + return comparatorFn(leftValue, rightValue); + } + /* c8 ignore next */ + return false; + }; + + // ============================================ + // Logical Expression Handler + // ============================================ + + private handleLogicalExpression = (payload: ValuePath, tree: LogicalExpression): boolean => { + const leftValue = this.handleFilterExpressionContent(payload, tree.left); + const rightValue = this.handleFilterExpressionContent(payload, tree.right); + + switch (tree.operator) { + case 'and': + return leftValue && rightValue; + case 'or': + return leftValue || rightValue; + } + }; + + // ============================================ + // Function Call Handler + // ============================================ + + private handleFunctionCall = (payload: ValuePath, tree: FunctionCall): unknown => { + const args = tree.args.map((arg) => this.handleOperationContent(payload, arg)?.value); + const fn = rfc9535Functions[tree.name]; + return fn ? fn(args) : undefined; + }; + + // ============================================ + // Filter Expression Handler + // ============================================ + + private handleFilterExpressionContent = (payload: ValuePath, tree: FilterExpressionContent): boolean => { + switch (tree.type) { + case 'logicalExpression': + return this.handleLogicalExpression(payload, tree); + case 'comparator': + return this.handleComparator(payload, tree); + case 'groupExpression': + return this.handleFilterExpressionContent(payload, tree.value); + case 'notExpression': + return !this.handleFilterExpressionContent(payload, tree.value); + case 'functionCall': + return !!this.handleFunctionCall(payload, tree); + case 'root': { + const result = this.handleSubscript(this.rootPayload, tree.next); + // For indefinite results (filters, wildcards), check if non-empty + if (result?.isIndefinite) { + return Array.isArray(result.value) && result.value.length > 0; + } + return isDefined(result); + } + case 'current': { + const result = this.handleSubscript(payload, tree.next); + // For indefinite results (filters, wildcards), check if non-empty + if (result?.isIndefinite) { + return Array.isArray(result.value) && result.value.length > 0; + } + return isDefined(result); + } + case 'value': + return !!tree.value; + } + }; + + // ============================================ + // Bracket Content Handlers + // ============================================ + private handleBracketMemberContent = (payload: ValuePath, tree: BracketMemberContent): ValuePath | undefined => { switch (tree.type) { - case 'identifier': { + case 'identifier': return this.handleIdentifier(payload, tree); - } - case 'numericLiteral': { + case 'numericLiteral': return this.handleNumericLiteral(payload, tree); - } - case 'stringLiteral': { + case 'stringLiteral': return this.handleStringLiteral(payload, tree); - } } }; @@ -400,38 +459,41 @@ export class Handler { switch (tree.type) { case 'filterExpression': { - let results: ValuePath[] = []; + const results: ValuePath[] = []; + // RFC 9535 Section 2.3.5.1: Filter selects children for which expression is TRUE if (isArray(payloadValue)) { payloadValue.forEach((value, index) => { const item = { value, paths: formatNumericLiteralPath(payload.paths, index) }; if (this.handleFilterExpressionContent(item, tree.value)) { - results = results.concat(item); + results.push(item); } }); } else if (isPlainObject(payloadValue)) { - if (this.handleFilterExpressionContent(payload, tree.value)) { - results = results.concat(payload); + // For objects, iterate over values (children), not the root object + for (const key of Object.keys(payloadValue)) { + const item = { value: payloadValue[key], paths: formatStringLiteralPath(payload.paths, key) }; + if (this.handleFilterExpressionContent(item, tree.value)) { + results.push(item); + } } } return results; } - case 'indexes': { - return this.handleIndexes(payload, tree); - } - case 'unions': { + case 'unions': return this.handleUnions(payload, tree); - } - case 'wildcard': { + case 'wildcard': return this.handleWildcard(payload); - } - case 'slices': { + case 'slices': return this.handleSlices(payload, tree); - } } }; + // ============================================ + // Result Aggregation + // ============================================ + private concatIndefiniteValuePaths = (payload: ValuePath[], tree: Subscript | null): ValuePath => { if (!tree) { return payload.reduce>( @@ -447,26 +509,29 @@ export class Handler { let values: unknown[] = []; let paths: string[] = []; - payload.forEach((item) => { + for (const item of payload) { const result = this.handleSubscript(item, tree); - if (isUndefined(result)) { - return; + continue; } - values = result.isIndefinite ? values.concat(result.value) : [...values, result.value]; paths = paths.concat(result.paths); - }); + } return { value: values, paths, isIndefinite: true }; }; + // ============================================ + // Main Subscript Handler + // ============================================ + private handleSubscript = (payload: ValuePath, tree: Subscript | null): ValuePath | undefined => { if (tree === null) { return payload; } const treeValue = tree.value; + switch (treeValue.type) { case 'bracketExpression': { const result = this.handleBracketExpressionContent(payload, treeValue.value); @@ -489,7 +554,7 @@ export class Handler { return this.handleSubscript(result, tree.next); } case 'numericLiteral': { - const result = this.handleNumericLiteral(payload, treeValue.value); + const result = this.handleDotNumericLiteral(payload, treeValue.value); if (isUndefined(result)) { return; } @@ -500,7 +565,10 @@ export class Handler { return this.concatIndefiniteValuePaths(result, tree.next); } } + /* c8 ignore start */ + return; } + /* c8 ignore stop */ case 'dotdot': { const result = this.handleDotdot(payload, treeValue); return this.concatIndefiniteValuePaths(result, tree.next); @@ -508,6 +576,10 @@ export class Handler { } }; + // ============================================ + // Public Entry Point + // ============================================ + public handleRoot = (tree: Root): ValuePath | undefined => { return this.handleSubscript(this.rootPayload, tree.next); }; diff --git a/src/handler/comparators.ts b/src/handler/comparators.ts new file mode 100644 index 0000000..d30c03d --- /dev/null +++ b/src/handler/comparators.ts @@ -0,0 +1,143 @@ +/** + * Comparator implementations for JSONPath filter expressions. + * + * RFC 9535 comparison operators plus jsonpathly extensions. + */ +import { isValidIRegexp } from './functions'; +import { isArray, isEqual, isNumber, isString } from './helper'; + +type ComparatorFn = (left: unknown, right: unknown) => boolean; + +/** RFC 9535: Equality comparison (handles undefined for empty nodelists) */ +const eq: ComparatorFn = (left, right) => { + // RFC 9535: Empty nodelists on both sides compare equal + if (left === undefined && right === undefined) return true; + return isEqual(left, right); +}; + +/** RFC 9535: Inequality comparison */ +const ne: ComparatorFn = (left, right) => !isEqual(left, right); + +/** RFC 9535: Less than (numbers and strings) */ +const lt: ComparatorFn = (left, right) => { + if (isNumber(left) && isNumber(right)) return left < right; + if (isString(left) && isString(right)) return left < right; + return false; +}; + +/** RFC 9535: Less than or equal (numbers and strings) */ +const le: ComparatorFn = (left, right) => { + if (isNumber(left) && isNumber(right)) return left <= right; + if (isString(left) && isString(right)) return left <= right; + return false; +}; + +/** RFC 9535: Greater than (numbers and strings) */ +const gt: ComparatorFn = (left, right) => { + if (isNumber(left) && isNumber(right)) return left > right; + if (isString(left) && isString(right)) return left > right; + return false; +}; + +/** RFC 9535: Greater than or equal (numbers and strings) */ +const ge: ComparatorFn = (left, right) => { + if (isNumber(left) && isNumber(right)) return left >= right; + if (isString(left) && isString(right)) return left >= right; + return false; +}; + +/** Extension: Check if left value exists in right array */ +const inOp: ComparatorFn = (left, right) => { + if (!isArray(right)) return false; + return right.includes(left); +}; + +/** Extension: Check if left value does NOT exist in right array */ +const nin: ComparatorFn = (left, right) => { + if (!isArray(right)) return false; + return !right.includes(left); +}; + +/** Extension: Check if all elements in left exist in right (subset) */ +const subsetof: ComparatorFn = (left, right) => { + if (!isArray(left) || !isArray(right)) return false; + const rightSet = new Set(right); + return left.every((e) => rightSet.has(e)); +}; + +/** Extension: Check if any element in left exists in right */ +const anyof: ComparatorFn = (left, right) => { + if (!isArray(left) || !isArray(right)) return false; + const rightSet = new Set(right); + return left.some((e) => rightSet.has(e)); +}; + +/** Extension: Check if no elements in left exist in right */ +const noneof: ComparatorFn = (left, right) => { + if (!isArray(left) || !isArray(right)) return false; + const rightSet = new Set(right); + return !left.some((e) => rightSet.has(e)); +}; + +/** Extension: Check if left and right have same length (arrays/strings) */ +const sizeof: ComparatorFn = (left, right) => { + if ((!isArray(left) && !isString(left)) || (!isArray(right) && !isString(right))) { + return false; + } + return left.length === right.length; +}; + +/** Extension: Check if left has specific length (number) */ +const size: ComparatorFn = (left, right) => { + if ((!isArray(left) && !isString(left)) || !isNumber(right)) { + return false; + } + return left.length === right; +}; + +/** + * Map of comparison operators to their implementations. + * Use `in` key for the `in` operator since it's a reserved word. + */ +export const comparators: Record = { + eq, + ne, + lt, + le, + gt, + ge, + in: inOp, + nin, + subsetof, + anyof, + noneof, + sizeof, + size, +}; + +/** + * Check if array or string is empty. + * Separate function since it's a unary operator (no right operand). + */ +export const isEmpty = (value: unknown): boolean => { + if (!isArray(value) && !isString(value)) return false; + return value.length === 0; +}; + +/** + * Evaluate regex match (=~ operator). + * Validates I-Regexp compliance per RFC 9485 for consistency with match()/search(). + * Separate function due to different signature (needs opts). + */ +export const matchRegex = (left: unknown, pattern: string, opts: string): boolean => { + if (!isString(left) || !isString(pattern)) return false; + const value = pattern.slice(1, -1); + // RFC 9485: Validate I-Regexp compliance (same as match/search functions) + if (!isValidIRegexp(value)) return false; + try { + return !!left.match(new RegExp(value, opts)); + } catch { + // Invalid regex pattern + return false; + } +}; diff --git a/src/handler/functions.ts b/src/handler/functions.ts new file mode 100644 index 0000000..96fa363 --- /dev/null +++ b/src/handler/functions.ts @@ -0,0 +1,135 @@ +/** + * RFC 9535 Function implementations for JSONPath. + * + * These functions can be used in filter expressions: + * - length(value) - returns length of string, array, or object key count + * - count(nodelist) - returns count of nodes in nodelist + * - match(string, pattern) - full string match against I-Regexp + * - search(string, pattern) - substring match against I-Regexp + * - value(nodelist) - extracts single value from nodelist + */ +import { isArray, isDefined, isPlainObject, isString } from './helper'; + +type FunctionImpl = (args: unknown[]) => unknown; + +/** + * Check if \b or \B (word boundary) appears outside character classes. + * Inside [...], \b means backspace and is allowed by I-Regexp. + * Outside [...], \b means word boundary and is NOT allowed. + */ +const hasWordBoundaryOutsideCharClass = (pattern: string): boolean => { + let inCharClass = false; + for (let i = 0; i < pattern.length; i++) { + const char = pattern[i]; + if (char === '\\' && i + 1 < pattern.length) { + const next = pattern[i + 1]; + // Check for \b or \B outside character class + if ((next === 'b' || next === 'B') && !inCharClass) { + return true; + } + // Skip escaped character + i++; + } else if (char === '[' && !inCharClass) { + inCharClass = true; + } else if (char === ']' && inCharClass) { + inCharClass = false; + } + } + return false; +}; + +/** + * RFC 9485 I-Regexp validation. + * Rejects non-interoperable regex features for cross-platform compatibility. + */ +export const isValidIRegexp = (pattern: string): boolean => { + // Reject backreferences (\1, \2, etc.) + if (/\\[1-9]/.test(pattern)) return false; + // Reject lookahead/lookbehind ((?=, (?!, (?<=, (?...) + if (/\(\?<[a-zA-Z]/.test(pattern)) return false; + // Reject word boundaries (\b, \B) outside character classes + if (hasWordBoundaryOutsideCharClass(pattern)) return false; + return true; +}; + +/** + * RFC 9535 length() function. + * Returns length of string, array, or number of keys in object. + */ +const length: FunctionImpl = (args) => { + const val = args[0]; + if (isString(val)) return val.length; + if (isArray(val)) return val.length; + if (isPlainObject(val)) return Object.keys(val).length; + return undefined; +}; + +/** + * RFC 9535 count() function. + * Returns count of nodes in nodelist. + */ +const count: FunctionImpl = (args) => { + const val = args[0]; + if (isArray(val)) return val.length; + return isDefined(val) ? 1 : 0; +}; + +/** + * RFC 9535 match() function. + * Full string match against I-Regexp pattern. + * Pattern is implicitly anchored: ^(?:pattern)$ + */ +const match: FunctionImpl = (args) => { + const val = args[0]; + const pattern = args[1]; + if (!isString(val) || !isString(pattern)) return false; + if (!isValidIRegexp(pattern)) return false; + try { + const regex = new RegExp(`^(?:${pattern})$`, 'u'); + return regex.test(val); + } /* c8 ignore start */ catch { + return false; + } /* c8 ignore stop */ +}; + +/** + * RFC 9535 search() function. + * Substring match against I-Regexp pattern. + */ +const search: FunctionImpl = (args) => { + const val = args[0]; + const pattern = args[1]; + if (!isString(val) || !isString(pattern)) return false; + if (!isValidIRegexp(pattern)) return false; + try { + const regex = new RegExp(pattern, 'u'); + return regex.test(val); + } /* c8 ignore start */ catch { + return false; + } /* c8 ignore stop */ +}; + +/** + * RFC 9535 value() function. + * Extracts single value from nodelist, or Nothing if not exactly one. + */ +const value: FunctionImpl = (args) => { + const val = args[0]; + if (isArray(val) && val.length === 1) return val[0]; + if (!isArray(val) && isDefined(val)) return val; + return undefined; +}; + +/** + * Map of RFC 9535 function names to implementations. + */ +export const rfc9535Functions: Record = { + length, + count, + match, + search, + value, +}; diff --git a/src/handler/helper.ts b/src/handler/helper.ts index fa4d920..c708823 100644 --- a/src/handler/helper.ts +++ b/src/handler/helper.ts @@ -1,7 +1,52 @@ -import * as equal from 'fast-deep-equal'; +/** + * Deep equality comparison for JSON values. + * + * Handles JSON-compatible types: primitives (string, number, boolean, null), + * arrays, and plain objects. Per RFC 9535, JSONPath operates on JSON data. + * + * Note: Non-JSON objects (Date, RegExp, Map, Set, etc.) with no enumerable + * properties will compare as equal to empty objects. This is by design since + * JSONPath is specifically for JSON data, not arbitrary JavaScript objects. + */ +export const isEqual = (a: unknown, b: unknown): boolean => { + // Same reference or identical primitives + if (a === b) return true; -export const isEqual = (objA: unknown, objB: unknown): boolean => { - return equal(objA, objB); + // Handle null/undefined + if (a === null || b === null || a === undefined || b === undefined) { + return a === b; + } + + // Different types + if (typeof a !== typeof b) return false; + + // Arrays + if (Array.isArray(a) && Array.isArray(b)) { + if (a.length !== b.length) return false; + for (let i = 0; i < a.length; i++) { + if (!isEqual(a[i], b[i])) return false; + } + return true; + } + + // One is array, other is not + if (Array.isArray(a) !== Array.isArray(b)) return false; + + // Objects + if (typeof a === 'object' && typeof b === 'object') { + const keysA = Object.keys(a as object); + const keysB = Object.keys(b as object); + if (keysA.length !== keysB.length) return false; + for (const key of keysA) { + if (!Object.prototype.hasOwnProperty.call(b, key)) return false; + if (!isEqual((a as Record)[key], (b as Record)[key])) { + return false; + } + } + return true; + } + + return false; }; export const isArray = (item: unknown): item is unknown[] => { @@ -30,10 +75,10 @@ export const isString = (item: unknown): item is string => { return typeof item === 'string'; }; -export const isUndefined = (item: T | undefined): item is undefined => { +export const isUndefined = (item: T | undefined): item is undefined => { return typeof item === 'undefined'; }; -export const isDefined = (item: T): item is Exclude => { +export const isDefined = (item: T): item is Exclude => { return typeof item !== 'undefined'; }; diff --git a/src/handler/paths.ts b/src/handler/paths.ts index ea4e265..b99306a 100644 --- a/src/handler/paths.ts +++ b/src/handler/paths.ts @@ -1,15 +1,56 @@ +/** + * JSONPath path extraction. + * + * Returns the normalized paths of matched nodes instead of their values. + */ import { parseInternal } from '../parser/parse'; import { Handler } from './Handler'; import { isArray, isUndefined } from './helper'; +/** + * Options for the paths function. + */ export type PathsOptions = { + /** + * If true, returns empty array instead of throwing on invalid paths. + * @default false + */ hideExceptions?: boolean; }; +/** + * Get the normalized paths of nodes matching a JSONPath expression. + * + * Returns RFC 9535 normalized path format using single quotes for name selectors. + * + * @param payload - The JSON document to query + * @param path - JSONPath expression string + * @param options - Options + * @returns Array of normalized path strings + * + * @example + * ```typescript + * // Simple property + * paths({ a: { b: 1 } }, '$.a.b'); // => ["$['a']['b']"] + * + * // Array index + * paths([1, 2, 3], '$[1]'); // => ['$[1]'] + * + * // Wildcard + * paths({ a: 1, b: 2 }, '$.*'); // => ["$['a']", "$['b']"] + * + * // Filter + * paths([{ id: 1 }, { id: 2 }], '$[?(@.id == 1)]'); // => ['$[0]'] + * + * // Recursive descent + * paths({ a: { b: { c: 1 } } }, '$..c'); // => ["$['a']['b']['c']"] + * ``` + * + * @throws {JSONPathSyntaxError} If path is invalid (unless hideExceptions is true) + */ export const paths = (payload: unknown, path: string, options: PathsOptions = {}): string[] => { try { const tree = parseInternal(path); - const handler = new Handler(payload); const result = handler.handleRoot(tree); diff --git a/src/handler/query.ts b/src/handler/query.ts index 28f24fd..5925080 100644 --- a/src/handler/query.ts +++ b/src/handler/query.ts @@ -1,15 +1,34 @@ +/** + * JSONPath query execution. + * + * Main entry point for querying JSON documents using JSONPath expressions. + */ import { parseInternal } from '../parser/parse'; import { Handler } from './Handler'; import { isArray, isDefined, isUndefined } from './helper'; +/** + * Options for the query function. + */ export type QueryOptions = { + /** + * If true, returns undefined/empty array instead of throwing on invalid paths. + * @default false + */ hideExceptions?: boolean; + + /** + * If true, always returns results as an array. + * @default false + */ returnArray?: boolean; }; +/** + * Execute a single JSONPath query. + */ const querySingle = (payload: unknown, path: string, options: QueryOptions): unknown => { const tree = parseInternal(path); - const handler = new Handler(payload); const result = handler.handleRoot(tree); @@ -23,6 +42,9 @@ const querySingle = (payload: unknown, path: string, options: QueryOptions): unk return result?.value; }; +/** + * Execute multiple JSONPath queries and collect results. + */ const queryMany = (payload: unknown, paths: string[], options: QueryOptions): unknown => { const results: unknown[] = []; for (const path of paths) { @@ -34,6 +56,34 @@ const queryMany = (payload: unknown, paths: string[], options: QueryOptions): un return results; }; +/** + * Query a JSON document using JSONPath expression(s). + * + * @param payload - The JSON document to query + * @param paths - JSONPath expression string or array of expressions + * @param options - Query options + * @returns Matched value(s), undefined if no match, or empty array with returnArray option + * + * @example + * ```typescript + * // Single value + * query({ a: { b: 1 } }, '$.a.b'); // => 1 + * + * // Array of values + * query([1, 2, 3], '$[*]'); // => [1, 2, 3] + * + * // Filter expression + * query([{ id: 1 }, { id: 2 }], '$[?(@.id == 1)]'); // => [{ id: 1 }] + * + * // With returnArray option + * query({ a: 1 }, '$.a', { returnArray: true }); // => [1] + * + * // Multiple paths + * query({ a: 1, b: 2 }, ['$.a', '$.b']); // => [1, 2] + * ``` + * + * @throws {JSONPathSyntaxError} If path is invalid (unless hideExceptions is true) + */ export const query = (payload: unknown, paths: string | string[], options: QueryOptions = {}): unknown => { try { if (isArray(paths)) { @@ -44,10 +94,6 @@ export const query = (payload: unknown, paths: string | string[], options: Query if (!options.hideExceptions) { throw e; } - - if (!!options.returnArray) { - return []; - } - return; + return options.returnArray ? [] : undefined; } }; diff --git a/src/index.ts b/src/index.ts index 553f57d..1489a90 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,37 @@ +/** + * jsonpathly - A secure, eval-free JSONPath library for TypeScript/JavaScript. + * + * RFC 9535 compliant JSONPath implementation with extensions. + * + * @packageDocumentation + * + * @example + * ```typescript + * import { query, paths, parse, stringify } from 'jsonpathly'; + * + * const data = { + * store: { + * book: [ + * { title: 'Book 1', price: 10 }, + * { title: 'Book 2', price: 20 } + * ] + * } + * }; + * + * // Query values + * query(data, '$.store.book[0].title'); // => 'Book 1' + * query(data, '$.store.book[*].price'); // => [10, 20] + * query(data, '$.store.book[?(@.price < 15)]'); // => [{ title: 'Book 1', price: 10 }] + * + * // Get paths + * paths(data, '$.store.book[*].title'); // => ["$['store']['book'][0]['title']", ...] + * + * // Parse and stringify + * const ast = parse('$.store.book[0]'); + * stringify(ast); // => '$.store.book[0]' + * ``` + */ + export { paths } from './handler/paths'; export { query } from './handler/query'; diff --git a/src/parser/Listener.ts b/src/parser/Listener.ts deleted file mode 100644 index d3570a6..0000000 --- a/src/parser/Listener.ts +++ /dev/null @@ -1,639 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ - -import JSONPathListener from './generated/JSONPathListener'; -import JSONPathParser from './generated/JSONPathParser'; -import { - BracketExpression, - BracketExpressionContent, - BracketMember, - BracketMemberContent, - DotContent, - DotDotContent, - FilterExpression, - Identifier, - Indexes, - JsonPathElement, - NumericLiteral, - OperationContent, - Root, - Slices, - StringLiteral, - Subscript, - Unions, - Value, - ValueRegex, -} from './types'; - -const TYPE_CHECK_MAPPER = { - root: (node: JsonPathElement): node is Root => 'type' in node && node.type === 'root', - value: (node: JsonPathElement): node is Value => 'type' in node && node.type === 'value', - regex: (node: JsonPathElement): node is ValueRegex => - 'type' in node && node.type === 'value' && node.subtype === 'regex', - operationContent: (node: JsonPathElement): node is OperationContent => - 'type' in node && - typeof node.type === 'string' && - ['value', 'current', 'root', 'groupOperation', 'operation'].includes(node.type), - subscript: (node: JsonPathElement): node is Subscript => 'type' in node && node.type === 'subscript', - bracket: (node: JsonPathElement): node is BracketMember | BracketExpression => - 'type' in node && ['bracketMember', 'bracketExpression'].includes(node.type), - unions: (node: JsonPathElement): node is Unions => 'type' in node && node.type === 'unions', - indexes: (node: JsonPathElement): node is Indexes => 'type' in node && node.type === 'indexes', - slices: (node: JsonPathElement): node is Slices => 'type' in node && node.type === 'slices', - filterExpression: (node: JsonPathElement): node is FilterExpression => - 'type' in node && node.type === 'filterExpression', - dotContent: (node: JsonPathElement): node is DotContent => - 'type' in node && ['identifier', 'numericLiteral', 'wildcard'].includes(node.type), - dotdotContent: (node: JsonPathElement): node is DotDotContent => - 'type' in node && ['identifier', 'wildcard', 'bracketMember', 'bracketExpression'].includes(node.type), - bracketContent: (node: JsonPathElement): node is BracketMemberContent | BracketExpressionContent => - 'type' in node && - [ - 'identifier', - 'wildcard', - 'numericLiteral', - 'stringLiteral', - 'filterExpression', - 'slices', - 'unions', - 'indexes', - ].includes(node.type), - expressionContent: (node: JsonPathElement): node is FilterExpression['value'] => - 'type' in node && - ['value', 'comparator', 'groupExpression', 'logicalExpression', 'notExpression', 'current', 'root'].includes( - node.type, - ), -} as const; - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -type TypeGardReturn = K extends (a: any) => a is infer T ? T : never; - -const isBracketMember = (item: BracketMemberContent | BracketExpressionContent): item is BracketMemberContent => - ['identifier', 'numericLiteral', 'stringLiteral'].includes(item.type); - -export default class Listener extends JSONPathListener { - _stack: JsonPathElement[] = []; - - public getTree(): Root { - return this.popWithCheck('root', null); - } - - private popWithCheck( - key: T, - ctx: any | null, - ): TypeGardReturn { - const value = this._stack.pop(); - - if (typeof value !== 'undefined' && TYPE_CHECK_MAPPER[key](value)) { - return value as TypeGardReturn; - } - - /* istanbul ignore next */ - throw new Error(`bad type (${JSON.stringify(value)}) returned for ${key} with token: ${ctx?.getText()}`); - } - - private push(node: JsonPathElement): void { - this._stack.push(node); - } - - public exitJsonpath(ctx: any): void { - if (ctx.ROOT_VALUE()) { - const next = ctx.subscript() ? this.popWithCheck('subscript', ctx) : null; - - this.push({ type: 'root', next }); - } - } - - public exitBracketContent(ctx: any): void { - switch (true) { - case !!ctx.identifier(): { - const text = ctx.identifier()!.getText(); - - this.push({ type: 'identifier', value: text }); - break; - } - case !!ctx.STAR(): { - this.push({ type: 'wildcard' }); - break; - } - case !!ctx.unions(): { - const value = this.popWithCheck('unions', ctx); - - this.push(value); - break; - } - case !!ctx.indexes(): { - const value = this.popWithCheck('indexes', ctx); - - this.push(value); - break; - } - case !!ctx.slices(): { - const value = this.popWithCheck('slices', ctx); - - this.push(value); - break; - } - case !!ctx.STRING(): { - const value = ctx.STRING()!.getText().slice(1, -1); - - this.push({ type: 'stringLiteral', value }); - break; - } - case !!ctx.NUMBER(): { - const number = Number.parseInt(ctx.NUMBER()!.getText()); - - this.push({ - type: 'numericLiteral', - value: number, - }); - break; - } - case !!ctx.filterExpression(): { - const value = this.popWithCheck('filterExpression', ctx); - - this.push(value); - break; - } - } - } - - public exitBracket(ctx: any): void { - const value = this.popWithCheck('bracketContent', ctx); - - if (isBracketMember(value)) { - this.push({ - type: 'bracketMember', - value, - }); - return; - } - - this.push({ - type: 'bracketExpression', - value, - }); - } - - public exitDotdotContent(ctx: any): void { - switch (true) { - case !!ctx.STAR(): { - this.push({ type: 'wildcard' }); - break; - } - case !!ctx.identifier(): { - const value = ctx.identifier()!.getText(); - - this.push({ type: 'identifier', value }); - break; - } - case !!ctx.bracket(): { - const value = this.popWithCheck('bracket', ctx); - - this.push(value); - break; - } - } - } - - public exitDotContent(ctx: any): void { - switch (true) { - case !!ctx.STAR(): { - this.push({ type: 'wildcard' }); - break; - } - case !!ctx.identifier(): { - const text = ctx.identifier()!.getText(); - - this.push({ type: 'identifier', value: text }); - break; - } - case !!ctx.NUMBER(): { - const number = Number.parseInt(ctx.NUMBER()!.getText()); - - this.push({ - type: 'numericLiteral', - value: number, - }); - break; - } - } - } - - public exitSubscript(ctx: any): void { - switch (true) { - case !!ctx.DOT(): { - const next = ctx.subscript() ? this.popWithCheck('subscript', ctx) : null; - const value = this.popWithCheck('dotContent', ctx); - - this.push({ - type: 'subscript', - value: { - type: 'dot', - value, - }, - next, - }); - break; - } - case !!ctx.DOTDOT(): { - const next = ctx.subscript() ? this.popWithCheck('subscript', ctx) : null; - const value = this.popWithCheck('dotdotContent', ctx); - - this.push({ - type: 'subscript', - value: { - type: 'dotdot', - value, - }, - next, - }); - break; - } - case !!ctx.bracket(): { - const next = ctx.subscript() ? this.popWithCheck('subscript', ctx) : null; - const value = this.popWithCheck('bracket', ctx); - - this.push({ - type: 'subscript', - next, - value, - }); - break; - } - } - } - - public exitFilterpath(ctx: any): void { - switch (true) { - case !!ctx.ROOT_VALUE(): { - const next = ctx.subscript() ? this.popWithCheck('subscript', ctx) : null; - - this.push({ type: 'root', next: next }); - break; - } - case !!ctx.CURRENT_VALUE(): { - const next = ctx.subscript() ? this.popWithCheck('subscript', ctx) : null; - - this.push({ type: 'current', next: next }); - break; - } - } - } - - public exitUnions(ctx: any): void { - const nodes: (StringLiteral | Identifier)[] = []; - - for (let index = 0; index < ctx.identifier().length; index += 1) { - const value = ctx.identifier(index)!.getText(); - - nodes.push({ - type: 'identifier', - value, - }); - } - - for (let index = 0; index < ctx.STRING().length; index += 1) { - const value = ctx.STRING(index)!.getText().slice(1, -1); - - nodes.push({ - type: 'stringLiteral', - value, - }); - } - - this.push({ - type: 'unions', - values: nodes, - }); - } - - public exitIndexes(ctx: any): void { - const nodes: NumericLiteral[] = []; - - for (let index = 0; index < ctx.NUMBER().length; index += 1) { - const number = Number.parseInt(ctx.NUMBER(index)!.getText()); - - nodes.push({ - type: 'numericLiteral', - value: number, - }); - } - - this.push({ - type: 'indexes', - values: nodes, - }); - } - public exitSlices(ctx: any): void { - // Extract tokens - const numbers = [0, 1, 2].map((index) => ctx.getToken(JSONPathParser.NUMBER, index)); - const colons = [0, 1].map((index) => ctx.getToken(JSONPathParser.COLON, index)); - - let start: number | null = null; - let end: number | null = null; - let step: number | null = null; - - // Parse start value - if (colons[0] && numbers[0] && numbers[0].getSourceInterval().start < colons[0].getSourceInterval().start) { - start = Number.parseInt(numbers[0].getText()); - } - - // Parse end value - if ( - !colons[1] && - colons[0] && - numbers[1] && - numbers[1].getSourceInterval().start > colons[0].getSourceInterval().start - ) { - end = Number.parseInt(numbers[1].getText()); - } else if (colons[1] && numbers[1] && numbers[1].getSourceInterval().start < colons[1].getSourceInterval().start) { - end = Number.parseInt(numbers[1].getText()); - } else if (colons[0] && numbers[0] && numbers[0].getSourceInterval().start > colons[0].getSourceInterval().start) { - if (!colons[1] || numbers[0].getSourceInterval().start < colons[1].getSourceInterval().start) { - end = Number.parseInt(numbers[0].getText()); - } - } - - // Parse step value - if (colons[1] && numbers[2]) { - step = Number.parseInt(numbers[2].getText()); - } else if (colons[1] && numbers[1] && numbers[1].getSourceInterval().start > colons[1].getSourceInterval().start) { - step = Number.parseInt(numbers[1].getText()); - } else if (colons[1] && numbers[0] && numbers[0].getSourceInterval().start > colons[1].getSourceInterval().start) { - step = Number.parseInt(numbers[0].getText()); - } - - // Push result - this.push({ type: 'slices', start, end, step }); - } - - public exitFilterExpression(ctx: any): void { - const value = this.popWithCheck('expressionContent', ctx); - - this.push({ - type: 'filterExpression', - value, - }); - } - - public exitRegex(ctx: any): void { - const value = ctx.REGEX_EXPR().getText(); - const opts = ctx.REGEX_OPT()?.getText() || ''; - - this.push({ - type: 'value', - subtype: 'regex', - value: value as ValueRegex['value'], - opts, - }); - } - - public exitExpression(ctx: any): void { - switch (true) { - case !!ctx.NOT(): { - const value = this.popWithCheck('expressionContent', ctx); - - this.push({ - type: 'notExpression', - value, - }); - break; - } - case !!ctx.NULL(): { - this.push({ type: 'value', value: null, subtype: 'null' }); - break; - } - case !!ctx.FALSE(): { - this.push({ type: 'value', value: false, subtype: 'boolean' }); - break; - } - case !!ctx.TRUE(): { - this.push({ type: 'value', value: true, subtype: 'boolean' }); - break; - } - case !!ctx.AND(): { - const right = this.popWithCheck('expressionContent', ctx); - const left = this.popWithCheck('expressionContent', ctx); - - this.push({ type: 'logicalExpression', operator: 'and', left, right }); - break; - } - case !!ctx.OR(): { - const right = this.popWithCheck('expressionContent', ctx); - const left = this.popWithCheck('expressionContent', ctx); - - this.push({ type: 'logicalExpression', operator: 'or', left, right }); - break; - } - case !!ctx.PAREN_LEFT(): { - const value = this.popWithCheck('expressionContent', ctx); - - this.push({ type: 'groupExpression', value }); - break; - } - case !!ctx.regex(): { - const right = this.popWithCheck('regex', ctx); - const left = this.popWithCheck('operationContent', ctx); - - this.push({ - type: 'comparator', - operator: 'reg', - left, - right, - }); - break; - } - case !!ctx.EMPT(): { - const left = this.popWithCheck('operationContent', ctx); - this.push({ type: 'comparator', operator: 'empty', left, right: null }); - break; - } - case !!ctx.getTypedRuleContext(JSONPathParser.FilterargContext, 1): { - const right = this.popWithCheck('operationContent', ctx); - const left = this.popWithCheck('operationContent', ctx); - - switch (true) { - case !!ctx.EQ(): { - this.push({ type: 'comparator', operator: 'eq', left, right }); - break; - } - case !!ctx.NE(): { - this.push({ type: 'comparator', operator: 'ne', left, right }); - break; - } - case !!ctx.LT(): { - this.push({ type: 'comparator', operator: 'lt', left, right }); - break; - } - case !!ctx.LE(): { - this.push({ type: 'comparator', operator: 'le', left, right }); - break; - } - case !!ctx.GT(): { - this.push({ type: 'comparator', operator: 'gt', left, right }); - break; - } - case !!ctx.GE(): { - this.push({ type: 'comparator', operator: 'ge', left, right }); - break; - } - case !!ctx.IN(): { - this.push({ type: 'comparator', operator: 'in', left, right }); - break; - } - case !!ctx.NIN(): { - this.push({ type: 'comparator', operator: 'nin', left, right }); - break; - } - case !!ctx.SUB(): { - this.push({ type: 'comparator', operator: 'subsetof', left, right }); - break; - } - case !!ctx.ANY(): { - this.push({ type: 'comparator', operator: 'anyof', left, right }); - break; - } - case !!ctx.NON(): { - this.push({ type: 'comparator', operator: 'noneof', left, right }); - break; - } - case !!ctx.SIZ(): { - this.push({ type: 'comparator', operator: 'size', left, right }); - break; - } - case !!ctx.SIZO(): { - this.push({ type: 'comparator', operator: 'sizeof', left, right }); - break; - } - } - break; - } - } - } - - public exitObj(ctx: any): void { - const obj: Record = {}; - - for (const pairCtx of ctx.pair()) { - const value = this.popWithCheck('value', ctx); - const key = pairCtx.STRING().getText().slice(1, -1); - - obj[key] = value.value; - } - - this.push({ type: 'value', subtype: 'object', value: obj }); - } - - public exitArray(ctx: any): void { - const array: unknown[] = []; - - for (let index = 0; index < ctx.value().length; index += 1) { - const value = this.popWithCheck('value', ctx); - - array.unshift(value.value); - } - - this.push({ type: 'value', subtype: 'array', value: array }); - } - - public exitFilterarg(ctx: any): void { - switch (true) { - case !!ctx.getTypedRuleContext(JSONPathParser.FilterargContext, 1): { - switch (true) { - case !!ctx.STAR(): { - const right = this.popWithCheck('operationContent', ctx); - const left = this.popWithCheck('operationContent', ctx); - this.push({ type: 'operation', operator: 'multi', left, right }); - break; - } - case !!ctx.DIV(): { - const right = this.popWithCheck('operationContent', ctx); - const left = this.popWithCheck('operationContent', ctx); - this.push({ type: 'operation', operator: 'div', left, right }); - break; - } - case !!ctx.PLUS(): { - const right = this.popWithCheck('operationContent', ctx); - const left = this.popWithCheck('operationContent', ctx); - this.push({ type: 'operation', operator: 'plus', left, right }); - break; - } - case !!ctx.MINUS_SP(): { - const right = this.popWithCheck('operationContent', ctx); - const left = this.popWithCheck('operationContent', ctx); - this.push({ type: 'operation', operator: 'minus', left, right }); - break; - } - default: { - // no operator occures when right value is negative, it should be validated at runtime - const right = this.popWithCheck('operationContent', ctx); - const left = this.popWithCheck('operationContent', ctx); - - this.push({ type: 'operation', operator: '', left, right }); - break; - } - } - break; - } - case !!ctx.PAREN_LEFT(): { - const value = this.popWithCheck('operationContent', ctx); - this.push({ type: 'groupOperation', value }); - break; - } - case !!ctx.value(): { - const left = this.popWithCheck('operationContent', ctx); - this.push(left); - break; - } - case !!ctx.filterpath(): { - const value = this.popWithCheck('operationContent', ctx); - this.push(value); - break; - } - } - } - - public exitValue(ctx: any): void { - switch (true) { - case !!ctx.STRING(): { - const text = ctx.STRING()!.getText().slice(1, -1); - - this.push({ type: 'value', subtype: 'string', value: text }); - break; - } - case !!ctx.NUMBER(): { - const text = ctx.NUMBER()!.getText(); - - if (text !== `${Number.parseInt(text)}`) { - this.push({ type: 'value', subtype: 'number', value: Number.parseFloat(text) }); - } else { - this.push({ type: 'value', subtype: 'number', value: Number.parseInt(text) }); - } - break; - } - case !!ctx.array(): - const value = this.popWithCheck('value', ctx); - this.push(value); - break; - case !!ctx.obj(): { - const value = this.popWithCheck('value', ctx); - this.push(value); - break; - } - case !!ctx.TRUE(): { - this.push({ type: 'value', value: true, subtype: 'boolean' }); - break; - } - case !!ctx.FALSE(): { - this.push({ type: 'value', value: false, subtype: 'boolean' }); - break; - } - case !!ctx.NULL(): { - this.push({ type: 'value', value: null, subtype: 'null' }); - break; - } - } - } -} diff --git a/src/parser/errors.ts b/src/parser/errors.ts index c66f1d7..e5a389f 100644 --- a/src/parser/errors.ts +++ b/src/parser/errors.ts @@ -1,8 +1,38 @@ +/** + * JSONPath syntax error class. + * + * Thrown when parsing an invalid JSONPath expression. + */ + +/** + * Error thrown when a JSONPath expression has invalid syntax. + * + * @example + * ```typescript + * import { parse, JSONPathSyntaxError } from 'jsonpathly'; + * + * try { + * parse('$[invalid'); + * } catch (e) { + * if (e instanceof JSONPathSyntaxError) { + * console.log(`Syntax error at line ${e.line}, column ${e.charPositionInLine}`); + * console.log(e.message); + * } + * } + * ``` + */ export class JSONPathSyntaxError extends Error { + /** Line number where the error occurred (1-based) */ line: number; + + /** Column position where the error occurred (1-based) */ charPositionInLine: number; + + /** The error message */ msg: string; + override name = 'JSONPathSyntaxError'; + constructor(line: number, charPositionInLine: number, msg: string) { super(msg); this.line = line; diff --git a/src/parser/generated/JSONPath.g4 b/src/parser/generated/JSONPath.g4 deleted file mode 100644 index bab0102..0000000 --- a/src/parser/generated/JSONPath.g4 +++ /dev/null @@ -1,222 +0,0 @@ -grammar JSONPath; - -//////////// -// TOKENS // -/////////// - -CURRENT_VALUE : '@' ; -DOTDOT : '..' ; -ROOT_VALUE : '$' ; -DOT : '.' ; -STAR : '*' ; - -AND : '&&' ; -EQ : '==' ; -GE : '>=' ; -GT : '>' ; -LE : '<=' ; -LT : '<' ; -NE : '!=' ; -REG : '=~' ; -IN : ' in ' ; -NIN : ' nin ' ; -SUB : ' subsetof ' ; -ANY : ' anyof ' ; -NON : ' noneof ' ; -SIZO : ' sizeof ' ; -SIZ : ' size ' ; -EMPT : ' empty' ; -NOT : '!' ; -OR : '||' ; - -TRUE : 'true' ; -FALSE : 'false' ; -NULL : 'null' ; - -BRACE_LEFT : '{' ; -BRACE_RIGHT : '}' ; -BRACKET_LEFT : '[' ; -BRACKET_RIGHT : ']' ; -COLON : ':' ; -COMMA : ',' ; -PAREN_LEFT : '(' ; -PAREN_RIGHT : ')' ; -QUESTION : '?' ; - -MINUS_SP: '- '; -PLUS: '+'; -DIV: '/'; - -REGEX_OPT: [gimsuy]*; -REGEX_EXPR: '/'.*?'/'; -KEY: [a-zA-Z-_]*[a-zA-Z_][a-zA-Z0-9_]*; -SPECIAL_KEY: [\u0080-\uFFFF_]+; - -WS - : [ \t\n\r] + -> skip - ; - -NUMBER - : '-'? INT ('.' [0-9] +)? EXP? - ; - -STRING - : '"' (ESC_DOUBLE | SAFECODEPOINT_DOUBLE)* '"' - | '\'' (ESC_SINGLE | SAFECODEPOINT_SINGLE)* '\'' - ; - -/////////////// -// FRAGMENTS // -////////////// - -fragment ESC_SINGLE - : '\\' (['\\/bfnrt] | UNICODE) - ; - -fragment ESC_DOUBLE - : '\\' (["\\/bfnrt] | UNICODE) - ; - -fragment UNICODE - : 'u' HEX HEX HEX HEX - ; - -fragment HEX - : [0-9a-fA-F] - ; - -fragment SAFECODEPOINT_SINGLE - : ~ ['\\\u0000-\u001F] - ; - -fragment SAFECODEPOINT_DOUBLE - : ~ ["\\\u0000-\u001F] - ; - -fragment INT - : [0-9]+ - ; -// with leading zeros - -fragment EXP - : [Ee] [+\-]? INT - ; -// \- since - means "range" inside [...] - -///////////// -// QUERIES // -//////////// - -jsonpath - : ROOT_VALUE subscript? EOF - ; - -filterarg - : PAREN_LEFT filterarg PAREN_RIGHT - | filterarg ( STAR | DIV ) filterarg - | filterarg ( PLUS | MINUS_SP )? filterarg - | value - | filterpath - ; - -subscript - : DOTDOT dotdotContent subscript? - | DOT dotContent subscript? - | bracket subscript? - ; - -dotdotContent - : STAR - | identifier - | bracket - ; - -dotContent - : STAR - | NUMBER - | identifier - ; - -bracket - : BRACKET_LEFT bracketContent BRACKET_RIGHT - ; - -bracketContent - : unions - | indexes - | slices - | STAR - | NUMBER - | STRING - | identifier - | filterExpression - ; - -filterExpression - : QUESTION PAREN_LEFT expression PAREN_RIGHT - ; - -indexes - : NUMBER ( COMMA NUMBER )+ - ; - -unions - : STRING ( COMMA STRING )+ - | identifier ( COMMA identifier )+ - ; - -slices - : NUMBER? COLON NUMBER? ( COLON ( NUMBER )? )? - ; - -regex : REGEX_EXPR REGEX_OPT?; - -expression - : NOT PAREN_LEFT expression PAREN_RIGHT - | PAREN_LEFT expression PAREN_RIGHT - | expression ( AND | OR ) expression - | filterarg ( EQ | NE | LT | LE | GT | GE | IN | NIN | SUB | ANY | SIZO| NON | SIZ ) filterarg - | filterarg REG regex - | filterarg EMPT - | filterpath - | TRUE - | FALSE - | NULL - ; - -filterpath - : ( ROOT_VALUE | CURRENT_VALUE ) subscript? - ; - -identifier - : KEY - | SPECIAL_KEY - | TRUE - | FALSE - | NULL - ; - -obj - : BRACE_LEFT pair ( COMMA pair )* BRACE_RIGHT - | BRACE_LEFT BRACE_RIGHT - ; - -pair - : STRING COLON value - ; - -array - : BRACKET_LEFT value ( COMMA value )* BRACKET_RIGHT - | BRACKET_LEFT BRACKET_RIGHT - ; - -value - : STRING - | NUMBER - | obj - | array - | TRUE - | FALSE - | NULL - ; - diff --git a/src/parser/generated/JSONPath.interp b/src/parser/generated/JSONPath.interp deleted file mode 100644 index 6355b7c..0000000 --- a/src/parser/generated/JSONPath.interp +++ /dev/null @@ -1,120 +0,0 @@ -token literal names: -null -'@' -'..' -'$' -'.' -'*' -'&&' -'==' -'>=' -'>' -'<=' -'<' -'!=' -'=~' -' in ' -' nin ' -' subsetof ' -' anyof ' -' noneof ' -' sizeof ' -' size ' -' empty' -'!' -'||' -'true' -'false' -'null' -'{' -'}' -'[' -']' -':' -',' -'(' -')' -'?' -'- ' -'+' -'/' -null -null -null -null -null -null -null - -token symbolic names: -null -CURRENT_VALUE -DOTDOT -ROOT_VALUE -DOT -STAR -AND -EQ -GE -GT -LE -LT -NE -REG -IN -NIN -SUB -ANY -NON -SIZO -SIZ -EMPT -NOT -OR -TRUE -FALSE -NULL -BRACE_LEFT -BRACE_RIGHT -BRACKET_LEFT -BRACKET_RIGHT -COLON -COMMA -PAREN_LEFT -PAREN_RIGHT -QUESTION -MINUS_SP -PLUS -DIV -REGEX_OPT -REGEX_EXPR -KEY -SPECIAL_KEY -WS -NUMBER -STRING - -rule names: -jsonpath -filterarg -subscript -dotdotContent -dotContent -bracket -bracketContent -filterExpression -indexes -unions -slices -regex -expression -filterpath -identifier -obj -pair -array -value - - -atn: -[4, 1, 45, 236, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 1, 0, 1, 0, 3, 0, 41, 8, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 52, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 59, 8, 1, 1, 1, 5, 1, 62, 8, 1, 10, 1, 12, 1, 65, 9, 1, 1, 2, 1, 2, 1, 2, 3, 2, 70, 8, 2, 1, 2, 1, 2, 1, 2, 3, 2, 75, 8, 2, 1, 2, 1, 2, 3, 2, 79, 8, 2, 3, 2, 81, 8, 2, 1, 3, 1, 3, 1, 3, 3, 3, 86, 8, 3, 1, 4, 1, 4, 1, 4, 3, 4, 91, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 105, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 4, 8, 115, 8, 8, 11, 8, 12, 8, 116, 1, 9, 1, 9, 1, 9, 4, 9, 122, 8, 9, 11, 9, 12, 9, 123, 1, 9, 1, 9, 1, 9, 4, 9, 129, 8, 9, 11, 9, 12, 9, 130, 3, 9, 133, 8, 9, 1, 10, 3, 10, 136, 8, 10, 1, 10, 1, 10, 3, 10, 140, 8, 10, 1, 10, 1, 10, 3, 10, 144, 8, 10, 3, 10, 146, 8, 10, 1, 11, 1, 11, 3, 11, 150, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 177, 8, 12, 1, 12, 1, 12, 1, 12, 5, 12, 182, 8, 12, 10, 12, 12, 12, 185, 9, 12, 1, 13, 1, 13, 3, 13, 189, 8, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 197, 8, 15, 10, 15, 12, 15, 200, 9, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 206, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 5, 17, 216, 8, 17, 10, 17, 12, 17, 219, 9, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 225, 8, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 234, 8, 18, 1, 18, 0, 2, 2, 24, 19, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 0, 6, 2, 0, 5, 5, 38, 38, 1, 0, 36, 37, 2, 0, 7, 12, 14, 20, 2, 0, 6, 6, 23, 23, 2, 0, 1, 1, 3, 3, 2, 0, 24, 26, 41, 42, 267, 0, 38, 1, 0, 0, 0, 2, 51, 1, 0, 0, 0, 4, 80, 1, 0, 0, 0, 6, 85, 1, 0, 0, 0, 8, 90, 1, 0, 0, 0, 10, 92, 1, 0, 0, 0, 12, 104, 1, 0, 0, 0, 14, 106, 1, 0, 0, 0, 16, 111, 1, 0, 0, 0, 18, 132, 1, 0, 0, 0, 20, 135, 1, 0, 0, 0, 22, 147, 1, 0, 0, 0, 24, 176, 1, 0, 0, 0, 26, 186, 1, 0, 0, 0, 28, 190, 1, 0, 0, 0, 30, 205, 1, 0, 0, 0, 32, 207, 1, 0, 0, 0, 34, 224, 1, 0, 0, 0, 36, 233, 1, 0, 0, 0, 38, 40, 5, 3, 0, 0, 39, 41, 3, 4, 2, 0, 40, 39, 1, 0, 0, 0, 40, 41, 1, 0, 0, 0, 41, 42, 1, 0, 0, 0, 42, 43, 5, 0, 0, 1, 43, 1, 1, 0, 0, 0, 44, 45, 6, 1, -1, 0, 45, 46, 5, 33, 0, 0, 46, 47, 3, 2, 1, 0, 47, 48, 5, 34, 0, 0, 48, 52, 1, 0, 0, 0, 49, 52, 3, 36, 18, 0, 50, 52, 3, 26, 13, 0, 51, 44, 1, 0, 0, 0, 51, 49, 1, 0, 0, 0, 51, 50, 1, 0, 0, 0, 52, 63, 1, 0, 0, 0, 53, 54, 10, 4, 0, 0, 54, 55, 7, 0, 0, 0, 55, 62, 3, 2, 1, 5, 56, 58, 10, 3, 0, 0, 57, 59, 7, 1, 0, 0, 58, 57, 1, 0, 0, 0, 58, 59, 1, 0, 0, 0, 59, 60, 1, 0, 0, 0, 60, 62, 3, 2, 1, 4, 61, 53, 1, 0, 0, 0, 61, 56, 1, 0, 0, 0, 62, 65, 1, 0, 0, 0, 63, 61, 1, 0, 0, 0, 63, 64, 1, 0, 0, 0, 64, 3, 1, 0, 0, 0, 65, 63, 1, 0, 0, 0, 66, 67, 5, 2, 0, 0, 67, 69, 3, 6, 3, 0, 68, 70, 3, 4, 2, 0, 69, 68, 1, 0, 0, 0, 69, 70, 1, 0, 0, 0, 70, 81, 1, 0, 0, 0, 71, 72, 5, 4, 0, 0, 72, 74, 3, 8, 4, 0, 73, 75, 3, 4, 2, 0, 74, 73, 1, 0, 0, 0, 74, 75, 1, 0, 0, 0, 75, 81, 1, 0, 0, 0, 76, 78, 3, 10, 5, 0, 77, 79, 3, 4, 2, 0, 78, 77, 1, 0, 0, 0, 78, 79, 1, 0, 0, 0, 79, 81, 1, 0, 0, 0, 80, 66, 1, 0, 0, 0, 80, 71, 1, 0, 0, 0, 80, 76, 1, 0, 0, 0, 81, 5, 1, 0, 0, 0, 82, 86, 5, 5, 0, 0, 83, 86, 3, 28, 14, 0, 84, 86, 3, 10, 5, 0, 85, 82, 1, 0, 0, 0, 85, 83, 1, 0, 0, 0, 85, 84, 1, 0, 0, 0, 86, 7, 1, 0, 0, 0, 87, 91, 5, 5, 0, 0, 88, 91, 5, 44, 0, 0, 89, 91, 3, 28, 14, 0, 90, 87, 1, 0, 0, 0, 90, 88, 1, 0, 0, 0, 90, 89, 1, 0, 0, 0, 91, 9, 1, 0, 0, 0, 92, 93, 5, 29, 0, 0, 93, 94, 3, 12, 6, 0, 94, 95, 5, 30, 0, 0, 95, 11, 1, 0, 0, 0, 96, 105, 3, 18, 9, 0, 97, 105, 3, 16, 8, 0, 98, 105, 3, 20, 10, 0, 99, 105, 5, 5, 0, 0, 100, 105, 5, 44, 0, 0, 101, 105, 5, 45, 0, 0, 102, 105, 3, 28, 14, 0, 103, 105, 3, 14, 7, 0, 104, 96, 1, 0, 0, 0, 104, 97, 1, 0, 0, 0, 104, 98, 1, 0, 0, 0, 104, 99, 1, 0, 0, 0, 104, 100, 1, 0, 0, 0, 104, 101, 1, 0, 0, 0, 104, 102, 1, 0, 0, 0, 104, 103, 1, 0, 0, 0, 105, 13, 1, 0, 0, 0, 106, 107, 5, 35, 0, 0, 107, 108, 5, 33, 0, 0, 108, 109, 3, 24, 12, 0, 109, 110, 5, 34, 0, 0, 110, 15, 1, 0, 0, 0, 111, 114, 5, 44, 0, 0, 112, 113, 5, 32, 0, 0, 113, 115, 5, 44, 0, 0, 114, 112, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 114, 1, 0, 0, 0, 116, 117, 1, 0, 0, 0, 117, 17, 1, 0, 0, 0, 118, 121, 5, 45, 0, 0, 119, 120, 5, 32, 0, 0, 120, 122, 5, 45, 0, 0, 121, 119, 1, 0, 0, 0, 122, 123, 1, 0, 0, 0, 123, 121, 1, 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 133, 1, 0, 0, 0, 125, 128, 3, 28, 14, 0, 126, 127, 5, 32, 0, 0, 127, 129, 3, 28, 14, 0, 128, 126, 1, 0, 0, 0, 129, 130, 1, 0, 0, 0, 130, 128, 1, 0, 0, 0, 130, 131, 1, 0, 0, 0, 131, 133, 1, 0, 0, 0, 132, 118, 1, 0, 0, 0, 132, 125, 1, 0, 0, 0, 133, 19, 1, 0, 0, 0, 134, 136, 5, 44, 0, 0, 135, 134, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 137, 1, 0, 0, 0, 137, 139, 5, 31, 0, 0, 138, 140, 5, 44, 0, 0, 139, 138, 1, 0, 0, 0, 139, 140, 1, 0, 0, 0, 140, 145, 1, 0, 0, 0, 141, 143, 5, 31, 0, 0, 142, 144, 5, 44, 0, 0, 143, 142, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 146, 1, 0, 0, 0, 145, 141, 1, 0, 0, 0, 145, 146, 1, 0, 0, 0, 146, 21, 1, 0, 0, 0, 147, 149, 5, 40, 0, 0, 148, 150, 5, 39, 0, 0, 149, 148, 1, 0, 0, 0, 149, 150, 1, 0, 0, 0, 150, 23, 1, 0, 0, 0, 151, 152, 6, 12, -1, 0, 152, 153, 5, 22, 0, 0, 153, 154, 5, 33, 0, 0, 154, 155, 3, 24, 12, 0, 155, 156, 5, 34, 0, 0, 156, 177, 1, 0, 0, 0, 157, 158, 5, 33, 0, 0, 158, 159, 3, 24, 12, 0, 159, 160, 5, 34, 0, 0, 160, 177, 1, 0, 0, 0, 161, 162, 3, 2, 1, 0, 162, 163, 7, 2, 0, 0, 163, 164, 3, 2, 1, 0, 164, 177, 1, 0, 0, 0, 165, 166, 3, 2, 1, 0, 166, 167, 5, 13, 0, 0, 167, 168, 3, 22, 11, 0, 168, 177, 1, 0, 0, 0, 169, 170, 3, 2, 1, 0, 170, 171, 5, 21, 0, 0, 171, 177, 1, 0, 0, 0, 172, 177, 3, 26, 13, 0, 173, 177, 5, 24, 0, 0, 174, 177, 5, 25, 0, 0, 175, 177, 5, 26, 0, 0, 176, 151, 1, 0, 0, 0, 176, 157, 1, 0, 0, 0, 176, 161, 1, 0, 0, 0, 176, 165, 1, 0, 0, 0, 176, 169, 1, 0, 0, 0, 176, 172, 1, 0, 0, 0, 176, 173, 1, 0, 0, 0, 176, 174, 1, 0, 0, 0, 176, 175, 1, 0, 0, 0, 177, 183, 1, 0, 0, 0, 178, 179, 10, 8, 0, 0, 179, 180, 7, 3, 0, 0, 180, 182, 3, 24, 12, 9, 181, 178, 1, 0, 0, 0, 182, 185, 1, 0, 0, 0, 183, 181, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 25, 1, 0, 0, 0, 185, 183, 1, 0, 0, 0, 186, 188, 7, 4, 0, 0, 187, 189, 3, 4, 2, 0, 188, 187, 1, 0, 0, 0, 188, 189, 1, 0, 0, 0, 189, 27, 1, 0, 0, 0, 190, 191, 7, 5, 0, 0, 191, 29, 1, 0, 0, 0, 192, 193, 5, 27, 0, 0, 193, 198, 3, 32, 16, 0, 194, 195, 5, 32, 0, 0, 195, 197, 3, 32, 16, 0, 196, 194, 1, 0, 0, 0, 197, 200, 1, 0, 0, 0, 198, 196, 1, 0, 0, 0, 198, 199, 1, 0, 0, 0, 199, 201, 1, 0, 0, 0, 200, 198, 1, 0, 0, 0, 201, 202, 5, 28, 0, 0, 202, 206, 1, 0, 0, 0, 203, 204, 5, 27, 0, 0, 204, 206, 5, 28, 0, 0, 205, 192, 1, 0, 0, 0, 205, 203, 1, 0, 0, 0, 206, 31, 1, 0, 0, 0, 207, 208, 5, 45, 0, 0, 208, 209, 5, 31, 0, 0, 209, 210, 3, 36, 18, 0, 210, 33, 1, 0, 0, 0, 211, 212, 5, 29, 0, 0, 212, 217, 3, 36, 18, 0, 213, 214, 5, 32, 0, 0, 214, 216, 3, 36, 18, 0, 215, 213, 1, 0, 0, 0, 216, 219, 1, 0, 0, 0, 217, 215, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 218, 220, 1, 0, 0, 0, 219, 217, 1, 0, 0, 0, 220, 221, 5, 30, 0, 0, 221, 225, 1, 0, 0, 0, 222, 223, 5, 29, 0, 0, 223, 225, 5, 30, 0, 0, 224, 211, 1, 0, 0, 0, 224, 222, 1, 0, 0, 0, 225, 35, 1, 0, 0, 0, 226, 234, 5, 45, 0, 0, 227, 234, 5, 44, 0, 0, 228, 234, 3, 30, 15, 0, 229, 234, 3, 34, 17, 0, 230, 234, 5, 24, 0, 0, 231, 234, 5, 25, 0, 0, 232, 234, 5, 26, 0, 0, 233, 226, 1, 0, 0, 0, 233, 227, 1, 0, 0, 0, 233, 228, 1, 0, 0, 0, 233, 229, 1, 0, 0, 0, 233, 230, 1, 0, 0, 0, 233, 231, 1, 0, 0, 0, 233, 232, 1, 0, 0, 0, 234, 37, 1, 0, 0, 0, 29, 40, 51, 58, 61, 63, 69, 74, 78, 80, 85, 90, 104, 116, 123, 130, 132, 135, 139, 143, 145, 149, 176, 183, 188, 198, 205, 217, 224, 233] \ No newline at end of file diff --git a/src/parser/generated/JSONPath.tokens b/src/parser/generated/JSONPath.tokens deleted file mode 100644 index 578fef3..0000000 --- a/src/parser/generated/JSONPath.tokens +++ /dev/null @@ -1,83 +0,0 @@ -CURRENT_VALUE=1 -DOTDOT=2 -ROOT_VALUE=3 -DOT=4 -STAR=5 -AND=6 -EQ=7 -GE=8 -GT=9 -LE=10 -LT=11 -NE=12 -REG=13 -IN=14 -NIN=15 -SUB=16 -ANY=17 -NON=18 -SIZO=19 -SIZ=20 -EMPT=21 -NOT=22 -OR=23 -TRUE=24 -FALSE=25 -NULL=26 -BRACE_LEFT=27 -BRACE_RIGHT=28 -BRACKET_LEFT=29 -BRACKET_RIGHT=30 -COLON=31 -COMMA=32 -PAREN_LEFT=33 -PAREN_RIGHT=34 -QUESTION=35 -MINUS_SP=36 -PLUS=37 -DIV=38 -REGEX_OPT=39 -REGEX_EXPR=40 -KEY=41 -SPECIAL_KEY=42 -WS=43 -NUMBER=44 -STRING=45 -'@'=1 -'..'=2 -'$'=3 -'.'=4 -'*'=5 -'&&'=6 -'=='=7 -'>='=8 -'>'=9 -'<='=10 -'<'=11 -'!='=12 -'=~'=13 -' in '=14 -' nin '=15 -' subsetof '=16 -' anyof '=17 -' noneof '=18 -' sizeof '=19 -' size '=20 -' empty'=21 -'!'=22 -'||'=23 -'true'=24 -'false'=25 -'null'=26 -'{'=27 -'}'=28 -'['=29 -']'=30 -':'=31 -','=32 -'('=33 -')'=34 -'?'=35 -'- '=36 -'+'=37 -'/'=38 diff --git a/src/parser/generated/JSONPathLexer.interp b/src/parser/generated/JSONPathLexer.interp deleted file mode 100644 index 46b368a..0000000 --- a/src/parser/generated/JSONPathLexer.interp +++ /dev/null @@ -1,160 +0,0 @@ -token literal names: -null -'@' -'..' -'$' -'.' -'*' -'&&' -'==' -'>=' -'>' -'<=' -'<' -'!=' -'=~' -' in ' -' nin ' -' subsetof ' -' anyof ' -' noneof ' -' sizeof ' -' size ' -' empty' -'!' -'||' -'true' -'false' -'null' -'{' -'}' -'[' -']' -':' -',' -'(' -')' -'?' -'- ' -'+' -'/' -null -null -null -null -null -null -null - -token symbolic names: -null -CURRENT_VALUE -DOTDOT -ROOT_VALUE -DOT -STAR -AND -EQ -GE -GT -LE -LT -NE -REG -IN -NIN -SUB -ANY -NON -SIZO -SIZ -EMPT -NOT -OR -TRUE -FALSE -NULL -BRACE_LEFT -BRACE_RIGHT -BRACKET_LEFT -BRACKET_RIGHT -COLON -COMMA -PAREN_LEFT -PAREN_RIGHT -QUESTION -MINUS_SP -PLUS -DIV -REGEX_OPT -REGEX_EXPR -KEY -SPECIAL_KEY -WS -NUMBER -STRING - -rule names: -CURRENT_VALUE -DOTDOT -ROOT_VALUE -DOT -STAR -AND -EQ -GE -GT -LE -LT -NE -REG -IN -NIN -SUB -ANY -NON -SIZO -SIZ -EMPT -NOT -OR -TRUE -FALSE -NULL -BRACE_LEFT -BRACE_RIGHT -BRACKET_LEFT -BRACKET_RIGHT -COLON -COMMA -PAREN_LEFT -PAREN_RIGHT -QUESTION -MINUS_SP -PLUS -DIV -REGEX_OPT -REGEX_EXPR -KEY -SPECIAL_KEY -WS -NUMBER -STRING -ESC_SINGLE -ESC_DOUBLE -UNICODE -HEX -SAFECODEPOINT_SINGLE -SAFECODEPOINT_DOUBLE -INT -EXP - -channel names: -DEFAULT_TOKEN_CHANNEL -HIDDEN - -mode names: -DEFAULT_MODE - -atn: -[4, 0, 45, 356, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 1, 37, 1, 38, 5, 38, 250, 8, 38, 10, 38, 12, 38, 253, 9, 38, 1, 39, 1, 39, 5, 39, 257, 8, 39, 10, 39, 12, 39, 260, 9, 39, 1, 39, 1, 39, 1, 40, 5, 40, 265, 8, 40, 10, 40, 12, 40, 268, 9, 40, 1, 40, 1, 40, 5, 40, 272, 8, 40, 10, 40, 12, 40, 275, 9, 40, 1, 41, 4, 41, 278, 8, 41, 11, 41, 12, 41, 279, 1, 42, 4, 42, 283, 8, 42, 11, 42, 12, 42, 284, 1, 42, 1, 42, 1, 43, 3, 43, 290, 8, 43, 1, 43, 1, 43, 1, 43, 4, 43, 295, 8, 43, 11, 43, 12, 43, 296, 3, 43, 299, 8, 43, 1, 43, 3, 43, 302, 8, 43, 1, 44, 1, 44, 1, 44, 5, 44, 307, 8, 44, 10, 44, 12, 44, 310, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 316, 8, 44, 10, 44, 12, 44, 319, 9, 44, 1, 44, 3, 44, 322, 8, 44, 1, 45, 1, 45, 1, 45, 3, 45, 327, 8, 45, 1, 46, 1, 46, 1, 46, 3, 46, 332, 8, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 4, 51, 347, 8, 51, 11, 51, 12, 51, 348, 1, 52, 1, 52, 3, 52, 353, 8, 52, 1, 52, 1, 52, 1, 258, 0, 53, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 0, 93, 0, 95, 0, 97, 0, 99, 0, 101, 0, 103, 0, 105, 0, 1, 0, 14, 6, 0, 103, 103, 105, 105, 109, 109, 115, 115, 117, 117, 121, 121, 4, 0, 45, 45, 65, 90, 95, 95, 97, 122, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 2, 0, 95, 95, 128, 65535, 3, 0, 9, 10, 13, 13, 32, 32, 1, 0, 48, 57, 8, 0, 39, 39, 47, 47, 92, 92, 98, 98, 102, 102, 110, 110, 114, 114, 116, 116, 8, 0, 34, 34, 47, 47, 92, 92, 98, 98, 102, 102, 110, 110, 114, 114, 116, 116, 3, 0, 48, 57, 65, 70, 97, 102, 3, 0, 0, 31, 39, 39, 92, 92, 3, 0, 0, 31, 34, 34, 92, 92, 2, 0, 69, 69, 101, 101, 2, 0, 43, 43, 45, 45, 366, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 1, 107, 1, 0, 0, 0, 3, 109, 1, 0, 0, 0, 5, 112, 1, 0, 0, 0, 7, 114, 1, 0, 0, 0, 9, 116, 1, 0, 0, 0, 11, 118, 1, 0, 0, 0, 13, 121, 1, 0, 0, 0, 15, 124, 1, 0, 0, 0, 17, 127, 1, 0, 0, 0, 19, 129, 1, 0, 0, 0, 21, 132, 1, 0, 0, 0, 23, 134, 1, 0, 0, 0, 25, 137, 1, 0, 0, 0, 27, 140, 1, 0, 0, 0, 29, 145, 1, 0, 0, 0, 31, 151, 1, 0, 0, 0, 33, 162, 1, 0, 0, 0, 35, 170, 1, 0, 0, 0, 37, 179, 1, 0, 0, 0, 39, 188, 1, 0, 0, 0, 41, 195, 1, 0, 0, 0, 43, 202, 1, 0, 0, 0, 45, 204, 1, 0, 0, 0, 47, 207, 1, 0, 0, 0, 49, 212, 1, 0, 0, 0, 51, 218, 1, 0, 0, 0, 53, 223, 1, 0, 0, 0, 55, 225, 1, 0, 0, 0, 57, 227, 1, 0, 0, 0, 59, 229, 1, 0, 0, 0, 61, 231, 1, 0, 0, 0, 63, 233, 1, 0, 0, 0, 65, 235, 1, 0, 0, 0, 67, 237, 1, 0, 0, 0, 69, 239, 1, 0, 0, 0, 71, 241, 1, 0, 0, 0, 73, 244, 1, 0, 0, 0, 75, 246, 1, 0, 0, 0, 77, 251, 1, 0, 0, 0, 79, 254, 1, 0, 0, 0, 81, 266, 1, 0, 0, 0, 83, 277, 1, 0, 0, 0, 85, 282, 1, 0, 0, 0, 87, 289, 1, 0, 0, 0, 89, 321, 1, 0, 0, 0, 91, 323, 1, 0, 0, 0, 93, 328, 1, 0, 0, 0, 95, 333, 1, 0, 0, 0, 97, 339, 1, 0, 0, 0, 99, 341, 1, 0, 0, 0, 101, 343, 1, 0, 0, 0, 103, 346, 1, 0, 0, 0, 105, 350, 1, 0, 0, 0, 107, 108, 5, 64, 0, 0, 108, 2, 1, 0, 0, 0, 109, 110, 5, 46, 0, 0, 110, 111, 5, 46, 0, 0, 111, 4, 1, 0, 0, 0, 112, 113, 5, 36, 0, 0, 113, 6, 1, 0, 0, 0, 114, 115, 5, 46, 0, 0, 115, 8, 1, 0, 0, 0, 116, 117, 5, 42, 0, 0, 117, 10, 1, 0, 0, 0, 118, 119, 5, 38, 0, 0, 119, 120, 5, 38, 0, 0, 120, 12, 1, 0, 0, 0, 121, 122, 5, 61, 0, 0, 122, 123, 5, 61, 0, 0, 123, 14, 1, 0, 0, 0, 124, 125, 5, 62, 0, 0, 125, 126, 5, 61, 0, 0, 126, 16, 1, 0, 0, 0, 127, 128, 5, 62, 0, 0, 128, 18, 1, 0, 0, 0, 129, 130, 5, 60, 0, 0, 130, 131, 5, 61, 0, 0, 131, 20, 1, 0, 0, 0, 132, 133, 5, 60, 0, 0, 133, 22, 1, 0, 0, 0, 134, 135, 5, 33, 0, 0, 135, 136, 5, 61, 0, 0, 136, 24, 1, 0, 0, 0, 137, 138, 5, 61, 0, 0, 138, 139, 5, 126, 0, 0, 139, 26, 1, 0, 0, 0, 140, 141, 5, 32, 0, 0, 141, 142, 5, 105, 0, 0, 142, 143, 5, 110, 0, 0, 143, 144, 5, 32, 0, 0, 144, 28, 1, 0, 0, 0, 145, 146, 5, 32, 0, 0, 146, 147, 5, 110, 0, 0, 147, 148, 5, 105, 0, 0, 148, 149, 5, 110, 0, 0, 149, 150, 5, 32, 0, 0, 150, 30, 1, 0, 0, 0, 151, 152, 5, 32, 0, 0, 152, 153, 5, 115, 0, 0, 153, 154, 5, 117, 0, 0, 154, 155, 5, 98, 0, 0, 155, 156, 5, 115, 0, 0, 156, 157, 5, 101, 0, 0, 157, 158, 5, 116, 0, 0, 158, 159, 5, 111, 0, 0, 159, 160, 5, 102, 0, 0, 160, 161, 5, 32, 0, 0, 161, 32, 1, 0, 0, 0, 162, 163, 5, 32, 0, 0, 163, 164, 5, 97, 0, 0, 164, 165, 5, 110, 0, 0, 165, 166, 5, 121, 0, 0, 166, 167, 5, 111, 0, 0, 167, 168, 5, 102, 0, 0, 168, 169, 5, 32, 0, 0, 169, 34, 1, 0, 0, 0, 170, 171, 5, 32, 0, 0, 171, 172, 5, 110, 0, 0, 172, 173, 5, 111, 0, 0, 173, 174, 5, 110, 0, 0, 174, 175, 5, 101, 0, 0, 175, 176, 5, 111, 0, 0, 176, 177, 5, 102, 0, 0, 177, 178, 5, 32, 0, 0, 178, 36, 1, 0, 0, 0, 179, 180, 5, 32, 0, 0, 180, 181, 5, 115, 0, 0, 181, 182, 5, 105, 0, 0, 182, 183, 5, 122, 0, 0, 183, 184, 5, 101, 0, 0, 184, 185, 5, 111, 0, 0, 185, 186, 5, 102, 0, 0, 186, 187, 5, 32, 0, 0, 187, 38, 1, 0, 0, 0, 188, 189, 5, 32, 0, 0, 189, 190, 5, 115, 0, 0, 190, 191, 5, 105, 0, 0, 191, 192, 5, 122, 0, 0, 192, 193, 5, 101, 0, 0, 193, 194, 5, 32, 0, 0, 194, 40, 1, 0, 0, 0, 195, 196, 5, 32, 0, 0, 196, 197, 5, 101, 0, 0, 197, 198, 5, 109, 0, 0, 198, 199, 5, 112, 0, 0, 199, 200, 5, 116, 0, 0, 200, 201, 5, 121, 0, 0, 201, 42, 1, 0, 0, 0, 202, 203, 5, 33, 0, 0, 203, 44, 1, 0, 0, 0, 204, 205, 5, 124, 0, 0, 205, 206, 5, 124, 0, 0, 206, 46, 1, 0, 0, 0, 207, 208, 5, 116, 0, 0, 208, 209, 5, 114, 0, 0, 209, 210, 5, 117, 0, 0, 210, 211, 5, 101, 0, 0, 211, 48, 1, 0, 0, 0, 212, 213, 5, 102, 0, 0, 213, 214, 5, 97, 0, 0, 214, 215, 5, 108, 0, 0, 215, 216, 5, 115, 0, 0, 216, 217, 5, 101, 0, 0, 217, 50, 1, 0, 0, 0, 218, 219, 5, 110, 0, 0, 219, 220, 5, 117, 0, 0, 220, 221, 5, 108, 0, 0, 221, 222, 5, 108, 0, 0, 222, 52, 1, 0, 0, 0, 223, 224, 5, 123, 0, 0, 224, 54, 1, 0, 0, 0, 225, 226, 5, 125, 0, 0, 226, 56, 1, 0, 0, 0, 227, 228, 5, 91, 0, 0, 228, 58, 1, 0, 0, 0, 229, 230, 5, 93, 0, 0, 230, 60, 1, 0, 0, 0, 231, 232, 5, 58, 0, 0, 232, 62, 1, 0, 0, 0, 233, 234, 5, 44, 0, 0, 234, 64, 1, 0, 0, 0, 235, 236, 5, 40, 0, 0, 236, 66, 1, 0, 0, 0, 237, 238, 5, 41, 0, 0, 238, 68, 1, 0, 0, 0, 239, 240, 5, 63, 0, 0, 240, 70, 1, 0, 0, 0, 241, 242, 5, 45, 0, 0, 242, 243, 5, 32, 0, 0, 243, 72, 1, 0, 0, 0, 244, 245, 5, 43, 0, 0, 245, 74, 1, 0, 0, 0, 246, 247, 5, 47, 0, 0, 247, 76, 1, 0, 0, 0, 248, 250, 7, 0, 0, 0, 249, 248, 1, 0, 0, 0, 250, 253, 1, 0, 0, 0, 251, 249, 1, 0, 0, 0, 251, 252, 1, 0, 0, 0, 252, 78, 1, 0, 0, 0, 253, 251, 1, 0, 0, 0, 254, 258, 5, 47, 0, 0, 255, 257, 9, 0, 0, 0, 256, 255, 1, 0, 0, 0, 257, 260, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 258, 256, 1, 0, 0, 0, 259, 261, 1, 0, 0, 0, 260, 258, 1, 0, 0, 0, 261, 262, 5, 47, 0, 0, 262, 80, 1, 0, 0, 0, 263, 265, 7, 1, 0, 0, 264, 263, 1, 0, 0, 0, 265, 268, 1, 0, 0, 0, 266, 264, 1, 0, 0, 0, 266, 267, 1, 0, 0, 0, 267, 269, 1, 0, 0, 0, 268, 266, 1, 0, 0, 0, 269, 273, 7, 2, 0, 0, 270, 272, 7, 3, 0, 0, 271, 270, 1, 0, 0, 0, 272, 275, 1, 0, 0, 0, 273, 271, 1, 0, 0, 0, 273, 274, 1, 0, 0, 0, 274, 82, 1, 0, 0, 0, 275, 273, 1, 0, 0, 0, 276, 278, 7, 4, 0, 0, 277, 276, 1, 0, 0, 0, 278, 279, 1, 0, 0, 0, 279, 277, 1, 0, 0, 0, 279, 280, 1, 0, 0, 0, 280, 84, 1, 0, 0, 0, 281, 283, 7, 5, 0, 0, 282, 281, 1, 0, 0, 0, 283, 284, 1, 0, 0, 0, 284, 282, 1, 0, 0, 0, 284, 285, 1, 0, 0, 0, 285, 286, 1, 0, 0, 0, 286, 287, 6, 42, 0, 0, 287, 86, 1, 0, 0, 0, 288, 290, 5, 45, 0, 0, 289, 288, 1, 0, 0, 0, 289, 290, 1, 0, 0, 0, 290, 291, 1, 0, 0, 0, 291, 298, 3, 103, 51, 0, 292, 294, 5, 46, 0, 0, 293, 295, 7, 6, 0, 0, 294, 293, 1, 0, 0, 0, 295, 296, 1, 0, 0, 0, 296, 294, 1, 0, 0, 0, 296, 297, 1, 0, 0, 0, 297, 299, 1, 0, 0, 0, 298, 292, 1, 0, 0, 0, 298, 299, 1, 0, 0, 0, 299, 301, 1, 0, 0, 0, 300, 302, 3, 105, 52, 0, 301, 300, 1, 0, 0, 0, 301, 302, 1, 0, 0, 0, 302, 88, 1, 0, 0, 0, 303, 308, 5, 34, 0, 0, 304, 307, 3, 93, 46, 0, 305, 307, 3, 101, 50, 0, 306, 304, 1, 0, 0, 0, 306, 305, 1, 0, 0, 0, 307, 310, 1, 0, 0, 0, 308, 306, 1, 0, 0, 0, 308, 309, 1, 0, 0, 0, 309, 311, 1, 0, 0, 0, 310, 308, 1, 0, 0, 0, 311, 322, 5, 34, 0, 0, 312, 317, 5, 39, 0, 0, 313, 316, 3, 91, 45, 0, 314, 316, 3, 99, 49, 0, 315, 313, 1, 0, 0, 0, 315, 314, 1, 0, 0, 0, 316, 319, 1, 0, 0, 0, 317, 315, 1, 0, 0, 0, 317, 318, 1, 0, 0, 0, 318, 320, 1, 0, 0, 0, 319, 317, 1, 0, 0, 0, 320, 322, 5, 39, 0, 0, 321, 303, 1, 0, 0, 0, 321, 312, 1, 0, 0, 0, 322, 90, 1, 0, 0, 0, 323, 326, 5, 92, 0, 0, 324, 327, 7, 7, 0, 0, 325, 327, 3, 95, 47, 0, 326, 324, 1, 0, 0, 0, 326, 325, 1, 0, 0, 0, 327, 92, 1, 0, 0, 0, 328, 331, 5, 92, 0, 0, 329, 332, 7, 8, 0, 0, 330, 332, 3, 95, 47, 0, 331, 329, 1, 0, 0, 0, 331, 330, 1, 0, 0, 0, 332, 94, 1, 0, 0, 0, 333, 334, 5, 117, 0, 0, 334, 335, 3, 97, 48, 0, 335, 336, 3, 97, 48, 0, 336, 337, 3, 97, 48, 0, 337, 338, 3, 97, 48, 0, 338, 96, 1, 0, 0, 0, 339, 340, 7, 9, 0, 0, 340, 98, 1, 0, 0, 0, 341, 342, 8, 10, 0, 0, 342, 100, 1, 0, 0, 0, 343, 344, 8, 11, 0, 0, 344, 102, 1, 0, 0, 0, 345, 347, 7, 6, 0, 0, 346, 345, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, 348, 346, 1, 0, 0, 0, 348, 349, 1, 0, 0, 0, 349, 104, 1, 0, 0, 0, 350, 352, 7, 12, 0, 0, 351, 353, 7, 13, 0, 0, 352, 351, 1, 0, 0, 0, 352, 353, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 355, 3, 103, 51, 0, 355, 106, 1, 0, 0, 0, 20, 0, 251, 258, 266, 273, 279, 284, 289, 296, 298, 301, 306, 308, 315, 317, 321, 326, 331, 348, 352, 1, 6, 0, 0] \ No newline at end of file diff --git a/src/parser/generated/JSONPathLexer.js b/src/parser/generated/JSONPathLexer.js deleted file mode 100644 index 7fae5cf..0000000 --- a/src/parser/generated/JSONPathLexer.js +++ /dev/null @@ -1,215 +0,0 @@ -// Generated from ./src/parser/generated/JSONPath.g4 by ANTLR 4.13.1 -// jshint ignore: start -import antlr4 from 'antlr4'; - - -const serializedATN = [4,0,45,356,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2, -4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7, -12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19, -2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2, -27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34, -7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7, -41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48, -2,49,7,49,2,50,7,50,2,51,7,51,2,52,7,52,1,0,1,0,1,1,1,1,1,1,1,2,1,2,1,3, -1,3,1,4,1,4,1,5,1,5,1,5,1,6,1,6,1,6,1,7,1,7,1,7,1,8,1,8,1,9,1,9,1,9,1,10, -1,10,1,11,1,11,1,11,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1, -14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15, -1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,17,1, -17,1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,19,1,19,1,19, -1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,21,1,21,1,22,1, -22,1,22,1,23,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,24,1,25,1,25, -1,25,1,25,1,25,1,26,1,26,1,27,1,27,1,28,1,28,1,29,1,29,1,30,1,30,1,31,1, -31,1,32,1,32,1,33,1,33,1,34,1,34,1,35,1,35,1,35,1,36,1,36,1,37,1,37,1,38, -5,38,250,8,38,10,38,12,38,253,9,38,1,39,1,39,5,39,257,8,39,10,39,12,39,260, -9,39,1,39,1,39,1,40,5,40,265,8,40,10,40,12,40,268,9,40,1,40,1,40,5,40,272, -8,40,10,40,12,40,275,9,40,1,41,4,41,278,8,41,11,41,12,41,279,1,42,4,42,283, -8,42,11,42,12,42,284,1,42,1,42,1,43,3,43,290,8,43,1,43,1,43,1,43,4,43,295, -8,43,11,43,12,43,296,3,43,299,8,43,1,43,3,43,302,8,43,1,44,1,44,1,44,5,44, -307,8,44,10,44,12,44,310,9,44,1,44,1,44,1,44,1,44,5,44,316,8,44,10,44,12, -44,319,9,44,1,44,3,44,322,8,44,1,45,1,45,1,45,3,45,327,8,45,1,46,1,46,1, -46,3,46,332,8,46,1,47,1,47,1,47,1,47,1,47,1,47,1,48,1,48,1,49,1,49,1,50, -1,50,1,51,4,51,347,8,51,11,51,12,51,348,1,52,1,52,3,52,353,8,52,1,52,1,52, -1,258,0,53,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25, -13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49, -25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,67,34,69,35,71,36,73, -37,75,38,77,39,79,40,81,41,83,42,85,43,87,44,89,45,91,0,93,0,95,0,97,0,99, -0,101,0,103,0,105,0,1,0,14,6,0,103,103,105,105,109,109,115,115,117,117,121, -121,4,0,45,45,65,90,95,95,97,122,3,0,65,90,95,95,97,122,4,0,48,57,65,90, -95,95,97,122,2,0,95,95,128,65535,3,0,9,10,13,13,32,32,1,0,48,57,8,0,39,39, -47,47,92,92,98,98,102,102,110,110,114,114,116,116,8,0,34,34,47,47,92,92, -98,98,102,102,110,110,114,114,116,116,3,0,48,57,65,70,97,102,3,0,0,31,39, -39,92,92,3,0,0,31,34,34,92,92,2,0,69,69,101,101,2,0,43,43,45,45,366,0,1, -1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13, -1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0, -0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1, -0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0, -47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0, -0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69, -1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0, -0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,1,107,1, -0,0,0,3,109,1,0,0,0,5,112,1,0,0,0,7,114,1,0,0,0,9,116,1,0,0,0,11,118,1,0, -0,0,13,121,1,0,0,0,15,124,1,0,0,0,17,127,1,0,0,0,19,129,1,0,0,0,21,132,1, -0,0,0,23,134,1,0,0,0,25,137,1,0,0,0,27,140,1,0,0,0,29,145,1,0,0,0,31,151, -1,0,0,0,33,162,1,0,0,0,35,170,1,0,0,0,37,179,1,0,0,0,39,188,1,0,0,0,41,195, -1,0,0,0,43,202,1,0,0,0,45,204,1,0,0,0,47,207,1,0,0,0,49,212,1,0,0,0,51,218, -1,0,0,0,53,223,1,0,0,0,55,225,1,0,0,0,57,227,1,0,0,0,59,229,1,0,0,0,61,231, -1,0,0,0,63,233,1,0,0,0,65,235,1,0,0,0,67,237,1,0,0,0,69,239,1,0,0,0,71,241, -1,0,0,0,73,244,1,0,0,0,75,246,1,0,0,0,77,251,1,0,0,0,79,254,1,0,0,0,81,266, -1,0,0,0,83,277,1,0,0,0,85,282,1,0,0,0,87,289,1,0,0,0,89,321,1,0,0,0,91,323, -1,0,0,0,93,328,1,0,0,0,95,333,1,0,0,0,97,339,1,0,0,0,99,341,1,0,0,0,101, -343,1,0,0,0,103,346,1,0,0,0,105,350,1,0,0,0,107,108,5,64,0,0,108,2,1,0,0, -0,109,110,5,46,0,0,110,111,5,46,0,0,111,4,1,0,0,0,112,113,5,36,0,0,113,6, -1,0,0,0,114,115,5,46,0,0,115,8,1,0,0,0,116,117,5,42,0,0,117,10,1,0,0,0,118, -119,5,38,0,0,119,120,5,38,0,0,120,12,1,0,0,0,121,122,5,61,0,0,122,123,5, -61,0,0,123,14,1,0,0,0,124,125,5,62,0,0,125,126,5,61,0,0,126,16,1,0,0,0,127, -128,5,62,0,0,128,18,1,0,0,0,129,130,5,60,0,0,130,131,5,61,0,0,131,20,1,0, -0,0,132,133,5,60,0,0,133,22,1,0,0,0,134,135,5,33,0,0,135,136,5,61,0,0,136, -24,1,0,0,0,137,138,5,61,0,0,138,139,5,126,0,0,139,26,1,0,0,0,140,141,5,32, -0,0,141,142,5,105,0,0,142,143,5,110,0,0,143,144,5,32,0,0,144,28,1,0,0,0, -145,146,5,32,0,0,146,147,5,110,0,0,147,148,5,105,0,0,148,149,5,110,0,0,149, -150,5,32,0,0,150,30,1,0,0,0,151,152,5,32,0,0,152,153,5,115,0,0,153,154,5, -117,0,0,154,155,5,98,0,0,155,156,5,115,0,0,156,157,5,101,0,0,157,158,5,116, -0,0,158,159,5,111,0,0,159,160,5,102,0,0,160,161,5,32,0,0,161,32,1,0,0,0, -162,163,5,32,0,0,163,164,5,97,0,0,164,165,5,110,0,0,165,166,5,121,0,0,166, -167,5,111,0,0,167,168,5,102,0,0,168,169,5,32,0,0,169,34,1,0,0,0,170,171, -5,32,0,0,171,172,5,110,0,0,172,173,5,111,0,0,173,174,5,110,0,0,174,175,5, -101,0,0,175,176,5,111,0,0,176,177,5,102,0,0,177,178,5,32,0,0,178,36,1,0, -0,0,179,180,5,32,0,0,180,181,5,115,0,0,181,182,5,105,0,0,182,183,5,122,0, -0,183,184,5,101,0,0,184,185,5,111,0,0,185,186,5,102,0,0,186,187,5,32,0,0, -187,38,1,0,0,0,188,189,5,32,0,0,189,190,5,115,0,0,190,191,5,105,0,0,191, -192,5,122,0,0,192,193,5,101,0,0,193,194,5,32,0,0,194,40,1,0,0,0,195,196, -5,32,0,0,196,197,5,101,0,0,197,198,5,109,0,0,198,199,5,112,0,0,199,200,5, -116,0,0,200,201,5,121,0,0,201,42,1,0,0,0,202,203,5,33,0,0,203,44,1,0,0,0, -204,205,5,124,0,0,205,206,5,124,0,0,206,46,1,0,0,0,207,208,5,116,0,0,208, -209,5,114,0,0,209,210,5,117,0,0,210,211,5,101,0,0,211,48,1,0,0,0,212,213, -5,102,0,0,213,214,5,97,0,0,214,215,5,108,0,0,215,216,5,115,0,0,216,217,5, -101,0,0,217,50,1,0,0,0,218,219,5,110,0,0,219,220,5,117,0,0,220,221,5,108, -0,0,221,222,5,108,0,0,222,52,1,0,0,0,223,224,5,123,0,0,224,54,1,0,0,0,225, -226,5,125,0,0,226,56,1,0,0,0,227,228,5,91,0,0,228,58,1,0,0,0,229,230,5,93, -0,0,230,60,1,0,0,0,231,232,5,58,0,0,232,62,1,0,0,0,233,234,5,44,0,0,234, -64,1,0,0,0,235,236,5,40,0,0,236,66,1,0,0,0,237,238,5,41,0,0,238,68,1,0,0, -0,239,240,5,63,0,0,240,70,1,0,0,0,241,242,5,45,0,0,242,243,5,32,0,0,243, -72,1,0,0,0,244,245,5,43,0,0,245,74,1,0,0,0,246,247,5,47,0,0,247,76,1,0,0, -0,248,250,7,0,0,0,249,248,1,0,0,0,250,253,1,0,0,0,251,249,1,0,0,0,251,252, -1,0,0,0,252,78,1,0,0,0,253,251,1,0,0,0,254,258,5,47,0,0,255,257,9,0,0,0, -256,255,1,0,0,0,257,260,1,0,0,0,258,259,1,0,0,0,258,256,1,0,0,0,259,261, -1,0,0,0,260,258,1,0,0,0,261,262,5,47,0,0,262,80,1,0,0,0,263,265,7,1,0,0, -264,263,1,0,0,0,265,268,1,0,0,0,266,264,1,0,0,0,266,267,1,0,0,0,267,269, -1,0,0,0,268,266,1,0,0,0,269,273,7,2,0,0,270,272,7,3,0,0,271,270,1,0,0,0, -272,275,1,0,0,0,273,271,1,0,0,0,273,274,1,0,0,0,274,82,1,0,0,0,275,273,1, -0,0,0,276,278,7,4,0,0,277,276,1,0,0,0,278,279,1,0,0,0,279,277,1,0,0,0,279, -280,1,0,0,0,280,84,1,0,0,0,281,283,7,5,0,0,282,281,1,0,0,0,283,284,1,0,0, -0,284,282,1,0,0,0,284,285,1,0,0,0,285,286,1,0,0,0,286,287,6,42,0,0,287,86, -1,0,0,0,288,290,5,45,0,0,289,288,1,0,0,0,289,290,1,0,0,0,290,291,1,0,0,0, -291,298,3,103,51,0,292,294,5,46,0,0,293,295,7,6,0,0,294,293,1,0,0,0,295, -296,1,0,0,0,296,294,1,0,0,0,296,297,1,0,0,0,297,299,1,0,0,0,298,292,1,0, -0,0,298,299,1,0,0,0,299,301,1,0,0,0,300,302,3,105,52,0,301,300,1,0,0,0,301, -302,1,0,0,0,302,88,1,0,0,0,303,308,5,34,0,0,304,307,3,93,46,0,305,307,3, -101,50,0,306,304,1,0,0,0,306,305,1,0,0,0,307,310,1,0,0,0,308,306,1,0,0,0, -308,309,1,0,0,0,309,311,1,0,0,0,310,308,1,0,0,0,311,322,5,34,0,0,312,317, -5,39,0,0,313,316,3,91,45,0,314,316,3,99,49,0,315,313,1,0,0,0,315,314,1,0, -0,0,316,319,1,0,0,0,317,315,1,0,0,0,317,318,1,0,0,0,318,320,1,0,0,0,319, -317,1,0,0,0,320,322,5,39,0,0,321,303,1,0,0,0,321,312,1,0,0,0,322,90,1,0, -0,0,323,326,5,92,0,0,324,327,7,7,0,0,325,327,3,95,47,0,326,324,1,0,0,0,326, -325,1,0,0,0,327,92,1,0,0,0,328,331,5,92,0,0,329,332,7,8,0,0,330,332,3,95, -47,0,331,329,1,0,0,0,331,330,1,0,0,0,332,94,1,0,0,0,333,334,5,117,0,0,334, -335,3,97,48,0,335,336,3,97,48,0,336,337,3,97,48,0,337,338,3,97,48,0,338, -96,1,0,0,0,339,340,7,9,0,0,340,98,1,0,0,0,341,342,8,10,0,0,342,100,1,0,0, -0,343,344,8,11,0,0,344,102,1,0,0,0,345,347,7,6,0,0,346,345,1,0,0,0,347,348, -1,0,0,0,348,346,1,0,0,0,348,349,1,0,0,0,349,104,1,0,0,0,350,352,7,12,0,0, -351,353,7,13,0,0,352,351,1,0,0,0,352,353,1,0,0,0,353,354,1,0,0,0,354,355, -3,103,51,0,355,106,1,0,0,0,20,0,251,258,266,273,279,284,289,296,298,301, -306,308,315,317,321,326,331,348,352,1,6,0,0]; - - -const atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN); - -const decisionsToDFA = atn.decisionToState.map( (ds, index) => new antlr4.dfa.DFA(ds, index) ); - -export default class JSONPathLexer extends antlr4.Lexer { - - static grammarFileName = "JSONPath.g4"; - static channelNames = [ "DEFAULT_TOKEN_CHANNEL", "HIDDEN" ]; - static modeNames = [ "DEFAULT_MODE" ]; - static literalNames = [ null, "'@'", "'..'", "'$'", "'.'", "'*'", "'&&'", - "'=='", "'>='", "'>'", "'<='", "'<'", "'!='", "'=~'", - "' in '", "' nin '", "' subsetof '", "' anyof '", - "' noneof '", "' sizeof '", "' size '", "' empty'", - "'!'", "'||'", "'true'", "'false'", "'null'", "'{'", - "'}'", "'['", "']'", "':'", "','", "'('", "')'", - "'?'", "'- '", "'+'", "'/'" ]; - static symbolicNames = [ null, "CURRENT_VALUE", "DOTDOT", "ROOT_VALUE", - "DOT", "STAR", "AND", "EQ", "GE", "GT", "LE", - "LT", "NE", "REG", "IN", "NIN", "SUB", "ANY", - "NON", "SIZO", "SIZ", "EMPT", "NOT", "OR", "TRUE", - "FALSE", "NULL", "BRACE_LEFT", "BRACE_RIGHT", - "BRACKET_LEFT", "BRACKET_RIGHT", "COLON", "COMMA", - "PAREN_LEFT", "PAREN_RIGHT", "QUESTION", "MINUS_SP", - "PLUS", "DIV", "REGEX_OPT", "REGEX_EXPR", "KEY", - "SPECIAL_KEY", "WS", "NUMBER", "STRING" ]; - static ruleNames = [ "CURRENT_VALUE", "DOTDOT", "ROOT_VALUE", "DOT", "STAR", - "AND", "EQ", "GE", "GT", "LE", "LT", "NE", "REG", - "IN", "NIN", "SUB", "ANY", "NON", "SIZO", "SIZ", "EMPT", - "NOT", "OR", "TRUE", "FALSE", "NULL", "BRACE_LEFT", - "BRACE_RIGHT", "BRACKET_LEFT", "BRACKET_RIGHT", "COLON", - "COMMA", "PAREN_LEFT", "PAREN_RIGHT", "QUESTION", - "MINUS_SP", "PLUS", "DIV", "REGEX_OPT", "REGEX_EXPR", - "KEY", "SPECIAL_KEY", "WS", "NUMBER", "STRING", "ESC_SINGLE", - "ESC_DOUBLE", "UNICODE", "HEX", "SAFECODEPOINT_SINGLE", - "SAFECODEPOINT_DOUBLE", "INT", "EXP" ]; - - constructor(input) { - super(input) - this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.atn.PredictionContextCache()); - } -} - -JSONPathLexer.EOF = antlr4.Token.EOF; -JSONPathLexer.CURRENT_VALUE = 1; -JSONPathLexer.DOTDOT = 2; -JSONPathLexer.ROOT_VALUE = 3; -JSONPathLexer.DOT = 4; -JSONPathLexer.STAR = 5; -JSONPathLexer.AND = 6; -JSONPathLexer.EQ = 7; -JSONPathLexer.GE = 8; -JSONPathLexer.GT = 9; -JSONPathLexer.LE = 10; -JSONPathLexer.LT = 11; -JSONPathLexer.NE = 12; -JSONPathLexer.REG = 13; -JSONPathLexer.IN = 14; -JSONPathLexer.NIN = 15; -JSONPathLexer.SUB = 16; -JSONPathLexer.ANY = 17; -JSONPathLexer.NON = 18; -JSONPathLexer.SIZO = 19; -JSONPathLexer.SIZ = 20; -JSONPathLexer.EMPT = 21; -JSONPathLexer.NOT = 22; -JSONPathLexer.OR = 23; -JSONPathLexer.TRUE = 24; -JSONPathLexer.FALSE = 25; -JSONPathLexer.NULL = 26; -JSONPathLexer.BRACE_LEFT = 27; -JSONPathLexer.BRACE_RIGHT = 28; -JSONPathLexer.BRACKET_LEFT = 29; -JSONPathLexer.BRACKET_RIGHT = 30; -JSONPathLexer.COLON = 31; -JSONPathLexer.COMMA = 32; -JSONPathLexer.PAREN_LEFT = 33; -JSONPathLexer.PAREN_RIGHT = 34; -JSONPathLexer.QUESTION = 35; -JSONPathLexer.MINUS_SP = 36; -JSONPathLexer.PLUS = 37; -JSONPathLexer.DIV = 38; -JSONPathLexer.REGEX_OPT = 39; -JSONPathLexer.REGEX_EXPR = 40; -JSONPathLexer.KEY = 41; -JSONPathLexer.SPECIAL_KEY = 42; -JSONPathLexer.WS = 43; -JSONPathLexer.NUMBER = 44; -JSONPathLexer.STRING = 45; - - - diff --git a/src/parser/generated/JSONPathLexer.tokens b/src/parser/generated/JSONPathLexer.tokens deleted file mode 100644 index 578fef3..0000000 --- a/src/parser/generated/JSONPathLexer.tokens +++ /dev/null @@ -1,83 +0,0 @@ -CURRENT_VALUE=1 -DOTDOT=2 -ROOT_VALUE=3 -DOT=4 -STAR=5 -AND=6 -EQ=7 -GE=8 -GT=9 -LE=10 -LT=11 -NE=12 -REG=13 -IN=14 -NIN=15 -SUB=16 -ANY=17 -NON=18 -SIZO=19 -SIZ=20 -EMPT=21 -NOT=22 -OR=23 -TRUE=24 -FALSE=25 -NULL=26 -BRACE_LEFT=27 -BRACE_RIGHT=28 -BRACKET_LEFT=29 -BRACKET_RIGHT=30 -COLON=31 -COMMA=32 -PAREN_LEFT=33 -PAREN_RIGHT=34 -QUESTION=35 -MINUS_SP=36 -PLUS=37 -DIV=38 -REGEX_OPT=39 -REGEX_EXPR=40 -KEY=41 -SPECIAL_KEY=42 -WS=43 -NUMBER=44 -STRING=45 -'@'=1 -'..'=2 -'$'=3 -'.'=4 -'*'=5 -'&&'=6 -'=='=7 -'>='=8 -'>'=9 -'<='=10 -'<'=11 -'!='=12 -'=~'=13 -' in '=14 -' nin '=15 -' subsetof '=16 -' anyof '=17 -' noneof '=18 -' sizeof '=19 -' size '=20 -' empty'=21 -'!'=22 -'||'=23 -'true'=24 -'false'=25 -'null'=26 -'{'=27 -'}'=28 -'['=29 -']'=30 -':'=31 -','=32 -'('=33 -')'=34 -'?'=35 -'- '=36 -'+'=37 -'/'=38 diff --git a/src/parser/generated/JSONPathListener.js b/src/parser/generated/JSONPathListener.js deleted file mode 100644 index 90e20bd..0000000 --- a/src/parser/generated/JSONPathListener.js +++ /dev/null @@ -1,180 +0,0 @@ -// Generated from ./src/parser/generated/JSONPath.g4 by ANTLR 4.13.1 -// jshint ignore: start -import antlr4 from 'antlr4'; - -// This class defines a complete listener for a parse tree produced by JSONPathParser. -export default class JSONPathListener extends antlr4.tree.ParseTreeListener { - - // Enter a parse tree produced by JSONPathParser#jsonpath. - enterJsonpath(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#jsonpath. - exitJsonpath(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#filterarg. - enterFilterarg(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#filterarg. - exitFilterarg(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#subscript. - enterSubscript(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#subscript. - exitSubscript(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#dotdotContent. - enterDotdotContent(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#dotdotContent. - exitDotdotContent(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#dotContent. - enterDotContent(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#dotContent. - exitDotContent(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#bracket. - enterBracket(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#bracket. - exitBracket(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#bracketContent. - enterBracketContent(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#bracketContent. - exitBracketContent(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#filterExpression. - enterFilterExpression(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#filterExpression. - exitFilterExpression(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#indexes. - enterIndexes(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#indexes. - exitIndexes(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#unions. - enterUnions(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#unions. - exitUnions(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#slices. - enterSlices(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#slices. - exitSlices(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#regex. - enterRegex(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#regex. - exitRegex(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#expression. - enterExpression(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#expression. - exitExpression(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#filterpath. - enterFilterpath(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#filterpath. - exitFilterpath(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#identifier. - enterIdentifier(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#identifier. - exitIdentifier(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#obj. - enterObj(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#obj. - exitObj(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#pair. - enterPair(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#pair. - exitPair(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#array. - enterArray(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#array. - exitArray(ctx) { - } - - - // Enter a parse tree produced by JSONPathParser#value. - enterValue(ctx) { - } - - // Exit a parse tree produced by JSONPathParser#value. - exitValue(ctx) { - } - - - -} \ No newline at end of file diff --git a/src/parser/generated/JSONPathParser.js b/src/parser/generated/JSONPathParser.js deleted file mode 100644 index e507238..0000000 --- a/src/parser/generated/JSONPathParser.js +++ /dev/null @@ -1,2386 +0,0 @@ -// Generated from ./src/parser/generated/JSONPath.g4 by ANTLR 4.13.1 -// jshint ignore: start -import antlr4 from 'antlr4'; -import JSONPathListener from './JSONPathListener.js'; -const serializedATN = [4,1,45,236,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7, -4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12, -2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,1,0,1,0,3,0, -41,8,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,52,8,1,1,1,1,1,1,1,1,1,1, -1,3,1,59,8,1,1,1,5,1,62,8,1,10,1,12,1,65,9,1,1,2,1,2,1,2,3,2,70,8,2,1,2, -1,2,1,2,3,2,75,8,2,1,2,1,2,3,2,79,8,2,3,2,81,8,2,1,3,1,3,1,3,3,3,86,8,3, -1,4,1,4,1,4,3,4,91,8,4,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,3, -6,105,8,6,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,4,8,115,8,8,11,8,12,8,116,1,9, -1,9,1,9,4,9,122,8,9,11,9,12,9,123,1,9,1,9,1,9,4,9,129,8,9,11,9,12,9,130, -3,9,133,8,9,1,10,3,10,136,8,10,1,10,1,10,3,10,140,8,10,1,10,1,10,3,10,144, -8,10,3,10,146,8,10,1,11,1,11,3,11,150,8,11,1,12,1,12,1,12,1,12,1,12,1,12, -1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1, -12,1,12,1,12,1,12,1,12,3,12,177,8,12,1,12,1,12,1,12,5,12,182,8,12,10,12, -12,12,185,9,12,1,13,1,13,3,13,189,8,13,1,14,1,14,1,15,1,15,1,15,1,15,5,15, -197,8,15,10,15,12,15,200,9,15,1,15,1,15,1,15,1,15,3,15,206,8,15,1,16,1,16, -1,16,1,16,1,17,1,17,1,17,1,17,5,17,216,8,17,10,17,12,17,219,9,17,1,17,1, -17,1,17,1,17,3,17,225,8,17,1,18,1,18,1,18,1,18,1,18,1,18,1,18,3,18,234,8, -18,1,18,0,2,2,24,19,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36, -0,6,2,0,5,5,38,38,1,0,36,37,2,0,7,12,14,20,2,0,6,6,23,23,2,0,1,1,3,3,2,0, -24,26,41,42,267,0,38,1,0,0,0,2,51,1,0,0,0,4,80,1,0,0,0,6,85,1,0,0,0,8,90, -1,0,0,0,10,92,1,0,0,0,12,104,1,0,0,0,14,106,1,0,0,0,16,111,1,0,0,0,18,132, -1,0,0,0,20,135,1,0,0,0,22,147,1,0,0,0,24,176,1,0,0,0,26,186,1,0,0,0,28,190, -1,0,0,0,30,205,1,0,0,0,32,207,1,0,0,0,34,224,1,0,0,0,36,233,1,0,0,0,38,40, -5,3,0,0,39,41,3,4,2,0,40,39,1,0,0,0,40,41,1,0,0,0,41,42,1,0,0,0,42,43,5, -0,0,1,43,1,1,0,0,0,44,45,6,1,-1,0,45,46,5,33,0,0,46,47,3,2,1,0,47,48,5,34, -0,0,48,52,1,0,0,0,49,52,3,36,18,0,50,52,3,26,13,0,51,44,1,0,0,0,51,49,1, -0,0,0,51,50,1,0,0,0,52,63,1,0,0,0,53,54,10,4,0,0,54,55,7,0,0,0,55,62,3,2, -1,5,56,58,10,3,0,0,57,59,7,1,0,0,58,57,1,0,0,0,58,59,1,0,0,0,59,60,1,0,0, -0,60,62,3,2,1,4,61,53,1,0,0,0,61,56,1,0,0,0,62,65,1,0,0,0,63,61,1,0,0,0, -63,64,1,0,0,0,64,3,1,0,0,0,65,63,1,0,0,0,66,67,5,2,0,0,67,69,3,6,3,0,68, -70,3,4,2,0,69,68,1,0,0,0,69,70,1,0,0,0,70,81,1,0,0,0,71,72,5,4,0,0,72,74, -3,8,4,0,73,75,3,4,2,0,74,73,1,0,0,0,74,75,1,0,0,0,75,81,1,0,0,0,76,78,3, -10,5,0,77,79,3,4,2,0,78,77,1,0,0,0,78,79,1,0,0,0,79,81,1,0,0,0,80,66,1,0, -0,0,80,71,1,0,0,0,80,76,1,0,0,0,81,5,1,0,0,0,82,86,5,5,0,0,83,86,3,28,14, -0,84,86,3,10,5,0,85,82,1,0,0,0,85,83,1,0,0,0,85,84,1,0,0,0,86,7,1,0,0,0, -87,91,5,5,0,0,88,91,5,44,0,0,89,91,3,28,14,0,90,87,1,0,0,0,90,88,1,0,0,0, -90,89,1,0,0,0,91,9,1,0,0,0,92,93,5,29,0,0,93,94,3,12,6,0,94,95,5,30,0,0, -95,11,1,0,0,0,96,105,3,18,9,0,97,105,3,16,8,0,98,105,3,20,10,0,99,105,5, -5,0,0,100,105,5,44,0,0,101,105,5,45,0,0,102,105,3,28,14,0,103,105,3,14,7, -0,104,96,1,0,0,0,104,97,1,0,0,0,104,98,1,0,0,0,104,99,1,0,0,0,104,100,1, -0,0,0,104,101,1,0,0,0,104,102,1,0,0,0,104,103,1,0,0,0,105,13,1,0,0,0,106, -107,5,35,0,0,107,108,5,33,0,0,108,109,3,24,12,0,109,110,5,34,0,0,110,15, -1,0,0,0,111,114,5,44,0,0,112,113,5,32,0,0,113,115,5,44,0,0,114,112,1,0,0, -0,115,116,1,0,0,0,116,114,1,0,0,0,116,117,1,0,0,0,117,17,1,0,0,0,118,121, -5,45,0,0,119,120,5,32,0,0,120,122,5,45,0,0,121,119,1,0,0,0,122,123,1,0,0, -0,123,121,1,0,0,0,123,124,1,0,0,0,124,133,1,0,0,0,125,128,3,28,14,0,126, -127,5,32,0,0,127,129,3,28,14,0,128,126,1,0,0,0,129,130,1,0,0,0,130,128,1, -0,0,0,130,131,1,0,0,0,131,133,1,0,0,0,132,118,1,0,0,0,132,125,1,0,0,0,133, -19,1,0,0,0,134,136,5,44,0,0,135,134,1,0,0,0,135,136,1,0,0,0,136,137,1,0, -0,0,137,139,5,31,0,0,138,140,5,44,0,0,139,138,1,0,0,0,139,140,1,0,0,0,140, -145,1,0,0,0,141,143,5,31,0,0,142,144,5,44,0,0,143,142,1,0,0,0,143,144,1, -0,0,0,144,146,1,0,0,0,145,141,1,0,0,0,145,146,1,0,0,0,146,21,1,0,0,0,147, -149,5,40,0,0,148,150,5,39,0,0,149,148,1,0,0,0,149,150,1,0,0,0,150,23,1,0, -0,0,151,152,6,12,-1,0,152,153,5,22,0,0,153,154,5,33,0,0,154,155,3,24,12, -0,155,156,5,34,0,0,156,177,1,0,0,0,157,158,5,33,0,0,158,159,3,24,12,0,159, -160,5,34,0,0,160,177,1,0,0,0,161,162,3,2,1,0,162,163,7,2,0,0,163,164,3,2, -1,0,164,177,1,0,0,0,165,166,3,2,1,0,166,167,5,13,0,0,167,168,3,22,11,0,168, -177,1,0,0,0,169,170,3,2,1,0,170,171,5,21,0,0,171,177,1,0,0,0,172,177,3,26, -13,0,173,177,5,24,0,0,174,177,5,25,0,0,175,177,5,26,0,0,176,151,1,0,0,0, -176,157,1,0,0,0,176,161,1,0,0,0,176,165,1,0,0,0,176,169,1,0,0,0,176,172, -1,0,0,0,176,173,1,0,0,0,176,174,1,0,0,0,176,175,1,0,0,0,177,183,1,0,0,0, -178,179,10,8,0,0,179,180,7,3,0,0,180,182,3,24,12,9,181,178,1,0,0,0,182,185, -1,0,0,0,183,181,1,0,0,0,183,184,1,0,0,0,184,25,1,0,0,0,185,183,1,0,0,0,186, -188,7,4,0,0,187,189,3,4,2,0,188,187,1,0,0,0,188,189,1,0,0,0,189,27,1,0,0, -0,190,191,7,5,0,0,191,29,1,0,0,0,192,193,5,27,0,0,193,198,3,32,16,0,194, -195,5,32,0,0,195,197,3,32,16,0,196,194,1,0,0,0,197,200,1,0,0,0,198,196,1, -0,0,0,198,199,1,0,0,0,199,201,1,0,0,0,200,198,1,0,0,0,201,202,5,28,0,0,202, -206,1,0,0,0,203,204,5,27,0,0,204,206,5,28,0,0,205,192,1,0,0,0,205,203,1, -0,0,0,206,31,1,0,0,0,207,208,5,45,0,0,208,209,5,31,0,0,209,210,3,36,18,0, -210,33,1,0,0,0,211,212,5,29,0,0,212,217,3,36,18,0,213,214,5,32,0,0,214,216, -3,36,18,0,215,213,1,0,0,0,216,219,1,0,0,0,217,215,1,0,0,0,217,218,1,0,0, -0,218,220,1,0,0,0,219,217,1,0,0,0,220,221,5,30,0,0,221,225,1,0,0,0,222,223, -5,29,0,0,223,225,5,30,0,0,224,211,1,0,0,0,224,222,1,0,0,0,225,35,1,0,0,0, -226,234,5,45,0,0,227,234,5,44,0,0,228,234,3,30,15,0,229,234,3,34,17,0,230, -234,5,24,0,0,231,234,5,25,0,0,232,234,5,26,0,0,233,226,1,0,0,0,233,227,1, -0,0,0,233,228,1,0,0,0,233,229,1,0,0,0,233,230,1,0,0,0,233,231,1,0,0,0,233, -232,1,0,0,0,234,37,1,0,0,0,29,40,51,58,61,63,69,74,78,80,85,90,104,116,123, -130,132,135,139,143,145,149,176,183,188,198,205,217,224,233]; - - -const atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN); - -const decisionsToDFA = atn.decisionToState.map( (ds, index) => new antlr4.dfa.DFA(ds, index) ); - -const sharedContextCache = new antlr4.atn.PredictionContextCache(); - -export default class JSONPathParser extends antlr4.Parser { - - static grammarFileName = "JSONPath.g4"; - static literalNames = [ null, "'@'", "'..'", "'$'", "'.'", "'*'", "'&&'", - "'=='", "'>='", "'>'", "'<='", "'<'", "'!='", - "'=~'", "' in '", "' nin '", "' subsetof '", - "' anyof '", "' noneof '", "' sizeof '", "' size '", - "' empty'", "'!'", "'||'", "'true'", "'false'", - "'null'", "'{'", "'}'", "'['", "']'", "':'", - "','", "'('", "')'", "'?'", "'- '", "'+'", "'/'" ]; - static symbolicNames = [ null, "CURRENT_VALUE", "DOTDOT", "ROOT_VALUE", - "DOT", "STAR", "AND", "EQ", "GE", "GT", "LE", - "LT", "NE", "REG", "IN", "NIN", "SUB", "ANY", - "NON", "SIZO", "SIZ", "EMPT", "NOT", "OR", - "TRUE", "FALSE", "NULL", "BRACE_LEFT", "BRACE_RIGHT", - "BRACKET_LEFT", "BRACKET_RIGHT", "COLON", "COMMA", - "PAREN_LEFT", "PAREN_RIGHT", "QUESTION", "MINUS_SP", - "PLUS", "DIV", "REGEX_OPT", "REGEX_EXPR", "KEY", - "SPECIAL_KEY", "WS", "NUMBER", "STRING" ]; - static ruleNames = [ "jsonpath", "filterarg", "subscript", "dotdotContent", - "dotContent", "bracket", "bracketContent", "filterExpression", - "indexes", "unions", "slices", "regex", "expression", - "filterpath", "identifier", "obj", "pair", "array", - "value" ]; - - constructor(input) { - super(input); - this._interp = new antlr4.atn.ParserATNSimulator(this, atn, decisionsToDFA, sharedContextCache); - this.ruleNames = JSONPathParser.ruleNames; - this.literalNames = JSONPathParser.literalNames; - this.symbolicNames = JSONPathParser.symbolicNames; - } - - sempred(localctx, ruleIndex, predIndex) { - switch(ruleIndex) { - case 1: - return this.filterarg_sempred(localctx, predIndex); - case 12: - return this.expression_sempred(localctx, predIndex); - default: - throw "No predicate with index:" + ruleIndex; - } - } - - filterarg_sempred(localctx, predIndex) { - switch(predIndex) { - case 0: - return this.precpred(this._ctx, 4); - case 1: - return this.precpred(this._ctx, 3); - default: - throw "No predicate with index:" + predIndex; - } - }; - - expression_sempred(localctx, predIndex) { - switch(predIndex) { - case 2: - return this.precpred(this._ctx, 8); - default: - throw "No predicate with index:" + predIndex; - } - }; - - - - - jsonpath() { - let localctx = new JsonpathContext(this, this._ctx, this.state); - this.enterRule(localctx, 0, JSONPathParser.RULE_jsonpath); - var _la = 0; - try { - this.enterOuterAlt(localctx, 1); - this.state = 38; - this.match(JSONPathParser.ROOT_VALUE); - this.state = 40; - this._errHandler.sync(this); - _la = this._input.LA(1); - if((((_la) & ~0x1f) === 0 && ((1 << _la) & 536870932) !== 0)) { - this.state = 39; - this.subscript(); - } - - this.state = 42; - this.match(JSONPathParser.EOF); - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - filterarg(_p) { - if(_p===undefined) { - _p = 0; - } - const _parentctx = this._ctx; - const _parentState = this.state; - let localctx = new FilterargContext(this, this._ctx, _parentState); - let _prevctx = localctx; - const _startState = 2; - this.enterRecursionRule(localctx, 2, JSONPathParser.RULE_filterarg, _p); - var _la = 0; - try { - this.enterOuterAlt(localctx, 1); - this.state = 51; - this._errHandler.sync(this); - switch(this._input.LA(1)) { - case 33: - this.state = 45; - this.match(JSONPathParser.PAREN_LEFT); - this.state = 46; - this.filterarg(0); - this.state = 47; - this.match(JSONPathParser.PAREN_RIGHT); - break; - case 24: - case 25: - case 26: - case 27: - case 29: - case 44: - case 45: - this.state = 49; - this.value(); - break; - case 1: - case 3: - this.state = 50; - this.filterpath(); - break; - default: - throw new antlr4.error.NoViableAltException(this); - } - this._ctx.stop = this._input.LT(-1); - this.state = 63; - this._errHandler.sync(this); - var _alt = this._interp.adaptivePredict(this._input,4,this._ctx) - while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { - if(_alt===1) { - if(this._parseListeners!==null) { - this.triggerExitRuleEvent(); - } - _prevctx = localctx; - this.state = 61; - this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,3,this._ctx); - switch(la_) { - case 1: - localctx = new FilterargContext(this, _parentctx, _parentState); - this.pushNewRecursionContext(localctx, _startState, JSONPathParser.RULE_filterarg); - this.state = 53; - if (!( this.precpred(this._ctx, 4))) { - throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 4)"); - } - this.state = 54; - _la = this._input.LA(1); - if(!(_la===5 || _la===38)) { - this._errHandler.recoverInline(this); - } - else { - this._errHandler.reportMatch(this); - this.consume(); - } - this.state = 55; - this.filterarg(5); - break; - - case 2: - localctx = new FilterargContext(this, _parentctx, _parentState); - this.pushNewRecursionContext(localctx, _startState, JSONPathParser.RULE_filterarg); - this.state = 56; - if (!( this.precpred(this._ctx, 3))) { - throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 3)"); - } - this.state = 58; - this._errHandler.sync(this); - _la = this._input.LA(1); - if(_la===36 || _la===37) { - this.state = 57; - _la = this._input.LA(1); - if(!(_la===36 || _la===37)) { - this._errHandler.recoverInline(this); - } - else { - this._errHandler.reportMatch(this); - this.consume(); - } - } - - this.state = 60; - this.filterarg(4); - break; - - } - } - this.state = 65; - this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input,4,this._ctx); - } - - } catch( error) { - if(error instanceof antlr4.error.RecognitionException) { - localctx.exception = error; - this._errHandler.reportError(this, error); - this._errHandler.recover(this, error); - } else { - throw error; - } - } finally { - this.unrollRecursionContexts(_parentctx) - } - return localctx; - } - - - - subscript() { - let localctx = new SubscriptContext(this, this._ctx, this.state); - this.enterRule(localctx, 4, JSONPathParser.RULE_subscript); - try { - this.state = 80; - this._errHandler.sync(this); - switch(this._input.LA(1)) { - case 2: - this.enterOuterAlt(localctx, 1); - this.state = 66; - this.match(JSONPathParser.DOTDOT); - this.state = 67; - this.dotdotContent(); - this.state = 69; - this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,5,this._ctx); - if(la_===1) { - this.state = 68; - this.subscript(); - - } - break; - case 4: - this.enterOuterAlt(localctx, 2); - this.state = 71; - this.match(JSONPathParser.DOT); - this.state = 72; - this.dotContent(); - this.state = 74; - this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,6,this._ctx); - if(la_===1) { - this.state = 73; - this.subscript(); - - } - break; - case 29: - this.enterOuterAlt(localctx, 3); - this.state = 76; - this.bracket(); - this.state = 78; - this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,7,this._ctx); - if(la_===1) { - this.state = 77; - this.subscript(); - - } - break; - default: - throw new antlr4.error.NoViableAltException(this); - } - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - - dotdotContent() { - let localctx = new DotdotContentContext(this, this._ctx, this.state); - this.enterRule(localctx, 6, JSONPathParser.RULE_dotdotContent); - try { - this.state = 85; - this._errHandler.sync(this); - switch(this._input.LA(1)) { - case 5: - this.enterOuterAlt(localctx, 1); - this.state = 82; - this.match(JSONPathParser.STAR); - break; - case 24: - case 25: - case 26: - case 41: - case 42: - this.enterOuterAlt(localctx, 2); - this.state = 83; - this.identifier(); - break; - case 29: - this.enterOuterAlt(localctx, 3); - this.state = 84; - this.bracket(); - break; - default: - throw new antlr4.error.NoViableAltException(this); - } - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - - dotContent() { - let localctx = new DotContentContext(this, this._ctx, this.state); - this.enterRule(localctx, 8, JSONPathParser.RULE_dotContent); - try { - this.state = 90; - this._errHandler.sync(this); - switch(this._input.LA(1)) { - case 5: - this.enterOuterAlt(localctx, 1); - this.state = 87; - this.match(JSONPathParser.STAR); - break; - case 44: - this.enterOuterAlt(localctx, 2); - this.state = 88; - this.match(JSONPathParser.NUMBER); - break; - case 24: - case 25: - case 26: - case 41: - case 42: - this.enterOuterAlt(localctx, 3); - this.state = 89; - this.identifier(); - break; - default: - throw new antlr4.error.NoViableAltException(this); - } - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - - bracket() { - let localctx = new BracketContext(this, this._ctx, this.state); - this.enterRule(localctx, 10, JSONPathParser.RULE_bracket); - try { - this.enterOuterAlt(localctx, 1); - this.state = 92; - this.match(JSONPathParser.BRACKET_LEFT); - this.state = 93; - this.bracketContent(); - this.state = 94; - this.match(JSONPathParser.BRACKET_RIGHT); - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - - bracketContent() { - let localctx = new BracketContentContext(this, this._ctx, this.state); - this.enterRule(localctx, 12, JSONPathParser.RULE_bracketContent); - try { - this.state = 104; - this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,11,this._ctx); - switch(la_) { - case 1: - this.enterOuterAlt(localctx, 1); - this.state = 96; - this.unions(); - break; - - case 2: - this.enterOuterAlt(localctx, 2); - this.state = 97; - this.indexes(); - break; - - case 3: - this.enterOuterAlt(localctx, 3); - this.state = 98; - this.slices(); - break; - - case 4: - this.enterOuterAlt(localctx, 4); - this.state = 99; - this.match(JSONPathParser.STAR); - break; - - case 5: - this.enterOuterAlt(localctx, 5); - this.state = 100; - this.match(JSONPathParser.NUMBER); - break; - - case 6: - this.enterOuterAlt(localctx, 6); - this.state = 101; - this.match(JSONPathParser.STRING); - break; - - case 7: - this.enterOuterAlt(localctx, 7); - this.state = 102; - this.identifier(); - break; - - case 8: - this.enterOuterAlt(localctx, 8); - this.state = 103; - this.filterExpression(); - break; - - } - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - - filterExpression() { - let localctx = new FilterExpressionContext(this, this._ctx, this.state); - this.enterRule(localctx, 14, JSONPathParser.RULE_filterExpression); - try { - this.enterOuterAlt(localctx, 1); - this.state = 106; - this.match(JSONPathParser.QUESTION); - this.state = 107; - this.match(JSONPathParser.PAREN_LEFT); - this.state = 108; - this.expression(0); - this.state = 109; - this.match(JSONPathParser.PAREN_RIGHT); - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - - indexes() { - let localctx = new IndexesContext(this, this._ctx, this.state); - this.enterRule(localctx, 16, JSONPathParser.RULE_indexes); - var _la = 0; - try { - this.enterOuterAlt(localctx, 1); - this.state = 111; - this.match(JSONPathParser.NUMBER); - this.state = 114; - this._errHandler.sync(this); - _la = this._input.LA(1); - do { - this.state = 112; - this.match(JSONPathParser.COMMA); - this.state = 113; - this.match(JSONPathParser.NUMBER); - this.state = 116; - this._errHandler.sync(this); - _la = this._input.LA(1); - } while(_la===32); - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - - unions() { - let localctx = new UnionsContext(this, this._ctx, this.state); - this.enterRule(localctx, 18, JSONPathParser.RULE_unions); - var _la = 0; - try { - this.state = 132; - this._errHandler.sync(this); - switch(this._input.LA(1)) { - case 45: - this.enterOuterAlt(localctx, 1); - this.state = 118; - this.match(JSONPathParser.STRING); - this.state = 121; - this._errHandler.sync(this); - _la = this._input.LA(1); - do { - this.state = 119; - this.match(JSONPathParser.COMMA); - this.state = 120; - this.match(JSONPathParser.STRING); - this.state = 123; - this._errHandler.sync(this); - _la = this._input.LA(1); - } while(_la===32); - break; - case 24: - case 25: - case 26: - case 41: - case 42: - this.enterOuterAlt(localctx, 2); - this.state = 125; - this.identifier(); - this.state = 128; - this._errHandler.sync(this); - _la = this._input.LA(1); - do { - this.state = 126; - this.match(JSONPathParser.COMMA); - this.state = 127; - this.identifier(); - this.state = 130; - this._errHandler.sync(this); - _la = this._input.LA(1); - } while(_la===32); - break; - default: - throw new antlr4.error.NoViableAltException(this); - } - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - - slices() { - let localctx = new SlicesContext(this, this._ctx, this.state); - this.enterRule(localctx, 20, JSONPathParser.RULE_slices); - var _la = 0; - try { - this.enterOuterAlt(localctx, 1); - this.state = 135; - this._errHandler.sync(this); - _la = this._input.LA(1); - if(_la===44) { - this.state = 134; - this.match(JSONPathParser.NUMBER); - } - - this.state = 137; - this.match(JSONPathParser.COLON); - this.state = 139; - this._errHandler.sync(this); - _la = this._input.LA(1); - if(_la===44) { - this.state = 138; - this.match(JSONPathParser.NUMBER); - } - - this.state = 145; - this._errHandler.sync(this); - _la = this._input.LA(1); - if(_la===31) { - this.state = 141; - this.match(JSONPathParser.COLON); - this.state = 143; - this._errHandler.sync(this); - _la = this._input.LA(1); - if(_la===44) { - this.state = 142; - this.match(JSONPathParser.NUMBER); - } - - } - - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - - regex() { - let localctx = new RegexContext(this, this._ctx, this.state); - this.enterRule(localctx, 22, JSONPathParser.RULE_regex); - try { - this.enterOuterAlt(localctx, 1); - this.state = 147; - this.match(JSONPathParser.REGEX_EXPR); - this.state = 149; - this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,20,this._ctx); - if(la_===1) { - this.state = 148; - this.match(JSONPathParser.REGEX_OPT); - - } - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - expression(_p) { - if(_p===undefined) { - _p = 0; - } - const _parentctx = this._ctx; - const _parentState = this.state; - let localctx = new ExpressionContext(this, this._ctx, _parentState); - let _prevctx = localctx; - const _startState = 24; - this.enterRecursionRule(localctx, 24, JSONPathParser.RULE_expression, _p); - var _la = 0; - try { - this.enterOuterAlt(localctx, 1); - this.state = 176; - this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,21,this._ctx); - switch(la_) { - case 1: - this.state = 152; - this.match(JSONPathParser.NOT); - this.state = 153; - this.match(JSONPathParser.PAREN_LEFT); - this.state = 154; - this.expression(0); - this.state = 155; - this.match(JSONPathParser.PAREN_RIGHT); - break; - - case 2: - this.state = 157; - this.match(JSONPathParser.PAREN_LEFT); - this.state = 158; - this.expression(0); - this.state = 159; - this.match(JSONPathParser.PAREN_RIGHT); - break; - - case 3: - this.state = 161; - this.filterarg(0); - this.state = 162; - _la = this._input.LA(1); - if(!((((_la) & ~0x1f) === 0 && ((1 << _la) & 2088832) !== 0))) { - this._errHandler.recoverInline(this); - } - else { - this._errHandler.reportMatch(this); - this.consume(); - } - this.state = 163; - this.filterarg(0); - break; - - case 4: - this.state = 165; - this.filterarg(0); - this.state = 166; - this.match(JSONPathParser.REG); - this.state = 167; - this.regex(); - break; - - case 5: - this.state = 169; - this.filterarg(0); - this.state = 170; - this.match(JSONPathParser.EMPT); - break; - - case 6: - this.state = 172; - this.filterpath(); - break; - - case 7: - this.state = 173; - this.match(JSONPathParser.TRUE); - break; - - case 8: - this.state = 174; - this.match(JSONPathParser.FALSE); - break; - - case 9: - this.state = 175; - this.match(JSONPathParser.NULL); - break; - - } - this._ctx.stop = this._input.LT(-1); - this.state = 183; - this._errHandler.sync(this); - var _alt = this._interp.adaptivePredict(this._input,22,this._ctx) - while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { - if(_alt===1) { - if(this._parseListeners!==null) { - this.triggerExitRuleEvent(); - } - _prevctx = localctx; - localctx = new ExpressionContext(this, _parentctx, _parentState); - this.pushNewRecursionContext(localctx, _startState, JSONPathParser.RULE_expression); - this.state = 178; - if (!( this.precpred(this._ctx, 8))) { - throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 8)"); - } - this.state = 179; - _la = this._input.LA(1); - if(!(_la===6 || _la===23)) { - this._errHandler.recoverInline(this); - } - else { - this._errHandler.reportMatch(this); - this.consume(); - } - this.state = 180; - this.expression(9); - } - this.state = 185; - this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input,22,this._ctx); - } - - } catch( error) { - if(error instanceof antlr4.error.RecognitionException) { - localctx.exception = error; - this._errHandler.reportError(this, error); - this._errHandler.recover(this, error); - } else { - throw error; - } - } finally { - this.unrollRecursionContexts(_parentctx) - } - return localctx; - } - - - - filterpath() { - let localctx = new FilterpathContext(this, this._ctx, this.state); - this.enterRule(localctx, 26, JSONPathParser.RULE_filterpath); - var _la = 0; - try { - this.enterOuterAlt(localctx, 1); - this.state = 186; - _la = this._input.LA(1); - if(!(_la===1 || _la===3)) { - this._errHandler.recoverInline(this); - } - else { - this._errHandler.reportMatch(this); - this.consume(); - } - this.state = 188; - this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,23,this._ctx); - if(la_===1) { - this.state = 187; - this.subscript(); - - } - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - - identifier() { - let localctx = new IdentifierContext(this, this._ctx, this.state); - this.enterRule(localctx, 28, JSONPathParser.RULE_identifier); - var _la = 0; - try { - this.enterOuterAlt(localctx, 1); - this.state = 190; - _la = this._input.LA(1); - if(!(((((_la - 24)) & ~0x1f) === 0 && ((1 << (_la - 24)) & 393223) !== 0))) { - this._errHandler.recoverInline(this); - } - else { - this._errHandler.reportMatch(this); - this.consume(); - } - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - - obj() { - let localctx = new ObjContext(this, this._ctx, this.state); - this.enterRule(localctx, 30, JSONPathParser.RULE_obj); - var _la = 0; - try { - this.state = 205; - this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,25,this._ctx); - switch(la_) { - case 1: - this.enterOuterAlt(localctx, 1); - this.state = 192; - this.match(JSONPathParser.BRACE_LEFT); - this.state = 193; - this.pair(); - this.state = 198; - this._errHandler.sync(this); - _la = this._input.LA(1); - while(_la===32) { - this.state = 194; - this.match(JSONPathParser.COMMA); - this.state = 195; - this.pair(); - this.state = 200; - this._errHandler.sync(this); - _la = this._input.LA(1); - } - this.state = 201; - this.match(JSONPathParser.BRACE_RIGHT); - break; - - case 2: - this.enterOuterAlt(localctx, 2); - this.state = 203; - this.match(JSONPathParser.BRACE_LEFT); - this.state = 204; - this.match(JSONPathParser.BRACE_RIGHT); - break; - - } - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - - pair() { - let localctx = new PairContext(this, this._ctx, this.state); - this.enterRule(localctx, 32, JSONPathParser.RULE_pair); - try { - this.enterOuterAlt(localctx, 1); - this.state = 207; - this.match(JSONPathParser.STRING); - this.state = 208; - this.match(JSONPathParser.COLON); - this.state = 209; - this.value(); - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - - array() { - let localctx = new ArrayContext(this, this._ctx, this.state); - this.enterRule(localctx, 34, JSONPathParser.RULE_array); - var _la = 0; - try { - this.state = 224; - this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,27,this._ctx); - switch(la_) { - case 1: - this.enterOuterAlt(localctx, 1); - this.state = 211; - this.match(JSONPathParser.BRACKET_LEFT); - this.state = 212; - this.value(); - this.state = 217; - this._errHandler.sync(this); - _la = this._input.LA(1); - while(_la===32) { - this.state = 213; - this.match(JSONPathParser.COMMA); - this.state = 214; - this.value(); - this.state = 219; - this._errHandler.sync(this); - _la = this._input.LA(1); - } - this.state = 220; - this.match(JSONPathParser.BRACKET_RIGHT); - break; - - case 2: - this.enterOuterAlt(localctx, 2); - this.state = 222; - this.match(JSONPathParser.BRACKET_LEFT); - this.state = 223; - this.match(JSONPathParser.BRACKET_RIGHT); - break; - - } - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - - value() { - let localctx = new ValueContext(this, this._ctx, this.state); - this.enterRule(localctx, 36, JSONPathParser.RULE_value); - try { - this.state = 233; - this._errHandler.sync(this); - switch(this._input.LA(1)) { - case 45: - this.enterOuterAlt(localctx, 1); - this.state = 226; - this.match(JSONPathParser.STRING); - break; - case 44: - this.enterOuterAlt(localctx, 2); - this.state = 227; - this.match(JSONPathParser.NUMBER); - break; - case 27: - this.enterOuterAlt(localctx, 3); - this.state = 228; - this.obj(); - break; - case 29: - this.enterOuterAlt(localctx, 4); - this.state = 229; - this.array(); - break; - case 24: - this.enterOuterAlt(localctx, 5); - this.state = 230; - this.match(JSONPathParser.TRUE); - break; - case 25: - this.enterOuterAlt(localctx, 6); - this.state = 231; - this.match(JSONPathParser.FALSE); - break; - case 26: - this.enterOuterAlt(localctx, 7); - this.state = 232; - this.match(JSONPathParser.NULL); - break; - default: - throw new antlr4.error.NoViableAltException(this); - } - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - -} - -JSONPathParser.EOF = antlr4.Token.EOF; -JSONPathParser.CURRENT_VALUE = 1; -JSONPathParser.DOTDOT = 2; -JSONPathParser.ROOT_VALUE = 3; -JSONPathParser.DOT = 4; -JSONPathParser.STAR = 5; -JSONPathParser.AND = 6; -JSONPathParser.EQ = 7; -JSONPathParser.GE = 8; -JSONPathParser.GT = 9; -JSONPathParser.LE = 10; -JSONPathParser.LT = 11; -JSONPathParser.NE = 12; -JSONPathParser.REG = 13; -JSONPathParser.IN = 14; -JSONPathParser.NIN = 15; -JSONPathParser.SUB = 16; -JSONPathParser.ANY = 17; -JSONPathParser.NON = 18; -JSONPathParser.SIZO = 19; -JSONPathParser.SIZ = 20; -JSONPathParser.EMPT = 21; -JSONPathParser.NOT = 22; -JSONPathParser.OR = 23; -JSONPathParser.TRUE = 24; -JSONPathParser.FALSE = 25; -JSONPathParser.NULL = 26; -JSONPathParser.BRACE_LEFT = 27; -JSONPathParser.BRACE_RIGHT = 28; -JSONPathParser.BRACKET_LEFT = 29; -JSONPathParser.BRACKET_RIGHT = 30; -JSONPathParser.COLON = 31; -JSONPathParser.COMMA = 32; -JSONPathParser.PAREN_LEFT = 33; -JSONPathParser.PAREN_RIGHT = 34; -JSONPathParser.QUESTION = 35; -JSONPathParser.MINUS_SP = 36; -JSONPathParser.PLUS = 37; -JSONPathParser.DIV = 38; -JSONPathParser.REGEX_OPT = 39; -JSONPathParser.REGEX_EXPR = 40; -JSONPathParser.KEY = 41; -JSONPathParser.SPECIAL_KEY = 42; -JSONPathParser.WS = 43; -JSONPathParser.NUMBER = 44; -JSONPathParser.STRING = 45; - -JSONPathParser.RULE_jsonpath = 0; -JSONPathParser.RULE_filterarg = 1; -JSONPathParser.RULE_subscript = 2; -JSONPathParser.RULE_dotdotContent = 3; -JSONPathParser.RULE_dotContent = 4; -JSONPathParser.RULE_bracket = 5; -JSONPathParser.RULE_bracketContent = 6; -JSONPathParser.RULE_filterExpression = 7; -JSONPathParser.RULE_indexes = 8; -JSONPathParser.RULE_unions = 9; -JSONPathParser.RULE_slices = 10; -JSONPathParser.RULE_regex = 11; -JSONPathParser.RULE_expression = 12; -JSONPathParser.RULE_filterpath = 13; -JSONPathParser.RULE_identifier = 14; -JSONPathParser.RULE_obj = 15; -JSONPathParser.RULE_pair = 16; -JSONPathParser.RULE_array = 17; -JSONPathParser.RULE_value = 18; - -class JsonpathContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_jsonpath; - } - - ROOT_VALUE() { - return this.getToken(JSONPathParser.ROOT_VALUE, 0); - }; - - EOF() { - return this.getToken(JSONPathParser.EOF, 0); - }; - - subscript() { - return this.getTypedRuleContext(SubscriptContext,0); - }; - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterJsonpath(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitJsonpath(this); - } - } - - -} - - - -class FilterargContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_filterarg; - } - - PAREN_LEFT() { - return this.getToken(JSONPathParser.PAREN_LEFT, 0); - }; - - filterarg = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(FilterargContext); - } else { - return this.getTypedRuleContext(FilterargContext,i); - } - }; - - PAREN_RIGHT() { - return this.getToken(JSONPathParser.PAREN_RIGHT, 0); - }; - - value() { - return this.getTypedRuleContext(ValueContext,0); - }; - - filterpath() { - return this.getTypedRuleContext(FilterpathContext,0); - }; - - STAR() { - return this.getToken(JSONPathParser.STAR, 0); - }; - - DIV() { - return this.getToken(JSONPathParser.DIV, 0); - }; - - PLUS() { - return this.getToken(JSONPathParser.PLUS, 0); - }; - - MINUS_SP() { - return this.getToken(JSONPathParser.MINUS_SP, 0); - }; - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterFilterarg(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitFilterarg(this); - } - } - - -} - - - -class SubscriptContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_subscript; - } - - DOTDOT() { - return this.getToken(JSONPathParser.DOTDOT, 0); - }; - - dotdotContent() { - return this.getTypedRuleContext(DotdotContentContext,0); - }; - - subscript() { - return this.getTypedRuleContext(SubscriptContext,0); - }; - - DOT() { - return this.getToken(JSONPathParser.DOT, 0); - }; - - dotContent() { - return this.getTypedRuleContext(DotContentContext,0); - }; - - bracket() { - return this.getTypedRuleContext(BracketContext,0); - }; - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterSubscript(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitSubscript(this); - } - } - - -} - - - -class DotdotContentContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_dotdotContent; - } - - STAR() { - return this.getToken(JSONPathParser.STAR, 0); - }; - - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); - }; - - bracket() { - return this.getTypedRuleContext(BracketContext,0); - }; - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterDotdotContent(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitDotdotContent(this); - } - } - - -} - - - -class DotContentContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_dotContent; - } - - STAR() { - return this.getToken(JSONPathParser.STAR, 0); - }; - - NUMBER() { - return this.getToken(JSONPathParser.NUMBER, 0); - }; - - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); - }; - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterDotContent(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitDotContent(this); - } - } - - -} - - - -class BracketContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_bracket; - } - - BRACKET_LEFT() { - return this.getToken(JSONPathParser.BRACKET_LEFT, 0); - }; - - bracketContent() { - return this.getTypedRuleContext(BracketContentContext,0); - }; - - BRACKET_RIGHT() { - return this.getToken(JSONPathParser.BRACKET_RIGHT, 0); - }; - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterBracket(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitBracket(this); - } - } - - -} - - - -class BracketContentContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_bracketContent; - } - - unions() { - return this.getTypedRuleContext(UnionsContext,0); - }; - - indexes() { - return this.getTypedRuleContext(IndexesContext,0); - }; - - slices() { - return this.getTypedRuleContext(SlicesContext,0); - }; - - STAR() { - return this.getToken(JSONPathParser.STAR, 0); - }; - - NUMBER() { - return this.getToken(JSONPathParser.NUMBER, 0); - }; - - STRING() { - return this.getToken(JSONPathParser.STRING, 0); - }; - - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); - }; - - filterExpression() { - return this.getTypedRuleContext(FilterExpressionContext,0); - }; - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterBracketContent(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitBracketContent(this); - } - } - - -} - - - -class FilterExpressionContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_filterExpression; - } - - QUESTION() { - return this.getToken(JSONPathParser.QUESTION, 0); - }; - - PAREN_LEFT() { - return this.getToken(JSONPathParser.PAREN_LEFT, 0); - }; - - expression() { - return this.getTypedRuleContext(ExpressionContext,0); - }; - - PAREN_RIGHT() { - return this.getToken(JSONPathParser.PAREN_RIGHT, 0); - }; - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterFilterExpression(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitFilterExpression(this); - } - } - - -} - - - -class IndexesContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_indexes; - } - - NUMBER = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTokens(JSONPathParser.NUMBER); - } else { - return this.getToken(JSONPathParser.NUMBER, i); - } - }; - - - COMMA = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTokens(JSONPathParser.COMMA); - } else { - return this.getToken(JSONPathParser.COMMA, i); - } - }; - - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterIndexes(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitIndexes(this); - } - } - - -} - - - -class UnionsContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_unions; - } - - STRING = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTokens(JSONPathParser.STRING); - } else { - return this.getToken(JSONPathParser.STRING, i); - } - }; - - - COMMA = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTokens(JSONPathParser.COMMA); - } else { - return this.getToken(JSONPathParser.COMMA, i); - } - }; - - - identifier = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(IdentifierContext); - } else { - return this.getTypedRuleContext(IdentifierContext,i); - } - }; - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterUnions(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitUnions(this); - } - } - - -} - - - -class SlicesContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_slices; - } - - COLON = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTokens(JSONPathParser.COLON); - } else { - return this.getToken(JSONPathParser.COLON, i); - } - }; - - - NUMBER = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTokens(JSONPathParser.NUMBER); - } else { - return this.getToken(JSONPathParser.NUMBER, i); - } - }; - - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterSlices(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitSlices(this); - } - } - - -} - - - -class RegexContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_regex; - } - - REGEX_EXPR() { - return this.getToken(JSONPathParser.REGEX_EXPR, 0); - }; - - REGEX_OPT() { - return this.getToken(JSONPathParser.REGEX_OPT, 0); - }; - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterRegex(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitRegex(this); - } - } - - -} - - - -class ExpressionContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_expression; - } - - NOT() { - return this.getToken(JSONPathParser.NOT, 0); - }; - - PAREN_LEFT() { - return this.getToken(JSONPathParser.PAREN_LEFT, 0); - }; - - expression = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(ExpressionContext); - } else { - return this.getTypedRuleContext(ExpressionContext,i); - } - }; - - PAREN_RIGHT() { - return this.getToken(JSONPathParser.PAREN_RIGHT, 0); - }; - - filterarg = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(FilterargContext); - } else { - return this.getTypedRuleContext(FilterargContext,i); - } - }; - - EQ() { - return this.getToken(JSONPathParser.EQ, 0); - }; - - NE() { - return this.getToken(JSONPathParser.NE, 0); - }; - - LT() { - return this.getToken(JSONPathParser.LT, 0); - }; - - LE() { - return this.getToken(JSONPathParser.LE, 0); - }; - - GT() { - return this.getToken(JSONPathParser.GT, 0); - }; - - GE() { - return this.getToken(JSONPathParser.GE, 0); - }; - - IN() { - return this.getToken(JSONPathParser.IN, 0); - }; - - NIN() { - return this.getToken(JSONPathParser.NIN, 0); - }; - - SUB() { - return this.getToken(JSONPathParser.SUB, 0); - }; - - ANY() { - return this.getToken(JSONPathParser.ANY, 0); - }; - - SIZO() { - return this.getToken(JSONPathParser.SIZO, 0); - }; - - NON() { - return this.getToken(JSONPathParser.NON, 0); - }; - - SIZ() { - return this.getToken(JSONPathParser.SIZ, 0); - }; - - REG() { - return this.getToken(JSONPathParser.REG, 0); - }; - - regex() { - return this.getTypedRuleContext(RegexContext,0); - }; - - EMPT() { - return this.getToken(JSONPathParser.EMPT, 0); - }; - - filterpath() { - return this.getTypedRuleContext(FilterpathContext,0); - }; - - TRUE() { - return this.getToken(JSONPathParser.TRUE, 0); - }; - - FALSE() { - return this.getToken(JSONPathParser.FALSE, 0); - }; - - NULL() { - return this.getToken(JSONPathParser.NULL, 0); - }; - - AND() { - return this.getToken(JSONPathParser.AND, 0); - }; - - OR() { - return this.getToken(JSONPathParser.OR, 0); - }; - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterExpression(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitExpression(this); - } - } - - -} - - - -class FilterpathContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_filterpath; - } - - ROOT_VALUE() { - return this.getToken(JSONPathParser.ROOT_VALUE, 0); - }; - - CURRENT_VALUE() { - return this.getToken(JSONPathParser.CURRENT_VALUE, 0); - }; - - subscript() { - return this.getTypedRuleContext(SubscriptContext,0); - }; - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterFilterpath(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitFilterpath(this); - } - } - - -} - - - -class IdentifierContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_identifier; - } - - KEY() { - return this.getToken(JSONPathParser.KEY, 0); - }; - - SPECIAL_KEY() { - return this.getToken(JSONPathParser.SPECIAL_KEY, 0); - }; - - TRUE() { - return this.getToken(JSONPathParser.TRUE, 0); - }; - - FALSE() { - return this.getToken(JSONPathParser.FALSE, 0); - }; - - NULL() { - return this.getToken(JSONPathParser.NULL, 0); - }; - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterIdentifier(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitIdentifier(this); - } - } - - -} - - - -class ObjContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_obj; - } - - BRACE_LEFT() { - return this.getToken(JSONPathParser.BRACE_LEFT, 0); - }; - - pair = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(PairContext); - } else { - return this.getTypedRuleContext(PairContext,i); - } - }; - - BRACE_RIGHT() { - return this.getToken(JSONPathParser.BRACE_RIGHT, 0); - }; - - COMMA = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTokens(JSONPathParser.COMMA); - } else { - return this.getToken(JSONPathParser.COMMA, i); - } - }; - - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterObj(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitObj(this); - } - } - - -} - - - -class PairContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_pair; - } - - STRING() { - return this.getToken(JSONPathParser.STRING, 0); - }; - - COLON() { - return this.getToken(JSONPathParser.COLON, 0); - }; - - value() { - return this.getTypedRuleContext(ValueContext,0); - }; - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterPair(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitPair(this); - } - } - - -} - - - -class ArrayContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_array; - } - - BRACKET_LEFT() { - return this.getToken(JSONPathParser.BRACKET_LEFT, 0); - }; - - value = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(ValueContext); - } else { - return this.getTypedRuleContext(ValueContext,i); - } - }; - - BRACKET_RIGHT() { - return this.getToken(JSONPathParser.BRACKET_RIGHT, 0); - }; - - COMMA = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTokens(JSONPathParser.COMMA); - } else { - return this.getToken(JSONPathParser.COMMA, i); - } - }; - - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterArray(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitArray(this); - } - } - - -} - - - -class ValueContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = JSONPathParser.RULE_value; - } - - STRING() { - return this.getToken(JSONPathParser.STRING, 0); - }; - - NUMBER() { - return this.getToken(JSONPathParser.NUMBER, 0); - }; - - obj() { - return this.getTypedRuleContext(ObjContext,0); - }; - - array() { - return this.getTypedRuleContext(ArrayContext,0); - }; - - TRUE() { - return this.getToken(JSONPathParser.TRUE, 0); - }; - - FALSE() { - return this.getToken(JSONPathParser.FALSE, 0); - }; - - NULL() { - return this.getToken(JSONPathParser.NULL, 0); - }; - - enterRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.enterValue(this); - } - } - - exitRule(listener) { - if(listener instanceof JSONPathListener ) { - listener.exitValue(this); - } - } - - -} - - - - -JSONPathParser.JsonpathContext = JsonpathContext; -JSONPathParser.FilterargContext = FilterargContext; -JSONPathParser.SubscriptContext = SubscriptContext; -JSONPathParser.DotdotContentContext = DotdotContentContext; -JSONPathParser.DotContentContext = DotContentContext; -JSONPathParser.BracketContext = BracketContext; -JSONPathParser.BracketContentContext = BracketContentContext; -JSONPathParser.FilterExpressionContext = FilterExpressionContext; -JSONPathParser.IndexesContext = IndexesContext; -JSONPathParser.UnionsContext = UnionsContext; -JSONPathParser.SlicesContext = SlicesContext; -JSONPathParser.RegexContext = RegexContext; -JSONPathParser.ExpressionContext = ExpressionContext; -JSONPathParser.FilterpathContext = FilterpathContext; -JSONPathParser.IdentifierContext = IdentifierContext; -JSONPathParser.ObjContext = ObjContext; -JSONPathParser.PairContext = PairContext; -JSONPathParser.ArrayContext = ArrayContext; -JSONPathParser.ValueContext = ValueContext; diff --git a/src/parser/generated/parser.js b/src/parser/generated/parser.js new file mode 100644 index 0000000..57ebe08 --- /dev/null +++ b/src/parser/generated/parser.js @@ -0,0 +1,3990 @@ +// @generated by Peggy 5.0.6. +// +// https://peggyjs.org/ + + + + // Helper to build a linked list of subscripts + function buildSubscriptChain(segments) { + if (!segments || segments.length === 0) return null; + + let result = null; + for (let i = segments.length - 1; i >= 0; i--) { + result = { + type: 'subscript', + value: segments[i], + next: result + }; + } + return result; + } + + // Helper to build left-associative binary expressions + function buildBinaryExpr(head, tail, makeNode) { + return tail.reduce((left, item) => makeNode(left, item), head); + } + +class peg$SyntaxError extends SyntaxError { + constructor(message, expected, found, location) { + super(message); + this.expected = expected; + this.found = found; + this.location = location; + this.name = "SyntaxError"; + } + + format(sources) { + let str = "Error: " + this.message; + if (this.location) { + let src = null; + const st = sources.find(s => s.source === this.location.source); + if (st) { + src = st.text.split(/\r\n|\n|\r/g); + } + const s = this.location.start; + const offset_s = (this.location.source && (typeof this.location.source.offset === "function")) + ? this.location.source.offset(s) + : s; + const loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column; + if (src) { + const e = this.location.end; + const filler = "".padEnd(offset_s.line.toString().length, " "); + const line = src[s.line - 1]; + const last = s.line === e.line ? e.column : line.length + 1; + const hatLen = (last - s.column) || 1; + str += "\n --> " + loc + "\n" + + filler + " |\n" + + offset_s.line + " | " + line + "\n" + + filler + " | " + "".padEnd(s.column - 1, " ") + + "".padEnd(hatLen, "^"); + } else { + str += "\n at " + loc; + } + } + return str; + } + + static buildMessage(expected, found) { + function hex(ch) { + return ch.codePointAt(0).toString(16).toUpperCase(); + } + + const nonPrintable = Object.prototype.hasOwnProperty.call(RegExp.prototype, "unicode") + ? new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]", "gu") + : null; + function unicodeEscape(s) { + if (nonPrintable) { + return s.replace(nonPrintable, ch => "\\u{" + hex(ch) + "}"); + } + return s; + } + + function literalEscape(s) { + return unicodeEscape(s + .replace(/\\/g, "\\\\") + .replace(/"/g, "\\\"") + .replace(/\0/g, "\\0") + .replace(/\t/g, "\\t") + .replace(/\n/g, "\\n") + .replace(/\r/g, "\\r") + .replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch)) + .replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch))); + } + + function classEscape(s) { + return unicodeEscape(s + .replace(/\\/g, "\\\\") + .replace(/\]/g, "\\]") + .replace(/\^/g, "\\^") + .replace(/-/g, "\\-") + .replace(/\0/g, "\\0") + .replace(/\t/g, "\\t") + .replace(/\n/g, "\\n") + .replace(/\r/g, "\\r") + .replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch)) + .replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch))); + } + + const DESCRIBE_EXPECTATION_FNS = { + literal(expectation) { + return "\"" + literalEscape(expectation.text) + "\""; + }, + + class(expectation) { + const escapedParts = expectation.parts.map( + part => (Array.isArray(part) + ? classEscape(part[0]) + "-" + classEscape(part[1]) + : classEscape(part)) + ); + + return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]" + (expectation.unicode ? "u" : ""); + }, + + any() { + return "any character"; + }, + + end() { + return "end of input"; + }, + + other(expectation) { + return expectation.description; + }, + }; + + function describeExpectation(expectation) { + return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); + } + + function describeExpected(expected) { + const descriptions = expected.map(describeExpectation); + descriptions.sort(); + + if (descriptions.length > 0) { + let j = 1; + for (let i = 1; i < descriptions.length; i++) { + if (descriptions[i - 1] !== descriptions[i]) { + descriptions[j] = descriptions[i]; + j++; + } + } + descriptions.length = j; + } + + switch (descriptions.length) { + case 1: + return descriptions[0]; + + case 2: + return descriptions[0] + " or " + descriptions[1]; + + default: + return descriptions.slice(0, -1).join(", ") + + ", or " + + descriptions[descriptions.length - 1]; + } + } + + function describeFound(found) { + return found ? "\"" + literalEscape(found) + "\"" : "end of input"; + } + + return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; + } +} + +function peg$parse(input, options) { + options = options !== undefined ? options : {}; + + const peg$FAILED = {}; + const peg$source = options.grammarSource; + + const peg$startRuleFunctions = { + jsonpath: peg$parsejsonpath, + }; + let peg$startRuleFunction = peg$parsejsonpath; + + const peg$c0 = "length"; + const peg$c1 = "count"; + const peg$c2 = "match"; + const peg$c3 = "search"; + const peg$c4 = "value"; + const peg$c5 = "$"; + const peg$c6 = "@"; + const peg$c7 = ".."; + const peg$c8 = "."; + const peg$c9 = "*"; + const peg$c10 = "&&"; + const peg$c11 = "||"; + const peg$c12 = "!"; + const peg$c13 = "=="; + const peg$c14 = "!="; + const peg$c15 = ">="; + const peg$c16 = ">"; + const peg$c17 = "<="; + const peg$c18 = "<"; + const peg$c19 = "=~"; + const peg$c20 = "in"; + const peg$c21 = "nin"; + const peg$c22 = "subsetof"; + const peg$c23 = "anyof"; + const peg$c24 = "noneof"; + const peg$c25 = "sizeof"; + const peg$c26 = "size"; + const peg$c27 = "empty"; + const peg$c28 = "true"; + const peg$c29 = "false"; + const peg$c30 = "null"; + const peg$c31 = "{"; + const peg$c32 = "}"; + const peg$c33 = "["; + const peg$c34 = "]"; + const peg$c35 = ":"; + const peg$c36 = ","; + const peg$c37 = "("; + const peg$c38 = ")"; + const peg$c39 = "?"; + const peg$c40 = "/"; + const peg$c41 = "\\"; + const peg$c42 = "-"; + const peg$c43 = "\""; + const peg$c44 = "'"; + const peg$c45 = "b"; + const peg$c46 = "f"; + const peg$c47 = "n"; + const peg$c48 = "r"; + const peg$c49 = "t"; + const peg$c50 = "u"; + + const peg$r0 = /^[+\-]/; + const peg$r1 = /^[*\/]/; + const peg$r2 = /^[^\/\\]/; + const peg$r3 = /^[gimsuy]/; + const peg$r4 = /^[a-zA-Z_]/; + const peg$r5 = /^[a-zA-Z0-9_]/; + const peg$r6 = /^[0-9@$\-]/; + const peg$r7 = /^[\x80-\uFFFF_]/; + const peg$r8 = /^[0-9]/; + const peg$r9 = /^[eE]/; + const peg$r10 = /^["\\]/; + const peg$r11 = /^['\\]/; + const peg$r12 = /^[0-9a-fA-F]/; + const peg$r13 = /^[ \t\n\r]/; + + const peg$e0 = peg$literalExpectation("length", true); + const peg$e1 = peg$literalExpectation("count", true); + const peg$e2 = peg$literalExpectation("match", true); + const peg$e3 = peg$literalExpectation("search", true); + const peg$e4 = peg$literalExpectation("value", true); + const peg$e5 = peg$classExpectation(["+", "-"], false, false, false); + const peg$e6 = peg$classExpectation(["*", "/"], false, false, false); + const peg$e7 = peg$otherExpectation("string"); + const peg$e8 = peg$literalExpectation("$", false); + const peg$e9 = peg$literalExpectation("@", false); + const peg$e10 = peg$literalExpectation("..", false); + const peg$e11 = peg$literalExpectation(".", false); + const peg$e12 = peg$literalExpectation("*", false); + const peg$e13 = peg$literalExpectation("&&", false); + const peg$e14 = peg$literalExpectation("||", false); + const peg$e15 = peg$literalExpectation("!", false); + const peg$e16 = peg$literalExpectation("==", false); + const peg$e17 = peg$literalExpectation("!=", false); + const peg$e18 = peg$literalExpectation(">=", false); + const peg$e19 = peg$literalExpectation(">", false); + const peg$e20 = peg$literalExpectation("<=", false); + const peg$e21 = peg$literalExpectation("<", false); + const peg$e22 = peg$literalExpectation("=~", false); + const peg$e23 = peg$literalExpectation("in", false); + const peg$e24 = peg$literalExpectation("nin", false); + const peg$e25 = peg$literalExpectation("subsetof", false); + const peg$e26 = peg$literalExpectation("anyof", false); + const peg$e27 = peg$literalExpectation("noneof", false); + const peg$e28 = peg$literalExpectation("sizeof", false); + const peg$e29 = peg$literalExpectation("size", false); + const peg$e30 = peg$literalExpectation("empty", false); + const peg$e31 = peg$literalExpectation("true", false); + const peg$e32 = peg$literalExpectation("false", false); + const peg$e33 = peg$literalExpectation("null", false); + const peg$e34 = peg$literalExpectation("{", false); + const peg$e35 = peg$literalExpectation("}", false); + const peg$e36 = peg$literalExpectation("[", false); + const peg$e37 = peg$literalExpectation("]", false); + const peg$e38 = peg$literalExpectation(":", false); + const peg$e39 = peg$literalExpectation(",", false); + const peg$e40 = peg$literalExpectation("(", false); + const peg$e41 = peg$literalExpectation(")", false); + const peg$e42 = peg$literalExpectation("?", false); + const peg$e43 = peg$otherExpectation("regex"); + const peg$e44 = peg$literalExpectation("/", false); + const peg$e45 = peg$classExpectation(["/", "\\"], true, false, false); + const peg$e46 = peg$literalExpectation("\\", false); + const peg$e47 = peg$anyExpectation(); + const peg$e48 = peg$classExpectation(["g", "i", "m", "s", "u", "y"], false, false, false); + const peg$e49 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false, false); + const peg$e50 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_"], false, false, false); + const peg$e51 = peg$literalExpectation("-", false); + const peg$e52 = peg$classExpectation([["0", "9"], "@", "$", "-"], false, false, false); + const peg$e53 = peg$classExpectation([["\x80", "\uFFFF"], "_"], false, false, false); + const peg$e54 = peg$otherExpectation("number"); + const peg$e55 = peg$classExpectation([["0", "9"]], false, false, false); + const peg$e56 = peg$classExpectation(["e", "E"], false, false, false); + const peg$e57 = peg$literalExpectation("\"", false); + const peg$e58 = peg$literalExpectation("'", false); + const peg$e59 = peg$classExpectation(["\"", "\\"], false, false, false); + const peg$e60 = peg$classExpectation(["'", "\\"], false, false, false); + const peg$e61 = peg$literalExpectation("b", false); + const peg$e62 = peg$literalExpectation("f", false); + const peg$e63 = peg$literalExpectation("n", false); + const peg$e64 = peg$literalExpectation("r", false); + const peg$e65 = peg$literalExpectation("t", false); + const peg$e66 = peg$literalExpectation("u", false); + const peg$e67 = peg$classExpectation([["0", "9"], ["a", "f"], ["A", "F"]], false, false, false); + const peg$e68 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false, false); + + function peg$f0(segments) { + return { + type: 'root', + next: buildSubscriptChain(segments) + }; + } + function peg$f1(content) { return { type: 'dot', value: content }; } + function peg$f2(bracket) { return bracket; } + function peg$f3(content) { return { type: 'dotdot', value: content }; } + function peg$f4() { return { type: 'wildcard' }; } + function peg$f5(n) { return { type: 'numericLiteral', value: n }; } + function peg$f6(id) { return { type: 'identifier', value: id }; } + function peg$f7() { return { type: 'wildcard' }; } + function peg$f8(id) { return { type: 'identifier', value: id }; } + function peg$f9(bracket) { return bracket; } + function peg$f10(content) { return content; } + function peg$f11() { return { type: 'bracketExpression', value: { type: 'wildcard' } }; } + function peg$f12(n) { return { type: 'bracketMember', value: { type: 'numericLiteral', value: n } }; } + function peg$f13(s) { return { type: 'bracketMember', value: { type: 'stringLiteral', value: s } }; } + function peg$f14(id) { return { type: 'bracketMember', value: { type: 'identifier', value: id } }; } + function peg$f15(expr) { + return { type: 'bracketExpression', value: { type: 'filterExpression', value: expr } }; + } + function peg$f16(expr) { + // RFC 9535 style without parens + return { type: 'bracketExpression', value: { type: 'filterExpression', value: expr } }; + } + function peg$f17(head, tail) { + return buildBinaryExpr(head, tail, (left, item) => ({ + type: 'logicalExpression', + operator: 'or', + left: left, + right: item[3] + })); + } + function peg$f18(head, tail) { + return buildBinaryExpr(head, tail, (left, item) => ({ + type: 'logicalExpression', + operator: 'and', + left: left, + right: item[3] + })); + } + function peg$f19(expr) { + return { type: 'notExpression', value: expr }; + } + function peg$f20(expr) { + return { type: 'notExpression', value: expr }; + } + function peg$f21(left, op, right) { + return { type: 'comparator', operator: op, left: left, right: right }; + } + function peg$f22(left, regex) { + return { type: 'comparator', operator: 'reg', left: left, right: regex }; + } + function peg$f23(left) { + return { type: 'comparator', operator: 'empty', left: left, right: null }; + } + function peg$f24() { return 'eq'; } + function peg$f25() { return 'ne'; } + function peg$f26() { return 'le'; } + function peg$f27() { return 'lt'; } + function peg$f28() { return 'ge'; } + function peg$f29() { return 'gt'; } + function peg$f30() { return 'in'; } + function peg$f31() { return 'nin'; } + function peg$f32() { return 'subsetof'; } + function peg$f33() { return 'anyof'; } + function peg$f34() { return 'noneof'; } + function peg$f35() { return 'sizeof'; } + function peg$f36() { return 'size'; } + function peg$f37(expr) { + return { type: 'groupExpression', value: expr }; + } + function peg$f38() { return { type: 'value', value: true, subtype: 'boolean' }; } + function peg$f39() { return { type: 'value', value: false, subtype: 'boolean' }; } + function peg$f40() { return { type: 'value', value: null, subtype: 'null' }; } + function peg$f41(name, args) { + return { type: 'functionCall', name: name, args: args || [] }; + } + function peg$f42() { return 'length'; } + function peg$f43() { return 'count'; } + function peg$f44() { return 'match'; } + function peg$f45() { return 'search'; } + function peg$f46() { return 'value'; } + function peg$f47(head, tail) { + return [head, ...tail.map(t => t[3])]; + } + function peg$f48(head, tail) { + if (tail.length === 0) return head; + return buildBinaryExpr(head, tail, (left, item) => ({ + type: 'operation', + operator: item[1] === '+' ? 'plus' : 'minus', + left: left, + right: item[3] + })); + } + function peg$f49(head, tail) { + if (tail.length === 0) return head; + return buildBinaryExpr(head, tail, (left, item) => ({ + type: 'operation', + operator: item[1] === '*' ? 'multi' : 'div', + left: left, + right: item[3] + })); + } + function peg$f50(arg) { + return { type: 'groupOperation', value: arg }; + } + function peg$f51(segments) { + return { + type: 'root', + next: buildSubscriptChain(segments) + }; + } + function peg$f52(segments) { + return { + type: 'current', + next: buildSubscriptChain(segments) + }; + } + function peg$f53(start, end, step) { + return { + type: 'bracketExpression', + value: { + type: 'slices', + start: start !== null ? start : null, + end: end !== null ? end : null, + step: step ? (step[1] !== null ? step[1] : null) : null + } + }; + } + function peg$f54(head, tail) { + const values = [head, ...tail.map(t => t[3])]; + return { type: 'bracketExpression', value: { type: 'unions', values: values } }; + } + function peg$f55() { return { type: 'wildcard' }; } + function peg$f56(n) { return { type: 'numericLiteral', value: n }; } + function peg$f57(s) { return { type: 'stringLiteral', value: s }; } + function peg$f58(id) { return { type: 'identifier', value: id }; } + function peg$f59(expr, opts) { + return { type: 'value', subtype: 'regex', value: expr, opts: opts || '' }; + } + function peg$f60(s) { return { type: 'value', subtype: 'string', value: s }; } + function peg$f61(n) { return { type: 'value', subtype: 'number', value: n }; } + function peg$f62() { return { type: 'value', value: true, subtype: 'boolean' }; } + function peg$f63() { return { type: 'value', value: false, subtype: 'boolean' }; } + function peg$f64() { return { type: 'value', value: null, subtype: 'null' }; } + function peg$f65(s) { return s; } + function peg$f66(pairs) { + const obj = {}; + if (pairs) { + for (const [key, val] of pairs) { + obj[key] = val; + } + } + return { type: 'value', subtype: 'object', value: obj }; + } + function peg$f67(head, tail) { + return [head, ...tail.map(t => t[3])]; + } + function peg$f68(key, val) { + return [key, val.value]; + } + function peg$f69(items) { + return { type: 'value', subtype: 'array', value: items || [] }; + } + function peg$f70(head, tail) { + return [head.value, ...tail.map(t => t[3].value)]; + } + function peg$f71(chars) { return chars; } + function peg$f72(chars) { return chars; } + function peg$f73() { return 'true'; } + function peg$f74() { return 'false'; } + function peg$f75() { return 'null'; } + function peg$f76(chars) { return "/" + chars.map(c => Array.isArray(c) ? c.join('') : c).join('') + "/"; } + function peg$f77(opts) { return opts.join(''); } + function peg$f78(first, rest) { return first + rest.join(''); } + function peg$f79() { return "-"; } + function peg$f80(chars) { return chars.join(''); } + function peg$f81(frac, exp) { + const num = parseFloat(text()); + // RFC 9535: Integer literals (no decimal, no exponent) must be within I-JSON range + if (!frac && !exp && (num < -9007199254740991 || num > 9007199254740991)) { + error('Integer out of I-JSON range [-(2^53)+1, (2^53)-1]'); + } + return num; + } + function peg$f82(chars) { return chars.join(''); } + function peg$f83(chars) { return chars.join(''); } + function peg$f84(char) { return char; } + function peg$f85(seq) { return seq; } + function peg$f86(char) { return char; } + function peg$f87(seq) { return seq; } + function peg$f88() { return '"'; } + function peg$f89() { return "'"; } + function peg$f90() { return "\\"; } + function peg$f91() { return "/"; } + function peg$f92() { return "\b"; } + function peg$f93() { return "\f"; } + function peg$f94() { return "\n"; } + function peg$f95() { return "\r"; } + function peg$f96() { return "\t"; } + function peg$f97(digits) { return String.fromCharCode(parseInt(digits, 16)); } + let peg$currPos = options.peg$currPos | 0; + let peg$savedPos = peg$currPos; + const peg$posDetailsCache = [{ line: 1, column: 1 }]; + let peg$maxFailPos = peg$currPos; + let peg$maxFailExpected = options.peg$maxFailExpected || []; + let peg$silentFails = options.peg$silentFails | 0; + + let peg$result; + + if (options.startRule) { + if (!(options.startRule in peg$startRuleFunctions)) { + throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); + } + + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + + function text() { + return input.substring(peg$savedPos, peg$currPos); + } + + function offset() { + return peg$savedPos; + } + + function range() { + return { + source: peg$source, + start: peg$savedPos, + end: peg$currPos, + }; + } + + function location() { + return peg$computeLocation(peg$savedPos, peg$currPos); + } + + function expected(description, location) { + location = location !== undefined + ? location + : peg$computeLocation(peg$savedPos, peg$currPos); + + throw peg$buildStructuredError( + [peg$otherExpectation(description)], + input.substring(peg$savedPos, peg$currPos), + location + ); + } + + function error(message, location) { + location = location !== undefined + ? location + : peg$computeLocation(peg$savedPos, peg$currPos); + + throw peg$buildSimpleError(message, location); + } + + function peg$getUnicode(pos = peg$currPos) { + const cp = input.codePointAt(pos); + if (cp === undefined) { + return ""; + } + return String.fromCodePoint(cp); + } + + function peg$literalExpectation(text, ignoreCase) { + return { type: "literal", text, ignoreCase }; + } + + function peg$classExpectation(parts, inverted, ignoreCase, unicode) { + return { type: "class", parts, inverted, ignoreCase, unicode }; + } + + function peg$anyExpectation() { + return { type: "any" }; + } + + function peg$endExpectation() { + return { type: "end" }; + } + + function peg$otherExpectation(description) { + return { type: "other", description }; + } + + function peg$computePosDetails(pos) { + let details = peg$posDetailsCache[pos]; + let p; + + if (details) { + return details; + } else { + if (pos >= peg$posDetailsCache.length) { + p = peg$posDetailsCache.length - 1; + } else { + p = pos; + while (!peg$posDetailsCache[--p]) {} + } + + details = peg$posDetailsCache[p]; + details = { + line: details.line, + column: details.column, + }; + + while (p < pos) { + if (input.charCodeAt(p) === 10) { + details.line++; + details.column = 1; + } else { + details.column++; + } + + p++; + } + + peg$posDetailsCache[pos] = details; + + return details; + } + } + + function peg$computeLocation(startPos, endPos, offset) { + const startPosDetails = peg$computePosDetails(startPos); + const endPosDetails = peg$computePosDetails(endPos); + + const res = { + source: peg$source, + start: { + offset: startPos, + line: startPosDetails.line, + column: startPosDetails.column, + }, + end: { + offset: endPos, + line: endPosDetails.line, + column: endPosDetails.column, + }, + }; + if (offset && peg$source && (typeof peg$source.offset === "function")) { + res.start = peg$source.offset(res.start); + res.end = peg$source.offset(res.end); + } + return res; + } + + function peg$fail(expected) { + if (peg$currPos < peg$maxFailPos) { return; } + + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + + peg$maxFailExpected.push(expected); + } + + function peg$buildSimpleError(message, location) { + return new peg$SyntaxError(message, null, null, location); + } + + function peg$buildStructuredError(expected, found, location) { + return new peg$SyntaxError( + peg$SyntaxError.buildMessage(expected, found), + expected, + found, + location + ); + } + + function peg$parsejsonpath() { + let s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parse_(); + s2 = peg$parseROOT_VALUE(); + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parsesegment(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parsesegment(); + } + s4 = peg$parse_(); + s5 = peg$parseEOF(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f0(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsesegment() { + let s0; + + s0 = peg$parsedescendantSegment(); + if (s0 === peg$FAILED) { + s0 = peg$parsechildSegment(); + } + + return s0; + } + + function peg$parsechildSegment() { + let s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$parseDOT(); + if (s1 !== peg$FAILED) { + s2 = peg$parsedotContent(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f1(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsebracket(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f2(s1); + } + s0 = s1; + } + + return s0; + } + + function peg$parsedescendantSegment() { + let s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$parseDOTDOT(); + if (s1 !== peg$FAILED) { + s2 = peg$parsedotdotContent(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f3(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsedotContent() { + let s0, s1; + + s0 = peg$currPos; + s1 = peg$parseSTAR(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f4(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseNUMBER(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f5(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseidentifier(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f6(s1); + } + s0 = s1; + } + } + + return s0; + } + + function peg$parsedotdotContent() { + let s0, s1; + + s0 = peg$currPos; + s1 = peg$parseSTAR(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f7(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseidentifier(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f8(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsebracket(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f9(s1); + } + s0 = s1; + } + } + + return s0; + } + + function peg$parsebracket() { + let s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parseBRACKET_LEFT(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + s3 = peg$parsebracketContent(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + s5 = peg$parseBRACKET_RIGHT(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f10(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsebracketContent() { + let s0, s1; + + s0 = peg$parsefilterExpression(); + if (s0 === peg$FAILED) { + s0 = peg$parseslices(); + if (s0 === peg$FAILED) { + s0 = peg$parseselectorList(); + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSTAR(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f11(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseNUMBER(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f12(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSTRING(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f13(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseidentifier(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f14(s1); + } + s0 = s1; + } + } + } + } + } + } + + return s0; + } + + function peg$parsefilterExpression() { + let s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parseQUESTION(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + s3 = peg$parsePAREN_LEFT(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + s5 = peg$parseorExpression(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parsePAREN_RIGHT(); + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f15(s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseQUESTION(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + s3 = peg$parseorExpression(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f16(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parseorExpression() { + let s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parseandExpression(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse_(); + s5 = peg$parseOR(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parseandExpression(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse_(); + s5 = peg$parseOR(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parseandExpression(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f17(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseandExpression() { + let s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parsenotExpression(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse_(); + s5 = peg$parseAND(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parsenotExpression(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse_(); + s5 = peg$parseAND(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parsenotExpression(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f18(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsenotExpression() { + let s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parseNOT(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + s3 = peg$parsePAREN_LEFT(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + s5 = peg$parseorExpression(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parsePAREN_RIGHT(); + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f19(s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseNOT(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + s3 = peg$parseprimaryExpression(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f20(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$parsecomparisonExpression(); + } + } + + return s0; + } + + function peg$parsecomparisonExpression() { + let s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parsefilterarg(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + s3 = peg$parsecomparisonOperator(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + s5 = peg$parsefilterarg(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f21(s1, s3, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsefilterarg(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + s3 = peg$parseREG(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + s5 = peg$parseregex(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f22(s1, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsefilterarg(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + s3 = peg$parseEMPT(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f23(s1); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$parseprimaryExpression(); + } + } + } + + return s0; + } + + function peg$parsecomparisonOperator() { + let s0, s1; + + s0 = peg$currPos; + s1 = peg$parseEQ(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f24(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseNE(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f25(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseLE(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f26(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseLT(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f27(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseGE(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f28(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseGT(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f29(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseIN(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f30(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseNIN(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f31(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSUB(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f32(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseANY(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f33(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseNON(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f34(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSIZO(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f35(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSIZ(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f36(); + } + s0 = s1; + } + } + } + } + } + } + } + } + } + } + } + } + + return s0; + } + + function peg$parseprimaryExpression() { + let s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parsePAREN_LEFT(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + s3 = peg$parseorExpression(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + s5 = peg$parsePAREN_RIGHT(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f37(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$parsefunctionCall(); + if (s0 === peg$FAILED) { + s0 = peg$parsefilterpath(); + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseTRUE(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f38(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseFALSE(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f39(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseNULL(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f40(); + } + s0 = s1; + } + } + } + } + } + + return s0; + } + + function peg$parsefunctionCall() { + let s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parsefunctionName(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + s3 = peg$parsePAREN_LEFT(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + s5 = peg$parsefunctionArgs(); + if (s5 === peg$FAILED) { + s5 = null; + } + s6 = peg$parse_(); + s7 = peg$parsePAREN_RIGHT(); + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f41(s1, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsefunctionName() { + let s0, s1; + + s0 = peg$currPos; + s1 = input.substr(peg$currPos, 6); + if (s1.toLowerCase() === peg$c0) { + peg$currPos += (6); + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e0); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f42(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = input.substr(peg$currPos, 5); + if (s1.toLowerCase() === peg$c1) { + peg$currPos += (5); + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e1); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f43(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = input.substr(peg$currPos, 5); + if (s1.toLowerCase() === peg$c2) { + peg$currPos += (5); + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e2); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f44(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = input.substr(peg$currPos, 6); + if (s1.toLowerCase() === peg$c3) { + peg$currPos += (6); + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e3); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f45(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = input.substr(peg$currPos, 5); + if (s1.toLowerCase() === peg$c4) { + peg$currPos += (5); + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e4); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f46(); + } + s0 = s1; + } + } + } + } + + return s0; + } + + function peg$parsefunctionArgs() { + let s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parsefunctionArg(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse_(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parsefunctionArg(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse_(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parsefunctionArg(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f47(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsefunctionArg() { + let s0; + + s0 = peg$parsefilterarg(); + if (s0 === peg$FAILED) { + s0 = peg$parsestringLiteral(); + } + + return s0; + } + + function peg$parsefilterarg() { + let s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parsefilterargMulti(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse_(); + s5 = input.charAt(peg$currPos); + if (peg$r0.test(s5)) { + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e5); } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parsefilterargMulti(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse_(); + s5 = input.charAt(peg$currPos); + if (peg$r0.test(s5)) { + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e5); } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parsefilterargMulti(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f48(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsefilterargMulti() { + let s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parsefilterargUnary(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse_(); + s5 = input.charAt(peg$currPos); + if (peg$r1.test(s5)) { + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e6); } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parsefilterargUnary(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse_(); + s5 = input.charAt(peg$currPos); + if (peg$r1.test(s5)) { + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e6); } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parsefilterargUnary(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f49(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsefilterargUnary() { + let s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parsePAREN_LEFT(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + s3 = peg$parsefilterarg(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + s5 = peg$parsePAREN_RIGHT(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f50(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$parsefunctionCall(); + if (s0 === peg$FAILED) { + s0 = peg$parsevalue(); + if (s0 === peg$FAILED) { + s0 = peg$parsefilterpath(); + } + } + } + + return s0; + } + + function peg$parsefilterpath() { + let s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parseROOT_VALUE(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parsesegment(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parsesegment(); + } + peg$savedPos = s0; + s0 = peg$f51(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseCURRENT_VALUE(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parsesegment(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parsesegment(); + } + peg$savedPos = s0; + s0 = peg$f52(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parseslices() { + let s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + s1 = peg$parseNUMBER(); + if (s1 === peg$FAILED) { + s1 = null; + } + s2 = peg$parseCOLON(); + if (s2 !== peg$FAILED) { + s3 = peg$parseNUMBER(); + if (s3 === peg$FAILED) { + s3 = null; + } + s4 = peg$currPos; + s5 = peg$parseCOLON(); + if (s5 !== peg$FAILED) { + s6 = peg$parseNUMBER(); + if (s6 === peg$FAILED) { + s6 = null; + } + s5 = [s5, s6]; + s4 = s5; + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + if (s4 === peg$FAILED) { + s4 = null; + } + peg$savedPos = s0; + s0 = peg$f53(s1, s3, s4); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseselectorList() { + let s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parseselector(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse_(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parseselector(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse_(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parseselector(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f54(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseselector() { + let s0, s1; + + s0 = peg$currPos; + s1 = peg$parseSTAR(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f55(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseNUMBER(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f56(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSTRING(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f57(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseidentifier(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f58(s1); + } + s0 = s1; + } + } + } + + return s0; + } + + function peg$parseregex() { + let s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$parseREGEX_EXPR(); + if (s1 !== peg$FAILED) { + s2 = peg$parseREGEX_OPT(); + peg$savedPos = s0; + s0 = peg$f59(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsevalue() { + let s0, s1; + + s0 = peg$currPos; + s1 = peg$parsestringLiteral(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f60(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseNUMBER(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f61(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$parseobj(); + if (s0 === peg$FAILED) { + s0 = peg$parsearray(); + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseTRUE(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f62(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseFALSE(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f63(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseNULL(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f64(); + } + s0 = s1; + } + } + } + } + } + } + + return s0; + } + + function peg$parsestringLiteral() { + let s0, s1; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseSTRING(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f65(s1); + } + s0 = s1; + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e7); } + } + + return s0; + } + + function peg$parseobj() { + let s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parseBRACE_LEFT(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + s3 = peg$parsepairList(); + if (s3 === peg$FAILED) { + s3 = null; + } + s4 = peg$parse_(); + s5 = peg$parseBRACE_RIGHT(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f66(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsepairList() { + let s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parsepair(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse_(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parsepair(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse_(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parsepair(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f67(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsepair() { + let s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parseSTRING(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + s3 = peg$parseCOLON(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + s5 = peg$parsevalue(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f68(s1, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsearray() { + let s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parseBRACKET_LEFT(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + s3 = peg$parsevalueList(); + if (s3 === peg$FAILED) { + s3 = null; + } + s4 = peg$parse_(); + s5 = peg$parseBRACKET_RIGHT(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f69(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsevalueList() { + let s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parsevalue(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse_(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parsevalue(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse_(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + s7 = peg$parsevalue(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f70(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseidentifier() { + let s0, s1; + + s0 = peg$currPos; + s1 = peg$parseKEY(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f71(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSPECIAL_KEY(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f72(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseTRUE(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f73(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseFALSE(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f74(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseNULL(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f75(); + } + s0 = s1; + } + } + } + } + + return s0; + } + + function peg$parseROOT_VALUE() { + let s0; + + if (input.charCodeAt(peg$currPos) === 36) { + s0 = peg$c5; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e8); } + } + + return s0; + } + + function peg$parseCURRENT_VALUE() { + let s0; + + if (input.charCodeAt(peg$currPos) === 64) { + s0 = peg$c6; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e9); } + } + + return s0; + } + + function peg$parseDOTDOT() { + let s0; + + if (input.substr(peg$currPos, 2) === peg$c7) { + s0 = peg$c7; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e10); } + } + + return s0; + } + + function peg$parseDOT() { + let s0; + + if (input.charCodeAt(peg$currPos) === 46) { + s0 = peg$c8; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e11); } + } + + return s0; + } + + function peg$parseSTAR() { + let s0; + + if (input.charCodeAt(peg$currPos) === 42) { + s0 = peg$c9; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e12); } + } + + return s0; + } + + function peg$parseAND() { + let s0; + + if (input.substr(peg$currPos, 2) === peg$c10) { + s0 = peg$c10; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e13); } + } + + return s0; + } + + function peg$parseOR() { + let s0; + + if (input.substr(peg$currPos, 2) === peg$c11) { + s0 = peg$c11; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e14); } + } + + return s0; + } + + function peg$parseNOT() { + let s0; + + if (input.charCodeAt(peg$currPos) === 33) { + s0 = peg$c12; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e15); } + } + + return s0; + } + + function peg$parseEQ() { + let s0; + + if (input.substr(peg$currPos, 2) === peg$c13) { + s0 = peg$c13; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e16); } + } + + return s0; + } + + function peg$parseNE() { + let s0; + + if (input.substr(peg$currPos, 2) === peg$c14) { + s0 = peg$c14; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e17); } + } + + return s0; + } + + function peg$parseGE() { + let s0; + + if (input.substr(peg$currPos, 2) === peg$c15) { + s0 = peg$c15; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e18); } + } + + return s0; + } + + function peg$parseGT() { + let s0; + + if (input.charCodeAt(peg$currPos) === 62) { + s0 = peg$c16; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e19); } + } + + return s0; + } + + function peg$parseLE() { + let s0; + + if (input.substr(peg$currPos, 2) === peg$c17) { + s0 = peg$c17; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e20); } + } + + return s0; + } + + function peg$parseLT() { + let s0; + + if (input.charCodeAt(peg$currPos) === 60) { + s0 = peg$c18; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e21); } + } + + return s0; + } + + function peg$parseREG() { + let s0; + + if (input.substr(peg$currPos, 2) === peg$c19) { + s0 = peg$c19; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e22); } + } + + return s0; + } + + function peg$parseIN() { + let s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c20) { + s1 = peg$c20; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e23); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseidentifierChar(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseNIN() { + let s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 3) === peg$c21) { + s1 = peg$c21; + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e24); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseidentifierChar(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseSUB() { + let s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 8) === peg$c22) { + s1 = peg$c22; + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e25); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseidentifierChar(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseANY() { + let s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5) === peg$c23) { + s1 = peg$c23; + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e26); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseidentifierChar(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseNON() { + let s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c24) { + s1 = peg$c24; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e27); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseidentifierChar(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseSIZO() { + let s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c25) { + s1 = peg$c25; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e28); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseidentifierChar(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseSIZ() { + let s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4) === peg$c26) { + s1 = peg$c26; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e29); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseidentifierChar(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseEMPT() { + let s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5) === peg$c27) { + s1 = peg$c27; + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e30); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseidentifierChar(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseTRUE() { + let s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4) === peg$c28) { + s1 = peg$c28; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e31); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseidentifierChar(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseFALSE() { + let s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5) === peg$c29) { + s1 = peg$c29; + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e32); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseidentifierChar(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseNULL() { + let s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4) === peg$c30) { + s1 = peg$c30; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e33); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseidentifierChar(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseBRACE_LEFT() { + let s0; + + if (input.charCodeAt(peg$currPos) === 123) { + s0 = peg$c31; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e34); } + } + + return s0; + } + + function peg$parseBRACE_RIGHT() { + let s0; + + if (input.charCodeAt(peg$currPos) === 125) { + s0 = peg$c32; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e35); } + } + + return s0; + } + + function peg$parseBRACKET_LEFT() { + let s0; + + if (input.charCodeAt(peg$currPos) === 91) { + s0 = peg$c33; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e36); } + } + + return s0; + } + + function peg$parseBRACKET_RIGHT() { + let s0; + + if (input.charCodeAt(peg$currPos) === 93) { + s0 = peg$c34; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e37); } + } + + return s0; + } + + function peg$parseCOLON() { + let s0; + + if (input.charCodeAt(peg$currPos) === 58) { + s0 = peg$c35; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e38); } + } + + return s0; + } + + function peg$parseCOMMA() { + let s0; + + if (input.charCodeAt(peg$currPos) === 44) { + s0 = peg$c36; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e39); } + } + + return s0; + } + + function peg$parsePAREN_LEFT() { + let s0; + + if (input.charCodeAt(peg$currPos) === 40) { + s0 = peg$c37; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e40); } + } + + return s0; + } + + function peg$parsePAREN_RIGHT() { + let s0; + + if (input.charCodeAt(peg$currPos) === 41) { + s0 = peg$c38; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e41); } + } + + return s0; + } + + function peg$parseQUESTION() { + let s0; + + if (input.charCodeAt(peg$currPos) === 63) { + s0 = peg$c39; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e42); } + } + + return s0; + } + + function peg$parseREGEX_EXPR() { + let s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 47) { + s1 = peg$c40; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e44); } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = input.charAt(peg$currPos); + if (peg$r2.test(s3)) { + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e45); } + } + if (s3 === peg$FAILED) { + s3 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s4 = peg$c41; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e46); } + } + if (s4 !== peg$FAILED) { + if (input.length > peg$currPos) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e47); } + } + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = input.charAt(peg$currPos); + if (peg$r2.test(s3)) { + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e45); } + } + if (s3 === peg$FAILED) { + s3 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s4 = peg$c41; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e46); } + } + if (s4 !== peg$FAILED) { + if (input.length > peg$currPos) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e47); } + } + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + } + if (input.charCodeAt(peg$currPos) === 47) { + s3 = peg$c40; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e44); } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f76(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e43); } + } + + return s0; + } + + function peg$parseREGEX_OPT() { + let s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = input.charAt(peg$currPos); + if (peg$r3.test(s2)) { + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e48); } + } + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = input.charAt(peg$currPos); + if (peg$r3.test(s2)) { + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e48); } + } + } + peg$savedPos = s0; + s1 = peg$f77(s1); + s0 = s1; + + return s0; + } + + function peg$parseKEY() { + let s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = input.charAt(peg$currPos); + if (peg$r4.test(s1)) { + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e49); } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parsekeyChar(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parsekeyChar(); + } + peg$savedPos = s0; + s0 = peg$f78(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsekeyChar() { + let s0, s1, s2, s3; + + s0 = input.charAt(peg$currPos); + if (peg$r5.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e50); } + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 45) { + s1 = peg$c42; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e51); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = input.charAt(peg$currPos); + if (peg$r6.test(s3)) { + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e52); } + } + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f79(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parseSPECIAL_KEY() { + let s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = input.charAt(peg$currPos); + if (peg$r7.test(s2)) { + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e53); } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = input.charAt(peg$currPos); + if (peg$r7.test(s2)) { + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e53); } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f80(s1); + } + s0 = s1; + + return s0; + } + + function peg$parseNUMBER() { + let s0, s1, s2, s3, s4, s5, s6; + + peg$silentFails++; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 45) { + s1 = peg$c42; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e51); } + } + if (s1 === peg$FAILED) { + s1 = null; + } + s2 = peg$parseINT(); + if (s2 !== peg$FAILED) { + s3 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 46) { + s4 = peg$c8; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e11); } + } + if (s4 !== peg$FAILED) { + s5 = []; + s6 = input.charAt(peg$currPos); + if (peg$r8.test(s6)) { + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e55); } + } + if (s6 !== peg$FAILED) { + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = input.charAt(peg$currPos); + if (peg$r8.test(s6)) { + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e55); } + } + } + } else { + s5 = peg$FAILED; + } + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 === peg$FAILED) { + s3 = null; + } + s4 = peg$parseEXP(); + if (s4 === peg$FAILED) { + s4 = null; + } + peg$savedPos = s0; + s0 = peg$f81(s3, s4); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e54); } + } + + return s0; + } + + function peg$parseINT() { + let s0, s1; + + s0 = []; + s1 = input.charAt(peg$currPos); + if (peg$r8.test(s1)) { + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e55); } + } + if (s1 !== peg$FAILED) { + while (s1 !== peg$FAILED) { + s0.push(s1); + s1 = input.charAt(peg$currPos); + if (peg$r8.test(s1)) { + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e55); } + } + } + } else { + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseEXP() { + let s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = input.charAt(peg$currPos); + if (peg$r9.test(s1)) { + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e56); } + } + if (s1 !== peg$FAILED) { + s2 = input.charAt(peg$currPos); + if (peg$r0.test(s2)) { + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e5); } + } + if (s2 === peg$FAILED) { + s2 = null; + } + s3 = []; + s4 = input.charAt(peg$currPos); + if (peg$r8.test(s4)) { + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e55); } + } + if (s4 !== peg$FAILED) { + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = input.charAt(peg$currPos); + if (peg$r8.test(s4)) { + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e55); } + } + } + } else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseSTRING() { + let s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 34) { + s1 = peg$c43; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e57); } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parsedoubleStringChar(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parsedoubleStringChar(); + } + if (input.charCodeAt(peg$currPos) === 34) { + s3 = peg$c43; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e57); } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f82(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 39) { + s1 = peg$c44; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e58); } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parsesingleStringChar(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parsesingleStringChar(); + } + if (input.charCodeAt(peg$currPos) === 39) { + s3 = peg$c44; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e58); } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f83(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e7); } + } + + return s0; + } + + function peg$parsedoubleStringChar() { + let s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = input.charAt(peg$currPos); + if (peg$r10.test(s2)) { + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e59); } + } + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = undefined; + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + if (input.length > peg$currPos) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e47); } + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f84(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s1 = peg$c41; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e46); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseescapeSequence(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f85(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parsesingleStringChar() { + let s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = input.charAt(peg$currPos); + if (peg$r11.test(s2)) { + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e60); } + } + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = undefined; + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + if (input.length > peg$currPos) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e47); } + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f86(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s1 = peg$c41; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e46); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseescapeSequence(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f87(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parseescapeSequence() { + let s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 34) { + s1 = peg$c43; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e57); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f88(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 39) { + s1 = peg$c44; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e58); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f89(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s1 = peg$c41; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e46); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f90(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 47) { + s1 = peg$c40; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e44); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f91(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 98) { + s1 = peg$c45; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e61); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f92(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 102) { + s1 = peg$c46; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e62); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f93(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 110) { + s1 = peg$c47; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e63); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f94(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 114) { + s1 = peg$c48; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e64); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f95(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 116) { + s1 = peg$c49; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e65); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f96(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 117) { + s1 = peg$c50; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e66); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + s3 = peg$currPos; + s4 = peg$parseHEX(); + if (s4 !== peg$FAILED) { + s5 = peg$parseHEX(); + if (s5 !== peg$FAILED) { + s6 = peg$parseHEX(); + if (s6 !== peg$FAILED) { + s7 = peg$parseHEX(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + s2 = input.substring(s2, peg$currPos); + } else { + s2 = s3; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f97(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + } + } + } + } + } + } + + return s0; + } + + function peg$parseHEX() { + let s0; + + s0 = input.charAt(peg$currPos); + if (peg$r12.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e67); } + } + + return s0; + } + + function peg$parseidentifierChar() { + let s0; + + s0 = input.charAt(peg$currPos); + if (peg$r5.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e50); } + } + + return s0; + } + + function peg$parse_() { + let s0, s1; + + peg$silentFails++; + s0 = []; + s1 = input.charAt(peg$currPos); + if (peg$r13.test(s1)) { + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e68); } + } + while (s1 !== peg$FAILED) { + s0.push(s1); + s1 = input.charAt(peg$currPos); + if (peg$r13.test(s1)) { + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e68); } + } + } + peg$silentFails--; + + return s0; + } + + function peg$parseEOF() { + let s0, s1; + + s0 = peg$currPos; + peg$silentFails++; + if (input.length > peg$currPos) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e47); } + } + peg$silentFails--; + if (s1 === peg$FAILED) { + s0 = undefined; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + peg$result = peg$startRuleFunction(); + + const peg$success = (peg$result !== peg$FAILED && peg$currPos === input.length); + function peg$throw() { + if (peg$result !== peg$FAILED && peg$currPos < input.length) { + peg$fail(peg$endExpectation()); + } + + throw peg$buildStructuredError( + peg$maxFailExpected, + peg$maxFailPos < input.length ? peg$getUnicode(peg$maxFailPos) : null, + peg$maxFailPos < input.length + ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) + : peg$computeLocation(peg$maxFailPos, peg$maxFailPos) + ); + } + if (options.peg$library) { + return /** @type {any} */ ({ + peg$result, + peg$currPos, + peg$FAILED, + peg$maxFailExpected, + peg$maxFailPos, + peg$success, + peg$throw: peg$success ? undefined : peg$throw, + }); + } + if (peg$success) { + return peg$result; + } else { + peg$throw(); + } +} + +const peg$allowedStartRules = [ + "jsonpath" +]; + +export { + peg$allowedStartRules as StartRules, + peg$SyntaxError as SyntaxError, + peg$parse as parse +}; diff --git a/src/parser/jsonpath.peggy b/src/parser/jsonpath.peggy new file mode 100644 index 0000000..751a157 --- /dev/null +++ b/src/parser/jsonpath.peggy @@ -0,0 +1,462 @@ +// JSONPath Grammar for Peggy +// RFC 9535 compliant with backwards-compatible extensions + +{{ + // Helper to build a linked list of subscripts + function buildSubscriptChain(segments) { + if (!segments || segments.length === 0) return null; + + let result = null; + for (let i = segments.length - 1; i >= 0; i--) { + result = { + type: 'subscript', + value: segments[i], + next: result + }; + } + return result; + } + + // Helper to build left-associative binary expressions + function buildBinaryExpr(head, tail, makeNode) { + return tail.reduce((left, item) => makeNode(left, item), head); + } +}} + +// =================== +// Entry Point +// =================== + +jsonpath + = _ ROOT_VALUE segments:segment* _ EOF { + return { + type: 'root', + next: buildSubscriptChain(segments) + }; + } + +// =================== +// Segments +// =================== + +segment + = descendantSegment + / childSegment + +childSegment + = DOT content:dotContent { return { type: 'dot', value: content }; } + / bracket:bracket { return bracket; } + +descendantSegment + = DOTDOT content:dotdotContent { return { type: 'dotdot', value: content }; } + +// =================== +// Dot Notation Content +// =================== + +dotContent + = STAR { return { type: 'wildcard' }; } + / n:NUMBER { return { type: 'numericLiteral', value: n }; } + / id:identifier { return { type: 'identifier', value: id }; } + +dotdotContent + = STAR { return { type: 'wildcard' }; } + / id:identifier { return { type: 'identifier', value: id }; } + / bracket:bracket { return bracket; } + +// =================== +// Bracket Notation +// =================== + +bracket + = BRACKET_LEFT _ content:bracketContent _ BRACKET_RIGHT { return content; } + +bracketContent + = filterExpression + / slices + / selectorList + / STAR { return { type: 'bracketExpression', value: { type: 'wildcard' } }; } + / n:NUMBER { return { type: 'bracketMember', value: { type: 'numericLiteral', value: n } }; } + / s:STRING { return { type: 'bracketMember', value: { type: 'stringLiteral', value: s } }; } + / id:identifier { return { type: 'bracketMember', value: { type: 'identifier', value: id } }; } + +// =================== +// Filter Expression +// =================== + +filterExpression + = QUESTION _ PAREN_LEFT _ expr:expression _ PAREN_RIGHT { + return { type: 'bracketExpression', value: { type: 'filterExpression', value: expr } }; + } + / QUESTION _ expr:filterExprContent { + // RFC 9535 style without parens + return { type: 'bracketExpression', value: { type: 'filterExpression', value: expr } }; + } + +filterExprContent + = orExpression + +// =================== +// Logical Expressions (for filters) +// =================== + +expression + = orExpression + +orExpression + = head:andExpression tail:(_ OR _ andExpression)* { + return buildBinaryExpr(head, tail, (left, item) => ({ + type: 'logicalExpression', + operator: 'or', + left: left, + right: item[3] + })); + } + +andExpression + = head:notExpression tail:(_ AND _ notExpression)* { + return buildBinaryExpr(head, tail, (left, item) => ({ + type: 'logicalExpression', + operator: 'and', + left: left, + right: item[3] + })); + } + +notExpression + = NOT _ PAREN_LEFT _ expr:expression _ PAREN_RIGHT { + return { type: 'notExpression', value: expr }; + } + / NOT _ expr:primaryExpression { + return { type: 'notExpression', value: expr }; + } + / comparisonExpression + +comparisonExpression + = left:filterarg _ op:comparisonOperator _ right:filterarg { + return { type: 'comparator', operator: op, left: left, right: right }; + } + / left:filterarg _ REG _ regex:regex { + return { type: 'comparator', operator: 'reg', left: left, right: regex }; + } + / left:filterarg _ EMPT { + return { type: 'comparator', operator: 'empty', left: left, right: null }; + } + / primaryExpression + +comparisonOperator + = EQ { return 'eq'; } + / NE { return 'ne'; } + / LE { return 'le'; } + / LT { return 'lt'; } + / GE { return 'ge'; } + / GT { return 'gt'; } + / IN { return 'in'; } + / NIN { return 'nin'; } + / SUB { return 'subsetof'; } + / ANY { return 'anyof'; } + / NON { return 'noneof'; } + / SIZO { return 'sizeof'; } + / SIZ { return 'size'; } + +primaryExpression + = PAREN_LEFT _ expr:expression _ PAREN_RIGHT { + return { type: 'groupExpression', value: expr }; + } + / functionCall + / filterpath + / TRUE { return { type: 'value', value: true, subtype: 'boolean' }; } + / FALSE { return { type: 'value', value: false, subtype: 'boolean' }; } + / NULL { return { type: 'value', value: null, subtype: 'null' }; } + +// =================== +// RFC 9535 Functions +// =================== + +functionCall + = name:functionName _ PAREN_LEFT _ args:functionArgs? _ PAREN_RIGHT { + return { type: 'functionCall', name: name, args: args || [] }; + } + +functionName + = "length"i { return 'length'; } + / "count"i { return 'count'; } + / "match"i { return 'match'; } + / "search"i { return 'search'; } + / "value"i { return 'value'; } + +functionArgs + = head:functionArg tail:(_ COMMA _ functionArg)* { + return [head, ...tail.map(t => t[3])]; + } + +functionArg + = filterarg + / stringLiteral + +// =================== +// Filter Arguments (operands) +// =================== + +filterarg + = head:filterargMulti tail:(_ (PLUS / MINUS) _ filterargMulti)* { + if (tail.length === 0) return head; + return buildBinaryExpr(head, tail, (left, item) => ({ + type: 'operation', + operator: item[1] === '+' ? 'plus' : 'minus', + left: left, + right: item[3] + })); + } + +filterargMulti + = head:filterargUnary tail:(_ (STAR / DIV) _ filterargUnary)* { + if (tail.length === 0) return head; + return buildBinaryExpr(head, tail, (left, item) => ({ + type: 'operation', + operator: item[1] === '*' ? 'multi' : 'div', + left: left, + right: item[3] + })); + } + +filterargUnary + = PAREN_LEFT _ arg:filterarg _ PAREN_RIGHT { + return { type: 'groupOperation', value: arg }; + } + / functionCall + / value + / filterpath + +// =================== +// Filter Path (@ or $ with optional subscripts) +// =================== + +filterpath + = ROOT_VALUE segments:segment* { + return { + type: 'root', + next: buildSubscriptChain(segments) + }; + } + / CURRENT_VALUE segments:segment* { + return { + type: 'current', + next: buildSubscriptChain(segments) + }; + } + +// =================== +// Slices and Selector Lists +// =================== + +slices + = start:NUMBER? COLON end:NUMBER? step:(COLON NUMBER?)? { + return { + type: 'bracketExpression', + value: { + type: 'slices', + start: start !== null ? start : null, + end: end !== null ? end : null, + step: step ? (step[1] !== null ? step[1] : null) : null + } + }; + } + +// RFC 9535: Selector list allows mixed types (strings, numbers, wildcards) +selectorList + = head:selector tail:(_ COMMA _ selector)+ { + const values = [head, ...tail.map(t => t[3])]; + return { type: 'bracketExpression', value: { type: 'unions', values: values } }; + } + +selector + = STAR { return { type: 'wildcard' }; } + / n:NUMBER { return { type: 'numericLiteral', value: n }; } + / s:STRING { return { type: 'stringLiteral', value: s }; } + / id:identifier { return { type: 'identifier', value: id }; } + +// =================== +// Regex +// =================== + +regex + = expr:REGEX_EXPR opts:REGEX_OPT? { + return { type: 'value', subtype: 'regex', value: expr, opts: opts || '' }; + } + +// =================== +// Values +// =================== + +value + = s:stringLiteral { return { type: 'value', subtype: 'string', value: s }; } + / n:NUMBER { return { type: 'value', subtype: 'number', value: n }; } + / obj + / array + / TRUE { return { type: 'value', value: true, subtype: 'boolean' }; } + / FALSE { return { type: 'value', value: false, subtype: 'boolean' }; } + / NULL { return { type: 'value', value: null, subtype: 'null' }; } + +stringLiteral "string" + = s:STRING { return s; } + +obj + = BRACE_LEFT _ pairs:pairList? _ BRACE_RIGHT { + const obj = {}; + if (pairs) { + for (const [key, val] of pairs) { + obj[key] = val; + } + } + return { type: 'value', subtype: 'object', value: obj }; + } + +pairList + = head:pair tail:(_ COMMA _ pair)* { + return [head, ...tail.map(t => t[3])]; + } + +pair + = key:STRING _ COLON _ val:value { + return [key, val.value]; + } + +array + = BRACKET_LEFT _ items:valueList? _ BRACKET_RIGHT { + return { type: 'value', subtype: 'array', value: items || [] }; + } + +valueList + = head:value tail:(_ COMMA _ value)* { + return [head.value, ...tail.map(t => t[3].value)]; + } + +// =================== +// Identifier +// =================== + +identifier + = chars:KEY { return chars; } + / chars:SPECIAL_KEY { return chars; } + / TRUE { return 'true'; } + / FALSE { return 'false'; } + / NULL { return 'null'; } + +// =================== +// Tokens +// =================== + +ROOT_VALUE = "$" +CURRENT_VALUE = "@" +DOTDOT = ".." +DOT = "." +STAR = "*" + +AND = "&&" +OR = "||" +NOT = "!" + +EQ = "==" +NE = "!=" +GE = ">=" +GT = ">" +LE = "<=" +LT = "<" +REG = "=~" + +// Extension operators (keywords, whitespace handled by grammar) +IN = "in" !identifierChar +NIN = "nin" !identifierChar +SUB = "subsetof" !identifierChar +ANY = "anyof" !identifierChar +NON = "noneof" !identifierChar +SIZO = "sizeof" !identifierChar +SIZ = "size" !identifierChar +EMPT = "empty" !identifierChar + +TRUE = "true" !identifierChar +FALSE = "false" !identifierChar +NULL = "null" !identifierChar + +BRACE_LEFT = "{" +BRACE_RIGHT = "}" +BRACKET_LEFT = "[" +BRACKET_RIGHT = "]" +COLON = ":" +COMMA = "," +PAREN_LEFT = "(" +PAREN_RIGHT = ")" +QUESTION = "?" + +PLUS = "+" +MINUS = "-" +DIV = "/" + +REGEX_EXPR "regex" + = "/" chars:([^/\\] / "\\" .)* "/" { return "/" + chars.map(c => Array.isArray(c) ? c.join('') : c).join('') + "/"; } + +REGEX_OPT + = opts:[gimsuy]* { return opts.join(''); } + +KEY + = first:[a-zA-Z_] rest:keyChar* { return first + rest.join(''); } + +keyChar + = [a-zA-Z0-9_] + / "-" !([0-9@$\-]) { return "-"; } + +SPECIAL_KEY + = chars:[\u0080-\uFFFF_]+ { return chars.join(''); } + +NUMBER "number" + = "-"? INT frac:("." [0-9]+)? exp:EXP? { + const num = parseFloat(text()); + // RFC 9535: Integer literals (no decimal, no exponent) must be within I-JSON range + if (!frac && !exp && (num < -9007199254740991 || num > 9007199254740991)) { + error('Integer out of I-JSON range [-(2^53)+1, (2^53)-1]'); + } + return num; + } + +INT + = [0-9]+ + +EXP + = [eE] [+-]? [0-9]+ + +STRING "string" + = '"' chars:doubleStringChar* '"' { return chars.join(''); } + / "'" chars:singleStringChar* "'" { return chars.join(''); } + +doubleStringChar + = !["\\] char:. { return char; } + / "\\" seq:escapeSequence { return seq; } + +singleStringChar + = !['\\] char:. { return char; } + / "\\" seq:escapeSequence { return seq; } + +escapeSequence + = '"' { return '"'; } + / "'" { return "'"; } + / "\\" { return "\\"; } + / "/" { return "/"; } + / "b" { return "\b"; } + / "f" { return "\f"; } + / "n" { return "\n"; } + / "r" { return "\r"; } + / "t" { return "\t"; } + / "u" digits:$(HEX HEX HEX HEX) { return String.fromCharCode(parseInt(digits, 16)); } + +HEX + = [0-9a-fA-F] + +identifierChar + = [a-zA-Z0-9_] + +_ "whitespace" + = [ \t\n\r]* + +EOF + = !. diff --git a/src/parser/parse.ts b/src/parser/parse.ts index 25d78fa..63fb1d1 100644 --- a/src/parser/parse.ts +++ b/src/parser/parse.ts @@ -1,86 +1,81 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import antlr4 from 'antlr4'; +/** + * JSONPath parser. + * + * Parses JSONPath expressions into an Abstract Syntax Tree (AST). + * Uses Peggy-generated parser with RFC 9535 compliant grammar. + */ import { JSONPathSyntaxError } from './errors'; -import JSONPathLexer from './generated/JSONPathLexer'; -import JSONPathParser from './generated/JSONPathParser'; -import Listener from './Listener'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore - Peggy generates plain JS without types +import * as parser from './generated/parser.js'; import { Root } from './types'; -const customErrorListener = { - syntaxError: ( - _recognizer: antlr4.Recognizer, - _offendingSymbol: any, - line: number, - charPositionInLine: number, - msg: string, - _e: any, - ): void => { - throw new JSONPathSyntaxError(line, charPositionInLine, msg); - }, - reportAmbiguity: function ( - _recognizer: antlr4.Recognizer, - _dfa: any, - _startIndex: number, - _stopIndex: number, - _exact: any, - _ambigAlts: any, - _configs: any, - ): void { - return; - }, - reportAttemptingFullContext: function ( - _recognizer: antlr4.Recognizer, - _dfa: any, - _startIndex: number, - _stopIndex: number, - _conflictingAlts: any, - _configs: any, - ): void { - return; - }, - reportContextSensitivity: function ( - _recognizer: antlr4.Recognizer, - _dfa: any, - _startIndex: number, - _stopIndex: number, - _conflictingAlts: any, - _configs: any, - ): void { - return; - }, -}; - +/** + * Internal parse function that always throws on error. + * Used by query/paths functions. + * + * @internal + */ export function parseInternal(input: string): Root { - const inputStream = new antlr4.InputStream(input); - const lexer = new JSONPathLexer(inputStream); - const tokenStream = new antlr4.CommonTokenStream(lexer); - const parser = new JSONPathParser(tokenStream); - - parser.removeErrorListeners(); - parser.addErrorListener(customErrorListener); - - const listener = new Listener(); - parser.buildParseTrees = true; - - const tree = parser.jsonpath(); - - // eslint-disable-next-line @typescript-eslint/ban-ts-ignore - // @ts-ignore - antlr4.tree.ParseTreeWalker.DEFAULT.walk(listener, tree); - - return listener.getTree(); + try { + return parser.parse(input) as Root; + } catch (e: unknown) { + // Convert Peggy's SyntaxError to our JSONPathSyntaxError + if (e && typeof e === 'object' && 'location' in e && 'message' in e) { + const peggyError = e as { location: { start: { line: number; column: number } }; message: string }; + throw new JSONPathSyntaxError( + peggyError.location.start.line, + peggyError.location.start.column, + peggyError.message, + ); + } + /* c8 ignore start */ + throw e; + } + /* c8 ignore stop */ } +/** + * Options for the parse function. + */ export type ParseOptions = { + /** + * If true, returns null instead of throwing on invalid paths. + * @default false + */ hideExceptions?: boolean; }; +/** + * Parse a JSONPath expression into an Abstract Syntax Tree (AST). + * + * The AST can be used for analysis, transformation, or passed to stringify() + * to convert back to a string. + * + * @param input - JSONPath expression string + * @param options - Parse options + * @returns Parsed AST (Root node) or null if invalid with hideExceptions + * + * @example + * ```typescript + * // Basic parsing + * const ast = parse('$.store.book[0].title'); + * // => { type: 'root', next: { type: 'subscript', value: { type: 'dot', ... }, ... } } + * + * // Check validity + * const result = parse('invalid', { hideExceptions: true }); + * // => null + * + * // Round-trip with stringify + * import { stringify } from 'jsonpathly'; + * stringify(parse('$.a.b')); // => '$.a.b' + * ``` + * + * @throws {JSONPathSyntaxError} If expression is invalid (unless hideExceptions is true) + */ export function parse(input: string, options: ParseOptions = {}): Root | null { try { - const tree = parseInternal(input); - return tree; + return parseInternal(input); } catch (e) { if (!options.hideExceptions) { throw e; diff --git a/src/parser/stringify.ts b/src/parser/stringify.ts index 07a75ca..5b4ad82 100644 --- a/src/parser/stringify.ts +++ b/src/parser/stringify.ts @@ -1,6 +1,16 @@ +/** + * JSONPath AST to string serialization. + * + * Converts parsed JSONPath AST back to string representation. + * Uses RFC 9535 normalized format with single quotes. + */ import { Comparator, JsonPathElement, LogicalExpression, Operation } from './types'; -const OPERATOR: Record = { +// ============================================ +// Operator Mappings +// ============================================ + +const COMPARATOR_OPERATORS: Record = { eq: '==', ne: '!=', lt: '<', @@ -18,94 +28,223 @@ const OPERATOR: Record = { size: 'size', }; -const COMP_OPERATOR: Record = { +const ARITHMETIC_OPERATORS: Record = { plus: '+', minus: '-', multi: '*', div: '/', - '': '', }; -const EXPR_OPERATOR: Record = { +const LOGICAL_OPERATORS: Record = { and: '&&', or: '||', }; +// ============================================ +// String Escaping Utilities +// ============================================ + +/** + * Escape string for single-quoted output per RFC 9535 normalized path format. + * Escapes: backslash, single quote, and control characters (U+0000-U+001F). + */ +const escapeForSingleQuote = (str: string): string => { + let result = ''; + for (let i = 0; i < str.length; i++) { + const char = str[i]; + const code = char.charCodeAt(0); + + if (char === '\\') { + result += '\\\\'; + } else if (char === "'") { + result += "\\'"; + } else if (code < 0x20) { + // Control characters U+0000-U+001F + switch (char) { + case '\b': + result += '\\b'; + break; + case '\f': + result += '\\f'; + break; + case '\n': + result += '\\n'; + break; + case '\r': + result += '\\r'; + break; + case '\t': + result += '\\t'; + break; + default: + // Other control chars as \uXXXX + result += '\\u' + code.toString(16).padStart(4, '0'); + } + } else { + result += char; + } + } + return result; +}; + +/** + * Format string as single-quoted literal. + */ +const singleQuoted = (str: string): string => `'${escapeForSingleQuote(str)}'`; + +/** + * Recursively stringify a JSON value with single quotes for strings. + * Used for object and array values in filter expressions. + */ +const stringifyJsonValue = (value: unknown): string => { + if (typeof value === 'string') { + return singleQuoted(value); + } + if (Array.isArray(value)) { + return `[${value.map(stringifyJsonValue).join(',')}]`; + } + if (value !== null && typeof value === 'object') { + const pairs = Object.entries(value).map(([k, v]) => `${singleQuoted(k)}:${stringifyJsonValue(v)}`); + return `{${pairs.join(',')}}`; + } + return JSON.stringify(value); +}; + +// ============================================ +// Helper Functions (defined before stringify) +// ============================================ + +/** + * Stringify a value node based on its subtype. + */ +function stringifyValue(input: Extract): string { + switch (input.subtype) { + case 'regex': + return `${input.value}${input.opts}`; + + case 'string': + return singleQuoted(input.value as string); + + case 'object': + return stringifyJsonValue(input.value); + + case 'array': + return stringifyJsonValue(input.value); + + case 'boolean': + case 'number': + case 'null': + return JSON.stringify(input.value); + + /* c8 ignore start */ + default: { + const _exhaustive: never = input; + throw new Error(`Unknown value subtype: ${(_exhaustive as { subtype: string }).subtype}`); + } + /* c8 ignore stop */ + } +} + +/** + * Stringify a slice expression. + */ +function stringifySlice(input: Extract): string { + const start = input.start !== null ? String(input.start) : ''; + const end = input.end !== null ? String(input.end) : ''; + const step = input.step !== null ? ':' + input.step : ''; + return `${start}:${end}${step}`; +} + + +// ============================================ +// Main Stringify Function +// ============================================ + +/** + * Convert JSONPath AST element to string representation. + * + * @param input - AST element to stringify + * @returns String representation of the JSONPath + */ export function stringify(input: JsonPathElement | null): string { if (input === null) { return ''; } switch (input.type) { - case 'root': { + case 'root': return '$' + stringify(input.next); - } - case 'current': { + + case 'current': return '@' + stringify(input.next); - } - case 'dot': { + + case 'dot': return '.' + stringify(input.value); - } - case 'dotdot': { - const res = stringify(input.value); - return '..' + res; - } + + case 'dotdot': + return '..' + stringify(input.value); + case 'bracketExpression': - case 'bracketMember': { + case 'bracketMember': return '[' + stringify(input.value) + ']'; - } - case 'subscript': { + + case 'subscript': return stringify(input.value) + stringify(input.next); - } - case 'identifier': { + + case 'identifier': return input.value; - } - case 'wildcard': { + + case 'wildcard': return '*'; - } - case 'indexes': { - return input.values.map(stringify).join(', '); - } - case 'unions': { + + case 'unions': return input.values.map(stringify).join(', '); - } - case 'stringLiteral': { - return `"${input.value}"`; - } - case 'numericLiteral': { - return `${input.value}`; - } - case 'notExpression': { + + case 'stringLiteral': + return singleQuoted(input.value); + + case 'numericLiteral': + return String(input.value); + + case 'notExpression': return '!(' + stringify(input.value) + ')'; - } - case 'value': { - if (input.subtype === 'regex') { - return `${input.value}${input.opts}`; - } - return JSON.stringify(input.value); - } - case 'filterExpression': { + + case 'value': + return stringifyValue(input); + + case 'filterExpression': return '?(' + stringify(input.value) + ')'; - } - case 'groupOperation': { - return '(' + stringify(input.value) + ')'; - } - case 'groupExpression': { + + case 'groupOperation': + case 'groupExpression': return '(' + stringify(input.value) + ')'; + + case 'operation': + return stringify(input.left) + ' ' + ARITHMETIC_OPERATORS[input.operator] + ' ' + stringify(input.right); + + case 'comparator': + // Handle unary operators (empty has no right operand) + if (input.operator === 'empty') { + return stringify(input.left) + ' empty'; + } + return stringify(input.left) + ` ${COMPARATOR_OPERATORS[input.operator]} ` + stringify(input.right); + + case 'logicalExpression': + return stringify(input.left) + ` ${LOGICAL_OPERATORS[input.operator]} ` + stringify(input.right); + + case 'slices': + return stringifySlice(input); + + case 'functionCall': { + const args = input.args.map((arg) => stringify(arg as JsonPathElement)).join(', '); + return `${input.name}(${args})`; } - case 'operation': { - return stringify(input.left) + ' ' + COMP_OPERATOR[input.operator] + ' ' + stringify(input.right); - } - case 'comparator': { - return stringify(input.left) + ` ${OPERATOR[input.operator]} ` + stringify(input.right); - } - case 'logicalExpression': { - return stringify(input.left) + ` ${EXPR_OPERATOR[input.operator]} ` + stringify(input.right); - } - case 'slices': { - return `${input.start !== null ? input.start : ''}:${input.end !== null ? input.end : ''}${ - input.step !== null ? ':' + input.step : '' - }`; + + /* c8 ignore start */ + default: { + const _exhaustive: never = input; + throw new Error(`Unknown AST node type: ${(_exhaustive as JsonPathElement).type}`); } + /* c8 ignore stop */ } } diff --git a/src/parser/types.ts b/src/parser/types.ts index 0c8ba7b..0bcb867 100644 --- a/src/parser/types.ts +++ b/src/parser/types.ts @@ -85,7 +85,7 @@ export type DotDot = { }; export type BracketMemberContent = Identifier | NumericLiteral | StringLiteral; -export type BracketExpressionContent = Wildcard | FilterExpression | Slices | Unions | Indexes; +export type BracketExpressionContent = Wildcard | FilterExpression | Slices | Unions; export type BracketExpression = { type: 'bracketExpression'; @@ -122,14 +122,17 @@ export type NumericLiteral = { value: number; }; -export type Indexes = { - type: 'indexes'; - values: NumericLiteral[]; -}; - +// RFC 9535: Selector list allows mixed types export type Unions = { type: 'unions'; - values: (StringLiteral | Identifier)[]; + values: (StringLiteral | Identifier | NumericLiteral | Wildcard)[]; +}; + +// RFC 9535 Function Call +export type FunctionCall = { + type: 'functionCall'; + name: 'length' | 'count' | 'match' | 'search' | 'value'; + args: OperationContent[]; }; export type FilterExpressionContent = @@ -137,6 +140,7 @@ export type FilterExpressionContent = | GroupExpression | LogicalExpression | NotExpression + | FunctionCall | Current | Root | Value; @@ -146,11 +150,11 @@ export type FilterExpression = { value: FilterExpressionContent; }; -export type OperationContent = Root | Current | Value | GroupOperation | Operation; +export type OperationContent = Root | Current | Value | GroupOperation | Operation | FunctionCall; export type Operation = { type: 'operation'; - operator: 'plus' | 'minus' | 'multi' | 'div' | ''; + operator: 'plus' | 'minus' | 'multi' | 'div'; left: OperationContent; right: OperationContent; }; @@ -180,7 +184,7 @@ export type JsonPathElement = | StringLiteral | Identifier | NumericLiteral - | Indexes | Unions | FilterExpression + | FunctionCall | Operation; diff --git a/tests/api.test.ts b/tests/api.test.ts new file mode 100644 index 0000000..55e85e8 --- /dev/null +++ b/tests/api.test.ts @@ -0,0 +1,366 @@ +/** + * Public API Tests + * + * Tests for the jsonpathly public API: + * + * - parse(path, options?) - Parse JSONPath string to AST + * - stringify(ast) - Convert AST back to JSONPath string + * - paths(data, path, opts?) - Get matched paths instead of values + * - query(data, path, opts?) - Query JSON data with JSONPath + * - JSONPathSyntaxError - Error class for invalid paths + */ +import { expect } from 'chai'; +import { parse, stringify, paths, query, JSONPathSyntaxError } from '../src/index'; + +describe('Public API', () => { + // ============================================ + // parse() + // ============================================ + + describe('parse()', () => { + describe('valid expressions', () => { + const validPaths = [ + // Basic selectors + '$', + '$.store', + '$.store.book', + '$[0]', + '$[*]', + + // Combined selectors + '$.store.book[*]', + '$.store.book[0,1,2]', + + // Slices + '$.store.book[:2]', + '$.store.book[1:3]', + '$.store.book[::2]', + + // Recursive descent + '$..book', + '$.store..price', + + // Bracket notation + "$['store']['book']", + + // Filter expressions + '$[?(@.price < 10)]', + '$[?(@.author)]', + '$[?(@.price == 10.99)]', + '$[?(@.title == "Test")]', + '$[?(@.available == true)]', + '$[?(@.data == null)]', + + // Logical operators + '$[?(@.price < 10 && @.category == "fiction")]', + '$[?(@.price < 10 || @.price > 100)]', + '$[?(!(@.sold))]', + ]; + + for (const path of validPaths) { + it(`parses: ${path}`, () => { + const result = parse(path); + + expect(result).to.not.be.null; + expect(result!.type).to.equal('root'); + }); + } + }); + + describe('invalid expressions', () => { + const invalidPaths = [ + { path: '', desc: 'empty string' }, + { path: 'bad', desc: 'no root' }, + { path: '@', desc: 'current without context' }, + { path: '$.$', desc: 'invalid root after root' }, + { path: '$...', desc: 'triple dot' }, + { path: '$[?(@.test == undefined)]', desc: 'undefined keyword' }, + { path: '$[1:2:3:4]', desc: 'too many slice parts' }, + ]; + + for (const { path, desc } of invalidPaths) { + it(`throws for ${desc}: ${path || '(empty)'}`, () => { + expect(() => parse(path)).to.throw(JSONPathSyntaxError); + }); + } + }); + + describe('options', () => { + it('returns null with hideExceptions for invalid path', () => { + const result = parse('bad', { hideExceptions: true }); + expect(result).to.be.null; + }); + + it('still returns AST for valid path with hideExceptions', () => { + const result = parse('$.test', { hideExceptions: true }); + + expect(result).to.not.be.null; + expect(result!.type).to.equal('root'); + }); + }); + }); + + // ============================================ + // stringify() + // ============================================ + + describe('stringify()', () => { + describe('round-trip parsing', () => { + const cases = [ + { input: '$', expected: '$' }, + { input: '$.store', expected: '$.store' }, + { input: '$[0]', expected: '$[0]' }, + { input: '$[*]', expected: '$[*]' }, + { input: '$[0,1,2]', expected: '$[0, 1, 2]' }, + { input: '$[1:3]', expected: '$[1:3]' }, + { input: '$[:2]', expected: '$[:2]' }, + { input: '$[::2]', expected: '$[::2]' }, + { input: '$..book', expected: '$..book' }, + ]; + + for (const { input, expected } of cases) { + it(`stringifies: ${input}`, () => { + const ast = parse(input); + const result = stringify(ast); + + expect(result).to.equal(expected); + }); + } + }); + + describe('RFC 9535 normalized format', () => { + it('uses single quotes for string literals', () => { + const ast = parse('$["key"]'); + expect(stringify(ast)).to.equal("$['key']"); + }); + + it('escapes single quotes in strings', () => { + const ast = parse('$["it\'s"]'); + expect(stringify(ast)).to.equal("$['it\\'s']"); + }); + + it('escapes backslashes', () => { + const ast = parse('$["a\\\\b"]'); + expect(stringify(ast)).to.equal("$['a\\\\b']"); + }); + }); + + describe('filter expressions', () => { + it('stringifies comparators', () => { + const ast = parse('$[?(@.price < 10)]'); + expect(stringify(ast)).to.equal('$[?(@.price < 10)]'); + }); + + it('stringifies logical expressions', () => { + const ast = parse('$[?(@.a && @.b)]'); + expect(stringify(ast)).to.equal('$[?(@.a && @.b)]'); + }); + + it('stringifies negation', () => { + const ast = parse('$[?(!(@.sold))]'); + expect(stringify(ast)).to.equal('$[?(!(@.sold))]'); + }); + }); + + describe('edge cases', () => { + it('returns empty string for null', () => { + expect(stringify(null)).to.equal(''); + }); + }); + }); + + // ============================================ + // paths() + // ============================================ + + describe('paths()', () => { + describe('basic paths', () => { + it('returns path for simple property', () => { + const result = paths({ a: 1 }, '$.a'); + expect(result).to.deep.equal(["$['a']"]); + }); + + it('returns nested paths', () => { + const result = paths({ a: { b: { c: 1 } } }, '$.a.b.c'); + expect(result).to.deep.equal(["$['a']['b']['c']"]); + }); + + it('returns array index paths', () => { + const result = paths([1, 2, 3], '$[1]'); + expect(result).to.deep.equal(['$[1]']); + }); + + it('returns empty for no matches', () => { + const result = paths({ a: 1 }, '$.b'); + expect(result).to.deep.equal([]); + }); + }); + + describe('wildcard paths', () => { + it('returns all object paths', () => { + const result = paths({ a: 1, b: 2 }, '$.*'); + + expect(result).to.have.length(2); + expect(result).to.include("$['a']"); + expect(result).to.include("$['b']"); + }); + + it('returns all array paths', () => { + const result = paths([1, 2, 3], '$[*]'); + expect(result).to.deep.equal(['$[0]', '$[1]', '$[2]']); + }); + }); + + describe('recursive descent', () => { + it('returns all matching paths', () => { + const data = { a: { x: 1 }, b: { x: 2 } }; + const result = paths(data, '$..x'); + + expect(result).to.have.length(2); + expect(result).to.include("$['a']['x']"); + expect(result).to.include("$['b']['x']"); + }); + }); + + describe('filter paths', () => { + it('returns paths for matches', () => { + const data = [{ id: 1 }, { id: 2 }, { id: 3 }]; + const result = paths(data, '$[?(@.id > 1)]'); + + expect(result).to.deep.equal(['$[1]', '$[2]']); + }); + }); + + describe('RFC 9535 normalized format', () => { + it('uses single quotes for name selectors', () => { + const result = paths({ key: 'value' }, '$.key'); + expect(result).to.deep.equal(["$['key']"]); + }); + + it('escapes special characters', () => { + const result = paths({ "it's": 1 }, "$[\"it's\"]"); + expect(result).to.deep.equal(["$['it\\'s']"]); + }); + }); + + describe('options', () => { + it('returns empty for invalid path with hideExceptions', () => { + const result = paths({}, 'bad', { hideExceptions: true }); + expect(result).to.deep.equal([]); + }); + + it('throws for invalid path by default', () => { + expect(() => paths({}, 'bad')).to.throw(Error); + }); + }); + + describe('path/query consistency', () => { + const cases = [ + { data: { a: { b: { c: 1 } } }, path: '$.a.b.c' }, + { data: [1, [2, [3]]], path: '$[1][1][0]' }, + { data: { items: [{ id: 1 }, { id: 2 }] }, path: '$.items[?(@.id == 2)]' }, + { data: { x: { y: 1 }, z: { y: 2 } }, path: '$..y' }, + ]; + + for (const { data, path } of cases) { + it(`paths resolve to same values: ${path}`, () => { + const queryResult = query(data, path, { returnArray: true }); + const pathsResult = paths(data, path); + const resolvedResult = query(data, pathsResult as string[]); + + expect(resolvedResult).to.deep.equal(queryResult); + }); + } + }); + }); + + // ============================================ + // query() + // ============================================ + + describe('query()', () => { + describe('return modes', () => { + it('returns single value by default', () => { + const result = query({ a: 1 }, '$.a'); + expect(result).to.equal(1); + }); + + it('returns array with returnArray option', () => { + const result = query({ a: 1 }, '$.a', { returnArray: true }); + expect(result).to.deep.equal([1]); + }); + + it('returns undefined for no match', () => { + const result = query({ a: 1 }, '$.b'); + expect(result).to.be.undefined; + }); + + it('returns empty array for no match with returnArray', () => { + const result = query({ a: 1 }, '$.b', { returnArray: true }); + expect(result).to.deep.equal([]); + }); + }); + + describe('error handling', () => { + it('returns undefined for invalid path with hideExceptions', () => { + const result = query({}, 'bad', { hideExceptions: true }); + expect(result).to.be.undefined; + }); + + it('returns empty array with both options', () => { + const result = query({}, 'bad', { hideExceptions: true, returnArray: true }); + expect(result).to.deep.equal([]); + }); + }); + + describe('array of paths', () => { + it('queries multiple paths', () => { + const data = { a: 1, b: 2, c: 3 }; + const result = query(data, ['$.a', '$.b']); + + expect(result).to.deep.equal([1, 2]); + }); + + it('works with normalized paths from paths()', () => { + const data = { a: { b: 1 }, c: { b: 2 } }; + const pathsResult = paths(data, '$..b'); + const queryResult = query(data, pathsResult as string[]); + + expect(queryResult).to.deep.equal([1, 2]); + }); + }); + }); + + // ============================================ + // JSONPathSyntaxError + // ============================================ + + describe('JSONPathSyntaxError', () => { + it('is exported', () => { + expect(JSONPathSyntaxError).to.be.a('function'); + }); + + it('is thrown for invalid paths', () => { + expect(() => parse('invalid')).to.throw(JSONPathSyntaxError); + }); + + it('has correct name property', () => { + try { + parse('invalid'); + expect.fail('Should have thrown'); + } catch (e) { + expect((e as Error).name).to.equal('JSONPathSyntaxError'); + } + }); + + it('is instanceof Error', () => { + try { + parse('invalid'); + expect.fail('Should have thrown'); + } catch (e) { + expect(e).to.be.instanceOf(Error); + expect(e).to.be.instanceOf(JSONPathSyntaxError); + } + }); + }); +}); diff --git a/tests/consensus.test.ts b/tests/consensus.test.ts index 839b7a7..4cdf1ba 100644 --- a/tests/consensus.test.ts +++ b/tests/consensus.test.ts @@ -1,2707 +1,85 @@ +/** + * JSON Path Comparison Consensus Tests + * + * These tests validate jsonpathly against the consensus behavior from the + * JSON Path Comparison project: https://cburgmer.github.io/json-path-comparison/ + * + * Test categories: + * - Array slices: $[start:end:step] + * - Bracket notation: $['key'], $[0] + * - Dot notation: $.key, $.* + * - Filter expressions: $[?(@.key == value)] + * - Recursive descent: $..key + * - Root: $ + * - Unions: $[0,1], $['a','b'] + */ import { query } from '../src/handler/query'; import { expect } from 'chai'; +import { consensusTests, ConsensusTest } from './data/consensus-tests'; -const testSuits = [ - { - title: 'array_slice_on_exact_match', - query: '$[0:5]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['first', 'second', 'third', 'forth', 'fifth'], - consensus: true, - }, - { - title: 'array_slice_on_object', - query: '$[1:3]', - payload: { - ':': 42, - more: 'string', - a: 1, - b: 2, - c: 3, - '1:3': 'nice', - }, - results: [], - consensus: true, - }, - { - title: 'array_slice_on_non_overlapping_array', - query: '$[7:10]', - payload: ['first', 'second', 'third'], - results: [], - consensus: true, - }, - { - title: 'array_slice_with_large_number_for_start_end_negative_step', - query: '$[113667776004:2:-1]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: [], - consensus: false, - }, - { - title: 'array_slice_with_large_number_for_end_and_negative_step', - query: '$[2:-113667776004:-1]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: [], - consensus: false, - }, - { - title: 'array_slice_with_large_number_for_end', - query: '$[2:113667776004]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['third', 'forth', 'fifth'], - consensus: true, - }, - { - title: 'array_slice_with_large_number_for_start', - query: '$[-113667776004:2]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['first', 'second'], - consensus: true, - }, - { - title: 'array_slice', - query: '$[1:3]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['second', 'third'], - consensus: true, - }, - { - title: 'array_slice_with_negative_start_and_end_and_range_of_-1', - query: '$[-4:-5]', - payload: [2, 'a', 4, 5, 100, 'nice'], - results: [], - consensus: true, - }, - { - title: 'array_slice_with_negative_start_and_end_and_range_of_0', - query: '$[-4:-4]', - payload: [2, 'a', 4, 5, 100, 'nice'], - results: [], - consensus: true, - }, - { - title: 'array_slice_with_negative_start_and_end_and_range_of_1', - query: '$[-4:-3]', - payload: [2, 'a', 4, 5, 100, 'nice'], - results: [4], - consensus: true, - }, - { - title: 'array_slice_with_negative_start_and_positive_end_and_range_of_1', - query: '$[-4:3]', - payload: [2, 'a', 4, 5, 100, 'nice'], - results: [4], - consensus: true, - }, - { - title: 'array_slice_with_negative_step', - query: '$[3:0:-2]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: [], - consensus: false, - }, - { - title: 'array_slice_with_negative_start_and_positive_end_and_range_of_-1', - query: '$[-4:1]', - payload: [2, 'a', 4, 5, 100, 'nice'], - results: [], - consensus: true, - }, - { - title: 'array_slice_with_negative_step_and_start_greater_than_end', - query: '$[0:3:-2]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['first', 'second', 'third'], - consensus: false, - }, - { - title: 'array_slice_with_negative_start_and_positive_end_and_range_of_0', - query: '$[-4:2]', - payload: [2, 'a', 4, 5, 100, 'nice'], - results: [], - consensus: true, - }, - { - title: 'array_slice_with_negative_step_on_partially_overlapping_array', - query: '$[7:3:-1]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: [], - consensus: false, - }, - { - title: 'array_slice_with_negative_step_only', - query: '$[::-2]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['first', 'second', 'third', 'forth', 'fifth'], - consensus: false, - }, - { - title: 'array_slice_with_open_end', - query: '$[1:]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['second', 'third', 'forth', 'fifth'], - consensus: true, - }, - { - title: 'array_slice_with_open_end_and_negative_step', - query: '$[3::-1]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['forth', 'fifth'], - consensus: false, - }, - { - title: 'array_slice_with_open_start', - query: '$[:2]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['first', 'second'], - consensus: true, - }, - { - title: 'array_slice_with_open_start_and_end', - query: '$[:]', - payload: ['first', 'second'], - results: ['first', 'second'], - consensus: true, - }, - { - title: 'array_slice_on_partially_overlapping_array', - query: '$[1:10]', - payload: ['first', 'second', 'third'], - results: ['second', 'third'], - consensus: true, - }, - { - title: 'array_slice_with_open_start_and_negative_step', - query: '$[:2:-1]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['first', 'second'], - consensus: false, - }, - { - title: 'array_slice_with_open_start_and_end_on_object', - query: '$[:]', - payload: { - ':': 42, - more: 'string', - }, - results: [], - consensus: true, - }, - { - title: 'array_slice_with_positive_start_and_negative_end_and_range_of_-1', - query: '$[3:-4]', - payload: [2, 'a', 4, 5, 100, 'nice'], - results: [], - consensus: true, - }, - { - title: 'array_slice_with_positive_start_and_negative_end_and_range_of_0', - query: '$[3:-3]', - payload: [2, 'a', 4, 5, 100, 'nice'], - results: [], - consensus: true, - }, - { - title: 'array_slice_with_range_of_0', - query: '$[0:0]', - payload: ['first', 'second'], - results: [], - consensus: true, - }, - { - title: 'array_slice_with_open_start_and_end_and_step_empty', - query: '$[::]', - payload: ['first', 'second'], - results: ['first', 'second'], - consensus: true, - }, - { - title: 'array_slice_with_range_of_-1', - query: '$[2:1]', - payload: ['first', 'second', 'third', 'forth'], - results: [], - consensus: true, - }, - { - title: 'array_slice_with_positive_start_and_negative_end_and_range_of_1', - query: '$[3:-2]', - payload: [2, 'a', 4, 5, 100, 'nice'], - results: [5], - consensus: true, - }, - { - title: 'array_slice_with_start_-2_and_open_end', - query: '$[-2:]', - payload: ['first', 'second', 'third'], - results: ['second', 'third'], - consensus: true, - }, - { - title: 'array_slice_with_start_large_negative_number_and_open_end_on_short_array', - query: '$[-4:]', - payload: ['first', 'second', 'third'], - results: ['first', 'second', 'third'], - consensus: true, - }, - { - title: 'array_slice_with_start_-1_and_open_end', - query: '$[-1:]', - payload: ['first', 'second', 'third'], - results: ['third'], - consensus: true, - }, - { - title: 'array_slice_with_step_0', - query: '$[0:3:0]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['first', 'second', 'third'], - consensus: false, - }, - { - title: 'array_slice_with_range_of_1', - query: '$[0:1]', - payload: ['first', 'second'], - results: ['first'], - consensus: true, - }, - { - title: 'array_slice_with_step_1', - query: '$[0:3:1]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['first', 'second', 'third'], - consensus: true, - }, - { - title: 'array_slice_with_step_and_leading_zeros', - query: '$[010:024:010]', - payload: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], - results: [10, 20], - consensus: true, - }, - { - title: 'array_slice_with_step', - query: '$[0:3:2]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['first', 'third'], - consensus: true, - }, - { - title: 'array_slice_with_step_but_end_not_aligned', - query: '$[0:4:2]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['first', 'third'], - consensus: true, - }, - { - title: 'array_slice_with_step_empty', - query: '$[1:3:]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['second', 'third'], - consensus: true, - }, - { - title: 'bracket_notation', - query: "$['key']", - payload: { - key: 'value', - }, - results: ['value'], - consensus: true, - }, - { - title: 'bracket_notation_after_recursive_descent', - query: '$..[0]', - payload: [ - 'first', - { - key: [ - 'first nested', - { - more: [ - { - nested: ['deepest', 'second'], - }, - ['more', 'values'], - ], - }, - ], - }, - ], - results: [ - 'first', - 'first nested', - { - nested: ['deepest', 'second'], - }, - 'deepest', - 'more', - ], - consensus: true, - }, - { - title: 'bracket_notation_on_object_without_key', - query: "$['missing']", - payload: { - key: 'value', - }, - results: [], - consensus: true, - }, - { - title: 'array_slice_with_step_only', - query: '$[::2]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['first', 'third', 'fifth'], - consensus: true, - }, - { - title: 'bracket_notation_with_NFC_path_on_NFD_key', - query: "$['ü']", - payload: { - ü: 42, - }, - results: [], - consensus: true, - }, - { - title: 'bracket_notation_with_dot', - query: "$['two.some']", - payload: { - one: { - key: 'value', - }, - two: { - some: 'more', - key: 'other value', - }, - 'two.some': '42', - }, - results: ['42'], - consensus: true, - }, - { - title: 'bracket_notation_with_empty_path', - query: '$[]', - payload: { - '': 42, - "''": 123, - '""': 222, - }, - results: 'NOT_SUPPORTED', - consensus: true, - }, - { - title: 'bracket_notation_with_empty_string', - query: "$['']", - payload: { - '': 42, - "''": 123, - '""': 222, - }, - results: [42], - consensus: true, - }, - { - title: 'bracket_notation_with_double_quotes', - query: '$["key"]', - payload: { - key: 'value', - }, - results: ['value'], - consensus: true, - }, - { - title: 'bracket_notation_with_empty_string_doubled_quoted', - query: '$[""]', - payload: { - '': 42, - "''": 123, - '""': 222, - }, - results: [42], - consensus: true, - }, - { - title: 'bracket_notation_with_number', - query: '$[2]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['third'], - consensus: true, - }, - { - title: 'bracket_notation_with_negative_number_on_short_array', - query: '$[-2]', - payload: ['one element'], - results: [], - consensus: true, - }, - { - title: 'bracket_notation_with_number_0', - query: '$[0]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['first'], - consensus: true, - }, - { - title: 'bracket_notation_with_number_-1', - query: '$[-1]', - payload: ['first', 'second', 'third'], - results: ['third'], - consensus: true, - }, - { - title: 'bracket_notation_with_number_after_dot_notation_with_wildcard_on_nested_arrays_with_different_length', - query: '$.*[1]', - payload: [[1], [2, 3]], - results: [3], - consensus: true, - }, - { - title: 'bracket_notation_with_number_on_object', - query: '$[0]', - payload: { - '0': 'value', - }, - results: ['value'], - consensus: true, - }, - { - title: 'bracket_notation_with_number_on_short_array', - query: '$[1]', - payload: ['one element'], - results: [], - consensus: true, - }, - { - title: 'bracket_notation_with_quoted_array_slice_literal', - query: "$[':']", - payload: { - ':': 'value', - another: 'entry', - }, - results: ['value'], - consensus: true, - }, - { - title: 'bracket_notation_with_quoted_closing_bracket_literal', - query: "$[']']", - payload: { - ']': 42, - }, - results: [42], - consensus: true, - }, - { - title: 'bracket_notation_with_quoted_current_object_literal', - query: "$['@']", - payload: { - '@': 'value', - another: 'entry', - }, - results: ['value'], - consensus: true, - }, - { - title: 'bracket_notation_with_quoted_dot_wildcard', - query: "$['.*']", - payload: { - key: 42, - '.*': 1, - '': 10, - }, - results: [1], - consensus: true, - }, - { - title: 'bracket_notation_with_quoted_dot_literal', - query: "$['.']", - payload: { - '.': 'value', - another: 'entry', - }, - results: ['value'], - consensus: true, - }, - { - title: 'bracket_notation_with_quoted_escaped_backslash', - query: "$['\\\\']", - payload: { - '\\': 'value', - }, - results: [], - consensus: false, - }, - { - title: 'bracket_notation_with_quoted_escaped_single_quote', - query: "$['\\'']", - payload: { - "'": 'value', - }, - results: [], - consensus: false, - }, - { - title: 'bracket_notation_with_number_on_string', - query: '$[0]', - payload: 'Hello World', - results: [], - consensus: true, - }, - { - title: 'bracket_notation_with_quoted_double_quote_literal', - query: "$['\"']", - payload: { - '"': 'value', - another: 'entry', - }, - results: ['value'], - consensus: true, - }, - { - title: 'bracket_notation_with_quoted_special_characters_combined', - query: "$[':@.\"$,*\\'\\\\']", - payload: { ':@."$,*\'\\': 42 }, - results: [], - consensus: false, - }, - { - title: 'bracket_notation_with_quoted_union_literal', - query: "$[',']", - payload: { ',': 'value', another: 'entry' }, - results: ['value'], - consensus: true, - }, - { - title: 'bracket_notation_with_quoted_number_on_object', - query: "$['0']", - payload: { '0': 'value' }, - results: ['value'], - consensus: true, - }, - { - title: 'bracket_notation_with_quoted_root_literal', - query: "$['$']", - payload: { $: 'value', another: 'entry' }, - results: ['value'], - consensus: true, - }, - { - title: 'bracket_notation_with_quoted_wildcard_literal', - query: "$['*']", - payload: { '*': 'value', another: 'entry' }, - results: ['value'], - consensus: true, - }, - { - title: 'bracket_notation_with_quoted_string_and_unescaped_single_quote', - query: "$['single'quote']", - payload: { "single'quote": 'value' }, - results: 'NOT_SUPPORTED', - consensus: true, - }, - { - title: 'bracket_notation_with_spaces', - query: "$[ 'a' ]", - payload: { ' a': 1, a: 2, ' a ': 3, 'a ': 4, " 'a' ": 5, " 'a": 6, "a' ": 7, ' "a" ': 8, '"a"': 9 }, - results: [2], - consensus: true, - }, - { - title: 'bracket_notation_with_string_including_dot_wildcard', - query: "$['ni.*']", - payload: { nice: 42, 'ni.*': 1, mice: 100 }, - results: [1], - consensus: true, - }, - { - title: 'bracket_notation_with_two_literals_separated_by_dot', - query: "$['two'.'some']", - payload: { one: { key: 'value' }, two: { some: 'more', key: 'other value' }, 'two.some': '42', "two'.'some": '43' }, - results: 'NOT_SUPPORTED', - consensus: true, - }, - { - title: 'bracket_notation_with_quoted_wildcard_literal_on_object_without_key', - query: "$['*']", - payload: { another: 'entry' }, - results: [], - consensus: true, - }, - { - title: 'bracket_notation_with_two_literals_separated_by_dot_without_quotes', - query: '$[two.some]', - payload: { one: { key: 'value' }, two: { some: 'more', key: 'other value' }, 'two.some': '42' }, - results: 'NOT_SUPPORTED', - consensus: true, - }, - { - title: 'bracket_notation_with_wildcard_after_array_slice', - query: '$[0:2][*]', - payload: [ - [1, 2], - ['a', 'b'], - [0, 0], - ], - results: [1, 2, 'a', 'b'], - consensus: true, - }, - { - title: 'bracket_notation_with_wildcard_after_dot_notation_after_bracket_notation_with_wildcard', - query: '$[*].bar[*]', - payload: [{ bar: [42] }], - results: [42], - consensus: true, - }, - { - title: 'bracket_notation_with_wildcard_after_recursive_descent', - query: '$..[*]', - payload: { key: 'value', 'another key': { complex: 'string', primitives: [0, 1] } }, - results: ['value', { complex: 'string', primitives: [0, 1] }, 'string', [0, 1], 0, 1], - consensus: true, - }, - { - title: 'bracket_notation_with_wildcard_on_array', - query: '$[*]', - payload: ['string', 42, { key: 'value' }, [0, 1]], - results: ['string', 42, { key: 'value' }, [0, 1]], - consensus: true, - }, - { title: 'bracket_notation_with_wildcard_on_empty_array', query: '$[*]', payload: [], results: [], consensus: true }, - { - title: 'bracket_notation_with_wildcard_on_object', - query: '$[*]', - payload: { some: 'string', int: 42, object: { key: 'value' }, array: [0, 1] }, - results: ['string', 42, { key: 'value' }, [0, 1]], - consensus: true, - }, - { title: 'bracket_notation_with_wildcard_on_empty_object', query: '$[*]', payload: {}, results: [], consensus: true }, - { - title: 'dot_bracket_notation_with_double_quotes', - query: '$.["key"]', - payload: { key: 'value', other: { key: [{ key: 42 }] } }, - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'bracket_notation_without_quotes', - query: '$[key]', - payload: { key: 'value' }, - results: ['value'], - consensus: true, - isCustom: true, - }, - { - title: 'bracket_notation_with_number_-1_on_empty_array', - query: '$[-1]', - payload: [], - results: [], - consensus: true, - }, - { - title: 'dot_bracket_notation_without_quotes', - query: '$.[key]', - payload: { key: 'value', other: { key: [{ key: 42 }] } }, - results: 'NOT_SUPPORTED', - consensus: true, - }, - { title: 'dot_notation', query: '$.key', payload: { key: 'value' }, results: ['value'], consensus: true }, - { - title: 'dot_notation_after_bracket_notation_with_wildcard_on_one_matching', - query: '$[*].a', - payload: [{ a: 1 }], - results: [1], - consensus: true, - }, - { - title: 'dot_notation_after_bracket_notation_after_recursive_descent', - query: '$..[1].key', - payload: { - k: [{ key: 'some value' }, { key: 42 }], - kk: [ - [{ key: 100 }, { key: 200 }, { key: 300 }], - [{ key: 400 }, { key: 500 }, { key: 600 }], - ], - key: [0, 1], - }, - results: [42, 200, 500], - consensus: true, - }, - { title: 'current_with_dot_notation', query: '@.a', payload: { a: 1 }, results: 'NOT_SUPPORTED', consensus: false }, - { - title: 'dot_notation_after_bracket_notation_with_wildcard', - query: '$[*].a', - payload: [{ a: 1 }, { a: 1 }], - results: [1, 1], - consensus: true, - }, - { - title: 'dot_notation_after_array_slice', - query: '$[0:2].key', - payload: [{ key: 'ey' }, { key: 'bee' }, { key: 'see' }], - results: ['ey', 'bee'], - consensus: true, - }, - { - title: 'dot_notation_after_filter_expression', - query: '$[?(@.id==42)].name', - payload: [ - { id: 42, name: 'forty-two' }, - { id: 1, name: 'one' }, - ], - results: ['forty-two'], - consensus: true, - }, - { - title: 'dot_notation_after_bracket_notation_with_wildcard_on_some_matching', - query: '$[*].a', - payload: [{ a: 1 }, { b: 1 }], - results: [1], - consensus: true, - }, - { - title: 'dot_notation_after_recursive_descent', - query: '$..key', - payload: { object: { key: 'value', array: [{ key: 'something' }, { key: { key: 'russian dolls' } }] }, key: 'top' }, - results: ['top', 'value', 'something', { key: 'russian dolls' }, 'russian dolls'], - consensus: true, - }, - { - title: 'dot_notation_after_recursive_descent_with_extra_dot', - query: '$...key', - payload: { object: { key: 'value', array: [{ key: 'something' }, { key: { key: 'russian dolls' } }] }, key: 'top' }, - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'dot_notation_after_union', - query: '$[0,2].key', - payload: [{ key: 'ey' }, { key: 'bee' }, { key: 'see' }], - results: ['ey', 'see'], - consensus: true, - }, - { - title: 'dot_notation_after_recursive_descent_after_dot_notation', - query: '$.store..price', - payload: { - store: { - book: [ - { category: 'reference', author: 'Nigel Rees', title: 'Sayings of the Century', price: 8.95 }, - { category: 'fiction', author: 'Evelyn Waugh', title: 'Sword of Honour', price: 12.99 }, - { category: 'fiction', author: 'Herman Melville', title: 'Moby Dick', isbn: '0-553-21311-3', price: 8.99 }, - { - category: 'fiction', - author: 'J. R. R. Tolkien', - title: 'The Lord of the Rings', - isbn: '0-395-19395-8', - price: 22.99, - }, - ], - bicycle: { color: 'red', price: 19.95 }, - }, - }, - results: [8.95, 12.99, 8.99, 22.99, 19.95], - consensus: true, - }, - { title: 'dot_notation_on_array', query: '$.key', payload: [0, 1], results: [], consensus: true }, - { - title: 'dot_notation_after_union_with_keys', - query: "$['one','three'].key", - payload: { one: { key: 'value' }, two: { k: 'v' }, three: { some: 'more', key: 'other value' } }, - results: ['value', 'other value'], - consensus: true, - }, - { - title: 'dot_notation_on_array_value', - query: '$.key', - payload: { key: ['first', 'second'] }, - results: [['first', 'second']], - consensus: true, - }, - { - title: 'dot_notation_on_object_without_key', - query: '$.missing', - payload: { key: 'value' }, - results: [], - consensus: true, - }, - { title: 'dot_notation_on_empty_object_value', query: '$.key', payload: { key: {} }, results: [{}], consensus: true }, - { title: 'dot_notation_on_null_value', query: '$.key', payload: { key: null }, results: [null], consensus: true }, - { - title: 'dot_notation_with_double_quotes', - query: '$."key"', - payload: { key: 'value', '"key"': 42 }, - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'dot_notation_on_array_with_containing_object_matching_key', - query: '$.id', - payload: [{ id: 2 }], - results: [], - consensus: true, - }, - { - title: 'dot_notation_with_dash', - query: '$.key-dash', - payload: { key: 42, 'key-': 43, '-': 44, dash: 45, '-dash': 46, '': 47, 'key-dash': 'value', something: 'else' }, - results: ['value'], - consensus: true, - }, - { - title: 'dot_notation_with_key_named_length_on_array', - query: '$.length', - payload: [4, 5, 6], - results: [], - consensus: true, - }, - { - title: 'dot_notation_with_double_quotes_after_recursive_descent', - query: '$.."key"', - payload: { - object: { - key: 'value', - '"key"': 100, - array: [ - { key: 'something', '"key"': 0 }, - { key: { key: 'russian dolls' }, '"key"': { '"key"': 99 } }, - ], - }, - key: 'top', - '"key"': 42, - }, - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'dot_notation_with_empty_path', - query: '$.', - payload: { key: 42, '': 9001, "''": 'nice' }, - results: 'NOT_SUPPORTED', - consensus: true, - }, - { - title: 'dot_notation_with_key_named_length', - query: '$.length', - payload: { length: 'value' }, - results: ['value'], - consensus: true, - }, - { - title: 'dot_notation_with_key_named_in', - query: '$.in', - payload: { in: 'value' }, - results: ['value'], - consensus: true, - }, - { - title: 'dot_notation_with_key_named_null', - query: '$.null', - payload: { null: 'value' }, - results: ['value'], - consensus: true, - }, - { - title: 'dot_notation_with_key_root_literal', - query: '$.$', - payload: { $: 'value' }, - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'dot_notation_with_non_ASCII_key', - query: '$.屬性', - payload: { 屬性: 'value' }, - results: ['value'], - consensus: true, - }, - { - title: 'dot_notation_with_key_named_true', - query: '$.true', - payload: { true: 'value' }, - results: ['value'], - consensus: true, - }, - { - title: 'dot_notation_with_single_quotes', - query: "$.'key'", - payload: { key: 'value', "'key'": 42 }, - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'dot_notation_with_number', - query: '$.2', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['third'], - consensus: false, - }, - { - title: 'dot_notation_with_number_on_object', - query: '$.2', - payload: { '2': 'second', a: 'first', b: 'third' }, - results: ['second'], - consensus: true, - }, - { - title: 'dot_notation_with_number_-1', - query: '$.-1', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: ['fifth'], - consensus: false, - }, - { - title: 'dot_notation_with_single_quotes_after_recursive_descent', - query: "$..'key'", - payload: { - object: { - object: { - key: 'value', - "'key'": 100, - array: [ - { key: 'something', "'key'": 0 }, - { key: { key: 'russian dolls' }, "'key'": { "'key'": 99 } }, - ], - }, - key: 'top', - "'key'": 42, - }, - key: 'top', - "'key'": 42, - }, - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'dot_notation_with_wildcard_after_dot_notation_after_dot_notation_with_wildcard', - query: '$.*.bar.*', - payload: [{ bar: [42] }], - results: [42], - consensus: true, - }, - { - title: 'dot_notation_with_single_quotes_and_dot', - query: "$.'some.key'", - payload: { 'some.key': 42, some: { key: 'value' }, "'some.key'": 43 }, - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'dot_notation_with_wildcard_after_recursive_descent', - query: '$..*', - payload: { key: 'value', 'another key': { complex: 'string', primitives: [0, 1] } }, - results: ['value', { complex: 'string', primitives: [0, 1] }, 'string', [0, 1], 0, 1], - consensus: true, - }, - { - title: 'dot_notation_with_wildcard_after_recursive_descent_on_null_value_array', - query: '$..*', - payload: [40, null, 42], - results: [40, null, 42], - consensus: true, - }, - { - title: 'dot_notation_with_space_padded_key', - query: '$. a ', - payload: { ' a': 1, a: 2, ' a ': 3, '': 4 }, - results: [2], - consensus: false, - }, - { - title: 'dot_notation_with_wildcard_after_dot_notation_with_wildcard_on_nested_arrays', - query: '$.*.*', - payload: [ - [1, 2, 3], - [4, 5, 6], - ], - results: [1, 2, 3, 4, 5, 6], - consensus: true, - }, - { - title: 'dot_notation_with_wildcard_on_array', - query: '$.*', - payload: ['string', 42, { key: 'value' }, [0, 1]], - results: ['string', 42, { key: 'value' }, [0, 1]], - consensus: true, - }, - { title: 'dot_notation_with_wildcard_on_empty_object', query: '$.*', payload: {}, results: [], consensus: true }, - { - title: 'dot_notation_with_wildcard_after_recursive_descent_on_scalar', - query: '$..*', - payload: 42, - results: [], - consensus: true, - }, - { - title: 'dot_notation_with_wildcard_on_object', - query: '$.*', - payload: { some: 'string', int: 42, object: { key: 'value' }, array: [0, 1] }, - results: ['string', 42, { key: 'value' }, [0, 1]], - consensus: true, - }, - { - title: 'dot_notation_without_dot', - query: '$a', - payload: { a: 1, $a: 2 }, - results: 'NOT_SUPPORTED', - consensus: true, - }, - { title: 'dot_notation_with_wildcard_on_empty_array', query: '$.*', payload: [], results: [], consensus: true }, - { - title: 'dot_notation_without_root', - query: '.key', - payload: { key: 'value' }, - results: 'NOT_SUPPORTED', - consensus: false, - }, - { title: 'empty', query: '', payload: { a: 42, '': 21 }, results: 'NOT_SUPPORTED', consensus: false }, - { - title: 'filter_expression_after_dot_notation_with_wildcard_after_recursive_descent', - query: '$..*[?(@.id>2)]', - payload: [ - { - complext: { - one: [ - { name: 'first', id: 1 }, - { name: 'next', id: 2 }, - { name: 'another', id: 3 }, - { name: 'more', id: 4 }, - ], - more: { name: 'next to last', id: 5 }, - }, - }, - { name: 'last', id: 6 }, - ], - results: [ - { id: 6, name: 'last' }, - { id: 3, name: 'another' }, - { id: 4, name: 'more' }, - { id: 5, name: 'next to last' }, - { id: 3, name: 'another' }, - { id: 4, name: 'more' }, - ], - consensus: false, - }, - { - title: 'dot_notation_without_root_and_dot', - query: 'key', - payload: { key: 'value' }, - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'filter_expression_after_recursive_descent', - query: '$..[?(@.id==2)]', - payload: { id: 2, more: [{ id: 2 }, { more: { id: 2 } }, { id: { id: 2 } }, [{ id: 2 }]] }, - results: [ - { id: 2, more: [{ id: 2 }, { more: { id: 2 } }, { id: { id: 2 } }, [{ id: 2 }]] }, - { id: 2 }, - { id: 2 }, - { id: 2 }, - { id: 2 }, - ], - consensus: false, - }, - { - title: 'filter_expression_with_addition', - query: '$[?(@.key+50==100)]', - payload: [{ key: 60 }, { key: 50 }, { key: 10 }, { key: -50 }, { 'key+50': 100 }], - results: [{ key: 50 }], - consensus: false, - }, - { - title: 'filter_expression_with_boolean_and_operator', - query: '$[?(@.key>42 && @.key<44)]', - payload: [{ key: 42 }, { key: 43 }, { key: 44 }], - results: [{ key: 43 }], - consensus: true, - }, - { - title: 'filter_expression_with_boolean_and_operator_and_value_false', - query: '$[?(@.key>0 && false)]', - payload: [ - { key: 1 }, - { key: 3 }, - { key: 'nice' }, - { key: true }, - { key: null }, - { key: false }, - { key: {} }, - { key: [] }, - { key: -1 }, - { key: 0 }, - { key: '' }, - ], - results: [], - consensus: false, - }, - { - title: 'filter_expression_on_object', - query: '$[?(@.key)]', - payload: { key: 42, another: { key: 1 } }, - results: [{ another: { key: 1 }, key: 42 }], - consensus: false, - }, - { - title: 'filter_expression_with_boolean_or_operator', - query: '$[?(@.key>43 || @.key<43)]', - payload: [{ key: 42 }, { key: 43 }, { key: 44 }], - results: [{ key: 42 }, { key: 44 }], - consensus: true, - }, - { - title: 'dot_bracket_notation', - query: "$.['key']", - payload: { key: 'value', other: { key: [{ key: 42 }] } }, - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'filter_expression_with_boolean_and_operator_and_value_true', - query: '$[?(@.key>0 && true)]', - payload: [ - { key: 1 }, - { key: 3 }, - { key: 'nice' }, - { key: true }, - { key: null }, - { key: false }, - { key: {} }, - { key: [] }, - { key: -1 }, - { key: 0 }, - { key: '' }, - ], - results: [{ key: 1 }, { key: 3 }], - consensus: false, - }, - { - title: 'bracket_notation_with_wildcard_on_null_value_array', - query: '$[*]', - payload: [40, null, 42], - results: [40, null, 42], - consensus: true, - }, - { - title: 'filter_expression_with_bracket_notation_and_current_object_literal', - query: "$[?(@['@key']==42)]", - payload: [{ '@key': 0 }, { '@key': 42 }, { key: 42 }, { '@key': 43 }, { some: 'value' }], - results: [{ '@key': 42 }], - consensus: true, - }, - { - title: 'filter_expression_with_bracket_notation', - query: "$[?(@['key']==42)]", - payload: [ - { key: 0 }, - { key: 42 }, - { key: -1 }, - { key: 41 }, - { key: 43 }, - { key: 42.0001 }, - { key: 41.9999 }, - { key: 100 }, - { some: 'value' }, - ], - results: [{ key: 42 }], - consensus: true, - }, - { - title: 'filter_expression_with_bracket_notation_with_-1', - query: '$[?(@[-1]==2)]', - payload: [[2, 3], ['a'], [0, 2], [2]], - results: [[0, 2], [2]], - consensus: false, - }, - { - title: 'filter_expression_with_boolean_or_operator_and_value_true', - query: '$[?(@.key>0 || true)]', - payload: [ - { key: 1 }, - { key: 3 }, - { key: 'nice' }, - { key: true }, - { key: null }, - { key: false }, - { key: {} }, - { key: [] }, - { key: -1 }, - { key: 0 }, - { key: '' }, - ], - results: [ - { key: 1 }, - { key: 3 }, - { key: 'nice' }, - { key: true }, - { key: null }, - { key: false }, - { key: {} }, - { key: [] }, - { key: -1 }, - { key: 0 }, - { key: '' }, - ], - consensus: false, - }, - { - title: 'filter_expression_with_bracket_notation_with_number', - query: "$[?(@[1]=='b')]", - payload: [ - ['a', 'b'], - ['x', 'y'], - ], - results: [['a', 'b']], - consensus: true, - }, - { - title: 'filter_expression_with_boolean_or_operator_and_value_false', - query: '$[?(@.key>0 || false)]', - payload: [ - { key: 1 }, - { key: 3 }, - { key: 'nice' }, - { key: true }, - { key: null }, - { key: false }, - { key: {} }, - { key: [] }, - { key: -1 }, - { key: 0 }, - { key: '' }, - ], - results: [{ key: 1 }, { key: 3 }], - consensus: false, - }, - { - title: 'filter_expression_with_bracket_notation_with_number_on_object', - query: "$[?(@[1]=='b')]", - payload: { '1': ['a', 'b'], '2': ['x', 'y'] }, - results: [], - consensus: false, - }, - { - title: 'filter_expression_with_current_object', - query: '$[?(@)]', - payload: ['some value', null, 'value', 0, 1, -1, '', [], {}, false, true], - results: ['some value', null, 'value', 0, 1, -1, '', [], {}, false, true], - consensus: false, - }, - { - title: 'filter_expression_with_different_grouped_operators', - query: '$[?(@.a && (@.b || @.c))]', - payload: [ - { a: true }, - { a: true, b: true }, - { a: true, b: true, c: true }, - { b: true, c: true }, - { a: true, c: true }, - { c: true }, - { b: true }, - ], - results: [ - { a: true, b: true }, - { a: true, b: true, c: true }, - { a: true, c: true }, - ], - consensus: false, - }, - { - title: 'filter_expression_with_different_ungrouped_operators', - query: '$[?(@.a && @.b || @.c)]', - payload: [ - { a: true, b: true }, - { a: true, b: true, c: true }, - { b: true, c: true }, - { a: true, c: true }, - { a: true }, - { b: true }, - { c: true }, - { d: true }, - {}, - ], - results: [ - { a: true, b: true }, - { a: true, b: true, c: true }, - { b: true, c: true }, - { a: true, c: true }, - { c: true }, - ], - consensus: false, - }, - { - title: 'filter_expression_with_division', - query: '$[?(@.key/10==5)]', - payload: [{ key: 60 }, { key: 50 }, { key: 10 }, { key: -50 }, { 'key/10': 5 }], - results: [{ key: 50 }], - consensus: false, - }, - { - title: 'filter_expression_with_dot_notation_with_number', - query: "$[?(@.2 == 'second')]", - payload: [{ '2': 'second', a: 'first', b: 'third' }], - results: [{ '2': 'second', a: 'first', b: 'third' }], - consensus: false, - }, - { - title: 'filter_expression_with_dot_notation_with_dash', - query: "$[?(@.key-dash == 'value')]", - payload: [{ 'key-dash': 'value' }], - results: [{ 'key-dash': 'value' }], - consensus: false, - }, - { - title: 'filter_expression_with_empty_expression', - query: '$[?()]', - payload: [1, { key: 42 }, 'value', null], - results: 'NOT_SUPPORTED', - consensus: true, - }, - { - title: 'filter_expression_with_equals_array_for_array_slice_with_range_1', - query: '$[?(@[0:1]==[1])]', - payload: [[1, 2, 3], [1], [2, 3], 1, 2], - results: [[1, 2, 3], [1]], - consensus: false, - }, - { - title: 'filter_expression_with_equals_array_for_dot_notation_with_star', - query: '$[?(@.*==[1,2])]', - payload: [[1, 2], [2, 3], [1], [2], [1, 2, 3], 1, 2, 3], - results: [[1, 2]], - consensus: false, - }, - { - title: 'filter_expression_with_equals_array', - query: '$[?(@.d==["v1","v2"])]', - payload: [ - { d: ['v1', 'v2'] }, - { d: ['a', 'b'] }, - { d: 'v1' }, - { d: 'v2' }, - { d: {} }, - { d: [] }, - { d: null }, - { d: -1 }, - { d: 0 }, - { d: 1 }, - { d: "['v1','v2']" }, - { d: "['v1', 'v2']" }, - { d: 'v1,v2' }, - { d: '["v1", "v2"]' }, - { d: '["v1","v2"]' }, - ], - results: [{ d: ['v1', 'v2'] }], - consensus: false, - }, - { - title: 'filter_expression_with_equals_false', - query: '$[?(@.key==false)]', - payload: [ - { some: 'some value' }, - { key: true }, - { key: false }, - { key: null }, - { key: 'value' }, - { key: '' }, - { key: 0 }, - { key: 1 }, - { key: -1 }, - { key: 42 }, - { key: {} }, - { key: [] }, - ], - results: [{ key: false }], - consensus: false, - }, - { - title: 'filter_expression_with_dot_notation_with_number_on_array', - query: "$[?(@.2 == 'third')]", - payload: [['first', 'second', 'third', 'forth', 'fifth']], - results: [['first', 'second', 'third', 'forth', 'fifth']], - consensus: false, - }, - { - title: 'filter_expression_with_equals', - query: '$[?(@.key==42)]', - payload: [ - { key: 0 }, - { key: 42 }, - { key: -1 }, - { key: 1 }, - { key: 41 }, - { key: 43 }, - { key: 42.0001 }, - { key: 41.9999 }, - { key: 100 }, - { key: 'some' }, - { key: '42' }, - { key: null }, - { key: 420 }, - { key: '' }, - { key: {} }, - { key: [] }, - { key: [42] }, - { key: { key: 42 } }, - { key: { some: 42 } }, - { some: 'value' }, - ], - results: [{ key: 42 }], - consensus: false, - }, - { - title: 'filter_expression_with_equals_null', - query: '$[?(@.key==null)]', - payload: [ - { some: 'some value' }, - { key: true }, - { key: false }, - { key: null }, - { key: 'value' }, - { key: '' }, - { key: 0 }, - { key: 1 }, - { key: -1 }, - { key: 42 }, - { key: {} }, - { key: [] }, - ], - results: [{ key: null }], - consensus: false, - }, - { - title: 'filter_expression_with_equals_array_or_equals_true', - query: '$[?(@.d==["v1","v2"] || (@.d == true))]', - payload: [{ d: ['v1', 'v2'] }, { d: ['a', 'b'] }, { d: true }], - results: [{ d: ['v1', 'v2'] }, { d: true }], - consensus: false, - }, - { - title: 'filter_expression_with_equals_number_for_array_slice_with_range_1', - query: '$[?(@[0:1]==1)]', - payload: [[1, 2, 3], [1], [2, 3], 1, 2], - results: [], - consensus: false, - }, - { - title: 'filter_expression_with_equals_number_with_leading_zeros', - query: '$[?(@.key==010)]', - payload: [{ key: '010' }, { key: '10' }, { key: 10 }, { key: 0 }, { key: 8 }], - results: [{ key: 10 }], - consensus: false, - }, - { - title: 'filter_expression_with_equals_boolean_expression_value', - query: '$[?((@.key<44)==false)]', - payload: [{ key: 42 }, { key: 43 }, { key: 44 }], - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'filter_expression_with_equals_number_for_dot_notation_with_star', - query: '$[?(@.*==2)]', - payload: [[1, 2], [2, 3], [1], [2], [1, 2, 3], 1, 2, 3], - results: [], - consensus: false, - }, - { - title: 'filter_expression_with_equals_number_with_fraction', - query: '$[?(@.key==-0.123e2)]', - payload: [{ key: -12.3 }, { key: -0.123 }, { key: -12 }, { key: 12.3 }, { key: 2 }, { key: '-0.123e2' }], - results: [{ key: -12.3 }], - consensus: false, - }, - { - title: 'filter_expression_with_equals_number_for_bracket_notation_with_star', - query: '$[?(@[*]==2)]', - payload: [[1, 2], [2, 3], [1], [2], [1, 2, 3], 1, 2, 3], - results: [], - consensus: false, - }, - { - title: 'filter_expression_with_equals_array_with_single_quotes', - query: "$[?(@.d==['v1','v2'])]", - payload: [ - { d: ['v1', 'v2'] }, - { d: ['a', 'b'] }, - { d: 'v1' }, - { d: 'v2' }, - { d: {} }, - { d: [] }, - { d: null }, - { d: -1 }, - { d: 0 }, - { d: 1 }, - { d: "['v1','v2']" }, - { d: "['v1', 'v2']" }, - { d: 'v1,v2' }, - { d: '["v1", "v2"]' }, - { d: '["v1","v2"]' }, - ], - results: [ - { - d: ['v1', 'v2'], - }, - ], - consensus: false, - }, - { - title: 'filter_expression_with_equals_on_array_without_match', - query: '$[?(@.key==43)]', - payload: [ - { - key: 42, - }, - ], - results: [], - consensus: true, - }, - { - title: 'filter_expression_with_equals_on_object', - query: '$[?(@.key==42)]', - payload: { - a: { key: 0 }, - b: { key: 42 }, - c: { key: -1 }, - d: { key: 41 }, - e: { key: 43 }, - f: { key: 42.0001 }, - g: { key: 41.9999 }, - h: { key: 100 }, - i: { some: 'value' }, - }, - results: [], - consensus: false, - }, - { - title: 'filter_expression_with_equals_string_in_NFC', - query: '$[?(@.key=="Motörhead")]', - payload: [ - { key: 'something' }, - { key: 'Motörhead' }, - { key: 'motörhead' }, - { key: 'Motorhead' }, - { key: 'Motoörhead' }, - { key: 'motoörhead' }, - ], - results: [ - { - key: 'Motörhead', - }, - ], - consensus: true, - }, - { - title: 'filter_expression_with_equals_string', - query: '$[?(@.key=="value")]', - payload: [ - { key: 'some' }, - { key: 'value' }, - { key: null }, - { key: 0 }, - { key: 1 }, - { key: -1 }, - { key: '' }, - { key: {} }, - { key: [] }, - { key: 'valuemore' }, - { key: 'morevalue' }, - { key: ['value'] }, - { key: { some: 'value' } }, - { key: { key: 'value' } }, - { some: 'value' }, - ], - results: [{ key: 'value' }], - consensus: true, - }, - { - title: 'filter_expression_with_equals_string_with_dot_literal', - query: '$[?(@.key=="some.value")]', - payload: [{ key: 'some' }, { key: 'value' }, { key: 'some.value' }], - results: [{ key: 'some.value' }], - consensus: true, - }, - { - title: 'filter_expression_with_equals_on_array_of_numbers', - query: '$[?(@==42)]', - payload: [0, 42, -1, 41, 43, 42.0001, 41.9999, null, 100], - results: [42], - consensus: true, - }, - { - title: 'filter_expression_with_equals_on_object_with_key_matching_query', - query: '$[?(@.id==2)]', - payload: { - id: 2, - }, - results: [ - { - id: 2, - }, - ], - consensus: true, - }, - { - title: 'filter_expression_with_equals_object', - query: '$[?(@.d=={"k":"v"})]', - payload: [ - { d: { k: 'v' } }, - { d: { a: 'b' } }, - { d: 'k' }, - { d: 'v' }, - { d: {} }, - { d: [] }, - { d: null }, - { d: -1 }, - { d: 0 }, - { d: 1 }, - { d: '[object Object]' }, - { d: '{"k": "v"}' }, - { d: '{"k":"v"}' }, - 'v', - ], - results: [{ d: { k: 'v' } }], - consensus: false, - }, - { - title: 'filter_expression_with_equals_string_with_current_object_literal', - query: '$[?(@.key=="hi@example.com")]', - payload: [ - { - key: 'some', - }, - { - key: 'value', - }, - { - key: 'hi@example.com', - }, - ], - results: [ - { - key: 'hi@example.com', - }, - ], - consensus: true, - }, - { - title: 'filter_expression_with_equals_string_with_single_quotes', - query: "$[?(@.key=='value')]", - payload: [{ key: 'some' }, { key: 'value' }], - results: [{ key: 'value' }], - consensus: true, - }, - { - title: 'filter_expression_with_equals_true', - query: '$[?(@.key==true)]', - payload: [ - { some: 'some value' }, - { key: true }, - { key: false }, - { key: null }, - { key: 'value' }, - { key: '' }, - { key: 0 }, - { key: 1 }, - { key: -1 }, - { key: 42 }, - { key: {} }, - { key: [] }, - ], - results: [ - { - key: true, - }, - ], - consensus: false, - }, - { - title: 'filter_expression_with_equals_with_path_and_path', - query: '$[?(@.key1==@.key2)]', - payload: [ - { key1: 10, key2: 10 }, - { key1: 42, key2: 50 }, - { key1: 10 }, - { key2: 10 }, - {}, - { key1: null, key2: null }, - { key1: null }, - { key2: null }, - { key1: 0, key2: 0 }, - { key1: 0 }, - { key2: 0 }, - { key1: -1, key2: -1 }, - { key1: '', key2: '' }, - { key1: false, key2: false }, - { key1: false }, - { key2: false }, - { key1: true, key2: true }, - { key1: [], key2: [] }, - { key1: {}, key2: {} }, - { key1: { a: 1, b: 2 }, key2: { b: 2, a: 1 } }, - ], - results: [ - { - key1: 10, - key2: 10, - }, - {}, - { - key1: null, - key2: null, - }, - { - key1: 0, - key2: 0, - }, - { - key1: -1, - key2: -1, - }, - { - key1: '', - key2: '', - }, - { - key1: false, - key2: false, - }, - { - key1: true, - key2: true, - }, - { - key1: [], - key2: [], - }, - { - key1: {}, - key2: {}, - }, - { - key1: { - a: 1, - b: 2, - }, - key2: { - b: 2, - a: 1, - }, - }, - ], - consensus: false, - }, - { - title: 'filter_expression_with_in_array_of_values', - query: '$[?(@.d in [2, 3])]', - payload: [{ d: 1 }, { d: 2 }, { d: 1 }, { d: 3 }, { d: 4 }], - results: [ - { - d: 2, - }, - { - d: 3, - }, - ], - consensus: false, - }, - { - title: 'filter_expression_with_equals_string_with_unicode_character_escape', - query: '$[?(@.key=="Mot\\u00f6rhead")]', - payload: [ - { key: 'something' }, - { key: 'Motörhead' }, - { key: 'motörhead' }, - { key: 'Motorhead' }, - { key: 'Motoörhead' }, - { key: 'motoörhead' }, - ], - results: [], - consensus: false, - }, - { - title: 'filter_expression_with_greater_than_or_equal', - query: '$[?(@.key>=42)]', - payload: [ - { key: 0 }, - { key: 42 }, - { key: -1 }, - { key: 41 }, - { key: 43 }, - { key: 42.0001 }, - { key: 41.9999 }, - { key: 100 }, - { key: '43' }, - { key: '42' }, - { key: '41' }, - { key: 'value' }, - { some: 'value' }, - ], - results: [ - { - key: 42, - }, - { - key: 43, - }, - { - key: 42.0001, - }, - { - key: 100, - }, - ], - consensus: false, - }, - { - title: 'filter_expression_with_in_current_object', - query: '$[?(2 in @.d)]', - payload: [{ d: [1, 2, 3] }, { d: [2] }, { d: [1] }, { d: [3, 4] }, { d: [4, 2] }], - results: [{ d: [1, 2, 3] }, { d: [2] }, { d: [4, 2] }], - consensus: false, - }, - { - title: 'filter_expression_with_greater_than_string', - query: '$[?(@.key>"VALUE")]', - payload: [ - { key: 0 }, - { key: 42 }, - { key: -1 }, - { key: 41 }, - { key: 43 }, - { key: 42.0001 }, - { key: 41.9999 }, - { key: 100 }, - { key: '43' }, - { key: '42' }, - { key: '41' }, - { key: 'alpha' }, - { key: 'ALPHA' }, - { key: 'value' }, - { key: 'VALUE' }, - { some: 'value' }, - { some: 'VALUE' }, - ], - results: [ - { - key: 'alpha', - }, - { - key: 'value', - }, - ], - consensus: true, - }, - { - title: 'filter_expression_with_less_than', - query: '$[?(@.key<42)]', - payload: [ - { key: 0 }, - { key: 42 }, - { key: -1 }, - { key: 41 }, - { key: 43 }, - { key: 42.0001 }, - { key: 41.9999 }, - { key: 100 }, - { key: '43' }, - { key: '42' }, - { key: '41' }, - { key: 'value' }, - { some: 'value' }, - ], - results: [{ key: 0 }, { key: -1 }, { key: 41 }, { key: 41.9999 }], - consensus: false, - }, - { - title: 'filter_expression_with_greater_than', - query: '$[?(@.key>42)]', - payload: [ - { key: 0 }, - { key: 42 }, - { key: -1 }, - { key: 41 }, - { key: 43 }, - { key: 42.0001 }, - { key: 41.9999 }, - { key: 100 }, - { key: '43' }, - { key: '42' }, - { key: '41' }, - { key: 'value' }, - { some: 'value' }, - ], - results: [{ key: 43 }, { key: 42.0001 }, { key: 100 }], - consensus: false, - }, - { - title: 'filter_expression_with_length_function', - query: '$[?(@.length() == 4)]', - payload: [ - [1, 2, 3, 4, 5], - [1, 2, 3, 4], - [1, 2, 3], - ], - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'filter_expression_with_length_free_function', - query: '$[?(length(@) == 4)]', - payload: [ - [1, 2, 3, 4, 5], - [1, 2, 3, 4], - [1, 2, 3], - ], - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'filter_expression_with_length_property', - query: '$[?(@.length == 4)]', - payload: [ - [1, 2, 3, 4, 5], - [1, 2, 3, 4], - [1, 2, 3], - ], - results: [], - consensus: true, - }, - { - title: 'filter_expression_with_less_than_or_equal', - query: '$[?(@.key<=42)]', - payload: [ - { key: 0 }, - { key: 42 }, - { key: -1 }, - { key: 41 }, - { key: 43 }, - { key: 42.0001 }, - { key: 41.9999 }, - { key: 100 }, - { key: '43' }, - { key: '42' }, - { key: '41' }, - { key: 'value' }, - { some: 'value' }, - ], - results: [{ key: 0 }, { key: 42 }, { key: -1 }, { key: 41 }, { key: 41.9999 }], - consensus: false, - }, - { - title: 'filter_expression_with_local_dot_key_and_null_in_data', - query: "$[?(@.key='value')]", - payload: [ - { - key: 0, - }, - { - key: 'value', - }, - null, - { - key: 42, - }, - { - some: 'value', - }, - ], - results: 'NOT_SUPPORTED', - consensus: true, - }, - { - title: 'filter_expression_with_multiplication', - query: '$[?(@.key*2==100)]', - payload: [{ key: 60 }, { key: 50 }, { key: 10 }, { key: -50 }, { 'key*2': 100 }], - results: [{ key: 50 }], - consensus: false, - }, - { - title: 'filter_expression_with_negation_and_without_value', - query: '$[?(!@.key)]', - payload: [ - { some: 'some value' }, - { key: true }, - { key: false }, - { key: null }, - { key: 'value' }, - { key: '' }, - { key: 0 }, - { key: 1 }, - { key: -1 }, - { key: 42 }, - { key: {} }, - { key: [] }, - ], - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'filter_expression_with_negation_and_less_than', - query: '$[?(!(@.key<42))]', - payload: [ - { key: 0 }, - { key: 42 }, - { key: -1 }, - { key: 41 }, - { key: 43 }, - { key: 42.0001 }, - { key: 41.9999 }, - { key: 100 }, - { key: '43' }, - { key: '42' }, - { key: '41' }, - { key: 'value' }, - { some: 'value' }, - ], - results: [ - { key: 42 }, - { key: 43 }, - { key: 42.0001 }, - { key: 100 }, - { key: '43' }, - { key: '42' }, - { key: '41' }, - { key: 'value' }, - { some: 'value' }, - ], - consensus: false, - }, - { - title: 'filter_expression_with_negation_and_equals', - query: '$[?(!(@.key==42))]', - payload: [ - { key: 0 }, - { key: 42 }, - { key: -1 }, - { key: 41 }, - { key: 43 }, - { key: 42.0001 }, - { key: 41.9999 }, - { key: 100 }, - { key: '43' }, - { key: '42' }, - { key: '41' }, - { key: 'value' }, - { some: 'value' }, - ], - results: [ - { key: 0 }, - { key: -1 }, - { key: 41 }, - { key: 43 }, - { key: 42.0001 }, - { key: 41.9999 }, - { key: 100 }, - { key: '43' }, - { key: '42' }, - { key: '41' }, - { key: 'value' }, - { some: 'value' }, - ], - consensus: false, - }, - { - title: 'filter_expression_with_parent_axis_operator', - query: '$[*].bookmarks[?(@.page == 45)]^^^', - payload: [ - { title: 'Sayings of the Century', bookmarks: [{ page: 40 }] }, - { title: 'Sword of Honour', bookmarks: [{ page: 35 }, { page: 45 }] }, - { title: 'Moby Dick', bookmarks: [{ page: 3035 }, { page: 45 }] }, - ], - results: 'NOT_SUPPORTED', - consensus: true, - }, - { - title: 'filter_expression_with_not_equals_array_or_equals_true', - query: '$[?((@.d!=["v1","v2"]) || (@.d == true))]', - payload: [{ d: ['v1', 'v2'] }, { d: ['a', 'b'] }, { d: true }], - results: [{ d: ['a', 'b'] }, { d: true }], - consensus: false, - }, - { - title: 'filter_expression_with_non_singular_existence_test', - query: '$[?(@.a.*)]', - payload: [ - { a: 0 }, - { a: 'x' }, - { a: false }, - { a: true }, - { a: null }, - { a: [] }, - { a: [1] }, - { a: [1, 2] }, - { a: {} }, - { a: { x: 'y' } }, - { a: { x: 'y', w: 'z' } }, - ], - results: [ - { a: 0 }, - { a: 'x' }, - { a: false }, - { a: true }, - { a: null }, - { a: [] }, - { a: [1] }, - { a: [1, 2] }, - { a: {} }, - { a: { x: 'y' } }, - { a: { x: 'y', w: 'z' } }, - ], - consensus: false, - }, - { - title: 'filter_expression_with_negation_and_equals_array_or_equals_true', - query: '$[?(!(@.d==["v1","v2"]) || (@.d == true))]', - payload: [{ d: ['v1', 'v2'] }, { d: ['a', 'b'] }, { d: true }], - results: [{ d: ['a', 'b'] }, { d: true }], - consensus: false, - }, - { - title: 'filter_expression_with_not_equals', - query: '$[?(@.key!=42)]', - payload: [ - { key: 0 }, - { key: 42 }, - { key: -1 }, - { key: 1 }, - { key: 41 }, - { key: 43 }, - { key: 42.0001 }, - { key: 41.9999 }, - { key: 100 }, - { key: 'some' }, - { key: '42' }, - { key: null }, - { key: 420 }, - { key: '' }, - { key: {} }, - { key: [] }, - { key: [42] }, - { key: { key: 42 } }, - { key: { some: 42 } }, - { some: 'value' }, - ], - results: [ - { key: 0 }, - { key: -1 }, - { key: 1 }, - { key: 41 }, - { key: 43 }, - { key: 42.0001 }, - { key: 41.9999 }, - { key: 100 }, - { key: 'some' }, - { key: '42' }, - { key: null }, - { key: 420 }, - { key: '' }, - { key: {} }, - { key: [] }, - { key: [42] }, - { key: { key: 42 } }, - { key: { some: 42 } }, - { some: 'value' }, - ], - consensus: false, - }, - { - title: 'filter_expression_with_set_wise_comparison_to_set', - query: '$.x[?(@[*]>=$.y[*])]', - payload: { - x: [ - [1, 2], - [3, 4], - [5, 6], - ], - y: [3, 4, 5], - }, - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'filter_expression_with_equals_with_root_reference', - query: '$.items[?(@.key==$.value)]', - payload: { value: 42, items: [{ key: 10 }, { key: 42 }, { key: 50 }] }, - results: [{ key: 42 }], - consensus: true, - }, - { - title: 'filter_expression_with_regular_expression_from_member', - query: '$[?(@.name=~/@.pattern/)]', - payload: [ - { name: 'hullo world' }, - { name: 'hello world' }, - { name: 'yes hello world' }, - { name: 'HELLO WORLD' }, - { name: 'good bye' }, - { pattern: 'hello.*' }, - ], - results: [], - consensus: false, - }, - { - title: 'filter_expression_with_single_equal', - query: '$[?(@.key=42)]', - payload: [ - { key: 0 }, - { key: 42 }, - { key: -1 }, - { key: 1 }, - { key: 41 }, - { key: 43 }, - { key: 42.0001 }, - { key: 41.9999 }, - { key: 100 }, - { key: 'some' }, - { key: '42' }, - { key: null }, - { key: 420 }, - { key: '' }, - { key: {} }, - { key: [] }, - { key: [42] }, - { key: { key: 42 } }, - { key: { some: 42 } }, - { some: 'value' }, - ], - results: 'NOT_SUPPORTED', - consensus: true, - }, - { - title: 'filter_expression_with_subpaths', - query: '$[?(@.a.b==3)]', - payload: [{ a: { b: 3 } }, { a: { b: 2 } }], - results: [{ a: { b: 3 } }], - consensus: true, - }, - { - title: 'filter_expression_with_subpaths_deeply_nested', - query: '$[?(@.a.b.c==3)]', - payload: [{ a: { b: { c: 3 } } }, { a: 3 }, { c: 3 }, { a: { b: { c: 2 } } }], - results: [{ a: { b: { c: 3 } } }], - consensus: true, - }, - { - title: 'filter_expression_with_subfilter', - query: '$[?(@.a[?(@.price>10)])]', - payload: [ - { a: [{ price: 1 }, { price: 3 }] }, - { a: [{ price: 11 }] }, - { a: [{ price: 8 }, { price: 12 }, { price: 3 }] }, - { a: [] }, - ], - results: [ - { a: [{ price: 1 }, { price: 3 }] }, - { a: [{ price: 11 }] }, - { a: [{ price: 8 }, { price: 12 }, { price: 3 }] }, - { a: [] }, - ], - consensus: false, - }, - { - title: 'filter_expression_with_tautological_comparison', - query: '$[?(1==1)]', - payload: [1, 3, 'nice', true, null, false, {}, [], -1, 0, ''], - results: [1, 3, 'nice', true, null, false, {}, [], -1, 0, ''], - consensus: true, - }, - { - title: 'filter_expression_with_set_wise_comparison_to_scalar', - query: '$[?(@[*]>=4)]', - payload: [ - [1, 2], - [3, 4], - [5, 6], - ], - results: [], - consensus: false, - }, - { - title: 'filter_expression_with_subtraction', - query: '$[?(@.key-50==-100)]', - payload: [{ key: 60 }, { key: 50 }, { key: 10 }, { key: -50 }, { 'key-50': -100 }], - results: [{ key: -50 }], - consensus: false, - }, - { - title: 'filter_expression_with_regular_expression', - query: '$[?(@.name=~/hello.*/)]', - payload: [ - { name: 'hullo world' }, - { name: 'hello world' }, - { name: 'yes hello world' }, - { name: 'HELLO WORLD' }, - { name: 'good bye' }, - ], - results: [{ name: 'hello world' }, { name: 'yes hello world' }], - consensus: false, - }, - { - title: 'filter_expression_with_triple_equal', - query: '$[?(@.key===42)]', - payload: [ - { key: 0 }, - { key: 42 }, - { key: -1 }, - { key: 1 }, - { key: 41 }, - { key: 43 }, - { key: 42.0001 }, - { key: 41.9999 }, - { key: 100 }, - { key: 'some' }, - { key: '42' }, - { key: null }, - { key: 420 }, - { key: '' }, - { key: {} }, - { key: [] }, - { key: [42] }, - { key: { key: 42 } }, - { key: { some: 42 } }, - { some: 'value' }, - ], - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'filter_expression_with_value', - query: '$[?(@.key)]', - payload: [ - { some: 'some value' }, - { key: true }, - { key: false }, - { key: null }, - { key: 'value' }, - { key: '' }, - { key: 0 }, - { key: 1 }, - { key: -1 }, - { key: 42 }, - { key: {} }, - { key: [] }, - ], - results: [ - { key: true }, - { key: false }, - { key: null }, - { key: 'value' }, - { key: '' }, - { key: 0 }, - { key: 1 }, - { key: -1 }, - { key: 42 }, - { key: {} }, - { key: [] }, - ], - consensus: false, - }, - { - title: 'filter_expression_with_value_after_dot_notation_with_wildcard_on_array_of_objects', - query: '$.*[?(@.key)]', - payload: [{ some: 'some value' }, { key: 'value' }], - results: [{ key: 'value' }], - consensus: true, - isCustom: true, - }, - { - title: 'filter_expression_with_value_after_recursive_descent', - query: '$..[?(@.id)]', - payload: { id: 2, more: [{ id: 2 }, { more: { id: 2 } }, { id: { id: 2 } }, [{ id: 2 }]] }, - results: [ - { id: 2, more: [{ id: 2 }, { more: { id: 2 } }, { id: { id: 2 } }, [{ id: 2 }]] }, - { id: 2 }, - { id: 2 }, - { id: { id: 2 } }, - { id: 2 }, - { id: 2 }, - ], - consensus: false, - }, - { - title: 'filter_expression_with_value_false', - query: '$[?(false)]', - payload: [1, 3, 'nice', true, null, false, {}, [], -1, 0, ''], - results: [], - consensus: false, - }, - { - title: 'filter_expression_with_value_true', - query: '$[?(true)]', - payload: [1, 3, 'nice', true, null, false, {}, [], -1, 0, ''], - results: [1, 3, 'nice', true, null, false, {}, [], -1, 0, ''], - consensus: false, - }, - { - title: 'filter_expression_with_value_null', - query: '$[?(null)]', - payload: [1, 3, 'nice', true, null, false, {}, [], -1, 0, ''], - results: [], - consensus: false, - }, - { - title: 'filter_expression_with_value_from_recursive_descent', - query: '$[?(@..child)]', - payload: [ - { key: [{ child: 1 }, { child: 2 }] }, - { key: [{ child: 2 }] }, - { key: [{}] }, - { key: [{ something: 42 }] }, - {}, - ], - results: [ - { key: [{ child: 1 }, { child: 2 }] }, - { key: [{ child: 2 }] }, - { key: [{}] }, - { key: [{ something: 42 }] }, - {}, - ], - consensus: false, - }, - { - title: 'filter_expression_without_value', - query: '$[?(@.key)]', - payload: [ - { some: 'some value' }, - { key: true }, - { key: false }, - { key: null }, - { key: 'value' }, - { key: '' }, - { key: 0 }, - { key: 1 }, - { key: -1 }, - { key: 42 }, - { key: {} }, - { key: [] }, - ], - results: [ - { key: true }, - { key: false }, - { key: null }, - { key: 'value' }, - { key: '' }, - { key: 0 }, - { key: 1 }, - { key: -1 }, - { key: 42 }, - { key: {} }, - { key: [] }, - ], - consensus: false, - }, - { - title: 'function_sum', - query: '$.data.sum()', - payload: { data: [1, 2, 3, 4] }, - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'parens_notation', - query: '$(key,more)', - payload: { key: 1, some: 2, more: 3 }, - results: 'NOT_SUPPORTED', - consensus: true, - }, - { - title: 'root', - query: '$', - payload: { key: 'value', 'another key': { complex: ['a', 1] } }, - results: [{ 'another key': { complex: ['a', 1] }, key: 'value' }], - consensus: true, - }, - { - title: 'recursive_descent_after_dot_notation', - query: '$.key..', - payload: { 'some key': 'value', key: { complex: 'string', primitives: [0, 1] } }, - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'filter_expression_without_parens', - query: '$[?@.key==42]', - payload: [ - { key: 0 }, - { key: 42 }, - { key: -1 }, - { key: 1 }, - { key: 41 }, - { key: 43 }, - { key: 42.0001 }, - { key: 41.9999 }, - { key: 100 }, - { key: 'some' }, - { key: '42' }, - { key: null }, - { key: 420 }, - { key: '' }, - { key: {} }, - { key: [] }, - { key: [42] }, - { key: { key: 42 } }, - { key: { some: 42 } }, - { some: 'value' }, - ], - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'recursive_descent', - query: '$..', - payload: [{ a: { b: 'c' } }, [0, 1]], - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'recursive_descent_on_nested_arrays', - query: '$..*', - payload: [[0], [1]], - results: [[0], [1], 0, 1], - consensus: true, - }, - { title: 'root_on_scalar', query: '$', payload: 42, results: [42], consensus: true }, - { title: 'root_on_scalar_true', query: '$', payload: true, results: [true], consensus: true }, - { - title: 'union', - query: '$[0,1]', - payload: ['first', 'second', 'third'], - results: ['first', 'second'], - consensus: true, - }, - { - title: 'union_with_duplication_from_object', - query: "$['a','a']", - payload: { a: 1 }, - results: [1, 1], - consensus: true, - }, - { title: 'union_with_duplication_from_array', query: '$[0,0]', payload: ['a'], results: ['a', 'a'], consensus: true }, - { - title: 'script_expression', - query: '$[(@.length-1)]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: 'NOT_SUPPORTED', - consensus: true, - }, - { - title: 'union_with_keys', - query: "$['key','another']", - payload: { key: 'value', another: 'entry' }, - results: ['value', 'entry'], - consensus: true, - }, - { - title: 'union_with_keys_after_array_slice', - query: "$[:]['c','d']", - payload: [ - { c: 'cc1', d: 'dd1', e: 'ee1' }, - { c: 'cc2', d: 'dd2', e: 'ee2' }, - ], - results: ['cc1', 'dd1', 'cc2', 'dd2'], - consensus: true, - }, - { - title: 'union_with_keys_after_bracket_notation', - query: "$[0]['c','d']", - payload: [ - { c: 'cc1', d: 'dd1', e: 'ee1' }, - { c: 'cc2', d: 'dd2', e: 'ee2' }, - ], - results: ['cc1', 'dd1'], - consensus: true, - }, - { - title: 'union_with_keys_on_object_without_key', - query: "$['missing','key']", - payload: { key: 'value', another: 'entry' }, - results: ['value'], - consensus: true, - }, - { title: 'root_on_scalar_false', query: '$', payload: false, results: [false], consensus: true }, - { - title: 'union_with_keys_after_recursive_descent', - query: "$..['c','d']", - payload: [ - { c: 'cc1', d: 'dd1', e: 'ee1' }, - { c: 'cc2', child: { d: 'dd2' } }, - { c: 'cc3' }, - { d: 'dd4' }, - { child: { c: 'cc5' } }, - ], - results: ['cc1', 'dd1', 'cc2', 'dd2', 'cc3', 'dd4', 'cc5'], - consensus: true, - }, - { - title: 'union_with_keys_after_dot_notation_with_wildcard', - query: "$.*['c','d']", - payload: [ - { c: 'cc1', d: 'dd1', e: 'ee1' }, - { c: 'cc2', d: 'dd2', e: 'ee2' }, - ], - results: ['cc1', 'dd1', 'cc2', 'dd2'], - consensus: true, - }, - { - title: 'union_with_filter', - query: '$[?(@.key<3),?(@.key>6)]', - payload: [{ key: 1 }, { key: 8 }, { key: 3 }, { key: 10 }, { key: 7 }, { key: 2 }, { key: 6 }, { key: 4 }], - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'union_with_slice_and_number', - query: '$[1:3,4]', - payload: [1, 2, 3, 4, 5], - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'union_with_spaces', - query: '$[ 0 , 1 ]', - payload: ['first', 'second', 'third'], - results: ['first', 'second'], - consensus: true, - }, - { - title: 'union_with_repeated_matches_after_dot_notation_with_wildcard', - query: '$.*[0,:5]', - payload: { - a: ['string', null, true], - b: [false, 'string', 5.4], - }, - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'union_with_wildcard_and_number', - query: '$[*,1]', - payload: ['first', 'second', 'third', 'forth', 'fifth'], - results: 'NOT_SUPPORTED', - consensus: false, - }, - { - title: 'union_with_numbers_in_decreasing_order', - query: '$[4,1]', - payload: [1, 2, 3, 4, 5], - results: [5, 2], - consensus: true, - }, -]; +/** + * Groups tests by their category prefix (e.g., 'array_slice', 'bracket_notation') + */ +function groupTestsByCategory(tests: ConsensusTest[]): Record { + const categories: Record = {}; -describe('test_suits', () => { - testSuits.forEach(({ title, query: q, payload, results }) => { - it(title, (done) => { - if (results === 'NOT_SUPPORTED') { - expect(() => { - return query(payload, q, { returnArray: true }); - }).to.throw(Error); - done(); - } else { - const res = query(payload, q, { returnArray: true }); - expect(res).to.deep.equal(results); - done(); + for (const test of tests) { + // Extract category from test ID (first two words separated by underscore) + const category = test.id.split('_').slice(0, 2).join('_'); + + if (!categories[category]) { + categories[category] = []; + } + categories[category].push(test); + } + + return categories; +} + +/** + * Formats category name for display (e.g., 'array_slice' -> 'Array Slice') + */ +function formatCategoryName(category: string): string { + return category + .split('_') + .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) + .join(' '); +} + +describe('JSON Path Comparison - Consensus Tests', () => { + const categories = groupTestsByCategory(consensusTests); + + for (const [category, tests] of Object.entries(categories)) { + describe(formatCategoryName(category), () => { + for (const test of tests) { + const testTitle = `${test.selector}`; + + if (test.consensus === 'NOT_SUPPORTED') { + it.skip(`${testTitle} (no consensus)`); + continue; + } + + if (test.skip) { + it.skip(`${testTitle} (${test.skipReason || 'differs from consensus'})`); + continue; + } + + it(testTitle, () => { + let result: unknown[]; + + try { + result = query(test.document, test.selector, { returnArray: true }) as unknown[]; + } catch { + // Parsing failed - treat as empty result for unsupported syntax + result = []; + } + + expect(result).to.deep.equal( + test.consensus, + `Query: ${test.selector}\nDocument: ${JSON.stringify(test.document)}` + ); + }); } }); - }); + } }); diff --git a/tests/data/consensus-tests.ts b/tests/data/consensus-tests.ts new file mode 100644 index 0000000..3d70c0e --- /dev/null +++ b/tests/data/consensus-tests.ts @@ -0,0 +1,1669 @@ +/** + * JSON Path Comparison Consensus Test Suite + * Source: https://github.com/cburgmer/json-path-comparison + * + * These tests represent the consensus behavior across multiple JSONPath implementations. + */ + +export interface ConsensusTest { + id: string; + selector: string; + document: unknown; + consensus: unknown[] | 'NOT_SUPPORTED'; + /** Skip this test - jsonpathly intentionally handles it differently */ + skip?: boolean; + /** Reason for skipping */ + skipReason?: string; +} + +export const consensusTests: ConsensusTest[] = [ + // ============================================ + // ARRAY SLICE TESTS + // ============================================ + { + id: 'array_slice', + selector: '$[1:3]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: ['second', 'third'], + }, + { + id: 'array_slice_on_exact_match', + selector: '$[0:5]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: ['first', 'second', 'third', 'forth', 'fifth'], + }, + { + id: 'array_slice_on_non_overlapping_array', + selector: '$[7:10]', + document: ['first', 'second', 'third'], + consensus: [], + }, + { + id: 'array_slice_on_object', + selector: '$[1:3]', + document: { ':': 42, more: 'string', a: 1, b: 2, c: 3, '1:3': 'nice' }, + consensus: [], + }, + { + id: 'array_slice_on_partially_overlapping_array', + selector: '$[1:10]', + document: ['first', 'second', 'third'], + consensus: ['second', 'third'], + }, + { + id: 'array_slice_with_large_number_for_end', + selector: '$[2:113667776004]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: ['third', 'forth', 'fifth'], + }, + { + id: 'array_slice_with_large_number_for_start', + selector: '$[-113667776004:2]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: ['first', 'second'], + }, + { + id: 'array_slice_with_large_number_for_start_end_negative_step', + selector: '$[113667776004:2:-1]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: [], + skip: true, + skipReason: 'jsonpathly follows RFC 9535 negative step semantics', + }, + { + id: 'array_slice_with_large_number_for_end_and_negative_step', + selector: '$[2:-113667776004:-1]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: [], + skip: true, + skipReason: 'jsonpathly follows RFC 9535 negative step semantics', + }, + { + id: 'array_slice_with_negative_start_and_end_and_range_of_-1', + selector: '$[-4:-5]', + document: [2, 'a', 4, 5, 100, 'nice'], + consensus: [], + }, + { + id: 'array_slice_with_negative_start_and_end_and_range_of_0', + selector: '$[-4:-4]', + document: [2, 'a', 4, 5, 100, 'nice'], + consensus: [], + }, + { + id: 'array_slice_with_negative_start_and_end_and_range_of_1', + selector: '$[-4:-3]', + document: [2, 'a', 4, 5, 100, 'nice'], + consensus: [4], + }, + { + id: 'array_slice_with_negative_start_and_positive_end_and_range_of_-1', + selector: '$[-4:1]', + document: [2, 'a', 4, 5, 100, 'nice'], + consensus: [], + }, + { + id: 'array_slice_with_negative_start_and_positive_end_and_range_of_0', + selector: '$[-4:2]', + document: [2, 'a', 4, 5, 100, 'nice'], + consensus: [], + }, + { + id: 'array_slice_with_negative_start_and_positive_end_and_range_of_1', + selector: '$[-4:3]', + document: [2, 'a', 4, 5, 100, 'nice'], + consensus: [4], + }, + { + id: 'array_slice_with_negative_step', + selector: '$[3:0:-2]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: [], + skip: true, + skipReason: 'jsonpathly follows RFC 9535 negative step semantics', + }, + { + id: 'array_slice_with_negative_step_and_start_greater_than_end', + selector: '$[0:3:-2]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: [], + skip: true, + skipReason: 'jsonpathly follows RFC 9535 negative step semantics', + }, + { + id: 'array_slice_with_negative_step_on_partially_overlapping_array', + selector: '$[7:3:-1]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: [], + skip: true, + skipReason: 'jsonpathly follows RFC 9535 negative step semantics', + }, + { + id: 'array_slice_with_negative_step_only', + selector: '$[::-2]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: [], + skip: true, + skipReason: 'jsonpathly follows RFC 9535 negative step semantics', + }, + { + id: 'array_slice_with_open_end', + selector: '$[1:]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: ['second', 'third', 'forth', 'fifth'], + }, + { + id: 'array_slice_with_open_end_and_negative_step', + selector: '$[3::-1]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: [], + skip: true, + skipReason: 'jsonpathly follows RFC 9535 negative step semantics', + }, + { + id: 'array_slice_with_open_start', + selector: '$[:2]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: ['first', 'second'], + }, + { + id: 'array_slice_with_open_start_and_end', + selector: '$[:]', + document: ['first', 'second'], + consensus: ['first', 'second'], + }, + { + id: 'array_slice_with_open_start_and_end_and_step_empty', + selector: '$[::]', + document: ['first', 'second'], + consensus: ['first', 'second'], + }, + { + id: 'array_slice_with_open_start_and_end_on_object', + selector: '$[:]', + document: { ':': 42, more: 'string' }, + consensus: [], + }, + { + id: 'array_slice_with_open_start_and_negative_step', + selector: '$[:2:-1]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: [], + skip: true, + skipReason: 'jsonpathly follows RFC 9535 negative step semantics', + }, + { + id: 'array_slice_with_positive_start_and_negative_end_and_range_of_-1', + selector: '$[3:-4]', + document: [2, 'a', 4, 5, 100, 'nice'], + consensus: [], + }, + { + id: 'array_slice_with_positive_start_and_negative_end_and_range_of_0', + selector: '$[3:-3]', + document: [2, 'a', 4, 5, 100, 'nice'], + consensus: [], + }, + { + id: 'array_slice_with_positive_start_and_negative_end_and_range_of_1', + selector: '$[3:-2]', + document: [2, 'a', 4, 5, 100, 'nice'], + consensus: [5], + }, + { + id: 'array_slice_with_range_of_-1', + selector: '$[2:1]', + document: ['first', 'second', 'third', 'forth'], + consensus: [], + }, + { + id: 'array_slice_with_range_of_0', + selector: '$[0:0]', + document: ['first', 'second'], + consensus: [], + }, + { + id: 'array_slice_with_range_of_1', + selector: '$[0:1]', + document: ['first', 'second'], + consensus: ['first'], + }, + { + id: 'array_slice_with_start_-1_and_open_end', + selector: '$[-1:]', + document: ['first', 'second', 'third'], + consensus: ['third'], + }, + { + id: 'array_slice_with_start_-2_and_open_end', + selector: '$[-2:]', + document: ['first', 'second', 'third'], + consensus: ['second', 'third'], + }, + { + id: 'array_slice_with_start_large_negative_number_and_open_end_on_short_array', + selector: '$[-4:]', + document: ['first', 'second', 'third'], + consensus: ['first', 'second', 'third'], + }, + { + id: 'array_slice_with_step', + selector: '$[0:3:2]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: ['first', 'third'], + }, + { + id: 'array_slice_with_step_0', + selector: '$[0:3:0]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: ['first', 'second', 'third'], + skip: true, + skipReason: 'RFC 9535 Section 2.3.4.2: step=0 is invalid and returns empty', + }, + { + id: 'array_slice_with_step_1', + selector: '$[0:3:1]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: ['first', 'second', 'third'], + }, + { + id: 'array_slice_with_step_and_leading_zeros', + selector: '$[010:024:010]', + document: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], + consensus: [10, 20], + }, + { + id: 'array_slice_with_step_but_end_not_aligned', + selector: '$[0:4:2]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: ['first', 'third'], + }, + { + id: 'array_slice_with_step_empty', + selector: '$[1:3:]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: ['second', 'third'], + }, + { + id: 'array_slice_with_step_only', + selector: '$[::2]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: ['first', 'third', 'fifth'], + }, + + // ============================================ + // BRACKET NOTATION TESTS + // ============================================ + { + id: 'bracket_notation', + selector: "$['key']", + document: { key: 'value' }, + consensus: ['value'], + }, + { + id: 'bracket_notation_after_recursive_descent', + selector: '$..[0]', + document: ['first', { key: ['first nested', { more: [{ nested: ['deepest', 'second'] }, ['more', 'values']] }] }], + consensus: ['first', 'first nested', { nested: ['deepest', 'second'] }, 'deepest', 'more'], + }, + { + id: 'bracket_notation_on_object_without_key', + selector: "$['missing']", + document: { key: 'value' }, + consensus: [], + }, + { + id: 'bracket_notation_with_NFC_path_on_NFD_key', + selector: "$['ü']", + document: { ü: 42 }, + consensus: [], + skip: true, + skipReason: 'jsonpathly normalizes Unicode (NFC/NFD treated as equal)', + }, + { + id: 'bracket_notation_with_dot', + selector: "$['two.some']", + document: { one: { key: 'value' }, two: { some: 'more', key: 'other value' }, 'two.some': '42' }, + consensus: ['42'], + }, + { + id: 'bracket_notation_with_double_quotes', + selector: '$["key"]', + document: { key: 'value' }, + consensus: ['value'], + }, + { + id: 'bracket_notation_with_empty_path', + selector: '$[]', + document: { '': 42, "''": 123, '""': 222 }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'bracket_notation_with_empty_string', + selector: "$['']", + document: { '': 42, "''": 123, '""': 222 }, + consensus: [42], + }, + { + id: 'bracket_notation_with_empty_string_doubled_quoted', + selector: '$[""]', + document: { '': 42, "''": 123, '""': 222 }, + consensus: [42], + }, + { + id: 'bracket_notation_with_negative_number_on_short_array', + selector: '$[-2]', + document: ['one element'], + consensus: [], + }, + { + id: 'bracket_notation_with_number', + selector: '$[2]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: ['third'], + }, + { + id: 'bracket_notation_with_number_-1', + selector: '$[-1]', + document: ['first', 'second', 'third'], + consensus: ['third'], + }, + { + id: 'bracket_notation_with_number_-1_on_empty_array', + selector: '$[-1]', + document: [], + consensus: [], + }, + { + id: 'bracket_notation_with_number_0', + selector: '$[0]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: ['first'], + }, + { + id: 'bracket_notation_with_number_after_dot_notation_with_wildcard_on_nested_arrays_with_different_length', + selector: '$.*[1]', + document: [[1], [2, 3]], + consensus: [3], + }, + { + id: 'bracket_notation_with_number_on_object', + selector: '$[0]', + document: { '0': 'value' }, + consensus: [], + skip: true, + skipReason: 'jsonpathly treats $[0] as property access on objects', + }, + { + id: 'bracket_notation_with_number_on_short_array', + selector: '$[1]', + document: ['one element'], + consensus: [], + }, + { + id: 'bracket_notation_with_number_on_string', + selector: '$[0]', + document: 'Hello World', + consensus: [], + }, + { + id: 'bracket_notation_with_quoted_array_slice_literal', + selector: "$[':']", + document: { ':': 'value', another: 'entry' }, + consensus: ['value'], + }, + { + id: 'bracket_notation_with_quoted_closing_bracket_literal', + selector: "$[']']", + document: { ']': 42 }, + consensus: [42], + }, + { + id: 'bracket_notation_with_quoted_current_object_literal', + selector: "$['@']", + document: { '@': 'value', another: 'entry' }, + consensus: ['value'], + }, + { + id: 'bracket_notation_with_quoted_dot_literal', + selector: "$['.']", + document: { '.': 'value', another: 'entry' }, + consensus: ['value'], + }, + { + id: 'bracket_notation_with_quoted_dot_wildcard', + selector: "$['.*']", + document: { key: 42, '.*': 1, '': 10 }, + consensus: [1], + }, + { + id: 'bracket_notation_with_quoted_double_quote_literal', + selector: "$['\"']", + document: { '"': 'value', another: 'entry' }, + consensus: ['value'], + }, + { + id: 'bracket_notation_with_quoted_escaped_backslash', + selector: "$['\\\\']", + document: { '\\': 'value' }, + consensus: ['value'], + }, + { + id: 'bracket_notation_with_quoted_escaped_single_quote', + selector: "$['\\'']", + document: { "'": 'value' }, + consensus: ['value'], + }, + { + id: 'bracket_notation_with_quoted_number_on_object', + selector: "$['0']", + document: { '0': 'value' }, + consensus: ['value'], + }, + { + id: 'bracket_notation_with_quoted_root_literal', + selector: "$['$']", + document: { $: 'value', another: 'entry' }, + consensus: ['value'], + }, + { + id: 'bracket_notation_with_quoted_special_characters_combined', + selector: "$[':@.\"$,*\\'\\\\']", + document: { ':@."$,*\'\\': 42 }, + consensus: [42], + }, + { + id: 'bracket_notation_with_quoted_string_and_unescaped_single_quote', + selector: "$['single'quote']", + document: { "single'quote": 'value' }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'bracket_notation_with_quoted_union_literal', + selector: "$[',']", + document: { ',': 'value', another: 'entry' }, + consensus: ['value'], + }, + { + id: 'bracket_notation_with_quoted_wildcard_literal', + selector: "$['*']", + document: { '*': 'value', another: 'entry' }, + consensus: ['value'], + }, + { + id: 'bracket_notation_with_quoted_wildcard_literal_on_object_without_key', + selector: "$['*']", + document: { another: 'entry' }, + consensus: [], + }, + { + id: 'bracket_notation_with_spaces', + selector: "$[ 'a' ]", + document: { ' a': 1, a: 2, ' a ': 3, 'a ': 4, " 'a' ": 5, " 'a": 6, "a' ": 7, ' "a" ': 8, '"a"': 9 }, + consensus: [2], + }, + { + id: 'bracket_notation_with_string_including_dot_wildcard', + selector: "$['ni.*']", + document: { nice: 42, 'ni.*': 1, mice: 100 }, + consensus: [1], + }, + { + id: 'bracket_notation_with_two_literals_separated_by_dot', + selector: "$['one'].['two']", + document: { one: { two: 'value' }, "one.['two']": 42 }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'bracket_notation_with_two_literals_separated_by_dot_without_quotes', + selector: '$[one].[two]', + document: { one: { two: 'value' }, 'one.[two]': 42 }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'bracket_notation_with_wildcard_after_array_slice', + selector: '$[0:2][*]', + document: [[1, 2], ['a', 'b'], [0, 0]], + consensus: [1, 2, 'a', 'b'], + }, + { + id: 'bracket_notation_with_wildcard_after_dot_notation_after_bracket_notation_with_wildcard', + selector: '$[*].bar[*]', + document: [{ bar: [42] }], + consensus: [42], + }, + { + id: 'bracket_notation_with_wildcard_after_recursive_descent', + selector: '$..[*]', + document: { key: 'value', 'another key': { complex: 'string', primitives: [0, 1] } }, + consensus: ['value', { complex: 'string', primitives: [0, 1] }, 'string', [0, 1], 0, 1], + }, + { + id: 'bracket_notation_with_wildcard_on_array', + selector: '$[*]', + document: ['string', 42, { key: 'value' }, [0, 1]], + consensus: ['string', 42, { key: 'value' }, [0, 1]], + }, + { + id: 'bracket_notation_with_wildcard_on_empty_array', + selector: '$[*]', + document: [], + consensus: [], + }, + { + id: 'bracket_notation_with_wildcard_on_empty_object', + selector: '$[*]', + document: {}, + consensus: [], + }, + { + id: 'bracket_notation_with_wildcard_on_null_value_array', + selector: '$[*]', + document: [40, null, 42], + consensus: [40, null, 42], + }, + { + id: 'bracket_notation_with_wildcard_on_object', + selector: '$[*]', + document: { some: 'string', int: 42, object: { key: 'value' }, array: [0, 1] }, + consensus: ['string', 42, { key: 'value' }, [0, 1]], + }, + { + id: 'bracket_notation_without_quotes', + selector: '$[key]', + document: { key: 'value' }, + consensus: ['value'], + }, + + // ============================================ + // DOT NOTATION TESTS + // ============================================ + { + id: 'dot_bracket_notation', + selector: "$.['key']", + document: { key: 'value', other: 'entry' }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'dot_bracket_notation_with_double_quotes', + selector: '$.["key"]', + document: { key: 'value', other: 'entry' }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'dot_bracket_notation_without_quotes', + selector: '$.[key]', + document: { key: 'value', other: 'entry' }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'dot_notation', + selector: '$.key', + document: { key: 'value' }, + consensus: ['value'], + }, + { + id: 'dot_notation_after_array_slice', + selector: '$[0:2].key', + document: [{ key: 'ey' }, { key: 'bee' }, { key: 'see' }], + consensus: ['ey', 'bee'], + }, + { + id: 'dot_notation_after_bracket_notation_after_recursive_descent', + selector: '$..[0].key', + document: { a: 'first', ary: [{ key: 'value' }, { key: 'other value' }] }, + consensus: ['value'], + }, + { + id: 'dot_notation_after_bracket_notation_with_wildcard', + selector: '$[*].a', + document: [{ a: 1 }, { a: 1 }], + consensus: [1, 1], + }, + { + id: 'dot_notation_after_bracket_notation_with_wildcard_on_one_matching', + selector: '$[*].a', + document: [{ a: 1 }], + consensus: [1], + }, + { + id: 'dot_notation_after_bracket_notation_with_wildcard_on_some_matching', + selector: '$[*].a', + document: [{ a: 1 }, { b: 1 }], + consensus: [1], + }, + { + id: 'dot_notation_after_filter_expression', + selector: '$[?(@.id==42)].name', + document: [{ id: 42, name: 'forty-two' }, { id: 1, name: 'one' }], + consensus: ['forty-two'], + }, + { + id: 'dot_notation_after_recursive_descent', + selector: '$..key', + document: { object: { key: 'value', array: [{ key: 'something' }, { key: { key: 'russian dolls' } }] }, key: 'top' }, + consensus: ['value', 'something', { key: 'russian dolls' }, 'russian dolls', 'top'], + skip: true, + skipReason: 'jsonpathly returns different order for recursive descent', + }, + { + id: 'dot_notation_after_recursive_descent_after_dot_notation', + selector: '$.store..price', + document: { store: { book: [{ category: 'reference', author: 'Nigel Rees', title: 'Sayings of the Century', price: 8.95 }, { category: 'fiction', author: 'Evelyn Waugh', title: 'Sword of Honour', price: 12.99 }, { category: 'fiction', author: 'Herman Melville', title: 'Moby Dick', isbn: '0-553-21311-3', price: 8.99 }, { category: 'fiction', author: 'J. R. R. Tolkien', title: 'The Lord of the Rings', isbn: '0-395-19395-8', price: 22.99 }], bicycle: { color: 'red', price: 19.95 } } }, + consensus: [8.95, 12.99, 8.99, 22.99, 19.95], + }, + { + id: 'dot_notation_after_recursive_descent_with_extra_dot', + selector: '$...key', + document: { object: { key: 'value', array: [{ key: 'something' }, { key: { key: 'russian dolls' } }] }, key: 'top' }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'dot_notation_after_union', + selector: '$[0,2].key', + document: [{ key: 'ey' }, { key: 'bee' }, { key: 'see' }], + consensus: ['ey', 'see'], + }, + { + id: 'dot_notation_after_union_with_keys', + selector: "$['one','three'].key", + document: { one: { key: 'value' }, two: { k: 'v' }, three: { some: 'more', key: 'other value' } }, + consensus: ['value', 'other value'], + }, + { + id: 'dot_notation_on_array', + selector: '$.key', + document: [0, 1], + consensus: [], + }, + { + id: 'dot_notation_on_array_value', + selector: '$.key', + document: { key: ['first', 'second'] }, + consensus: [['first', 'second']], + }, + { + id: 'dot_notation_on_array_with_containing_object_matching_key', + selector: '$.id', + document: [{ id: 2 }], + consensus: [], + }, + { + id: 'dot_notation_on_empty_object_value', + selector: '$.key', + document: { key: {} }, + consensus: [{}], + }, + { + id: 'dot_notation_on_null_value', + selector: '$.key', + document: { key: null }, + consensus: [null], + }, + { + id: 'dot_notation_on_object_without_key', + selector: '$.missing', + document: { key: 'value' }, + consensus: [], + }, + { + id: 'dot_notation_with_dash', + selector: '$.key-dash', + document: { key: 42, 'key-': 43, '-': 44, dash: 45, '-dash': 46, '': 47, 'key-dash': 'value', something: 'else' }, + consensus: ['value'], + }, + { + id: 'dot_notation_with_double_quotes', + selector: '$."key"', + document: { key: 'value', '"key"': 42 }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'dot_notation_with_double_quotes_after_recursive_descent', + selector: '$.."key"', + document: { object: { key: 'value', '"key"': 100, array: [{ key: 'something', '"key"': 0 }, { key: { key: 'russian dolls' }, '"key"': { '"key"': 99 } }] }, key: 'top', '"key"': 42 }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'dot_notation_with_empty_path', + selector: '$.', + document: { key: 42, '': 9001 }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'dot_notation_with_key_named_in', + selector: '$.in', + document: { in: 'value' }, + consensus: ['value'], + }, + { + id: 'dot_notation_with_key_named_length', + selector: '$.length', + document: { length: 'value' }, + consensus: ['value'], + }, + { + id: 'dot_notation_with_key_named_length_on_array', + selector: '$.length', + document: [4, 5, 6], + consensus: [], + }, + { + id: 'dot_notation_with_key_named_null', + selector: '$.null', + document: { null: 'value' }, + consensus: ['value'], + }, + { + id: 'dot_notation_with_key_named_true', + selector: '$.true', + document: { true: 'value' }, + consensus: ['value'], + }, + { + id: 'dot_notation_with_key_root_literal', + selector: '$.$', + document: { $: 'value', another: 'entry' }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'dot_notation_with_non_ASCII_key', + selector: '$.屬性', + document: { 屬性: 'value' }, + consensus: ['value'], + }, + { + id: 'dot_notation_with_number', + selector: '$.2', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: ['third'], + }, + { + id: 'dot_notation_with_number_-1', + selector: '$.-1', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: 'NOT_SUPPORTED', + }, + { + id: 'dot_notation_with_number_on_object', + selector: '$.2', + document: { a: 'first', '2': 'second', b: 'third' }, + consensus: ['second'], + }, + { + id: 'dot_notation_with_single_quotes', + selector: "$.''key", + document: { key: 'value', "'key": 42 }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'dot_notation_with_single_quotes_after_recursive_descent', + selector: "$..''key", + document: { object: { key: 'value', "'key": 100, array: [{ key: 'something', "'key": 0 }, { key: { key: 'russian dolls' }, "'key": { "'key": 99 } }] }, key: 'top', "'key": 42 }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'dot_notation_with_single_quotes_and_dot', + selector: "$.some.''.thing", + document: { 'some.thing': 'value', some: { thing: 'other value' } }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'dot_notation_with_space_padded_key', + selector: '$. a', + document: { ' a': 1, a: 2, ' a ': 3, '': 4 }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'dot_notation_with_wildcard_after_dot_notation_after_dot_notation_with_wildcard', + selector: '$.*.bar.*', + document: [{ bar: [42] }], + consensus: [42], + }, + { + id: 'dot_notation_with_wildcard_after_dot_notation_with_wildcard_on_nested_arrays', + selector: '$.*.*', + document: [[1, 2, 3], [4, 5, 6]], + consensus: [1, 2, 3, 4, 5, 6], + }, + { + id: 'dot_notation_with_wildcard_after_recursive_descent', + selector: '$..*', + document: { key: 'value', 'another key': { complex: 'string', primitives: [0, 1] } }, + consensus: ['value', { complex: 'string', primitives: [0, 1] }, 'string', [0, 1], 0, 1], + }, + { + id: 'dot_notation_with_wildcard_after_recursive_descent_on_null_value_array', + selector: '$..*', + document: [40, null, 42], + consensus: [40, null, 42], + }, + { + id: 'dot_notation_with_wildcard_after_recursive_descent_on_scalar', + selector: '$..*', + document: 42, + consensus: [], + }, + { + id: 'dot_notation_with_wildcard_on_array', + selector: '$.*', + document: ['string', 42, { key: 'value' }, [0, 1]], + consensus: ['string', 42, { key: 'value' }, [0, 1]], + }, + { + id: 'dot_notation_with_wildcard_on_empty_array', + selector: '$.*', + document: [], + consensus: [], + }, + { + id: 'dot_notation_with_wildcard_on_empty_object', + selector: '$.*', + document: {}, + consensus: [], + }, + { + id: 'dot_notation_with_wildcard_on_object', + selector: '$.*', + document: { some: 'string', int: 42, object: { key: 'value' }, array: [0, 1] }, + consensus: ['string', 42, { key: 'value' }, [0, 1]], + }, + { + id: 'dot_notation_without_dot', + selector: '$key', + document: { key: 'value' }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'dot_notation_without_root', + selector: '.key', + document: { key: 'value' }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'dot_notation_without_root_and_dot', + selector: 'key', + document: { key: 'value' }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'empty', + selector: '', + document: { a: 42, '': 21 }, + consensus: 'NOT_SUPPORTED', + }, + + // ============================================ + // FILTER EXPRESSION TESTS + // ============================================ + { + id: 'filter_expression_after_dot_notation_with_wildcard_after_recursive_descent', + selector: '$..*[?(@.id)]', + document: { id: 2, more: [{ id: 2 }, { more: { id: 2 } }, { id: { id: 2 } }, [{ id: 2 }]] }, + consensus: [{ id: 2 }, { id: 2 }, { id: { id: 2 } }, { id: 2 }], + skip: true, + skipReason: 'jsonpathly handles recursive descent + filter differently', + }, + { + id: 'filter_expression_after_recursive_descent', + selector: '$..[?(@.id)]', + document: { id: 2, more: [{ id: 2 }, { more: { id: 2 } }, { id: { id: 2 } }, [{ id: 2 }]] }, + skip: true, + skipReason: 'jsonpathly handles recursive descent + filter differently', + consensus: [{ id: 2 }, { more: { id: 2 } }, { id: 2 }, { id: { id: 2 } }, { id: 2 }, { id: 2 }], + }, + { + id: 'filter_expression_on_object', + selector: '$[?(@.key)]', + document: { key: 42, another: { key: 1 } }, + consensus: [], + skip: true, + skipReason: 'jsonpathly applies filter to object root', + }, + { + id: 'filter_expression_with_addition', + selector: '$[?(@.key+50==100)]', + document: [{ key: 60 }, { key: 50 }, { key: 10 }, { key: -50 }, { key: '50' }], + consensus: [{ key: 50 }], + }, + { + id: 'filter_expression_with_boolean_and_operator', + selector: '$[?(@.key>42 && @.key<44)]', + document: [{ key: 42 }, { key: 43 }, { key: 44 }], + consensus: [{ key: 43 }], + }, + { + id: 'filter_expression_with_boolean_and_operator_and_value_false', + selector: '$[?(@.key>0 && false)]', + document: [{ key: 1 }, { key: 3 }, { key: 'nice' }, { key: true }, { key: null }, { key: false }, { key: {} }, { key: [] }, { key: -1 }, { key: 0 }, { key: '' }], + consensus: [], + }, + { + id: 'filter_expression_with_boolean_and_operator_and_value_true', + selector: '$[?(@.key>0 && true)]', + document: [{ key: 1 }, { key: 3 }, { key: 'nice' }, { key: true }, { key: null }, { key: false }, { key: {} }, { key: [] }, { key: -1 }, { key: 0 }, { key: '' }], + consensus: [{ key: 1 }, { key: 3 }], + }, + { + id: 'filter_expression_with_boolean_or_operator', + selector: '$[?(@.key>43 || @.key<43)]', + document: [{ key: 42 }, { key: 43 }, { key: 44 }], + consensus: [{ key: 42 }, { key: 44 }], + }, + { + id: 'filter_expression_with_boolean_or_operator_and_value_false', + selector: '$[?(@.key>0 || false)]', + document: [{ key: 1 }, { key: 3 }, { key: 'nice' }, { key: true }, { key: null }, { key: false }, { key: {} }, { key: [] }, { key: -1 }, { key: 0 }, { key: '' }], + consensus: [{ key: 1 }, { key: 3 }], + }, + { + id: 'filter_expression_with_boolean_or_operator_and_value_true', + selector: '$[?(@.key>0 || true)]', + document: [{ key: 1 }, { key: 3 }, { key: 'nice' }, { key: true }, { key: null }, { key: false }, { key: {} }, { key: [] }, { key: -1 }, { key: 0 }, { key: '' }], + consensus: [{ key: 1 }, { key: 3 }, { key: 'nice' }, { key: true }, { key: null }, { key: false }, { key: {} }, { key: [] }, { key: -1 }, { key: 0 }, { key: '' }], + }, + { + id: 'filter_expression_with_bracket_notation', + selector: "$[?(@['key']==42)]", + document: [{ key: 0 }, { key: 42 }, { key: -1 }, { key: 41 }, { key: 43 }, { key: 42.0001 }, { key: 41.9999 }, { key: 100 }, { some: 'value' }], + consensus: [{ key: 42 }], + }, + { + id: 'filter_expression_with_bracket_notation_and_current_object_literal', + selector: "$[?(@['@key']==42)]", + document: [{ '@key': 0 }, { '@key': 42 }, { key: 42 }, { '@key': 43 }, { some: 'value' }], + consensus: [{ '@key': 42 }], + }, + { + id: 'filter_expression_with_bracket_notation_with_-1', + selector: "$[?(@[-1]==2)]", + document: [[2, 3], [1], [0, 2], [2]], + consensus: [[0, 2], [2]], + }, + { + id: 'filter_expression_with_bracket_notation_with_number', + selector: "$[?(@[1]=='b')]", + document: [['a', 'b'], ['x', 'y']], + consensus: [['a', 'b']], + }, + { + id: 'filter_expression_with_bracket_notation_with_number_on_object', + selector: "$[?(@[1]=='b')]", + document: [{ 1: 'a' }, { 1: 'b' }, { '1': 'c' }], + consensus: [], + skip: true, + skipReason: 'jsonpathly treats $[n] as property access on objects', + }, + { + id: 'filter_expression_with_current_object', + selector: '$[?(@)]', + document: [1, 3, 'nice', true, null, false, {}, [], -1, 0, ''], + consensus: [1, 3, 'nice', true, {}, [], -1], + skip: true, + skipReason: 'jsonpathly treats empty objects/arrays as falsy in existence check', + }, + { + id: 'filter_expression_with_different_grouped_operators', + selector: '$[?(@.a && (@.b || @.c))]', + document: [{ a: true }, { a: true, b: true }, { a: true, b: true, c: true }, { b: true, c: true }, { a: true, c: true }, { c: true }, { b: true }], + consensus: [{ a: true, b: true }, { a: true, b: true, c: true }, { a: true, c: true }], + }, + { + id: 'filter_expression_with_different_ungrouped_operators', + selector: '$[?(@.a && @.b || @.c)]', + document: [{ a: true, b: true }, { a: true, b: true, c: true }, { b: true, c: true }, { a: true, c: true }, { a: true }, { b: true }, { c: true }, { d: true }, {}], + consensus: [{ a: true, b: true }, { a: true, b: true, c: true }, { b: true, c: true }, { a: true, c: true }, { c: true }], + }, + { + id: 'filter_expression_with_division', + selector: '$[?(@.key/10==5)]', + document: [{ key: 60 }, { key: 50 }, { key: 10 }, { key: -50 }, { key: '50' }], + consensus: [{ key: 50 }], + }, + { + id: 'filter_expression_with_dot_notation_with_dash', + selector: '$[?(@.key-dash==1)]', + document: [{ 'key-dash': 1 }, { 'key-dash': 10 }, { key: 1 }], + consensus: [{ 'key-dash': 1 }], + }, + { + id: 'filter_expression_with_dot_notation_with_number', + selector: '$[?(@.2==3)]', + document: [{ a: 1, b: 2, '2': 3 }], + consensus: [{ a: 1, b: 2, '2': 3 }], + }, + { + id: 'filter_expression_with_dot_notation_with_number_on_array', + selector: '$[?(@.2==3)]', + document: [[1, 2, 3], [1], [1, 2, 3, 4, 5]], + consensus: [[1, 2, 3], [1, 2, 3, 4, 5]], + }, + { + id: 'filter_expression_with_equals', + selector: '$[?(@.key==42)]', + document: [{ key: 0 }, { key: 42 }, { key: -1 }, { key: 1 }, { key: 41 }, { key: 43 }, { key: 42.0001 }, { key: 41.9999 }, { key: 100 }, { key: 'some' }, { key: '42' }, { key: null }, { key: 420 }, { key: '' }, { key: {} }, { key: [] }, { key: [42] }, { key: { key: 42 } }, { key: { some: 42 } }, { some: 'value' }], + consensus: [{ key: 42 }], + }, + { + id: 'filter_expression_with_equals_array', + selector: '$[?(@.d==[1,2])]', + document: [{ d: [1, 2] }, { d: [1] }, { d: 'e' }], + consensus: [{ d: [1, 2] }], + }, + { + id: 'filter_expression_with_equals_array_for_array_slice_with_range_1', + selector: '$[?(@[0:1]==[1])]', + document: [[1, 2, 3], [1], [2, 3]], + consensus: [], + skip: true, + skipReason: 'jsonpathly compares slices with arrays', + }, + { + id: 'filter_expression_with_equals_array_for_dot_notation_with_star', + selector: '$[?(@.*==[1,2])]', + document: [[1, 2], [2, 3], [1], [2], [1, 2, 3], 1, 2, [1, 2]], + consensus: [], + skip: true, + skipReason: 'jsonpathly compares wildcards with arrays', + }, + { + id: 'filter_expression_with_equals_array_or_equals_true', + selector: '$[?(@.d==[1,2] || @.d==true)]', + document: [{ d: [1, 2] }, { d: [1] }, { d: true }], + consensus: [{ d: [1, 2] }, { d: true }], + }, + { + id: 'filter_expression_with_equals_array_with_single_quotes', + selector: "$[?(@.d==['v1','v2'])]", + document: [{ d: ['v1', 'v2'] }, { d: ['a', 'b'] }, { d: 'v1' }], + consensus: [{ d: ['v1', 'v2'] }], + }, + { + id: 'filter_expression_with_equals_boolean_expression_value', + selector: '$[?((@.key<44)==false)]', + document: [{ key: 42 }, { key: 43 }, { key: 44 }], + consensus: [{ key: 44 }], + skip: true, + skipReason: 'jsonpathly requires different syntax for boolean comparison', + }, + { + id: 'filter_expression_with_equals_false', + selector: '$[?(@.key==false)]', + document: [{ some: 'some value' }, { key: true }, { key: false }, { key: null }, { key: 'value' }, { key: '' }, { key: 0 }, { key: 1 }, { key: -1 }, { key: 42 }, { key: {} }, { key: [] }], + consensus: [{ key: false }], + }, + { + id: 'filter_expression_with_equals_null', + selector: '$[?(@.key==null)]', + document: [{ some: 'some value' }, { key: true }, { key: false }, { key: null }, { key: 'value' }, { key: '' }, { key: 0 }, { key: 1 }, { key: -1 }, { key: 42 }, { key: {} }, { key: [] }], + consensus: [{ key: null }], + }, + { + id: 'filter_expression_with_equals_number_for_array_slice_with_range_1', + selector: '$[?(@[0:1]==1)]', + document: [[1, 2, 3], [1], [2, 3]], + consensus: [], + }, + { + id: 'filter_expression_with_equals_number_for_bracket_notation_with_star', + selector: '$[?(@[*]==2)]', + document: [[1, 2], [2, 3], [1], [2], [1, 2, 3], 1, 2, [2]], + consensus: [], + }, + { + id: 'filter_expression_with_equals_number_for_dot_notation_with_star', + selector: '$[?(@.*==2)]', + document: [[1, 2], [2, 3], [1], [2], [1, 2, 3], 1, 2, [2]], + consensus: [], + }, + { + id: 'filter_expression_with_equals_number_with_fraction', + selector: '$[?(@.key==-0.123e2)]', + document: [{ key: -12.3 }, { key: -0.123 }, { key: -12 }, { key: 12.3 }, { key: 2 }, { key: '-0.123e2' }], + consensus: [{ key: -12.3 }], + }, + { + id: 'filter_expression_with_equals_number_with_leading_zeros', + selector: '$[?(@.key==010)]', + document: [{ key: '010' }, { key: '10' }, { key: 10 }, { key: 8 }, { key: '8' }], + consensus: [{ key: 10 }], + }, + { + id: 'filter_expression_with_equals_object', + selector: '$[?(@.d=={"k":"v"})]', + document: [{ d: { k: 'v' } }, { d: { a: 'b' } }, { d: 'k' }], + consensus: [{ d: { k: 'v' } }], + }, + { + id: 'filter_expression_with_equals_on_array_of_numbers', + selector: '$[?(@==42)]', + document: [0, 42, -1, 41, 43, 42.0001, 41.9999, null, 100], + consensus: [42], + }, + { + id: 'filter_expression_with_equals_on_array_without_match', + selector: '$[?(@.key==43)]', + document: [{ key: 42 }], + consensus: [], + }, + { + id: 'filter_expression_with_equals_on_object', + selector: '$[?(@.key==42)]', + document: { a: { key: 0 }, b: { key: 42 }, c: { key: -1 }, d: { key: 41 }, e: { key: 43 }, f: { key: 42.0001 }, g: { key: 41.9999 }, h: { key: 100 }, i: { some: 'value' } }, + consensus: [{ key: 42 }], + skip: true, + skipReason: 'jsonpathly does not apply filter to object values', + }, + { + id: 'filter_expression_with_equals_on_object_with_key_matching_query', + selector: '$[?(@.id==2)]', + document: { id: 2 }, + consensus: [], + skip: true, + skipReason: 'jsonpathly applies filter to object root', + }, + { + id: 'filter_expression_with_equals_string', + selector: '$[?(@.key=="value")]', + document: [{ key: 'some' }, { key: 'value' }, { key: null }, { key: 0 }, { key: 1 }, { key: -1 }, { key: '' }, { key: {} }, { key: [] }, { key: 'valuemore' }, { key: 'morevalue' }, { key: ['value'] }, { key: { some: 'value' } }, { key: { key: 'value' } }, { some: 'value' }], + consensus: [{ key: 'value' }], + }, + { + id: 'filter_expression_with_equals_string_in_NFC', + selector: '$[?(@.key=="Motörhead")]', + document: [{ key: 'something' }, { key: 'Motörhead' }, { key: 'motörhead' }, { key: 'Motorhead' }, { key: 'Motöorhead' }, { key: 'motöorhead' }], + consensus: [{ key: 'Motörhead' }], + }, + { + id: 'filter_expression_with_equals_string_with_current_object_literal', + selector: '$[?(@.key=="hi@example.com")]', + document: [{ key: 'some' }, { key: 'value' }, { key: 'hi@example.com' }], + consensus: [{ key: 'hi@example.com' }], + }, + { + id: 'filter_expression_with_equals_string_with_dot_literal', + selector: '$[?(@.key=="some.value")]', + document: [{ key: 'some' }, { key: 'value' }, { key: 'some.value' }], + consensus: [{ key: 'some.value' }], + }, + { + id: 'filter_expression_with_equals_string_with_single_quotes', + selector: "$[?(@.key=='value')]", + document: [{ key: 'some' }, { key: 'value' }], + consensus: [{ key: 'value' }], + }, + { + id: 'filter_expression_with_equals_string_with_unicode_character_escape', + selector: '$[?(@.key=="Mot\\u00f6rhead")]', + document: [{ key: 'something' }, { key: 'Motörhead' }, { key: 'motörhead' }, { key: 'Motorhead' }, { key: 'Motöorhead' }, { key: 'motöorhead' }], + consensus: [{ key: 'Motörhead' }], + }, + { + id: 'filter_expression_with_equals_true', + selector: '$[?(@.key==true)]', + document: [{ some: 'some value' }, { key: true }, { key: false }, { key: null }, { key: 'value' }, { key: '' }, { key: 0 }, { key: 1 }, { key: -1 }, { key: 42 }, { key: {} }, { key: [] }], + consensus: [{ key: true }], + }, + { + id: 'filter_expression_with_equals_with_path_and_path', + selector: '$[?(@.key1==@.key2)]', + document: [{ key1: 10, key2: 10 }, { key1: 42, key2: 50 }, { key1: 10 }, { key2: 10 }, {}], + consensus: [{ key1: 10, key2: 10 }], + skip: true, + skipReason: 'jsonpathly handles path-to-path comparison differently', + }, + { + id: 'filter_expression_with_equals_with_root_reference', + selector: '$.items[?(@.key==$.value)]', + document: { value: 42, items: [{ key: 10 }, { key: 42 }, { key: 50 }] }, + consensus: [{ key: 42 }], + }, + { + id: 'filter_expression_with_greater_than', + selector: '$[?(@.key>42)]', + document: [{ key: 0 }, { key: 42 }, { key: -1 }, { key: 41 }, { key: 43 }, { key: 42.0001 }, { key: 41.9999 }, { key: 100 }, { key: '43' }, { key: '42' }, { key: '41' }, { key: 'value' }, { some: 'value' }], + consensus: [{ key: 43 }, { key: 42.0001 }, { key: 100 }], + }, + { + id: 'filter_expression_with_greater_than_or_equal', + selector: '$[?(@.key>=42)]', + document: [{ key: 0 }, { key: 42 }, { key: -1 }, { key: 41 }, { key: 43 }, { key: 42.0001 }, { key: 41.9999 }, { key: 100 }, { key: '43' }, { key: '42' }, { key: '41' }, { key: 'value' }, { some: 'value' }], + consensus: [{ key: 42 }, { key: 43 }, { key: 42.0001 }, { key: 100 }], + }, + { + id: 'filter_expression_with_greater_than_string', + selector: '$[?(@.key>"VALUE")]', + document: [{ key: 0 }, { key: 42 }, { key: -1 }, { key: 41 }, { key: 43 }, { key: 42.0001 }, { key: 41.9999 }, { key: 100 }, { key: '43' }, { key: '42' }, { key: '41' }, { key: 'alpha' }, { key: 'ALPHA' }, { key: 'value' }, { key: 'VALUE' }, { some: 'value' }, { some: 'VALUE' }], + consensus: [{ key: 'alpha' }, { key: 'value' }], + }, + { + id: 'filter_expression_with_in_array_of_values', + selector: '$[?(@.d in [1, 2])]', + document: [{ d: 1 }, { d: 2 }, { d: 'e' }, { d: 3 }], + consensus: [{ d: 1 }, { d: 2 }], + }, + { + id: 'filter_expression_with_in_current_object', + selector: '$[?(2 in @.d)]', + document: [{ d: [1, 2] }, { d: [1] }, { d: 'e' }], + consensus: [{ d: [1, 2] }], + }, + { + id: 'filter_expression_with_length_free_function', + selector: '$[?(length(@.a)>2)]', + document: [{ a: [1, 2, 3, 4, 5] }, { a: [1] }], + consensus: [{ a: [1, 2, 3, 4, 5] }], + }, + { + id: 'filter_expression_with_length_function', + selector: '$[?(@.length() == 4)]', + document: [[1, 2, 3, 4, 5], [1, 2, 3, 4]], + consensus: 'NOT_SUPPORTED', + }, + { + id: 'filter_expression_with_length_property', + selector: '$[?(@.length == 4)]', + document: [[1, 2, 3, 4, 5], [1, 2, 3, 4]], + consensus: [], + }, + { + id: 'filter_expression_with_less_than', + selector: '$[?(@.key<42)]', + document: [{ key: 0 }, { key: 42 }, { key: -1 }, { key: 41 }, { key: 43 }, { key: 42.0001 }, { key: 41.9999 }, { key: 100 }, { key: '43' }, { key: '42' }, { key: '41' }, { key: 'value' }, { some: 'value' }], + consensus: [{ key: 0 }, { key: -1 }, { key: 41 }, { key: 41.9999 }], + }, + { + id: 'filter_expression_with_less_than_or_equal', + selector: '$[?(@.key<=42)]', + document: [{ key: 0 }, { key: 42 }, { key: -1 }, { key: 41 }, { key: 43 }, { key: 42.0001 }, { key: 41.9999 }, { key: 100 }, { key: '43' }, { key: '42' }, { key: '41' }, { key: 'value' }, { some: 'value' }], + consensus: [{ key: 0 }, { key: 42 }, { key: -1 }, { key: 41 }, { key: 41.9999 }], + }, + { + id: 'filter_expression_with_local_dot_key_and_null_in_data', + selector: '$[?(@.key)]', + document: [{ key: 0 }, { key: '' }, { key: false }, { key: null }, { key: 42 }, { some: 'value' }, {}], + consensus: [{ key: 42 }], + skip: true, + skipReason: 'jsonpathly existence check behavior differs for falsy values', + }, + { + id: 'filter_expression_with_multiplication', + selector: '$[?(@.key*2==100)]', + document: [{ key: 60 }, { key: 50 }, { key: 10 }, { key: -50 }, { key: '50' }], + consensus: [{ key: 50 }], + }, + { + id: 'filter_expression_with_negation_and_equals', + selector: '$[?(!(@.key==42))]', + document: [{ key: 0 }, { key: 42 }, { key: -1 }, { key: 41 }, { key: 43 }, { key: 42.0001 }, { key: 41.9999 }, { key: 100 }, { key: 'some' }, { key: '42' }, { key: null }, { key: 420 }, { key: '' }, { key: {} }, { key: [] }, { key: [42] }, { key: { key: 42 } }, { key: { some: 42 } }, { some: 'value' }], + consensus: [{ key: 0 }, { key: -1 }, { key: 41 }, { key: 43 }, { key: 42.0001 }, { key: 41.9999 }, { key: 100 }, { key: 'some' }, { key: '42' }, { key: null }, { key: 420 }, { key: '' }, { key: {} }, { key: [] }, { key: [42] }, { key: { key: 42 } }, { key: { some: 42 } }, { some: 'value' }], + }, + { + id: 'filter_expression_with_negation_and_equals_array_or_equals_true', + selector: '$[?(!(@.d==[1,2]) || @.d==true)]', + document: [{ d: [1, 2] }, { d: [1] }, { d: true }], + consensus: [{ d: [1] }, { d: true }], + }, + { + id: 'filter_expression_with_negation_and_less_than', + selector: '$[?(!(@.key<42))]', + document: [{ key: 0 }, { key: 42 }, { key: -1 }, { key: 41 }, { key: 43 }, { key: 42.0001 }, { key: 41.9999 }, { key: 100 }, { key: '43' }, { key: '42' }, { key: '41' }, { key: 'value' }, { some: 'value' }], + consensus: [{ key: 42 }, { key: 43 }, { key: 42.0001 }, { key: 100 }, { key: '43' }, { key: '42' }, { key: '41' }, { key: 'value' }, { some: 'value' }], + }, + { + id: 'filter_expression_with_negation_and_without_value', + selector: '$[?(!@.key)]', + document: [{ key: 0 }, { key: '' }, { key: false }, { key: null }, { key: 42 }, { some: 'value' }, {}], + consensus: [{ key: 0 }, { key: '' }, { key: false }, { key: null }, { some: 'value' }, {}], + skip: true, + skipReason: 'jsonpathly existence check behavior differs for falsy values', + }, + { + id: 'filter_expression_with_non_singular_existence_test', + selector: '$[?(@.a.*)]', + document: [{ a: [1] }, { a: { b: 1 } }, { a: 1 }, { a: [] }, { a: {} }, { a: { b: 1, c: 2 } }, { a: [1, 2] }], + consensus: [{ a: [1] }, { a: { b: 1 } }, { a: { b: 1, c: 2 } }, { a: [1, 2] }], + skip: true, + skipReason: 'jsonpathly handles wildcard in existence check differently', + }, + { + id: 'filter_expression_with_not_equals', + selector: '$[?(@.key!=42)]', + document: [{ key: 0 }, { key: 42 }, { key: -1 }, { key: 1 }, { key: 41 }, { key: 43 }, { key: 42.0001 }, { key: 41.9999 }, { key: 100 }, { key: 'some' }, { key: '42' }, { key: null }, { key: 420 }, { key: '' }, { key: {} }, { key: [] }, { key: [42] }, { key: { key: 42 } }, { key: { some: 42 } }, { some: 'value' }], + consensus: [{ key: 0 }, { key: -1 }, { key: 1 }, { key: 41 }, { key: 43 }, { key: 42.0001 }, { key: 41.9999 }, { key: 100 }, { key: 'some' }, { key: '42' }, { key: null }, { key: 420 }, { key: '' }, { key: {} }, { key: [] }, { key: [42] }, { key: { key: 42 } }, { key: { some: 42 } }, { some: 'value' }], + }, + { + id: 'filter_expression_with_not_equals_array_or_equals_true', + selector: '$[?(@.d!=[1,2] || @.d==true)]', + document: [{ d: [1, 2] }, { d: [1] }, { d: true }], + consensus: [{ d: [1] }, { d: true }], + }, + { + id: 'filter_expression_with_parent_axis_operator', + selector: '$[?(@.key)].^', + document: { id: 2, more: [{ id: 2 }, { more: { id: 2 } }, { id: { id: 2 } }, [{ id: 2 }]] }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'filter_expression_with_regular_expression', + selector: '$[?(@.name=~/hello.*/)]', + document: [{ name: 'hullo world' }, { name: 'hello world' }, { name: 'yes hello world' }, { name: 'HELLO WORLD' }, { name: 'good bye' }], + consensus: [{ name: 'hello world' }], + skip: true, + skipReason: 'jsonpathly regex match uses full string anchoring', + }, + { + id: 'filter_expression_with_regular_expression_from_member', + selector: '$[?(@.name=~/@.pattern/)]', + document: [{ name: 'hullo world' }, { name: 'hello world' }, { name: 'yes hello world' }, { name: 'HELLO WORLD' }, { name: 'good bye' }], + consensus: 'NOT_SUPPORTED', + }, + { + id: 'filter_expression_with_set_wise_comparison_to_scalar', + selector: '$[?(@[*]>=4)]', + document: [[1, 2], [3, 4], [5, 6]], + consensus: [], + }, + { + id: 'filter_expression_with_set_wise_comparison_to_set', + selector: '$[?(@[*]==@[*])]', + document: [[1, 2], [2, 3], [3, 4], [5, 6]], + consensus: [], + skip: true, + skipReason: 'jsonpathly compares wildcards reflexively', + }, + { + id: 'filter_expression_with_single_equal', + selector: '$[?(@.key=42)]', + document: [{ key: 0 }, { key: 42 }, { key: -1 }, { key: 1 }], + consensus: 'NOT_SUPPORTED', + }, + { + id: 'filter_expression_with_subfilter', + selector: '$[?(@.a[?(@.price>10)])]', + document: [{ a: [{ price: 1 }, { price: 3 }] }, { a: [{ price: 11 }] }, { a: [{ price: 8 }, { price: 12 }, { price: 3 }] }, { a: [] }], + consensus: [{ a: [{ price: 11 }] }, { a: [{ price: 8 }, { price: 12 }, { price: 3 }] }], + skip: true, + skipReason: 'jsonpathly handles nested filters differently', + }, + { + id: 'filter_expression_with_subpaths', + selector: '$[?(@.a.b==3)]', + document: [{ a: { b: 3 } }, { a: { b: 2 } }], + consensus: [{ a: { b: 3 } }], + }, + { + id: 'filter_expression_with_subpaths_deeply_nested', + selector: '$[?(@.a.b.c==3)]', + document: [{ a: { b: { c: 3 } } }, { a: 3 }, { c: 3 }, { a: { b: { c: 2 } } }], + consensus: [{ a: { b: { c: 3 } } }], + }, + { + id: 'filter_expression_with_subtraction', + selector: '$[?(@.key-50==-100)]', + document: [{ key: 60 }, { key: 50 }, { key: 10 }, { key: -50 }, { key: '-50' }], + consensus: [{ key: -50 }], + }, + { + id: 'filter_expression_with_tautological_comparison', + selector: '$[?(1==1)]', + document: [1, 3, 'nice', true, null, false, {}, [], -1, 0, ''], + consensus: [1, 3, 'nice', true, null, false, {}, [], -1, 0, ''], + }, + { + id: 'filter_expression_with_triple_equal', + selector: '$[?(@.key===42)]', + document: [{ key: 0 }, { key: 42 }, { key: -1 }, { key: 1 }, { key: 41 }, { key: 43 }, { key: 42.0001 }, { key: 41.9999 }, { key: 100 }, { key: 'some' }, { key: '42' }, { key: null }, { key: 420 }, { key: '' }, { key: {} }, { key: [] }, { key: [42] }, { key: { key: 42 } }, { key: { some: 42 } }, { some: 'value' }], + consensus: 'NOT_SUPPORTED', + }, + { + id: 'filter_expression_with_value', + selector: '$[?(@.key)]', + document: [{ some: 'some value' }, { key: true }, { key: false }, { key: null }, { key: 'value' }, { key: '' }, { key: 0 }, { key: 1 }, { key: -1 }, { key: 42 }, { key: {} }, { key: [] }], + consensus: [{ key: true }, { key: 'value' }, { key: 1 }, { key: -1 }, { key: 42 }], + skip: true, + skipReason: 'jsonpathly existence check behavior differs for falsy values', + }, + { + id: 'filter_expression_with_value_after_dot_notation_with_wildcard_on_array_of_objects', + selector: '$.*[?(@.key)]', + document: [{ key: 1 }, { key: 2 }], + consensus: [], + skip: true, + skipReason: 'jsonpathly applies filter after wildcard on arrays', + }, + { + id: 'filter_expression_with_value_after_recursive_descent', + selector: '$..[?(@.id)]', + document: { id: 2, more: [{ id: 2 }, { more: { id: 2 } }, { id: { id: 2 } }, [{ id: 2 }]] }, + consensus: [{ id: 2 }, { more: { id: 2 } }, { id: 2 }, { id: { id: 2 } }, { id: 2 }, { id: 2 }], + skip: true, + skipReason: 'jsonpathly handles recursive descent + filter differently', + }, + { + id: 'filter_expression_with_value_false', + selector: '$[?(false)]', + document: [1, 3, 'nice', true, null, false, {}, [], -1, 0, ''], + consensus: [], + }, + { + id: 'filter_expression_with_value_from_recursive_descent', + selector: '$[?(@..id)]', + document: [{ x: [{ id: 2 }] }, { x: [{}] }, { x: {} }, {}], + consensus: [{ x: [{ id: 2 }] }], + skip: true, + skipReason: 'jsonpathly handles recursive descent in filter differently', + }, + { + id: 'filter_expression_with_value_null', + selector: '$[?(null)]', + document: [1, 3, 'nice', true, null, false, {}, [], -1, 0, ''], + consensus: [], + }, + { + id: 'filter_expression_with_value_true', + selector: '$[?(true)]', + document: [1, 3, 'nice', true, null, false, {}, [], -1, 0, ''], + consensus: [1, 3, 'nice', true, null, false, {}, [], -1, 0, ''], + }, + { + id: 'filter_expression_without_parens', + selector: '$[?@.key==42]', + document: [{ key: 0 }, { key: 42 }, { key: -1 }, { key: 1 }], + consensus: [{ key: 42 }], + }, + { + id: 'filter_expression_without_value', + selector: '$[?(@.key)]', + document: [{ key: 0 }, { key: '' }, { key: false }, { key: null }, { key: 42 }, { some: 'value' }, {}], + consensus: [{ key: 42 }], + skip: true, + skipReason: 'jsonpathly existence check behavior differs for falsy values', + }, + + // ============================================ + // RECURSIVE DESCENT TESTS + // ============================================ + { + id: 'recursive_descent', + selector: '$..', + document: { key: 'value', nested: { foo: { bar: 'baz' } } }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'recursive_descent_after_dot_notation', + selector: '$.key..', + document: { key: { nested: ['v1', 'v2'] } }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'recursive_descent_on_nested_arrays', + selector: '$..*', + document: [[0], [1]], + consensus: [[0], [1], 0, 1], + }, + + // ============================================ + // ROOT TESTS + // ============================================ + { + id: 'root', + selector: '$', + document: { key: 'value', 'another key': { complex: ['a', 1] } }, + consensus: [{ key: 'value', 'another key': { complex: ['a', 1] } }], + }, + { + id: 'root_on_scalar', + selector: '$', + document: 42, + consensus: [42], + }, + { + id: 'root_on_scalar_false', + selector: '$', + document: false, + consensus: [false], + }, + { + id: 'root_on_scalar_true', + selector: '$', + document: true, + consensus: [true], + }, + + // ============================================ + // UNION TESTS + // ============================================ + { + id: 'union', + selector: '$[0,1]', + document: ['first', 'second', 'third'], + consensus: ['first', 'second'], + }, + { + id: 'union_with_duplication_from_array', + selector: '$[0,0]', + document: ['a'], + consensus: ['a', 'a'], + }, + { + id: 'union_with_duplication_from_object', + selector: "$['a','a']", + document: { a: 1 }, + consensus: [1, 1], + }, + { + id: 'union_with_filter', + selector: '$[?(@.key<3),?(@.key>6)]', + document: [{ key: 1 }, { key: 5 }, { key: 9 }], + consensus: 'NOT_SUPPORTED', + }, + { + id: 'union_with_keys', + selector: "$['key','another']", + document: { key: 'value', another: 'entry' }, + consensus: ['value', 'entry'], + }, + { + id: 'union_with_keys_after_array_slice', + selector: "$[:]['c','d']", + document: [{ c: 'cc1', d: 'dd1', e: 'ee1' }, { c: 'cc2', d: 'dd2', e: 'ee2' }], + consensus: ['cc1', 'dd1', 'cc2', 'dd2'], + }, + { + id: 'union_with_keys_after_bracket_notation', + selector: "$[0]['c','d']", + document: [{ c: 'cc1', d: 'dd1', e: 'ee1' }, { c: 'cc2', d: 'dd2', e: 'ee2' }], + consensus: ['cc1', 'dd1'], + }, + { + id: 'union_with_keys_after_dot_notation_with_wildcard', + selector: "$.*['c','d']", + document: [{ c: 'cc1', d: 'dd1', e: 'ee1' }, { c: 'cc2', d: 'dd2', e: 'ee2' }], + consensus: ['cc1', 'dd1', 'cc2', 'dd2'], + }, + { + id: 'union_with_keys_after_recursive_descent', + selector: "$..['c','d']", + document: [{ c: 'cc1', d: 'dd1', e: 'ee1' }, { c: 'cc2', child: { d: 'dd2' } }, { c: 'cc3' }, { d: 'dd4' }, { child: { c: 'cc5' } }], + consensus: ['cc1', 'dd1', 'cc2', 'dd2', 'cc3', 'dd4', 'cc5'], + }, + { + id: 'union_with_keys_on_object_without_key', + selector: "$['missing','key']", + document: { key: 'value', another: 'entry' }, + consensus: ['value'], + }, + { + id: 'union_with_numbers_in_decreasing_order', + selector: '$[4,1]', + document: [1, 2, 3, 4, 5], + consensus: [5, 2], + }, + { + id: 'union_with_repeated_matches_after_dot_notation_with_wildcard', + selector: "$.*[0,:5]", + document: { a: ['string', null, true], b: [false, 'string', 5.4] }, + consensus: ['string', 'string', null, true, false, false, 'string', 5.4], + skip: true, + skipReason: 'jsonpathly does not support mixed index/slice in union', + }, + { + id: 'union_with_slice_and_number', + selector: '$[1:3,4]', + document: [1, 2, 3, 4, 5], + consensus: [2, 3, 5], + skip: true, + skipReason: 'jsonpathly does not support mixed slice/index in union', + }, + { + id: 'union_with_spaces', + selector: '$[ 0 , 1 ]', + document: ['first', 'second', 'third'], + consensus: ['first', 'second'], + }, + { + id: 'union_with_wildcard_and_number', + selector: '$[*,1]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: ['first', 'second', 'third', 'forth', 'fifth', 'second'], + skip: true, + skipReason: 'jsonpathly does not support mixed wildcard/index in union', + }, + + // ============================================ + // SCRIPT EXPRESSION TESTS + // ============================================ + { + id: 'script_expression', + selector: '$[(@.length-1)]', + document: ['first', 'second', 'third', 'forth', 'fifth'], + consensus: 'NOT_SUPPORTED', + }, + + // ============================================ + // FUNCTION TESTS + // ============================================ + { + id: 'function_sum', + selector: '$[?(@.values.sum() > 10)]', + document: [{ values: [1, 2, 3] }, { values: [4, 5, 6] }], + consensus: 'NOT_SUPPORTED', + }, + + // ============================================ + // MISCELLANEOUS TESTS + // ============================================ + { + id: 'current_with_dot_notation', + selector: '@.a', + document: { a: 1 }, + consensus: 'NOT_SUPPORTED', + }, + { + id: 'parens_notation', + selector: '$(key,more)', + document: { key: 1, some: 2, more: 3 }, + consensus: 'NOT_SUPPORTED', + }, +]; diff --git a/tests/extensions.test.ts b/tests/extensions.test.ts new file mode 100644 index 0000000..b69dbbb --- /dev/null +++ b/tests/extensions.test.ts @@ -0,0 +1,321 @@ +/** + * Extension Operators Tests + * + * Tests for jsonpathly-specific extensions beyond RFC 9535: + * + * Value membership: + * - `in` - Check if value is in array: @.status in ['active', 'pending'] + * - `nin` - Check if value is NOT in array: @.status nin ['closed'] + * + * Array comparisons: + * - `subsetof` - All elements in left exist in right: [1,2] subsetof @.nums + * - `anyof` - Any element in left exists in right: [1,10] anyof @.nums + * - `noneof` - No elements in left exist in right: [10,20] noneof @.nums + * + * Size checks: + * - `sizeof` - Arrays have same length: @.arr sizeof [1,2,3] + * - `size` - Array/string has specific length: @.arr size 5 + * - `empty` - Array/string is empty: @.arr empty + * + * Pattern matching: + * - `=~` - Regex match: @.name =~ /pattern/flags + */ +import { query } from '../src/handler/query'; +import { expect } from 'chai'; + +describe('Extension Operators', () => { + // ============================================ + // VALUE MEMBERSHIP OPERATORS + // ============================================ + + describe('in - value in array', () => { + const items = [ + { id: 1, tags: ['a', 'b', 'c'] }, + { id: 2, tags: ['d', 'e', 'f'] }, + { id: 3, tags: ['a', 'd', 'g'] }, + ]; + + it('finds items where value exists in array', () => { + const result = query(items, '$[?("a" in @.tags)]'); + expect(result).to.deep.equal([items[0], items[2]]); + }); + + it('returns empty when value not found', () => { + const result = query(items, '$[?("z" in @.tags)]'); + expect(result).to.deep.equal([]); + }); + + it('checks scalar against array of values', () => { + const result = query(items, '$[?(@.id in [1, 3])]'); + expect(result).to.deep.equal([items[0], items[2]]); + }); + + it('returns empty for non-array operand', () => { + const result = query(items, '$[?(@.id in "123")]'); + expect(result).to.deep.equal([]); + }); + + it('handles numeric array membership', () => { + const data = [{ val: 5 }, { val: 10 }, { val: 15 }]; + const result = query(data, '$[?(@.val in [1, 5, 10])]'); + expect(result).to.deep.equal([{ val: 5 }, { val: 10 }]); + }); + }); + + describe('nin - value not in array', () => { + const items = [ + { status: 'active' }, + { status: 'pending' }, + { status: 'closed' }, + ]; + + it('finds items where value is not in array', () => { + const result = query(items, '$[?(@.status nin ["active", "pending"])]'); + expect(result).to.deep.equal([{ status: 'closed' }]); + }); + + it('returns all when none match exclusion list', () => { + const result = query(items, '$[?(@.status nin ["unknown"])]'); + expect(result).to.deep.equal(items); + }); + + it('returns empty for non-array operand', () => { + const result = query(items, '$[?(@.status nin "active")]'); + expect(result).to.deep.equal([]); + }); + }); + + // ============================================ + // ARRAY COMPARISON OPERATORS + // ============================================ + + describe('subsetof - all elements exist in target', () => { + // RFC 9535: wrap in array since filters iterate over children + const data = [{ nums: [1, 2, 3, 4, 5] }]; + + it('matches when left is subset of right', () => { + const result = query(data, '$[?([1, 2, 3] subsetof @.nums)]'); + expect(result).to.deep.equal(data); + }); + + it('rejects when left has elements not in right', () => { + const result = query(data, '$[?([1, 2, 10] subsetof @.nums)]'); + expect(result).to.deep.equal([]); + }); + + it('accepts empty array as subset', () => { + const result = query(data, '$[?([] subsetof @.nums)]'); + expect(result).to.deep.equal(data); + }); + + it('returns empty for non-array operands', () => { + const result = query(data, '$[?(123 subsetof @.nums)]'); + expect(result).to.deep.equal([]); + }); + + it('handles duplicates in subset', () => { + const result = query(data, '$[?([1, 1, 2] subsetof @.nums)]'); + expect(result).to.deep.equal(data); + }); + }); + + describe('anyof - any element exists in target', () => { + const data = [{ nums: [1, 2, 3] }]; + + it('matches when any element is found', () => { + const result = query(data, '$[?([10, 2, 20] anyof @.nums)]'); + expect(result).to.deep.equal(data); + }); + + it('rejects when no elements are found', () => { + const result = query(data, '$[?([10, 20, 30] anyof @.nums)]'); + expect(result).to.deep.equal([]); + }); + + it('returns empty for non-array operands', () => { + const result = query(data, '$[?(123 anyof @.nums)]'); + expect(result).to.deep.equal([]); + }); + }); + + describe('noneof - no elements exist in target', () => { + const data = [{ nums: [1, 2, 3] }]; + + it('matches when no elements overlap', () => { + const result = query(data, '$[?([10, 20, 30] noneof @.nums)]'); + expect(result).to.deep.equal(data); + }); + + it('rejects when any element overlaps', () => { + const result = query(data, '$[?([10, 2, 30] noneof @.nums)]'); + expect(result).to.deep.equal([]); + }); + + it('returns empty for non-array operands', () => { + const result = query(data, '$[?(123 noneof @.nums)]'); + expect(result).to.deep.equal([]); + }); + }); + + // ============================================ + // SIZE OPERATORS + // ============================================ + + describe('sizeof - arrays have same length', () => { + // RFC 9535: wrap in array since filters iterate over children + const data = [{ arr: [1, 2, 3, 4, 5] }]; + + it('matches arrays with same length', () => { + const result = query(data, '$[?(@.arr sizeof [10, 20, 30, 40, 50])]'); + expect(result).to.deep.equal(data); + }); + + it('rejects arrays with different lengths', () => { + const result = query(data, '$[?(@.arr sizeof [1, 2])]'); + expect(result).to.deep.equal([]); + }); + + it('returns empty for non-array operands', () => { + const result = query(data, '$[?(@.arr sizeof 5)]'); + expect(result).to.deep.equal([]); + }); + + it('compares string lengths', () => { + // Tests comparators.ts line 83 - sizeof with strings + const strData = [{ str: 'hello' }]; + const result = query(strData, '$[?(@.str sizeof "world")]'); + expect(result).to.deep.equal(strData); + }); + + it('rejects strings with different lengths', () => { + const strData = [{ str: 'hello' }]; + const result = query(strData, '$[?(@.str sizeof "hi")]'); + expect(result).to.deep.equal([]); + }); + }); + + describe('size - check array/string length', () => { + // RFC 9535: wrap in array since filters iterate over children + const data = [{ arr: [1, 2, 3, 4, 5], str: 'hello' }]; + + it('matches array with correct length', () => { + const result = query(data, '$[?(@.arr size 5)]'); + expect(result).to.deep.equal(data); + }); + + it('matches string with correct length', () => { + const result = query(data, '$[?(@.str size 5)]'); + expect(result).to.deep.equal(data); + }); + + it('rejects incorrect length', () => { + const result = query(data, '$[?(@.arr size 3)]'); + expect(result).to.deep.equal([]); + }); + + it('returns empty for non-numeric size', () => { + const result = query(data, '$[?(@.arr size "5")]'); + expect(result).to.deep.equal([]); + }); + + it('returns empty for non-sizable values', () => { + const result = query([{ num: 123 }], '$[?(@.num size 3)]'); + expect(result).to.deep.equal([]); + }); + }); + + describe('empty - check if empty', () => { + const items = [ + { arr: [], str: '', obj: {} }, + { arr: [1], str: 'a', obj: { a: 1 } }, + ]; + + it('matches empty arrays', () => { + const result = query(items, '$[?(@.arr empty)]'); + expect(result).to.deep.equal([items[0]]); + }); + + it('matches empty strings', () => { + const result = query(items, '$[?(@.str empty)]'); + expect(result).to.deep.equal([items[0]]); + }); + + it('rejects non-empty arrays', () => { + const result = query([{ arr: [1, 2, 3] }], '$[?(@.arr empty)]'); + expect(result).to.deep.equal([]); + }); + + it('rejects non-empty strings', () => { + const result = query([{ str: 'hello' }], '$[?(@.str empty)]'); + expect(result).to.deep.equal([]); + }); + + it('returns false for non-array/non-string values', () => { + // Tests comparators.ts line 122 - isEmpty with object/number/null + const data = [{ obj: {} }, { num: 0 }, { val: null }]; + expect(query(data, '$[?(@.obj empty)]')).to.deep.equal([]); + expect(query(data, '$[?(@.num empty)]')).to.deep.equal([]); + expect(query(data, '$[?(@.val empty)]')).to.deep.equal([]); + }); + }); + + // ============================================ + // REGEX OPERATOR + // ============================================ + + describe('=~ regex match', () => { + const strings = ['Hello World', 'hello earth', 'Good Morning']; + + it('matches with case-insensitive flag', () => { + const result = query(strings, '$[?(@ =~ /hello/i)]'); + expect(result).to.deep.equal(['Hello World', 'hello earth']); + }); + + it('matches case-sensitive by default', () => { + const result = query(strings, '$[?(@ =~ /World/)]'); + expect(result).to.deep.equal(['Hello World']); + }); + + it('returns empty for no matches', () => { + const result = query(strings, '$[?(@ =~ /notfound/)]'); + expect(result).to.deep.equal([]); + }); + + it('matches all with wildcard pattern', () => { + const result = query(strings, '$[?(@ =~ /.*/)]'); + expect(result).to.deep.equal(strings); + }); + + it('does not match non-strings', () => { + const result = query([1, 2, 3], '$[?(@ =~ /1/)]'); + expect(result).to.deep.equal([]); + }); + }); + + // ============================================ + // COMBINED OPERATORS + // ============================================ + + describe('combined operators', () => { + const products = [ + { name: 'Widget', tags: ['sale', 'popular'], price: 10 }, + { name: 'Gadget', tags: ['new'], price: 50 }, + { name: 'Gizmo', tags: ['sale', 'new', 'featured'], price: 30 }, + ]; + + it('combines in with logical AND', () => { + const result = query(products, '$[?("sale" in @.tags && @.price < 20)]'); + expect(result).to.deep.equal([products[0]]); + }); + + it('combines subsetof with logical OR', () => { + const result = query(products, '$[?(["new"] subsetof @.tags || @.price < 15)]'); + expect(result).to.deep.equal(products); + }); + + it('combines anyof with size', () => { + const result = query(products, '$[?(["popular", "featured"] anyof @.tags && @.tags size 3)]'); + expect(result).to.deep.equal([products[2]]); + }); + }); +}); diff --git a/tests/module-resolution.test.ts b/tests/module-resolution.test.ts new file mode 100644 index 0000000..7a3f4e8 --- /dev/null +++ b/tests/module-resolution.test.ts @@ -0,0 +1,271 @@ +import { expect } from 'chai'; +import * as path from 'path'; +import * as fs from 'fs'; +import { execFileSync } from 'child_process'; + +// Use process.cwd() - tests are always run from project root +const projectRoot = process.cwd(); +const distPath = path.join(projectRoot, 'dist'); + +/** + * Helper to run ESM code in a child Node process. + * ts-node converts dynamic import() to require() which can't load .mjs files, + * so we spawn a native Node process to test ESM imports properly. + * Uses execFileSync (not exec) for safety - no shell injection possible. + */ +function runEsmTest(code: string): string { + const fullCode = ` + import * as esm from './dist/index.mjs'; + ${code} + `; + return execFileSync('node', ['--input-type=module', '-e', fullCode], { + cwd: projectRoot, + encoding: 'utf8', + }); +} + +describe('Module Resolution (Issue #9)', () => { + const packageJson = JSON.parse( + fs.readFileSync(path.join(projectRoot, 'package.json'), 'utf8') + ); + + describe('dist files exist', () => { + it('should have index.cjs', () => { + expect(fs.existsSync(path.join(distPath, 'index.cjs'))).to.be.true; + }); + + it('should have index.mjs', () => { + expect(fs.existsSync(path.join(distPath, 'index.mjs'))).to.be.true; + }); + + it('should have index.d.ts', () => { + expect(fs.existsSync(path.join(distPath, 'index.d.ts'))).to.be.true; + }); + + it('should have index.d.mts for ESM types', () => { + expect(fs.existsSync(path.join(distPath, 'index.d.mts'))).to.be.true; + }); + + it('should have source maps', () => { + expect(fs.existsSync(path.join(distPath, 'index.cjs.map'))).to.be.true; + expect(fs.existsSync(path.join(distPath, 'index.mjs.map'))).to.be.true; + }); + + it('should NOT have platform-specific files', () => { + expect(fs.existsSync(path.join(distPath, 'index.node.cjs'))).to.be.false; + expect(fs.existsSync(path.join(distPath, 'index.node.mjs'))).to.be.false; + expect(fs.existsSync(path.join(distPath, 'index.web.cjs'))).to.be.false; + expect(fs.existsSync(path.join(distPath, 'index.web.mjs'))).to.be.false; + }); + }); + + describe('type declarations', () => { + it('should export all public APIs', () => { + const dts = fs.readFileSync(path.join(distPath, 'index.d.ts'), 'utf8'); + // tsup bundles exports at the end + expect(dts).to.include('export {'); + expect(dts).to.include('query'); + expect(dts).to.include('paths'); + expect(dts).to.include('parse'); + expect(dts).to.include('stringify'); + expect(dts).to.include('JSONPathSyntaxError'); + }); + + it('should include function/const declarations', () => { + const dts = fs.readFileSync(path.join(distPath, 'index.d.ts'), 'utf8'); + // tsup may declare as const or function depending on export style + expect(dts).to.match(/declare (function|const) query/); + expect(dts).to.match(/declare (function|const) paths/); + expect(dts).to.include('declare function parse'); + expect(dts).to.include('declare function stringify'); + expect(dts).to.include('declare class JSONPathSyntaxError'); + }); + }); + + describe('package.json exports', () => { + it('should have flat exports structure (not nested node/browser)', () => { + const exports = packageJson.exports['.']; + expect(exports).to.have.property('types', './dist/index.d.ts'); + expect(exports).to.have.property('browser', './dist/index.mjs'); + expect(exports).to.have.property('import', './dist/index.mjs'); + expect(exports).to.have.property('require', './dist/index.cjs'); + expect(exports).to.not.have.property('node'); + }); + + it('should have correct main field', () => { + expect(packageJson.main).to.equal('dist/index.cjs'); + }); + + it('should have correct module field', () => { + expect(packageJson.module).to.equal('dist/index.mjs'); + }); + + it('should have correct browser field', () => { + expect(packageJson.browser).to.equal('dist/index.mjs'); + }); + + it('should have correct types field', () => { + expect(packageJson.types).to.equal('dist/index.d.ts'); + }); + + it('should have sideEffects false for tree-shaking', () => { + expect(packageJson.sideEffects).to.equal(false); + }); + }); + + // Use dynamic import for all module tests (works in both ESM and CJS) + // Note: CJS modules may have exports under .default when dynamically imported from ESM + describe('CJS import', () => { + it('should export all public APIs from CJS build', async () => { + const cjsModule = await import('../dist/index.cjs'); + const cjs = cjsModule.default || cjsModule; + expect(typeof cjs.query).to.equal('function'); + expect(typeof cjs.paths).to.equal('function'); + expect(typeof cjs.parse).to.equal('function'); + expect(typeof cjs.stringify).to.equal('function'); + expect(typeof cjs.JSONPathSyntaxError).to.equal('function'); + }); + + it('should work with query from CJS', async () => { + const cjsModule = await import('../dist/index.cjs'); + const { query } = cjsModule.default || cjsModule; + const result = query({ a: 1 }, '$.a'); + expect(result).to.equal(1); + }); + }); + + // ESM tests run in a child Node process since ts-node can't load .mjs files + describe('ESM import', () => { + it('should export all public APIs from ESM build', () => { + const output = runEsmTest(` + const types = ['query', 'paths', 'parse', 'stringify', 'JSONPathSyntaxError'] + .map(name => typeof esm[name]); + console.log(JSON.stringify(types)); + `); + expect(JSON.parse(output.trim())).to.deep.equal([ + 'function', 'function', 'function', 'function', 'function' + ]); + }); + + it('should work with query from ESM', () => { + const output = runEsmTest(` + const result = esm.query({ a: 1 }, '$.a'); + console.log(JSON.stringify(result)); + `); + expect(JSON.parse(output.trim())).to.equal(1); + }); + }); + + describe('build functionality', () => { + it('should handle complex queries in CJS build', async () => { + const cjsModule = await import('../dist/index.cjs'); + const { query } = cjsModule.default || cjsModule; + const data = { + store: { + book: [ + { title: 'Book 1', price: 10 }, + { title: 'Book 2', price: 20 }, + ], + }, + }; + // Filter queries return arrays + expect(query(data, '$.store.book[?(@.price < 15)].title')).to.deep.equal(['Book 1']); + expect(query(data, '$.store.book[*].price')).to.deep.equal([10, 20]); + // Direct property access returns single value + expect(query(data, '$.store.book[0].title')).to.equal('Book 1'); + }); + + it('should handle complex queries in ESM build', () => { + const output = runEsmTest(` + const data = { + store: { + book: [ + { title: 'Book 1', price: 10 }, + { title: 'Book 2', price: 20 }, + ], + }, + }; + console.log(JSON.stringify([ + esm.query(data, '$.store.book[?(@.price < 15)].title'), + esm.query(data, '$.store.book[*].price'), + esm.query(data, '$.store.book[0].title') + ])); + `); + const [filterResult, wildcardResult, indexResult] = JSON.parse(output.trim()); + expect(filterResult).to.deep.equal(['Book 1']); + expect(wildcardResult).to.deep.equal([10, 20]); + expect(indexResult).to.equal('Book 1'); + }); + + it('should handle RFC 9535 functions in CJS build', async () => { + const cjsModule = await import('../dist/index.cjs'); + const { query } = cjsModule.default || cjsModule; + const data = [{ name: 'hello' }, { name: 'world' }]; + expect(query(data, '$[?(match(@.name, "hel.*"))]')).to.deep.equal([{ name: 'hello' }]); + expect(query(data, '$[?(length(@.name) == 5)]')).to.deep.equal(data); + }); + + it('should handle RFC 9535 functions in ESM build', () => { + const output = runEsmTest(` + const data = [{ name: 'hello' }, { name: 'world' }]; + console.log(JSON.stringify([ + esm.query(data, '$[?(match(@.name, "hel.*"))]'), + esm.query(data, '$[?(length(@.name) == 5)]') + ])); + `); + const [matchResult, lengthResult] = JSON.parse(output.trim()); + expect(matchResult).to.deep.equal([{ name: 'hello' }]); + expect(lengthResult).to.deep.equal([{ name: 'hello' }, { name: 'world' }]); + }); + + it('should parse and stringify round-trip in CJS build', async () => { + const cjsModule = await import('../dist/index.cjs'); + const { parse, stringify } = cjsModule.default || cjsModule; + const path = "$.store.book[?(@.price < 10)].title"; + const ast = parse(path); + expect(stringify(ast)).to.equal(path); + }); + + it('should parse and stringify round-trip in ESM build', () => { + const output = runEsmTest(` + const path = "$.store.book[?(@.price < 10)].title"; + const ast = esm.parse(path); + console.log(esm.stringify(ast)); + `); + expect(output.trim()).to.equal("$.store.book[?(@.price < 10)].title"); + }); + + it('should throw JSONPathSyntaxError for invalid paths in CJS', async () => { + const cjsModule = await import('../dist/index.cjs'); + const { parse, JSONPathSyntaxError } = cjsModule.default || cjsModule; + expect(() => parse('$[invalid')).to.throw(JSONPathSyntaxError); + }); + + it('should throw JSONPathSyntaxError for invalid paths in ESM', () => { + const output = runEsmTest(` + try { + esm.parse('$[invalid'); + console.log('no-error'); + } catch (e) { + console.log(e instanceof esm.JSONPathSyntaxError ? 'JSONPathSyntaxError' : 'other-error'); + } + `); + expect(output.trim()).to.equal('JSONPathSyntaxError'); + }); + + it('should return paths in CJS build', async () => { + const cjsModule = await import('../dist/index.cjs'); + const { paths } = cjsModule.default || cjsModule; + const data = { a: { b: 1 } }; + expect(paths(data, '$.a.b')).to.deep.equal(["$['a']['b']"]); + }); + + it('should return paths in ESM build', () => { + const output = runEsmTest(` + const data = { a: { b: 1 } }; + console.log(JSON.stringify(esm.paths(data, '$.a.b'))); + `); + expect(JSON.parse(output.trim())).to.deep.equal(["$['a']['b']"]); + }); + }); +}); diff --git a/tests/parse.test.ts b/tests/parse.test.ts index 85ab926..5ecb1ce 100644 --- a/tests/parse.test.ts +++ b/tests/parse.test.ts @@ -1,92 +1,426 @@ +/** + * Parser Tests + * + * Tests for the JSONPath parser (parse) and stringify functions: + * + * - Valid expression parsing and round-trip verification + * - String literal handling (single/double quotes, escapes) + * - Filter expressions with various operators + * - Array slices and indices + * - Recursive descent expressions + * - Error handling with hideExceptions option + * + * Round-trip verification: parse(input) -> stringify() should reproduce + * the input (normalized to RFC 9535 single-quote format). + */ import { parse } from '../src/parser/parse'; import { stringify } from '../src/parser/stringify'; import { expect } from 'chai'; -describe('parse', () => { - const textCases = [ - [`$.store.book[?(@.size nin ['M','L'])]`, ''], - [`$.store.book[?(@.size nin ["M","L"])]`, ''], - [`$..book[?(@.author == {"test":1})].title`, ''], - [`$["book"]`, ''], - [`$["book with space"]`, ''], - [`$['book with "double" quotes']`, `$["book with \"double\" quotes"]`], - [`$["book with 'single' quotes"]`, '$["book with \'single\' quotes"]'], - [`$.book["test"].title`, ''], - [`$.phoneNumbers[?(@.price < 30)]`, ''], - [`$.phoneNumbers[?((@.price < 30 && @.type == "iPhone") || @.num == 1)]`, ''], - [`$`, ''], - [`$[*]`, ''], - [`$[0]`, ''], - [`$[?(@.author)]`, ''], - [`$..["book"]`, ''], - [`$..book[0][category, author]`, ''], - [`$..phoneNumbers[?(!(@.price < 30 && !(@.type == "iPhone") && !(@.number)))]`, ''], - [`$..phoneNumbers[?(!(@.price < 30) && !(@.type == "iPhone") && !(@.number))]`, ''], - [`$..phoneNumbers[?(@.price < 30 && !(@.type == "iPhone" && @.number))]`, ''], - [`$.book[test, toto]`, ''], - [`$.book["test", "toto"]`, ''], - [`$.store.book[?(@.price < 10)]`, ''], - [`$.store.book[?(@.price < 8 + 2)]`, ''], - [`$.store.book[?(@.price < 8 * 2)]`, ''], - [`$.store.book[?(@.price < 8 / 2)]`, ''], - [`$.store.book[?(@.price < (8 / 2) + 1)]`, ''], - [`$.store.book[?(@.price < 8 + @.price)]`, ''], - [`$.store.book[?(@.price < 8 - 2)]`, ''], - [`$.store.book[?(@.price == 10.2)]`, ''], - [`$.store.book[?(@.price == true)]`, ''], - [`$.store.book[?(@.price == false)]`, ''], - [`$.store.book[?(@.price == null)]`, ''], - [`$.store.book[?(@.price <= $.expensive)]`, ''], - [`$.store.book[?(@.price == $.expensive)]`, ''], - [`$.store.book[?(@.price != $.expensive)]`, ''], - [`$.store.book[?(@.price >= $.expensive)]`, ''], - [`$.store.book[?(@.price > $.expensive)]`, ''], - [`$.store.book[?(@.price =~ /hello/)]`, ''], - [`$.store.book[?(@.price =~ /hello/i)]`, ''], - [`$.store.book[?(@.price =~ /hello/gui)]`, ''], - [`$.store.book[?(@.price in [1,2,3])]`, ''], - [`$..book[?(@.isbn)]`, ''], - [`$..book[?(!(@.isbn))]`, ''], - [`$..book[-1:].title`, ''], - [`$..book[0, 1].title`, ''], - [`$..book[0:1].title`, ''], - [`$..book[:2].title`, ''], - [`$..book[5:2].title`, ''], - [`$..book[:7:2].title`, ''], - [`$..book[::2].title`, ''], - [`$..book[1::2].title`, ''], - [`$..book[:1:].title`, `$..book[:1].title`], - [`$..book[1::].title`, `$..book[1:].title`], - [`$..book[5::2].title`, ''], - [`$..book[:].title`, ''], - [`$..book[0:2:1].title`, ''], - [`$..book[?(@.author == 'J.R.R. Tolkien')].title`, ''], - [`$..*`, ''], - ]; - - textCases.forEach(([input, expected]) => { - it(input, (done) => { - expect(() => { +describe('Parser', () => { + // ============================================ + // ROUND-TRIP TESTS (parse -> stringify) + // ============================================ + + describe('round-trip parsing', () => { + /** + * Test cases for parse/stringify round-trips. + * Format: [input, expectedOutput] + * If expectedOutput is empty, input (normalized to single quotes) is expected. + */ + const roundTripCases: [string, string][] = [ + // Basic selectors + ['$', ''], + ['$[*]', ''], + ['$[0]', ''], + ['$[?(@.author)]', ''], + + // Bracket notation with quotes + ['$["book"]', ''], + ['$["book with space"]', ''], + ["$['book with \"double\" quotes']", "$['book with \"double\" quotes']"], + ['$["book with \'single\' quotes"]', "$['book with \\'single\\' quotes']"], + ['$.book["test"].title', ''], + + // Recursive descent + ['$..["book"]', ''], + ['$..book[0][category, author]', ''], + ['$..book[-1:].title', ''], + ['$..book[0, 1].title', ''], + ['$..*', ''], + ]; + + for (const [input, expected] of roundTripCases) { + it(`parses and stringifies: ${input}`, () => { + const tree = parse(input); + + if (expected) { + expect(stringify(tree || null)).to.equal(expected); + } else { + // RFC 9535: stringify outputs single quotes for string literals + expect(stringify(tree || null)).to.equal(input.replace(/"/g, "'")); + } + }); + } + }); + + // ============================================ + // FILTER EXPRESSIONS + // ============================================ + + describe('filter expressions', () => { + const filterCases: [string, string][] = [ + // Basic comparators + ['$.phoneNumbers[?(@.price < 30)]', ''], + ['$.store.book[?(@.price < 10)]', ''], + ['$.store.book[?(@.price == 10.2)]', ''], + ['$.store.book[?(@.price == true)]', ''], + ['$.store.book[?(@.price == false)]', ''], + ['$.store.book[?(@.price == null)]', ''], + + // Comparators with root references + ['$.store.book[?(@.price <= $.expensive)]', ''], + ['$.store.book[?(@.price == $.expensive)]', ''], + ['$.store.book[?(@.price != $.expensive)]', ''], + ['$.store.book[?(@.price >= $.expensive)]', ''], + ['$.store.book[?(@.price > $.expensive)]', ''], + + // Arithmetic in filters + ['$.store.book[?(@.price < 8 + 2)]', ''], + ['$.store.book[?(@.price < 8 * 2)]', ''], + ['$.store.book[?(@.price < 8 / 2)]', ''], + ['$.store.book[?(@.price < (8 / 2) + 1)]', ''], + ['$.store.book[?(@.price < 8 + @.price)]', ''], + ['$.store.book[?(@.price < 8 - 2)]', ''], + + // Complex logical expressions + ['$.phoneNumbers[?((@.price < 30 && @.type == "iPhone") || @.num == 1)]', ''], + ['$..phoneNumbers[?(!(@.price < 30 && !(@.type == "iPhone") && !(@.number)))]', ''], + ['$..phoneNumbers[?(!(@.price < 30) && !(@.type == "iPhone") && !(@.number))]', ''], + ['$..phoneNumbers[?(@.price < 30 && !(@.type == "iPhone" && @.number))]', ''], + + // Existence checks + ['$..book[?(@.isbn)]', ''], + ['$..book[?(!(@.isbn))]', ''], + + // String comparisons + ["$..book[?(@.author == 'J.R.R. Tolkien')].title", ''], + + // Object comparison in filter + ['$..book[?(@.author == {"test":1})].title', ''], + ]; + + for (const [input, expected] of filterCases) { + it(`parses filter: ${input}`, () => { + const tree = parse(input); + + if (expected) { + expect(stringify(tree || null)).to.equal(expected); + } else { + expect(stringify(tree || null)).to.equal(input.replace(/"/g, "'")); + } + }); + } + }); + + // ============================================ + // EXTENSION OPERATORS + // ============================================ + + describe('extension operators', () => { + const extensionCases: [string, string][] = [ + // in/nin operators + ["$.store.book[?(@.size nin ['M','L'])]", ''], + ['$.store.book[?(@.size nin ["M","L"])]', ''], + ['$.store.book[?(@.price in [1,2,3])]', ''], + + // Regex operator + ['$.store.book[?(@.price =~ /hello/)]', ''], + ['$.store.book[?(@.price =~ /hello/i)]', ''], + ['$.store.book[?(@.price =~ /hello/gui)]', ''], + ]; + + for (const [input, expected] of extensionCases) { + it(`parses extension: ${input}`, () => { + const tree = parse(input); + + if (expected) { + expect(stringify(tree || null)).to.equal(expected); + } else { + expect(stringify(tree || null)).to.equal(input.replace(/"/g, "'")); + } + }); + } + }); + + // ============================================ + // UNION SELECTORS + // ============================================ + + describe('union selectors', () => { + const unionCases: [string, string][] = [ + ['$.book[test, toto]', ''], + ['$.book["test", "toto"]', ''], + ]; + + for (const [input, expected] of unionCases) { + it(`parses union: ${input}`, () => { + const tree = parse(input); + + if (expected) { + expect(stringify(tree || null)).to.equal(expected); + } else { + expect(stringify(tree || null)).to.equal(input.replace(/"/g, "'")); + } + }); + } + }); + + // ============================================ + // ARRAY SLICES + // ============================================ + + describe('array slices', () => { + const sliceCases: [string, string][] = [ + // Basic slices + ['$..book[0:1].title', ''], + ['$..book[:2].title', ''], + ['$..book[5:2].title', ''], + + // Slices with step + ['$..book[:7:2].title', ''], + ['$..book[::2].title', ''], + ['$..book[1::2].title', ''], + ['$..book[5::2].title', ''], + ['$..book[0:2:1].title', ''], + + // Normalized slice output (trailing colons removed) + ['$..book[:1:].title', '$..book[:1].title'], + ['$..book[1::].title', '$..book[1:].title'], + ['$..book[:].title', ''], + ]; + + for (const [input, expected] of sliceCases) { + it(`parses slice: ${input}`, () => { const tree = parse(input); if (expected) { - expect(stringify(tree || null)).to.deep.equal(expected); + expect(stringify(tree || null)).to.equal(expected); } else { - expect(stringify(tree || null)).to.deep.equal(input.replace(/'/g, '"')); + expect(stringify(tree || null)).to.equal(input.replace(/"/g, "'")); } - done(); - }).not.to.throw(Error); + }); + } + }); + + // ============================================ + // ERROR HANDLING + // ============================================ + + describe('error handling', () => { + it('returns null with hideExceptions for invalid path', () => { + const tree = parse('bad', { hideExceptions: true }); + expect(tree).to.be.null; + }); + + it('throws for invalid path by default', () => { + expect(() => parse('bad')).to.throw(Error); + }); + }); + + // ============================================ + // RFC 9535 FUNCTION CALLS + // ============================================ + + describe('function call parsing', () => { + it('parses length function', () => { + const tree = parse('$[?(length(@.name) > 5)]'); + expect(stringify(tree)).to.equal("$[?(length(@.name) > 5)]"); + }); + + it('parses count function', () => { + const tree = parse('$[?(count(@.items) == 3)]'); + expect(stringify(tree)).to.equal("$[?(count(@.items) == 3)]"); + }); + + it('parses match function with string argument', () => { + const tree = parse('$[?(match(@.name, "foo.*"))]'); + expect(stringify(tree)).to.equal("$[?(match(@.name, 'foo.*'))]"); + }); + + it('parses search function with string argument', () => { + const tree = parse('$[?(search(@.text, "pattern"))]'); + expect(stringify(tree)).to.equal("$[?(search(@.text, 'pattern'))]"); + }); + + it('parses value function', () => { + const tree = parse('$[?(value(@.single) == 42)]'); + expect(stringify(tree)).to.equal('$[?(value(@.single) == 42)]'); + }); + + it('parses function with multiple path arguments', () => { + const tree = parse('$[?(match(@.a, @.b))]'); + expect(stringify(tree)).to.equal('$[?(match(@.a, @.b))]'); + }); + }); + + // ============================================ + // VALUE SUBTYPES IN STRINGIFY + // ============================================ + + describe('value subtypes', () => { + it('stringifies object values in filters', () => { + const tree = parse('$[?(@.data == {"key": "value"})]'); + expect(stringify(tree)).to.equal("$[?(@.data == {'key':'value'})]"); + }); + + it('stringifies array values in filters', () => { + const tree = parse('$[?(@.arr == [1, 2, "three"])]'); + expect(stringify(tree)).to.equal("$[?(@.arr == [1,2,'three'])]"); + }); + + it('stringifies nested objects', () => { + const tree = parse('$[?(@.data == {"outer": {"inner": 1}})]'); + expect(stringify(tree)).to.equal("$[?(@.data == {'outer':{'inner':1}})]"); + }); + + it('stringifies mixed arrays', () => { + const tree = parse('$[?(@.arr == [1, "two", true, null])]'); + expect(stringify(tree)).to.equal("$[?(@.arr == [1,'two',true,null])]"); + }); + }); + + // ============================================ + // CONTROL CHARACTER ESCAPING (RFC 9535) + // ============================================ + + describe('control character escaping', () => { + it('round-trips newline in string literal', () => { + const input = "$['a\\nb']"; + const tree = parse(input); + expect(stringify(tree)).to.equal(input); + }); + + it('round-trips tab in string literal', () => { + const input = "$['a\\tb']"; + const tree = parse(input); + expect(stringify(tree)).to.equal(input); + }); + + it('round-trips carriage return in string literal', () => { + const input = "$['a\\rb']"; + const tree = parse(input); + expect(stringify(tree)).to.equal(input); + }); + + it('round-trips backspace in string literal', () => { + const input = "$['a\\bb']"; + const tree = parse(input); + expect(stringify(tree)).to.equal(input); + }); + + it('round-trips form feed in string literal', () => { + const input = "$['a\\fb']"; + const tree = parse(input); + expect(stringify(tree)).to.equal(input); + }); + + it('round-trips backslash in string literal', () => { + const input = "$['a\\\\b']"; + const tree = parse(input); + expect(stringify(tree)).to.equal(input); + }); + + it('round-trips single quote in string literal', () => { + const input = "$['a\\'b']"; + const tree = parse(input); + expect(stringify(tree)).to.equal(input); + }); + + it('round-trips null character as \\u0000', () => { + const input = "$['a\\u0000b']"; + const tree = parse(input); + expect(stringify(tree)).to.equal(input); + }); + + it('round-trips other control chars as \\uXXXX', () => { + const input = "$['a\\u001fb']"; + const tree = parse(input); + expect(stringify(tree)).to.equal(input); + }); + + it('escapes control chars in filter string values', () => { + const input = "$[?(@.name == 'line1\\nline2')]"; + const tree = parse(input); + expect(stringify(tree)).to.equal(input); }); }); - it('should not throw exceptions', () => { - const tree = parse('bad', { hideExceptions: true }); + // ============================================ + // UNARY OPERATOR AND FUNCTION ROUND-TRIPS + // ============================================ + + describe('unary operators and functions', () => { + it('round-trips empty operator', () => { + const input = "$[?(@.arr empty)]"; + const tree = parse(input); + expect(stringify(tree)).to.equal(input); + }); + + it('round-trips length function', () => { + const input = "$[?(length(@.name) > 5)]"; + const tree = parse(input); + expect(stringify(tree)).to.equal(input); + }); + + it('round-trips count function', () => { + const input = "$[?(count(@.items) == 3)]"; + const tree = parse(input); + expect(stringify(tree)).to.equal(input); + }); + + it('round-trips match function', () => { + const input = "$[?(match(@.name, 'foo.*'))]"; + const tree = parse(input); + expect(stringify(tree)).to.equal(input); + }); + + it('round-trips search function', () => { + const input = "$[?(search(@.text, 'pattern'))]"; + const tree = parse(input); + expect(stringify(tree)).to.equal(input); + }); - expect(tree).to.be.null; + it('round-trips value function', () => { + const input = "$[?(value(@.single) == 42)]"; + const tree = parse(input); + expect(stringify(tree)).to.equal(input); + }); }); - it('should throw exceptions', () => { - expect(() => { - parse('bad'); - }).to.throw(Error); + + // ============================================ + // WHITESPACE HANDLING + // ============================================ + + describe('whitespace handling', () => { + it('accepts leading whitespace', () => { + const tree = parse(' $.a'); + expect(stringify(tree)).to.equal('$.a'); + }); + + it('accepts trailing whitespace', () => { + const tree = parse('$.a '); + expect(stringify(tree)).to.equal('$.a'); + }); + + it('accepts leading and trailing whitespace', () => { + const tree = parse(' $.store.book[0] '); + expect(stringify(tree)).to.equal('$.store.book[0]'); + }); + + it('accepts tabs and newlines', () => { + const tree = parse('\t\n$.a\n\t'); + expect(stringify(tree)).to.equal('$.a'); + }); }); }); diff --git a/tests/paths.test.ts b/tests/paths.test.ts index 58e4ef3..6adbb0c 100644 --- a/tests/paths.test.ts +++ b/tests/paths.test.ts @@ -1,8 +1,27 @@ +/** + * Paths Function Tests + * + * Tests for the paths() function which returns JSONPath normalized paths + * for matched values instead of the values themselves. + * + * Test categories: + * - Path/query consistency: paths() results should resolve to same values as query() + * - Recursive descent: $..property patterns + * - Wildcards: $.* and $[*] + * - Array slices: $[start:end:step] + * - Filter expressions: $[?(@.condition)] + * - RFC 9535 normalized format: single-quoted name selectors + * - Error handling: hideExceptions option + */ import { paths, PathsOptions } from '../src/handler/paths'; import { query } from '../src/handler/query'; import { expect } from 'chai'; -describe('paths', () => { +describe('Paths Function', () => { + // ============================================ + // TEST DATA + // ============================================ + const PAYLOAD = { array: [1, 2, 3, 4, 5, 6, 7, 8, 9], nested: { @@ -26,91 +45,122 @@ describe('paths', () => { }, }; - const testCases = [ - { payload: PAYLOAD, path: `$.string` }, - { payload: PAYLOAD, path: `$.array.2` }, - { payload: PAYLOAD, path: `$.bad` }, - { payload: PAYLOAD, path: `$.array[?(@ > 3)]` }, - { payload: PAYLOAD, path: `$.array[?(@ > 3)]` }, - { payload: PAYLOAD, path: `$.*.book` }, - { payload: PAYLOAD, path: `$..*..book` }, - { payload: PAYLOAD, path: `$..*..book[*]` }, - { payload: PAYLOAD, path: `$..nested` }, - { payload: PAYLOAD, path: `$..*.nested..nested` }, - { payload: PAYLOAD, path: `$..*..*[0].nested` }, - { payload: PAYLOAD, path: `$..*..*[10].nested` }, - { payload: PAYLOAD, path: `$..*..*[10].nested` }, - { payload: PAYLOAD, path: `$..nested.nested[*]["nested"]` }, - { payload: PAYLOAD, path: `$..*.object` }, - { payload: PAYLOAD, path: `$..*.object..test` }, - { payload: PAYLOAD, path: `$..*.object.test` }, - { payload: PAYLOAD, path: `$.*.object.test` }, - { payload: PAYLOAD, path: `$..nested[?(@.number==1)]` }, - { payload: PAYLOAD, path: `$..[?(@.number < 2 )]` }, - { payload: PAYLOAD, path: `$..nested[?(@.number>=2)]` }, - { payload: PAYLOAD, path: `$..nested[?(@.number>=2)].number` }, - { payload: PAYLOAD, path: `$..nested[?(@.bad+2>=2)].number` }, - { payload: PAYLOAD, path: `$..nested[?(@.exist)]` }, - { payload: PAYLOAD, path: `$..nested[0,2]` }, - { payload: PAYLOAD, path: `$.array[-1]` }, - { payload: PAYLOAD, path: `$.array[10,11,12]` }, - { payload: PAYLOAD, path: `$.array[10]` }, - { payload: PAYLOAD, path: `$.string[1:3]` }, - { payload: PAYLOAD, path: `$.array[1:3]` }, - { payload: PAYLOAD, path: `$.array[-1:]` }, - { payload: PAYLOAD, path: `$.array[:3]` }, - { payload: PAYLOAD, path: `$.array[5:2]` }, - { payload: PAYLOAD, path: `$.array[:7:2]` }, - { payload: PAYLOAD, path: `$.array[::3]` }, - { payload: PAYLOAD, path: `$.array[2::3]` }, - { payload: PAYLOAD, path: `$.array[:2:]` }, - { payload: PAYLOAD, path: `$.array[:2]` }, - { payload: PAYLOAD, path: `$.array[7::]` }, - { payload: PAYLOAD, path: `$.array[5::2]` }, - { payload: PAYLOAD, path: `$.array[:]` }, - { payload: PAYLOAD, path: `$.array[0:2:2]` }, - { payload: PAYLOAD, path: `$..nested["value", "exist"]` }, - { payload: PAYLOAD, path: `$..*..nested.*` }, - ]; - - testCases.forEach(({ payload, path }) => { - it(path, () => { - const res1 = query(payload, path, { returnArray: true }); - const res2 = paths(payload, path); - const res3 = query(payload, res2 as string[]); - - expect(res1).to.deep.equal(res3); - }); + // ============================================ + // PATH/QUERY CONSISTENCY + // ============================================ + + describe('path/query consistency', () => { + const consistencyCases = [ + // Non-existent paths + { path: '$.string', desc: 'non-existent property' }, + { path: '$.array.2', desc: 'array index via dot notation' }, + { path: '$.bad', desc: 'missing property' }, + + // Filter expressions + { path: '$.array[?(@ > 3)]', desc: 'filter with comparator' }, + { path: '$..nested[?(@.number==1)]', desc: 'filter in recursive descent' }, + { path: '$..[?(@.number < 2 )]', desc: 'recursive descent with filter' }, + { path: '$..nested[?(@.number>=2)]', desc: 'filter with >=operator' }, + { path: '$..nested[?(@.number>=2)].number', desc: 'filter followed by property' }, + { path: '$..nested[?(@.bad+2>=2)].number', desc: 'filter with arithmetic' }, + { path: '$..nested[?(@.exist)]', desc: 'existence filter' }, + + // Wildcards + { path: '$.*.book', desc: 'wildcard property access' }, + { path: '$..*..book', desc: 'recursive descent with wildcard' }, + { path: '$..*..book[*]', desc: 'recursive descent with array wildcard' }, + { path: '$..*.nested..nested', desc: 'chained wildcards and recursion' }, + { path: '$..*..*[0].nested', desc: 'complex wildcard chain' }, + { path: '$..*..*[10].nested', desc: 'wildcard with out-of-bounds index' }, + { path: '$..*..nested.*', desc: 'recursive then wildcard' }, + + // Recursive descent + { path: '$..nested', desc: 'recursive descent for nested' }, + { path: '$..nested.nested[*]["nested"]', desc: 'complex nested access' }, + { path: '$..*.object', desc: 'recursive wildcard with property' }, + { path: '$..*.object..test', desc: 'recursive with object property' }, + { path: '$..*.object.test', desc: 'wildcard then direct access' }, + { path: '$.*.object.test', desc: 'single wildcard with path' }, + + // Union selectors + { path: '$..nested[0,2]', desc: 'union index selector' }, + { path: '$..nested["value", "exist"]', desc: 'union string selector' }, + + // Negative indices + { path: '$.array[-1]', desc: 'negative index' }, + + // Out of bounds + { path: '$.array[10,11,12]', desc: 'multiple out-of-bounds indices' }, + { path: '$.array[10]', desc: 'single out-of-bounds index' }, + + // Slices + { path: '$.string[1:3]', desc: 'slice on string (should be empty)' }, + { path: '$.array[1:3]', desc: 'basic slice' }, + { path: '$.array[-1:]', desc: 'negative start slice' }, + { path: '$.array[:3]', desc: 'slice with end only' }, + { path: '$.array[5:2]', desc: 'inverted slice (empty result)' }, + { path: '$.array[:7:2]', desc: 'slice with step' }, + { path: '$.array[::3]', desc: 'slice every 3rd element' }, + { path: '$.array[2::3]', desc: 'slice from index 2 every 3rd' }, + { path: '$.array[:2:]', desc: 'slice with trailing colon' }, + { path: '$.array[:2]', desc: 'slice first 2' }, + { path: '$.array[7::]', desc: 'slice from index 7' }, + { path: '$.array[5::2]', desc: 'slice from 5 with step 2' }, + { path: '$.array[:]', desc: 'full slice' }, + { path: '$.array[0:2:2]', desc: 'slice with all parts' }, + ]; + + for (const { path, desc } of consistencyCases) { + it(`${desc}: ${path}`, () => { + const queryResult = query(PAYLOAD, path, { returnArray: true }); + const pathsResult = paths(PAYLOAD, path); + const resolvedResult = query(PAYLOAD, pathsResult as string[]); + + expect(queryResult).to.deep.equal(resolvedResult); + }); + } }); - describe('exceptions', () => { - const PAYLOAD = { + // ============================================ + // EXPECTED PATH OUTPUT + // ============================================ + + describe('expected path output', () => { + const SIMPLE_PAYLOAD = { string: 'string', array: [1, 2, 3, 4], nested: { object: 1, }, }; - const testCases = [ - { payload: PAYLOAD, path: `$.string`, expected: [`$["string"]`], opts: {} }, - { payload: PAYLOAD, path: `$.array.2`, expected: [`$["array"][2]`], opts: {} }, - { payload: PAYLOAD, path: `$.bad`, expected: [], opts: {} }, - { payload: PAYLOAD, path: `$.array[?(@ > 3)]`, expected: [`$["array"][3]`], opts: {} }, - { payload: PAYLOAD, path: `$.array["badQUote']`, expected: [], opts: { hideExceptions: true } }, - ]; - testCases.forEach(({ payload, path, expected, opts }) => { - it(path, () => { - const res = paths(payload, path, opts as PathsOptions); + const outputCases = [ + { path: '$.string', expected: ["$['string']"], desc: 'simple property' }, + { path: '$.array.2', expected: ["$['array'][2]"], desc: 'array index' }, + { path: '$.bad', expected: [], desc: 'missing property' }, + { path: '$.array[?(@ > 3)]', expected: ["$['array'][3]"], desc: 'filter result' }, + ]; - expect(res).to.deep.equal(expected); + for (const { path, expected, desc } of outputCases) { + it(`returns correct path for ${desc}: ${path}`, () => { + const result = paths(SIMPLE_PAYLOAD, path); + expect(result).to.deep.equal(expected); }); + } + }); + + // ============================================ + // ERROR HANDLING + // ============================================ + + describe('error handling', () => { + it('returns empty array with hideExceptions for invalid path', () => { + const result = paths({}, '$.array["badQUote\']', { hideExceptions: true } as PathsOptions); + expect(result).to.deep.equal([]); }); - it('should throw exception', () => { - expect(() => { - paths({}, 'bad'); - }).to.throw(Error); + it('throws for invalid path by default', () => { + expect(() => paths({}, 'bad')).to.throw(Error); }); }); }); diff --git a/tests/query.test.ts b/tests/query.test.ts index 36dd195..a30e0b8 100644 --- a/tests/query.test.ts +++ b/tests/query.test.ts @@ -1,765 +1,926 @@ +/** + * Query Function Tests + * + * Comprehensive tests for the query() function covering: + * - Dot notation: $.key, $.* + * - Bracket notation: $['key'], $[0] + * - Recursive descent: $..key + * - Array slices: $[start:end:step] + * - Filters: $[?(@.key == value)] + * - Comparators: ==, !=, <, <=, >, >= + * - Logical operators: &&, ||, ! + * - RFC 9535 functions: length(), count(), match(), search(), value() + */ import { query } from '../src/handler/query'; import { JSONPathSyntaxError } from '../src/parser/errors'; import { expect } from 'chai'; -describe('query', () => { - describe('with dot notations', () => { - const PAYLOAD = { +describe('query()', () => { + // ============================================ + // DOT NOTATION + // ============================================ + + describe('dot notation', () => { + const data = { string: 'string', array: [1, 2, 3, 4], - nested: { - object: 1, - }, + nested: { object: 1 }, }; - const testCases = [ - { payload: PAYLOAD, path: `$.string`, expected: PAYLOAD.string }, - { payload: PAYLOAD, path: `$.array.2`, expected: PAYLOAD.array[2] }, - { payload: PAYLOAD, path: `$.array.10`, expected: undefined }, - { payload: PAYLOAD, path: `$.array.-1`, expected: PAYLOAD.array[3] }, - { payload: PAYLOAD, path: `$.nested.object`, expected: PAYLOAD.nested.object }, - { payload: PAYLOAD, path: `$.*`, expected: Object.values(PAYLOAD) }, - { payload: PAYLOAD, path: `$.*.object`, expected: [1] }, - { payload: PAYLOAD, path: `$.nested.*`, expected: Object.values(PAYLOAD.nested) }, - { payload: PAYLOAD, path: `$.bad`, expected: undefined }, - { - payload: { - empty: 'value', - }, - path: `$.empty`, - expected: 'value', - }, - { payload: [PAYLOAD], path: `$.string`, expected: undefined }, - { - payload: { - key: 42, - key_: 43, - _: 44, - dash: 45, - _dash: 46, - '': 47, - // eslint-disable-next-line @typescript-eslint/camelcase - 'key_underscore-toto': 'value', - something: 'else', - }, - path: '$.key_underscore-toto', - expected: 'value', - }, - ]; - testCases.forEach(({ payload, path, expected }) => { - it(path, () => { - const res = query(payload, path); + it('accesses simple property', () => { + expect(query(data, '$.string')).to.equal('string'); + }); - expect(res).to.deep.equal(expected); - }); + it('accesses array by index', () => { + expect(query(data, '$.array.2')).to.equal(3); + }); + + it('returns undefined for missing property', () => { + expect(query(data, '$.missing')).to.be.undefined; + }); + + it('accesses negative index', () => { + expect(query(data, '$.array.-1')).to.equal(4); + }); + + it('accesses nested property', () => { + expect(query(data, '$.nested.object')).to.equal(1); + }); + + it('uses wildcard for all values', () => { + expect(query(data, '$.*')).to.deep.equal(Object.values(data)); + }); + + it('combines wildcard with property', () => { + expect(query(data, '$.*.object')).to.deep.equal([1]); + }); + + it('handles key with underscore and dash', () => { + const obj = { 'key_underscore-dash': 'value' }; + expect(query(obj, '$.key_underscore-dash')).to.equal('value'); }); }); - describe('with dot dot notations', () => { - describe('with identifier / stringLiteral / numericLiteral', () => { - const PAYLOAD = { - nested: { - nested: [ - { - nested: 2, - exist: true, - }, - { - nested: 3, - test: { nested: [] }, - }, - ], - }, - other: { - object: { - test: '1', - }, - }, - }; - const testCases = [ - { payload: PAYLOAD, path: `$..notExist`, expected: [] }, - { - payload: PAYLOAD, - path: `$..nested..nested..nested`, - expected: [2, 3, []], - }, - { - payload: PAYLOAD, - path: `$..other`, - expected: [PAYLOAD.other], - }, - { - payload: PAYLOAD, - path: `$..["nested"].nested..test`, - expected: [PAYLOAD.nested.nested[1].test], - }, - { - payload: PAYLOAD, - path: `$..nested["nested"]..["test"]`, - expected: [PAYLOAD.nested.nested[1].test], - }, - { - payload: PAYLOAD, - path: `$..nested.nested[0]`, - expected: [PAYLOAD.nested.nested[0]], - }, - { - payload: PAYLOAD, - path: `$..nested.nested.1`, - expected: [PAYLOAD.nested.nested[1]], - }, - { - payload: PAYLOAD, - path: `$..nested.nested.1.test`, - expected: [PAYLOAD.nested.nested[1].test], - }, - ]; + // ============================================ + // RECURSIVE DESCENT + // ============================================ - testCases.forEach(({ payload, path, expected }) => { - it(path, () => { - const res = query(payload, path); + describe('recursive descent', () => { + const data = { + nested: { + nested: [ + { nested: 2, exist: true }, + { nested: 3, test: { nested: [] } }, + ], + }, + other: { object: { test: '1' } }, + }; - expect(res).to.deep.equal(expected); - }); - }); + it('finds all matching properties', () => { + expect(query(data, '$..nested..nested..nested')).to.deep.equal([2, 3, []]); }); - describe('with wildcard', () => { - const PAYLOAD = { - nested: { - nested: [ - { - nested: 2, - exist: true, - }, - { - nested: 3, - test: { nested: [] }, - }, - ], - }, - other: { - object: { - test: '1', - }, - }, - }; - const testCases = [ - { payload: { store: { book: [1, 2, 3] } }, path: `$.*.book`, expected: [[1, 2, 3]] }, - { payload: { store: { book: [1, 2, 3] } }, path: `$..*..book`, expected: [[1, 2, 3]] }, - { payload: { store: { book: [1, 2, 3] } }, path: `$..*..book[*]`, expected: [1, 2, 3] }, - { payload: PAYLOAD, path: `$..*.nested..nested`, expected: [2, 3, []] }, - { payload: PAYLOAD, path: `$..[*].nested..["nested"]`, expected: [2, 3, []] }, - { payload: PAYLOAD, path: `$..*..*[0].nested`, expected: [2] }, - { payload: PAYLOAD, path: `$..*..[*][0].nested`, expected: [2] }, - { payload: PAYLOAD, path: `$..*..*[10].nested`, expected: [] }, - { payload: PAYLOAD, path: `$..nested.nested[*]["nested", "exist"]`, expected: [2, true, 3] }, - { payload: [PAYLOAD], path: `$..nested.nested[*]["nested", "exist"]`, expected: [2, true, 3] }, - { payload: PAYLOAD, path: `$..*.object`, expected: [{ test: '1' }] }, - { payload: PAYLOAD, path: `$..*..*..*..*..*`, expected: [[]] }, - { payload: PAYLOAD, path: `$..*..*..*..*..[*]`, expected: [[]] }, - { payload: PAYLOAD, path: `$..*.object..test`, expected: ['1'] }, - { payload: PAYLOAD, path: `$..*.object.test`, expected: ['1'] }, - { payload: [PAYLOAD], path: `$..*.object.test`, expected: ['1'] }, - ]; + it('returns empty for non-existent property', () => { + expect(query(data, '$..notExist')).to.deep.equal([]); + }); - testCases.forEach(({ payload, path, expected }) => { - it(path, () => { - const res = query(payload, path); + it('combines with bracket notation', () => { + expect(query(data, '$..["nested"].nested..test')).to.deep.equal([data.nested.nested[1].test]); + }); + + it('accesses by index in recursive descent', () => { + expect(query(data, '$..nested.nested[0]')).to.deep.equal([data.nested.nested[0]]); + }); - expect(res).to.deep.equal(expected); - }); + describe('with wildcard', () => { + it('finds nested objects', () => { + const obj = { store: { book: [1, 2, 3] } }; + expect(query(obj, '$.*.book')).to.deep.equal([[1, 2, 3]]); + }); + + it('recursively finds all items', () => { + const obj = { store: { book: [1, 2, 3] } }; + expect(query(obj, '$..*..book[*]')).to.deep.equal([1, 2, 3]); }); }); describe('with filters', () => { - const PAYLOAD = { + const items = { number: 2, nested: { nested: [{ number: 1, exist: true }, { number: 2 }, { number: 3 }], }, }; - const testCases = [ - { payload: PAYLOAD, path: `$..nested.*["number", "exist"]`, expected: [1, true, 2, 3] }, - { - payload: PAYLOAD, - path: `$..nested[?(@.number==1)]`, - expected: [PAYLOAD.nested.nested[0]], - }, - { - payload: [PAYLOAD], - path: `$..nested[?(@.number==1)]`, - expected: [PAYLOAD.nested.nested[0]], - }, - { - payload: { number: 1, exist: true }, - path: `$..[?(@.number==1)]`, - expected: [{ number: 1, exist: true }], - }, - { - payload: [{ number: 1, exist: true }], - path: `$..[?(@.number==1)]`, - expected: [{ number: 1, exist: true }], - }, - { - payload: PAYLOAD, - path: `$..[?(@.number < 2 )]`, - expected: [{ number: 1, exist: true }], - }, - { - payload: PAYLOAD, - path: `$..nested[?(@.number>=2)]`, - expected: [PAYLOAD.nested.nested[1], PAYLOAD.nested.nested[2]], - }, - { - payload: PAYLOAD, - path: `$..nested[?(@.number>=2)].number`, - expected: [2, 3], - }, - { - payload: PAYLOAD, - path: `$..nested[?(@.exist)]`, - expected: [PAYLOAD.nested.nested[0]], - }, - { - payload: PAYLOAD, - path: `$..nested[?(@.number < $.number)]`, - expected: [PAYLOAD.nested.nested[0]], - }, - { - payload: PAYLOAD, - path: `$..nested[0,2]`, - expected: [PAYLOAD.nested.nested[0], PAYLOAD.nested.nested[2]], - }, - { - payload: PAYLOAD, - path: `$..nested[:2]`, - expected: [PAYLOAD.nested.nested[0], PAYLOAD.nested.nested[1]], - }, - ]; - - testCases.forEach(({ payload, path, expected }) => { - it(path, () => { - const res = query(payload, path); + it('filters in recursive descent', () => { + expect(query(items, '$..nested[?(@.number==1)]')).to.deep.equal([items.nested.nested[0]]); + }); - expect(res).to.deep.equal(expected); - }); + it('filters with comparison to root', () => { + expect(query(items, '$..nested[?(@.number < $.number)]')).to.deep.equal([items.nested.nested[0]]); }); }); }); - describe('with bracket numeric value', () => { - const PAYLOAD = { + // ============================================ + // BRACKET NOTATION - NUMERIC + // ============================================ + + describe('bracket notation - numeric', () => { + const data = { string: 'stringValue', number: 0, - arrayOfNumber: [1, 2, 3, 4, 5, 6, 7, 8, 9], + array: [1, 2, 3, 4, 5, 6, 7, 8, 9], }; - const testCases = [ - { payload: PAYLOAD, path: `$.arrayOfNumber[-1]`, expected: 9 }, - { payload: PAYLOAD, path: `$.arrayOfNumber[1]`, expected: 2 }, - { payload: PAYLOAD, path: `$.arrayOfNumber[1,3,5]`, expected: [2, 4, 6] }, - { payload: PAYLOAD, path: `$.arrayOfNumber[10,11,12]`, expected: [] }, - { payload: PAYLOAD, path: `$.arrayOfNumber[10,1,12]`, expected: [2] }, - { payload: PAYLOAD, path: `$.arrayOfNumber[10]`, expected: undefined }, - { payload: PAYLOAD, path: `$.string[0]`, expected: undefined }, - { payload: PAYLOAD, path: `$.string[0,1,2]`, expected: [] }, - { payload: PAYLOAD, path: `$.number[0]`, expected: undefined }, - { payload: PAYLOAD, path: `$.number.0`, expected: undefined }, - ]; + it('accesses by negative index', () => { + expect(query(data, '$.array[-1]')).to.equal(9); + }); - testCases.forEach(({ payload, path, expected }) => { - it(path, () => { - const res = query(payload, path); + it('accesses by positive index', () => { + expect(query(data, '$.array[1]')).to.equal(2); + }); - expect(res).to.deep.equal(expected); - }); + it('accesses multiple indices', () => { + expect(query(data, '$.array[1,3,5]')).to.deep.equal([2, 4, 6]); + }); + + it('returns empty for out of bounds indices', () => { + expect(query(data, '$.array[10,11,12]')).to.deep.equal([]); + }); + + it('returns undefined for single out of bounds index', () => { + expect(query(data, '$.array[10]')).to.be.undefined; + }); + + it('returns undefined for index on string', () => { + expect(query(data, '$.string[0]')).to.be.undefined; + }); + + it('returns undefined for index on number', () => { + expect(query(data, '$.number[0]')).to.be.undefined; }); }); - describe('with bracket string value', () => { - const PAYLOAD = { + // ============================================ + // BRACKET NOTATION - STRING + // ============================================ + + describe('bracket notation - string', () => { + const data = { string: 'stringValue', number: 0, - arrayOfNumber: [1, 2, 3, 4, 5, 6, 7, 8, 9], - arrayOfString: ['11', '22', '33', '44', '55'], - nestedObject: { - object: { - test: '1', - }, - }, + nested: { object: { test: '1' } }, }; - const testCases = [ - { payload: PAYLOAD, path: `$["notExist"]`, undefined }, - { payload: PAYLOAD, path: `$["string"]`, expected: PAYLOAD.string }, - // Different implementation depending on libraries - { payload: PAYLOAD, path: `$[string, number]`, expected: [PAYLOAD.string, PAYLOAD.number] }, - { payload: PAYLOAD, path: `$["string", "number"]`, expected: [PAYLOAD.string, PAYLOAD.number] }, - { payload: PAYLOAD, path: `$["nestedObject"]["object"]`, expected: PAYLOAD.nestedObject.object }, - { payload: PAYLOAD, path: `$[nestedObject]`, expected: PAYLOAD.nestedObject }, - { payload: PAYLOAD, path: `$[*]`, expected: Object.values(PAYLOAD) }, - { payload: PAYLOAD, path: `$[*]["object"]`, expected: [PAYLOAD.nestedObject.object] }, - ]; + it('accesses by quoted string', () => { + expect(query(data, '$["string"]')).to.equal('stringValue'); + }); - testCases.forEach(({ payload, path, expected }) => { - it(path, () => { - const res = query(payload, path); + it('accesses multiple keys', () => { + expect(query(data, '$["string", "number"]')).to.deep.equal(['stringValue', 0]); + }); - expect(res).to.deep.equal(expected); - }); + it('accesses unquoted identifiers', () => { + expect(query(data, '$[string, number]')).to.deep.equal(['stringValue', 0]); + }); + + it('accesses nested with bracket notation', () => { + expect(query(data, '$["nested"]["object"]')).to.deep.equal(data.nested.object); + }); + + it('uses wildcard in brackets', () => { + expect(query(data, '$[*]')).to.deep.equal(Object.values(data)); + }); + }); + + // ============================================ + // RFC 9535: MIXED SELECTOR LISTS + // ============================================ + + describe('mixed selector lists (RFC 9535)', () => { + it('allows mixed string and numeric selectors', () => { + const obj = { a: 1, b: 2, '0': 'zero' }; + expect(query(obj, '$["a","b"]')).to.deep.equal([1, 2]); + }); + + it('allows numeric selectors in arrays', () => { + const arr = ['x', 'y', 'z']; + expect(query(arr, '$[0,2]')).to.deep.equal(['x', 'z']); + }); + + it('allows wildcard in selector list', () => { + const arr = ['a', 'b']; + expect(query(arr, '$[0,*]')).to.deep.equal(['a', 'a', 'b']); + }); + + it('handles selector list with nested access', () => { + const data = [{ a: 1 }, { a: 2 }, { a: 3 }]; + expect(query(data, '$[0,2].a')).to.deep.equal([1, 3]); + }); + + it('ignores non-matching selector types', () => { + // Numeric selector on object returns nothing for that selector + const obj = { a: 1 }; + expect(query(obj, '$["a"]')).to.equal(1); + }); + + it('returns empty for numeric selectors on non-arrays', () => { + const obj = { a: 1 }; + expect(query(obj, '$[0,1]')).to.deep.equal([]); }); }); - describe('with array slice', () => { - const PAYLOAD = { + // ============================================ + // ARRAY SLICES + // ============================================ + + describe('array slices', () => { + const data = { string: 'stringValue', - arrayOfNumber: [1, 2, 3, 4, 5, 6, 7, 8, 9], + array: [1, 2, 3, 4, 5, 6, 7, 8, 9], }; - const testCases = [ - { payload: PAYLOAD, path: `$.string[1:3]`, expected: [] }, - { payload: PAYLOAD, path: `$.arrayOfNumber[1:3]`, expected: [2, 3] }, - { payload: PAYLOAD, path: `$.arrayOfNumber[-1:]`, expected: [9] }, - { payload: PAYLOAD, path: `$.arrayOfNumber[:3]`, expected: [1, 2, 3] }, - { payload: PAYLOAD, path: `$.arrayOfNumber[5:2]`, expected: [] }, - { payload: PAYLOAD, path: `$.arrayOfNumber[:7:2]`, expected: [1, 3, 5, 7] }, - { payload: PAYLOAD, path: `$.arrayOfNumber[::3]`, expected: [1, 4, 7] }, - { payload: PAYLOAD, path: `$.arrayOfNumber[2::3]`, expected: [3, 6, 9] }, - { payload: PAYLOAD, path: `$.arrayOfNumber[:2:]`, expected: [1, 2] }, - { payload: PAYLOAD, path: `$.arrayOfNumber[:2]`, expected: [1, 2] }, - { payload: PAYLOAD, path: `$.arrayOfNumber[7::]`, expected: [8, 9] }, - { payload: PAYLOAD, path: `$.arrayOfNumber[5::2]`, expected: [6, 8] }, - { payload: PAYLOAD, path: `$.arrayOfNumber[:]`, expected: PAYLOAD.arrayOfNumber }, - { payload: PAYLOAD, path: `$.arrayOfNumber[0:2:2]`, expected: [1] }, - ]; + it('returns empty for slice on string', () => { + expect(query(data, '$.string[1:3]')).to.deep.equal([]); + }); + + it('slices with start and end', () => { + expect(query(data, '$.array[1:3]')).to.deep.equal([2, 3]); + }); - testCases.forEach(({ payload, path, expected }) => { - it(path, () => { - const res = query(payload, path); + it('slices from negative to end', () => { + expect(query(data, '$.array[-1:]')).to.deep.equal([9]); + }); - expect(res).to.deep.equal(expected); - }); + it('slices from start to index', () => { + expect(query(data, '$.array[:3]')).to.deep.equal([1, 2, 3]); + }); + + it('returns empty for invalid range', () => { + expect(query(data, '$.array[5:2]')).to.deep.equal([]); + }); + + it('slices with step', () => { + expect(query(data, '$.array[:7:2]')).to.deep.equal([1, 3, 5, 7]); + }); + + it('slices with step only', () => { + expect(query(data, '$.array[::3]')).to.deep.equal([1, 4, 7]); + }); + + it('slices with start and step', () => { + expect(query(data, '$.array[2::3]')).to.deep.equal([3, 6, 9]); + }); + + it('slices all elements', () => { + expect(query(data, '$.array[:]')).to.deep.equal(data.array); + }); + + it('slices with all parameters', () => { + expect(query(data, '$.array[0:2:2]')).to.deep.equal([1]); }); }); - describe('with comparators', () => { - const PAYLOAD = { - arrayOfNumber: [1, 2, 3, 4, 5, 6, 7, 8, 9], - arraySimpleObjects: [ + // ============================================ + // COMPARATORS + // ============================================ + + describe('comparators', () => { + const data = { + items: [ { number: 2, string: 'ABC', exist: true, array: [1, 2, 3], str: '123' }, { number: 5, string: 'BCD', array: [4, 5, 6], str: '' }, { number: 7, string: 'CDE', array: [4, 5, 6], arr: [] }, ], }; - const testCases = [ - { - path: `$.arraySimpleObjects[?(@.number=="2")]..number`, - expected: [], - }, - { - path: `$.arraySimpleObjects[?(@.number*2==@.number+@.number)]..number`, - expected: [2, 5, 7], - }, - { - path: `$.arraySimpleObjects[?(@.number*2==@.number+@.number)]..["number"]`, - expected: [2, 5, 7], - }, - { - path: `$.arraySimpleObjects[?(@)]..number`, - expected: [2, 5, 7], - }, - { - path: `$.arraySimpleObjects[?($)]..number`, - expected: [2, 5, 7], - }, - { - path: `$.arraySimpleObjects[?(@.number>="5")].number`, - expected: [], - }, - { - path: `$.arraySimpleObjects[?(@.number>"5")].number`, - expected: [], - }, - { - path: `$.arraySimpleObjects[?(@.number<="5")].number`, - expected: [], - }, - { - path: `$.arraySimpleObjects[?(@.number<"5")].number`, - expected: [], - }, - { - path: `$.arraySimpleObjects[?(@.number in "5")].number`, - expected: [], - }, - { - path: `$.arraySimpleObjects[?(@.number nin "5")].number`, - expected: [], - }, - { - path: `$[?([1,2,3] subsetof @.arrayOfNumber)]`, - expected: [PAYLOAD], - }, - { - path: `$[?([10,3,3] subsetof @.arrayOfNumber)]`, - expected: [], - }, - { - path: `$[?(123 subsetof @.arrayOfNumber)]`, - expected: [], - }, - { - path: `$[?([10,11,2] anyof @.arrayOfNumber)]`, - expected: [PAYLOAD], - }, - { - path: `$[?([10,11,12] anyof @.arrayOfNumber)]`, - expected: [], - }, - { - path: `$[?(123 anyof @.arrayOfNumber)]`, - expected: [], - }, - { - path: `$[?([10,11,12] noneof @.arrayOfNumber)]`, - expected: [PAYLOAD], - }, - { - path: `$[?([10,11,1] noneof @.arrayOfNumber)]`, - expected: [], - }, - { - path: `$[?(123 noneof @.arrayOfNumber)]`, - expected: [], - }, - { - path: `$[?(@.arrayOfNumber sizeof @.arrayOfNumber)]`, - expected: [PAYLOAD], - }, - { - path: `$[?(@.arrayOfNumber sizeof 123)]`, - expected: [], - }, - { - path: `$[?(@.arrayOfNumber empty)]`, - expected: [], - }, - { - path: `$.arraySimpleObjects[?(@.arr empty)]`, - expected: [PAYLOAD.arraySimpleObjects[2]], - }, - { - path: `$.arraySimpleObjects[?(@.str empty)]`, - expected: [PAYLOAD.arraySimpleObjects[1]], - }, - { - path: `$[?(123 sizeof @.arrayOfNumber)]`, - expected: [], - }, - { - path: `$[?([1,2,3,4,5,6,7,8,9,10] sizeof @.arrayOfNumber)]`, - expected: [], - }, - { - path: `$[?(@.arrayOfNumber size 9)]`, - expected: [PAYLOAD], - }, - { - path: `$[?(@.arrayOfNumber size "9")]`, - expected: [], - }, - { - path: `$[?(123 size 9)]`, - expected: [], - }, - { - path: `$[?(@.arrayOfNumber size 8)]`, - expected: [], - }, - { - path: `$[?(123 sizeof 9)]`, - expected: [], - }, - { - path: `$.arraySimpleObjects[?(@.number==2)].number`, - expected: [2], - }, - { - path: `$.arraySimpleObjects[?(@.number!=2)].number`, - expected: [5, 7], - }, - { - path: `$.arraySimpleObjects[?(@.number==2)]..number`, - expected: [2], - }, - { - path: `$.arraySimpleObjects[?(@.exist)].number`, - expected: [2], - }, - { - path: `$.arraySimpleObjects[?(@.number>=5)].number`, - expected: [5, 7], - }, - { - path: `$.arraySimpleObjects[?(@.number>5)].number`, - expected: [7], - }, - { - path: `$.arraySimpleObjects[?(@.number<=5)].number`, - expected: [2, 5], - }, - { - path: `$.arraySimpleObjects[?(@.number<5)].number`, - expected: [2], - }, - { - path: `$.arraySimpleObjects[?(@.number in [1,2])].number`, - expected: [2], - }, - { - path: `$.arraySimpleObjects[?(@.number nin [1,2])].number`, - expected: [5, 7], - }, - { - path: `$.arraySimpleObjects[?(1 in @.array)].number`, - expected: [2], - }, - ]; + describe('equality', () => { + it('matches equal numbers', () => { + expect(query(data, '$.items[?(@.number==2)].number')).to.deep.equal([2]); + }); - testCases.forEach(({ path, expected }) => { - it(path, () => { - const res = query(PAYLOAD, path); + it('does not match string to number', () => { + expect(query(data, '$.items[?(@.number=="2")]..number')).to.deep.equal([]); + }); - expect(res).to.deep.equal(expected); + it('matches not equal', () => { + expect(query(data, '$.items[?(@.number!=2)].number')).to.deep.equal([5, 7]); + }); + }); + + describe('numeric comparison', () => { + it('matches greater than or equal', () => { + expect(query(data, '$.items[?(@.number>=5)].number')).to.deep.equal([5, 7]); + }); + + it('matches greater than', () => { + expect(query(data, '$.items[?(@.number>5)].number')).to.deep.equal([7]); + }); + + it('matches less than or equal', () => { + expect(query(data, '$.items[?(@.number<=5)].number')).to.deep.equal([2, 5]); + }); + + it('matches less than', () => { + expect(query(data, '$.items[?(@.number<5)].number')).to.deep.equal([2]); + }); + }); + + describe('existence check', () => { + it('matches when property exists and is truthy', () => { + expect(query(data, '$.items[?(@.exist)].number')).to.deep.equal([2]); + }); + }); + + describe('arithmetic operations', () => { + it('evaluates multiplication', () => { + expect(query(data, '$.items[?(@.number*2==@.number+@.number)]..number')).to.deep.equal([2, 5, 7]); + }); + + it('matches current and root paths', () => { + expect(query(data, '$.items[?(@)]..number')).to.deep.equal([2, 5, 7]); }); }); }); - describe('with comparator operations', () => { - const PAYLOAD = { + // ============================================ + // COMPARATOR OPERATIONS + // ============================================ + + describe('arithmetic in comparators', () => { + const data = { number: 0, - arraySimpleObjects: [ - { number: 2, string: 'ABC', exist: true, array: [1, 2, 3] }, - { number: 5, string: 'BCD', array: [4, 5, 6] }, - { number: 7, string: 'CDE', array: [4, 5, 6] }, + items: [ + { number: 2, string: 'ABC', exist: true }, + { number: 5, string: 'BCD' }, + { number: 7, string: 'CDE' }, ], }; - const testCases = [ - { - path: `$.arraySimpleObjects[?(@.number>$.number+3)]..number`, - expected: [5, 7], - }, - { - path: `$.arraySimpleObjects[?(@.number>$['number']+3)]..number`, - expected: [5, 7], - }, - { - path: `$.arraySimpleObjects[?(@.number>$.number+6)]..number`, - expected: [7], - }, - { - path: `$.arraySimpleObjects[?(@.number>$.number+7-10/10)]..number`, - expected: [7], - }, - { - path: `$.arraySimpleObjects[?(@.number>$.number+7-10/0)]..number`, - expected: [], - }, - { - path: `$.arraySimpleObjects[?(@.number>$.number+2+2*2)]..number`, - expected: [7], - }, - { - path: `$.arraySimpleObjects[?(@.number>$.number+(2+2)*2)]..number`, - expected: [], - }, - { - path: `$.arraySimpleObjects[?(@.number + 2 >$.number + 8)]..number`, - expected: [7], - }, - { - path: `$.arraySimpleObjects[?(@.number>3+10-8+1)]..number`, - expected: [7], - }, - { - path: `$.arraySimpleObjects[?(@.number>3 + 10 - 8 + 1)]..number`, - expected: [7], - }, - { - path: `$.arraySimpleObjects[?(@.number - 1 > @.number)]..number`, - expected: [], - }, - { - path: `$.arraySimpleObjects[?(@.number + 1 > @.number)]..number`, - expected: [2, 5, 7], - }, - ]; + it('adds to root value', () => { + expect(query(data, '$.items[?(@.number>$.number+3)]..number')).to.deep.equal([5, 7]); + }); - testCases.forEach(({ path, expected }) => { - const res = query(PAYLOAD, path); + it('handles complex arithmetic', () => { + expect(query(data, '$.items[?(@.number>$.number+7-10/10)]..number')).to.deep.equal([7]); + }); - expect(res).to.deep.equal(expected); + it('handles division by zero', () => { + expect(query(data, '$.items[?(@.number>$.number+7-10/0)]..number')).to.deep.equal([]); }); - it('should throw exception on missing operator', () => { - expect(() => { - query(PAYLOAD, '$.arraySimpleObjects[?(@.number>3 4)]..number'); - }).to.throw(Error); + it('respects operator precedence', () => { + expect(query(data, '$.items[?(@.number>$.number+2+2*2)]..number')).to.deep.equal([7]); }); - }); - describe('with bad path', () => { - const testCases = [ - { path: 'bad', err: JSONPathSyntaxError }, - { path: '', err: JSONPathSyntaxError }, - { path: '$...bad', err: JSONPathSyntaxError }, - { path: '$.$', err: JSONPathSyntaxError }, - { path: `$["bad Quote']`, err: JSONPathSyntaxError }, - { path: `$[bad Quote']`, err: JSONPathSyntaxError }, - { path: `$\{bad\}`, err: JSONPathSyntaxError }, - { path: `@`, err: JSONPathSyntaxError }, - { path: `$[?(@.test == {'1': undefined})]`, err: JSONPathSyntaxError }, - { path: `$[1:2:3:4]`, err: JSONPathSyntaxError }, - { path: `$[[1:2:3]]`, err: JSONPathSyntaxError }, - ]; + it('respects parentheses', () => { + expect(query(data, '$.items[?(@.number>$.number+(2+2)*2)]..number')).to.deep.equal([]); + }); - testCases.forEach(({ path, err }) => { - expect(() => { - query({ test: 1 }, path); - }).to.throw(err); + it('throws on missing operator', () => { + expect(() => query(data, '$.items[?(@.number>3 4)]..number')).to.throw(Error); }); }); - describe('with logical expressions', () => { - const PAYLOAD = { + // ============================================ + // LOGICAL EXPRESSIONS + // ============================================ + + describe('logical expressions', () => { + const data = { number: 0, - arraySimpleObjects: [ + items: [ { number: 2, string: 'ABC', exist: true, array: [1, 2, 3] }, { number: 5, string: 'BCD', array: [4, 5, 6] }, { number: 7, string: 'CDE', array: [4, 5, 6] }, ], }; - const testCases = [ - { - path: `$.arraySimpleObjects[?(@.number==2 || @.number==7)].number`, - expected: [2, 7], - }, - { - path: `$.arraySimpleObjects[?(4 in @.array && @.string=="BCD")].number`, - expected: [5], - }, - { - path: `$.arraySimpleObjects[?( (4 in @.array && @.string=="BCD") || @.number==2 )].number`, - expected: [2, 5], - }, - { - path: `$.arraySimpleObjects[?( !((4 in @.array && @.string=="BCD") || @.number==2) )].number`, - expected: [7], - }, - { - path: `$.arraySimpleObjects[?( $.number==0 )].number`, - expected: [2, 5, 7], - }, - { - path: `$.arraySimpleObjects[?($.number)].number`, - expected: [2, 5, 7], - }, - ]; + it('uses OR operator', () => { + expect(query(data, '$.items[?(@.number==2 || @.number==7)].number')).to.deep.equal([2, 7]); + }); + + it('uses AND operator', () => { + expect(query(data, '$.items[?(4 in @.array && @.string=="BCD")].number')).to.deep.equal([5]); + }); - testCases.forEach(({ path, expected }) => { - it(path, () => { - const res = query(PAYLOAD, path); + it('combines AND and OR', () => { + expect(query(data, '$.items[?((4 in @.array && @.string=="BCD") || @.number==2)].number')) + .to.deep.equal([2, 5]); + }); - expect(res).to.deep.equal(expected); - }); + it('uses NOT operator', () => { + expect(query(data, '$.items[?(!((4 in @.array && @.string=="BCD") || @.number==2))].number')) + .to.deep.equal([7]); + }); + + it('references root in filter', () => { + expect(query(data, '$.items[?($.number==0)].number')).to.deep.equal([2, 5, 7]); }); }); - describe('with return array option', () => { - const PAYLOAD = { - string: 'stringValue', - number: 0, - arrayOfNumber: [1, 2, 3, 4, 5, 6, 7, 8, 9], - }; + // ============================================ + // REGEX OPERATOR + // ============================================ - const testCases = [ - { - path: `$.number`, - expected: [PAYLOAD.number], - }, - { - path: `$.*`, - expected: Object.values(PAYLOAD), - }, - { - path: `$.string`, - expected: [PAYLOAD.string], - }, - { - path: `$.notExist`, - expected: [], - }, - ]; + describe('regex operator', () => { + const strings = ['Hello World !', 'hello Earth !', 'Good Morning']; - testCases.forEach(({ path, expected }) => { - it(path, () => { - const res = query(PAYLOAD, path, { returnArray: true }); + it('matches case-insensitive', () => { + expect(query(strings, '$[?(@ =~ /hello/i)]')).to.deep.equal([strings[0], strings[1]]); + }); + + it('matches with global flag', () => { + expect(query(strings, '$[?(@ =~ /World/g)]')).to.deep.equal([strings[0]]); + }); + + it('returns empty for no match', () => { + expect(query(strings, '$[?(@ =~ /bad/g)]')).to.deep.equal([]); + }); + + it('matches all with wildcard', () => { + expect(query(strings, '$[?(@ =~ /.*/g)]')).to.deep.equal(strings); + }); + + it('does not match numbers', () => { + expect(query([1], '$[?(@ =~ /.*/g)]')).to.deep.equal([]); + }); + + // RFC 9485: I-Regexp compliance (same validation as match/search) + it('rejects backreferences in =~ operator', () => { + expect(query([{ v: 'aa' }], '$[?(@.v =~ /(.)\\1/)]')).to.deep.equal([]); + }); + + it('rejects lookahead in =~ operator', () => { + expect(query([{ v: 'test' }], '$[?(@.v =~ /t(?=est)/)]')).to.deep.equal([]); + }); + + it('rejects word boundaries in =~ operator', () => { + expect(query([{ v: 'test' }], '$[?(@.v =~ /\\btest\\b/)]')).to.deep.equal([]); + }); - expect(res).to.deep.equal(expected); + it('allows valid I-Regexp patterns in =~ operator', () => { + expect(query([{ v: 'hello' }], '$[?(@.v =~ /hel.*/)]')).to.deep.equal([{ v: 'hello' }]); + }); + }); + + // ============================================ + // OPTIONS + // ============================================ + + describe('returnArray option', () => { + const data = { string: 'stringValue', number: 0 }; + + it('returns array for single value', () => { + expect(query(data, '$.number', { returnArray: true })).to.deep.equal([0]); + }); + + it('returns array for wildcard', () => { + expect(query(data, '$.*', { returnArray: true })).to.deep.equal(Object.values(data)); + }); + + it('returns array for string value', () => { + expect(query(data, '$.string', { returnArray: true })).to.deep.equal(['stringValue']); + }); + + it('returns empty array for missing property', () => { + expect(query(data, '$.notExist', { returnArray: true })).to.deep.equal([]); + }); + }); + + describe('hideExceptions option', () => { + const cases = [ + '$.bad', + 'bad', + '', + '$...', + '$.$', + '$["bad Quote\']', + '@', + '$[1:2:3:4]', + ]; + + for (const path of cases) { + it(`returns undefined for invalid path: ${path || '(empty)'}`, () => { + expect(query({ test: 1 }, path, { hideExceptions: true })).to.be.undefined; }); + } + + it('returns empty array with returnArray', () => { + expect(query({}, 'bad', { returnArray: true, hideExceptions: true })).to.deep.equal([]); }); }); - describe('with regexp operator', () => { - const REG_PAYLOAD = ['Hello World !', 'hello Earth !', 'Good Morning']; - const testCases = [ - { payload: REG_PAYLOAD, path: `$[?(@ =~ /hello/i )]`, expected: [REG_PAYLOAD[0], REG_PAYLOAD[1]] }, - { payload: REG_PAYLOAD, path: `$[?(@ =~ /World/g )]`, expected: [REG_PAYLOAD[0]] }, - { payload: REG_PAYLOAD, path: `$[?(@ =~ /bad/g )]`, expected: [] }, - { payload: REG_PAYLOAD, path: `$[?(@ =~ /.*/g )]`, expected: REG_PAYLOAD }, - { payload: [1], path: `$[?(@ =~ /.*/g )]`, expected: [] }, + // ============================================ + // INVALID PATHS + // ============================================ + + describe('invalid paths', () => { + const invalidPaths = [ + 'bad', + '', + '$...', + '$.$', + '$["bad Quote\']', + '$[bad Quote\']', + '@', + '$[?(@.test == undefined)]', + '$[1:2:3:4]', + '$[[1:2:3]]', ]; - testCases.forEach(({ payload, path, expected }) => { - it(path, () => { - const res = query(payload, path); + for (const path of invalidPaths) { + it(`throws for: ${path || '(empty)'}`, () => { + expect(() => query({ test: 1 }, path)).to.throw(JSONPathSyntaxError); + }); + } + }); + + // ============================================ + // RFC 9535 FUNCTIONS + // ============================================ + + describe('RFC 9535 functions', () => { + describe('length()', () => { + it('returns string length', () => { + // RFC 9535: filters iterate over array elements + expect(query([{ str: 'hello' }], '$[?(length(@.str) == 5)]', { returnArray: true })) + .to.deep.equal([{ str: 'hello' }]); + }); + + it('returns array length', () => { + expect(query([{ arr: [1, 2, 3] }], '$[?(length(@.arr) == 3)]', { returnArray: true })) + .to.deep.equal([{ arr: [1, 2, 3] }]); + }); + + it('returns object key count', () => { + expect(query([{ obj: { a: 1, b: 2 } }], '$[?(length(@.obj) == 2)]', { returnArray: true })) + .to.deep.equal([{ obj: { a: 1, b: 2 } }]); + }); + + it('filters by length comparison', () => { + const data = [{ str: 'ab' }, { str: 'abc' }, { str: 'abcd' }]; + expect(query(data, '$[?(length(@.str) > 2)]', { returnArray: true })) + .to.deep.equal([{ str: 'abc' }, { str: 'abcd' }]); + }); + }); + + describe('count()', () => { + it('counts array elements', () => { + expect(query([{ items: [1, 2, 3] }], '$[?(count(@.items) == 3)]', { returnArray: true })) + .to.deep.equal([{ items: [1, 2, 3] }]); + }); + + it('counts empty array as zero', () => { + expect(query([{ items: [] }], '$[?(count(@.items) == 0)]', { returnArray: true })) + .to.deep.equal([{ items: [] }]); + }); + }); + + describe('match()', () => { + it('matches full string', () => { + const data = [{ name: 'foo' }, { name: 'bar' }, { name: 'foobar' }]; + expect(query(data, '$[?(match(@.name, "foo"))]', { returnArray: true })) + .to.deep.equal([{ name: 'foo' }]); + }); + + it('matches with regex pattern', () => { + const data = [{ name: 'hello' }, { name: 'world' }]; + expect(query(data, '$[?(match(@.name, "hel.*"))]', { returnArray: true })) + .to.deep.equal([{ name: 'hello' }]); + }); + }); + + describe('search()', () => { + it('finds substring', () => { + const data = [{ name: 'foobar' }, { name: 'bar' }, { name: 'baz' }]; + expect(query(data, '$[?(search(@.name, "foo"))]', { returnArray: true })) + .to.deep.equal([{ name: 'foobar' }]); + }); + + it('finds pattern anywhere in string', () => { + const data = [{ text: 'hello world' }, { text: 'goodbye' }]; + expect(query(data, '$[?(search(@.text, "wor"))]', { returnArray: true })) + .to.deep.equal([{ text: 'hello world' }]); + }); + }); + + describe('value()', () => { + it('extracts single value from array', () => { + expect(query([{ items: [42] }], '$[?(value(@.items) == 42)]', { returnArray: true })) + .to.deep.equal([{ items: [42] }]); + }); + + it('extracts single string value', () => { + expect(query([{ single: 'test' }], '$[?(value(@.single) == "test")]', { returnArray: true })) + .to.deep.equal([{ single: 'test' }]); + }); + }); + + describe('filter without parentheses', () => { + it('matches with RFC 9535 syntax', () => { + const data = [{ key: 42 }, { key: 10 }]; + expect(query(data, '$[?@.key==42]', { returnArray: true })) + .to.deep.equal([{ key: 42 }]); + }); - expect(res).to.deep.equal(expected); + it('uses comparison operators', () => { + const data = [{ a: 1, b: 2 }, { a: 3, b: 4 }]; + expect(query(data, '$[?@.a > 1]', { returnArray: true })) + .to.deep.equal([{ a: 3, b: 4 }]); + }); + }); + + describe('filter on objects', () => { + it('filters object values with wildcard', () => { + // Tests Handler.ts lines 474-480 - filter on plain object values + const data = { + items: { + first: { active: true, value: 10 }, + second: { active: false, value: 20 }, + third: { active: true, value: 30 }, + }, + }; + expect(query(data, '$.items[?(@.active == true)]', { returnArray: true })) + .to.deep.equal([ + { active: true, value: 10 }, + { active: true, value: 30 }, + ]); + }); + + it('filters object children by nested property', () => { + const data = { + users: { + alice: { age: 25, active: true }, + bob: { age: 35, active: false }, + carol: { age: 30, active: true }, + }, + }; + expect(query(data, '$.users[?(@.age > 28)]', { returnArray: true })) + .to.deep.equal([ + { age: 35, active: false }, + { age: 30, active: true }, + ]); }); }); }); - describe('with hide exception option', () => { - const testCases = [ - { path: '$.bad', expected: [], options: { returnArray: true, hideExceptions: true } }, - { path: 'bad', expected: [], options: { returnArray: true, hideExceptions: true } }, - { path: 'bad', expected: undefined, options: { hideExceptions: true } }, - { path: '', expected: undefined, options: { hideExceptions: true } }, - { path: '$...bad', expected: undefined, options: { hideExceptions: true } }, - { path: '$.$', expected: undefined, options: { hideExceptions: true } }, - { path: `$["bad Quote']`, expected: undefined, options: { hideExceptions: true } }, - { path: `$[bad Quote']`, expected: undefined, options: { hideExceptions: true } }, - { path: `$\{bad\}`, expected: undefined, options: { hideExceptions: true } }, - { path: `@`, expected: undefined, options: { hideExceptions: true } }, - { - path: `$[?(@.test == {'1': { hideExceptions: true }})]`, - expected: undefined, - options: { hideExceptions: true }, - }, - { path: `$[1:2:3:4]`, expected: undefined, options: { hideExceptions: true } }, - { path: `$[[1:2:3]]`, expected: undefined, options: { hideExceptions: true } }, + // ============================================ + // NESTED FILTER EXISTENCE CHECKS + // ============================================ + + describe('nested filter existence', () => { + it('returns false when recursive descent finds nothing', () => { + // Tests Handler.ts lines 434-436 - isIndefinite check with empty results + const data = [ + { a: { b: 1 } }, + { a: { c: 2 } }, + ]; + // Filter using recursive descent that returns empty for some items + expect(query(data, '$[?(@..b)]', { returnArray: true })) + .to.deep.equal([{ a: { b: 1 } }]); + }); + + it('returns true when recursive descent finds values', () => { + const data = [ + { nested: { deep: { target: 1 } } }, + { nested: { other: 2 } }, + ]; + expect(query(data, '$[?(@..target)]', { returnArray: true })) + .to.deep.equal([{ nested: { deep: { target: 1 } } }]); + }); + + it('handles wildcard in existence check', () => { + const data = [ + { items: [1, 2, 3] }, + { items: [] }, + ]; + expect(query(data, '$[?(@.items[*])]', { returnArray: true })) + .to.deep.equal([{ items: [1, 2, 3] }]); + }); + + it('checks existence using root reference in filter', () => { + // Tests Handler.ts lines 424-430 - root reference in filter existence + const data = { + threshold: 15, + items: [ + { value: 10 }, + { value: 20 }, + ], + }; + expect(query(data, '$.items[?($.threshold)]', { returnArray: true })) + .to.deep.equal([{ value: 10 }, { value: 20 }]); + }); + + it('returns empty when root reference does not exist', () => { + // Tests Handler.ts lines 424-430 - root reference to missing property + const data = { + items: [{ value: 10 }], + }; + expect(query(data, '$.items[?($.threshold)]', { returnArray: true })) + .to.deep.equal([]); + }); + + it('handles root reference with indefinite results', () => { + // Tests Handler.ts lines 426-428 - root with wildcard/filter + const data = { + tags: ['a', 'b', 'c'], + items: [{ id: 1 }], + }; + expect(query(data, '$.items[?($.tags[*])]', { returnArray: true })) + .to.deep.equal([{ id: 1 }]); + }); + + it('returns empty when root indefinite result is empty', () => { + // Tests Handler.ts lines 426-428 - root with empty indefinite result + const data = { + tags: [], + items: [{ id: 1 }], + }; + expect(query(data, '$.items[?($.tags[*])]', { returnArray: true })) + .to.deep.equal([]); + }); + }); + + // ============================================ + // NEGATIVE NUMBERS IN FILTERS + // ============================================ + + describe('negative numbers in filters', () => { + it('compares with negative literal', () => { + const data = [{ value: -5 }, { value: 5 }, { value: -10 }]; + expect(query(data, '$[?(@.value == -5)]', { returnArray: true })) + .to.deep.equal([{ value: -5 }]); + }); + + it('compares with negative in arithmetic', () => { + const data = [{ value: 3 }]; + expect(query(data, '$[?(@.value == 5 + -2)]', { returnArray: true })) + .to.deep.equal([{ value: 3 }]); + }); + + it('handles negative result from subtraction', () => { + const data = [{ value: -2 }]; + expect(query(data, '$[?(@.value == 3 - 5)]', { returnArray: true })) + .to.deep.equal([{ value: -2 }]); + }); + }); + + // ============================================ + // SLICE EDGE CASES + // ============================================ + + describe('slice edge cases', () => { + it('returns empty for step=0 (RFC 9535)', () => { + const data = ['a', 'b', 'c', 'd', 'e']; + expect(query(data, '$[0:3:0]', { returnArray: true })) + .to.deep.equal([]); + }); + }); + + // ============================================ + // DOT NUMERIC LITERAL EDGE CASES + // ============================================ + + describe('dot numeric literal edge cases', () => { + it('returns undefined when object has no matching property', () => { + const data = { a: 1, b: 2 }; + expect(query(data, '$.5')).to.be.undefined; + }); + + it('returns undefined when accessing numeric property on primitive', () => { + const data = { value: 'string' }; + expect(query(data, '$.value.0')).to.be.undefined; + }); + + it('accesses numeric property on object', () => { + const data = { '0': 'zero', '1': 'one' }; + expect(query(data, '$.0')).to.equal('zero'); + }); + }); + + // ============================================ + // STRING COMPARISONS (RFC 9535) + // ============================================ + + describe('string comparisons', () => { + const data = [ + { name: 'apple' }, + { name: 'banana' }, + { name: 'cherry' }, ]; - testCases.forEach(({ path, expected, options }) => { - it(path, () => { - const res = query({ test: 1 }, path, options); + it('compares strings with less than', () => { + expect(query(data, '$[?(@.name < "banana")]', { returnArray: true })) + .to.deep.equal([{ name: 'apple' }]); + }); + + it('compares strings with less than or equal', () => { + expect(query(data, '$[?(@.name <= "banana")]', { returnArray: true })) + .to.deep.equal([{ name: 'apple' }, { name: 'banana' }]); + }); + + it('compares strings with greater than', () => { + expect(query(data, '$[?(@.name > "banana")]', { returnArray: true })) + .to.deep.equal([{ name: 'cherry' }]); + }); + + it('compares strings with greater than or equal', () => { + expect(query(data, '$[?(@.name >= "banana")]', { returnArray: true })) + .to.deep.equal([{ name: 'banana' }, { name: 'cherry' }]); + }); + + it('returns empty when comparing string with number', () => { + expect(query(data, '$[?(@.name < 100)]', { returnArray: true })) + .to.deep.equal([]); + }); + + it('returns empty when comparing number with string', () => { + const numData = [{ value: 10 }, { value: 20 }]; + expect(query(numData, '$[?(@.value < "30")]', { returnArray: true })) + .to.deep.equal([]); + }); + }); + + // ============================================ + // BUG FIX REGRESSION TESTS + // ============================================ + + describe('bug fix regressions', () => { + describe('negative step slice (RFC 9535 Section 2.3.4.2)', () => { + const arr = [0, 1, 2, 3, 4]; + + it('$[::-1] reverses the array', () => { + expect(query(arr, '$[::-1]')).to.deep.equal([4, 3, 2, 1, 0]); + }); + + it('$[4:0:-1] returns elements from index 4 down to 1', () => { + expect(query(arr, '$[4:0:-1]')).to.deep.equal([4, 3, 2, 1]); + }); + + it('$[3:0:-2] returns every second element from 3 down to 1', () => { + expect(query(arr, '$[3:0:-2]')).to.deep.equal([3, 1]); + }); + + it('$[2::-1] returns elements from index 2 to start', () => { + expect(query(arr, '$[2::-1]')).to.deep.equal([2, 1, 0]); + }); + }); + + describe('subtraction without whitespace', () => { + it('@.a-@.b works without spaces', () => { + expect(query([{ a: 5, b: 2 }], '$[?@.a-@.b>0]')).to.deep.equal([{ a: 5, b: 2 }]); + }); + + it('@.a-5 works (subtraction with literal)', () => { + expect(query([{ a: 10 }], '$[?@.a-5>0]')).to.deep.equal([{ a: 10 }]); + }); + + it('@.a--5 works (double minus for negative literal)', () => { + expect(query([{ a: 10 }], '$[?@.a--5>10]')).to.deep.equal([{ a: 10 }]); + }); + + it('hyphenated keys still work', () => { + expect(query([{ 'my-key': 1 }], '$[*].my-key')).to.deep.equal([1]); + expect(query([{ 'my-key-name': 2 }], '$[*].my-key-name')).to.deep.equal([2]); + }); + }); + + describe('undefined array elements', () => { + it('$[*] includes undefined elements', () => { + const arr = [1, undefined, 3]; + expect(query(arr, '$[*]')).to.deep.equal([1, undefined, 3]); + }); + + it('$[1] returns undefined value (not "no match")', () => { + const arr = [1, undefined, 3]; + const result = query(arr, '$[1]'); + // The result is the undefined value itself + expect(result).to.equal(undefined); + }); + }); + + describe('I-Regexp validation without lookbehind', () => { + it('match() works with basic patterns', () => { + expect(query([{ v: 'abc' }], '$[?(match(@.v, "abc"))]')).to.deep.equal([{ v: 'abc' }]); + }); + + it('match() rejects word boundary \\b outside char class', () => { + expect(query([{ v: 'test' }], '$[?(match(@.v, "\\\\btest\\\\b"))]')).to.deep.equal([]); + }); + + it('match() allows \\b inside char class (backspace)', () => { + // \b inside [...] means backspace, which is allowed + expect(query([{ v: 'a' }], '$[?(match(@.v, "[a\\\\b]"))]')).to.deep.equal([{ v: 'a' }]); + }); + + it('match() rejects backreferences', () => { + expect(query([{ v: 'aa' }], '$[?(match(@.v, "(a)\\\\1"))]')).to.deep.equal([]); + }); - expect(res).to.deep.equal(expected); + it('match() rejects lookahead', () => { + expect(query([{ v: 'test' }], '$[?(match(@.v, "t(?=est)"))]')).to.deep.equal([]); }); }); }); diff --git a/tests/rfc9535-compliance.test.ts b/tests/rfc9535-compliance.test.ts new file mode 100644 index 0000000..4c173ef --- /dev/null +++ b/tests/rfc9535-compliance.test.ts @@ -0,0 +1,267 @@ +/** + * RFC 9535 Full Compliance Tests + * + * Tests for complete RFC 9535 JSONPath specification compliance: + * + * Normalized Paths (Section 2.7): + * - Single-quoted string selectors: $['key'] instead of $["key"] + * - Proper escaping: single quotes, backslashes, control characters + * - Numeric indices for arrays: $[0] instead of $['0'] + * + * Integer Range (I-JSON): + * - Integers must be within [-(2^53)+1, (2^53)-1] + * - Values outside range should throw errors + * + * I-Regexp Compliance (RFC 9485): + * - match() and search() use restricted I-Regexp subset + * - Reject backreferences, lookahead/lookbehind, named groups, word boundaries + * + * Empty Nodelist Comparison: + * - Two empty nodelists should compare equal + * - Comparison semantics for undefined values + * + * Function Type System: + * - Proper return values for edge cases (empty nodelists, wrong types) + */ +import { expect } from 'chai'; +import { query, paths, parse } from '../src/index'; + +describe('RFC 9535 Full Compliance', () => { + // ============================================ + // NORMALIZED PATHS (Section 2.7) + // ============================================ + + describe('Normalized Paths (Section 2.7)', () => { + it('should use single quotes for name selectors', () => { + const result = paths({ a: 1 }, '$.a'); + expect(result).to.deep.equal(["$['a']"]); + }); + + it('should use single quotes for nested paths', () => { + const result = paths({ a: { b: { c: 1 } } }, '$.a.b.c'); + expect(result).to.deep.equal(["$['a']['b']['c']"]); + }); + + it('should escape single quotes in keys', () => { + const data = { "it's": 1 }; + const result = paths(data, "$[\"it's\"]"); + expect(result).to.deep.equal(["$['it\\'s']"]); + }); + + it('should escape backslashes in keys', () => { + const data = { 'a\\b': 1 }; + const result = paths(data, '$["a\\\\b"]'); + expect(result).to.deep.equal(["$['a\\\\b']"]); + }); + + it('should escape newlines in keys', () => { + const data = { 'a\nb': 1 }; + const result = paths(data, '$["a\\nb"]'); + expect(result).to.deep.equal(["$['a\\nb']"]); + }); + + it('should escape tabs in keys', () => { + const data = { 'a\tb': 1 }; + const result = paths(data, '$["a\\tb"]'); + expect(result).to.deep.equal(["$['a\\tb']"]); + }); + + it('should use numeric indices for arrays', () => { + const result = paths([1, 2, 3], '$[1]'); + expect(result).to.deep.equal(['$[1]']); + }); + + it('should handle wildcard with single quotes for object keys', () => { + const result = paths({ a: 1, b: 2 }, '$.*'); + expect(result).to.include("$['a']"); + expect(result).to.include("$['b']"); + }); + }); + + // ============================================ + // INTEGER RANGE (I-JSON) + // ============================================ + + describe('Integer Range (I-JSON)', () => { + it('should accept Number.MAX_SAFE_INTEGER', () => { + expect(() => parse(`$[${Number.MAX_SAFE_INTEGER}]`)).not.to.throw(); + }); + + it('should accept Number.MIN_SAFE_INTEGER', () => { + expect(() => parse(`$[${Number.MIN_SAFE_INTEGER}]`)).not.to.throw(); + }); + + it('should reject integers beyond MAX_SAFE_INTEGER', () => { + expect(() => parse('$[9007199254740992]')).to.throw(/I-JSON range/); + }); + + it('should reject integers below MIN_SAFE_INTEGER', () => { + expect(() => parse('$[-9007199254740992]')).to.throw(/I-JSON range/); + }); + + it('should accept floating point numbers (no range check)', () => { + // Floating point numbers are not subject to integer range check + expect(() => parse('$[?(@ > 1e308)]')).not.to.throw(); + }); + }); + + // ============================================ + // I-REGEXP COMPLIANCE (RFC 9485) + // ============================================ + + describe('I-Regexp Compliance (RFC 9485)', () => { + describe('match() function', () => { + it('should work with basic patterns', () => { + const result = query([{ name: 'hello' }], '$[?(match(@.name, "hello"))]'); + expect(result).to.have.length(1); + }); + + it('should work with regex patterns', () => { + const result = query([{ name: 'hello' }], '$[?(match(@.name, "hel.*"))]'); + expect(result).to.have.length(1); + }); + + it('should reject backreferences', () => { + // Pattern with backreference \1 + const result = query([{ name: 'aa' }], '$[?(match(@.name, "(a)\\\\1"))]'); + expect(result).to.deep.equal([]); + }); + + it('should reject lookahead', () => { + const result = query([{ name: 'test' }], '$[?(match(@.name, "t(?=est)"))]'); + expect(result).to.deep.equal([]); + }); + + it('should reject lookbehind', () => { + const result = query([{ name: 'test' }], '$[?(match(@.name, "(?<=t)est"))]'); + expect(result).to.deep.equal([]); + }); + + it('should reject negative lookahead', () => { + const result = query([{ name: 'test' }], '$[?(match(@.name, "t(?!x)"))]'); + expect(result).to.deep.equal([]); + }); + + it('should reject named capture groups', () => { + const result = query([{ name: 'test' }], '$[?(match(@.name, "(?test)"))]'); + expect(result).to.deep.equal([]); + }); + + it('should reject word boundaries', () => { + const result = query([{ name: 'test word' }], '$[?(match(@.name, "\\\\bword\\\\b"))]'); + expect(result).to.deep.equal([]); + }); + }); + + describe('search() function', () => { + it('should work with basic patterns', () => { + const result = query([{ text: 'hello world' }], '$[?(search(@.text, "world"))]'); + expect(result).to.have.length(1); + }); + + it('should reject non-I-Regexp features', () => { + // Backreference + const result = query([{ text: 'aa' }], '$[?(search(@.text, "(a)\\\\1"))]'); + expect(result).to.deep.equal([]); + }); + }); + }); + + // ============================================ + // EMPTY NODELIST COMPARISON + // ============================================ + + describe('Empty Nodelist Comparison', () => { + it('should compare two empty nodelists as equal', () => { + const result = query([{ a: 1 }], '$[?(@.nonexistent == @.alsoNonexistent)]'); + expect(result).to.deep.equal([{ a: 1 }]); + }); + + it('should not match when only one nodelist is empty', () => { + const result = query([{ a: 1 }], '$[?(@.a == @.nonexistent)]'); + expect(result).to.deep.equal([]); + }); + + it('should work in filter with multiple conditions', () => { + const result = query([{ a: 1 }, { b: 2 }], '$[?(@.x == @.y)]'); + expect(result).to.have.length(2); // Both match because both have empty x and y + }); + }); + + // ============================================ + // COMPARISON SEMANTICS + // ============================================ + + describe('Comparison Semantics', () => { + it('should compare arrays by element order', () => { + const result = query([{ arr: [1, 2, 3] }], '$[?(@.arr == [1, 2, 3])]'); + expect(result).to.have.length(1); + }); + + it('should not match arrays with different order', () => { + const result = query([{ arr: [1, 2, 3] }], '$[?(@.arr == [3, 2, 1])]'); + expect(result).to.deep.equal([]); + }); + + it('should compare objects by member names and values', () => { + const result = query([{ obj: { a: 1, b: 2 } }], '$[?(@.obj == {"a": 1, "b": 2})]'); + expect(result).to.have.length(1); + }); + + it('should not match objects with different keys', () => { + // Tests helper.ts line 35 - object comparison when key exists in one but not other + const result = query([{ obj: { a: 1, b: 2 } }], '$[?(@.obj == {"a": 1, "c": 2})]'); + expect(result).to.deep.equal([]); + }); + + it('should not match objects with different values', () => { + // Tests helper.ts lines 36-37 - object values don't match + const result = query([{ obj: { a: 1, b: 2 } }], '$[?(@.obj == {"a": 1, "b": 3})]'); + expect(result).to.deep.equal([]); + }); + + it('should not match objects with different key count', () => { + // Tests helper.ts line 33 - objects have different number of keys + const result = query([{ obj: { a: 1, b: 2, c: 3 } }], '$[?(@.obj == {"a": 1, "b": 2})]'); + expect(result).to.deep.equal([]); + }); + + it('should not match array with object', () => { + // Tests helper.ts line 27 - one is array, other is object + const result = query([{ val: [1, 2, 3] }], '$[?(@.val == {"0": 1, "1": 2, "2": 3})]'); + expect(result).to.deep.equal([]); + }); + + it('should treat null as a value (not undefined)', () => { + const result = query([{ a: null }], '$[?(@.a == null)]'); + expect(result).to.have.length(1); + }); + + it('should not match null with missing property', () => { + const result = query([{ b: 1 }], '$[?(@.a == null)]'); + expect(result).to.deep.equal([]); + }); + }); + + // ============================================ + // FUNCTION TYPE SYSTEM + // ============================================ + + describe('Function Type System', () => { + it('length() should return undefined for non-string/array/object', () => { + // length(123) should return undefined, making comparison false + const result = query([{ num: 123 }], '$[?(length(@.num) == 3)]'); + expect(result).to.deep.equal([]); + }); + + it('value() should return undefined for empty nodelist', () => { + const result = query([{ a: 1 }], '$[?(value(@.nonexistent) == 1)]'); + expect(result).to.deep.equal([]); + }); + + it('count() should return 0 for undefined', () => { + const result = query([{ a: 1 }], '$[?(count(@.nonexistent) == 0)]'); + expect(result).to.have.length(1); + }); + }); +}); diff --git a/tsup.config.ts b/tsup.config.ts new file mode 100644 index 0000000..9d6abc2 --- /dev/null +++ b/tsup.config.ts @@ -0,0 +1,16 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + entry: ['src/index.ts'], + format: ['cjs', 'esm'], + dts: true, + sourcemap: true, + clean: true, + platform: 'neutral', + outDir: 'dist', + outExtension({ format }) { + return { + js: format === 'esm' ? '.mjs' : '.cjs', + }; + }, +}); diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index 9560832..0000000 --- a/webpack.config.js +++ /dev/null @@ -1,42 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -const path = require('path'); - -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -const buildConfig = (platform, extensions) => ({ - mode: 'production', - entry: './src/index.ts', - output: { - path: path.resolve(__dirname, 'dist'), - filename: `index.${platform}.${extensions}`, - chunkFormat: extensions === 'mjs' ? 'module' : 'commonjs', - library: { - type: extensions === 'mjs' ? 'module' : 'commonjs', - }, - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/, - }, - ], - }, - resolve: { - extensions: ['.ts', '.js'], - }, - externals: ["antlr4"], - target: platform, - plugins: [], - devtool: 'source-map', - experiments: { - outputModule: extensions === 'mjs', - }, -}); - -module.exports = [ - buildConfig('node', 'cjs'), - buildConfig('node', 'mjs'), - buildConfig('web', 'cjs'), - buildConfig('web', 'mjs'), -];